summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/hitexdir/hitex.w
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/hitexdir/hitex.w')
-rw-r--r--Build/source/texk/web2c/hitexdir/hitex.w34
1 files changed, 24 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w
index 80948013c23..f0401d2c4c6 100644
--- a/Build/source/texk/web2c/hitexdir/hitex.w
+++ b/Build/source/texk/web2c/hitexdir/hitex.w
@@ -10998,7 +10998,7 @@ loop@+{@+begin_file_reading(); /*set up |cur_file| and new level of input*/
done: name=a_make_name_string(&cur_file);@/
if (source_filename_stack[in_open]==NULL)
free(source_filename_stack[in_open]);
-source_filename_stack[in_open]=strdup(name_of_file+1); /*\TeX\ Live*/
+source_filename_stack[in_open]=strdup((char *)name_of_file+1); /*\TeX\ Live*/
if (full_source_filename_stack[in_open]==NULL)
free(full_source_filename_stack[in_open]);
full_source_filename_stack[in_open]=strdup(full_name_of_file);
@@ -25715,8 +25715,8 @@ primitive("setlanguage", extension, set_language_code);@/
primitive("HINTversion", last_item, HINT_version_code);
@!@:HINT\_version\_}{\.{\\HINTversion} primitive@>
-primitive("HINTsubversion", last_item, HINT_subversion_code);
-@!@:HINT\_subversion\_}{\.{\\HINTsubversion} primitive@>
+primitive("HINTminorversion", last_item, HINT_minor_version_code);
+@!@:HINT\_minor\_version\_}{\.{\\HINTminorversion} primitive@>
primitive("HINTdest", extension, label_node);@/
@!@:HINTdest\_}{\.{\\HINTdest} primitive@>
@@ -30447,21 +30447,21 @@ implement the various features that have been used above to replace
the new engine returns a version number as an integer
extending the cases for |last_item|. Since the additional
primitives that we define are specific to the \HINT\ format,
-we return version and subversion of the \HINT\ file
+we return major and minor version of the \HINT\ file
format that this program will generate.
@d HINT_version_code (eTeX_last_last_item_cmd_mod+7) /* \.{\\HINTversion} */
-@d HINT_subversion_code (eTeX_last_last_item_cmd_mod+8) /* \.{\\HINTsubversion} */
+@d HINT_minor_version_code (eTeX_last_last_item_cmd_mod+8) /* \.{\\HINTminorversion} */
@ Now this new primitive needs its implementation.
@<Cases of |last_item| for |print_cmd_chr|@>=
case HINT_version_code: print_esc("HINTversion");@+break;
-case HINT_subversion_code: print_esc("HINTsubversion");@+break;
+case HINT_minor_version_code: print_esc("HINTminorversion");@+break;
@ @<Cases for fetching a \Prote\ int value@>=
case HINT_version_code: cur_val=HINT_VERSION;@+break;
-case HINT_subversion_code: cur_val=HINT_SUB_VERSION;@+break;
+case HINT_minor_version_code: cur_val=HINT_MINOR_VERSION;@+break;
@ The implementation reuses code that has been written as part of
@@ -34434,8 +34434,9 @@ static void parse_options (int argc, char *argv[])
{ fprintf(stderr,"Try '%s --help' for more information\n",argv[0]);
exit(1);
}
- else if (g == -1) return;
+ else if (g == -1) break;
}
+ @<Check the environment for extra settings@>@;
}
@ @<Forward declarations@>=
@@ -34565,6 +34566,19 @@ static char *normalize_quotes (const char *nom, const char *mesg)
return ret;
}
+@ If the output directory was specified on the command line,
+we save it in an environment variable so that subbrocesses can
+get the value. If on the other hand the environment specifies
+a directory and the command line does not, save the value from
+the environment to the global variable so that it is used in the
+rest of the code.
+
+@<Check the environment for extra settings@>=
+if (output_directory)
+ xputenv ("TEXMF_OUTPUT_DIRECTORY", output_directory);
+else if (getenv ("TEXMF_OUTPUT_DIRECTORY"))
+ output_directory = getenv ("TEXMF_OUTPUT_DIRECTORY");
+
@*1 Passing a file name as a general text argument.
|scan_file_name| uses the following code to parse a file name given
@@ -35344,7 +35358,7 @@ make_time_str(time_t t, bool utc)
lt = *localtime(&t);
}
size = strftime(time_str, TIME_STR_SIZE, "D:%Y%m%d%H%M%S", &lt);
- /* expected format: |"YYYYmmddHHMMSS"| */
+ /* expected format: |"D:YYYYmmddHHMMSS"| */
if (size == 0) {
/* unexpected, contents of |time_str| is undefined */
time_str[0] = '\0';
@@ -35377,7 +35391,7 @@ make_time_str(time_t t, bool utc)
} else {
off_hours = off / 60;
off_mins = abs(off - off_hours * 60);
- snprintf(&time_str[size], 9, "%+03d'%02d'", off_hours, off_mins);
+ snprintf(&time_str[size], TIME_STR_SIZE-size, "%+03d'%02d'", off_hours, off_mins);
}
}