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.

109 lines
2.9 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: hsglobals.c
  3. *
  4. * Copyright (c) 1985-96, Microsoft Corporation
  5. *
  6. * 09/06/96 GerardoB Created
  7. \***************************************************************************/
  8. #include "hsplit.h"
  9. /***************************************************************************\
  10. * Globals
  11. \***************************************************************************/
  12. /*
  13. * Files
  14. */
  15. char * gpszInputFile = NULL;
  16. HANDLE ghfileInput;
  17. char * gpszPublicFile = NULL;
  18. HANDLE ghfilePublic;
  19. char * gpszInternalFile = NULL;
  20. HANDLE ghfileInternal;
  21. PHSEXTRACT gpExtractFile = NULL;
  22. /*
  23. * Map file
  24. */
  25. HANDLE ghmap;
  26. char * gpmapStart;
  27. char * gpmapEnd;
  28. /*
  29. * Switches et al
  30. */
  31. DWORD gdwOptions = 0;
  32. DWORD gdwVersion = LATEST_WIN32_WINNT_VERSION;
  33. char gszVerifyVersionStr [11];
  34. DWORD gdwFilterMask = HST_DEFAULT;
  35. char * gpszTagMarker = ";";
  36. DWORD gdwTagMarkerSize = 1;
  37. char gszMarkerCharAndEOL [] = ";" "\r";
  38. DWORD gdwLineNumber = 0;
  39. /*
  40. * Compatibility tags. Specify size so sizeof operator can be used to
  41. * determine strlen at compile time
  42. */
  43. char gsz35 [3] = "35";
  44. char gszCairo [6] = "cairo";
  45. char gszChicago [8] = "chicago";
  46. char gszNashville [10] = "nashville";
  47. char gszNT [3] = "NT";
  48. char gszSur [4] = "sur";
  49. char gszSurplus [8] = "surplus";
  50. char gszWin40 [6] = "win40";
  51. char gszWin40a [7] = "win40a";
  52. /*
  53. * Predefined tags table (ghst).
  54. * begin-end are special tags that use HST_ bits but are not included in
  55. * this table (because they must be the first tag afer the marker)
  56. * All other tags are user defined through the command line (-t?); up to
  57. * 32 - HST_MASKBITCOUNT user defined tags are allowed.
  58. *
  59. * Size is specified so sizeof operator work fine
  60. */
  61. HSTAG ghstPredefined [16] = {
  62. /*
  63. * Headers - output file
  64. */
  65. {HSLABEL(public), HST_PUBLIC},
  66. {HSLABEL(internal), HST_INTERNAL},
  67. {HSLABEL(both), HST_BOTH},
  68. {HSLABEL($), HST_SKIP},
  69. {HSLABEL(only), HST_EXTRACTONLY},
  70. /*
  71. * Old tags used with all old switches
  72. */
  73. {HSLABEL(winver), HST_WINVER | HST_MAPOLD},
  74. {HSCSZSIZE(gszCairo), gszCairo, HST_SKIP | HST_MAPOLD},
  75. {HSCSZSIZE(gszChicago), gszChicago, HST_SKIP | HST_MAPOLD},
  76. {HSCSZSIZE(gszNashville), gszNashville, HST_SKIP | HST_MAPOLD},
  77. {HSCSZSIZE(gszNT), gszNT, HST_SKIP | HST_MAPOLD},
  78. {HSCSZSIZE(gszSur), gszSur, HST_SKIP | HST_MAPOLD},
  79. {HSCSZSIZE(gszSurplus), gszSurplus, HST_SKIP | HST_MAPOLD},
  80. {HSCSZSIZE(gszWin40), gszWin40, HST_SKIP | HST_MAPOLD},
  81. {HSCSZSIZE(gszWin40a), gszWin40a, HST_SKIP | HST_MAPOLD},
  82. /*
  83. * if tags.
  84. */
  85. {HSLABEL(if), HST_IF},
  86. {0, NULL, 0}
  87. };
  88. PHSTAG gphst = ghstPredefined;
  89. DWORD gdwLastTagMask = HST_LASTMASK;
  90. /*
  91. * Block stack
  92. */
  93. HSBLOCK ghsbStack [HSBSTACKSIZE];
  94. PHSBLOCK gphsbStackTop = ghsbStack;