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.

468 lines
16 KiB

4 years ago
  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1988-1990 **/
  4. /*****************************************************************/
  5. /*** GLB.C - Declarations of global variables.
  6. *
  7. * DAMAGE
  8. * Gregory A. Jones
  9. *
  10. * Modification history:
  11. * G.A. Jones 09/07/88 Adapted from CHKDSK code.
  12. * G.A. Jones 09/08/88 Added object stack declaration.
  13. * G.A. Jones 09/09/88 Added item array, more messages.
  14. * G.A. Jones 09/13/88 Added filesize variable.
  15. * G.A. Jones 09/19/88 Changed number of items in a DIRENT.
  16. * G.A. Jones 09/19/88 Added xxx_off[], xxx_siz[] arrays.
  17. * G.A. Jones 09/20/88 Added date codes to xxx_siz[] arrays.
  18. * G.A. Jones 09/20/88 Message fixes, month array.
  19. * G.A. Jones 09/21/88 Added hfmax variable for HFSEC dump.
  20. * G.A. Jones 10/12/88 Moved ATIM, CTIM from FNODE to DIRENT.
  21. * G.A. Jones 10/19/88 Added dirblk banding support.
  22. * davidbro 4/20/89 Added keystroke save/replay functionality
  23. * S. Hern 4/25/89 Added redirect_input variable
  24. */
  25. #include <stdio.h>
  26. #include <time.h>
  27. #include "defs.h"
  28. #include "types.h"
  29. UCHAR disk_name [80]; /* holds the name of the disk to check */
  30. USHORT disk_handle = 0; /* disk handle for direct access */
  31. USHORT change = 0; /* set non-zero if /D specified */
  32. USHORT redirect_input = 0; /* allow redirected input */
  33. USHORT fUnsafe = 0; /* write without locking */
  34. UCHAR *szKeySave = NULL; // NULL if not saving keystrokes,
  35. // set to filename of save file by the
  36. // /K: option
  37. UCHAR *szKeyReplay = NULL; // NULL if not replaying keystrokes
  38. // from a file, set to filename of
  39. // replay file by /R: option
  40. UCHAR *szLogFile = NULL; // NULL if no log file specified, set
  41. // to filename of the log file by the
  42. // /L: option
  43. FILE *fpSave; // file for saving keystrokes
  44. FILE *fpReplay; // file for replaying keystrokes
  45. FILE *fpLog; // file for logging information
  46. /*
  47. * Various error messages for common exit problems.
  48. */
  49. UCHAR version_str [] = "Pinball DAMAGE version 1.10\n";
  50. UCHAR timestamp_str [] = "Built %s %s\n\n";
  51. UCHAR argument_error_str [] = "Invalid parameter";
  52. UCHAR open_error_str [] = "Cannot open drive";
  53. UCHAR unknown_error_str [] = "Unknown error code %d";
  54. UCHAR insf_mem_error_str [] = "Insufficient memory";
  55. UCHAR read_error_str [] = "Error reading disk";
  56. UCHAR write_error_str [] = "Error writing disk";
  57. UCHAR usage_str [] = "Usage: DAMAGE [d:] [/d]\n";
  58. UCHAR nonext_str [] = "There is no 'next' field in this structure.\n";
  59. UCHAR noprev_str [] = "There is no 'previous' field in this structure.\n";
  60. UCHAR cantsave_str [] = "Cannot open keystroke save file";
  61. UCHAR cantreplay_str [] = "Cannot open keystroke replay file";
  62. UCHAR cantlog_str [] = "Cannot open log file";
  63. UCHAR *error_messages [] = {
  64. "Successful operation",
  65. argument_error_str,
  66. open_error_str,
  67. insf_mem_error_str,
  68. read_error_str,
  69. write_error_str,
  70. cantsave_str,
  71. cantreplay_str,
  72. cantlog_str
  73. };
  74. UCHAR *bitmap = NULL; /* pointer to first copy of bitmap */
  75. UCHAR *bitmap2 = NULL; /* pointer to second copy of bitmap */
  76. ULONG number_of_sectors = 0L; /* number of sectors in partition */
  77. ULONG partition_offset = 0L; /* where the partitions starts */
  78. union blk scratch_blk; /* to read disk structures temporarily */
  79. UCHAR curpath [1024]; /* which directory is being checked */
  80. UCHAR scratch [512]; /* general scratch area -- input etc. */
  81. ULONG filesize; /* size of currently displayed file */
  82. USHORT hfmax; /* number of hotfix entries */
  83. UCHAR *zeros; /* for zeroing blocks */
  84. struct diskpacket dp; /* IOCTL packet for disk I/O */
  85. struct parmpacket prm; /* contains volume's dimensions */
  86. struct mbr ourmbr; /* contains image of master boot rec. */
  87. /*
  88. * The following arrays make it easy to get at signatures and block
  89. * sizes without IF statements. They are ordered according to the
  90. * TYPE_xxxx definitions in DEFS.H. If those definitions are changed,
  91. * make sure that these arrays still match.
  92. */
  93. USHORT sizes [] = {
  94. SECTORS_PER_DIRBLK, SECTORS_PER_FNODE, SECTORS_PER_AB, SECTORS_PER_FNODE
  95. };
  96. ULONG sigs [] = {
  97. DBSIGVAL, FNSIGVAL, ABSIGVAL, FNSIGVAL
  98. };
  99. /*
  100. * This array defines the number of items in each kind of structure.
  101. * For ordinary structures a positive number is recorded. Structures
  102. * which are basically arrays, such as data runs, bitmaps, and bitmap
  103. * indirect blocks, have special values recorded which indicate that
  104. * an offset (in bytes or dwords) should be requested from the user.
  105. * The array is indexed by a TYPE_xxxx value.
  106. */
  107. #ifndef CODEPAGE
  108. int maxitem [] = {
  109. 15, /* items in a super block */
  110. 100, /* bitmap indirect is an array of longwords - 100 on screen at a time */
  111. -2, /* bitmap is an array of bits */
  112. 101, /* bad block list--fwdlink plus 100 bad sector numbers on screen */
  113. 3, /* hotfix list -- treat each array as one item */
  114. 18, /* FNODE - handle FN_AB as one item, FN_ALREC as one item, EAs as one */
  115. 16, /* DIRBLK - 5-item header plus one 11-item DIRENT */
  116. 5, /* ALSEC - 3-item header, ALBLK is one item, array is one item */
  117. -3, /* data is an array of bytes */
  118. -2 /* dirblk bitmap is an array of bits */
  119. };
  120. #else
  121. int maxitem [] = {
  122. 15, /* items in a super block */
  123. 100, /* bitmap indirect is an array of longwords - 100 on screen at a time */
  124. -2, /* bitmap is an array of bits */
  125. 101, /* bad block list--fwdlink plus 100 bad sector numbers on screen */
  126. 3, /* hotfix list -- treat each array as one item */
  127. 21, /* FNODE - handle FN_AB as one item, FN_ALREC as one item, EAs as one */
  128. 18, /* DIRBLK - 5-item header plus one 13-item DIRENT */
  129. 5, /* ALSEC - 3-item header, ALBLK is one item, array is one item */
  130. -3, /* data is an array of bytes */
  131. -2 /* dirblk bitmap is an array of bits */
  132. };
  133. #endif
  134. /*
  135. * The following definitions are for the structure which describes the
  136. * object we're currently working on, as well as a stack of objects we've
  137. * displayed so far.
  138. */
  139. struct object currobj = {TYPE_SUPERB, (ULONG)SEC_SUPERB, 2L, 0L, NULL, 0, 0};
  140. struct object objstack [MAX_OBJECTS];
  141. USHORT stackptr = 0;
  142. /*
  143. * The following arrays define the offsets of various fields in structures,
  144. * for the Change command to use. In each case, the offset is that within
  145. * the current structure, not from the beginning of an enclosing one. Thus,
  146. * the "offset" of AB_FLAG in the ALBLK field of an FNODE is zero, not
  147. * FIELDOFFSET (struct FNODE, FN_AB).
  148. *
  149. * Item sizes are in bytes (as returned by FIELDSIZE, which uses sizeof()),
  150. * but the code value 0 indicates a date to be typed as mm/dd/yy hh:mm:ss.
  151. */
  152. USHORT superb_off [15] = {
  153. FIELDOFFSET (struct SuperB, SB_SIG1),
  154. FIELDOFFSET (struct SuperB, SB_SIG2),
  155. FIELDOFFSET (struct SuperB, SB_VER),
  156. FIELDOFFSET (struct SuperB, SB_FVER),
  157. FIELDOFFSET (struct SuperB, SB_ROOT),
  158. FIELDOFFSET (struct SuperB, SB_SEC),
  159. FIELDOFFSET (struct SuperB, SB_BSEC),
  160. FIELDOFFSET (struct SuperB, SB_BII.P),
  161. FIELDOFFSET (struct SuperB, SB_BBL.P),
  162. FIELDOFFSET (struct SuperB, SB_CDDAT),
  163. FIELDOFFSET (struct SuperB, SB_DODAT),
  164. FIELDOFFSET (struct SuperB, SB_DBSIZE),
  165. FIELDOFFSET (struct SuperB, SB_DBLOW),
  166. FIELDOFFSET (struct SuperB, SB_DBHIGH),
  167. FIELDOFFSET (struct SuperB, SB_DBMAP),
  168. };
  169. #ifndef CODEPAGE
  170. USHORT fnode_off [15] = {
  171. FIELDOFFSET (struct FNODE, FN_SIG),
  172. FIELDOFFSET (struct FNODE, FN_SRH),
  173. FIELDOFFSET (struct FNODE, FN_FRH),
  174. FIELDOFFSET (struct FNODE, FN_SIG),
  175. FIELDOFFSET (struct FNODE, FN_HCNT),
  176. FIELDOFFSET (struct FNODE, FN_CONTFN),
  177. FIELDOFFSET (struct FNODE, FN_AclDiskLength),
  178. FIELDOFFSET (struct FNODE, FN_AclSector),
  179. FIELDOFFSET (struct FNODE, FN_AclFnodeLength),
  180. FIELDOFFSET (struct FNODE, FN_AclDataFlag),
  181. FIELDOFFSET (struct FNODE, FN_EaDiskLength),
  182. FIELDOFFSET (struct FNODE, FN_EaSector),
  183. FIELDOFFSET (struct FNODE, FN_EaFnodeLength),
  184. FIELDOFFSET (struct FNODE, FN_EaDataFlag)
  185. };
  186. #else
  187. /* node, flag is missing */
  188. USHORT fnode_off [20] = {
  189. FIELDOFFSET (struct FNODE, FN_SIG),
  190. FIELDOFFSET (struct FNODE, FN_SRH),
  191. FIELDOFFSET (struct FNODE, FN_FRH),
  192. FIELDOFFSET (struct FNODE, FN_SIG),
  193. FIELDOFFSET (struct FNODE, FN_HCNT),
  194. FIELDOFFSET (struct FNODE, FN_CONTFN),
  195. FIELDOFFSET (struct FNODE, FN_ACLBASE),
  196. FIELDOFFSET (struct FNODE, FN_AclDiskLength),
  197. FIELDOFFSET (struct FNODE, FN_AclSector),
  198. FIELDOFFSET (struct FNODE, FN_AclFnodeLength),
  199. FIELDOFFSET (struct FNODE, FN_AclDataFlag),
  200. FIELDOFFSET (struct FNODE, FN_EaDiskLength),
  201. FIELDOFFSET (struct FNODE, FN_EaSector),
  202. FIELDOFFSET (struct FNODE, FN_EaFnodeLength),
  203. FIELDOFFSET (struct FNODE, FN_EaDataFlag),
  204. FIELDOFFSET (struct FNODE, FN_AB),
  205. FIELDOFFSET (struct FNODE, FN_ALREC[0]),
  206. FIELDOFFSET (struct FNODE, FN_VLEN),
  207. FIELDOFFSET (struct FNODE, FN_NEACNT),
  208. FIELDOFFSET (struct FNODE, FN_FREE[0])
  209. };
  210. #endif
  211. USHORT fnab_off [4] = {
  212. FIELDOFFSET (struct ALBLK, AB_FLAG),
  213. FIELDOFFSET (struct ALBLK, AB_FCNT),
  214. FIELDOFFSET (struct ALBLK, AB_OCNT),
  215. FIELDOFFSET (struct ALBLK, AB_FREP)
  216. };
  217. USHORT ab_off [7] = {
  218. FIELDOFFSET (struct ALSEC, AS_SIG),
  219. FIELDOFFSET (struct ALSEC, AS_SEC),
  220. FIELDOFFSET (struct ALSEC, AS_RENT),
  221. FIELDOFFSET (struct ALSEC, AS_ALBLK.AB_FLAG),
  222. FIELDOFFSET (struct ALSEC, AS_ALBLK.AB_FCNT),
  223. FIELDOFFSET (struct ALSEC, AS_ALBLK.AB_OCNT),
  224. FIELDOFFSET (struct ALSEC, AS_ALBLK.AB_FREP)
  225. };
  226. #ifndef CODEPAGE
  227. USHORT dirent_off [10] = {
  228. FIELDOFFSET (struct DIRENT, DIR_ELEN),
  229. FIELDOFFSET (struct DIRENT, DIR_FLAG),
  230. FIELDOFFSET (struct DIRENT, DIR_FN),
  231. FIELDOFFSET (struct DIRENT, DIR_MTIM),
  232. FIELDOFFSET (struct DIRENT, DIR_SIZE),
  233. FIELDOFFSET (struct DIRENT, DIR_ATIM),
  234. FIELDOFFSET (struct DIRENT, DIR_CTIM),
  235. FIELDOFFSET (struct DIRENT, DIR_EALEN),
  236. FIELDOFFSET (struct DIRENT, DIR_NAML),
  237. FIELDOFFSET (struct DIRENT, DIR_NAMA)
  238. };
  239. #else
  240. USHORT dirent_off [12] = {
  241. FIELDOFFSET (struct DIRENT, DIR_ELEN),
  242. FIELDOFFSET (struct DIRENT, DIR_FLAG),
  243. FIELDOFFSET (struct DIRENT, DIR_FN),
  244. FIELDOFFSET (struct DIRENT, DIR_MTIM),
  245. FIELDOFFSET (struct DIRENT, DIR_SIZE),
  246. FIELDOFFSET (struct DIRENT, DIR_ATIM),
  247. FIELDOFFSET (struct DIRENT, DIR_CTIM),
  248. FIELDOFFSET (struct DIRENT, DIR_EALEN),
  249. FIELDOFFSET (struct DIRENT, DIR_FLEX),
  250. FIELDOFFSET (struct DIRENT, DIR_CPAGE),
  251. FIELDOFFSET (struct DIRENT, DIR_NAML),
  252. FIELDOFFSET (struct DIRENT, DIR_NAMA)
  253. };
  254. #endif
  255. #ifdef CODEPAGE
  256. USHORT cpinfoent_off [6] = {
  257. FIELDOFFSET (struct CPINFOENT, CPI_CNTRY),
  258. FIELDOFFSET (struct CPINFOENT, CPI_CPID),
  259. FIELDOFFSET (struct CPINFOENT, CPI_CHKSUM),
  260. FIELDOFFSET (struct CPINFOENT, CPI_DATASEC),
  261. FIELDOFFSET (struct CPINFOENT, CPI_INDEX),
  262. FIELDOFFSET (struct CPINFOENT, CPI_RNGECNT)
  263. };
  264. USHORT cpdataent_off [5] = {
  265. FIELDOFFSET (struct CPDATAENT, CPD_CNTRY),
  266. FIELDOFFSET (struct CPDATAENT, CPD_CPID),
  267. FIELDOFFSET (struct CPDATAENT, CPD_RNGECNT),
  268. FIELDOFFSET (struct CPDATAENT, CPD_TABLE[0]),
  269. FIELDOFFSET (struct CPDATAENT, CPD_RNGE[0]),
  270. };
  271. USHORT cpdatasec_off [9] = {
  272. FIELDOFFSET (struct CPDATASEC, CPS_SIG),
  273. FIELDOFFSET (struct CPDATASEC, CPS_DATACNT),
  274. FIELDOFFSET (struct CPDATASEC, CPS_INDEX),
  275. FIELDOFFSET (struct CPDATASEC, CPS_CHKSUM[0]),
  276. FIELDOFFSET (struct CPDATASEC, CPS_OFFSET[0]),
  277. FIELDOFFSET (struct CPDATASEC, CPS_CHKSUM[1]),
  278. FIELDOFFSET (struct CPDATASEC, CPS_OFFSET[1]),
  279. FIELDOFFSET (struct CPDATASEC, CPS_CHKSUM[2]),
  280. FIELDOFFSET (struct CPDATASEC, CPS_OFFSET[2]),
  281. };
  282. #endif
  283. USHORT superb_siz [20] = {
  284. FIELDSIZE (struct SuperB, SB_SIG1),
  285. FIELDSIZE (struct SuperB, SB_SIG2),
  286. FIELDSIZE (struct SuperB, SB_VER),
  287. FIELDSIZE (struct SuperB, SB_FVER),
  288. FIELDSIZE (struct SuperB, SB_ROOT),
  289. FIELDSIZE (struct SuperB, SB_SEC),
  290. FIELDSIZE (struct SuperB, SB_BSEC),
  291. FIELDSIZE (struct SuperB, SB_BII.P),
  292. FIELDSIZE (struct SuperB, SB_BBL.P),
  293. 0, /* SB_CDDAT and */
  294. 0, /* SB_DODAT are both dates */
  295. FIELDSIZE (struct SuperB, SB_DBSIZE),
  296. FIELDSIZE (struct SuperB, SB_DBLOW),
  297. FIELDSIZE (struct SuperB, SB_DBHIGH),
  298. FIELDSIZE (struct SuperB, SB_DBMAP),
  299. };
  300. #ifndef CODEPAGE
  301. USHORT fnode_siz [15] = {
  302. FIELDSIZE (struct FNODE, FN_SIG),
  303. FIELDSIZE (struct FNODE, FN_SRH),
  304. FIELDSIZE (struct FNODE, FN_FRH),
  305. FIELDSIZE (struct FNODE, FN_SIG),
  306. FIELDSIZE (struct FNODE, FN_HCNT),
  307. FIELDSIZE (struct FNODE, FN_CONTFN),
  308. FIELDSIZE (struct FNODE, FN_AclDiskLength),
  309. FIELDSIZE (struct FNODE, FN_AclSector),
  310. FIELDSIZE (struct FNODE, FN_AclFnodeLength),
  311. FIELDSIZE (struct FNODE, FN_AclDataFlag),
  312. FIELDSIZE (struct FNODE, FN_EaDiskLength),
  313. FIELDSIZE (struct FNODE, FN_EaSector),
  314. FIELDSIZE (struct FNODE, FN_EaFnodeLength),
  315. FIELDSIZE (struct FNODE, FN_EaDataFlag)
  316. };
  317. #else
  318. /* note, previously, one more element than req'd */
  319. USHORT fnode_siz [21] = {
  320. FIELDSIZE (struct FNODE, FN_SIG),
  321. FIELDSIZE (struct FNODE, FN_SRH),
  322. FIELDSIZE (struct FNODE, FN_FRH),
  323. FIELDSIZE (struct FNODE, FN_SIG),
  324. FIELDSIZE (struct FNODE, FN_HCNT),
  325. FIELDSIZE (struct FNODE, FN_CONTFN),
  326. FIELDSIZE (struct FNODE, FN_ACLBASE),
  327. FIELDSIZE (struct FNODE, FN_AclDiskLength),
  328. FIELDSIZE (struct FNODE, FN_AclSector),
  329. FIELDSIZE (struct FNODE, FN_AclFnodeLength),
  330. FIELDSIZE (struct FNODE, FN_AclDataFlag),
  331. FIELDSIZE (struct FNODE, FN_EaDiskLength),
  332. FIELDSIZE (struct FNODE, FN_EaSector),
  333. FIELDSIZE (struct FNODE, FN_EaFnodeLength),
  334. FIELDSIZE (struct FNODE, FN_EaDataFlag),
  335. FIELDSIZE (struct FNODE, FN_AB),
  336. FIELDSIZE (struct FNODE, FN_ALREC[0]),
  337. FIELDSIZE (struct FNODE, FN_VLEN),
  338. FIELDSIZE (struct FNODE, FN_NEACNT),
  339. FIELDSIZE (struct FNODE, FN_FREE[0])
  340. };
  341. #endif
  342. USHORT fnab_siz [4] = {
  343. FIELDSIZE (struct ALBLK, AB_FLAG),
  344. FIELDSIZE (struct ALBLK, AB_FCNT),
  345. FIELDSIZE (struct ALBLK, AB_OCNT),
  346. FIELDSIZE (struct ALBLK, AB_FREP)
  347. };
  348. USHORT ab_siz [7] = {
  349. FIELDSIZE (struct ALSEC, AS_SIG),
  350. FIELDSIZE (struct ALSEC, AS_SEC),
  351. FIELDSIZE (struct ALSEC, AS_RENT),
  352. FIELDSIZE (struct ALSEC, AS_ALBLK.AB_FLAG),
  353. FIELDSIZE (struct ALSEC, AS_ALBLK.AB_FCNT),
  354. FIELDSIZE (struct ALSEC, AS_ALBLK.AB_OCNT),
  355. FIELDSIZE (struct ALSEC, AS_ALBLK.AB_FREP)
  356. };
  357. #ifndef CODEPAGE
  358. USHORT dirent_siz [10] = {
  359. FIELDSIZE (struct DIRENT, DIR_ELEN),
  360. FIELDSIZE (struct DIRENT, DIR_FLAG),
  361. FIELDSIZE (struct DIRENT, DIR_FN),
  362. 0, /* DIR_MTIM is a date */
  363. FIELDSIZE (struct DIRENT, DIR_SIZE),
  364. 0, /* DIR_ATIM and */
  365. 0, /* DIR_CTIM are both dates */
  366. FIELDSIZE (struct DIRENT, DIR_EALEN),
  367. FIELDSIZE (struct DIRENT, DIR_NAML),
  368. FIELDSIZE (struct DIRENT, DIR_NAMA)
  369. };
  370. #else
  371. USHORT dirent_siz [12] = {
  372. FIELDSIZE (struct DIRENT, DIR_ELEN),
  373. FIELDSIZE (struct DIRENT, DIR_FLAG),
  374. FIELDSIZE (struct DIRENT, DIR_FN),
  375. 0, /* DIR_MTIM is a date */
  376. FIELDSIZE (struct DIRENT, DIR_SIZE),
  377. 0, /* DIR_ATIM and */
  378. 0, /* DIR_CTIM are both dates */
  379. FIELDSIZE (struct DIRENT, DIR_EALEN),
  380. FIELDSIZE (struct DIRENT, DIR_FLEX),
  381. FIELDSIZE (struct DIRENT, DIR_CPAGE),
  382. FIELDSIZE (struct DIRENT, DIR_NAML),
  383. FIELDSIZE (struct DIRENT, DIR_NAMA)
  384. };
  385. #endif
  386. #ifdef CODEPAGE
  387. USHORT cpinfoent_siz [6] = {
  388. FIELDSIZE (struct CPINFOENT, CPI_CNTRY),
  389. FIELDSIZE (struct CPINFOENT, CPI_CPID),
  390. FIELDSIZE (struct CPINFOENT, CPI_CHKSUM),
  391. FIELDSIZE (struct CPINFOENT, CPI_DATASEC),
  392. FIELDSIZE (struct CPINFOENT, CPI_INDEX),
  393. FIELDSIZE (struct CPINFOENT, CPI_RNGECNT)
  394. };
  395. USHORT cpdataent_siz [5] = {
  396. FIELDSIZE (struct CPDATAENT, CPD_CNTRY),
  397. FIELDSIZE (struct CPDATAENT, CPD_CPID),
  398. FIELDSIZE (struct CPDATAENT, CPD_RNGECNT),
  399. FIELDSIZE (struct CPDATAENT, CPD_TABLE),
  400. FIELDSIZE (struct CPDATAENT, CPD_RNGE[0]),
  401. };
  402. USHORT cpdatasec_siz [9] = {
  403. FIELDSIZE (struct CPDATASEC, CPS_SIG),
  404. FIELDSIZE (struct CPDATASEC, CPS_DATACNT),
  405. FIELDSIZE (struct CPDATASEC, CPS_INDEX),
  406. FIELDSIZE (struct CPDATASEC, CPS_CHKSUM[0]),
  407. FIELDSIZE (struct CPDATASEC, CPS_OFFSET[0]),
  408. FIELDSIZE (struct CPDATASEC, CPS_CHKSUM[1]),
  409. FIELDSIZE (struct CPDATASEC, CPS_CHKSUM[1]),
  410. FIELDSIZE (struct CPDATASEC, CPS_OFFSET[2]),
  411. FIELDSIZE (struct CPDATASEC, CPS_OFFSET[2]),
  412. };
  413. #endif
  414. UCHAR *months [12] = {
  415. "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"
  416. };
  417. struct tm tm;
  418. struct vioprm mode25 = {
  419. 12, 1, 4, 80, 25, 640, 350
  420. };
  421. struct vioprm mode43 = {
  422. 12, 1, 4, 80, 43, 640, 350
  423. };