home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pgmutl / val_link.arc / GLOBALS.H < prev    next >
Text File  |  1989-02-18  |  25KB  |  392 lines

  1. /*                                 GLOBALS.H                               */
  2.  
  3. /* Global variables used by the linker in approximate alphabetical order.  */
  4.  
  5. bit_32                                 address_base;
  6. bit_32                                 align_mask[6]=
  7.                                         {0L, 0L, 1L, 15L, 255L, 3L};
  8. boolean_switch_type                    align_exe_header = {True};
  9. char                                  *align_text[6]=
  10.                                         {"Absolute",
  11.                                          "Byte",
  12.                                          "Word",
  13.                                          "Paragraph",
  14.                                          "Page",
  15.                                          "Dword"};
  16. segment_entry_ptr                      active_segment;
  17. #define Active_segment                 (*active_segment)
  18. string_ptr                             ampersand_string;
  19. string_ptr                             and_string;
  20. string_ptr                             at_string;
  21. string_ptr                             backslash_dot_string;
  22. string_ptr                             backslash_dot_dot_string;
  23. string_ptr                             backslash_string;
  24. string_ptr                             bar_string;
  25. lname_entry_ptr                        BSS_lname;
  26. bit_16_switch_type                     buffer_size = 
  27.                                         {0x8000, 512, 0xFE00, 0x8000, False};
  28. lname_entry_ptr                        c_common_lname;
  29. boolean_switch_type                    case_ignore = {True};
  30. string_ptr                             class_string;
  31. string_ptr                             close_paren_string;
  32. string_ptr                             close_angle_string;
  33. lname_entry_ptr                        codeview_class_DEBSYM;
  34. lname_entry_ptr                        codeview_class_DEBTYP;
  35. bit_16                                 codeview_information_present = False;
  36. lname_entry_ptr                        codeview_segment_SYMBOLS;
  37. lname_entry_ptr                        codeview_segment_TYPES;
  38. string_ptr                             colon_string;
  39. string_ptr                             com_extension_string;
  40. char                                  *combine_text[10]=
  41.                                         {"Private",
  42.                                          "Undefined",
  43.                                          "Public",
  44.                                          "Undefined",
  45.                                          "Public",
  46.                                          "Stack",
  47.                                          "Common",
  48.                                          "Public"
  49.                                          "Undefined",
  50.                                          "Blank Common"};
  51. boolean_switch_type                    comfile = {False};
  52. string_ptr                             comma_string;
  53. bit_16_switch_type                     CPARMAXALLOC =
  54.                                         {0xFFFF, 0x0, 0xFFFF, 0xFFFF, False};
  55. string_ptr                             current_filename;
  56. string_ptr                             current_path;
  57. obj_record_header_ptr                  current_record_header;
  58. #define Current_record_header          (*current_record_header)
  59. bit_32                                 current_record_offset;
  60. string_ptr                             default_directory_string;
  61. string_ptr                             default_drive_string;
  62. string_ptr                             default_extension;
  63. string_ptr                             default_filename;
  64. char_ptr                               default_prompt;
  65. bit_16_switch_type                     detail_level = 
  66.                                         {0, 0, 5, 0, False};
  67. string_ptr                             device_AUX;
  68. string_ptr                             device_CON;
  69. string_ptr                             device_PRN;
  70. lname_entry_ptr                        DGROUP_lname;
  71. boolean_switch_type                    DOSSEG = {False};
  72. string_ptr                             dot_string;
  73. DTA_ptr                                DTA;
  74. pool_descriptor_type                   dynamic_pool;
  75. segment_entry_ptr                      edata_segment = Null;
  76. obj_ptr_type                           end_of_record;
  77. obj_ptr_type                           end_of_last_LIDATA_record;
  78. segment_entry_ptr                      end_segment = Null;
  79. string_ptr                             env_extension_string;
  80. string_ptr                             exclamation_string;
  81. string_ptr                             exe_extension_string;
  82. file_info_list                         exe_file_list = {Null, Null};
  83. EXE_header_ptr                         exe_header;
  84. #define Exe_header                     (*exe_header)
  85. bit_32                                 exe_header_size;
  86. bit_32                                 exec_image_start_time;
  87. boolean_switch_type                    exechecksum = {False};
  88. bit_16                                 exefile;
  89. public_entry_list                      external_list = {Null, Null};
  90. public_entry_ptr_array                 externals;
  91. string_ptr                             false_string;
  92. lname_entry_ptr                        FAR_BSS_lname;
  93. public_entry_ptr                       far_communals = Null;
  94. fixup_type                             fixup;
  95. bit_16                                 FIXUPP_contains_only_threads;
  96. bit_16                                 fixup_index;
  97. bit_32                                 fixup_start_time;
  98. bit_16                                 frame_absolute;
  99. thread_type                            frame_thread[4];
  100. pool_descriptor_type                   free_pool;
  101. lname_entry_ptr                        generated_lname;
  102. group_entry_ptr_array                  gnames;
  103. group_entry_ptr_array                  group_hash_table;
  104. group_entry_list                       group_list = {Null, Null};
  105. bit_16_switch_type                     group_table_hash_size = 
  106.                                           {25, 1, 1023, 25, False};
  107. string_ptr                             group_string;
  108. boolean_switch_type                    help;
  109. string_ptr                             help_extension_string;
  110. string_ptr                             help_filename;
  111. bit_32                                 highest_uninitialized_byte;
  112. lname_entry_ptr                        HUGE_BSS_lname;
  113. public_entry_ptr                       huge_communals = Null;
  114. file_type                              infile;
  115. byte_ptr                               infile_buffer;
  116. bit_16                                 initial_IP = 0;
  117. bit_16                                 initial_CS = 0;
  118. union REGS                             inregs;
  119. segment_entry_ptr                      largest_stack_seg;
  120. #define Largest_stack_seg              (*largest_stack_seg)
  121. bit_32                                 largest_stack_seg_length;
  122. lseg_ptr                               last_LxDATA_lseg;
  123. #define last_LxDATA_Lseg               (*last_LxDATA_lseg)
  124. bit_16                                 last_LxDATA_offset;
  125. bit_8                                  last_LxDATA_record_type;
  126. obj_record_header_ptr                  last_LIDATA_record_header;
  127. #define Last_LIDATA_record_header      (*last_LIDATA_record_header)
  128. bit_8                                  last_LIDATA_record[MAX_ELEMENT_SIZE];
  129. string_ptr                             lib_extension_string;
  130. file_info_list                         lib_file_list = {Null, Null};
  131. bit_32                                 library_directory_start_time;
  132. bit_32                                 library_processing_start_time;
  133. bit_16                                 library_request_count = 0;
  134. bit_16                                 LIDATA_index;
  135. bit_16                                 LIDATA_offset;
  136. bit_16                                 link_step = 0;
  137. bit_32                                 linker_end_time;
  138. bit_32                                 linker_start_time;
  139. lname_entry_ptr_array                  lname_hash_table;
  140. bit_16_switch_type                     lname_table_hash_size = 
  141.                                         {25, 1, 1023, 25, False};
  142. lname_entry_ptr_array                  lnames;
  143. byte_ptr                               lseg_data_ptr;
  144. string_ptr                             lst_extension_string;
  145. file_info_list                         lst_file_list = {Null, Null};
  146. bit_16_switch_type                     map =
  147.                                         {2048, 1, 16384, 2048, False};
  148. bit_32                                 map_start_time;
  149. bit_16_switch_type                     max_externals = 
  150.                                         {512, 1, 1024, 512, False};
  151. bit_16_switch_type                     max_groups = 
  152.                                         {32, 1, 1024, 32, False};
  153. bit_16_switch_type                     max_lnames = 
  154.                                         {512, 1, 1024, 512, False};
  155. bit_16_switch_type                     max_segments = 
  156.                                         {128, 1, 1024, 128, False};
  157. string_ptr                             minus_string;
  158. char                                  *mode_text[2]=
  159.                                         {"Self-relative",
  160.                                          "Segment-relative"};
  161. bit_16                                 more_tokens;
  162. bit_16                                 n_externals;
  163. bit_16                                 n_groups;
  164. bit_16                                 n_lnames;
  165. bit_16                                 n_publics = 0;
  166. bit_16                                 n_publics_to_sort;
  167. bit_16                                 n_relocation_items = 0;
  168. bit_16                                 n_segments;
  169. public_entry_ptr                       near_communals = Null;
  170. bit_32                                 next_available_address;
  171. string_ptr                             next_token;
  172. lname_entry_ptr                        none_lname;
  173. string_ptr                             not_string;
  174. string_ptr                             null_string;
  175. string_ptr                             obj_extension_string;
  176. file_info_list                         obj_file_list = {Null, Null};
  177. obj_ptr_type                           obj_ptr;
  178. boolean_switch_type                    objchecksum = {False};
  179. byte                                   object_file_element[MAX_ELEMENT_SIZE];
  180. bit_32                                 object_module_start_time;
  181. DTA_ptr                                old_DTA;
  182. string_ptr                             open_angle_string;
  183. string_ptr                             open_paren_string;
  184. string_ptr                             or_string;
  185. byte_ptr                               order_expression_char_ptr;
  186. bit_32                                 order_start_time;
  187. text_switch_type                       ordering = {Null};
  188. file_type                              outfile;
  189. byte_ptr                               outfile_buffer;
  190. union REGS                             outregs;
  191. bit_16_switch_type                     pack_code =
  192.                                         {0xFFFA, 1, 0xFFFF, 0xFFFA, False};
  193. string_ptr                             parm_string;
  194. boolean_switch_type                    pause = {False};
  195. string_ptr                             plus_string;
  196. string_ptr                             program_directory_string;
  197. bit_16                                 prompting_for;
  198. bit_16                                 prompt_next_stdin = False;
  199. public_entry_ptr_array                 public_hash_table;
  200. bit_16_switch_type                     public_table_hash_size =
  201.                                         {525, 1, 1023, 525, False};
  202. public_entry_ptr_array                 public_sort_array;
  203. bit_32                                 secondary_init_start_time;
  204. segment_entry_ptr_array                segment_hash_table;
  205. segment_entry_list                     segment_list = {Null, Null};
  206. string_ptr                             segment_string;
  207. bit_16_switch_type                     segment_table_hash_size =
  208.                                         {25, 1, 1023, 25, False};
  209. segment_entry_list                     segments_ordered_list;
  210. segment_entry_list                     segments_unordered_list;
  211. struct SREGS                           segregs;
  212. string_ptr                             semicolon_string;
  213. lseg_ptr_array                         snames;
  214. string_ptr                             space_string;
  215. bit_16_switch_type                     stack =
  216.                                         {0, 0, 0xFFFF, 0, False};
  217. lname_entry_ptr                        STACK_lname;
  218. bit_16                                 stack_segment_found = False;
  219. string_ptr                             star_string;
  220. fixup_type                             start_address;
  221. bit_16                                 start_address_found = False;
  222. pool_descriptor_type                   static_pool;
  223. boolean_switch_type                    statistics = {False};
  224. bit_32                                 statistics_start_time;
  225. bit_32                                 step_time;
  226. string_ptr                             sys_extension_string;
  227. boolean_switch_type                    sysfile = {False};
  228. thread_type                            target_thread[4];
  229. file_info_ptr                          temp_file;
  230. text_switch_type                       temp_filename = {Null};
  231. byte                                   temp_near_string[TEMP_STRING_SIZE];
  232. string_ptr                             temp_string;
  233. temp_file_header_type                  temp_file_header;
  234. string_ptr                             tilde_string;
  235. char                                   time_array[16];
  236. lname_entry_ptr                        tmodule_name;
  237. bit_16                                 tmodule_number = 0;
  238. string_ptr                             token;
  239. byte                                   token_break_char;
  240. bit_16                                 token_is_number;
  241. bit_16                                 token_is_hex_number;
  242. bit_16                                 token_numeric_value;
  243. token_stack_list                       token_stack = {Null, Null};
  244. token_stack_list                       token_stack_free_list = {Null, Null};
  245. token_stack_ptr                        token_stack_member;
  246. token_class_type                       token_type;
  247. bit_32                                 total_time;
  248. string_ptr                             true_string;
  249. char                                  *type_text[5]=
  250.                                         {"Low Byte",
  251.                                          "Offset",
  252.                                          "Base",
  253.                                          "Pointer",
  254.                                          "High Byte"};
  255. bit_32                                 user_input_start_time;
  256.  
  257. char                                  *DOS_error_text[] =
  258. {
  259.                               "End of file",                         /* 00 */
  260.                               "Invalid function",                    /* 01 */
  261.                               "File not found",                      /* 02 */
  262.                               "Path not found",                      /* 03 */
  263.                               "No handles available",                /* 04 */
  264.                               "Access denied",                       /* 05 */
  265.                               "Invalid handle",                      /* 06 */
  266.                               "Memory control blocks destroyed",     /* 07 */
  267.                               "Insufficient memory",                 /* 08 */
  268.                               "Invalid memory block address",        /* 09 */
  269.                               "Invalid environment",                 /* 0A */
  270.                               "Invalid format",                      /* 0B */
  271.                               "Invalid access code",                 /* 0C */
  272.                               "Invalid data",                        /* 0D */
  273.                               "Reserved",                            /* 0E */
  274.                               "Invalid drive",                       /* 0F */
  275.                               "Attempt to remove current directory", /* 10 */
  276.                               "Not the same device",                 /* 11 */
  277.                               "No more file",                        /* 12 */
  278.                               "Disk write-protected",                /* 13 */
  279.                               "Unknown unit",                        /* 14 */
  280.                               "Drive not ready",                     /* 15 */
  281.                               "Unknown command",                     /* 16 */
  282.                               "CRC error",                           /* 17 */
  283.                               "Bad request structure length",        /* 18 */
  284.                               "Seek error",                          /* 19 */
  285.                               "Unknown media type",                  /* 1A */
  286.                               "Sector not found",                    /* 1B */
  287.                               "Out of paper",                        /* 1C */
  288.                               "Write fault",                         /* 1D */
  289.                               "Read fault",                          /* 1E */
  290.                               "General failure",                     /* 1F */
  291.                               "Sharing violation",                   /* 20 */
  292.                               "Lock violation",                      /* 21 */
  293.                               "Invalid disk change"                  /* 22 */
  294.                               "FCB unavailable",                     /* 23 */
  295.                               "Sharing buffer overflow",             /* 24 */
  296.                               "Reserved",                            /* 25 */
  297.                               "Reserved",                            /* 26 */
  298.                               "Reserved",                            /* 27 */
  299.                               "Reserved",                            /* 28 */
  300.                               "Reserved",                            /* 29 */
  301.                               "Reserved",                            /* 2A */
  302.                               "Reserved",                            /* 2B */
  303.                               "Reserved",                            /* 2C */
  304.                               "Reserved",                            /* 2D */
  305.                               "Reserved",                            /* 2E */
  306.                               "Reserved",                            /* 2F */
  307.                               "Reserved",                            /* 30 */
  308.                               "Reserved",                            /* 31 */
  309.                               "Network request not supported",       /* 32 */
  310.                               "Remote computer not listening",       /* 33 */
  311.                               "Duplicate name on network",           /* 34 */
  312.                               "Network name not found",              /* 35 */
  313.                               "Network busy",                        /* 36 */
  314.                               "Network device no longer exists",     /* 37 */
  315.                               "Net BIOS command limit exceeded",     /* 38 */
  316.                               "Network adapter error",               /* 39 */
  317.                               "Incorrect network response",          /* 3A */
  318.                               "Unexpected network error",            /* 3B */
  319.                               "Incompatible remote adapter",         /* 3C */
  320.                               "Print queue full",                    /* 3D */
  321.                               "Not enough space for print file",     /* 3E */
  322.                               "Print file deleted",                  /* 3F */
  323.                               "Network name deleted",                /* 40 */
  324.                               "Access denied",                       /* 41 */
  325.                               "Network device type incorrect",       /* 42 */
  326.                               "Network name not found",              /* 43 */
  327.                               "Network name limit exceeded",         /* 44 */
  328.                               "Net BIOS session limit exceeded",     /* 45 */
  329.                               "Temporarily paused",                  /* 46 */
  330.                               "Network request not accepted",        /* 47 */
  331.                               "Print or disk redirection is paused", /* 48 */
  332.                               "Reserved",                            /* 49 */
  333.                               "Reserved",                            /* 4A */
  334.                               "Reserved",                            /* 4B */
  335.                               "Reserved",                            /* 4C */
  336.                               "Reserved",                            /* 4D */
  337.                               "Reserved",                            /* 4E */
  338.                               "Reserved",                            /* 4F */
  339.                               "File already exists",                 /* 50 */
  340.                               "Reserved",                            /* 51 */
  341.                               "Cannot make directory",               /* 52 */
  342.                               "Fail on Int 24",                      /* 53 */
  343.                               "Too many redirections",               /* 54 */
  344.                               "Duplicate redirection",               /* 55 */
  345.                               "Invalid password",                    /* 56 */
  346.                               "Invalid parameter",                   /* 57 */
  347.                               "Network data fault",                  /* 58 */
  348.                               "Invalid error code returned from DOS" /* 59 */
  349.                              };
  350.  
  351. switch_table_type                      switch_table[] =
  352. {
  353.  {2, "ah",  "alignexeheader",  &align_exe_header,        scan_set_switch},
  354.  {2, "bsz", "buffersize",      &buffer_size,             scan_bit_16_switch},
  355.  {2, "ci",  "caseignore",      &case_ignore,             scan_set_switch},
  356.  {2, "co",  "comfile",         &comfile,                 scan_set_switch},
  357.  {2, "cp",  "cparmaxalloc",    &CPARMAXALLOC,            scan_bit_16_switch},
  358.  {2, "det", "detaillevel",     &detail_level,            scan_bit_16_switch},
  359.  {2, "do",  "dosseg",          &DOSSEG,                  scan_set_switch},
  360.  {2, "ex",  "exechecksum",     &exechecksum,             scan_set_switch},
  361.  {2, "ghs", "grouphashsize",   &group_table_hash_size,   scan_bit_16_switch},
  362.  {2, "hlp", "help",            &help,                    scan_help_switch},
  363.  {2, "lhs", "lnamehashsize",   &lname_table_hash_size,   scan_bit_16_switch},
  364.  {3, "mp",  "map",             &map,                     scan_opt_bit_16},
  365.  {4, "mex", "maxexternals",    &max_externals,           scan_bit_16_switch},
  366.  {4, "mgp", "maxgroups",       &max_groups,              scan_bit_16_switch},
  367.  {4, "mln", "maxlnames",       &max_lnames,              scan_bit_16_switch},
  368.  {4, "msg", "maxsegments",     &max_segments,            scan_bit_16_switch},
  369.  {4, "nah", "noalignexeheader",&align_exe_header,        scan_reset_switch},
  370.  {4, "nci", "nocaseignore",    &case_ignore,             scan_reset_switch},
  371.  {4, "nco", "nocomfile",       &comfile,                 scan_reset_switch},
  372.  {4, "ndo", "nodosseg",        &DOSSEG,                  scan_reset_switch},
  373.  {4, "nex", "noexechecksum",   &exechecksum,             scan_reset_switch},
  374.  {4, "nmp", "nomap",           &map,                     scan_reset_bit_16},
  375.  {4, "nob", "noobjchecksum",   &objchecksum,             scan_reset_switch},
  376.  {5, "npc", "nopackcode",      &pack_code,               scan_reset_bit_16},
  377.  {5, "npa", "nopause",         &pause,                   scan_reset_switch},
  378.  {4, "nsy", "nosysfile",       &sysfile,                 scan_reset_switch},
  379.  {4, "nst", "nostatistics",    &statistics,              scan_reset_switch},
  380.  {2, "ob",  "objchecksum",     &objchecksum,             scan_set_switch},
  381.  {2, "ord", "order",           &ordering,                scan_text_switch},
  382.  {3, "pac", "packcode",        &pack_code,               scan_opt_bit_16},
  383.  {3, "pa",  "pause",           &pause,                   scan_set_switch},
  384.  {2, "phs", "publichashsize",  &public_table_hash_size,  scan_bit_16_switch},
  385.  {2, "shs", "segmenthashsize", &segment_table_hash_size, scan_bit_16_switch},
  386.  {4, "stk", "stack",           &stack,                   scan_bit_16_switch},
  387.  {2, "sts", "statistics",      &statistics,              scan_set_switch},
  388.  {2, "sy",  "sysfile",         &sysfile,                 scan_set_switch},
  389.  {2, "tmp", "tempfile",        &temp_filename,           scan_text_switch},
  390.  {0, Null,  Null,              Null,                     Null}
  391. };
  392.