home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdio / gets.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  581 b   |  29 lines

  1. @node gets, stdio
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdio.h>
  6.  
  7. char *gets(char *buffer);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Reads characters from @code{stdin}, storing them in @var{buffer}, until
  13. either end of file or a newline is encountered.  If any characters were
  14. stored, the @var{buffer} is then @code{NULL} terminated and its address
  15. is returned, else @code{NULL} is returned.
  16.  
  17. @subheading Return Value
  18.  
  19. The address of the buffer, or @code{NULL}.
  20.  
  21. @subheading Example
  22.  
  23. @example
  24. char buf[1000];
  25. while (gets(buf))
  26.   puts(buf);
  27. @end example
  28.  
  29.