[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-devel:15490] Re: Test packages of jtex-1.9.1 / multex-0.8.1



>> On Mon, 20 Jan 2003 10:37:09 +0900
>> kohda@xxxxxxxxxxxxxxxxxxxx (Atsuhito Kohda) said as follows:

>本æ¥ã¯ JTeX upstream ㌠Web2C 7.3.9 (以上)ã«å¯¾å¿œã—ã¦ãれるã¹ããªã‚“ã 
>ã¨æ€ã„ã¾ã™ã€‚pTeX ã¯å¯¾å¿œã—ã¦ã‚‹ã‚ˆã†ã§ã™ã€‚

ãã®æ–¹å‘ã®ãƒ‘ッãƒã‚‚トライã—ã¦ã¿ãŸã®ã§ã™ãŒï¼Œç§ã®æŠ€è¡“ä¸è¶³ã§å®Œæˆã§ãã¾ã›ã‚“
ã§ã—ãŸï¼Žæ·»ä»˜ã—ãŸãƒ‘ッãƒã§ tex.p を生æˆã™ã‚‹è¾ºã‚Šã¾ã§ã¯æˆåŠŸã™ã‚‹ã®ã§ã™ãŒï¼Œ
split ã«å¤±æ•—ã—ã¦å‰ã«é€²ã‚ã¾ã›ã‚“.ã©ãªãŸã‹ï¼ŒTeX 㨠web ã«è©³ã—ã„æ–¹ã®åŠ©åŠ›
ã‚’ãŠé¡˜ã„ã—ãŸã„ã§ã™ï¼Ž

-- 
土屋 雅稔 ( TSUCHIYA Masatoshi )

--- web2c-j/cpascal.h	Sun Feb 14 21:04:45 1999
+++ web2c-7.4.2/texk/web2c-j/cpascal.h	Fri Jan 17 20:55:15 2003
@@ -148,6 +148,11 @@
 /* We need this only if TeX is being debugged.  */
 #define input3ints(a,b,c) zinput3ints (&a, &b, &c)
 
