pcp
[Top] [All Lists]

Re: [pcp] readline support for dbpmda

To: Nathan Scott <nscott@xxxxxxxxxx>
Subject: Re: [pcp] readline support for dbpmda
From: Andrew Wansink <ajwans@xxxxxxxxxxx>
Date: Fri, 22 Jan 2010 09:21:16 +1100
Cc: "kenj@xxxxxxxxxxxxxxxx" <kenj@xxxxxxxxxxxxxxxx>, Andrew Wansink <ajwans@xxxxxxxxxxx>, "pcp@xxxxxxxxxxx" <pcp@xxxxxxxxxxx>
In-reply-to: <298651563.1909311263951566508.JavaMail.root@xxxxxxxxxxxxxxxxxx>
References: <1263932134.18485.22.camel@xxxxxxxxxxxxxxxx> <298651563.1909311263951566508.JavaMail.root@xxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
<snip>

> Here...
> 
> --- a/src/dbpmda/src/dbpmda.c
> +++ b/src/dbpmda/src/dbpmda.c
> @@ -78,7 +78,14 @@ main(int argc, char **argv)
>  #endif                                       
> 
>         case 'e':               /* echo input */
> +#if HAVE_READLINE
>  ...
> 
> And here...
> 
> --- a/src/dbpmda/src/lex.l
> +++ b/src/dbpmda/src/lex.l
> @@ -24,6 +24,13 @@ int lineno = 0;
> 
>  #include "./lex.h"
> 
> +#if HAVE_READLINE
> +#include <readline/readline.h>
> +#include <readline/history.h>
> 
> (and one or two more places) ... we use "#if HAVE_READLINE",
> should be "#ifdef" I suspect - for platforms with no support
> it will be undef (not zero).

"#if SOMETHING" will preprocess out if either the SOMETHING
is undefinde or that SOMETHING == 0.

Andrew Wansink

<snip>

<Prev in Thread] Current Thread [Next in Thread>