home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!llyene!proteus!john
- From: john@proteus.jpl.nasa.gov (John Veregge)
- Subject: Is utility.library/Stricmp() broken?
- Message-ID: <1992Dec25.225239.27584@llyene.jpl.nasa.gov>
- Sender: news@llyene.jpl.nasa.gov
- Nntp-Posting-Host: proteus.jpl.nasa.gov
- Reply-To: john@pluto.Jpl.Nasa.Gov
- Organization: Jet Propulsion Laboratory, Pasadena CA
- Date: Fri, 25 Dec 1992 22:52:39 GMT
- Lines: 34
-
- Is the AmigaDOS 2.04 utility.library/Stricmp() broken?
-
- I used the following code fragment as the comparison
- routine passed to qsort() (STDC lib). I interchanged
- strcmp(), Stricmp(), and Strnicmp(). I opened the
- utility.library, OpenLibrary( "utility.library", 37 ),
- prior to calling qsort(). The below three columns
- show the output of their respective sorts.
-
- I am using Aztec C 5.2a on a 2000HD with DOS 2.04.
-
- Does anyone know what is going on?
-
- qsort_comparison( void * s1, void * s2 )
- {
- return (int) Stricmp( *(char**)s1, *(char**)s2 );
- }
-
- strcmp(s1,s2) Stricmp(s1,s2) Strnicmp(s1,s2,100)
- ============== ============== ==============
- README sh.dbg amigaregex.c
- amigaregex.c sh2 sh
- amigaregex.doc sh1 test.out
- amigaregex.o test.out makefile
- makefile sh amigaregex.o
- sh amigaregex.doc amigaregex.doc
- sh.dbg README README
- sh1 makefile sh1
- sh2 amigaregex.o sh2
- test.out amigaregex.c sh.dbg
-
- ____________________________________________
-
- John R Veregge - john@pluto.jpl.nasa.gov
-