142 stage1_2_options_t stage1_2_options; |
142 stage1_2_options_t stage1_2_options; |
143 int optres, errflg = 0; |
143 int optres, errflg = 0; |
144 int path_len; |
144 int path_len; |
145 |
145 |
146 /* Default values for the command line options... */ |
146 /* Default values for the command line options... */ |
147 stage1_2_options.safe_extensions = false; /* allow use of SAFExxx datatypes */ |
147 stage1_2_options.safe_extensions = false; /* allow use of SAFExxx datatypes */ |
148 stage1_2_options.full_token_loc = false; /* error messages specify full token location */ |
148 stage1_2_options.full_token_loc = false; /* error messages specify full token location */ |
149 stage1_2_options.conversion_functions = false; /* Create a conversion function for derived datatype */ |
149 stage1_2_options.conversion_functions = false; /* Create a conversion function for derived datatype */ |
150 stage1_2_options.nested_comments = false; /* Allow the use of nested comments. */ |
150 stage1_2_options.nested_comments = false; /* Allow the use of nested comments. */ |
151 stage1_2_options.ref_operator = false; /* Allow the use of REF() operator. */ |
151 stage1_2_options.ref_standard_extensions = false; /* Allow the use of REFerences (keywords REF_TO, REF, DREF, ^, NULL). */ |
152 stage1_2_options.ref_to_any = false; /* Allow the use of REF_TO ANY datatype. */ |
152 stage1_2_options.ref_nonstand_extensions = false; /* Allow the use of non-standard extensions to REF_TO datatypes: REF_TO ANY, and REF_TO in struct elements! */ |
153 stage1_2_options.includedir = NULL; /* Include directory, where included files will be searched for... */ |
153 stage1_2_options.includedir = NULL; /* Include directory, where included files will be searched for... */ |
154 |
154 |
155 /******************************************/ |
155 /******************************************/ |
156 /* Parse command line options... */ |
156 /* Parse command line options... */ |
157 /******************************************/ |
157 /******************************************/ |
158 while ((optres = getopt(argc, argv, ":nhvfrRscI:T:O:")) != -1) { |
158 while ((optres = getopt(argc, argv, ":nhvfrRscI:T:O:")) != -1) { |
168 break; |
168 break; |
169 case 's': |
169 case 's': |
170 stage1_2_options.safe_extensions = true; |
170 stage1_2_options.safe_extensions = true; |
171 break; |
171 break; |
172 case 'R': |
172 case 'R': |
173 stage1_2_options.ref_operator = true; /* use of REF_TO ANY implies activating support for REF extensions! */ |
173 stage1_2_options.ref_standard_extensions = true; /* use of REF_TO ANY implies activating support for REF extensions! */ |
174 stage1_2_options.ref_to_any = true; |
174 stage1_2_options.ref_nonstand_extensions = true; |
175 break; |
175 break; |
176 case 'r': |
176 case 'r': |
177 stage1_2_options.ref_operator = true; |
177 stage1_2_options.ref_standard_extensions = true; |
178 break; |
178 break; |
179 case 'c': |
179 case 'c': |
180 stage1_2_options.conversion_functions = true; |
180 stage1_2_options.conversion_functions = true; |
181 break; |
181 break; |
182 case 'n': |
182 case 'n': |