+/* Allocate an array of a given type. Add 1 to size to account for the
+   fact that Pascal arrays are used from [1..size], unlike C arrays which
+   use [0..size). */
+#define xmallocarray(type,size) ((type*)xmalloc((size+1)*sizeof(type)))
+
 /* BibTeX needs this to dynamically reallocate arrays.  Too bad we can't
    rely on stringification, or we could avoid the ARRAY_NAME arg.
    Actually allocate one more than requests, so we can index the last
diff -ur web2c-j/jtex.ch web2c-7.4.2/texk/web2c-j/jtex.ch
--- web2c-j/jtex.ch	Sat Sep  9 18:54:19 2000
+++ web2c-7.4.2/texk/web2c-j/jtex.ch	Fri Jan 17 22:02:40 2003
@@ -759,7 +759,7 @@
 if a_open_in(pool_file) then
 @y
 name_length := strlen (pool_name);
-name_of_file := xmalloc (1 + name_length + 1);
+name_of_file := xmalloc_array (ASCII_code, name_length + 1);
 strcpy (name_of_file+1, pool_name); {copy the string}
 if a_open_in (pool_file, kpse_texpool_format) then
 @z
@@ -2725,7 +2725,7 @@
 for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
 @y
 if name_of_file then libc_free (name_of_file);
-name_of_file:= xmalloc(1 + length(a) + length(n) + length(e) + 1);
+name_of_file:= xmalloc_array (ASCII_code, length(a)+length(n)+length(e)+1);
 for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
 @z
 
@@ -2766,7 +2766,7 @@
 for j:=1 to n do append_to_name(xord[TEX_format_default[j]]);
 @y
 if name_of_file then libc_free (name_of_file);
-name_of_file := xmalloc (1 + n + (b - a + 1) + format_ext_length + 1);
+name_of_file := xmalloc_array (ASCII_code, n+(b-a+1)+format_ext_length+1);
 for j:=1 to n do append_to_name(xord[TEX_format_default[j]]);
 @z
 
@@ -4552,11 +4552,11 @@
   eqtb_top:=eqtb_size+hash_extra;
   if hash_extra=0 then hash_top:=undefined_control_sequence else
         hash_top:=eqtb_top;
-  xmalloc_array(yhash,1+hash_top-hash_offset);
+  yhash:=xmalloc_array(two_halves,1+hash_top-hash_offset);
   hash:=yhash - hash_offset;
   next(hash_base):=0; text(hash_base):=0;
   for x:=hash_base+1 to hash_top do hash[x]:=hash[hash_base];
-  xmalloc_array (zeqtb,eqtb_top+1);
+  zeqtb:=xmalloc_array (memory_word,eqtb_top+1);
   eqtb:=zeqtb;
 
   eq_type(undefined_control_sequence):=undefined_cs;
@@ -4584,7 +4584,7 @@
 mem_min := mem_bot - extra_mem_bot;
 mem_max := mem_top + extra_mem_top;
 
-xmalloc_array (yzmem, mem_max - mem_min);
+yzmem:=xmalloc_array (memory_word, mem_max - mem_min);
 zmem := yzmem - mem_min;   {this pointer arithmetic fails with some compilers}
 mem := zmem;
 @z
@@ -4626,9 +4626,9 @@
 undump_size(0)(sup_max_strings-strings_free)('sup strings')(str_ptr);@/
 if max_strings<str_ptr+strings_free then
   max_strings:=str_ptr+strings_free;
-xmalloc_array(str_start, max_strings);
+str_start:=xmalloc_array(pool_pointer, max_strings);
 undump_checked_things(0, pool_ptr, str_start[0], str_ptr+1);@/
-xmalloc_array(str_pool, pool_size);
+str_pool:=xmalloc_array(packed_ASCII_code, pool_size);
 undump_things(str_pool[0], pool_ptr);
 @z
 
@@ -4766,7 +4766,7 @@
 @y
 undump_size(7)(sup_font_mem_size)('font mem size')(fmem_ptr);
 if fmem_ptr>font_mem_size then font_mem_size:=fmem_ptr;
-xmalloc_array(font_info, font_mem_size);
+font_info:=xmalloc_array(fmemory_word, font_mem_size);
 undump_things(font_info[0], fmem_ptr);@/
 undump_size(font_base)(font_base+max_font_max)('font max')(font_ptr);
 {This undumps all of the font info, despite the name.}
@@ -4876,29 +4876,29 @@
 
 @<Undump the array info for internal font number |k|@>=
 begin {Allocate the font arrays}
-xmalloc_array(font_check, font_max);
-xmalloc_array(font_size, font_max);
-xmalloc_array(font_dsize, font_max);
-xmalloc_array(font_params, font_max);
-xmalloc_array(font_name, font_max);
-xmalloc_array(font_area, font_max);
-xmalloc_array(font_bc, font_max);
-xmalloc_array(font_ec, font_max);
-xmalloc_array(font_glue, font_max);
-xmalloc_array(hyphen_char, font_max);
-xmalloc_array(skew_char, font_max);
-xmalloc_array(bchar_label, font_max);
-xmalloc_array(font_bchar, font_max);
-xmalloc_array(font_false_bchar, font_max);
-xmalloc_array(char_base, font_max);
-xmalloc_array(width_base, font_max);
-xmalloc_array(height_base, font_max);
-xmalloc_array(depth_base, font_max);
-xmalloc_array(italic_base, font_max);
-xmalloc_array(lig_kern_base, font_max);
-xmalloc_array(kern_base, font_max);
-xmalloc_array(exten_base, font_max);
-xmalloc_array(param_base, font_max);
+font_check:=xmalloc_array(four_quarters, font_max);
+font_size:=xmalloc_array(scaled, font_max);
+font_dsize:=xmalloc_array(scaled, font_max);
+font_params:=xmalloc_array(font_index, font_max);
+font_name:=xmalloc_array(str_number, font_max);
+font_area:=xmalloc_array(str_number, font_max);
+font_bc:=xmalloc_array(eight_bits, font_max);
+font_ec:=xmalloc_array(eight_bits, font_max);
+font_glue:=xmalloc_array(halfword, font_max);
+hyphen_char:=xmalloc_array(integer, font_max);
+skew_char:=xmalloc_array(integer, font_max);
+bchar_label:=xmalloc_array(font_index, font_max);
+font_bchar:=xmalloc_array(nine_bits, font_max);
+font_false_bchar:=xmalloc_array(nine_bits, font_max);
+char_base:=xmalloc_array(integer, font_max);
+width_base:=xmalloc_array(integer, font_max);
+height_base:=xmalloc_array(integer, font_max);
+depth_base:=xmalloc_array(integer, font_max);
+italic_base:=xmalloc_array(integer, font_max);
+lig_kern_base:=xmalloc_array(integer, font_max);
+kern_base:=xmalloc_array(integer, font_max);
+exten_base:=xmalloc_array(integer, font_max);
+param_base:=xmalloc_array(integer, font_max);
 
 undump_things(font_check[null_font], font_ptr+1-null_font);
 undump_things(font_size[null_font], font_ptr+1-null_font);
@@ -4975,7 +4975,7 @@
 {This is only used for the hyphenation tries below, and the size is
  always |j+1|.}
 @d xmalloc_and_undump(#) ==
-  if not # then xmalloc_array(#, j+1);
+  if not # then #:=xmalloc_array(quarterword, j+1);
   undump_things(#[0], j+1);
 
 @<Undump the hyphenation tables@>=
@@ -5053,7 +5053,7 @@
 % Use four-digit years.
 @x [50.1328] l.24124 
 print(" (preloaded format="); print(job_name); print_char(" ");
-print_int(year mod 100); print_char(".");
+print_int(year); print_char(".");
 @y
 print(" (format="); print(job_name); print_char(" ");
 print_int(year); print_char(".");
@@ -5139,34 +5139,34 @@
   trick_line := 2*error_line-1; {JTeX}
 
   {array memory allocation}
-  xmalloc_array (buffer, buf_size);
-  xmalloc_array (nest, nest_size);
-  xmalloc_array (save_stack, save_size);
-  xmalloc_array (input_stack, stack_size);
-  xmalloc_array (input_file, max_in_open);
-  xmalloc_array (line_stack, max_in_open);
-  xmalloc_array (param_stack, param_size);
-  xmalloc_array (dvi_buf, dvi_buf_size);
-  xmalloc_array (hyph_word , hyph_size);
-  xmalloc_array (hyph_list , hyph_size);
-  xmalloc_array (hyph_link , hyph_size);
+  buffer:=xmalloc_array (ASCII_code, buf_size);
+  nest:=xmalloc_array (list_state_record, nest_size);
+  save_stack:=xmalloc_array (memory_word, save_size);
+  input_stack:=xmalloc_array (in_state_record, stack_size);
+  input_file:=xmalloc_array (alpha_file, max_in_open);
+  line_stack:=xmalloc_array (integer, max_in_open);
+  param_stack:=xmalloc_array (halfword, param_size);
+  dvi_buf:=xmalloc_array (eight_bits, dvi_buf_size);
+  hyph_word :=xmalloc_array (str_number, hyph_size);
+  hyph_list :=xmalloc_array (halfword, hyph_size);
+  hyph_link :=xmalloc_array (hyph_pointer, hyph_size);
 @+Init
-  xmalloc_array (yzmem, mem_top - mem_bot);
+  yzmem:=xmalloc_array (memory_word, mem_top - mem_bot);
   zmem := yzmem - mem_bot;   {Some compilers require |mem_bot=0|}
   eqtb_top := eqtb_size+hash_extra;
   if hash_extra=0 then hash_top:=undefined_control_sequence else
         hash_top:=eqtb_top;
-  xmalloc_array (yhash,1+hash_top-hash_offset);
+  yhash:=xmalloc_array (two_halves,1+hash_top-hash_offset);
   hash:=yhash - hash_offset;   {Some compilers require |hash_offset=0|}
   next(hash_base):=0; text(hash_base):=0;
   for hash_used:=hash_base+1 to hash_top do hash[hash_used]:=hash[hash_base];
-  xmalloc_array (zeqtb, eqtb_top);
+  zeqtb:=xmalloc_array (memory_word, eqtb_top);
   eqtb:=zeqtb;
 
-  xmalloc_array (str_start, max_strings);
-  xmalloc_array (str_pool, pool_size);
-  xmalloc_array (font_info, font_mem_size);
-  xmalloc_array (j_font_table, font_max); {JTeX}
+  str_start:=xmalloc_array (pool_pointer, max_strings);
+  str_pool:=xmalloc_array (packed_ASCII_code, pool_size);
+  font_info:=xmalloc_array (fmemory_word, font_mem_size);
+  j_font_table:=xmalloc_array (fmemory_word, font_max); {JTeX}
 @+Tini
 @z
 
@@ -5269,43 +5269,43 @@
 
 @!init
 if trie_not_ready then begin {initex without format loaded}
-  xmalloc_array (trie_trl, trie_size);
-  xmalloc_array (trie_tro, trie_size);
-  xmalloc_array (trie_trc, trie_size);
-
-  xmalloc_array (trie_c, trie_size);
-  xmalloc_array (trie_o, trie_size);
-  xmalloc_array (trie_l, trie_size);
-  xmalloc_array (trie_r, trie_size);
-  xmalloc_array (trie_hash, trie_size);
-  xmalloc_array (trie_taken, trie_size);
+  trie_trl:=xmalloc_array (trie_pointer, trie_size);
+  trie_tro:=xmalloc_array (trie_pointer, trie_size);
+  trie_trc:=xmalloc_array (quarterword, trie_size);
+
+  trie_c:=xmalloc_array (packed_ASCII_code, trie_size);
+  trie_o:=xmalloc_array (trie_opcode, trie_size);
+  trie_l:=xmalloc_array (trie_pointer, trie_size);
+  trie_r:=xmalloc_array (trie_pointer, trie_size);
+  trie_hash:=xmalloc_array (trie_pointer, trie_size);
+  trie_taken:=xmalloc_array (boolean, trie_size);
 
   trie_root:=0; trie_c[0]:=si(0); trie_ptr:=0;
 
   {Allocate and initialize font arrays}
-  xmalloc_array(font_check, font_max);
-  xmalloc_array(font_size, font_max);
-  xmalloc_array(font_dsize, font_max);
-  xmalloc_array(font_params, font_max);
-  xmalloc_array(font_name, font_max);
-  xmalloc_array(font_area, font_max);
-  xmalloc_array(font_bc, font_max);
-  xmalloc_array(font_ec, font_max);
-  xmalloc_array(font_glue, font_max);
-  xmalloc_array(hyphen_char, font_max);
-  xmalloc_array(skew_char, font_max);
-  xmalloc_array(bchar_label, font_max);
-  xmalloc_array(font_bchar, font_max);
-  xmalloc_array(font_false_bchar, font_max);
-  xmalloc_array(char_base, font_max);
-  xmalloc_array(width_base, font_max);
-  xmalloc_array(height_base, font_max);
-  xmalloc_array(depth_base, font_max);
-  xmalloc_array(italic_base, font_max);
-  xmalloc_array(lig_kern_base, font_max);
-  xmalloc_array(kern_base, font_max);
-  xmalloc_array(exten_base, font_max);
-  xmalloc_array(param_base, font_max);
+  font_check:=xmalloc_array(four_quarters, font_max);
+  font_size:=xmalloc_array(scaled, font_max);
+  font_dsize:=xmalloc_array(scaled, font_max);
+  font_params:=xmalloc_array(font_index, font_max);
+  font_name:=xmalloc_array(str_number, font_max);
+  font_area:=xmalloc_array(str_number, font_max);
+  font_bc:=xmalloc_array(eight_bits, font_max);
+  font_ec:=xmalloc_array(eight_bits, font_max);
+  font_glue:=xmalloc_array(halfword, font_max);
+  hyphen_char:=xmalloc_array(integer, font_max);
+  skew_char:=xmalloc_array(integer, font_max);
+  bchar_label:=xmalloc_array(font_index, font_max);
+  font_bchar:=xmalloc_array(nine_bits, font_max);
+  font_false_bchar:=xmalloc_array(nine_bits, font_max);
+  char_base:=xmalloc_array(integer, font_max);
+  width_base:=xmalloc_array(integer, font_max);
+  height_base:=xmalloc_array(integer, font_max);
+  depth_base:=xmalloc_array(integer, font_max);
+  italic_base:=xmalloc_array(integer, font_max);
+  lig_kern_base:=xmalloc_array(integer, font_max);
+  kern_base:=xmalloc_array(integer, font_max);
+  exten_base:=xmalloc_array(integer, font_max);
+  param_base:=xmalloc_array(integer, font_max);
 
   font_ptr:=null_font; fmem_ptr:=7;
   font_name[null_font]:="nullfont"; font_area[null_font]:="";
@@ -5324,7 +5324,7 @@
   end;
   tini@/
 
-  xmalloc_array (font_used, font_max);
+  font_used:=xmalloc_array (boolean, font_max);
   for font_k:=font_base to font_max do font_used[font_k]:=false;
 @z
 
@@ -7557,7 +7557,7 @@
 dump_things(j_font_table[null_font], font_ptr+1-null_font)
 
 @ @<Undump the |j_font_table|@>=
-xmalloc_array(j_font_table, font_max);
+j_font_table:=xmalloc_array (fmemory_word, font_max);
 undump_things(j_font_table[null_font], font_ptr+1-null_font)
 
 
diff -ur web2c-j/texmfmp.h web2c-7.4.2/texk/web2c-j/texmfmp.h
--- web2c-j/texmfmp.h	Thu Aug 12 03:02:01 1999
+++ web2c-7.4.2/texk/web2c-j/texmfmp.h	Fri Jan 17 20:55:01 2003
@@ -153,11 +153,6 @@
    to the *coerce.h files. */
 /* extern void calledit (); */
 
-/* Used to allocate the hyphenation arrays at runtime in initex.  Always
-   add one to SIZE because Pascal arrays start at 1 and continue through
-   the maximum.  */
-#define xmallocarray(array,size) array = xmalloc ((size+1) * sizeof (array[0]))
-
 /* Set an array size from texmf.cnf.  */
 extern void setupboundvariable P3H(integer *, const_string, integer);