summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libreadline/examples/manexamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/lib/libreadline/examples/manexamp.c')
-rw-r--r--gnu/lib/libreadline/examples/manexamp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gnu/lib/libreadline/examples/manexamp.c b/gnu/lib/libreadline/examples/manexamp.c
index b7ec96a..3496efa 100644
--- a/gnu/lib/libreadline/examples/manexamp.c
+++ b/gnu/lib/libreadline/examples/manexamp.c
@@ -15,11 +15,11 @@ static char *line_read = (char *)NULL;
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
char *
-do_gets ()
+rl_gets ()
{
/* If the buffer has already been allocated, return the memory
to the free pool. */
- if (line_read != (char *)NULL)
+ if (line_read)
{
free (line_read);
line_read = (char *)NULL;
@@ -35,7 +35,6 @@ do_gets ()
return (line_read);
}
-
/* **************************************************************** */
/* */
/* Writing a Function to be Called by Readline. */
@@ -93,4 +92,3 @@ invert_case_line (count, key)
rl_point = end - direction;
}
-
OpenPOWER on IntegriCloud