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.

83 lines
2.6 KiB

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