OSDN Git Service

binding with libharu.
[putex/putex.git] / src / texsourc / tex4.c
index b6e80bb..9628f50 100644 (file)
@@ -34,7 +34,7 @@ void char_warning_(internal_font_number f, eight_bits c)
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
   if (show_missing == 0)            /* show on screen 94/June/10 */
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-      begin_diagnostic (); 
+      begin_diagnostic(); 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
   if (show_missing) {     /* add ! before 94/June/10 */
     print_nl("! ");
@@ -87,7 +87,7 @@ halfword new_character_(internal_font_number f, eight_bits c)
     if (font_ec[f]>= c)
       if ((font_info[char_base[f]+ c].qqqq.b0 > 0))
       {
-        p = get_avail ();
+        p = get_avail();
         mem[p].hh.b0 = f;
     mem[p].hh.b1 = c; 
     Result = p; 
@@ -127,7 +127,7 @@ void dvi_four_(integer x)    /* attempt at speeding up bkph - is compiler smart
 /*    dvi_buf[dvi_ptr]=(x >> 24);  */
     dvi_buf[dvi_ptr]= (unsigned char)(x >> 24); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   else {
     x = x + 1073741824L;    /* 2^30 40000000 hex */ 
@@ -136,7 +136,7 @@ void dvi_four_(integer x)    /* attempt at speeding up bkph - is compiler smart
 /*      dvi_buf[dvi_ptr]=(x / 16777216L)+ 128;   */  /* 2^24 */
       dvi_buf[dvi_ptr]=(x >> 24)+ 128;      /* set sign bit */
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
   } 
 /*  x = x % 16777216L;  */  /* % 2^24 */
@@ -146,7 +146,7 @@ void dvi_four_(integer x)    /* attempt at speeding up bkph - is compiler smart
 /*    dvi_buf[dvi_ptr]=(x >> 16);  */
     dvi_buf[dvi_ptr]= (unsigned char)(x >> 16); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
 /*  x = x % 65536L;  */ /* % 2^16 */
   x = x & 65535L;
@@ -155,13 +155,13 @@ void dvi_four_(integer x)    /* attempt at speeding up bkph - is compiler smart
 /*    dvi_buf[dvi_ptr]=(x >> 8);  */
     dvi_buf[dvi_ptr]= (unsigned char)(x >> 8); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
 /*    dvi_buf[dvi_ptr]= x % 256; */ /* % 2^8 */
     dvi_buf[dvi_ptr]= x & 255; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
 } 
 /* following needs access to dvi_buf=zdvibuf see coerce.h */
@@ -173,7 +173,7 @@ void zdvipop(integer l)
       
     dvi_buf[dvi_ptr]= 142; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
 } 
 /* following needs access to dvi_buf=zdvibuf see coerce.h */
