diff options
author | Joel E. Denny <joeldenny@joeldenny.org> | 2011-07-24 17:50:37 -0400 |
---|---|---|
committer | Joel E. Denny <joeldenny@joeldenny.org> | 2011-07-24 18:13:05 -0400 |
commit | e9690142325711b320ef444768fdd40a087d02f7 (patch) | |
tree | 28c5cb5ed1b642dcae974e6ab3f927ab2157932a /src/files.c | |
parent | c12aa01f82a03db044985513a878497e5ab58377 (diff) | |
download | bison-e9690142325711b320ef444768fdd40a087d02f7.tar.gz |
global: remove unnecessary horizontal tabs.
This change was made by applying emacs' untabify function to
nearly all files in Bison's repository. Required tabs in make
files, ChangeLog, regexps, and test code were manually skipped.
Other notable exceptions and changes are listed below.
* bootstrap: Skip because we sync this with gnulib.
* data/m4sugar/foreach.m4
* data/m4sugar/m4sugar.m4: Skip because we sync these with
Autoconf.
* djgpp: Skip because I don't know how to test djgpp properly, and
this code appears to be unmaintained anyway.
* README-hacking (Hacking): Specify that tabs should be avoided
where not required.
Diffstat (limited to 'src/files.c')
-rw-r--r-- | src/files.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/files.c b/src/files.c index c94d2c6f..4693b754 100644 --- a/src/files.c +++ b/src/files.c @@ -200,7 +200,7 @@ compute_exts_from_src (const char *ext) static void file_name_split (const char *file_name, - const char **base, const char **tab, const char **ext) + const char **base, const char **tab, const char **ext) { *base = last_component (file_name); @@ -215,9 +215,9 @@ file_name_split (const char *file_name, size_t baselen = *ext - *base; size_t dottablen = 4; if (dottablen < baselen - && (strncmp (*ext - dottablen, ".tab", dottablen) == 0 - || strncmp (*ext - dottablen, "_tab", dottablen) == 0)) - *tab = *ext - dottablen; + && (strncmp (*ext - dottablen, ".tab", dottablen) == 0 + || strncmp (*ext - dottablen, "_tab", dottablen) == 0)) + *tab = *ext - dottablen; } } @@ -239,44 +239,44 @@ compute_file_name_parts (void) /* ALL_BUT_EXT goes up the EXT, excluding it. */ all_but_ext = - xstrndup (spec_outfile, - (strlen (spec_outfile) - (ext ? strlen (ext) : 0))); + xstrndup (spec_outfile, + (strlen (spec_outfile) - (ext ? strlen (ext) : 0))); /* ALL_BUT_TAB_EXT goes up to TAB, excluding it. */ all_but_tab_ext = - xstrndup (spec_outfile, - (strlen (spec_outfile) - - (tab ? strlen (tab) : (ext ? strlen (ext) : 0)))); + xstrndup (spec_outfile, + (strlen (spec_outfile) + - (tab ? strlen (tab) : (ext ? strlen (ext) : 0)))); if (ext) - compute_exts_from_src (ext); + compute_exts_from_src (ext); } else { file_name_split (grammar_file, &base, &tab, &ext); if (spec_file_prefix) - { - /* If --file-prefix=foo was specified, ALL_BUT_TAB_EXT = `foo'. */ - dir_prefix = + { + /* If --file-prefix=foo was specified, ALL_BUT_TAB_EXT = `foo'. */ + dir_prefix = xstrndup (spec_file_prefix, last_component (spec_file_prefix) - spec_file_prefix); - all_but_tab_ext = xstrdup (spec_file_prefix); - } + all_but_tab_ext = xstrdup (spec_file_prefix); + } else if (yacc_flag) - { - /* If --yacc, then the output is `y.tab.c'. */ - dir_prefix = xstrdup (""); - all_but_tab_ext = xstrdup ("y"); - } + { + /* If --yacc, then the output is `y.tab.c'. */ + dir_prefix = xstrdup (""); + all_but_tab_ext = xstrdup ("y"); + } else - { - /* Otherwise, ALL_BUT_TAB_EXT is computed from the input - grammar: `foo/bar.yy' => `bar'. */ - dir_prefix = xstrdup (""); - all_but_tab_ext = - xstrndup (base, (strlen (base) - (ext ? strlen (ext) : 0))); - } + { + /* Otherwise, ALL_BUT_TAB_EXT is computed from the input + grammar: `foo/bar.yy' => `bar'. */ + dir_prefix = xstrdup (""); + all_but_tab_ext = + xstrndup (base, (strlen (base) - (ext ? strlen (ext) : 0))); + } if (language->add_tab) all_but_ext = concat2 (all_but_tab_ext, TAB_EXT); @@ -285,7 +285,7 @@ compute_file_name_parts (void) /* Compute the extensions from the grammar file name. */ if (ext && !yacc_flag) - compute_exts_from_gf (ext); + compute_exts_from_gf (ext); } } @@ -312,20 +312,20 @@ compute_output_file_names (void) if (defines_flag) { if (! spec_defines_file) - spec_defines_file = concat2 (all_but_ext, header_extension); + spec_defines_file = concat2 (all_but_ext, header_extension); } if (graph_flag) { if (! spec_graph_file) - spec_graph_file = concat2 (all_but_tab_ext, ".dot"); + spec_graph_file = concat2 (all_but_tab_ext, ".dot"); output_file_name_check (&spec_graph_file); } if (xml_flag) { if (! spec_xml_file) - spec_xml_file = concat2 (all_but_tab_ext, ".xml"); + spec_xml_file = concat2 (all_but_tab_ext, ".xml"); output_file_name_check (&spec_xml_file); } |