Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!wuarchive!texbell!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: perror - (was Re: redirecting output) Message-ID: <+5H4EF6@ficc.ferranti.com> Date: 6 Jul 90 12:41:25 GMT References: <22931@dartvax.Dartmouth.EDU> <1990Jun29.172429.2818@zoo.toronto.edu> <1792@necisa.ho.necisa.oz> <5XE49LB@xds13.ferranti.com> <1795@necisa.ho.necisa.oz> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 14 Looks like I entered warp drive with my brain disengaged... In article <1795@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: > In article <5XE49LB@xds13.ferranti.com> peter@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.