fout = stderr;
fin = stdin;
} else { /* Reading directly from terminal here */
- (void)tcgetattr(fileno(fin), &oterm);
+ tcgetattr(fileno(fin), &oterm);
term = oterm; /* Save original info */
term.c_lflag &= ~ECHO;
- (void)fputs(prompt, fout);
+ fputs(prompt, fout);
rewind(fout); /* implied flush */
- (void)tcsetattr(fileno(fin), TCSANOW, &term);
+ tcsetattr(fileno(fin), TCSANOW, &term);
}
for (p = buf; (ch = getc(fin)) != EOF && ch != '\n' &&
*p = '\0';
if (istty) {
- (void)tcsetattr(fileno(fin), TCSANOW, &oterm);
+ tcsetattr(fileno(fin), TCSANOW, &oterm);
rewind(fout);
- (void)fputc('\n', fout);
- (void)fclose(fin);
+ fputc('\n', fout);
+ fclose(fin);
}
return buf;
}