Re: ftp: make use of getline(3)

2021-02-15 Thread Jeremie Courreges-Anglas
On Sun, Feb 14 2021, Christian Weisgerber wrote: > Christian Weisgerber: > >> > Make use of getline(3) in ftp(1). >> > >> > Replace fparseln(3) with getline(3). This removes the only use >> > of libutil.a(fparseln.o) from the ramdisk. >> >

Re: ftp: make use of getline(3)

2021-02-14 Thread Christian Weisgerber
Christian Weisgerber: > > Make use of getline(3) in ftp(1). > > > > Replace fparseln(3) with getline(3). This removes the only use > > of libutil.a(fparseln.o) from the ramdisk. > > Replace a complicated fgetln(3) idiom with the much simpler getline(3). >

Re: ftp: make use of getline(3)

2021-02-06 Thread Christian Weisgerber
Christian Weisgerber: > Make use of getline(3) in ftp(1). > > Replace fparseln(3) with getline(3). This removes the only use > of libutil.a(fparseln.o) from the ramdisk. > Replace a complicated fgetln(3) idiom with the much simpler getline(3). New diff that fixes a bug I intro

Re: ftp: make use of getline(3)

2021-01-30 Thread Hiltjo Posthuma
On Sat, Jan 30, 2021 at 11:57:01AM +0100, Claudio Jeker wrote: > On Sat, Jan 30, 2021 at 11:52:15AM +0100, Hiltjo Posthuma wrote: > > On Sat, Jan 30, 2021 at 12:22:04AM +0100, Christian Weisgerber wrote: > > > Hiltjo Posthuma: > > > > > > > > @@ -75,19 +74,8 @@ cookie_load(void) > > > > >

Re: ftp: make use of getline(3)

2021-01-30 Thread Claudio Jeker
On Sat, Jan 30, 2021 at 11:52:15AM +0100, Hiltjo Posthuma wrote: > On Sat, Jan 30, 2021 at 12:22:04AM +0100, Christian Weisgerber wrote: > > Hiltjo Posthuma: > > > > > > @@ -75,19 +74,8 @@ cookie_load(void) > > > > if (fp == NULL) > > > > err(1, "cannot open cookie file

Re: ftp: make use of getline(3)

2021-01-30 Thread Hiltjo Posthuma
On Sat, Jan 30, 2021 at 12:22:04AM +0100, Christian Weisgerber wrote: > Hiltjo Posthuma: > > > > @@ -75,19 +74,8 @@ cookie_load(void) > > > if (fp == NULL) > > > err(1, "cannot open cookie file %s", cookiefile); > > > date = time(NULL); > > > - lbuf = NULL; > > > - while ((line =

Re: ftp: make use of getline(3)

2021-01-29 Thread Christian Weisgerber
Hiltjo Posthuma: > > @@ -75,19 +74,8 @@ cookie_load(void) > > if (fp == NULL) > > err(1, "cannot open cookie file %s", cookiefile); > > date = time(NULL); > > - lbuf = NULL; > > - while ((line = fgetln(fp, )) != NULL) { > > - if (line[len - 1] == '\n') { > > -

Re: ftp: make use of getline(3)

2021-01-29 Thread Hiltjo Posthuma
On Fri, Jan 29, 2021 at 07:22:11PM +0100, Christian Weisgerber wrote: > Make use of getline(3) in ftp(1). > > Replace fparseln(3) with getline(3). This removes the only use > of libutil.a(fparseln.o) from the ramdisk. > Replace a complicated fgetln(3) idiom with the much si

ftp: make use of getline(3)

2021-01-29 Thread Christian Weisgerber
Make use of getline(3) in ftp(1). Replace fparseln(3) with getline(3). This removes the only use of libutil.a(fparseln.o) from the ramdisk. Replace a complicated fgetln(3) idiom with the much simpler getline(3). OK? Index: distrib/special/ftp/Makefile