OSDN Git Service

updated read_font_info.
[putex/putex.git] / src / texsourc / tex3.c
index df2b9ea..4213980 100644 (file)
@@ -1525,8 +1525,8 @@ lab50:
 /* sec 0515 */
 void begin_name (void)
 {
-  area_delimiter = 0; /* index between `file area' and `file name' */
-  ext_delimiter = 0;  /* index between `file name' and `file extension' */
+  area_delimiter = 0;
+  ext_delimiter = 0;
 }
 /* This gathers up a file name and makes a string of it */
 /* Also tries to break it into `file area' `file name' and `file extension' */
@@ -1544,26 +1544,18 @@ bool more_name_(ASCII_code c)
     return true;    /* accept ending quote, but throw away */
   }
   else
-  {
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/*  convert pseudo tilde back to '~' 95/Sep/26 */ /* moved here 97/June/5 */
-/*  if (pseudo_tilde != 0 && c == pseudo_tilde) c = '~'; */
-/*  convert pseudo space back to ' ' 97/June/5 */ /* moved here 97/June/5 */
-/*  if (pseudo_space != 0 && c == pseudo_space) c = ' '; */
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */      
+  {   
     str_room(1);
     append_char(c);
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-//  if ((c == 47))   /* / */
-//  for DOS/Windows
-    if ((c == '/' || c == '\\' || c == ':')) /* 94/Mar/1 */
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+    //  for DOS/Windows
+    if ((c == '/' || c == '\\' || c == ':')) 
     {
       area_delimiter = cur_length;
       ext_delimiter = 0;
     } 
     else if (c == '.')
       ext_delimiter = cur_length;
+
     return true;
   }
 }
@@ -1583,8 +1575,6 @@ int find_string (int start, int end)
   int k, nlen = end - start;
   char *s;
 
-//  int trace_flag = 1;     // debugging only
-
   if (trace_flag)
   {
     sprintf(log_line, "\nLOOKING for string (str_ptr %d nlen %d) ", str_ptr, end - start);
@@ -1686,19 +1676,17 @@ void end_name (void)
 
   if (str_ptr + 3 > current_max_strings)
   {
-    overflow("number of strings", current_max_strings - init_str_ptr);  /* 97/Mar/7 */
+    overflow("number of strings", current_max_strings - init_str_ptr);
     return;     // abort_flag set
   }
 #else
   if (str_ptr + 3 > max_strings)
   {
-    overflow("number of strings", max_strings - init_str_ptr); /* number of strings */
+    overflow("number of strings", max_strings - init_str_ptr);
     return;     // abort_flag set
   }
 #endif
 
-//  if (notfirst++ == 0) show_all_strings();  // debugging only
-  
   if (area_delimiter == 0)   // no area delimiter ':' '/' or '\' found
     cur_area = 335;     // "" default area 
   else
@@ -2118,7 +2106,7 @@ void open_log_file (void)
   old_setting = selector;
 
   if (job_name == 0)
-    job_name = 790;   /* default:  texput */
+    job_name = 790;
 
   pack_job_name(".log");
 
@@ -2133,31 +2121,29 @@ void open_log_file (void)
   log_opened = true;
 
   {
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-  if (want_version)
-  {
-    stamp_it(log_line);         // ??? use log_line ???
-    strcat(log_line, "\n");
-    (void) fputs(log_line, log_file);
-    stampcopy(log_line);
-    strcat(log_line, "\n");
-    (void) fputs(log_line, log_file);
-  }
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/*  also change following in itex.c - bkph */
-  (void) fputs(tex_version, log_file); 
-  (void) fprintf(log_file, " (%s %s)", application, yandyversion);
+    if (want_version)
+    {
+      stamp_it(log_line);
+      strcat(log_line, "\n");
+      (void) fputs(log_line, log_file);
+      stampcopy(log_line);
+      strcat(log_line, "\n");
+      (void) fputs(log_line, log_file);
+    }
+    
+    (void) fputs(tex_version, log_file); 
+    (void) fprintf(log_file, " (%s %s)", application, yandyversion);
 
-  if (format_ident > 0)
-    slow_print(format_ident);     /* bkph */
+    if (format_ident > 0)
+      slow_print(format_ident);
+
+    print_string("  ");
+
+    if (civilize_flag)
+      print_int(year);
+    else
+      print_int(day);
 
-  print_string("  ");
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-  if (civilize_flag)
-    print_int(year);
-  else
-    print_int(day);
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
     print_char(' ');
     months = " JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
 
@@ -2165,16 +2151,16 @@ void open_log_file (void)
       (void) putc(months[k],  log_file);
 
     print_char(' ');
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+
     if (civilize_flag)
       print_int(day);
     else
       print_int(year);
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+
     print_char(' ');
-    print_two(tex_time / 60);  /* hour */
+    print_two(tex_time / 60);
     print_char(':');
-    print_two(tex_time % 60);  /* minute */
+    print_two(tex_time % 60);
   }
 
   input_stack[input_ptr] = cur_input;
@@ -2188,122 +2174,107 @@ void open_log_file (void)
     print(buffer[k]);
 
   print_ln(); 
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/* a good place to show the fmt file name or pool file name ? 94/June/21 */
+
   if (show_fmt_flag)
   {
-    if (string_file != NULL)
-    {
-      fprintf(log_file, "(%s)\n", string_file);
-      free(string_file);  /* this was allocated by strdup in openinou */
-      string_file = NULL;   /* for safety */
-    }
-
     if (format_file != NULL)
     {
       fprintf(log_file, "(%s)\n", format_file);
-      free(format_file);  /* this was allocated by strdup in openinou */
-      format_file = NULL;   /* for safety */
+      free(format_file);
+      format_file = NULL;
     }
   }
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+
   selector = old_setting + 2;
 }
 
 /**************************** start of insertion 98/Feb/7 **************/
