From 08c4ca1e8892a20fe4810f0bb3cbf1918d202aeb Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Thu, 27 Jan 2022 13:22:18 +0000 Subject: ptex: fix a mistake in r61692 git-svn-id: svn://tug.org/texlive/trunk@61759 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/lib/texmfmp.c | 6 +++--- Build/source/texk/web2c/ptexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/ptexdir/ptex-base.ch | 14 +------------- 3 files changed, 8 insertions(+), 16 deletions(-) (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index e4f2a2b5e5f..a50b9b5ac2f 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -597,12 +597,12 @@ runsystem (const char *cmd) 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 @@ runsystem (const char *cmd) /* 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); diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index ce2506f302e..4caf6979306 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,7 @@ +2022-01-27 Hironori Kitagawa + + * ptex-base.ch: Fix a mistake and avoid compiler warnings. + 2022-01-22 Hironori Kitagawa * ptex-base.ch: Change type of str_pool to unsigned short. diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index 15a76eaeca6..a771451154e 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -2123,7 +2123,7 @@ else begin {we are done with this token list} buffer[k+start-first]:=buffer[k]; @y if start=@"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 @@ if #<>0 then @y @z -@x -@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 -@y -@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 -@z - @x [29.526] l.10668 - pTeX: scan file name loop@+begin if (cur_cmd>other_char)or(cur_chr>255) then {not a character} begin back_input; goto done; -- cgit v1.2.3