diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-05 08:50:28 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-05 08:50:28 +0000 |
commit | edc562bfa3e97201709f690ae5c738b150dc365c (patch) | |
tree | f503ef4c651ce308e73c294ba085da48f155d66f /Build/source/texk/web2c/uptexdir | |
parent | fd915ec757813cf18b6929c70136a63965d31327 (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/uptexdir')
-rw-r--r-- | Build/source/texk/web2c/uptexdir/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/uppltotf.ch | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/uptex-m.ch | 40 |
3 files changed, 33 insertions, 27 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index b2602ec14ba..1159939ece7 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,9 @@ +2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + Avoid 'differ in signedness' warnings. + * uppltotf.ch: Use ustringcast(buffer). + * uptex-m.ch: Use ustringcast for buffer and str_pool. + 2012-01-15 Takuji Tanaka <KXD02663@nifty.ne.jp> * uptex-m.ch, uppltotf.ch uptftopl.ch, updvitype.ch, upbibtex.ch: diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch index 1b62068a7e8..802e9262847 100644 --- a/Build/source/texk/web2c/uptexdir/uppltotf.ch +++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch @@ -31,9 +31,9 @@ max_kanji=65535; { maximam number of 2byte characters } @z @x function get_next_raw -if multistrlen(stringcast(buffer),loc+2,loc)=2 then cur_char:=" " +if multistrlen(ustringcast(buffer),loc+2,loc)=2 then cur_char:=" " @y -if multistrlen(stringcast(buffer),loc+3,loc)>1 then cur_char:=" " +if multistrlen(ustringcast(buffer),loc+3,loc)>1 then cur_char:=" " @z @x function valid_jis_code @@ -75,8 +75,8 @@ index_to_jis:=ix; @z @x function get_kanji -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:=" "; @y else if (ch='U')or(ch='u') then @@ -90,9 +90,9 @@ else if (ch='U')or(ch='u') 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+4, loc)>1 then +else if multistrlen(ustringcast(buffer), loc+4, loc)>1 then begin cur_char:=" "; - jis_code:=toDVI(fromBUFF(stringcast(buffer), loc+4, loc)); - loc:=loc+multistrlen(stringcast(buffer), loc+4, loc)-1; + jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+4, loc)); + loc:=loc+multistrlen(ustringcast(buffer), loc+4, loc)-1; @z diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch index 7474aab010a..5ff0d91e6df 100644 --- a/Build/source/texk/web2c/uptexdir/uptex-m.ch +++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch @@ -361,19 +361,19 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10); @x 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 else reswitch: cur_cmd:=cat_code(cur_chr); @y begin - cur_chr:=fromBUFF(stringcast(buffer), limit, loc); + cur_chr:=fromBUFF(ustringcast(buffer), limit, loc); cur_cmd:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(stringcast(buffer), limit, loc)>1) and check_kcat_code(cur_cmd) then begin + if (multistrlen(ustringcast(buffer), limit, loc)>1) and check_kcat_code(cur_cmd) then begin if (cur_cmd=not_cjk) then cur_cmd:=other_kchar; - loc:=loc+multistrlen(stringcast(buffer), limit, loc) end + loc:=loc+multistrlen(ustringcast(buffer), limit, loc) end else begin cur_chr:=buffer[loc]; incr(loc); reswitch: cur_cmd:=cat_code(cur_chr); @@ -403,19 +403,19 @@ hangul_code(skip_blanks),hangul_code(new_line),hangul_code(mid_kanji): @x 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: if (cat=letter)or(cat=kanji)or(cat=kana) then state:=skip_blanks @y else begin k:=loc; - cur_chr:=fromBUFF(stringcast(buffer), limit, k); + cur_chr:=fromBUFF(ustringcast(buffer), limit, k); cat:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(stringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin + if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin if (cat=not_cjk) then cat:=other_kchar; - k:=k+multistrlen(stringcast(buffer), limit, k) end + k:=k+multistrlen(ustringcast(buffer), limit, k) end else begin {not multi-byte char} cur_chr:=buffer[k]; cat:=cat_code(cur_chr); @@ -433,17 +433,17 @@ start_cs: @x 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); @y begin repeat - cur_chr:=fromBUFF(stringcast(buffer), limit, k); + cur_chr:=fromBUFF(ustringcast(buffer), limit, k); cat:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(stringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin + if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin if (cat=not_cjk) then cat:=other_kchar; - k:=k+multistrlen(stringcast(buffer), limit, k) end + k:=k+multistrlen(ustringcast(buffer), limit, k) end else begin {not multi-byte char} cur_chr:=buffer[k]; cat:=cat_code(cur_chr); @@ -545,8 +545,8 @@ begin str_room(1); p:=temp_head; link(p):=null; k:=b; while k<pool_ptr do begin t:=so(str_pool[k]); - 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; @@ -557,13 +557,13 @@ while k<pool_ptr do begin str_room(1); p:=temp_head; link(p):=null; k:=b; while k<pool_ptr do - begin t:=fromBUFF(stringcast(str_pool), pool_ptr, k); + begin t:=fromBUFF(ustringcast(str_pool), pool_ptr, k); cc:=kcat_code(kcatcodekey(t)); - if (multistrlen(stringcast(str_pool), pool_ptr, k)>1)and + if (multistrlen(ustringcast(str_pool), pool_ptr, k)>1)and check_kcat_code(cc) then begin if (cc=not_cjk) then cc:=other_kchar; t:=t+cc*max_cjk_val; - k:=k+multistrlen(stringcast(str_pool), pool_ptr, k)-1; + k:=k+multistrlen(ustringcast(str_pool), pool_ptr, k)-1; end else begin t:=so(str_pool[k]); if t=" " then t:=space_token |