57 |
/* Prefix used to generate output file names. */ |
/* Prefix used to generate output file names. */ |
58 |
char *short_base_name = NULL; |
char *short_base_name = NULL; |
59 |
|
|
|
/* Infix used to generate output file names (i.e., `.tab', or `_tab', |
|
|
or `'). */ |
|
|
char *output_infix = NULL; |
|
|
|
|
60 |
/* C source file extension (the parser source). */ |
/* C source file extension (the parser source). */ |
61 |
const char *src_extension = NULL; |
const char *src_extension = NULL; |
62 |
/* Header file extension (if option ``-d'' is specified). */ |
/* Header file extension (if option ``-d'' is specified). */ |
254 |
(strlen (spec_outfile) |
(strlen (spec_outfile) |
255 |
- (tab ? strlen (tab) : (ext ? strlen (ext) : 0)))); |
- (tab ? strlen (tab) : (ext ? strlen (ext) : 0)))); |
256 |
|
|
|
if (tab) |
|
|
output_infix = xstrndup (tab, |
|
|
(strlen (tab) - (ext ? strlen (ext) : 0))); |
|
|
|
|
257 |
if (ext) |
if (ext) |
258 |
compute_exts_from_src (ext); |
compute_exts_from_src (ext); |
259 |
} |
} |
285 |
(strlen (base) - (ext ? strlen (ext) : 0))); |
(strlen (base) - (ext ? strlen (ext) : 0))); |
286 |
} |
} |
287 |
|
|
|
/* In these cases, always append `.tab'. */ |
|
|
output_infix = xstrdup (EXT_TAB); |
|
|
|
|
288 |
full_base_name = XMALLOC (char, |
full_base_name = XMALLOC (char, |
289 |
strlen (short_base_name) |
strlen (short_base_name) |
290 |
+ strlen (EXT_TAB) + 1); |
+ strlen (EXT_TAB) + 1); |