summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-05 08:50:28 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-05 08:50:28 +0000
commitedc562bfa3e97201709f690ae5c738b150dc365c (patch)
treef503ef4c651ce308e73c294ba085da48f155d66f /Build/source/texk/web2c/ptexdir
parentfd915ec757813cf18b6929c70136a63965d31327 (diff)
build: Avoid various (gcc-4.x) compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@25567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/ptexdir/pbibtex.ch4
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch8
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch16
4 files changed, 20 insertions, 14 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index dbf239c0316..734a649903d 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * pbibtex.ch, ppltotf.ch: Use ustringcast(buffer).
+ * ptex-base.ch: Use ustringcast for buffer and str_pool.
+
2012-01-22 Peter Breitenlohner <peb@mppmu.mpg.de>
* ptftopl.ch: Adapt to missing space added in ../tftopl.ch.
diff --git a/Build/source/texk/web2c/ptexdir/pbibtex.ch b/Build/source/texk/web2c/ptexdir/pbibtex.ch
index 7cfad468a70..5a6adc4112a 100644
--- a/Build/source/texk/web2c/ptexdir/pbibtex.ch
+++ b/Build/source/texk/web2c/ptexdir/pbibtex.ch
@@ -201,11 +201,11 @@ var i:c_int_type;
end;
vgetc (f); {skip the eol}
@y
- last := input_line2(f,stringcast(buffer),last,buf_size,address_of(i));
+ last := input_line2(f,ustringcast(buffer),last,buf_size,address_of(i));
while (not eof(f)) and (last > 0) and (i <> 10) and (i <> 13) do
begin
buffer_overflow;
- last := input_line2(f,stringcast(buffer),last,buf_size,address_of(i));
+ last := input_line2(f,ustringcast(buffer),last,buf_size,address_of(i));
end;
@z
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index da930c7ad22..d7d68421a85 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -65,7 +65,7 @@ else begin while (limit<buf_size-2)and(not eoln(pl_file)) do
begin incr(limit); read(pl_file,buffer[limit]);
end;
@y
-else begin limit:=input_line2(pl_file,stringcast(buffer),limit+1,buf_size-1)-1;
+else begin limit:=input_line2(pl_file,ustringcast(buffer),limit+1,buf_size-1)-1;
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -653,7 +653,7 @@ The |jis_to_index| is called from |chars_in_type| command.
function get_next_raw:byte; {get next rawdata in buffer}
begin while loc=limit do fill_buffer;
incr(loc); get_next_raw:=buffer[loc];
-if multistrlen(stringcast(buffer),loc+2,loc)=2 then cur_char:=" "
+if multistrlen(ustringcast(buffer),loc+2,loc)=2 then cur_char:=" "
else cur_char:=xord[buffer[loc]];
end;
@#
@@ -724,8 +724,8 @@ else if (ch='J')or(ch='j') then
if not valid_jis_code(jis_code) then
err_print('jis code ', jis_code:1, ' is invalid');
end
-else if multistrlen(stringcast(buffer), loc+2, loc)=2 then
- begin jis_code:=toDVI(fromBUFF(stringcast(buffer), loc+2, loc));
+else if multistrlen(ustringcast(buffer), loc+2, loc)=2 then
+ begin jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+2, loc));
incr(loc); cur_char:=" ";
if not valid_jis_code(jis_code) then
err_print('jis code ', jis_code:1, ' is invalid');
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 759e4b5bbd0..c62b9ac59c3 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -1581,8 +1581,8 @@ begin switch: if loc<=limit then {current line not yet finished}
@^inner loop@>
begin switch: if loc<=limit then {current line not yet finished}
begin cur_chr:=buffer[loc]; incr(loc);
- if multistrlen(stringcast(buffer), limit+1, loc-1)=2 then
- begin cur_chr:=fromBUFF(stringcast(buffer), limit+1, loc-1);
+ if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then
+ begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc-1);
cur_cmd:=kcat_code(kcatcodekey(cur_chr));
incr(loc);
end
@@ -1671,8 +1671,8 @@ end
@<Scan a control...@>=
begin if loc>limit then cur_cs:=null_cs {|state| is irrelevant in this case}
else begin k:=loc; cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
start_cs:
@@ -1755,8 +1755,8 @@ end
@y
@ @<Scan ahead in the buffer...@>=
begin repeat cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
while (buffer[k]=cur_chr)and(cat=sup_mark)and(k<limit) do
@@ -2193,8 +2193,8 @@ else if scan_keyword("sp") then goto done
if t=" " then t:=space_token
else t:=other_token+t;
@y
- if multistrlen(stringcast(str_pool), pool_ptr, k)=2 then
- begin t:=fromBUFF(stringcast(str_pool), pool_ptr, k); incr(k);
+ if multistrlen(ustringcast(str_pool), pool_ptr, k)=2 then
+ begin t:=fromBUFF(ustringcast(str_pool), pool_ptr, k); incr(k);
end
else if t=" " then t:=space_token
else t:=other_token+t;