texlive[67965] Build/source/texk/web2c/hitexdir: HINT using full file

commits+mruckert at tug.org commits+mruckert at tug.org
Fri Aug 18 13:23:02 CEST 2023


Revision: 67965
          http://tug.org/svn/texlive?view=revision&revision=67965
Author:   mruckert
Date:     2023-08-18 13:23:02 +0200 (Fri, 18 Aug 2023)
Log Message:
-----------
HINT using full file names in the log files

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
    trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
    trunk/Build/source/texk/web2c/hitexdir/hiformat.w
    trunk/Build/source/texk/web2c/hitexdir/hitex.w

Modified: trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/web2c/hitexdir/hiformat.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiformat.w	2023-08-17 23:42:56 UTC (rev 67964)
+++ trunk/Build/source/texk/web2c/hitexdir/hiformat.w	2023-08-18 11:23:02 UTC (rev 67965)
@@ -156,7 +156,7 @@
 First printing: August 2019\par
 Second edition: August 2021\par
 \medskip
-\def\lastrevision{Date: Fri Aug 11 14:56:12 2023}
+\def\lastrevision{Date: Thu Aug 17 10:55:37 2023}
 \lastrevision\par
 }
 }

Modified: trunk/Build/source/texk/web2c/hitexdir/hitex.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hitex.w	2023-08-17 23:42:56 UTC (rev 67964)
+++ trunk/Build/source/texk/web2c/hitexdir/hitex.w	2023-08-18 11:23:02 UTC (rev 67965)
@@ -7512,7 +7512,8 @@
 if (first==buf_size) overflow("buffer size", buf_size);
 @:TeX capacity exceeded buffer size}{\quad buffer size@>
 incr(in_open);push_input;index=in_open;@/
-source_filename_stack[index]=0; /* \TeX\ Live */
+source_filename_stack[index]=NULL; /* \TeX\ Live */
+full_source_filename_stack[index]=NULL; /* \TeX\ Live */
 eof_seen[index]=false;
 grp_stack[index]=cur_boundary;if_stack[index]=cond_ptr;
 line_stack[index]=line;start=first;state=mid_line;
@@ -10995,15 +10996,22 @@
   prompt_file_name("input file name",".tex");
   }
 done: name=a_make_name_string(&cur_file);@/
-source_filename_stack[in_open]=name; /* \TeX\ Live*/
+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*/
+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);
 if (job_name==0)
   {@+if (c_job_name==NULL) job_name=cur_name;
      else job_name=s_no(c_job_name); open_log_file(); /* \TeX\ Live*/
   }  /*|open_log_file| doesn't |show_context|, so |limit|
     and |loc| needn't be set to meaningful values yet*/
-if (term_offset+length(name) > max_print_line-2) print_ln();
+if (term_offset+strlen(full_source_filename_stack[in_open]) > max_print_line-2)
+  print_ln();
 else if ((term_offset > 0)||(file_offset > 0)) print_char(' ');
-print_char('(');incr(open_parens);slow_print(name);update_terminal;
+print_char('(');incr(open_parens);
+print(full_source_filename_stack[in_open]);update_terminal;
 if (tracing_stack_levels > 0)
 {@+int v;
   begin_diagnostic();print_ln();
@@ -34927,10 +34935,11 @@
 
 @ We need a stack, matching the |line_stack| that
 contains the source file names;
-we postpone \TeX\ Live's |full_source_filename_stack| to a later time.
 
 @<Global...@>=
-static int @!source_filename_stack0[max_in_open], *const @!source_filename_stack = @!source_filename_stack0-1;
+static char * @!source_filename_stack0[max_in_open]={NULL}, **const @!source_filename_stack = @!source_filename_stack0-1;
+static char * @!full_source_filename_stack0[max_in_open]={NULL}, **const @!full_source_filename_stack = @!full_source_filename_stack0-1;
+static char *full_name_of_file=NULL;
 
 @ The function |print_file_line|
 prints ``file:line:error'' style messages using
@@ -34940,10 +34949,10 @@
 @<Basic printing...@>=
 static void print_file_line(void)
 {@+int level=in_open;
-  while (level>0 && source_filename_stack[level]==0) level--;
+  while (level>0 && full_source_filename_stack[level]==NULL) level--;
   if (level==0) print_nl("! ");
   else
-  { print_nl(""); printn(source_filename_stack[level]); print_char(':');
+  { print_nl(""); print(full_source_filename_stack[level]); print_char(':');
     if (level==in_open) print_int(line);
     else print_int(line_stack[level]);
     print(": ");
@@ -35171,7 +35180,8 @@
   {@+
     f= fopen(fname,rwb);
     if (f!=NULL) recorder_record_input(fname);
-    free(fname);@+
+    if (full_name_of_file!=NULL) free(full_name_of_file);
+    full_name_of_file=fname;@+
   }
   return f;
 }



More information about the tex-live-commits mailing list.