perror - (was Re: redirecting output)
Peter da Silva
peter at ficc.ferranti.com
Fri Jul 6 22:41:25 AEST 1990
Looks like I entered warp drive with my brain disengaged...
In article <1795 at necisa.ho.necisa.oz> boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
> In article <5XE49LB at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
> >> if ((my_name = strrchr(argv[0], '/')) == NULLSTR || *++my_name == '\0')
> >> my_name = argv[0];
> >First, this is needlessly obscure. Second, it modifies argv[0], which is not
> >ps-friendly on UNIX.
> 1: `my_name' is modified. It _points_ into argv[0]! argv[0] is _not_ modified!
You're right. I misinterpreted the expression. Which supports my first point:
to wit that it's needlessly obscure.
--
Peter da Silva. `-_-'
+1 713 274 5180.
<peter at ficc.ferranti.com>
More information about the Comp.lang.c
mailing list