OSDN Git Service

code clean.
[putex/putex.git] / src / texsourc / tex7.c
index b91fd05..460aa73 100644 (file)
@@ -1,37 +1,33 @@
-#ifdef _WINDOWS
-  #define NOCOMM
-  #define NOSOUND
-  #define NODRIVERS
-  #define STRICT
-  #pragma warning(disable:4115) // kill rpcasync.h complaint
-  #include <windows.h>
-  #define MYLIBAPI __declspec(dllexport)
-#endif
+/* Copyright 2014 Clerk Ma
 
-#include "texwin.h"
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-#pragma warning(disable:4131) // old style declarator
-#pragma warning(disable:4135) // conversion between different integral types 
-#pragma warning(disable:4127) // conditional expression is constant
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
 
-#include <setjmp.h>
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301 USA.  */
 
 #define EXTERN extern
 
 #include "texd.h"
 
-#pragma warning(disable:4244)       /* 96/Jan/10 */
-
-/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 /* sec 0994 */
 void build_page (void)
 {
-  halfword p;
-  halfword q, r;
+  pointer p;
+  pointer q, r;
   integer b, c;
   integer pi;
-/*  unsigned char n;  */
-  unsigned int n;             /* 95/Jan/7 */
+/*  unsigned char n; */
+  unsigned int n;
   scaled delta, h, w;
 
   if ((link(contrib_head) == 0) || output_active)
@@ -39,7 +35,7 @@ void build_page (void)
 
   do
     {
-lab22:
+continu:
       p = link(contrib_head);
 
       if (last_glue != max_halfword)
@@ -84,49 +80,49 @@ lab22:
 
             link(q) = p;
             link(contrib_head) = q;
-            goto lab22;
+            goto continu;
           }
           else
           {
             page_total = page_total + page_depth + height(p);
             page_depth = depth(p);
-            goto lab80;
+            goto contribute;
           }
           break;
 
         case whatsit_node:
-          goto lab80;
+          goto contribute;
           break;
 
         case glue_node:
           if (page_contents < box_there)
-            goto lab31;
+            goto done1;
           else if (precedes_break(page_tail))
             pi = 0;
           else
-            goto lab90;
+            goto update_heights;
           break;
 
         case kern_node:
           if (page_contents < box_there)
-            goto lab31;
+            goto done1;
           else if (link(p) == 0)
             return;
           else if (type(link(p)) == glue_node)
             pi = 0;
           else
-            goto lab90;
+            goto update_heights;
           break;
 
         case penalty_node:
           if (page_contents < box_there)
-            goto lab31;
+            goto done1;
           else
             pi = penalty(p);
           break;
 
         case mark_node:
-          goto lab80;
+          goto contribute;
           break;
 
         case ins_node:
@@ -201,7 +197,7 @@ lab22:
               else
               {
                 if (count(n) <= 0)
-                  w = max_dimen;  /* 2^30 - 1 */
+                  w = max_dimen;
                 else
                 {
                   w = page_goal - page_total - page_depth;
@@ -222,11 +218,11 @@ lab22:
                   begin_diagnostic();
                   print_nl("% split");
                   print_int(n);
-                  print_string(" to");
+                  prints(" to");
                   print_scaled(w);
                   print_char(',');
                   print_scaled(best_height_plus_depth);
-                  print_string(" p=");
+                  prints(" p=");
 
                   if (q == 0)
                     print_int(eject_penalty);
@@ -237,7 +233,7 @@ lab22:
 
                   end_diagnostic(false);
                 }
-#endif /* STAT */
+#endif
                 if (count(n) != 1000)
                   best_height_plus_depth = x_over_n(best_height_plus_depth, 1000) * count(n);
 
@@ -252,14 +248,14 @@ lab22:
                   insert_penalties = insert_penalties + penalty(q);
               }
             }
-            goto lab80;
+            goto contribute;
           }
           break;
 
         default:
           {
             confusion("page");
-            return;       // abort_flag set
+            return;
           }
           break;
       }
@@ -272,11 +268,11 @@ lab22:
           else
             b = badness(page_goal - page_total, page_so_far[2]);
         else if (page_total - page_goal > page_shrink)