-
 // Attempt to deal with foo.bar.tex given as foo.bar on command line
 // Makes copy of job_name with extension
 
-void morenamecopy(ASCII_code c)
+void more_name_copy(ASCII_code c)
 {
 #ifdef ALLOCATESTRING
   if (pool_ptr + 1 > current_pool_size)
     str_pool = realloc_str_pool (increment_pool_size);
 
-  if (pool_ptr + 1 > current_pool_size) /* in case it failed 94/Jan/24 */
+  if (pool_ptr + 1 > current_pool_size)
   {
-    overflow("pool size", current_pool_size - init_pool_ptr); /* 97/Mar/7 */
-    return;     // abort_flag set
+    overflow("pool size", current_pool_size - init_pool_ptr);
+    return;
   }
 #else
   if (pool_ptr + 1 > pool_size)
   {
-    overflow("pool size", pool_size - init_pool_ptr); /* pool size */
-    return;     // abort_flag set
+    overflow("pool size", pool_size - init_pool_ptr);
+    return;
   }
 #endif
+
   str_pool[pool_ptr] = c; 
   incr(pool_ptr);
 }
 
-int endnamecopy(void)
+int end_name_copy(void)
 {
 #ifdef ALLOCATESTRING
-    if (str_ptr + 1 > current_max_strings)
-      str_start = realloc_str_start(increment_max_strings + 1);
+  if (str_ptr + 1 > current_max_strings)
+    str_start = realloc_str_start(increment_max_strings + 1);
 
-    if (str_ptr + 1 > current_max_strings) /* in case it failed 94/Jan/24 */
-    {
-      overflow("number of strings", current_max_strings - init_str_ptr);  /* 97/Mar/7 */
-      return 0;     // abort_flag set
-    }
+  if (str_ptr + 1 > current_max_strings)
+  {
+    overflow("number of strings", current_max_strings - init_str_ptr);
+    return 0;
+  }
 #else
-    if (str_ptr + 1 > max_strings)
-    {
-      overflow("number of strings", max_strings - init_str_ptr); /* number of strings */
-      return 0;     // abort_flag set
-    }
+  if (str_ptr + 1 > max_strings)
+  {
+    overflow("number of strings", max_strings - init_str_ptr);
+    return 0;
+  }
 #endif
-    return make_string();
+
+  return make_string();
 }
 
-/* add extension to job_name */
-void jobnameappend (void)
+void job_name_append (void)
 { 
   int k, n;
-/*  copy job_name */
+
   k = str_start[job_name];
   n = str_start[job_name + 1];
 
   while (k < n)
-    morenamecopy(str_pool[k++]);
-/*  copy `extension' */
+    more_name_copy(str_pool[k++]);
+
   k = str_start[cur_ext];
   n = str_start[cur_ext + 1];
 
   while (k < n)
-    morenamecopy(str_pool[k++]);
+    more_name_copy(str_pool[k++]);
 
-  job_name = endnamecopy();
+  job_name = end_name_copy();
 }
 
 /**************************** end of insertion 98/Feb/7 **************/
 /* sec 0537 */
