Windows NT 4.0 source code leak
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.

65 lines
1.8 KiB

4 years ago
  1. /* Setup Instatllation Program
  2. * (C) Copyright 1987 by Microsoft
  3. * Written By Steven Zeck
  4. *
  5. * All the constants and preprocessor variables are defined here.
  6. *************************************************************************/
  7. #define TRUE ((Bool) ~0)
  8. #define FALSE 0
  9. #define NIL 0
  10. #define TOKEN_MAX 128
  11. #define LINE_MAX 512
  12. #define COPYBUF_MAX (512*40)
  13. #define FOREVER while(1)
  14. #ifdef RUNONLY
  15. #define synError(a)
  16. #endif
  17. /* attributes for characters */
  18. #define CH_NI 0x0 /* Nill attrtibue */
  19. #define CH_OP 0x1 /* operator */
  20. #define CH_AL 0x2 /* alpha character */
  21. #define CH_QU 0x4 /* quote, for strings */
  22. #define CH_SP 0x8 /* white space */
  23. #define CH_DI 0x10 /* digit */
  24. #define CH_EL 0x20 /* end of line */
  25. #define isNil(c) (!c)
  26. #define isAlpha(c) (charType[(UCHAR) c] & CH_AL)
  27. #define isIdent(c) (charType[(UCHAR) c] & (CH_AL | CH_DI))
  28. #define isQuote(c) (charType[(UCHAR) c] & CH_QO)
  29. #define isSpace(c) (charType[(UCHAR) c] & CH_SP)
  30. #define isDigit(c) (charType[(UCHAR) c] & CH_DI)
  31. #define isOperator(c) (charType[(UCHAR) c] & CH_OP)
  32. #define isLineEnd(c) (charType[(UCHAR) c] & CH_EL)
  33. #define isFile(c) (charType[(UCHAR) c] & (CH_AL | CH_DI | CH_OP))
  34. enum { /* token types */
  35. eolTT = 1, /* eof of file */
  36. opTT, /* operator token, single character */
  37. strTT, /* string token */
  38. labelTT, /* alpha label token */
  39. numTT /* number token */
  40. }TT;
  41. /* Address of certain key words in theKY, see setup */
  42. #define PIFKY (&theKY[0])
  43. #define PELSEKY (&theKY[1])
  44. #define PENDIFKY (&theKY[2])
  45. #define ATTR_DIR 0x10 /* Subdirectory */
  46. #define ATTR_NOTF 0x8000 /* not found error return */
  47. #define DISKCHANGED 2 /* changeDisk - volID changed */
  48. #define cbMagic 8
  49. #define magicVal "SZ \x88\xf0\x27\x33\xd1"