Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!usc!sdd.hp.com!ucsd!ucbvax!TRANSARC.COM!Craig_Everhart From: Craig_Everhart@TRANSARC.COM Newsgroups: comp.soft-sys.andrew Subject: Re: ULstrncmp Message-ID: Date: 30 Oct 90 17:13:53 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 18 At least one use of strnicmp in cui.c cared about whether it returned >0 or <0, even though most uses (as expected) cared only whether it returned 0 or not. In my copy of the code, ULstrcmp(s1, s2) ultimately returns (s1 - s2), while both ULstrncmp(s1, s2, len) and strnicmp(s1, s2, len) ultimately return (s2 - s1), even though the comment in ULstrncmp says that it returns (s1 - s2). Thus, I believe that in my copy of things, one could use ULstrncmp and strnicmp interchangeably, though if one is changed to return (s1 - s2) instead, the replacement couldn't happen unless the relevant call site were changed, too (in this case, the CheckHead routine in andrew/ams/msclients/cui/cui.c). Hope this helps. Craig