-void start_input (void)
+void start_input(void)
 {
-  bool addedextension = false;
+  bool added_extension = false;
 
   scan_file_name();
   pack_file_name(cur_name, cur_area, cur_ext); 
 
-  while (true)        /* loop until we get a valid file name */
+  while (true)
   {
-    addedextension = false;
+    added_extension = false;
     begin_file_reading(); 
-/* *** *** *** *** *** following is new in 3.14159 *** *** *** *** *** *** */
-/*  if current extension is *not* empty, try to open using name as is */
-/*  string 335 is "" the empty string */
-/*  should be updated to current Kpathsea. */
+
     if ((cur_ext != 335) && a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
       goto lab30;
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
-/*  we get here if extension is "", or file with extension failed to open */
-/*  if current extension is not `tex,' and `tex' is not irrelevant, try it */
-/*  string 785 is .tex */
+
     if ((cur_ext != 785) && (name_length + 5 < PATHMAX))
     {
-      //strcpy(name_of_file + name_length + 1, ".tex ");
       name_of_file[name_length + 1] = '.';
       name_of_file[name_length + 2] = 't';
       name_of_file[name_length + 3] = 'e';
@@ -2311,57 +2282,53 @@ void start_input (void)
       name_of_file[name_length + 5] = ' ';
       name_length = name_length + 4;
 
-      addedextension = true;
+      added_extension = true;
 
       if (a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
         goto lab30;
 
-      name_length = name_length - 4;      /* strip extension again */
-      name_of_file[name_length + 1] = ' ';  /* ' ' */
-      addedextension = false;
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+      name_length = name_length - 4;
+      name_of_file[name_length + 1] = ' ';
+      added_extension = false;
     }
-/* *** *** *** *** major changes here in 3.14159 *** *** *** *** *** *** */
-/*  string 335 is "" the empty string */
+
     if ((cur_ext == 335) && a_open_in(input_file[cur_input.index_field], TEXINPUTPATH))
       goto lab30;
 
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
     end_file_reading();
     prompt_file_name("input file name", ".tex");
-  }   /* end of while(true)trying to get valid file name */
+  }
 
-/* maybe set  pseudo_tilde = 0  at this point ? 95/Sep/26 */
 lab30: 
   cur_input.name_field = a_make_name_string(input_file[cur_input.index_field]);
 
-  if (job_name == 0)       /* only the first time */
+  if (job_name == 0)
   {
-    job_name = cur_name;        /* here we set the job_name */
-/*  did file name have an `extension' already and we added ".tex" ? */
-    if (cur_ext != 335 && addedextension)     /* 98/Feb/7 */
-      jobnameappend();   /* append `extension' to job_name */
+    job_name = cur_name;
+
+    if (cur_ext != 335 && added_extension)
+      job_name_append();
 
     open_log_file();
   }
 
-  if (term_offset + length(cur_input.name_field) > max_print_line - 2) /* was 3 ? */
+  if (term_offset + length(cur_input.name_field) > max_print_line - 2)
     print_ln();
   else if ((term_offset > 0) || (file_offset > 0))
     print_char(' ');
 
   print_char('(');
-//  print_char('@');       // debugging only marker
   incr(open_parens);
 
   if (open_parens > max_open_parens)
-    max_open_parens = open_parens;    /* 1999/Jan/17 */
+    max_open_parens = open_parens;
 
   slow_print(cur_input.name_field);
-//  print_char('@');       // debugging only marker
+
 #ifndef _WINDOWS
   fflush(stdout);
 #endif
+
   cur_input.state_field = new_line;
 
   {
@@ -2385,7 +2352,7 @@ lab30:
 /* show TEXFONTS=... or format specific  */
 /* only show this if name was not fully qualified ? */
 void show_tex_fonts (void)
-{     /* 98/Jan/28 */
+{
   char *s, *t, *v, *u;
   int n;
 
@@ -2425,14 +2392,11 @@ void show_tex_fonts (void)
 
   print_char(')');
 }
-
-/**********************************************************************/
-/* called only from tex8.c */
 /* sec 0560 */
 internal_font_number read_font_info_(halfword u, str_number nom, str_number aire, scaled s)
 {
   font_index k;
-  bool fileopened;
+  bool file_opened;
 /*  halfword lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np;  */
   halfword lf, lh, nw, nh, nd, ni, nl, nk, ne, np;
 /*  halfword bc, ec; */
@@ -2440,129 +2404,60 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire
   internal_font_number f;
   internal_font_number g;
   eight_bits a, b, c, d;
-  ffourquarters qw;
+  ffour_quarters qw;
   scaled sw;
-  integer bchlabel;
+  integer bch_label;
   short bchar;
   scaled z;
   integer alpha;
   char beta;
 
   g = 0;
-  fileopened = false;
+  file_opened = false;
   pack_file_name(nom, aire, 805); /* .tfm */
 
-  if (!b_open_in(tfm_file)) /* new in C version d */
+  if (!b_open_in(tfm_file))
   {
     goto lab11;
   } 
-/*   was just: goto lab11; */
-  fileopened = true; 
+
+  file_opened = true; 
+
   {
-/*  tfm_temp = getc(tfm_file);  */ /* done already in open_input, but why? */
-    //tfm_temp = getc(tfm_file);
-    {
-      lf = tfm_temp;
-      if (lf > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      lf = lf * 256 + tfm_temp;
-    }
+    read_sixteen(lf);
     tfm_temp = getc(tfm_file);
-    {
-      lh = tfm_temp;
-      if (lh > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      lh = lh * 256 + tfm_temp;
-    }
+    read_sixteen(lh);
     tfm_temp = getc(tfm_file);
-    {
-      bc = tfm_temp;
-      if (bc > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      bc = bc * 256 + tfm_temp;
-    }
+    read_sixteen(bc);
     tfm_temp = getc(tfm_file);
-    {
-      ec = tfm_temp;
-      if (ec > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      ec = ec * 256 + tfm_temp;
-    }
+    read_sixteen(ec);
+
     if ((bc > ec + 1)||(ec > 255))
       goto lab11;
+
     if (bc > 255)
     {
       bc = 1;
       ec = 0;
     }
+
     tfm_temp = getc(tfm_file);
-    {
-      nw = tfm_temp;
-      if (nw > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      nw = nw * 256 + tfm_temp;
-    }
+    read_sixteen(nw);
     tfm_temp = getc(tfm_file);
-    {
-      nh = tfm_temp;
-      if (nh > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      nh = nh * 256 + tfm_temp;
-    }
+    read_sixteen(nh);
     tfm_temp = getc(tfm_file);
-    {
-      nd = tfm_temp;
-      if (nd > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      nd = nd * 256 + tfm_temp;
-    }
+    read_sixteen(nd);
     tfm_temp = getc(tfm_file);
-    {
-      ni = tfm_temp;
-      if (ni > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      ni = ni * 256 + tfm_temp;
-    }
+    read_sixteen(ni);
     tfm_temp = getc(tfm_file);
-    {
-      nl = tfm_temp;
-      if (nl > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      nl = nl * 256 + tfm_temp;
-    }
+    read_sixteen(nl);
     tfm_temp = getc(tfm_file);
-    {
-      nk = tfm_temp;
-      if (nk > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      nk = nk * 256 + tfm_temp;
-    }
+    read_sixteen(nk);
     tfm_temp = getc(tfm_file);
-    {
-      ne = tfm_temp;
-      if (ne > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      ne = ne * 256 + tfm_temp;
-    }
+    read_sixteen(ne);
     tfm_temp = getc(tfm_file);
-    {
-      np = tfm_temp;
-      if (np > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      np = np * 256 + tfm_temp;
-    }
+    read_sixteen(np);
+
     if (lf != 6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np)
       goto lab11;
 
@@ -2574,9 +2469,9 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire
 
   if (np < 7)
     lf = lf + 7 - np;
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
+
 #ifdef ALLOCATEFONT
-  if ((fmem_ptr + lf > current_font_mem_size))   /* 93/Nov/28 */
+  if ((fmem_ptr + lf > current_font_mem_size))
     font_info = realloc_font_info (increment_font_mem_size + lf);
 
   if ((font_ptr == font_max) || (fmem_ptr + lf > current_font_mem_size))
@@ -2631,32 +2526,11 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire
   {
     if (lh < 2)
       goto lab11;
-/*  build the font checksum now */
-    {
-      tfm_temp = getc(tfm_file);
-      a = tfm_temp;
-      qw.b0 = a;
-      tfm_temp = getc(tfm_file);
-      b = tfm_temp;
-      qw.b1 = b;
-      tfm_temp = getc(tfm_file);
-      c = tfm_temp;
-      qw.b2 = c;
-      tfm_temp = getc(tfm_file);
-      d = tfm_temp;
-      qw.b3 = d;
-      font_check[f] = qw;
-    }
-
+    
+    /*  build the font checksum now */
+    store_four_quarters(font_check[f]);
     tfm_temp = getc(tfm_file);
-    {
-      z = tfm_temp;
-      if (z > 127)
-        goto lab11;
-      tfm_temp = getc(tfm_file);
-      z = z * 256 + tfm_temp;
-    }
-
+    read_sixteen(z);
     tfm_temp = getc(tfm_file);
     z = z * 256 + tfm_temp;
     tfm_temp = getc(tfm_file);
@@ -2687,38 +2561,24 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire
 
   for (k = fmem_ptr; k <= width_base[f] - 1; k++)
   {
-    {
-      tfm_temp = getc(tfm_file);
-      a = tfm_temp;
-      qw.b0 = a;
-      tfm_temp = getc(tfm_file);
-      b = tfm_temp;
-      qw.b1 = b;
-      tfm_temp = getc(tfm_file);
-      c = tfm_temp;
-      qw.b2 = c;
-      tfm_temp = getc(tfm_file);
-      d = tfm_temp;
-      qw.b3 = d;
-      font_info[k].qqqq = qw;
-    }
+    store_four_quarters(font_info[k].qqqq);
 
     if ((a >= nw) || (b / 16 >= nh) || (b % 16 >= nd) || (c / 4 >= ni))
       goto lab11;
 
     switch (c % 4)
     {
-      case :
+      case lig_tag:
         if (d >= nl)
           goto lab11;
         break;
 
-      case :
+      case ext_tag:
         if (d >= ne)
           goto lab11;
         break;
 
-      case :
+      case list_tag:
         {
           {
             if ((d < bc)||(d > ec))
@@ -2727,12 +2587,12 @@ internal_font_number read_font_info_(halfword u, str_number nom, str_number aire
 
           while (d < k + bc - fmem_ptr)
           {
-            qw = font_info[char_base[f]+ d].qqqq;
+            qw = char_info(f, d);
  
-            if (((qw.b2)% 4)!= 2)
+            if (char_tag(qw) != list_tag)
               goto lab45;
 
-            d = qw.b3;
+            d = rem_byte(qw);
           }
 
           if (d == k + bc - fmem_ptr)
@@ -2745,6 +2605,7 @@ lab45:;
         break;
     }
   }
+
   {
     {
       alpha = 16;
@@ -2791,29 +2652,15 @@ lab45:;
     if (font_info[italic_base[f]].cint != 0)
       goto lab11;
   }
-/*  read ligature/kern program */
-  bchlabel = 32767;     /* '77777 */
+
+  bch_label = 32767;     /* '77777 */
   bchar = 256;
 
   if (nl > 0)
   {
     for (k = lig_kern_base[f]; k <= kern_base[f] + 256 * (128) - 1; k++)
     {
-      {
-        tfm_temp = getc(tfm_file);
-        a = tfm_temp;
-        qw.b0 = a;
-        tfm_temp = getc(tfm_file);
-        b = tfm_temp;
-        qw.b1 = b;
-        tfm_temp = getc(tfm_file);
-        c = tfm_temp;
-        qw.b2 = c;
-        tfm_temp = getc(tfm_file);
-        d = tfm_temp;
-        qw.b3 = d;
-        font_info[k].qqqq = qw; /* store_four_quarters(font_info[k].qqqq */
-      }
+      store_four_quarters(font_info[k].qqqq);
 
       if (a > 128)
       {
@@ -2853,6 +2700,7 @@ lab45:;
         }
         else if (256 * (c - 128) + d >= nk)
           goto lab11;           /* error in TFM, abort */
+
         if (a < 128)
           if (k - lig_kern_base[f] + a + 1 >= nl)
             goto lab11;         /* error in TFM, abort */
@@ -2860,7 +2708,7 @@ lab45:;
     }
 
     if (a == 255)
-      bchlabel = 256 * c + d;
+      bch_label = 256 * c + d;
   }
 
   for (k = kern_base[f] + 256 * (128); k <= exten_base[f] - 1; k++)
@@ -2881,26 +2729,11 @@ lab45:;
       font_info[k].cint = sw - alpha;
     else goto lab11;
   }
-/*  read extensible character recipes */
-/*  for k:=exten_base[f] to param_base[f]-1 do */
+
+  /*  read extensible character recipes */
   for (k = exten_base[f]; k <= param_base[f] - 1; k++)
   {
-    {
-      tfm_temp = getc(tfm_file);
-      a = tfm_temp;
-      qw.b0 = a;
-      tfm_temp = getc(tfm_file);
-      b = tfm_temp;
-      qw.b1 = b;
-      tfm_temp = getc(tfm_file);
-      c = tfm_temp;
-      qw.b2 = c;
-      tfm_temp = getc(tfm_file);
-      d = tfm_temp;
-      qw.b3 = d;
-/*    store_four_quarters(font_info[k].qqqq); */
-      font_info[k].qqqq = qw;
-    }
+    store_four_quarters(font_info[k].qqqq);
 
     if (a != 0)
     {
@@ -2940,6 +2773,7 @@ lab45:;
       if (!(qw.b0 > 0))
         goto lab11;
     }
+
     {
       {
         if ((d < bc) || (d > ec))
@@ -2952,6 +2786,7 @@ lab45:;
         goto lab11;
     }
   }
+
   {
     for (k = 1; k <= np; k++)
       if (k == 1)
@@ -2987,14 +2822,14 @@ lab45:;
           font_info[param_base[f] + k - 1].cint = sw - alpha;
         else goto lab11;
       }
-/*  use test_eof() here instead ? */
+
     if (feof(tfm_file))
       goto lab11;
 
     for (k = np + 1; k <= 7; k++)
       font_info[param_base[f] + k - 1].cint = 0;
   }
-/* @<Make final adjustments...@>= l.11174 */
+
   if (np >= 7)
     font_params[f] = np;
   else
@@ -3003,10 +2838,10 @@ lab45:;
   hyphen_char[f] = default_hyphen_char;
   skew_char[f] = default_skew_char;
 
-  if (bchlabel < nl)
-    bchar_label[f] = bchlabel + lig_kern_base[f];
+  if (bch_label < nl)
+    bchar_label[f] = bch_label + lig_kern_base[f];
   else
-    bchar_label[f]= non_address; /* i.e. 0 --- 96/Jan/15 */
+    bchar_label[f] = non_address;
 
   font_bchar[f] = bchar;
   font_false_bchar[f] = bchar;
@@ -3024,7 +2859,7 @@ lab45:;
   font_area[f] = aire;
   font_bc[f] = bc;
   font_ec[f] = ec;
-  font_glue[f] = 0;  /* font_glue[f]:=null; l.11184 */
+  font_glue[f] = 0;
   char_base[f] = char_base[f];
   width_base[f] = width_base[f];
   lig_kern_base[f] = lig_kern_base[f];
@@ -3035,11 +2870,12 @@ lab45:;
   font_ptr = f;
   g = f;
   goto lab30;
+
 lab11:
   print_err("Font ");
   sprint_cs(u); 
   print_char('=');
-  print_file_name(nom, aire, 335);  /* "" */
+  print_file_name(nom, aire, 335);
 
   if (s >= 0)
   {
@@ -3053,15 +2889,15 @@ lab11:
     print_int(- (integer) s);
   } 
 
-  if (fileopened)
+  if (file_opened)
     print_string(" not loadable: Bad metric (TFM) file");
   else
     print_string(" not loadable: Metric (TFM) file not found");
 
-  if (aire == 335) /* "" only if path not specified */
+  if (aire == 335)
   {
     if (show_texinput_flag)
-      show_tex_fonts();   /* 98/Jan/31 */
+      show_tex_fonts();
   }
 
   help5("I wasn't able to read the size data for this font,",
@@ -3070,8 +2906,9 @@ lab11:
       "You might try inserting a different font spec;",
       "e.g., type `I\\font<same font id>=<substitute font name>'.");
   error();
+
 lab30:
-  if (fileopened)
+  if (file_opened)
     b_close(tfm_file);
 
   return g;