gets man page on NeXTSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
NeXTSTEP logo
[printable version]


GETS(3S)							      GETS(3S)

NAME
       gets, fgets - get a string from a stream

SYNOPSIS
       #include <stdio.h>

       char *gets(char *s);

       char *fgets(char *s, int n, FILE *stream);

DESCRIPTION
       Gets  reads a string into s from the standard input stream stdin, until
       end-of-file is encountered or a new-line character is read.  The string
       is  terminated by a newline character, which is replaced in s by a null
       character.

       Fgets  reads  n-1  characters,  or  up  through	a  newline  character,
       whichever  comes	 first,	 from  the  stream  into  the  string  s.   No
       additional characters are read after a  new-line	 character  (which  is
       retained)  or  after  end-of-file.   The	 last character read into s is
       followed by a null character.

RETURN VALUE
       Fgets and gets returns  s  if  successful.   If	unsuccessful,  a  null
       pointer is returned and an error code is stored in errno.

ERRORS
       The  underlying	function  of  fgets  and  gets	is read(2).  The error
       conditions specified for read(2) apply to fgets and gets.

SEE ALSO
       read(2), puts(3S), getc(3S), scanf(3S), fread(3S), ferror(3S)

DIAGNOSTICS
       Gets and fgets return the constant pointer NULL upon  end  of  file  or
       error.

BUGS
       Gets  deletes  a	 newline,  fgets keeps it, all in the name of backward
       compatibility.

				August 1, 1992			      GETS(3S)
[top]

List of man pages available for NeXTSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net