mi32/string.h

Go to the documentation of this file.
00001 /**
00002  * \file string.h <mi32/string.h>
00003  * \brief C string function prototypes
00004  *
00005  * \if NODOC
00006  * $Id: string.h_v 1.1 2005/07/15 13:47:55 mju Exp $
00007  *
00008  * $Log: string.h_v $
00009  * Revision 1.1  2005/07/15 13:47:55  mju
00010  * Initial revision
00011  *
00012  * \endif
00013 **/
00014 
00015 #ifndef  INC_MI32_STRING_H
00016 #define  INC_MI32_STRING_H
00017 
00018 #ifndef  INC_STRING_H
00019 #include <string.h>
00020 #define  INC_STRING_H
00021 #endif
00022 
00023 #ifndef GENERATING_DOXYGEN_OUTPUT
00024 
00025 #if defined(__cplusplus)
00026 extern "C" {
00027 #endif
00028 
00029 #if defined(WIN32)
00030 #if __STDC__ && _MSC_VER >= 1200
00031 // Microsoft renamed these because they're not "__STDC__"
00032 #define stricmp   _stricmp
00033 #define strlwr    _strlwr
00034 #define strupr    _strupr
00035 #define strnicmp  _strnicmp
00036 #define strdup    _strdup
00037 #endif
00038 
00039 #else    // !WIN32
00040 
00041 #if defined(SUN)
00042 char *strdup (const char*);
00043 #endif
00044 
00045 char *strupr(char *);
00046 char *strlwr(char *);
00047 
00048 #if defined(UNIX)
00049 
00050 #include <strings.h>
00051 
00052 #if defined(__cplusplus)
00053 inline int stricmp (
00054    const char*const s1, 
00055    const char*const s2
00056    ) { return (strcasecmp(s1, s2)); }
00057 
00058 inline int strnicmp (
00059    const char*const s1, 
00060    const char*const s2,
00061    int n
00062    ) { return (strncasecmp(s1, s2, n)); }
00063 #else
00064 #define stricmp strcasecmp
00065 #define strnicmp strncasecmp
00066 #endif
00067    
00068 #else 
00069 int stricmp (const char*const, const char*const);
00070 int strnicmp (const char*const, const char*const, int);
00071 #endif
00072 
00073 #endif   // !WIN32
00074 
00075 #if defined(__cplusplus)
00076 }  // Extern "C"
00077 #endif
00078 
00079 #endif   // GENERATING_DOXYGEN_OUTPUT
00080 
00081 #endif   // INC_MI32_STRING_H

Generated on Thu Apr 26 04:04:52 2007 for TNTsdk by  doxygen 1.5.2