mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
Formatting changes.
This commit is contained in:
25
src/files.c
25
src/files.c
@@ -50,8 +50,8 @@ static char *short_base_name = NULL;
|
|||||||
const char *src_extension = NULL;
|
const char *src_extension = NULL;
|
||||||
/* Header file extension (if option ``-d'' is specified). */
|
/* Header file extension (if option ``-d'' is specified). */
|
||||||
const char *header_extension = NULL;
|
const char *header_extension = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------.
|
/*--------------------------.
|
||||||
| Is SUFFIX ending STRING? |
|
| Is SUFFIX ending STRING? |
|
||||||
`--------------------------*/
|
`--------------------------*/
|
||||||
@@ -160,8 +160,8 @@ skeleton_find (const char *envvar, const char *skeleton_name)
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------.
|
/*----------------------------------------------------------------.
|
||||||
| Compute BASE_NAME, SHORT_BASE_NAME and output files extensions. |
|
| Compute BASE_NAME, SHORT_BASE_NAME and output files extensions. |
|
||||||
`----------------------------------------------------------------*/
|
`----------------------------------------------------------------*/
|
||||||
@@ -264,10 +264,11 @@ compute_base_names (void)
|
|||||||
base_length = strlen (spec_outfile);
|
base_length = strlen (spec_outfile);
|
||||||
|
|
||||||
ext_index = get_extension_index (spec_outfile);
|
ext_index = get_extension_index (spec_outfile);
|
||||||
/* if the initial segment of extension contains 'c' or a 'C', I assume
|
/* If the initial segment of extension contains 'c' or a 'C', I assume
|
||||||
that it is a C or C++ source file */
|
that it is a C or C++ source file. */
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
ext_index = (strspn (spec_outfile + ext_index + 1, "cC")) ? ext_index : 0;
|
ext_index =
|
||||||
|
(strspn (spec_outfile + ext_index + 1, "cC")) ? ext_index : 0;
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
{
|
{
|
||||||
base_length -= strlen (spec_outfile + ext_index);
|
base_length -= strlen (spec_outfile + ext_index);
|
||||||
@@ -300,8 +301,8 @@ compute_base_names (void)
|
|||||||
|
|
||||||
/* Computes the extensions from the garmmar file name. */
|
/* Computes the extensions from the garmmar file name. */
|
||||||
ext_index = get_extension_index (infile);
|
ext_index = get_extension_index (infile);
|
||||||
/* if the initial segment of extension contains a 'y' or a 'Y', I assume
|
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
|
||||||
that it is a yacc or bison grammar file */
|
that it is a yacc or bison grammar file. */
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
ext_index = (strspn (infile + ext_index + 1, "yY")) ? ext_index : 0;
|
ext_index = (strspn (infile + ext_index + 1, "yY")) ? ext_index : 0;
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
@@ -323,8 +324,8 @@ compute_base_names (void)
|
|||||||
base_length = strlen (name_base);
|
base_length = strlen (name_base);
|
||||||
|
|
||||||
ext_index = get_extension_index (name_base);
|
ext_index = get_extension_index (name_base);
|
||||||
/* if the initial segment of extension contains a 'y' or a 'Y', I assume
|
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
|
||||||
that it is a yacc or bison grammar file */
|
that it is a yacc or bison grammar file. */
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
ext_index = (strspn (name_base + ext_index + 1, "yY")) ? ext_index : 0;
|
ext_index = (strspn (name_base + ext_index + 1, "yY")) ? ext_index : 0;
|
||||||
if (ext_index)
|
if (ext_index)
|
||||||
@@ -396,7 +397,8 @@ output_files (void)
|
|||||||
|
|
||||||
/* Output the header file if wanted. */
|
/* Output the header file if wanted. */
|
||||||
if (defines_flag)
|
if (defines_flag)
|
||||||
obstack_save (&defines_obstack, stringappend (base_name, header_extension));
|
obstack_save (&defines_obstack,
|
||||||
|
stringappend (base_name, header_extension));
|
||||||
|
|
||||||
/* If we output only the table, dump the actions in ACTFILE. */
|
/* If we output only the table, dump the actions in ACTFILE. */
|
||||||
if (no_parser_flag)
|
if (no_parser_flag)
|
||||||
@@ -419,7 +421,8 @@ output_files (void)
|
|||||||
if (verbose_flag)
|
if (verbose_flag)
|
||||||
/* We used to use just .out if spec_name_prefix (-p) was used, but
|
/* We used to use just .out if spec_name_prefix (-p) was used, but
|
||||||
that conflicts with Posix. */
|
that conflicts with Posix. */
|
||||||
obstack_save (&output_obstack, stringappend (short_base_name, EXT_OUTPUT));
|
obstack_save (&output_obstack,
|
||||||
|
stringappend (short_base_name, EXT_OUTPUT));
|
||||||
|
|
||||||
if (graph_flag)
|
if (graph_flag)
|
||||||
obstack_save (&graph_obstack, stringappend (short_base_name, ".vcg"));
|
obstack_save (&graph_obstack, stringappend (short_base_name, ".vcg"));
|
||||||
|
|||||||
Reference in New Issue
Block a user