nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] More puzzlement - expath() in sbr/path.c


From: Arun Bhalla
Subject: Re: [Nmh-workers] More puzzlement - expath() in sbr/path.c
Date: Fri, 28 Jan 2005 14:48:56 -0600

Jon Steinhart writes:
> There is code in expath in sbr/path.c that just can't be correct.  The second
> main if statement in this function includes what is, after some substitutions
> ,
> 
>       if ( ... && strcmp(name, ".") && strcmp(name, "..") && ... )
> 
> This can never be true!
> 
> Can anybody out there explain to me what this function (and the others in
> path.c) are *supposed* to be doing so that I can make them do what they're
> supposed to do?

strcmp(s1, s2) returns a non-zero value when strings s1 and s2 are not
equal.  If name is neither "." nor "..", then both of those functions would
return a non-zero value, and that expression would be true.

(You knew all that, but the code is a little terse and largely undocumented.)

cheers,
Arun




reply via email to

[Prev in Thread] Current Thread [Next in Thread]