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.

166 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 2000-2001 Microsoft Corporation
  3. IllegalStr.h: Make strXXX routines legal or Illegal.
  4. If _STRXXX_ROUTINES_FORCE_LEGAL_ is defined, any changes made
  5. by this file are undone, otherwise the strXXX routines are defined
  6. to "Do Not Use StrXXX routines" which causes an extremely blatant syntax error.
  7. LegalStr and MakeIllegalStr are used to pop/push the legal-ness
  8. of the strXXX routines.
  9. #include "LegalStr.h" to re-enable the strXXX routines.
  10. #include "MakeIllegalStr.h" to re-disable the strXXX routines
  11. History:
  12. 03/13/2001 robkenny Created
  13. 03/21/2001 robkenny Updated to mesh cleanly with LegalStr.h and MakeIllegalStr.h
  14. --*/
  15. #ifndef _STRXXX_ROUTINES_FORCE_LEGAL_
  16. #define _STRXXX_ROUTINES_ARE_ILLEGAL_
  17. // Win32 API
  18. #define lstrlenA // only to force explicit use of _tcslenBytes of _tcslenChars
  19. // C runtime
  20. #define strcpy Do Not Use StrXXX routines
  21. #define strcat Do Not Use StrXXX routines
  22. #define strcmp Do Not Use StrXXX routines
  23. #define strlen Do Not Use StrXXX routines
  24. #define strchr Do Not Use StrXXX routines
  25. #define _strcmpi Do Not Use StrXXX routines
  26. #define _stricmp Do Not Use StrXXX routines
  27. #define strcoll Do Not Use StrXXX routines
  28. #define _stricoll Do Not Use StrXXX routines
  29. #define _strncoll Do Not Use StrXXX routines
  30. #define _strnicoll Do Not Use StrXXX routines
  31. #define strcspn Do Not Use StrXXX routines
  32. #define _strdup Do Not Use StrXXX routines
  33. #define _strerror Do Not Use StrXXX routines
  34. #define strerror Do Not Use StrXXX routines
  35. #define _strlwr Do Not Use StrXXX routines
  36. #define strncat Do Not Use StrXXX routines
  37. #define strncmp Do Not Use StrXXX routines
  38. #define _strnicmp Do Not Use StrXXX routines
  39. #define strncpy Do Not Use StrXXX routines
  40. #define _strnset Do Not Use StrXXX routines
  41. #define strpbrk Do Not Use StrXXX routines
  42. #define strrchr Do Not Use StrXXX routines
  43. #define _strrev Do Not Use StrXXX routines
  44. #define strspn Do Not Use StrXXX routines
  45. #define strstr Do Not Use StrXXX routines
  46. #define stristr Do Not Use StrXXX routines
  47. #define strtok Do Not Use StrXXX routines
  48. #define _strupr Do Not Use StrXXX routines
  49. #else
  50. // Allow the use of the strxxx routines
  51. #ifdef lstrlenA
  52. #undef lstrlenA
  53. #endif
  54. #ifdef strcpy
  55. #undef strcpy
  56. #endif
  57. #ifdef strcat
  58. #undef strcat
  59. #endif
  60. #ifdef strcmp
  61. #undef strcmp
  62. #endif
  63. #ifdef strlen
  64. #undef strlen
  65. #endif
  66. #ifdef strchr
  67. #undef strchr
  68. #endif
  69. #ifdef _strcmpi
  70. #undef _strcmpi
  71. #endif
  72. #ifdef _stricmp
  73. #undef _stricmp
  74. #endif
  75. #ifdef strcoll
  76. #undef strcoll
  77. #endif
  78. #ifdef _stricoll
  79. #undef _stricoll
  80. #endif
  81. #ifdef _strncoll
  82. #undef _strncoll
  83. #endif
  84. #ifdef _strnicoll
  85. #undef _strnicoll
  86. #endif
  87. #ifdef strcspn
  88. #undef strcspn
  89. #endif
  90. #ifdef _strdup
  91. #undef _strdup
  92. #endif
  93. #ifdef _strerror
  94. #undef _strerror
  95. #endif
  96. #ifdef strerror
  97. #undef strerror
  98. #endif
  99. #ifdef _strlwr
  100. #undef _strlwr
  101. #endif
  102. #ifdef strncat
  103. #undef strncat
  104. #endif
  105. #ifdef strncmp
  106. #undef strncmp
  107. #endif
  108. #ifdef _strnicmp
  109. #undef _strnicmp
  110. #endif
  111. #ifdef strncpy
  112. #undef strncpy
  113. #endif
  114. #ifdef _strnset
  115. #undef _strnset
  116. #endif
  117. #ifdef strpbrk
  118. #undef strpbrk
  119. #endif
  120. #ifdef strrchr
  121. #undef strrchr
  122. #endif
  123. #ifdef _strrev
  124. #undef _strrev
  125. #endif
  126. #ifdef strspn
  127. #undef strspn
  128. #endif
  129. #ifdef strstr
  130. #undef strstr
  131. #endif
  132. #ifdef stristr
  133. #undef stristr
  134. #endif
  135. #ifdef strtok
  136. #undef strtok
  137. #endif
  138. #ifdef _strupr
  139. #undef _strupr
  140. #endif
  141. #endif