Lines Matching refs:cmd_opt

60 cmd_opt_t	cmd_opt;  variable
120 if (NULL != cmd_opt.disassemble) { in main()
121 disassemble(cmd_opt.disassemble); in main()
122 } else if (NULL == cmd_opt.input_file) { in main()
125 if (1 < cmd_opt.input_file_num) { in main()
126 for (pp = cmd_opt.input_file; *pp; pp++) { in main()
141 (void) itm_compile(*(cmd_opt.input_file)); in main()
168 cmd_opt.my_name, file); in itm_compile()
176 if ((NULL == cmd_opt.output_file) && in itm_compile()
177 (0 == cmd_opt.no_output)) { in itm_compile()
188 itm_output_file = cmd_opt.output_file; in itm_compile()
191 if (0 != cmd_opt.preprocess) { in itm_compile()
194 cmd_line = cmd_opt.preprocess; in itm_compile()
213 cmd_opt.my_name, command, itm_input_file); in itm_compile()
220 if (NULL == cmd_opt.preprocess_specified) { in itm_compile()
231 cmd_opt.my_name, itm_input_file); in itm_compile()
291 cmd_opt.my_name = basename(*(argv + 0)); in parse_opts()
292 if ('\0' == *(cmd_opt.my_name)) { in parse_opts()
293 cmd_opt.my_name = ME_DEFAULT; in parse_opts()
296 cmd_opt.preprocess_default = CPP_PATH; in parse_opts()
297 cmd_opt.preprocess = cmd_opt.preprocess_default; in parse_opts()
298 cmd_opt.strip = 1; /* stripped by default */ in parse_opts()
302 cmd_opt.disassemble = optarg; in parse_opts()
305 cmd_opt.interpreter = optarg; in parse_opts()
308 if (NULL != cmd_opt.preprocess_specified) { in parse_opts()
313 cmd_opt.preprocess_specified = in parse_opts()
315 cmd_opt.preprocess = cmd_opt.preprocess_specified; in parse_opts()
316 if (NULL == cmd_opt.preprocess) { in parse_opts()
325 *(cmd_opt.cpp_opt + 0) = strdup_vital(optarg); in parse_opts()
327 *(cmd_opt.cpp_opt + 0) = strdup_vital(p); in parse_opts()
351 cmd_opt.force_overwrite = 1; in parse_opts()
354 cmd_opt.no_output = 1; in parse_opts()
360 cmd_opt.large_table = 1; in parse_opts()
363 cmd_opt.output_file = optarg; in parse_opts()
366 cmd_opt.strip = 0; in parse_opts()
369 cmd_opt.quiet = 1; in parse_opts()
373 cmd_opt.trace = malloc_vital((sizeof (char)) * 128); in parse_opts()
374 (void) memset(cmd_opt.trace, 0, (sizeof (char)) * 128); in parse_opts()
376 *(cmd_opt.trace + ((*p) & 0x007f)) = 1; in parse_opts()
392 cmd_opt.input_file_num = (argc - optind); in parse_opts()
393 cmd_opt.input_file = in parse_opts()
396 *(cmd_opt.input_file + (argc - optind)) = NULL; in parse_opts()
400 *(cmd_opt.input_file + i) = argv[optind]; in parse_opts()
405 if ((1 < cmd_opt.input_file_num) && (NULL != cmd_opt.output_file)) { in parse_opts()
410 if ((cmd_opt.input_file_num <= 0) && in parse_opts()
411 (NULL == cmd_opt.output_file) && in parse_opts()
412 (NULL == cmd_opt.disassemble) && in parse_opts()
413 (0 == cmd_opt.no_output)) { in parse_opts()
420 if (cmd_opt.disassemble && in parse_opts()
421 (cmd_opt.interpreter || in parse_opts()
422 cmd_opt.cpp_opt || in parse_opts()
423 cmd_opt.preprocess_specified || in parse_opts()
424 cmd_opt.input_file || in parse_opts()
425 cmd_opt.force_overwrite || in parse_opts()
426 cmd_opt.no_output || in parse_opts()
427 cmd_opt.map_name_type || in parse_opts()
428 cmd_opt.large_table || in parse_opts()
429 cmd_opt.output_file)) { in parse_opts()
443 if ((NULL == cmd_opt.preprocess_specified) && in parse_opts()
444 (NULL != cmd_opt.preprocess_default)) { in parse_opts()
446 p = basename(cmd_opt.preprocess_default); in parse_opts()
448 *(cmd_opt.cpp_opt + 0) = in parse_opts()
449 strdup_vital(cmd_opt.preprocess_default); in parse_opts()
451 *(cmd_opt.cpp_opt + 0) = strdup_vital(p); in parse_opts()
465 for (i = 0; i < cmd_opt.cpp_opt_num; i++) { in cpp_open()
466 TRACE_MESSAGE('C', ("%s\n", *(cmd_opt.cpp_opt + i))); in cpp_open()
479 (void) execv(cmd_opt.preprocess, cmd_opt.cpp_opt); in cpp_open()
513 if (0 == cmd_opt.cpp_opt_reserved) { in cpp_opt_append()
514 cmd_opt.cpp_opt_reserved = 32; in cpp_opt_append()
515 cmd_opt.cpp_opt = malloc_vital((sizeof (char *)) * 32); in cpp_opt_append()
516 *(cmd_opt.cpp_opt + 0) = "cpp"; in cpp_opt_append()
517 cmd_opt.cpp_opt_num = 1; in cpp_opt_append()
518 } else if ((cmd_opt.cpp_opt_reserved - 2) <= cmd_opt.cpp_opt_num) { in cpp_opt_append()
519 cmd_opt.cpp_opt_reserved += 32; in cpp_opt_append()
521 cmd_opt.cpp_opt_reserved); in cpp_opt_append()
522 (void) memcpy(new_opt_list, cmd_opt.cpp_opt, in cpp_opt_append()
523 (sizeof (char *)) * cmd_opt.cpp_opt_num); in cpp_opt_append()
524 (void) memset(new_opt_list + cmd_opt.cpp_opt_num, 0, 32); in cpp_opt_append()
525 free(cmd_opt.cpp_opt); in cpp_opt_append()
526 cmd_opt.cpp_opt = new_opt_list; in cpp_opt_append()
529 *(cmd_opt.cpp_opt + cmd_opt.cpp_opt_num) = new_opt; in cpp_opt_append()
530 cmd_opt.cpp_opt_num += 1; in cpp_opt_append()
539 if (cmd_opt.cpp_opt_num < num) { in cpp_opt_trunc()
540 num = cmd_opt.cpp_opt_num; in cpp_opt_trunc()
543 free(cmd_opt.cpp_opt + cmd_opt.cpp_opt_num); in cpp_opt_trunc()
544 --(cmd_opt.cpp_opt_num); in cpp_opt_trunc()
610 cmd_opt.my_name, cmd_opt.my_name); in usage()
617 cmd_opt.my_name, cmd_opt.my_name); in usage()
699 m = cmd_opt.map_name_type; in map_name_type_append()
706 cmd_opt.map_name_type = m; in map_name_type_append()
908 if (0 == cmd_opt.quiet) { in itm_error()
924 itm_error("my_name = %s\n", cmd_opt.my_name); in trace_option()
925 if (NULL == cmd_opt.input_file) { in trace_option()
928 for (pp = cmd_opt.input_file; *pp; pp++) { in trace_option()
933 cmd_opt.output_file ? cmd_opt.output_file : "(stdout)"); in trace_option()
935 cmd_opt.interpreter ? cmd_opt.interpreter : "(default)"); in trace_option()
936 if (cmd_opt.cpp_opt) { in trace_option()
937 itm_error("cpp_opt = %s\n", *(cmd_opt.cpp_opt)); in trace_option()
938 for (i = 1; i < cmd_opt.cpp_opt_num; i++) { in trace_option()
939 itm_error("\t%s\n", *(cmd_opt.cpp_opt + i)); in trace_option()
945 cmd_opt.preprocess_default ? cmd_opt.preprocess_default : in trace_option()
948 cmd_opt.preprocess_specified ? cmd_opt.preprocess_specified : in trace_option()
951 cmd_opt.preprocess ? cmd_opt.preprocess : "(no)"); in trace_option()
953 cmd_opt.disassemble ? "yes" : "no"); in trace_option()
955 if (NULL == cmd_opt.map_name_type) { in trace_option()
960 m = cmd_opt.map_name_type; in trace_option()
983 cmd_opt.large_table ? "true" : "false"); in trace_option()
985 cmd_opt.force_overwrite ? "true" : "false"); in trace_option()
987 cmd_opt.strip ? "true" : "false"); in trace_option()
989 cmd_opt.no_output ? "true" : "false"); in trace_option()
991 if (NULL == cmd_opt.trace) { in trace_option()