From b83822f4ed06282c5c503ef4cf2534646208090a Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 13 Jan 2015 07:35:45 +0000 Subject: texk/web2c: Use ^byte and alloc_array() in TFtoPL, VFtoVF & Co Drop casttobytepointer and pointertobyte git-svn-id: svn://tug.org/texlive/trunk@36045 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/omegaware/ChangeLog | 4 ++++ Build/source/texk/web2c/omegaware/ofm2opl.ch | 7 +++---- Build/source/texk/web2c/omegaware/ovf2ovp.ch | 7 +++---- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'Build/source/texk/web2c/omegaware') diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog index 3a0dd8fa86e..38514dc1c7b 100644 --- a/Build/source/texk/web2c/omegaware/ChangeLog +++ b/Build/source/texk/web2c/omegaware/ChangeLog @@ -1,3 +1,7 @@ +2015-01-12 Peter Breitenlohner + + * ofm2opl.ch, ovf2ovp.ch: Use ^byte and x*alloc_array(). + 2015-01-11 Peter Breitenlohner * ovf2ovp.ch: Send diagnostic messages to stderr. diff --git a/Build/source/texk/web2c/omegaware/ofm2opl.ch b/Build/source/texk/web2c/omegaware/ofm2opl.ch index 87aa1eee957..181a5b04d64 100644 --- a/Build/source/texk/web2c/omegaware/ofm2opl.ch +++ b/Build/source/texk/web2c/omegaware/ofm2opl.ch @@ -68,7 +68,7 @@ procedure initialize; {this procedure gets things started properly} kpse_init_prog ('OFM2OPL', 0, nil, nil); {We |xrealloc| when we know how big the file is. The 1000 comes from the negative lower bound.} - tfm_file_array := cast_to_byte_pointer (xmalloc (1009)); + tfm_file_array := xmalloc_array (byte, 1008); parse_arguments; @z @@ -136,7 +136,7 @@ end; {Kludge here to define |tfm| as a macro which takes care of the negative lower bound. We've defined |tfm| for the benefit of web2c above.} @=#define tfm (tfmfilearray + 1001);@>@\ -@!tfm_file_array: pointer_to_byte; {the input data all goes here} +@!tfm_file_array: ^byte; {the input data all goes here} @z % [21] abort() should cause a bad exit code. @@ -156,8 +156,7 @@ end; if 4*lf-1>tfm_size then abort('The file is bigger than I can handle!'); @.The file is bigger...@> @y -tfm_file_array - := cast_to_byte_pointer (xrealloc (tfm_file_array, 4 * lf - 1 + 1002)); +tfm_file_array := xrealloc_array (tfm_file_array, byte, 4 * lf + 1000); @z % [28, 29] Change strings to C char pointers. The Pascal strings are diff --git a/Build/source/texk/web2c/omegaware/ovf2ovp.ch b/Build/source/texk/web2c/omegaware/ovf2ovp.ch index 888fe27ce01..84df6150450 100644 --- a/Build/source/texk/web2c/omegaware/ovf2ovp.ch +++ b/Build/source/texk/web2c/omegaware/ovf2ovp.ch @@ -58,7 +58,7 @@ procedure initialize; {this procedure gets things started properly} kpse_init_prog ('VFTOVP', 0, nil, nil); {We |xrealloc| when we know how big the file is. The 1000 comes from the negative lower bound.} - tfm_file_array := cast_to_byte_pointer (xmalloc (1009)); + tfm_file_array := xmalloc_array (byte, 1008); parse_arguments; @z @@ -143,7 +143,7 @@ end; {Kludge here to define |tfm| as a macro which takes care of the negative lower bound. We've defined |tfm| for the benefit of web2c above.} @=#define tfm (tfmfilearray + 1001);@>@\ -@!tfm_file_array: pointer_to_byte; {the input data all goes here} +@!tfm_file_array: ^byte; {the input data all goes here} @z % [25] abort() should cause a bad exit code. @@ -163,8 +163,7 @@ end; if 4*lf-1>tfm_size then abort('The file is bigger than I can handle!'); @.The file is bigger...@> @y -tfm_file_array - := cast_to_byte_pointer (xrealloc (tfm_file_array, 4 * lf - 1 + 1002)); +tfm_file_array := xrealloc_array (tfm_file_array, byte, 4 * lf + 1000); @z % [31] Ditto for vf_abort. -- cgit v1.2.3