/* gets - get string from standard input or file */ gets(s, n) /* read at most n chars from STDIN into string s, removing terminal NEWLINE. */ char *s; int n; { int c; char *cs; cs= s; while (--n > 0 && (c= getchar()) != EOF) if ((*cs++ = c) == '\n') { cs-- /* remove NEWLINE */; break; } *cs= EOS; return ((c == EOF && cs == s)? NULL: s); } /* end gets */  : s); } /* end gets */  om STDIN into string s, removing termina