Comment Re:What are comments? (Score 2) 593
I would have written it something like as follows (seeming as I hate the goto statement)
but I guess it all comes down to a matter of personal style./* Intrinsic ctty (2002.0505) */
void int_ctty (char *filename)
{
int file;
file=open(filename,O_RDWR|O_APPEND|O_TEXT);
if (file && isatty(file)) {
redirin(filename);
redirout(filename,1);
} else {
fprintf (stderr,"Invalid device\n");
}
if (file) close(file);
return;
}