Path: utzoo!attcan!uunet!mcsun!unido!ira.uka.de!fauern!fauern!faui09!roarment From: roarment@faui09.informatik.uni-erlangen.de (Roberto Armenti) Newsgroups: comp.lang.c Subject: Redirection question Message-ID: Date: 12 Nov 90 15:23:14 GMT Sender: root@medusa.informatik.uni-erlangen.de Lines: 25 Hi net-people, perhaps someone out there can help me. Is there a _portable_ way to recognize whether input comes from stdin or from another stream ? To make the problem clearer : i'm working on a programm that takes its input from stdin. If however someone chooses to redirect the input to a file, so that data is read from that file, how can I figure that out ( Prompting and so on should not occur in this case ) ??? The solution should at least work on UNIX _AND_ MS-DOS, so i'm looking for a _portable_ implementation. Help out there ? Thanks in advance Roberto -- please contact ( no commercials please ) * Roberto Armenti * Voice * For E-Mail * On IRC * Wielandstrasse 6 * 0841/ * roarment@faui09.informatik. * madguitar * 8070 Ingolstadt * 52126 * uni-erlangen.de * or just mad