-          b = awful_bad;  /* 2^30 - 1 */
+          b = awful_bad;
         else
           b = badness(page_total - page_goal, page_shrink);
   
-        if (b < awful_bad) /* 2^30 - 1 */
+        if (b < awful_bad)
           if (pi <= eject_penalty)
             c = pi; 
           else if (b < inf_bad)
@@ -287,29 +283,29 @@ lab22:
           c = b;
 
         if (insert_penalties >= 10000)
-          c = awful_bad;  /* 2^30 - 1 */
+          c = awful_bad;
 
 #ifdef STAT
         if (tracing_pages > 0)
         {
           begin_diagnostic();
           print_nl("%");
-          print_string(" t=");
+          prints(" t=");
           print_totals();
-          print_string(" g=");
+          prints(" g=");
           print_scaled(page_goal);
-          print_string(" b=");
+          prints(" b=");
 
-          if (b == awful_bad) /* 2^30 - 1 */
+          if (b == awful_bad)
             print_char('*');
           else
             print_int(b);
 
-          print_string(" p=");
+          prints(" p=");
           print_int(pi);
-          print_string(" c=");
+          prints(" c=");
 
-          if (c == awful_bad) /* 2^30 - 1 */
+          if (c == awful_bad)
             print_char('*');
           else
             print_int(c);
@@ -319,7 +315,7 @@ lab22:
 
           end_diagnostic(false);
         }
-#endif /* STAT */
+#endif
 
         if (c <= least_page_cost)
         {
@@ -335,20 +331,21 @@ lab22:
           }
         }
 
-        if ((c == awful_bad) || (pi <= eject_penalty))  /* 2^30 - 1 */
+        if ((c == awful_bad) || (pi <= eject_penalty))
         {
           fire_up(p);
 
           if (output_active)
             return;
 
-          goto lab30;
+          goto done;
         }
       }
 
       if ((type(p) < glue_node) || (type(p) > kern_node))
-        goto lab80; 
-lab90:
+        goto contribute;
+
+update_heights:
       if (type(p) == kern_node)
         q = p;
       else
@@ -375,7 +372,8 @@ lab90:
 
       page_total = page_total + page_depth + width(q);
       page_depth = 0;
-lab80:
+
+contribute:
       if (page_depth > page_max_depth)
       {
         page_total = page_total + page_depth - page_max_depth;
@@ -386,12 +384,13 @@ lab80:
       page_tail = p;
       link(contrib_head) = link(p);
       link(p) = 0;
-      goto lab30;
-lab31:
+      goto done;
+
+done1:
       link(contrib_head) = link(p);
       link(p) = 0;
       flush_node_list(p);
-lab30:;
+done:;
     }
   while (!(link(contrib_head) == 0));
 
@@ -403,7 +402,7 @@ lab30:;
 /* sec 1043 */
 void app_space (void)
 {
-  halfword q;
+  pointer q;
 
   if ((space_factor >= 2000) && (xspace_skip != zero_glue))
     q = new_param_glue(xspace_skip_code);
@@ -440,7 +439,6 @@ void app_space (void)
   link(tail) = q;
   tail = q;
 }
-/* called from tex8.c only */
 /* sec 1047 */
 void insert_dollar_sign (void)
 {
@@ -456,7 +454,7 @@ void you_cant (void)
 {
   print_err("You can't use `");
   print_cmd_chr(cur_cmd, cur_chr);
-  print_string("' in ");
+  prints("' in ");
   print_mode(mode);
 }
 /* sec 1050 */
@@ -470,7 +468,7 @@ void report_illegal_case (void)
   error();
 }
 /* sec 1051 */
-bool privileged (void)
+boolean privileged (void)
 {
   if (mode > 0)
     return true;
@@ -481,11 +479,11 @@ bool privileged (void)
   }
 }
 /* sec 1054 */
