Thanks, I installed that.
The getline function allocates memory that has to be freed by the caller
regardless of whether or not the call succeeds. This is the case at
least on current GNU libc getline, and also the case with Gnulib's own
replacement getline implementation.
Gnulib's readline replacement, which calls getlin
>
> Some testing reveal that the readline strip any number of \n or \r at
> the end:
>
> [EMAIL PROTECTED]:~$ cat foo.c
> #include
>
> int main () {
> char *foo = readline("bar: ");
> size_t i;
>
> for (i = 0; i < strlen (foo); i++)
> printf ("%02x\n", foo[i]);
> }
Your test app was
Eric Blake <[EMAIL PROTECTED]> writes:
> According to Simon Josefsson on 11/9/2005 7:17 PM:
>> Is this right? I'm not sure what a portable way to remove EOL is.
>> Anyway, I installed this because it work on known platforms.
>
> The concept is correct (the full-blown readline library does indeed
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Simon Josefsson on 11/9/2005 7:17 PM:
> Is this right? I'm not sure what a portable way to remove EOL is.
> Anyway, I installed this because it work on known platforms.
The concept is correct (the full-blown readline library does indeed
Is this right? I'm not sure what a portable way to remove EOL is.
Anyway, I installed this because it work on known platforms.
2005-11-10 Simon Josefsson <[EMAIL PROTECTED]>
* readline.c: Remove EOL.
--- readline.c 20 Sep 2005 11:12:16 +0200 1.2
+++ readline.c 10 Nov 2005 03