projects
/
bison.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: remove quote magic from the bison test wrapper.
[bison.git]
/
src
/
files.c
diff --git
a/src/files.c
b/src/files.c
index 208634cd2ddbafd76099d57f723481b51b691aac..550e42ed49411c89250a4a766340c54afa643a05 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-142,7
+142,7
@@
xfclose (FILE *ptr)
static void
compute_exts_from_gf (const char *ext)
{
static void
compute_exts_from_gf (const char *ext)
{
- if (
strcmp (ext, ".y") == 0
)
+ if (
STREQ (ext, ".y")
)
{
src_extension = xstrdup (language->src_extension);
header_extension = xstrdup (language->header_extension);
{
src_extension = xstrdup (language->src_extension);
header_extension = xstrdup (language->header_extension);
@@
-215,10
+215,9
@@
file_name_split (const char *file_name,
if (*ext)
{
size_t baselen = *ext - *base;
if (*ext)
{
size_t baselen = *ext - *base;
- size_t dottablen =
4
;
+ size_t dottablen =
sizeof (TAB_EXT) - 1
;
if (dottablen < baselen
if (dottablen < baselen
- && (strncmp (*ext - dottablen, ".tab", dottablen) == 0
- || strncmp (*ext - dottablen, "_tab", dottablen) == 0))
+ && STRPREFIX_LIT (TAB_EXT, *ext - dottablen))
*tab = *ext - dottablen;
}
}
*tab = *ext - dottablen;
}
}
@@
-347,7
+346,7
@@
void
output_file_name_check (char **file_name)
{
bool conflict = false;
output_file_name_check (char **file_name)
{
bool conflict = false;
- if (
0 == strcmp
(*file_name, grammar_file))
+ if (
STREQ
(*file_name, grammar_file))
{
complain (_("refusing to overwrite the input file %s"),
quote (*file_name));
{
complain (_("refusing to overwrite the input file %s"),
quote (*file_name));
@@
-357,7
+356,7
@@
output_file_name_check (char **file_name)
{
int i;
for (i = 0; i < file_names_count; i++)
{
int i;
for (i = 0; i < file_names_count; i++)
- if (
0 == strcmp
(file_names[i], *file_name))
+ if (
STREQ
(file_names[i], *file_name))
{
warn (_("conflicting outputs to file %s"),
quote (*file_name));
{
warn (_("conflicting outputs to file %s"),
quote (*file_name));