X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5e5d541531bda9507136d3c578315a2882d67412..616429b50868bf9225d55143526442a024e32969:/src/files.c diff --git a/src/files.c b/src/files.c index a27a2772..22f29c1e 100644 --- a/src/files.c +++ b/src/files.c @@ -192,6 +192,7 @@ skeleton_find (const char *envvar, const char *skeleton_name) const char *res = getenv (envvar); #if defined (MSDOS) || defined (_WIN32) + const char *cp = getenv ("INIT"); if (!res) { /* Skeleton file name without path */ @@ -204,7 +205,6 @@ skeleton_find (const char *envvar, const char *skeleton_name) ++skel_name; /* File doesn't exist in current directory; try in INIT directory. */ - const char *cp = getenv ("INIT"); if (cp) { res = XMALLOC (char, strlen (cp) + strlen (skel_name) + 2); @@ -417,15 +417,15 @@ compute_output_file_names (void) { compute_base_names (); - parser_file_name = - spec_outfile ? spec_outfile : stringappend (full_base_name, src_extension); - /* If not yet done. */ if (!src_extension) src_extension = ".c"; if (!header_extension) header_extension = ".h"; + parser_file_name = + spec_outfile ? spec_outfile : stringappend (full_base_name, src_extension); + /* It the defines filename if not given, we create it. */ if (!spec_defines_file) spec_defines_file = stringappend (full_base_name, header_extension);