#include <nidl.h>
#include <command.h>
#include <files.h>
#include <getflags.h>
#include <message.h>
#ifndef MAX_DEF_STRINGS
# define MAX_DEF_STRINGS 10
#endif
#ifndef MAX_DUMP_STRINGS
# define MAX_DUMP_STRINGS 10
#endif
#ifndef MAX_IMPORT_DIRECTORIES
# define MAX_IMPORT_DIRECTORIES 50
#endif
extern boolean ERR_no_warnings;
extern char *last_string;
static boolean cmd_opt[NUM_OPTS];
static void *cmd_val[NUM_OPTS];
boolean *CMD_opts = (boolean*)cmd_opt;
void **CMD_vals = (void**)cmd_val;
static const char *UNSPECIFIED = "";
static const char *nidl_library = NULL;
static int do_bug[NUM_BUGS];
static int do_not_do_bug[NUM_BUGS];
static boolean support_bug[NUM_BUGS + 1];
static const char *caux_suffix = CAUX_SUFFIX,
*caux_file;
static const char *cc_cmd;
static const char *cc_opt;
static const char *client;
#define client_none 0
#define client_stub 1
#define client_aux 2
#define client_all 3
static const char *client_vals[] = { "none", "stub", "aux", "all", NULL };
const char *CMD_def_cpp_cmd;
static const char *cpp_cmd;
static const char *cpp_opt;
static const char *cstub_suffix = CSTUB_SUFFIX,
*cstub_file;
static char *(def_strings[MAX_DEF_STRINGS + 1]);
static char *(undef_strings[MAX_DEF_STRINGS + 1]);
#ifdef DUMPERS
static char *dump_strings[MAX_DUMP_STRINGS+1];
#define dump_acf 0
#define dump_ast 1
#define dump_ast_after 2
#define dump_cmd 3
#define dump_debug 4
#define dump_flat 5
#define dump_mnode 6
#define dump_mool 7
#define dump_nametbl 8
#define dump_recs 9
#define dump_sends 10
#define dump_unode 11
#define dump_uool 12
#define dump_yy 13
static const char *dump_vals[] = { "acf", "ast", "ast_after", "cmd", "debug",
"flat", "mnode", "mool", "nametbl", "recs",
"sends", "unode", "uool", "yy", NULL };
#endif
static const char *header_suffix = HEADER_SUFFIX,
*header_file;
static const char *(import_directories[MAX_IMPORT_DIRECTORIES + 2 + 1]);
static const char *keep;
#define keep_none 0
#define keep_c_source 1
#define keep_object 2
#define keep_both 3
#define keep_all 4
static const char *keep_vals[] = { "none", "c_source", "object", "both",
"all", NULL };
static const char *out_dir;
static const char *saux_suffix = SAUX_SUFFIX,
*saux_file;
static const char *server;
#define server_none 0
#define server_stub 1
#define server_aux 2
#define server_all 3
static const char *server_vals[] = { "none", "stub", "aux", "all", NULL };
static const char *sstub_suffix = SSTUB_SUFFIX,
*sstub_file;
boolean CMD_DCL_interface = FALSE;
static const char *standard = "extended";
static int standard_opt;
static const char *standard_vals[] = {
"portable", "dce_v10", "dce_v11", "extended", NULL };
static const int standard_ivals[] = {
opt_standard_dce_1_0, opt_standard_dce_1_0,
opt_standard_dce_1_1, opt_standard_dce_1_1 };
#define FD(x) (FLAGDEST)&x
#define FDV(x) (FLAGDEST)x
static const
OPTIONS option_table[]={
{"bug", VINTARG(NUM_BUGS), FDV(do_bug)},
{"caux", STRARG, FD(caux_file)},
{"cc_cmd", STRARG, FD(cc_cmd)},
{"cc_opt", STRARG, FD(cc_opt)},
{"cepv", ASSERTARG, FD(cmd_opt[opt_cepv])},
{"client", STRARG, FD(client)},
{"confirm", ASSERTARG|HIDARG, FD(cmd_opt[opt_confirm])},
{"cpp_cmd", OSTRARG, FD(cpp_cmd)},
{"cpp_opt", STRARG, FD(cpp_opt)},
{"cstub", STRARG, FD(cstub_file)},
{"D", VSTRARG(MAX_DEF_STRINGS), FDV(def_strings)},
#ifdef DUMPERS
{"dump", VSTRARG(MAX_DUMP_STRINGS)|HIDARG,FDV(dump_strings)},
#endif
{"header", OSTRARG, FD(header_file)},
{"I", VSTRARG(MAX_IMPORT_DIRECTORIES),FDV(import_directories)},
{"keep", STRARG, FD(keep)},
{"midl", ASSERTARG|HIDARG, FD(cmd_opt[opt_midl])},
{"no_bug", VINTARG(NUM_BUGS), FDV(do_not_do_bug)},
{"no_cpp", DENYARG, FD(cmd_opt[opt_cpp])},
{"no_def_idir", DENYARG, FD(cmd_opt[opt_def_idir])},
{"no_header", DENYARG|HIDARG, FD(cmd_opt[opt_header])},
{"no_mepv", DENYARG, FD(cmd_opt[opt_mepv])},
{"no_warn", DENYARG, FD(cmd_opt[opt_warn])},
#ifdef DUMPERS
{"ool", ASSERTARG|HIDARG, FD(cmd_opt[opt_ool])},
#endif
{"out", STRARG, FD(out_dir)},
{"saux", STRARG, FD(saux_file)},
{"server", STRARG, FD(server)},
{"space_opt", ASSERTARG, FD(cmd_opt[opt_space_opt])},
{"sstub", STRARG, FD(sstub_file)},
{"standard", STRARG, FD(standard)},
{"stdin", ASSERTARG, FD(cmd_opt[opt_stdin])},
{"syntax_only", ASSERTARG, FD(cmd_opt[opt_syntax_check])},
{"U", VSTRARG(MAX_DEF_STRINGS), FDV(undef_strings)},
{"v", ASSERTARG|HIDARG, FD(cmd_opt[opt_verbose])},
{"version", ASSERTARG|HIDARG, FD(cmd_opt[opt_version])},
{0, 0, 0}
};
void CMD_explain_args(void)
{
message_print(NIDL_USAGE);
if (cmd_opt[opt_confirm])
printflags(option_table);
else
message_print(NIDL_CMDERR, "-confirm");
}
static int check_str_list
(
const char *opt,
const char *val,
const char **list
)
{
int i;
if (val[0] == '\0')
return -1;
for (i = 0 ; list[i] != NULL ; i++ )
if (strcmp(val, list[i]) == 0)
return i;
message_print(NIDL_INVOPTION, opt, val);
message_print(NIDL_LEGALVALS);
for ( ; *list != NULL ; list++ )
fprintf(stderr, " %s", *list);
fprintf(stderr, "\n");
exit(pgm_error);
}
static int check_str_int_list
(
const char *opt,
const char *val,
const char **list,
const int *ilist
)
{
int i;
if (val[0] == '\0')
return -1;
for (i = 0 ; list[i] != NULL ; i++ )
if (strcmp(val, list[i]) == 0)
return ilist[i];
message_print(NIDL_INVOPTION, opt, val);
message_print(NIDL_LEGALVALS);
for ( ; *list != NULL ; list++ )
fprintf(stderr, " %s", *list);
fprintf(stderr, "\n");
exit(pgm_error);
}
#ifdef DUMPERS
typedef enum {bit, string, string_list, int_list, number} opt_kind_t;
typedef struct
{
const char *opt_name;
opt_kind_t opt_kind;
} opt_struct;
static const opt_struct opt_info[NUM_OPTS] =
{
{ "caux", string },
{ "cc_cmd", string },
{ "cc_opt", string },
{ "cepv", bit },
{ "confirm", bit },
{ "cpp_cmd", string },
{ "cpp_def", string_list },
{ "cpp_opt", string },
{ "cpp_undef", string_list },
{ "cstub", string },
{ "def_idir", bit },
{ "do_bug", int_list },
{ "emit_cstub", bit },
{ "emit_sstub", bit },
{ "header", string },
{ "idir", string_list },
{ "keep_c", bit },
{ "keep_obj", bit },
{ "mepv", bit },
{ "out", string },
{ "saux", string },
{ "source", string },
{ "space_opt", bit },
{ "sstub", string },
{ "stdin", bit },
{ "syntax_only", bit },
{ "v", bit },
{ "version", bit },
{ "warn", bit },
{ "standard", number },
{ "midl", bit}
#ifdef DUMPERS
,
{ "dump_acf", bit },
{ "dump_ast", bit },
{ "dump_ast_after", bit },
{ "dump_cmd", bit },
{ "dump_debug", bit },
{ "dump_flat", bit },
{ "dump_mnode", bit },
{ "dump_mool", bit },
{ "dump_nametbl", bit },
{ "dump_recs", bit },
{ "dump_sends", bit },
{ "dump_unode", bit },
{ "dump_uool", bit },
{ "dump_yy", bit },
{ "ool", bit }
#endif
};
static void dump_cmd_data(void)
{
int i;
int j;
int tbl_size;
char **pstr;
int *pint;
printf("\n");
for (i = 0 ; i < NUM_OPTS ; i++)
{
printf("%-20s", opt_info[i].opt_name);
if (cmd_opt[i])
printf("true ");
else
printf("false ");
switch (opt_info[i].opt_kind)
{
case bit:
printf("\n");
break;
case string:
if (cmd_val[i] != NULL)
printf(" %s\n", (char*)cmd_val[i]);
else
printf(" \n");
break;
case string_list:
pstr = (char **)cmd_val[i];
if (pstr != NULL)
while (*pstr != NULL)
printf(" %s", *pstr++);
printf("\n");
break;
case int_list:
pint = (int *)cmd_val[i];
tbl_size = flags_option_count(option_table, opt_info[i].opt_name);
for (j = 0 ; j < tbl_size ; j++)
printf(" %d", *pint++);
printf("\n");
break;
case number:
pint = (int *)cmd_val[i];
printf(" %d\n", *pint++);
break;
default:
printf("**Error**: Unsupported opt_kind in dump_cmd_data.\n");
}
}
}
#endif
static char *alloc_and_copy
(
const char *orig_str
)
{
char *new_str;
if (orig_str == NULL || orig_str[0] == '\0')
orig_str = UNSPECIFIED;
new_str = NEW_VEC (char, strlen(orig_str) + 1);
strlcpy(new_str, orig_str, strlen(orig_str) + 1);
return new_str;
}
boolean add_def_string
(
const char *def_string
)
{
char **defs = (char**) cmd_val[opt_cpp_def];
char *def;
int len, i = 0;
len = 1;
def = defs[i];
while (i < MAX_DEF_STRINGS && (def != NULL && len > 0))
{
if (def != NULL)
{
if (!strcmp(def, def_string)) return true;
len = strlen(def);
}
def = defs[++i];
}
if (i < MAX_DEF_STRINGS)
{
defs[i] = alloc_and_copy(def_string);
return true;
}
return false;
}
static boolean get_src_filespec
(
char *src_filespec,
size_t src_filespec_len
)
{
int other_count;
other_count = flags_other_count();
if (other_count > 1)
{
int i;
CMD_explain_args();
message_print(NIDL_INVPARAMS);
for (i = 1; i < other_count ; i++)
fprintf(stderr, " %s", flags_other(i));
fprintf(stderr, "\n");
return FALSE;
}
if (other_count == 1)
{
if (cmd_opt[opt_stdin])
{
CMD_explain_args();
message_print(NIDL_INVPARAMS);
fprintf(stderr, " %s\n", flags_other(0));
return FALSE;
}
else
{
strlcpy(src_filespec, flags_other(0), src_filespec_len);
return TRUE;
}
}
if (cmd_opt[opt_stdin])
{
src_filespec[0] = '\0';
return TRUE;
}
if (last_string == NULL || last_string[0] == '\0')
{
if (cmd_opt[opt_version])
exit(pgm_ok);
CMD_explain_args();
message_print(NIDL_SRCFILEREQ);
#ifdef DUMPERS
if (cmd_opt[opt_dump_cmd])
dump_cmd_data();
#endif
return FALSE;
}
strlcpy(src_filespec, last_string, src_filespec_len);
last_string[0] = '\0';
return TRUE;
}
boolean CMD_parse_args
(
int argc,
char **argv,
boolean **p_cmd_opt,
void ***p_cmd_val,
STRTAB_str_t *p_idl_sid
)
{
FILE_k_t out_dir_kind;
int i, j;
STRTAB_str_t src_file_str;
char src_filespec[PATH_MAX];
char src_filename[PATH_MAX];
char l_cstub_file[PATH_MAX];
char l_sstub_file[PATH_MAX];
char l_header_file[PATH_MAX];
char l_caux_file[PATH_MAX];
char l_saux_file[PATH_MAX];
char filespec[PATH_MAX];
cmd_opt[opt_do_bug] = TRUE;
for (i = 0; i <= NUM_BUGS; i++)
support_bug[i] = FALSE;
support_bug[bug_array_no_ref_hole] = TRUE;
cmd_opt[opt_caux] = TRUE;
caux_file = "";
cmd_opt[opt_cc_cmd] = TRUE;
cc_cmd = CC_DEF_CMD;
cmd_opt[opt_cc_opt] = TRUE;
#if defined(__alpha) && defined(__osf__)
cc_opt = "-std1";
#else
cc_opt = "";
#endif
cmd_opt[opt_cepv] = FALSE;
cmd_opt[opt_emit_cstub] = TRUE;
client = client_vals[client_all];
cmd_opt[opt_confirm] = FALSE;
cpp_cmd = CPP;
cmd_opt[opt_cpp] = TRUE;
CMD_def_cpp_cmd = CPP;
cmd_opt[opt_cpp_opt] = TRUE;
cpp_opt = "";
cmd_opt[opt_cstub] = TRUE;
cstub_file = "";
cmd_opt[opt_header] = TRUE;
header_file = "";
cmd_opt[opt_keep_c] = FALSE;
cmd_opt[opt_keep_obj] = TRUE;
keep = keep_vals[keep_object];
cmd_opt[opt_idir] = TRUE;
cmd_opt[opt_def_idir] = TRUE;
cmd_opt[opt_mepv] = TRUE;
cmd_opt[opt_warn] = TRUE;
cmd_opt[opt_out] = FALSE;
out_dir = "";
cmd_opt[opt_saux] = TRUE;
saux_file = "";
cmd_opt[opt_emit_sstub] = TRUE;
server = server_vals[server_all];
cmd_opt[opt_source] = TRUE;
cmd_opt[opt_space_opt] = FALSE;
cmd_opt[opt_sstub] = TRUE;
sstub_file = "";
cmd_opt[opt_stdin] = FALSE;
cmd_opt[opt_syntax_check] = FALSE;
cmd_opt[opt_verbose] = FALSE;
cmd_opt[opt_version] = FALSE;
standard_opt = opt_standard_dce_1_1;
cmd_val[opt_standard] = (void*)&standard_opt;
cmd_opt[opt_midl] = FALSE;
#ifdef DUMPERS
cmd_opt[opt_dump_acf] = FALSE;
cmd_opt[opt_dump_ast] = FALSE;
cmd_opt[opt_dump_ast_after] = FALSE;
cmd_opt[opt_dump_cmd] = FALSE;
cmd_opt[opt_dump_debug] = FALSE;
cmd_opt[opt_dump_flat] = FALSE;
cmd_opt[opt_dump_mnode] = FALSE;
cmd_opt[opt_dump_mool] = FALSE;
cmd_opt[opt_dump_nametbl] = FALSE;
cmd_opt[opt_dump_recs] = FALSE;
cmd_opt[opt_dump_sends] = FALSE;
cmd_opt[opt_dump_unode] = FALSE;
cmd_opt[opt_dump_uool] = FALSE;
cmd_opt[opt_dump_yy] = FALSE;
cmd_opt[opt_ool] = FALSE;
#endif
cmd_val[opt_cpp_def] = (void *)def_strings;
cmd_val[opt_cpp_undef] = (void *)undef_strings;
cmd_val[opt_do_bug] = (void *)support_bug;
cmd_val[opt_idir] = (void *)import_directories;
*p_cmd_opt = cmd_opt;
*p_cmd_val = cmd_val;
if (argc == 0)
{
CMD_explain_args();
exit(pgm_error);
}
getflags(argc, argv, option_table);
if (cmd_opt[opt_version])
{
message_print(NIDL_VERSION, IDL_VERSION_TEXT);
}
for (i = flags_option_count(option_table, "bug") - 1; i >= 0; i--)
if ((do_bug[i] < 1) || (do_bug[i] > NUM_BUGS) ||
(do_bug[i] == bug_array_no_ref_hole))
{
message_print(NIDL_INVBUG, do_bug[i]);
exit(pgm_error);
}
for (i = flags_option_count(option_table, "no_bug") - 1; i >= 0; i--)
if ((do_not_do_bug[i] < 1) || (do_not_do_bug[i] > NUM_BUGS) ||
(do_not_do_bug[i] == bug_array_no_ref_hole))
{
message_print(NIDL_INVNOBUG, do_not_do_bug[i]);
exit(pgm_error);
}
for (i = flags_option_count(option_table, "bug") - 1; i >= 0; i--)
for (j = flags_option_count(option_table, "no_bug") - 1; j >= 0; j--)
if (do_bug[i] == do_not_do_bug[j])
{
message_print(NIDL_BUGNOBUG, do_bug[i], do_bug[i]);
exit(pgm_error);
}
for (i = flags_option_count(option_table, "bug") - 1; i >= 0; i--)
{
cmd_opt[opt_do_bug] = TRUE;
support_bug[do_bug[i]] = TRUE;
}
for (i = flags_option_count(option_table, "no_bug") - 1; i >= 0; i--)
support_bug[do_not_do_bug[i]] = FALSE;
i = check_str_list("client", client, client_vals);
switch (i)
{
case client_none:
cmd_opt[opt_emit_cstub] = FALSE;
cmd_opt[opt_caux] = FALSE;
break;
case client_stub:
cmd_opt[opt_emit_cstub] = TRUE;
cmd_opt[opt_caux] = FALSE;
break;
case client_aux:
cmd_opt[opt_emit_cstub] = FALSE;
cmd_opt[opt_caux] = TRUE;
break;
case client_all:
default:
cmd_opt[opt_emit_cstub] = TRUE;
cmd_opt[opt_caux] = TRUE;
}
#ifdef DUMPERS
for (j = 0; dump_strings[j] != NULL; j++)
{
i = check_str_list("dump", dump_strings[j], dump_vals);
switch (i)
{
case dump_acf:
cmd_opt[opt_dump_acf] = TRUE;
break;
case dump_ast:
cmd_opt[opt_dump_ast] = TRUE;
break;
case dump_ast_after:
cmd_opt[opt_dump_ast_after] = TRUE;
break;
case dump_cmd:
cmd_opt[opt_dump_cmd] = TRUE;
break;
case dump_debug:
cmd_opt[opt_dump_debug] = TRUE;
break;
case dump_flat:
cmd_opt[opt_dump_flat] = TRUE;
break;
case dump_mnode:
cmd_opt[opt_dump_mnode] = TRUE;
break;
case dump_mool:
cmd_opt[opt_dump_mool] = TRUE;
break;
case dump_nametbl:
cmd_opt[opt_dump_nametbl] = TRUE;
break;
case dump_recs:
cmd_opt[opt_dump_recs] = TRUE;
break;
case dump_sends:
cmd_opt[opt_dump_sends] = TRUE;
break;
case dump_unode:
cmd_opt[opt_dump_unode] = TRUE;
break;
case dump_uool:
cmd_opt[opt_dump_uool] = TRUE;
break;
case dump_yy:
{
extern int nidl_yydebug;
extern int acf_yydebug;
cmd_opt[opt_dump_yy] = TRUE;
nidl_yydebug = acf_yydebug = (int)TRUE;
break;
}
}
}
#endif
standard_opt = check_str_int_list("standard", standard,
standard_vals, standard_ivals);
if (standard_opt == -1) standard_opt = opt_standard_dce_1_1;
if (cmd_opt[opt_def_idir])
{
for (i = 0; import_directories[i] != NULL
&& import_directories[i][0] != '\0' ; i++)
;
import_directories[i+2] = NULL;
#ifdef NIDL_LIBRARY_EV
nidl_library = getenv(NIDL_LIBRARY_EV);
#endif
if (nidl_library == NULL)
nidl_library = DEFAULT_IDIR;
import_directories[i+1] = nidl_library;
for ( ; i > 0; i--)
import_directories[i] = import_directories[i-1];
import_directories[0] = CD_IDIR;
flags_incr_count(option_table, "I", 2);
}
if (!cmd_opt[opt_def_idir] &&
(import_directories[0] == NULL || import_directories[0][0] == '\0'))
{
import_directories[0] = CD_IDIR;
flags_incr_count(option_table, "I", 1);
}
i = check_str_list("keep", keep, keep_vals);
switch (i)
{
case keep_none:
cmd_opt[opt_keep_c] = FALSE;
cmd_opt[opt_keep_obj] = FALSE;
break;
case keep_c_source:
cmd_opt[opt_keep_c] = TRUE;
cmd_opt[opt_keep_obj] = FALSE;
break;
case keep_object:
default:
cmd_opt[opt_keep_c] = FALSE;
cmd_opt[opt_keep_obj] = TRUE;
break;
case keep_both:
case keep_all:
cmd_opt[opt_keep_c] = TRUE;
cmd_opt[opt_keep_obj] = TRUE;
break;
}
if (out_dir[0] != '\0')
cmd_opt[opt_out] = TRUE;
if (!get_src_filespec(src_filespec, sizeof (src_filespec)))
exit(pgm_error);
if (src_filespec[0] == '\0')
{
src_file_str = STRTAB_NULL_STR;
src_filename[0] = 'a';
src_filename[1] = '\0';
}
else
{
if (!FILE_parse(src_filespec, (char *)NULL, 0, src_filename, sizeof (src_filename), (char *)NULL, 0))
{
error(NIDL_UNKFLAG, src_filespec);
return FALSE;
}
src_file_str = STRTAB_add_string(src_filespec);
}
i = check_str_list("server", server, server_vals);
switch (i)
{
case server_none:
cmd_opt[opt_emit_sstub] = FALSE;
cmd_opt[opt_saux] = FALSE;
break;
case server_stub:
cmd_opt[opt_emit_sstub] = TRUE;
cmd_opt[opt_saux] = FALSE;
break;
case server_aux:
cmd_opt[opt_emit_sstub] = FALSE;
cmd_opt[opt_saux] = TRUE;
break;
case server_all:
default:
cmd_opt[opt_emit_sstub] = TRUE;
cmd_opt[opt_saux] = TRUE;
}
if (cmd_opt[opt_syntax_check])
{
cmd_opt[opt_out] = FALSE;
cmd_opt[opt_cstub] = FALSE;
cmd_opt[opt_sstub] = FALSE;
cmd_opt[opt_header] = FALSE;
cmd_opt[opt_caux] = FALSE;
cmd_opt[opt_saux] = FALSE;
}
if (cmd_opt[opt_out])
{
if (!FILE_kind(out_dir, &out_dir_kind))
error(NIDL_FILENOTFND, out_dir);
if (out_dir_kind != file_dir)
error(NIDL_FILENOTDIR, out_dir);
}
if (cmd_opt[opt_cstub])
{
sprintf(filespec, "%s%s", src_filename, cstub_suffix);
if (!FILE_form_filespec(cstub_file, out_dir, (char *)NULL, filespec,
l_cstub_file, sizeof(l_cstub_file)))
{
message_print(NIDL_INVFILESPEC, cstub_file);
return FALSE;
}
cstub_file = l_cstub_file;
}
if (cmd_opt[opt_sstub])
{
sprintf(filespec, "%s%s", src_filename, sstub_suffix);
if (!FILE_form_filespec(sstub_file, out_dir, (char *)NULL, filespec,
l_sstub_file, sizeof(l_sstub_file)))
{
message_print(NIDL_INVFILESPEC, sstub_file);
return FALSE;
}
sstub_file = l_sstub_file;
}
sprintf(filespec, "%s%s", src_filename, header_suffix);
if (!FILE_form_filespec(header_file, out_dir, (char *)NULL,
filespec, l_header_file, sizeof(l_header_file)))
{
message_print(NIDL_INVFILESPEC, header_file);
return FALSE;
}
header_file = l_header_file;
if (cmd_opt[opt_caux])
{
sprintf(filespec, "%s%s", src_filename, caux_suffix);
if (!FILE_form_filespec(caux_file, out_dir, (char *)NULL, filespec,
l_caux_file, sizeof(l_caux_file)))
{
message_print(NIDL_INVFILESPEC, caux_file);
return FALSE;
}
caux_file = l_caux_file;
}
if (cmd_opt[opt_saux])
{
sprintf(filespec, "%s%s", src_filename, saux_suffix);
if (!FILE_form_filespec(saux_file, out_dir, (char *)NULL, filespec,
l_saux_file, sizeof(l_saux_file)))
{
message_print(NIDL_INVFILESPEC, saux_file);
return FALSE;
}
saux_file = l_saux_file;
}
cmd_val[opt_caux] = (void *)alloc_and_copy(caux_file);
cmd_val[opt_cc_cmd] = (void *)cc_cmd;
cmd_val[opt_cc_opt] = (void *)cc_opt;
cmd_val[opt_cpp] = (void *)cpp_cmd;
cmd_val[opt_cpp_opt] = (void *)cpp_opt;
cmd_val[opt_cstub] = (void *)alloc_and_copy(cstub_file);
cmd_val[opt_header] = (void *)alloc_and_copy(header_file);
cmd_val[opt_out] = (void *)out_dir;
cmd_val[opt_saux] = (void *)alloc_and_copy(saux_file);
cmd_val[opt_source] = (void *)src_filespec;
cmd_val[opt_sstub] = (void *)alloc_and_copy(sstub_file);
#ifdef DUMPERS
if (cmd_opt[opt_dump_cmd])
dump_cmd_data();
#endif
if (cmd_opt[opt_confirm])
{
printflags(option_table);
if (!cmd_opt[opt_verbose])
exit(pgm_ok);
}
ERR_no_warnings = !cmd_opt[opt_warn];
*p_idl_sid = src_file_str;
return(TRUE);
}