home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!ucbvax!dog.ee.lbl.gov!network.ucsd.edu!qualcom.qualcomm.com!NewsWatcher!user
- From: jpurlia@qualcomm.com (John Purlia)
- Newsgroups: comp.sys.mac.programmer
- Subject: PLstrcmp?? Do the right thing!
- Message-ID: <jpurlia-280792143857@129.46.5.45>
- Date: 28 Jul 92 21:51:57 GMT
- Sender: news@qualcomm.com
- Followup-To: comp.sys.mac.programmer
- Organization: Qualcomm, Inc.
- Lines: 18
- Nntp-Posting-Host: 129.46.5.45
-
- Has anyone else noticed the effective weirdness of PLstrcmp in MPW? I'm
- using qsort to sort a list of pascal style strings in ascending alphabetic
- order. My comparison function basically uses a PLstrcmp to test equality
- of the list elements. Here's the weird part: PLstrcmp thinks that "Public
- Folder" comes before "Public". If I take the same data, convert each
- element to C style using p2cstr, and use strcmp in my comparison function,
- "Public" comes before "Public Folder" just as you would expect.
-
- Is there a known bug in PLstrcmp (MPW 3.2) or for that matter any of the
- other Pascal style string routines? Is there a fix or am I going to have
- to do the convert to C conversion all over the place? (No, the toolbox
- routine I'm using to get the data does not have a C string equivalent.)
-
- ...........................................................................
- John Purlia : My brain; not my company's brain. My brain says...
- jpurlia@qualcomm.com : "Just about any movie could be made better
- AppleLink: AM0470 : if one of the characters were a vampire."
- ...........................................................................
-