> Jérémie Courrèges-Anglas wrote:
> > Michael McConville writes:
> > > It looks like it can be pretty easily replaced with calls to err(3),
> > > errx(3), warn(3), warnx(3), etc.
> >
> > Not sure about this, you'd have to repeat the same code over and over to
> > print the line number and file
Jérémie Courrèges-Anglas wrote:
> Michael McConville writes:
> > It looks like it can be pretty easily replaced with calls to err(3),
> > errx(3), warn(3), warnx(3), etc.
>
> Not sure about this, you'd have to repeat the same code over and over to
> print the line number and file name.
Good poin
Michael McConville writes:
> Jérémie Courrèges-Anglas wrote:
>> Tobias Stoeckmann writes:
>>
>> > $ sed s/a/b/ /nofile
>> > sed: 0: /nofile: /nofile
>> >
>> > That message doesn't tell me a lot, let's better write
>> > strerror(errno) if fopen returns NULL:
>> >
>> > $ ./sed s/a/b/ /nofile
>> >
Jérémie Courrèges-Anglas wrote:
> Tobias Stoeckmann writes:
>
> > $ sed s/a/b/ /nofile
> > sed: 0: /nofile: /nofile
> >
> > That message doesn't tell me a lot, let's better write
> > strerror(errno) if fopen returns NULL:
> >
> > $ ./sed s/a/b/ /nofile
> > sed: 0: /nofile: No such file or directo
Tobias Stoeckmann writes:
> $ sed s/a/b/ /nofile
> sed: 0: /nofile: /nofile
>
> That message doesn't tell me a lot, let's better write
> strerror(errno) if fopen returns NULL:
>
> $ ./sed s/a/b/ /nofile
> sed: 0: /nofile: No such file or directory
That's much nicer, ok jca@
(misc.c:err() alread
$ sed s/a/b/ /nofile
sed: 0: /nofile: /nofile
That message doesn't tell me a lot, let's better write
strerror(errno) if fopen returns NULL:
$ ./sed s/a/b/ /nofile
sed: 0: /nofile: No such file or directory
Index: main.c
===
RCS file