Commits

"Rör...@gmail.com>"  committed b0db7fc

replaced Array.iteri by for-loop

  • Participants
  • Parent commits 7e4cf46

Comments (0)

Files changed (1)

File footnotes.ml

       Not_found -> prerr_endline ("unreferenced footnote: " ^ l)
   and prerr_malformed l = prerr_endline ("malformed footnote: " ^ l) in
   process_foots inc add_foot prerr_malformed;
-  let print_foot idx elt =
-    output_string outc (ref_of_int (idx + 1));
-    match elt with
+  for i = 1 to Array.length foots do
+    output_string outc (ref_of_int (i));
+    match foots.(i-1) with
       None   -> output_endline outc " ### missing footnote ###"
     | Some l -> output_endline outc l
-  in
-  Array.iteri print_foot foots
+  done
 
 (* renumber the footnote references by the original footnote order *)
 let renumber_by_foots inc outc =