January 23rd, 2002, 01:33 AM
how do you use readline. it is not documented very well.
can someone show some sample code using readline to
take in a command line.
January 23rd, 2002, 12:27 PM
Have you checked out the man page? It's pretty extensive. Anyway; this is probably all you need to use it:
I just found this by searching for "Readline documentation" using Google: http://cnswww.cns.cwru.edu/~chet/readline/readline.html
char *readline (prompt)
Readline is Copyright (C) 1989, 1991, 1993, 1995, 1996 by
the Free Software Foundation, Inc.
readline will read a line from the terminal and return it,
using prompt as a prompt. If prompt is null, no prompt is
issued. The line returned is allocated with malloc(3), so
the caller must free it when finished. The line returned
has the final newline removed, so only the text of the
Puritanism: The haunting fear that someone, somewhere may be having fun