On Sat, Nov 29, 2014 at 05:14:08PM +0100, Fritjof Bornebusch wrote:
> On Sat, Nov 29, 2014 at 04:53:28PM +0100, Otto Moerbeek wrote:
> > On Sat, Nov 29, 2014 at 02:22:25PM +0100, Fritjof Bornebusch wrote:
> >
> > > Hi tech,
> > >
> > > it's NULL not NUL.
> >
> > You're touching a big controversy here. Many developers say that NUL is
> > the right term when rferring to chars and not pointers,
> >
>
> And what is the correct term when referring to '0'?
> Or means '\0' and '0' the same.
The first is ASCII NUL, the seconds ASCII zero.
-Otto
>
>
> > -Otto
> >
> > >
> > > fritjof
> > >
> > >
> > > Index: diff3.c
> > > ===================================================================
> > > RCS file: /cvs/src/usr.bin/rcs/diff3.c,v
> > > retrieving revision 1.33
> > > diff -u -p -r1.33 diff3.c
> > > --- diff3.c 4 Mar 2012 04:05:15 -0000 1.33
> > > +++ diff3.c 29 Nov 2014 13:15:51 -0000
> > > @@ -450,7 +450,7 @@ ed_patch_lines(struct rcs_lines *dlines,
> > > if (lp->l_len < 2)
> > > continue;
> > >
> > > - /* NUL-terminate line buffer for strtol() safety. */
> > > + /* NULL-terminate line buffer for strtol() safety. */
> > > tmp = lp->l_line[lp->l_len - 1];
> > > lp->l_line[lp->l_len - 1] = '\0';
> > >
> > > Index: rcs.c
> > > ===================================================================
> > > RCS file: /cvs/src/usr.bin/rcs/rcs.c,v
> > > retrieving revision 1.81
> > > diff -u -p -r1.81 rcs.c
> > > --- rcs.c 10 Oct 2014 08:15:25 -0000 1.81
> > > +++ rcs.c 29 Nov 2014 13:16:40 -0000
> > > @@ -799,7 +799,7 @@ rcs_patch_lines(struct rcs_lines *dlines
> > > if (lp->l_len < 2)
> > > errx(1, "line too short, RCS patch seems broken");
> > > op = *(lp->l_line);
> > > - /* NUL-terminate line buffer for strtol() safety. */
> > > + /* NULL-terminate line buffer for strtol() safety. */
> > > tmp = lp->l_line[lp->l_len - 1];
> > > lp->l_line[lp->l_len - 1] = '\0';
> > > lineno = (int)strtol((lp->l_line + 1), &ep, 10);
> > > @@ -1047,7 +1047,7 @@ rcs_delta_stats(struct rcs_delta *rdp, i
> > > errx(1,
> > > "line too short, RCS patch seems broken");
> > > op = *(lp->l_line);
> > > - /* NUL-terminate line buffer for strtol() safety. */
> > > + /* NULL-terminate line buffer for strtol() safety. */
> > > tmp = lp->l_line[lp->l_len - 1];
> > > lp->l_line[lp->l_len - 1] = '\0';
> > > (void)strtol((lp->l_line + 1), &ep, 10);
> >
> >