str.h
Go to the documentation of this file.00001 
00032 
#ifndef STR_H_ALEIX0212011305
00033 
#define STR_H_ALEIX0212011305
00034 
00035 
#include <expat.h>
00036 
00037 
#include <string.h>
00038 
00039 
#define scew_memcpy(dst,src,n)  memcpy(dst,src,sizeof(XML_Char)*(n))
00040 
#define scew_memmove(dst,src,n) memmove(dst,src,sizeof(XML_Char)*(n))
00041 
00042 
#ifdef XML_UNICODE_WCHAR_T
00043 
00044 
#include <wchar.h>
00045 
#include <wctype.h>
00046 
00047 
#define _XT(str)                L##str
00048 
00049 
#define scew_fprintf            fwprintf
00050 
#define scew_sprintf            swprintf
00051 
00052 
#define scew_strcmp(s1,s2)      wcscmp(s1,s2)
00053 
#define scew_strspn(s1,s2)      wcsspn(s1,s2)
00054 
#define scew_strcpy(s1,s2)      wcscpy(s1,s2)
00055 
#define scew_strcat(s1,s2)      wcscat(s1,s2)
00056 
#define scew_strncpy(s1,s2,n)   wcsncpy(s1,s2,n)
00057 
#define scew_strncat(s1,s2,n)   wcsncat(s1,s2,n)
00058 
#define scew_strlen(s)          wcslen(s)
00059 
00060 
#define scew_isalnum(c)         iswalnum((c))
00061 
#define scew_isalpha(c)         iswalpha((c))
00062 
#define scew_iscntrl(c)         iswcntrl((c))
00063 
#define scew_isdigit(c)         iswdigit((c))
00064 
#define scew_isxdigit(c)        iswxdigit((c))
00065 
#define scew_isgraph(c)         iswgraph((c))
00066 
#define scew_islower(c)         iswlower((c))
00067 
#define scew_isupper(c)         iswupper((c))
00068 
#define scew_isprint(c)         iswprint((c))
00069 
#define scew_ispunct(c)         iswpunct((c))
00070 
#define scew_isspace(c)         iswspace((c))
00071 
00072 
#else 
00073 
00074 
#include <ctype.h>
00075 
00076 
#define _XT(str)                str
00077 
00078 
#define scew_fprintf            fprintf
00079 
#define scew_sprintf            sprintf
00080 
00081 
#define scew_strcmp(s1,s2)      strcmp(s1,s2)
00082 
#define scew_strspn(s1,s2)      strspn(s1,s2)
00083 
#define scew_strcpy(s1,s2)      strcpy(s1,s2)
00084 
#define scew_strcat(s1,s2)      strcat(s1,s2)
00085 
#define scew_strncpy(s1,s2,n)   strncpy(s1,s2,n)
00086 
#define scew_strncat(s1,s2,n)   strncat(s1,s2,n)
00087 
#define scew_strlen(s)          strlen(s)
00088 
00089 
#define scew_isalnum(c)         isalnum((unsigned char)(c))
00090 
#define scew_isalpha(c)         isalpha((unsigned char)(c))
00091 
#define scew_iscntrl(c)         iscntrl((unsigned char)(c))
00092 
#define scew_isdigit(c)         isdigit((unsigned char)(c))
00093 
#define scew_isxdigit(c)        isxdigit((unsigned char)(c))
00094 
#define scew_isgraph(c)         isgraph((unsigned char)(c))
00095 
#define scew_islower(c)         islower((unsigned char)(c))
00096 
#define scew_isupper(c)         isupper((unsigned char)(c))
00097 
#define scew_isprint(c)         isprint((unsigned char)(c))
00098 
#define scew_ispunct(c)         ispunct((unsigned char)(c))
00099 
#define scew_isspace(c)         isspace((unsigned char)(c))
00100 
00101 
#endif 
00102 
00103 
#ifdef __cplusplus
00104 
extern "C" {
00105 
#endif 
00106 
00110 
extern XML_Char*
00111 
scew_strdup(XML_Char 
const* src);
00112 
00116 
extern void
00117 
scew_strtrim(XML_Char* src);
00118 
00119 
#ifdef __cplusplus
00120 
}
00121 
#endif 
00122 
00123 
#endif 
Generated on Tue May 25 23:38:29 2004 for Simple C Expat Wrapper by
 1.3.7