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.

67 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. validc.h
  5. Abstract:
  6. Strings of valid/invalid characters for canonicalization
  7. Author:
  8. Richard Firth (rfirth) 15-May-1991
  9. Revision History:
  10. 03-Jan-1992 rfirth
  11. Added ILLEGAL_FAT_CHARS and ILLEGAL_HPFS_CHARS (from fsrtl\name.c)
  12. 27-Sep-1991 JohnRo
  13. Changed TEXT macro usage to allow UNICODE.
  14. --*/
  15. //
  16. // Disallowed control characters (not including \0)
  17. //
  18. #define CTRL_CHARS_0 TEXT( "\001\002\003\004\005\006\007")
  19. #define CTRL_CHARS_1 TEXT("\010\011\012\013\014\015\016\017")
  20. #define CTRL_CHARS_2 TEXT("\020\021\022\023\024\025\026\027")
  21. #define CTRL_CHARS_3 TEXT("\030\031\032\033\034\035\036\037")
  22. #define CTRL_CHARS_STR CTRL_CHARS_0 CTRL_CHARS_1 CTRL_CHARS_2 CTRL_CHARS_3
  23. //
  24. // Character subsets
  25. //
  26. #define NON_COMPONENT_CHARS TEXT("\\/:")
  27. #define ILLEGAL_CHARS_STR TEXT("\"<>|")
  28. #define DOT_AND_SPACE_STR TEXT(". ")
  29. #define PATH_SEPARATORS TEXT("\\/")
  30. //
  31. // Combinations of the above
  32. //
  33. #define ILLEGAL_CHARS CTRL_CHARS_STR ILLEGAL_CHARS_STR
  34. #define ILLEGAL_NAME_CHARS_STR TEXT("\"/\\[]:|<>+=;,?") CTRL_CHARS_STR
  35. //
  36. // Characters which may not appear in a canonicalized FAT filename are:
  37. //
  38. // 0x00 - 0x1f " * + , / : ; < = > ? [ \ ] |
  39. //
  40. #define ILLEGAL_FAT_CHARS CTRL_CHARS_STR TEXT("\"*+,/:;<=>?[\\]|")
  41. //
  42. // Characters which may not appear in a canonicalized HPFS filename are:
  43. //
  44. // 0x00 - 0x1f " * / : < > ? \ |
  45. //
  46. #define ILLEGAL_HPFS_CHARS CTRL_CHARS_STR TEXT("\"*/:<>?\\|")