1: #if defined(LIBC_SCCS) && !defined(lint)
   2: static char sccsid[] = "@(#)gets.c	5.2 (Berkeley) 3/9/86";
   3: #endif LIBC_SCCS and not lint
   4: 
   5: #include    <stdio.h>
   6: 
   7: char *
   8: gets(s)
   9: char *s;
  10: {
  11:     register c;
  12:     register char *cs;
  13: 
  14:     cs = s;
  15:     while ((c = getchar()) != '\n' && c != EOF)
  16:         *cs++ = c;
  17:     if (c == EOF && cs==s)
  18:         return(NULL);
  19:     *cs++ = '\0';
  20:     return(s);
  21: }

Defined functions

gets defined in line 7; never used

Defined variables

sccsid defined in line 2; never used
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1238
Valid CSS Valid XHTML 1.0 Strict