texlive[61759] Build/source/texk/web2c: ptex: fix a mistake in r61692

commits+hironobu at tug.org commits+hironobu at tug.org
Thu Jan 27 14:22:18 CET 2022


Revision: 61759
          http://tug.org/svn/texlive?view=revision&revision=61759
Author:   hironobu
Date:     2022-01-27 14:22:18 +0100 (Thu, 27 Jan 2022)
Log Message:
-----------
ptex: fix a mistake in r61692

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=61692

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/lib/texmfmp.c
    trunk/Build/source/texk/web2c/ptexdir/ChangeLog
    trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch

Modified: trunk/Build/source/texk/web2c/lib/texmfmp.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/texmfmp.c	2022-01-27 12:29:39 UTC (rev 61758)
+++ trunk/Build/source/texk/web2c/lib/texmfmp.c	2022-01-27 13:22:18 UTC (rev 61759)
@@ -597,12 +597,12 @@
   char *safecmd = NULL;
   char *cmdname = NULL;
 #if IS_pTeX && !defined(WIN32)
-  char *cmd2;
+  char *cmd2 = NULL;
 #endif
   int status = 0;
 #if IS_pTeX && !defined(WIN32)
   cmd2 = (char *)ptenc_from_internal_enc_string_to_utf8((unsigned char *)cmd);
-  if (!cmd2) cmd2=cmd;
+  if (!cmd2) cmd2=(char *)cmd;
 #endif
 
   if (shellenabledp <= 0) {
@@ -640,7 +640,7 @@
 
   /* Not really meaningful, but we have to manage the return value of system. */
   if (status != 0)
-    fprintf(stderr,"system returned with code %d\n", status); 
+    fprintf(stderr,"system returned with code %d\n", status);
 
 #if IS_pTeX && !defined(WIN32)
   if (cmd!=cmd2) free(cmd2);

Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2022-01-27 12:29:39 UTC (rev 61758)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2022-01-27 13:22:18 UTC (rev 61759)
@@ -1,3 +1,7 @@
+2022-01-27  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* ptex-base.ch: Fix a mistake and avoid compiler warnings.
+
 2022-01-22  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* ptex-base.ch: Change type of str_pool to unsigned short.

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2022-01-27 12:29:39 UTC (rev 61758)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2022-01-27 13:22:18 UTC (rev 61759)
@@ -2123,7 +2123,7 @@
       buffer[k+start-first]:=buffer[k];
 @y
   if start<limit then for k:=start to limit-1 do
-    if buffer2[k]>=@"100 then print_char(buffer[k]) else print(buffer[k]);
+    if buffer2[k]>0 then print_char(buffer[k]) else print(buffer[k]);
   first:=limit; prompt_input("=>"); {wait for user response}
 @.=>@>
   if last>first then
@@ -2854,18 +2854,6 @@
 @y
 @z
 
- at x
- at d append_to_name(#)==begin c:=#; if not (c="""") then begin incr(k);
-  if k<=file_name_size then name_of_file[k]:=xchr[c];
-  end end
- at y
- at d append_to_name(#)==begin if (#)>=@"100 then c:=(#)-@"100 else c:=#;
-  { Since the type of |c| is |ASCII_code|, above if-statement might not be needed }
-  if not (c="""") then begin incr(k);
-  if k<=file_name_size then name_of_file[k]:=xchr[c];
-  end end
- at z
-
 @x [29.526] l.10668 - pTeX: scan file name
 loop at +begin if (cur_cmd>other_char)or(cur_chr>255) then {not a character}
     begin back_input; goto done;



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