home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17808 < prev    next >
Encoding:
Text File  |  1992-12-25  |  1.6 KB  |  47 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!llyene!proteus!john
  3. From: john@proteus.jpl.nasa.gov (John Veregge)
  4. Subject: Is utility.library/Stricmp() broken?
  5. Message-ID: <1992Dec25.225239.27584@llyene.jpl.nasa.gov>
  6. Sender: news@llyene.jpl.nasa.gov
  7. Nntp-Posting-Host: proteus.jpl.nasa.gov
  8. Reply-To: john@pluto.Jpl.Nasa.Gov
  9. Organization: Jet Propulsion Laboratory, Pasadena CA
  10. Date: Fri, 25 Dec 1992 22:52:39 GMT
  11. Lines: 34
  12.  
  13. Is the AmigaDOS 2.04 utility.library/Stricmp() broken?
  14.  
  15. I used the following code fragment as the comparison
  16. routine passed to qsort() (STDC lib). I interchanged
  17. strcmp(), Stricmp(), and Strnicmp(). I opened the
  18. utility.library, OpenLibrary( "utility.library", 37 ),
  19. prior to calling qsort(). The below three columns
  20. show the output of their respective sorts.
  21.  
  22. I am using Aztec C 5.2a on a 2000HD with DOS 2.04.
  23.  
  24. Does anyone know what is going on?
  25.  
  26.   qsort_comparison( void * s1, void * s2 )
  27.   {
  28.     return (int) Stricmp( *(char**)s1, *(char**)s2 );
  29.   }
  30.  
  31.   strcmp(s1,s2)   Stricmp(s1,s2)  Strnicmp(s1,s2,100)
  32.   ==============  ==============  ==============
  33.   README          sh.dbg          amigaregex.c
  34.   amigaregex.c    sh2             sh
  35.   amigaregex.doc  sh1             test.out
  36.   amigaregex.o    test.out        makefile
  37.   makefile        sh              amigaregex.o
  38.   sh              amigaregex.doc  amigaregex.doc
  39.   sh.dbg          README          README
  40.   sh1             makefile        sh1
  41.   sh2             amigaregex.o    sh2
  42.   test.out        amigaregex.c    sh.dbg
  43.  
  44. ____________________________________________
  45.  
  46. John R Veregge  -  john@pluto.jpl.nasa.gov
  47.