Leaked source code of windows server 2003
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.

81 lines
2.5 KiB

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