-bool its_all_over (void)
+boolean its_all_over (void)
 {
-  if (privileged ())
+  if (privileged())
   {
-    if ((page_head == page_tail) && (head == cur_list.tail_field) && (dead_cycles == 0))
+    if ((page_head == page_tail) && (head == tail) && (dead_cycles == 0))
     {
       return true;
     }
@@ -507,7 +505,7 @@ void append_glue (void)
 
   s = cur_chr;
 
-  switch(s)
+  switch (s)
   {
     case fil_code:
       cur_val = fil_glue;
@@ -551,14 +549,14 @@ void append_kern (void)
 
   s = cur_chr;
 
-  scan_dimen(s == mu_glue, false, false);
+  scan_dimen((s == mu_glue), false, false);
   tail_append(new_kern(cur_val));
   subtype(tail) = s;
 }
 /* sec 1064 */
 void off_save (void)
 {
-  halfword p;
+  pointer p;
 
   if (cur_group == bottom_level)
   {
@@ -608,7 +606,7 @@ void off_save (void)
         break;
     }
 
-    print_string(" inserted");
+    prints(" inserted");
     ins_list(link(temp_head));
     help5("I've inserted something that you may have forgotten.",
         "(See the <inserted text> above.)",
@@ -618,13 +616,12 @@ void off_save (void)
     error();
   }
 }
-/* only called from tex8.c */
 /* sec 1069 */
 void extra_right_brace (void)
 {
   print_err("Extra }, or forgotten ");
 
-  switch(cur_group)
+  switch (cur_group)
   {
     case semi_simple_group:
       print_esc("endgroup");
@@ -665,7 +662,7 @@ void normal_paragraph (void)
 /* sec 1075 */
 void box_end_(integer box_context)
 {
-  halfword p;
+  pointer p;
 
   if (box_context < box_flag)
   {
@@ -720,9 +717,9 @@ void box_end_(integer box_context)
         {
           get_x_token();
         }
-      while(!((cur_cmd != spacer) && (cur_cmd != relax)));
+      while (!((cur_cmd != spacer) && (cur_cmd != relax)));
 
-      if (((cur_cmd == hskip) && (abs(mode)!= vmode)) || ((cur_cmd == vskip) && (abs(mode) == vmode)))
+      if (((cur_cmd == hskip) && (abs(mode) != vmode)) || ((cur_cmd == vskip) && (abs(mode) == vmode)))
       {
         append_glue();
         subtype(tail) = box_context - (leader_flag - a_leaders);
@@ -741,16 +738,15 @@ void box_end_(integer box_context)
     else
       ship_out(cur_box);
 }
-/* called only from tex8.c */
 /* sec 1079 */
 void begin_box_(integer box_context)
 {
-  halfword p, q;
+  pointer p, q;
   quarterword m;
   halfword k;
   eight_bits n;
 
-  switch(cur_chr)
+  switch (cur_chr)
   {
     case box_code:
       {
@@ -786,7 +782,7 @@ void begin_box_(integer box_context)
         }
         else
         {
-          if (!(tail >= hi_mem_min))
+          if (!is_char_node(tail))
             if ((type(tail) == hlist_node) || (type(tail) == vlist_node))
             {
               q = head;
@@ -795,14 +791,14 @@ void begin_box_(integer box_context)
                 {
                   p = q;
 
-                  if (!(q >= hi_mem_min))
+                  if (!is_char_node(q))
                     if (type(q) == disc_node)
                     {
                       for (m = 1; m <= replace_count(q); m++)
                         p = link(p);
 
                       if (p == tail)
-                        goto lab30;
+                        goto done;
                     }
 
                   q = link(p);
@@ -813,8 +809,7 @@ void begin_box_(integer box_context)
               shift_amount(cur_box) = 0;
               tail = p;
               link(p) = 0;
-lab30:
-              ;
+done:;
             }
         }
       }
@@ -878,6 +873,7 @@ lab30:
           if (every_hbox != 0)
             begin_token_list(every_hbox, every_vbox_text);
         }
+
         return;
       }
       break;
@@ -912,9 +908,6 @@ void scan_box_(integer box_context)
     back_error();
   }
 }
-/****************************************************************************/
-void package_ (small_number);
-/****************************************************************************/
 /* sec 1091 */
 small_number norm_min_ (integer h)
 {
@@ -926,7 +919,7 @@ small_number norm_min_ (integer h)
     return h;
 }
 /* sec 1091 */
-void new_graf_(bool indented)
+void new_graf_(boolean indented)
 {
   prev_graf = 0;
 
@@ -938,7 +931,7 @@ void new_graf_(bool indented)
   space_factor = 1000;
   set_cur_lang();
   clang = cur_lang;
-  prev_graf =(norm_min(left_hyphen_min) * 64 + norm_min(right_hyphen_min)) * 65536L + cur_lang;
+  prev_graf = (norm_min(left_hyphen_min) * 64 + norm_min(right_hyphen_min)) * 65536L + cur_lang;
 
   if (indented)
   {
@@ -953,11 +946,10 @@ void new_graf_(bool indented)
   if (nest_ptr == 1)
     build_page();
 }
-/* procedure indent_in_hmode; l.21058 */
 /* sec 1093 */
 void indent_in_hmode (void)
 {
-  halfword p, q;
+  pointer p, q;
 
   if (cur_chr > 0)
   {
@@ -977,7 +969,6 @@ void indent_in_hmode (void)
     tail_append(p);
   }
 }
-/* only called from tex8.c */
 /* sec 1095 */
 void head_for_vmode (void)
 {
@@ -989,7 +980,7 @@ void head_for_vmode (void)
     {
       print_err("You can't use `");
       print_esc("hrule");
-      print_string("' here except with leaders");
+      prints("' here except with leaders");
       help2("To put a horizontal rule in an hbox or an alignment,",
           "you should use \\leaders or \\hrulefill (see The TeXbook).");
       error();
@@ -1000,7 +991,7 @@ void head_for_vmode (void)
     back_input();
     cur_tok = par_token;
     back_input();
-    cur_input.index_field = inserted;
+    index = inserted;
   }
 }
 /* sec 1096 */
@@ -1017,7 +1008,6 @@ void end_graf (void)
     error_count = 0;
   }
 }
-/* only called form tex8.c */
 /* sec 1099 */
 void begin_insert_or_adjust (void)
 {
@@ -1050,7 +1040,7 @@ void begin_insert_or_adjust (void)
 /* sec 1101 */
 void make_mark (void)
 {
-  halfword p;
+  pointer p;
 
   p = scan_toks(false, true);
   p = get_node(small_node_size);
@@ -1069,11 +1059,10 @@ void append_penalty (void)
   if (mode == vmode)
     build_page();
 }
-/* only called from tex8.c */
 /* sec 1105 */
 void delete_last (void)
 {
-  halfword p, q;
+  pointer p, q;
   quarterword m;
 
   if ((mode == vmode) && (tail == head))
@@ -1093,7 +1082,7 @@ void delete_last (void)
   }
   else
   {
-    if (!(tail >= hi_mem_min))
+    if (!is_char_node(tail))
       if (type(tail) == cur_chr)
       {
         q = head;
@@ -1102,7 +1091,7 @@ void delete_last (void)
           {
             p = q;
 
-            if (!(q >= hi_mem_min))
+            if (!is_char_node(q))
               if (type(q) == disc_node)
               {
                 for (m = 1; m <= replace_count(q); m++)
@@ -1122,12 +1111,10 @@ void delete_last (void)
       }
   }
 }
-/* only called from tex8.c */
-/* procedure unpackage; l.21256 */
 /* sec 1110 */
 void unpackage (void)
 {
-  halfword p;
+  pointer p;
   char c;
 
   c = cur_chr;
@@ -1163,12 +1150,12 @@ void unpackage (void)
 /* sec 1113 */
 void append_italic_correction (void)
 {
-  halfword p;
+  pointer p;
   internal_font_number f;
 
   if (tail != head)
   {
-    if ((tail >= hi_mem_min))
+    if (is_char_node(tail))
       p = tail;
     else if (type(tail) == ligature_node)
       p = tail + 1;
@@ -1206,11 +1193,10 @@ void append_discretionary (void)
     space_factor = 1000;
   }
 }
-/* only called form tex8.c */
 /* sec 1119 */
 void build_discretionary (void)
 {
-  halfword p, q;
+  pointer p, q;
   integer n;
 
   unsave();
@@ -1220,7 +1206,7 @@ void build_discretionary (void)
 
   while (p != 0)
   {
-    if (!(p >= hi_mem_min))
+    if (!is_char_node(p))
       if (type(p) > rule_node)
         if (type(p) != kern_node)
           if (type(p) != ligature_node)
@@ -1234,7 +1220,7 @@ void build_discretionary (void)
             end_diagnostic(true);
             flush_node_list(p);
             link(q) = 0;
-            goto lab30;
+            goto done;
           }
 
     q = p;
@@ -1242,7 +1228,7 @@ void build_discretionary (void)
     incr(n);
   }
 
-lab30:
+done:
   p = link(head);
   pop_nest();
 
@@ -1297,15 +1283,14 @@ lab30:
   mode = -hmode;
   space_factor = 1000;
 }
-/* called only from tex8.c */
 /* sec 1123 */
 void make_accent (void)
 {
   real s, t;
-  halfword p, q, r;
+  pointer p, q, r;
   internal_font_number f;
   scaled a, h, x, w, delta;
-  ffourquarters i;
+  four_quarters i;
 
   scan_char_num();
   f = cur_font;
@@ -1343,7 +1328,7 @@ void make_accent (void)
         shift_amount(p) = x - h;
       }
 
-      delta = round((w - a) / ((double) 2.0)+ h * t - x * s);
+      delta = round((w - a) / ((double) 2.0) + h * t - x * s);
       r = new_kern(delta);
       subtype(r) = acc_kern;
       link(tail) = r;
@@ -1419,7 +1404,6 @@ void noalign_error (void)
       "an alignment. Proceed, and I'll ignore this case.");
   error();
 }
-/* only called from tex8.c */
 /* sec 1129 */
 void omit_error (void)
 {
@@ -1455,7 +1439,6 @@ void do_endv (void)
   else
     off_save();
 }
-/* only called form tex8.c */
 /* sec 1135 */
 void cs_error (void)
 {
@@ -1478,8 +1461,8 @@ void init_math (void)
   scaled w;
   scaled l;
   scaled s;
-  halfword p;
-  halfword q;
+  pointer p;
+  pointer q;
   internal_font_number f;
   integer n;
   scaled v;
@@ -1492,23 +1475,23 @@ void init_math (void)
     if (head == tail)
     {
       pop_nest();
-      w = -max_dimen; /* - (2^30 - 1) */
+      w = -max_dimen;
     }
     else
     {
       line_break(display_widow_penalty);
       v = shift_amount(just_box) + 2 * quad(cur_font);
-      w = -max_dimen;  /* - (2^30 - 1) */
+      w = -max_dimen;
       p = list_ptr(just_box);
 
       while (p != 0)
       {
-lab21:
-        if ((p >= hi_mem_min))
+reswitch:
+        if (is_char_node(p))
         {
           f = font(p);
           d = char_width(f, char_info(f, character(p)));
-          goto lab40;
+          goto found;
         }
 
         switch (type(p))
@@ -1518,7 +1501,7 @@ lab21:
           case rule_node:
             {
               d = width(p);
-              goto lab40;
+              goto found;
             }
             break;
 
@@ -1527,7 +1510,7 @@ lab21:
               mem[lig_trick] = mem[lig_char(p)];
               link(lig_trick) = link(p);
               p = lig_trick;
-              goto lab21;
+              goto reswitch;
             }
             break;
 
@@ -1544,16 +1527,16 @@ lab21:
               if (glue_sign(just_box) == stretching)
               {
                 if ((glue_order(just_box) == stretch_order(q)) && (stretch(q) != 0))
-                  v = max_dimen;  /* - (2^30 - 1) */
+                  v = max_dimen;
               }
               else if (glue_sign(just_box) == shrinking)
               {
                 if ((glue_order(just_box) == shrink_order(q)) && (shrink(q) != 0))
-                  v = max_dimen;  /* - (2^30 - 1) */
+                  v = max_dimen;
               }
 
               if (subtype(p) >= a_leaders)
-                goto lab40;
+                goto found;
             }
             break;
 
@@ -1566,25 +1549,27 @@ lab21:
             break;
         }
 
-        if (v < max_dimen) /* - (2^30 - 1) */
+        if (v < max_dimen)
           v = v + d;
 
-        goto lab45;
-lab40:
-        if (v < max_dimen) /* - (2^30 - 1) */
+        goto not_found;
+
+found:
+        if (v < max_dimen)
         {
           v = v + d;
           w = v;
         }
         else
         {
-          w = max_dimen;  /* - (2^30 - 1) */
-          goto lab30;
+          w = max_dimen;
+          goto done;
         }
-lab45:
+
+not_found:
         p = link(p);
       }
-lab30:;
+done:;
     }
 
     if (par_shape_ptr == 0)
@@ -1659,18 +1644,18 @@ void start_eq_no (void)
   }
 }
 /* sec 1151 */