@@ -186,41 +186,41 @@ void dvi_font_def_(internal_font_number f)
   {
     dvi_buf[dvi_ptr]= 243; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= f - 1; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   }
   else {
   {
     dvi_buf[dvi_ptr]= 244; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= (f - 1) >> 8; /* top byte */
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= (f - 1) & 255; /* bottom byte */
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   }
 #else
   {
     dvi_buf[dvi_ptr]= 243; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= f - 1; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
 #endif
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
@@ -228,22 +228,22 @@ void dvi_font_def_(internal_font_number f)
   {
     dvi_buf[dvi_ptr]= font_check[f].b0; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= font_check[f].b1; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= font_check[f].b2; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     dvi_buf[dvi_ptr]= font_check[f].b3; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   dvi_four(font_size[f]); 
   dvi_four(font_dsize[f]); 
@@ -252,14 +252,14 @@ void dvi_font_def_(internal_font_number f)
     dvi_buf[dvi_ptr]=
       (str_start[font_area[f]+ 1]- str_start[font_area[f]]); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
 /*  long to unsigned char ... */
     dvi_buf[dvi_ptr]=
       (str_start[font_name[f]+ 1]- str_start[font_name[f]]); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     register integer for_end; 
@@ -269,7 +269,7 @@ void dvi_font_def_(internal_font_number f)
     {
       dvi_buf[dvi_ptr]= str_pool[k]; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(k++ < for_end);
   } 
@@ -281,7 +281,7 @@ void dvi_font_def_(internal_font_number f)
     {
       dvi_buf[dvi_ptr]= str_pool[k]; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(k++ < for_end);
   } 
@@ -375,7 +375,7 @@ void zmovement(scaled w, eight_bits o)
     {
       dvi_buf[dvi_ptr]= o + 3; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     dvi_four(w); 
     return; 
@@ -385,7 +385,7 @@ void zmovement(scaled w, eight_bits o)
     {
       dvi_buf[dvi_ptr]= o + 2; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     if (w < 0)
     w = w + 16777216L;  /* 2^24 */
@@ -394,7 +394,7 @@ void zmovement(scaled w, eight_bits o)
 /*      dvi_buf[dvi_ptr]=(w >> 16);  */
       dvi_buf[dvi_ptr]= (unsigned char)(w >> 16); 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
 /*    w = w % 65536L; */
   w = w & 65535L; 
@@ -405,7 +405,7 @@ void zmovement(scaled w, eight_bits o)
     {
       dvi_buf[dvi_ptr]= o + 1; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     if (w < 0)
     w = w + 65536L; 
@@ -414,7 +414,7 @@ void zmovement(scaled w, eight_bits o)
   {
     dvi_buf[dvi_ptr]= o; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   if (w < 0)
   w = w + 256; 
@@ -424,13 +424,13 @@ void zmovement(scaled w, eight_bits o)
 /*    dvi_buf[dvi_ptr]=(w >> 8);  */
     dvi_buf[dvi_ptr]= (unsigned char)(w >> 8); 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   lab1: {
 /*    dvi_buf[dvi_ptr]= w % 256;  */
     dvi_buf[dvi_ptr]= w & 255; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   return; 
   lab40: mem[q].hh.v.LH = mem[p].hh.v.LH; 
@@ -439,7 +439,7 @@ void zmovement(scaled w, eight_bits o)
     {
       dvi_buf[dvi_ptr]= o + 4; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(mem[q].hh.v.RH != p){
   
@@ -460,7 +460,7 @@ void zmovement(scaled w, eight_bits o)
     {
       dvi_buf[dvi_ptr]= o + 9; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(mem[q].hh.v.RH != p){
   
@@ -560,20 +560,20 @@ void special_out_(halfword p)
     {
       dvi_buf[dvi_ptr]= 239;    /* xxx1 */
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     {
 /*    long to unsigned char ... */
       dvi_buf[dvi_ptr]=(pool_ptr - str_start[str_ptr]); 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
   } 
   else {              /* use xxx4 instead */ 
     {
       dvi_buf[dvi_ptr]= 242;    /* xxx4 */
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     dvi_four((pool_ptr - str_start[str_ptr])); 
   } 
@@ -622,7 +622,7 @@ void special_out_(halfword p)
     {
       dvi_buf[dvi_ptr]= str_pool[k]; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(k++ < for_end);
   } 
@@ -638,25 +638,25 @@ void write_out_(halfword p)
   int j;              /* 1995/Jan/7 */
   halfword q, r; 
 /* q:=get_avail; info(q):=right_brace_token+"}";@/ */
-  q = get_avail (); 
+  q = get_avail(); 
   info(q) = 637; 
 /* r:=get_avail; link(q):=r; info(r):=end_write_token; ins_list(q);@/ */
 /* @d end_write_token==cs_token_flag+end_write */
-  r = get_avail (); 
+  r = get_avail(); 
   link(q) = r; 
 /*  mem[r].hh.v.LH = (hash_size + 4617);  */
 /*  mem[r].hh.v.LH = (hash_size + 4095 + 522); */
   info(r) = (hash_size + hash_extra + 4095 + 522); 
   begin_token_list(q, 4); 
   begin_token_list(mem[p + 1].hh.v.RH, 15); 
-  q = get_avail (); 
+  q = get_avail(); 
   mem[q].hh.v.LH = 379; 
   begin_token_list(q, 4); 
   oldmode = mode; 
   mode = 0; 
   cur_cs = write_loc; 
   q = scan_toks(false, true); 
-  get_token (); 
+  get_token(); 
 /*  if (cur_tok != (hash_size + 4617)) */
 /*  if (cur_tok != (hash_size + 4095 + 522)) */
   if (cur_tok != (hash_size + hash_extra + 4095 + 522))
@@ -664,15 +664,15 @@ void write_out_(halfword p)
          print_err("Unbalanced write command");
          help2("On this page there's a \\write with fewer real {'s than }'s.",
                  "I can't handle that very well; good luck.");
-    error (); 
+    error(); 
     do {
-    get_token (); 
+    get_token(); 
 /*    } while(!(cur_tok == (hash_size + 4617)));  */
 /*    } while(!(cur_tok == (hash_size + 4095 + 522)));  */
     } while(!(cur_tok == (hash_size + hash_extra + 4095 + 522))); /*1996/Jan/10*/
   } 
   mode = oldmode; 
-  end_token_list (); 
+  end_token_list(); 
   old_setting = selector; 
   j = mem[p + 1].hh.v.LH; 
   if (write_open[j])selector = j; 
@@ -682,7 +682,7 @@ void write_out_(halfword p)
     print_nl("");  /*  */
   } 
   token_show(def_ref); 
-  print_ln (); 
+  print_ln(); 
   flush_list(def_ref); 
   selector = old_setting; 
 } 
@@ -762,7 +762,7 @@ void hlist_out (void)
   {
     dvi_buf[dvi_ptr]= 141; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   if (cur_s > max_push)
   max_push = cur_s; 
@@ -797,7 +797,7 @@ lab21: if ((p >= hi_mem_min))
   {               /* fnt_num_0 --- fnt_num_63 */
     dvi_buf[dvi_ptr]= f + 170; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 #ifdef INCREASEFONTS
@@ -809,12 +809,12 @@ lab21: if ((p >= hi_mem_min))
     {               /* fnt1 followed by f */
       dvi_buf[dvi_ptr]= 235; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     {
       dvi_buf[dvi_ptr]= f - 1; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
   } 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
@@ -823,17 +823,17 @@ lab21: if ((p >= hi_mem_min))
     {
       dvi_buf[dvi_ptr]= 236;
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     {
       dvi_buf[dvi_ptr]= (f - 1) >> 8;   /* top byte */
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     }
     {
       dvi_buf[dvi_ptr]= (f - 1) & 255;    /* bottom byte */
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     }     
   }
 #endif
@@ -844,12 +844,12 @@ lab21: if ((p >= hi_mem_min))
       {
   dvi_buf[dvi_ptr]= 128; 
   incr(dvi_ptr); 
-  if (dvi_ptr == dvi_limit)dvi_swap (); 
+  if (dvi_ptr == dvi_limit)dvi_swap(); 
       } 
       {
   dvi_buf[dvi_ptr]= c; 
   incr(dvi_ptr); 
-  if (dvi_ptr == dvi_limit)dvi_swap (); 
+  if (dvi_ptr == dvi_limit)dvi_swap(); 
       } 
       cur_h = cur_h + font_info[width_base[f]+ font_info[char_base[f]+ c 
     ].qqqq.b0].cint; 
@@ -872,8 +872,8 @@ lab21: if ((p >= hi_mem_min))
   cur_v = baseline + mem[p + 4].cint; 
   temp_ptr = p; 
   edge = cur_h; 
-  if (mem[p].hh.b0 == 1)vlist_out (); 
-  else hlist_out ();
+  if (mem[p].hh.b0 == 1)vlist_out(); 
+  else hlist_out();
   dvi_h = saveh; 
   dvi_v = savev; 
   cur_h = edge + mem[p + 1].cint; 
@@ -982,8 +982,8 @@ lab21: if ((p >= hi_mem_min))
         temp_ptr = leaderbox; 
         outerdoingleaders = doing_leaders; 
         doing_leaders = true; 
-        if (mem[leaderbox].hh.b0 == 1)vlist_out (); 
-        else hlist_out ();
+        if (mem[leaderbox].hh.b0 == 1)vlist_out(); 
+        else hlist_out();
         doing_leaders = outerdoingleaders; 
         dvi_v = savev; 
         dvi_h = saveh; 
@@ -1038,7 +1038,7 @@ lab21: if ((p >= hi_mem_min))
       {
   dvi_buf[dvi_ptr]= 132; 
   incr(dvi_ptr); 
-  if (dvi_ptr == dvi_limit)dvi_swap (); 
+  if (dvi_ptr == dvi_limit)dvi_swap(); 
       } 
       dvi_four(rule_ht); 
       dvi_four(rule_wd); 
@@ -1083,7 +1083,7 @@ void vlist_out (void)
   {
     dvi_buf[dvi_ptr]= 141; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   if (cur_s > max_push)
   max_push = cur_s; 
@@ -1115,8 +1115,8 @@ void vlist_out (void)
     savev = dvi_v; 
     cur_h = leftedge + mem[p + 4].cint; 
     temp_ptr = p; 
-    if (mem[p].hh.b0 == 1)vlist_out (); 
-    else hlist_out ();
+    if (mem[p].hh.b0 == 1)vlist_out(); 
+    else hlist_out();
     dvi_h = saveh; 
     dvi_v = savev; 
     cur_v = savev + mem[p + 2].cint; 
@@ -1227,8 +1227,8 @@ void vlist_out (void)
     temp_ptr = leaderbox; 
     outerdoingleaders = doing_leaders; 
     doing_leaders = true; 
-    if (mem[leaderbox].hh.b0 == 1)vlist_out (); 
-    else hlist_out (); 
+    if (mem[leaderbox].hh.b0 == 1)vlist_out(); 
+    else hlist_out(); 
     doing_leaders = outerdoingleaders; 
     dvi_v = savev; 
     dvi_h = saveh; 
@@ -1272,7 +1272,7 @@ void vlist_out (void)
   {
     dvi_buf[dvi_ptr]= 137; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   dvi_four(rule_ht); 
   dvi_four(rule_wd); 
@@ -1286,7 +1286,16 @@ void vlist_out (void)
   if (cur_s > 0)
   dvi_pop(saveloc); 
   decr(cur_s); 
-} 
+}
+/****************HPDF******************/
+void error_handler (HPDF_STATUS   error_no,
+               HPDF_STATUS   detail_no,
+               void         *user_data)
+{
+    printf ("ERROR: error_no=%04X, detail_no=%u\n", (HPDF_UINT)error_no,
+                (HPDF_UINT)detail_no);
+}
+/****************HPDF******************/
 /* following needs access to dvi_buf=zdvibuf see coerce.h */
 void ship_out_(halfword p)
 {/* 30 */ 
@@ -1296,12 +1305,12 @@ void ship_out_(halfword p)
   char old_setting; 
   if (eqtb[(hash_size + 3197)].cint > 0)
   {
-    print_nl("");    /*  */
-    print_ln (); 
+    print_nl("");
+    print_ln(); 
     print_string("Completed box being shipped out");
   } 
   if (term_offset > max_print_line - 9)
-  print_ln (); 
+  print_ln(); 
   else if ((term_offset > 0)||(file_offset > 0)) 
   print_char(' ');
   print_char('[');
@@ -1325,7 +1334,7 @@ void ship_out_(halfword p)
   if (eqtb[(hash_size + 3197)].cint > 0)
   {
     print_char(']');
-    begin_diagnostic (); 
+    begin_diagnostic(); 
     show_box(p); 
     end_diagnostic(true); 
   } 
@@ -1338,10 +1347,10 @@ void ship_out_(halfword p)
          print_err("Huge page cannot be shipped out");
          help2("The page just created is more than 18 feet tall or",
                  "more than 18 feet wide, so I suspect something went wrong.");
-    error (); 
+    error(); 
     if (eqtb[(hash_size + 3197)].cint <= 0)
     {
-      begin_diagnostic (); 
+      begin_diagnostic(); 
       print_nl("The following box has been deleted:");
       show_box(p); 
       end_diagnostic(true); 
@@ -1359,7 +1368,7 @@ void ship_out_(halfword p)
   dvi_f = 0; 
   if (output_file_name == 0)
   {
-    if (job_name == 0)open_log_file (); 
+    if (job_name == 0)open_log_file(); 
     pack_job_name(788);   /* .dvi */
     while(! b_open_out(dvi_file)) {
     prompt_file_name(789, 788); /* file name for output  .dvi */
@@ -1372,16 +1381,31 @@ void ship_out_(halfword p)
     {
       dvi_buf[dvi_ptr]= 247; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     {
       dvi_buf[dvi_ptr]= 2; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
-    } 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
+    }
+/********BINDING WITH LIBHARU*********/
+    yandy_pdf = HPDF_New(error_handler, NULL);
+    yandy_page = HPDF_AddPage(yandy_pdf);
+    HPDF_SetInfoAttr(yandy_pdf, HPDF_INFO_PRODUCER, "Y&Y TeX with ApTeX");
+    HPDF_SetCompressionMode (yandy_pdf, HPDF_COMP_ALL);
+    HPDF_Page_SetSize (yandy_page, HPDF_PAGE_SIZE_A5, HPDF_PAGE_PORTRAIT);
+    yandy_font = HPDF_GetFont (yandy_pdf, "Times-Roman", NULL);
+    HPDF_Page_BeginText (yandy_page);
+    HPDF_Page_SetFontAndSize (yandy_page, yandy_font, 16);
+    HPDF_Page_TextOut (yandy_page, 60, HPDF_Page_GetHeight (yandy_page)-90,  "This is the alpha page.");
+    HPDF_Page_TextOut (yandy_page, 60, HPDF_Page_GetHeight (yandy_page)-180, "Wait for ...");
+    HPDF_Page_EndText (yandy_page);
+    HPDF_SaveToFile (yandy_pdf, "NOTICE.pdf");
+    HPDF_Free(yandy_pdf);
+/********BINDING WITH LIBHARU*********/
     dvi_four(25400000L);  /* magic DVI scale factor */
     dvi_four(473628672L); /* 7227 * 65536 */
-    prepare_mag (); 
+    prepare_mag(); 
     dvi_four(eqtb[(hash_size + 3180)].cint); 
     old_setting = selector; 
     selector = 21; 
@@ -1399,7 +1423,7 @@ void ship_out_(halfword p)
 /*    long to unsigned char ... */
       dvi_buf[dvi_ptr]=(pool_ptr - str_start[str_ptr]); 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     {
     register integer for_end; 
@@ -1409,7 +1433,7 @@ void ship_out_(halfword p)
     {
       dvi_buf[dvi_ptr]= str_pool[s]; 
       incr(dvi_ptr); 
-      if (dvi_ptr == dvi_limit)dvi_swap (); 
+      if (dvi_ptr == dvi_limit)dvi_swap(); 
     } 
     while(s++ < for_end);
   } 
@@ -1420,7 +1444,7 @@ void ship_out_(halfword p)
   {
     dvi_buf[dvi_ptr]= 139; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   {
     register integer for_end; 
@@ -1434,12 +1458,12 @@ void ship_out_(halfword p)
   last_bop = pageloc; 
   cur_v = mem[p + 3].cint + eqtb[(hash_size + 3749)].cint; 
   temp_ptr = p; 
-  if (mem[p].hh.b0 == 1)vlist_out (); 
-  else hlist_out (); 
+  if (mem[p].hh.b0 == 1)vlist_out(); 
+  else hlist_out(); 
   {
     dvi_buf[dvi_ptr]= 140; 
     incr(dvi_ptr); 
-    if (dvi_ptr == dvi_limit)dvi_swap (); 
+    if (dvi_ptr == dvi_limit)dvi_swap(); 
   } 
   incr(total_pages); 
   cur_s = -1; 
@@ -1472,7 +1496,7 @@ void ship_out_(halfword p)
     print_int(dyn_used); 
     print_string("still utouched");
     print_int(hi_mem_min - lo_mem_max - 1); /* somewhat inaccurate free mem */
-    print_ln (); 
+    print_ln(); 
   } 
 #endif /* STAT */
 } 
@@ -1501,7 +1525,7 @@ void scan_spec_(group_code c, bool threecodes)
   save_stack[save_ptr + 1].cint = cur_val; 
   save_ptr = save_ptr + 2; 
   new_save_level(c); 
-  scan_left_brace (); 
+  scan_left_brace(); 
 } 
 halfword hpack_(halfword p, scaled w, small_number m)
 {/* 21 50 10 */ register halfword Result;
@@ -1533,701 +1557,667 @@ halfword hpack_(halfword p, scaled w, small_number m)
   totalshrink[2]= 0; 
   totalstretch[3]= 0; 
   totalshrink[3]= 0; 
-  while(p != 0){ /* while p<>null do l.12862 */
-    lab21: while((p >= hi_mem_min)) {
-      f = mem[p].hh.b0; 
-      i = font_info[char_base[f]+ mem[p].hh.b1].qqqq; 
-      hd = i.b1; 
-      x = x + font_info[width_base[f]+ i.b0].cint; 
-      s = font_info[height_base[f]+(hd)/ 16].cint; 
+  while (p != 0) { /* while p<>null do l.12862 */
+lab21:
+    while ((p >= hi_mem_min)) {
+      f = mem[p].hh.b0;
+      i = font_info[char_base[f]+ mem[p].hh.b1].qqqq;
+      hd = i.b1;
+      x = x + font_info[width_base[f]+ i.b0].cint;
+      s = font_info[height_base[f]+(hd)/ 16].cint;
       if (s > h)
-      h = s; 
-      s = font_info[depth_base[f]+(hd)% 16].cint; 
+        h = s;
+      s = font_info[depth_base[f]+(hd)% 16].cint;
       if (s > d)
-      d = s; 
-      p = mem[p].hh.v.RH; 
+        d = s;
+      p = mem[p].hh.v.RH;
     } 
     if (p != 0)  /* if p<>null then l.12886 */
     {
-      switch(mem[p].hh.b0)
-      {case 0 : 
-      case 1 : 
-      case 2 : 
-      case 13 : 
-  {
-    x = x + mem[p + 1].cint; 
-    if (mem[p].hh.b0 >= 2)
-    s = 0; 
-    else s = mem[p + 4].cint; 
-    if (mem[p + 3].cint - s > h)
-    h = mem[p + 3].cint - s; 
-    if (mem[p + 2].cint + s > d)
-    d = mem[p + 2].cint + s; 
-  } 
-  break; 
-      case 3 : 
-      case 4 : 
-      case 5 : 
+      switch (mem[p].hh.b0)
+      {
+      case 0:
+      case 1:
+      case 2:
+      case 13:
+        {
+          x = x + mem[p + 1].cint;
+          if (mem[p].hh.b0 >= 2)
+            s = 0;
+          else
+            s = mem[p + 4].cint;
+          if (mem[p + 3].cint - s > h)
+            h = mem[p + 3].cint - s;
+          if (mem[p + 2].cint + s > d)
+            d = mem[p + 2].cint + s;
+        }
+        break; 
+      case 3:
+      case 4:
+      case 5:
 /* if adjust_tail<>null then link(adjust_tail):=null; l.12865 / 12891 */
+        if (adjust_tail != 0)
+        {
+          while (mem[q].hh.v.RH != p)
+            q = mem[q].hh.v.RH;
+          if (mem[p].hh.b0 == 5) {
+            mem[adjust_tail].hh.v.RH = mem[p + 1].cint;
+            while (mem[adjust_tail].hh.v.RH != 0)
+              adjust_tail = mem[adjust_tail].hh.v.RH;
+            p = mem[p].hh.v.RH;
+            free_node(mem[q].hh.v.RH, 2);
+          } else {
+            mem[adjust_tail].hh.v.RH = p;
+            adjust_tail = p;
+            p = mem[p].hh.v.RH;
+          }
+          mem[q].hh.v.RH = p;
+          p = q;
+        }
+        break;
+      case 8:
+        ;
+        break;
+      case 10:
+        {
+          g = mem[p + 1].hh.v.LH;
+          x = x + mem[g + 1].cint;
+          o = mem[g].hh.b0;
+          totalstretch[o]= totalstretch[o]+ mem[g + 2].cint;
+          o = mem[g].hh.b1;
+          totalshrink[o]= totalshrink[o]+ mem[g + 3].cint;
+          if (mem[p].hh.b1 >= 100) {
+            g = mem[p + 1].hh.v.RH;
+            if (mem[g + 3].cint > h)
+              h = mem[g + 3].cint;
+            if (mem[g + 2].cint > d)
+              d = mem[g + 2].cint;
+          }
+        }
+        break;
+      case 11:
+      case 9:
+        x = x + mem[p + 1].cint;
+        break;
+      case 6:
+        {
+          mem[lig_trick]= mem[p + 1];
+          mem[lig_trick].hh.v.RH = mem[p].hh.v.RH;
+          p = lig_trick;
+          goto lab21;
+        }
+        break;
+      default:
+        ;
+        break;
+      }
+      p = mem[p].hh.v.RH;
+    }
+  }
   if (adjust_tail != 0)
-  {
-    while(mem[q].hh.v.RH != p)q = mem[q].hh.v.RH; 
-    if (mem[p].hh.b0 == 5)
-    {
-      mem[adjust_tail].hh.v.RH = mem[p + 1].cint; 
-      while(mem[adjust_tail].hh.v.RH != 0)adjust_tail = mem[
-      adjust_tail].hh.v.RH; 
-      p = mem[p].hh.v.RH; 
-      free_node(mem[q].hh.v.RH, 2); 
-    } 
-    else {
-        
-      mem[adjust_tail].hh.v.RH = p; 
-      adjust_tail = p; 
-      p = mem[p].hh.v.RH; 
-    } 
-    mem[q].hh.v.RH = p; 
-    p = q; 
-  } 
-  break; 
-      case 8 : 
-  ; 
-  break; 
-      case 10 : 
-  {
-    g = mem[p + 1].hh.v.LH; 
-    x = x + mem[g + 1].cint; 
-    o = mem[g].hh.b0; 
-    totalstretch[o]= totalstretch[o]+ mem[g + 2].cint; 
-    o = mem[g].hh.b1; 
-    totalshrink[o]= totalshrink[o]+ mem[g + 3].cint; 
-    if (mem[p].hh.b1 >= 100)
-    {
-      g = mem[p + 1].hh.v.RH; 
-      if (mem[g + 3].cint > h)
-      h = mem[g + 3].cint; 
-      if (mem[g + 2].cint > d)
-      d = mem[g + 2].cint; 
-    } 
-  } 
-  break; 
-      case 11 : 
-      case 9 : 
-  x = x + mem[p + 1].cint; 
-  break; 
-      case 6 : 
-  {
-    mem[lig_trick]= mem[p + 1]; 
-    mem[lig_trick].hh.v.RH = mem[p].hh.v.RH; 
-    p = lig_trick; 
-    goto lab21; 
-  } 
-  break; 
-  default: 
-  ; 
-  break; 
-      } 
-      p = mem[p].hh.v.RH; 
-    } 
-  } 
-  if (adjust_tail != 0)
-  mem[adjust_tail].hh.v.RH = 0; 
-  mem[r + 3].cint = h; 
-  mem[r + 2].cint = d; 
+    mem[adjust_tail].hh.v.RH = 0;
+  mem[r + 3].cint = h;
+  mem[r + 2].cint = d;
   if (m == 1)
-  w = x + w; 
-  mem[r + 1].cint = w; 
-  x = w - x; 
-  if (x == 0)
-  {
-    mem[r + 5].hh.b0 = 0; 
-    mem[r + 5].hh.b1 = 0; 
-    mem[r + 6].gr = 0.0; 
-    goto lab10; 
-  } 
-  else if (x > 0)
-  {
-    if (totalstretch[3]!= 0)
-    o = 3; 
-    else if (totalstretch[2]!= 0)
-    o = 2; 
-    else if (totalstretch[1]!= 0)
-    o = 1; 
-    else o = 0; 
-    mem[r + 5].hh.b1 = o; 
-    mem[r + 5].hh.b0 = 1; 
+    w = x + w;
+  mem[r + 1].cint = w;
+  x = w - x;
+  if (x == 0) {
+    mem[r + 5].hh.b0 = 0;
+    mem[r + 5].hh.b1 = 0;
+    mem[r + 6].gr = 0.0;
+    goto lab10;
+  } else if (x > 0) {
+    if (totalstretch[3] != 0)
+      o = 3; 
+    else if (totalstretch[2] != 0)
+      o = 2;
+    else if (totalstretch[1] != 0)
+      o = 1;
+    else
+      o = 0;
+    mem[r + 5].hh.b1 = o;
+    mem[r + 5].hh.b0 = 1;
 /* if total_stretch[o]<>0 then glue_set(r):=... l.12982 */
     if (totalstretch[o]!= 0)
-    mem[r + 6].gr = x / ((double) totalstretch[o]); 
+      mem[r + 6].gr = x / ((double) totalstretch[o]); 
     else {
-  
-      mem[r + 5].hh.b0 = 0; 
-      mem[r + 6].gr = 0.0; 
-    } 
+      mem[r + 5].hh.b0 = 0;
+      mem[r + 6].gr = 0.0;
+    }
 /* if o=normal then if list_ptr(r)<>null then l.12987 */
     if (o == 0)
-    if (mem[r + 5].hh.v.RH != 0)
-    {
-      last_badness = badness(x, totalstretch[0]); 
-      if (last_badness > eqtb[(hash_size + 3189)].cint)
+      if (mem[r + 5].hh.v.RH != 0)
       {
-  print_ln (); 
-  if (last_badness > 100)
-    print_nl("Underfull");
-  else print_nl("Loose");
-  print_string("\\hbox (badness ");
-  print_int(last_badness); 
-  if (last_badness > 100) underfull_hbox++;   /* 1996/Feb/9 */
-  goto lab50; 
-      } 
-    } 
-    goto lab10; 
-  } 
-  else {
-    if (totalshrink[3]!= 0)
-    o = 3; 
-    else if (totalshrink[2]!= 0)
-    o = 2; 
-    else if (totalshrink[1]!= 0)
-    o = 1; 
-    else o = 0; 
-    mem[r + 5].hh.b1 = o; 
-    mem[r + 5].hh.b0 = 2; 
-    if (totalshrink[o]!= 0)
-    mem[r + 6].gr =(- (integer) x) / ((double) totalshrink[o]); 
+        last_badness = badness(x, totalstretch[0]);
+        if (last_badness > eqtb[(hash_size + 3189)].cint) {
+          print_ln();
+          if (last_badness > 100)
+            print_nl("Underfull");
+          else
+            print_nl("Loose");
+          print_string(" \\hbox (badness ");
+          print_int(last_badness);
+          if (last_badness > 100)
+            underfull_hbox++;   /* 1996/Feb/9 */
+          goto lab50;
+        }
+      }
+      goto lab10;
+  } else {
+    if (totalshrink[3] != 0)
+      o = 3; 
+    else if (totalshrink[2] != 0)
+      o = 2;
+    else if (totalshrink[1] != 0)
+      o = 1;
+    else
+      o = 0;
+    mem[r + 5].hh.b1 = o;
+    mem[r + 5].hh.b0 = 2;
+    if (totalshrink[o] != 0)
+      mem[r + 6].gr =(- (integer) x) / ((double) totalshrink[o]);
     else {
-  
-      mem[r + 5].hh.b0 = 0; 
-      mem[r + 6].gr = 0.0; 
+      mem[r + 5].hh.b0 = 0;
+      mem[r + 6].gr = 0.0;
     } 
 /* if (total_shrink[o]<-x)and(o=normal)and(list_ptr(r)<>null) then l.13946 */
-    if ((totalshrink[o]< - (integer) x)&&(o == 0)&&(mem[r + 5].hh.v.RH != 0)) 
-    {
-      last_badness = 1000000L; 
+    if ((totalshrink[o]< - (integer) x) && (o == 0) && (mem[r + 5].hh.v.RH != 0)) {
+      last_badness = 1000000L;
 /*   set_glue_ratio_one(glue_set(r)); {use the maximum shrinkage} */
-      mem[r + 6].gr = 1.0; 
+      mem[r + 6].gr = 1.0;
 /* if (-x-total_shrink[normal]>hfuzz)or(hbadness<100) then */
-      if ((- (integer) x - totalshrink[0]> eqtb[(hash_size + 3738)].cint)||(
-      eqtb[(hash_size + 3189)].cint < 100)) 
-      {
-  if ((eqtb[(hash_size + 3746)].cint > 0)&&(- (integer) x - totalshrink[0 
-  ] > eqtb[(hash_size + 3738)].cint)) 
-  {
-    while(mem[q].hh.v.RH != 0)q = mem[q].hh.v.RH; 
-    mem[q].hh.v.RH = new_rule (); 
-    mem[mem[q].hh.v.RH + 1].cint = eqtb[(hash_size + 3746)].cint; 
-  } 
-  print_ln (); 
-  print_nl("Overfull \\hbox(");    /* */
-  print_scaled(- (integer) x - totalshrink[0]); 
-  print_string("pt too wide");
-  overfull_hbox++;      /* 1996/Feb/9 */
-  goto lab50; 
-      } 
-    } 
-    else if (o == 0)
-    if (mem[r + 5].hh.v.RH != 0)
-    {
-      last_badness = badness(- (integer) x, totalshrink[0]); 
-      if (last_badness > eqtb[(hash_size + 3189)].cint)
-      {
-  print_ln (); 
-  print_nl("Tight \\hbox (badness ");  /*  */
-  print_int(last_badness); 
-  goto lab50; 
-      } 
-    } 
-    goto lab10; 
-  } 
-  lab50: if (output_active)
-  print_string(")has occurred while \\output is active");
+      if ((- (integer) x - totalshrink[0] > eqtb[(hash_size + 3738)].cint) || 
+        (eqtb[(hash_size + 3189)].cint < 100)) {
+          if ((eqtb[(hash_size + 3746)].cint > 0) &&
+            (- (integer) x - totalshrink[0] > eqtb[(hash_size + 3738)].cint)) {
+              while(mem[q].hh.v.RH != 0)q = mem[q].hh.v.RH;
+              mem[q].hh.v.RH = new_rule();
+              mem[mem[q].hh.v.RH + 1].cint = eqtb[(hash_size + 3746)].cint;
+          }
+          print_ln();
+          print_nl("Overfull \\hbox(");
+          print_scaled(- (integer) x - totalshrink[0]);
+          print_string("pt too wide");
+          overfull_hbox++;      /* 1996/Feb/9 */
+          goto lab50;
+      }
+    } else if (o == 0)
+      if (mem[r + 5].hh.v.RH != 0) {
+        last_badness = badness(- (integer) x, totalshrink[0]);
+        if (last_badness > eqtb[(hash_size + 3189)].cint) {
+          print_ln();
+          print_nl("Tight \\hbox (badness ");
+          print_int(last_badness);
+          goto lab50;
+        }
+      }
+      goto lab10; 
+  }
+lab50:
+  if (output_active)
+    print_string(") has occurred while \\output is active");
   else {
-      
-    if (pack_begin_line != 0)
-    {
+    if (pack_begin_line != 0) {
       if (pack_begin_line > 0)
-      print_string(")in paragraph at lines ");
-      else print_string(")in alignment at lines ");
-      print_int(abs(pack_begin_line)); 
+        print_string(")in paragraph at lines ");
+      else
+        print_string(")in alignment at lines ");
+      print_int(abs(pack_begin_line));
       print_string("--");
-    } 
-    else print_string(")detected at line ");
-    print_int(line); 
-  } 
-  print_ln (); 
-  font_in_short_display = 0; 
-  short_display(mem[r + 5].hh.v.RH); 
-  print_ln (); 
-  begin_diagnostic (); 
-  show_box(r); 
-  end_diagnostic(true); 
-  lab10: Result = r; 
-  return Result; 
-} 
+    } else print_string(")detected at line ");
+    print_int(line);
+  }
+  print_ln();
+  font_in_short_display = 0;
+  short_display(mem[r + 5].hh.v.RH);
+  print_ln();
+  begin_diagnostic();
+  show_box(r);
+  end_diagnostic(true);
+lab10:
+  Result = r;
+  return Result;
+}
 halfword vpackage_(halfword p, scaled h, small_number m, scaled l)
-{/* 50 10 */ register halfword Result; 
-  halfword r; 
-  scaled w, d, x; 
-  scaled s; 
-  halfword g; 
+{
+  register halfword Result;
+  halfword r;
+  scaled w, d, x;
+  scaled s;
+  halfword g;
 /*  glue_ord o;  */
   int o;              /* 95/Jan/7 */
-  last_badness = 0; 
-  r = get_node(7); 
-  mem[r].hh.b0 = 1; 
-  mem[r].hh.b1 = 0; 
-  mem[r + 4].cint = 0; 
-  mem[r + 5].hh.v.RH = p; 
-  w = 0; 
-  d = 0; 
-  x = 0; 
-  totalstretch[0]= 0; 
-  totalshrink[0]= 0; 
-  totalstretch[1]= 0; 
-  totalshrink[1]= 0; 
-  totalstretch[2]= 0; 
-  totalshrink[2]= 0; 
-  totalstretch[3]= 0; 
-  totalshrink[3]= 0; 
+  last_badness = 0;
+  r = get_node(7);
+  mem[r].hh.b0 = 1;
+  mem[r].hh.b1 = 0;
+  mem[r + 4].cint = 0;
+  mem[r + 5].hh.v.RH = p;
+  w = 0;
+  d = 0;
+  x = 0;
+  totalstretch[0] = 0;
+  totalshrink[0] = 0;
+  totalstretch[1] = 0;
+  totalshrink[1] = 0;
+  totalstretch[2] = 0;
+  totalshrink[2] = 0;
+  totalstretch[3] = 0;
+  totalshrink[3] = 0;
   while (p != 0) {
     if ((p >= hi_mem_min)) {
-    confusion("vpack");
-    return 0;       // abort_flag set
-  }
-    else switch(mem[p].hh.b0)
-    {case 0 : 
-    case 1 : 
-    case 2 : 
-    case 13 : 
+      confusion("vpack");
+      return 0;       // abort_flag set
+    } else switch (mem[p].hh.b0)
+    {
+    case 0:
+    case 1:
+    case 2:
+    case 13:
       {
-  x = x + d + mem[p + 3].cint; 
-  d = mem[p + 2].cint; 
-  if (mem[p].hh.b0 >= 2)
-  s = 0; 
-  else s = mem[p + 4].cint; 
-  if (mem[p + 1].cint + s > w)
-  w = mem[p + 1].cint + s; 
-      } 
-      break; 
-    case 8 : 
-   ; 
-      break; 
-    case 10 : 
+        x = x + d + mem[p + 3].cint;
+        d = mem[p + 2].cint;
+        if (mem[p].hh.b0 >= 2)
+          s = 0;
+        else s = mem[p + 4].cint;
+        if (mem[p + 1].cint + s > w)
+          w = mem[p + 1].cint + s;
+      }
+      break;
+    case 8:
+      ;
+      break;
+    case 10:
       {
-  x = x + d; 
-  d = 0; 
-  g = mem[p + 1].hh.v.LH; 
-  x = x + mem[g + 1].cint; 
-  o = mem[g].hh.b0; 
-  totalstretch[o]= totalstretch[o]+ mem[g + 2].cint; 
-  o = mem[g].hh.b1; 
-  totalshrink[o]= totalshrink[o]+ mem[g + 3].cint; 
-  if (mem[p].hh.b1 >= 100)
-  {
-    g = mem[p + 1].hh.v.RH; 
-    if (mem[g + 1].cint > w)
-    w = mem[g + 1].cint; 
-  } 
-      } 
-      break; 
-    case 11 : 
+        x = x + d;
+        d = 0;
+        g = mem[p + 1].hh.v.LH;
+        x = x + mem[g + 1].cint;
+        o = mem[g].hh.b0;
+        totalstretch[o] = totalstretch[o]+ mem[g + 2].cint;
+        o = mem[g].hh.b1;
+        totalshrink[o]= totalshrink[o]+ mem[g + 3].cint;
+        if (mem[p].hh.b1 >= 100) {
+          g = mem[p + 1].hh.v.RH;
+          if (mem[g + 1].cint > w)
+            w = mem[g + 1].cint;
+        }
+      }
+      break;
+    case 11:
       {
-  x = x + d + mem[p + 1].cint; 
-  d = 0; 
-      } 
-      break; 
-      default: 
-   ; 
-      break; 
-    } 
-    p = mem[p].hh.v.RH; 
-  } 
-  mem[r + 1].cint = w; 
-  if (d > l)
-  {
-    x = x + d - l; 
-    mem[r + 2].cint = l; 
-  } 
-  else mem[r + 2].cint = d; 
+        x = x + d + mem[p + 1].cint;
+        d = 0;
+      }
+      break;
+      default:
+        ;
+      break;
+    }
+    p = mem[p].hh.v.RH;
+  }
+  mem[r + 1].cint = w;
+  if (d > l) {
+    x = x + d - l;
+    mem[r + 2].cint = l;
+  } else mem[r + 2].cint = d;
   if (m == 1)
-  h = x + h; 
-  mem[r + 3].cint = h; 
-  x = h - x; 
-  if (x == 0)
-  {
-    mem[r + 5].hh.b0 = 0; 
-    mem[r + 5].hh.b1 = 0; 
-    mem[r + 6].gr = 0.0; 
-    goto lab10; 
-  } 
-  else if (x > 0)
-  {
-    if (totalstretch[3]!= 0)
-    o = 3; 
+    h = x + h;
+  mem[r + 3].cint = h;
+  x = h - x;
+  if (x == 0) {
+    mem[r + 5].hh.b0 = 0;
+    mem[r + 5].hh.b1 = 0;
+    mem[r + 6].gr = 0.0;
+    goto lab10;
+  } else if (x > 0) {
+    if (totalstretch[3] != 0)
+      o = 3;
     else if (totalstretch[2]!= 0)
-    o = 2; 
+      o = 2;
     else if (totalstretch[1]!= 0)
-    o = 1; 
-    else o = 0; 
-    mem[r + 5].hh.b1 = o; 
-    mem[r + 5].hh.b0 = 1; 
-    if (totalstretch[o]!= 0)
-    mem[r + 6].gr = x / ((double) totalstretch[o]); 
+      o = 1;
+    else
+      o = 0;
+    mem[r + 5].hh.b1 = o;
+    mem[r + 5].hh.b0 = 1;
+    if (totalstretch[o] != 0)
+      mem[r + 6].gr = x / ((double) totalstretch[o]);
     else {
-  
-      mem[r + 5].hh.b0 = 0; 
-      mem[r + 6].gr = 0.0; 
-    } 
+      mem[r + 5].hh.b0 = 0;
+      mem[r + 6].gr = 0.0;
+    }
     if (o == 0)
-    if (mem[r + 5].hh.v.RH != 0)
-    {
-      last_badness = badness(x, totalstretch[0]); 
-      if (last_badness > eqtb[(hash_size + 3190)].cint)
-      {
-  print_ln (); 
-  if (last_badness > 100)
-    print_nl("Underfull");      /*  */
-  else print_nl("Loose");     /*  */
-  print_string("\\vbox (badness");
-  print_int(last_badness); 
-  if (last_badness > 100)underfull_vbox++; /* 1996/Feb/9 */
-  goto lab50; 
-      } 
-    } 
-    goto lab10; 
-  } 
-  else {
-      
-    if (totalshrink[3]!= 0)
-    o = 3; 
-    else if (totalshrink[2]!= 0)
-    o = 2; 
+      if (mem[r + 5].hh.v.RH != 0) {
+        last_badness = badness(x, totalstretch[0]);
+        if (last_badness > eqtb[(hash_size + 3190)].cint) {
+          print_ln();
+          if (last_badness > 100)
+            print_nl("Underfull");
+          else
+            print_nl("Loose");
+          print_string(" \\vbox (badness ");
+          print_int(last_badness);
+          if (last_badness > 100)
+            underfull_vbox++; /* 1996/Feb/9 */
+          goto lab50;
+        }
+      }
+      goto lab10;
+  } else {
+    if (totalshrink[3] != 0)
+      o = 3;
+    else if (totalshrink[2] != 0)
+      o = 2;
     else if (totalshrink[1]!= 0)
-    o = 1; 
-    else o = 0; 
-    mem[r + 5].hh.b1 = o; 
-    mem[r + 5].hh.b0 = 2; 
+      o = 1;
+    else
+      o = 0;
+    mem[r + 5].hh.b1 = o;
+    mem[r + 5].hh.b0 = 2;
     if (totalshrink[o]!= 0)
-    mem[r + 6].gr =(- (integer) x)/ ((double) totalshrink[o]); 
+      mem[r + 6].gr =(- (integer) x)/ ((double) totalshrink[o]);
     else {
-  
-      mem[r + 5].hh.b0 = 0; 
-      mem[r + 6].gr = 0.0; 
-    } 
+      mem[r + 5].hh.b0 = 0;
+      mem[r + 6].gr = 0.0;
+    }
 /* if (total_shrink[o]<-x)and(o=normal)and(list_ptr(r)<>null) then l.13046 */
-    if ((totalshrink[o]< - (integer) x)&&(o == 0)&&(mem[r + 5 
-  ].hh.v.RH != 0)) 
-    {
-      last_badness = 1000000L; 
-      mem[r + 6].gr = 1.0; 
-      if ((- (integer) x - totalshrink[0]> eqtb[(hash_size + 3739)].cint)||(
-      eqtb[(hash_size + 3190)].cint < 100)) 
-      {
-  print_ln (); 
-  print_nl("Overfull \\vbox(");  /* */
-  print_scaled(- (integer) x - totalshrink[0]); 
-  print_string("pt too high");
-  overfull_vbox++;    /* 1996/Feb/9 */
-  goto lab50; 
-      } 
-    } 
+    if ((totalshrink[o] < - (integer) x) && (o == 0) && (mem[r + 5].hh.v.RH != 0)) {
+      last_badness = 1000000L;
+      mem[r + 6].gr = 1.0;
+      if ((- (integer) x - totalshrink[0] > eqtb[(hash_size + 3739)].cint) || 
+        (eqtb[(hash_size + 3190)].cint < 100)) {
+          print_ln();
+          print_nl("Overfull \\vbox(");
+          print_scaled(- (integer) x - totalshrink[0]);
+          print_string("pt too high");
+          overfull_vbox++;    /* 1996/Feb/9 */
+          goto lab50;
+      }
+    }
 /* else if o=normal then if list_ptr(r)<>null then l.13052  */
     else if (o == 0)
-    if (mem[r + 5].hh.v.RH != 0)
-    {
-      last_badness = badness(- (integer) x, totalshrink[0]); 
-      if (last_badness > eqtb[(hash_size + 3190)].cint)
-      {
-  print_ln (); 
-  print_nl("Tight \\vbox (badness ");  /*  */
-  print_int(last_badness); 
-  goto lab50; 
-      } 
-    } 
+      if (mem[r + 5].hh.v.RH != 0) {
+        last_badness = badness(- (integer) x, totalshrink[0]); 
+        if (last_badness > eqtb[(hash_size + 3190)].cint) {
+          print_ln();
+          print_nl("Tight \\vbox (badness ");
+          print_int(last_badness);
+          goto lab50;
+        }
+      }
     goto lab10; 
-  } 
-  lab50: if (output_active)
-  print_string(")has occurred while \\output is active");
+  }
+lab50:
+  if (output_active)
+    print_string(") has occurred while \\output is active");
   else {
-    if (pack_begin_line != 0)
-    {
-      print_string(")in alignment at lines ");
-      print_int(abs(pack_begin_line)); 
+    if (pack_begin_line != 0) {
+      print_string(") in alignment at lines ");
+      print_int(abs(pack_begin_line));
       print_string("--");
-    } 
-    else print_string(")detected at line ");
-    print_int(line); 
-    print_ln (); 
-  } 
-  begin_diagnostic (); 
-  show_box(r); 
-  end_diagnostic(true); 
-  lab10: Result = r; 
-  return Result; 
-} 
+    } else print_string(")detected at line ");
+    print_int(line);
+    print_ln();
+  }
+  begin_diagnostic();
+  show_box(r);
+  end_diagnostic(true);
+lab10:
+  Result = r;
+  return Result;
+}
 void append_to_vlist_(halfword b)
 { 
   scaled d; 
   halfword p; 
-  if (cur_list.aux_field.cint > ignore_depth)
-  {
-    d = mem[eqtb[(hash_size + 783)].hh.v.RH + 1].cint - cur_list.aux_field.cint - 
-    mem[b + 3].cint; 
+  if (cur_list.aux_field.cint > ignore_depth) {
+    d = mem[eqtb[(hash_size + 783)].hh.v.RH + 1].cint - cur_list.aux_field.cint - mem[b + 3].cint;
     if (d < eqtb[(hash_size + 3732)].cint)
-    p = new_param_glue(0); 
+      p = new_param_glue(0);
     else {
-      p = new_skip_param(1); 
-      mem[temp_ptr + 1].cint = d; 
-    } 
-    mem[tail].hh.v.RH = p; 
-    tail = p; 
-  } 
-  mem[tail].hh.v.RH = b; 
-  tail = b; 
-  cur_list.aux_field.cint = mem[b + 2].cint; 
-} 
+      p = new_skip_param(1);
+      mem[temp_ptr + 1].cint = d;
+    }
+    mem[tail].hh.v.RH = p;
+    tail = p;
+  }
+  mem[tail].hh.v.RH = b;
+  tail = b;
+  cur_list.aux_field.cint = mem[b + 2].cint;
+}
 halfword new_noad (void) 
-{register halfword Result; 
-  halfword p; 
-  p = get_node(4); 
-  mem[p].hh.b0 = 16; 
-  mem[p].hh.b1 = 0; 
-  mem[p + 1].hh = empty_field; 
-  mem[p + 3].hh = empty_field; 
-  mem[p + 2].hh = empty_field; 
-  Result = p; 
-  return Result; 
+{
+  register halfword Result;
+  halfword p;
+  p = get_node(4);
+  mem[p].hh.b0 = 16;
+  mem[p].hh.b1 = 0;
+  mem[p + 1].hh = empty_field;
+  mem[p + 3].hh = empty_field;
+  mem[p + 2].hh = empty_field;
+  Result = p;
+  return Result;
 } 
 halfword new_style_(small_number s)
-{register halfword Result; 
-  halfword p; 
-  p = get_node(3); 
-  mem[p].hh.b0 = 14; 
-  mem[p].hh.b1 = s; 
-  mem[p + 1].cint = 0; 
-  mem[p + 2].cint = 0; 
-  Result = p; 
-  return Result; 
-} 
-halfword new_choice (void) 
 {
-  register halfword Result; 
-  halfword p; 
-  p = get_node(3); 
-  mem[p].hh.b0 = 15; 
-  mem[p].hh.b1 = 0; 
-  mem[p + 1].hh.v.LH = 0; 
-  mem[p + 1].hh.v.RH = 0; 
-  mem[p + 2].hh.v.LH = 0; 
-  mem[p + 2].hh.v.RH = 0; 
-  Result = p; 
-  return Result; 
-} 
-void show_info (void) 
-{ 
-  show_node_list(mem[temp_ptr].hh.v.LH); 
-} 
+  register halfword Result;
+  halfword p;
+  p = get_node(3);
+  mem[p].hh.b0 = 14;
+  mem[p].hh.b1 = s;
+  mem[p + 1].cint = 0;
+  mem[p + 2].cint = 0;
+  Result = p;
+  return Result;
+}
+halfword new_choice (void)
+{
+  register halfword Result;
+  halfword p;
+  p = get_node(3);
+  mem[p].hh.b0 = 15;
+  mem[p].hh.b1 = 0;
+  mem[p + 1].hh.v.LH = 0;
+  mem[p + 1].hh.v.RH = 0;
+  mem[p + 2].hh.v.LH = 0;
+  mem[p + 2].hh.v.RH = 0;
+  Result = p;
+  return Result;
+}
+void show_info (void)
+{
+  show_node_list(mem[temp_ptr].hh.v.LH);
+}
 halfword fraction_rule_(scaled t)
 {
   register halfword Result;
-  halfword p; 
-  p = new_rule (); 
-  mem[p + 3].cint = t; 
-  mem[p + 2].cint = 0; 
-  Result = p; 
-  return Result; 
-} 
+  halfword p;
+  p = new_rule();
+  mem[p + 3].cint = t;
+  mem[p + 2].cint = 0;
+  Result = p;
+  return Result;
+}
 halfword overbar_(halfword b, scaled k, scaled t)
 {
   register halfword Result;
-  halfword p, q; 
-  p = new_kern(k); 
-  mem[p].hh.v.RH = b; 
-  q = fraction_rule(t); 
-  mem[q].hh.v.RH = p; 
-  p = new_kern(t); 
-  mem[p].hh.v.RH = q; 
+  halfword p, q;
+  p = new_kern(k);
+  mem[p].hh.v.RH = b;
+  q = fraction_rule(t);
+  mem[q].hh.v.RH = p;
+  p = new_kern(t);
+  mem[p].hh.v.RH = q;
   Result = vpackage(p, 0, 1, 1073741823L); /* 2^30 - 1 */
-  return Result; 
-} 
+  return Result;
+}
 halfword char_box_(internal_font_number f, quarterword c)
 {
   register halfword Result;
-  ffourquarters q; 
-  eight_bits hd; 
-  halfword b, p; 
-  q = font_info[char_base[f]+ c].qqqq; 
-  hd = q.b1; 
-  b = new_null_box (); 
-  mem[b + 1].cint = font_info[width_base[f]+ q.b0].cint + font_info 
- [italic_base[f]+(q.b2)/ 4].cint; 
-  mem[b + 3].cint = font_info[height_base[f]+(hd)/ 16].cint; 
-  mem[b + 2].cint = font_info[depth_base[f]+(hd)% 16].cint; 
+  ffourquarters q;
+  eight_bits hd;
+  halfword b, p;
+  q = font_info[char_base[f]+ c].qqqq;
+  hd = q.b1;
+  b = new_null_box();
+  mem[b + 1].cint = font_info[width_base[f]+ q.b0].cint + font_info[italic_base[f]+(q.b2) / 4].cint;
+  mem[b + 3].cint = font_info[height_base[f]+(hd) / 16].cint;
+  mem[b + 2].cint = font_info[depth_base[f]+(hd) % 16].cint;
 /*  long to unsigned short ... */
-  p = get_avail (); 
-  mem[p].hh.b1 = c; 
-  mem[p].hh.b0 = f; 
-  mem[b + 5].hh.v.RH = p; 
-  Result = b; 
-  return Result; 
-} 
+  p = get_avail();
+  mem[p].hh.b1 = c;
+  mem[p].hh.b0 = f;
+  mem[b + 5].hh.v.RH = p;
+  Result = b;
+  return Result;
+}
 void stack_into_box_(halfword b, internal_font_number f, quarterword c)
 {
-  halfword p; 
-  p = char_box(f, c); 
-  mem[p].hh.v.RH = mem[b + 5].hh.v.RH; 
-  mem[b + 5].hh.v.RH = p; 
-  mem[b + 3].cint = mem[p + 3].cint; 
+  halfword p;
+  p = char_box(f, c);
+  mem[p].hh.v.RH = mem[b + 5].hh.v.RH;
+  mem[b + 5].hh.v.RH = p;
+  mem[b + 3].cint = mem[p + 3].cint;
 } 
 scaled height_plus_depth_(internal_font_number f, fquarterword c)
 {
-  register scaled Result; 
-  ffourquarters q; 
-  eight_bits hd; 
-  q = font_info[char_base[f]+ c].qqqq; 
-  hd = q.b1; 
-  Result = font_info[height_base[f]+(hd)/ 16].cint + font_info[
-  depth_base[f]+(hd)% 16].cint; 
-  return Result; 
-} 
+  register scaled Result;
+  ffourquarters q;
+  eight_bits hd;
+  q = font_info[char_base[f]+ c].qqqq;
+  hd = q.b1;
+  Result = font_info[height_base[f]+(hd)/ 16].cint + font_info[depth_base[f]+(hd) % 16].cint;
+  return Result;
+}
 halfword var_delimiter_(halfword d, small_number s, scaled v)
 {
-  register halfword Result; 
-  halfword b; 
-  internal_font_number f, g; 
-  quarterword c, x, y; 
-  integer m, n; 
-  scaled u; 
-  scaled w; 
-  ffourquarters q; 
-  ffourquarters r; 
-  eight_bits hd; 
+  register halfword Result;
+  halfword b;
+  internal_font_number f, g;
+  quarterword c, x, y;
+  integer m, n;
+  scaled u;
+  scaled w;
+  ffourquarters q;
+  ffourquarters r;
+  eight_bits hd;
 /*  small_number z;  */
   int z;                  /* 95/Jan/7 */
 /*  bool largeattempt;  */
   int largeattempt;           /* 95/Jan/7 */
-  f = 0; 
-  w = 0; 
-  largeattempt = false; 
-  z = mem[d].qqqq.b0; 
-  x = mem[d].qqqq.b1; 
+  f = 0;
+  w = 0;
+  largeattempt = false;
+  z = mem[d].qqqq.b0;
+  x = mem[d].qqqq.b1;
   while (true) {
-    if ((z != 0)||(x != 0)) 
-    {
-      z = z + s + 16; 
+    if ((z != 0) || (x != 0)) {
+      z = z + s + 16;
       do {
-    z = z - 16; 
-  g = eqtb[(hash_size + 1835) + z].hh.v.RH; 
-  if (g != 0)
-  {
-    y = x; 
-    if ((y >= font_bc[g])&&(y <= font_ec[g])) 
-    {
-      lab22: q = font_info[char_base[g]+ y].qqqq; 
-      if ((q.b0 > 0)) 
-      {
-        if (((q.b2)% 4)== 3)
-        {
-    f = g; 
-    c = y; 
-    goto lab40; 
-        } 
-        hd = q.b1; 
-        u = font_info[height_base[g]+(hd)/ 16].cint + font_info 
-       [depth_base[g]+(hd)% 16].cint; 
-        if (u > w)
-        {
-    f = g; 
-    c = y; 
-    w = u; 
-    if (u >= v)
-    goto lab40; 
-        } 
-        if (((q.b2)% 4)== 2)
-        {
-    y = q.b3; 
-    goto lab22; 
-        } 
-      } 
-    } 
-  } 
-      } while(!(z < 16)); 
+        z = z - 16;
+        g = eqtb[(hash_size + 1835) + z].hh.v.RH;
+        if (g != 0) {
+          y = x;
+          if ((y >= font_bc[g]) && (y <= font_ec[g])) {
+lab22:
+            q = font_info[char_base[g]+ y].qqqq;
+            if ((q.b0 > 0)) {
+              if (((q.b2) % 4) == 3) {
+                f = g;
+                c = y;
+                goto lab40;
+              }
+              hd = q.b1;
+              u = font_info[height_base[g]+(hd)/ 16].cint + font_info[depth_base[g]+(hd)% 16].cint;
+              if (u > w) {
+                f = g;
+                c = y;
+                w = u;
+                if (u >= v)
+                  goto lab40;
+              }
+              if (((q.b2)% 4)== 2) {
+                y = q.b3;
+                goto lab22;
+              }
+            }
+          }
+        }
+      } while (!(z < 16));
     } 
     if (largeattempt)
-    goto lab40; 
-    largeattempt = true; 
-    z = mem[d].qqqq.b2; 
-    x = mem[d].qqqq.b3; 
-  } 
-  lab40: if (f != 0)
-  if (((q.b2)% 4)== 3)   /* q may be used without ... */
-  {
-    b = new_null_box (); 
-    mem[b].hh.b0 = 1; 
-    r = font_info[exten_base[f]+ q.b3].qqqq; 
-    c = r.b3; 
-    u = height_plus_depth(f, c); 
-    w = 0; 
-    q = font_info[char_base[f]+ c].qqqq; 
-    mem[b + 1].cint = font_info[width_base[f]+ q.b0].cint + 
-    font_info[italic_base[f]+(q.b2)/ 4].cint; 
-    c = r.b2; 
-    if (c != 0)
-    w = w + height_plus_depth(f, c); 
-    c = r.b1; 
-    if (c != 0)
-    w = w + height_plus_depth(f, c); 
-    c = r.b0; 
-    if (c != 0)
-    w = w + height_plus_depth(f, c); 
-    n = 0; 
-    if (u > 0)
-    while(w < v){
-  
-      w = w + u; 
-      incr(n); 
-      if (r.b1 != 0)
-      w = w + u; 
-    } 
-    c = r.b2; 
-    if (c != 0)
-    stack_into_box(b, f, c); 
-    c = r.b3; 
-    {
-    register integer for_end; 
-    m = 1; 
-    for_end = n; 
-    if (m <= for_end) do 
-      stack_into_box(b, f, c); 
-    while(m++ < for_end);
-  } 
-    c = r.b1; 
-    if (c != 0)
+      goto lab40;
+    largeattempt = true;
+    z = mem[d].qqqq.b2;
+    x = mem[d].qqqq.b3;
+  }
+lab40:
+  if (f != 0)
+    if (((q.b2) % 4)== 3)   /* q may be used without ... */
     {
-      stack_into_box(b, f, c); 
-      c = r.b3; 
-      {
-      register integer for_end; 
-      m = 1; 
-      for_end = n; 
-      if (m <= for_end) do 
-        stack_into_box(b, f, c); 
-      while(m++ < for_end);
-    } 
-    } 
-    c = r.b0; 
-    if (c != 0)
-    stack_into_box(b, f, c); 
-    mem[b + 2].cint = w - mem[b + 3].cint; 
-  } 
-  else b = char_box(f, c); 
+      b = new_null_box(); 
+      mem[b].hh.b0 = 1; 
+      r = font_info[exten_base[f]+ q.b3].qqqq;
+      c = r.b3;
+      u = height_plus_depth(f, c);
+      w = 0;
+      q = font_info[char_base[f]+ c].qqqq;
+      mem[b + 1].cint = font_info[width_base[f]+ q.b0].cint + font_info[italic_base[f]+(q.b2) / 4].cint;
+      c = r.b2;
+      if (c != 0)
+        w = w + height_plus_depth(f, c);
+      c = r.b1;
+      if (c != 0)
+        w = w + height_plus_depth(f, c);
+      c = r.b0; 
+      if (c != 0)
+        w = w + height_plus_depth(f, c);
+      n = 0;
+      if (u > 0)
+        while(w < v) {
+          w = w + u;
+          incr(n);
+          if (r.b1 != 0)
+            w = w + u;
+        }
+        c = r.b2;
+        if (c != 0)
+          stack_into_box(b, f, c); 
+        c = r.b3;
+        {
+          register integer for_end;
+          m = 1;
+          for_end = n;
+          if (m <= for_end) do
+          stack_into_box(b, f, c); 
+          while (m++ < for_end);
+        }
+        c = r.b1;
+        if (c != 0) {
+          stack_into_box(b, f, c); 
+          c = r.b3;
+          {
+            register integer for_end;
+            m = 1;
+            for_end = n;
+            if (m <= for_end) do
+            stack_into_box(b, f, c);
+            while(m++ < for_end);
+          }
+        }
+        c = r.b0;
+        if (c != 0)
+          stack_into_box(b, f, c);
+        mem[b + 2].cint = w - mem[b + 3].cint;
+    } else b = char_box(f, c);
   else {    /* c may be used without ... */
-    b = new_null_box (); 
-    mem[b + 1].cint = eqtb[(hash_size + 3741)].cint; 
+    b = new_null_box();
+    mem[b + 1].cint = eqtb[(hash_size + 3741)].cint;
   } 
-  mem[b + 4].cint = half(mem[b + 3].cint - mem[b + 2].cint)- 
-  font_info[22 + param_base[eqtb[(hash_size + 1837) + s].hh.v.RH]].cint; 
-  Result = b; 
-  return Result; 
+  mem[b + 4].cint = half(mem[b + 3].cint - mem[b + 2].cint) - font_info[22 + param_base[eqtb[(hash_size + 1837) + s].hh.v.RH]].cint; 
+  Result = b;
+  return Result;
 }
 /* rebox_ etc used to follow here in tex4.c */