readline AWOL?
Jorge Almeida
jjalmeida at gmail.com
Tue Nov 18 12:15:37 PST 2008
On Tue, 18 Nov 2008, Dog Walker wrote:
>
> I would try doing what it says, i.e., declaring the readline function
> before you use it:
>
> char *
> readline (const char *prompt);
> int main(int argc, char *argv[])
> {
> char *lp;
> lp=readline(MAINPROMPT);
> return 0;
> }
>
I think what it says is just the standard way of telling us how the
function is used. For example, "man open" says:
NAME
open, creat - open and possibly create a file or device
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
But you don't copy "int open(const char *pathname, int flags);" to your
program, the "include" does it.
Anyway, I tried it and it's just the same. I believe the FC5 may not be
completely sane, but it works on Gentoo and that's enough.
Jorge Almeida
More information about the Linux-users
mailing list