-void scan_math_(halfword p)
+void scan_math_(pointer p)
 {
   integer c;
 
-lab20:
+restart:
   do
     {
       get_x_token();
     }
-  while(!((cur_cmd != spacer) && (cur_cmd != relax)));
+  while (!((cur_cmd != spacer) && (cur_cmd != relax)));
 
-lab21:
+reswitch:
   switch (cur_cmd)
   {
     case letter:
@@ -1689,7 +1674,7 @@ lab21:
             back_input();
           }
 
-          goto lab20;
+          goto restart;
         }
       }
       break;
@@ -1699,7 +1684,7 @@ lab21:
         scan_char_num();
         cur_chr = cur_val;
         cur_cmd = char_given;
-        goto lab21;
+        goto reswitch;
       }
       break;
 
@@ -1744,7 +1729,7 @@ lab21:
 /* sec 1155 */
 void set_math_char_(integer c)
 {
-  halfword p;
+  pointer p;
 
   if (c >= 32768L)
   {
@@ -1790,7 +1775,7 @@ void math_limit_switch (void)
   error();
 }
 /* sec 1160 */
-void scan_delimiter_(halfword p, bool r)
+void scan_delimiter_(pointer p, boolean r)
 {
    if (r)
    {
@@ -1858,7 +1843,7 @@ void math_ac (void)
   {
     print_err("Please use ");
     print_esc("mathaccent");
-    print_string(" for accents in math mode");
+    prints(" for accents in math mode");
     help2("I'm changing \\accent to \\mathaccent here; wish me luck.",
       "(Accents are not the same in formulas as they are in text.)");
     error();
@@ -1893,7 +1878,7 @@ void append_choices (void)
 /* sec 1184 */
 halfword fin_mlist_(halfword p)
 {
-  halfword q;
+  pointer q;
 
   if (incompleat_noad != 0)
   {
@@ -1909,7 +1894,7 @@ halfword fin_mlist_(halfword p)
       if (type(q) != left_noad)
       {
         confusion("right");
-        return 0;       // abort_flag set
+        return 0;
       }
 
       info(numerator(incompleat_noad)) = link(q);
@@ -1922,6 +1907,7 @@ halfword fin_mlist_(halfword p)
     link(tail) = p;
     q = link(head);
   }
+
   pop_nest();
 
   return q;
@@ -1929,7 +1915,7 @@ halfword fin_mlist_(halfword p)
 /* sec 1174 */
 void build_choices (void)
 {
-  halfword p;
+  pointer p;
 
   unsave();
   p = fin_mlist(0);
@@ -1965,8 +1951,8 @@ void build_choices (void)
 void sub_sup (void)
 {
 /*  small_number t; */
-  int t;              /* 95/Jan/7 */
-  halfword p;
+  int t;
+  pointer p;
 
   t = 0;
   p = 0;
@@ -1998,16 +1984,14 @@ void sub_sup (void)
       error();
     }
   }
+
   scan_math(p);
 }
-/* used to continue here with math_fraction etc in tex7.c */
-/*****************************************************************************/
-/* moved down here to avoid pragma optimize questions 96/Sep/12 */
 /* sec 1086 */
 void package_(small_number c)
 {
   scaled h;
-  halfword p;
+  pointer p;
   scaled d;
 
   d = box_max_depth;
@@ -2033,7 +2017,7 @@ void package_(small_number c)
       height(cur_box) = h;
     }
   }
+
   pop_nest();
   box_end(saved(0));
-}
-//#pragma optimize ("", on)           /* 96/Sep/12 */
\ No newline at end of file
+}
\ No newline at end of file