Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.4 KiB

  1. // Copyright (c) 1998-1999 Microsoft Corporation
  2. /*******************************************************************************
  3. *
  4. * ansiuni.h
  5. *
  6. * ANSI / UNICODE function defines
  7. *
  8. *
  9. *******************************************************************************/
  10. #ifdef UNICODE
  11. #ifndef TCHAR
  12. #define TCHAR WCHAR
  13. #endif // TCHAR
  14. #define lstrscanf swscanf
  15. #define lstrncpy wcsncpy
  16. #define lstrtoul wcstoul
  17. #define lstrtol wcstol
  18. #define lstrnicmp _wcsnicmp
  19. #define lstrupr _wcsupr
  20. #define lstrlwr _wcslwr
  21. #define islstrdigit iswdigit
  22. #define lstrtok wcstok
  23. #define lstrprintf swprintf
  24. #define lstrnprintf _snwprintf
  25. #define lstrchr wcschr
  26. #define lstrpbrk wcspbrk
  27. #define lstrrchr wcsrchr
  28. #define lstr_getcwd _wgetcwd
  29. #define lstr_access _waccess
  30. #define lstr_mkdir _wmkdir
  31. #define lstrstr wcsstr
  32. #define lstrcspn wcscspn
  33. #else
  34. #ifndef TCHAR
  35. #define TCHAR char
  36. #endif // TCHAR
  37. #ifdef WIN16
  38. #define lstrscanf sscanf // need to cast string args to NEAR pointers
  39. #define lstrncpy _fstrncpy
  40. #define lstrtoul strtoul // need to cast string args to NEAR pointers
  41. #define lstrtol strtol // need to cast string args to NEAR pointers
  42. #define lstrnicmp _fstrnicmp
  43. #define lstrupr _fstrupr
  44. #define lstrlwr _fstrlwr
  45. #define islstrdigit isdigit
  46. #define lstrtok _fstrtok
  47. #define lstrprintf sprintf // need to cast string args to NEAR pointers
  48. #define lstrnprintf _snprintf // need to cast string args to NEAR pointers
  49. #define lstrchr _fstrchr
  50. #define lstrpbrk _fstrpbrk
  51. #define lstrrchr _fstrrchr
  52. #define lstr_getcwd _getcwd // need to cast string args to NEAR pointers
  53. #define lstr_access _access // need to cast string args to NEAR pointers
  54. #define lstr_mkdir _mkdir // need to cast string args to NEAR pointers
  55. #define lstrstr strstr // need to cast string args to NEAR pointers
  56. #define lstrcspn strcspn // need to cast string args to NEAR pointers
  57. #else
  58. #define lstrscanf sscanf
  59. #define lstrncpy strncpy
  60. #define lstrtoul strtoul
  61. #define lstrtol strtol
  62. #define lstrnicmp _strnicmp
  63. #define lstrupr _strupr
  64. #define lstrlwr _strlwr
  65. #define islstrdigit isdigit
  66. #define lstrtok strtok
  67. #define lstrprintf sprintf
  68. #define lstrnprintf _snprintf
  69. #define lstrchr strchr
  70. #define lstrpbrk strpbrk
  71. #define lstrrchr strrchr
  72. #define lstr_getcwd _getcwd
  73. #define lstr_access _access
  74. #define lstr_mkdir _mkdir
  75. #define lstrstr strstr
  76. #define lstrcspn strcspn
  77. #endif // WIN16
  78. #endif // UNICODE
  79. #define lengthof(x) (sizeof(x) / sizeof(TCHAR))