GETS - get a string from input.

(ANSI Standard)

Usage:

#include <stdio.h>
ptr = gets( s );

Where:

char *s;
points to an area of memory into which the string should be read.
char *ptr;
points to the string that has been read in.

Description:

"gets" reads a string into memory and returns a pointer to this string. Collection of the string begins at the current point in the input stream and ends when a new-line character is encountered (or end-of-file). The new-line is replaced by a '\0' as the string is copied into "s".

If there is a read error or you have reached end of file, "gets" returns NULL.

Copyright © 1996, Thinkage Ltd.