home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13115 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.6 KB

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