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.

67 lines
2.4 KiB

  1. /*
  2. * the format strings may be:
  3. * .* must match exactly
  4. * .*\*.* head and tail must match, with wild card in middle
  5. * .*# head must match. tail can either be adjacent or next word
  6. * at the moment '-' is not treated specialy
  7. * note that 'middle' may be at either end since '.*' matches null.
  8. */
  9. #define TAKESARG 0x20 /* tag to indicate argument or not */
  10. #define FLAG 1 /* set the flag */
  11. #define STRING 2 | TAKESARG /* set the string, either from here, or next word */
  12. #define SUBSTR 3 | TAKESARG /* set single letter flags from substring */
  13. #define NUMBER 4 | TAKESARG /* set read in the number */
  14. #define UNFLAG 5 /* turn the flag off */
  15. #define PSHSTR 6 | TAKESARG /* like string, but puts it on a LIST structure */
  16. #define NOVSTR 7 | TAKESARG /* like string, but complains about overwriting */
  17. #define NUM_ARGS 50 /* Limit of flags passed from driver to pass */
  18. #define MSC_ENVFLAGS "MSC_CMD_FLAGS"
  19. /* Environment variable flags passed in, used for getenv() */
  20. #define PUT_MSC_ENVFLAGS "MSC_CMD_FLAGS="
  21. /* Environment variable flags passed in, used for putenv() */
  22. /* return values from getflags */
  23. #define R_SWITCH 1
  24. #define R_CFILE 2
  25. #define R_ASMFILE 3
  26. #define R_OBJFILE 4
  27. #define R_ERROR 5
  28. #define R_FILE 6
  29. #define R_EXIT 7
  30. #define R_FFILE 8
  31. #define R_PFILE 9
  32. #define R_AFILE 10
  33. #define R_OFILE 11
  34. /* r. nevin, 1/11/85 */
  35. #define R_HELP 12
  36. /* b. nguyen, 4/7/86 */
  37. #define R_HELPC 13
  38. #define R_HELPF 14
  39. struct cmdtab
  40. {
  41. WCHAR *format; /* format matching string */
  42. char *flag; /* pointer to what to fill in */
  43. /* this is really a
  44. * union
  45. * {
  46. * WCHAR **str;
  47. * int *flag;
  48. * struct subtab *sub;
  49. * struct LIST *list;
  50. * } cm;
  51. * but you cant initialize unions so we have to fake it.
  52. */
  53. char retval; /* crack_cmd will return whatever is here */
  54. UCHAR type; /* control mask */
  55. };
  56. struct subtab
  57. {
  58. int letter;
  59. int type;
  60. int *flag;
  61. };
  62.