Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/gets.refentry @ 2763:c03464c24b14
Fixed a minor typo in the arcadepak's makefile related to DriveWire3 and Becker.
Updated makefile with new option nightlytest. Run option is "make nightlytest".
You also need to test environment variable TESTSSHDIR and TESTSSHSERVER before using it.
Also updated the nightly option so if the SOURCEUSER environment variable is not set it will report it.
author | drencor-xeen |
---|---|
date | Wed, 16 Jan 2013 17:33:46 -0600 |
parents | a74b8d8c28db |
children |
line wrap: on
line source
<refentry id="gets"> <refnamediv> <refname>Gets</refname> <refname>Fgets</refname> <refpurpose>input a string</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> #include <stdio.h> </funcsynopsisinfo> <funcprototype> <funcdef>char *<function>gets</function></funcdef> <paramdef>char *<parameter>s</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>char *<function>fgets</function></funcdef> <paramdef>char *<parameter>s</parameter></paramdef> <paramdef>int <parameter>n</parameter></paramdef> <paramdef>FILE *<parameter>fp</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1><title>Description</title> <para> Fgets reads characters from the file "fp" and places them in the buffer pointed to by "s" up to a carriage return ('\n') but not more than "n" - 1 characters. A null character is appended to the end of the string. </para> <para> Gets is similar to fgets, but gets is applied to "stdin" and no maximum is stipulated and '\n' is replaced by a null. </para> <para> Both functions return their first arguments. </para> </refsect1> <refsect1><title>Caveats</title> <para> The different treatment of the "\n" by these functions is retained here for portability reasons. </para> </refsect1> <refsect1><title>Diagnostics</title> <para> Both functions return NULL on end-of-file or error. </para> </refsect1> <refsect1><title>See Also</title> <para> <link linkend="puts">puts()</link>, <link linkend="getc">getc()</link>, <link linkend="scanf">scanf()</link>, <link linkend="fread">fread()</link> </para> </refsect1> </refentry>