Commits

"Rör...@gmail.com>"  committed 01e11af

removed unneccessary ;;s.

  • Participants
  • Parent commits 197952c

Comments (0)

Files changed (1)

File footnotes.ml

 (* compile with: ocamlopt -o footnotes str.cmxa footnotes.ml *)
 
-let sep_line = "@footnote:";;		(* the seperator line *)
+let sep_line = "@footnote:"		(* the seperator line *)
 
-let ref_regexp = Str.regexp "\\[\\([0-9]+\\)\\]";;
+let ref_regexp = Str.regexp "\\[\\([0-9]+\\)\\]"
 
-let ref_of_int n = "[" ^ string_of_int n ^ "]";;
+let ref_of_int n = "[" ^ string_of_int n ^ "]"
 
-let output_endline c s = output_string c s; output_char c '\n';;
+let output_endline c s = output_string c s; output_char c '\n'
 
-exception End_of_body;;
+exception End_of_body
 
 (* read the body from inc, substitute the references from table refs *)
 (* if ref is not in refs, evaluate unknown_ref; print to outc *)
     done
   with
     End_of_file -> raise End_of_body
-  | End_of_body -> output_endline outc sep_line;;
+  | End_of_body -> output_endline outc sep_line
 
 (* read the foots from inc, process the lines with process_foot *)
 let process_foots inc process_foot malformed_foot =
 	process_foot l (int_of_string (Str.matched_group 1 l))
       else malformed_foot l
     done
-  with End_of_file -> ();;
+  with End_of_file -> ()
 
 (* insert a new reference for old_n into refs and return the new n *)
 let insert_ref refs old_n =
   let n = Hashtbl.length refs + 1 in
   Hashtbl.add refs old_n n;
-  n;;
+  n
 
 (* renumber and reorder the footnotes by their appearance in the body *)
 let renumber_by_body inc outc =
       None   -> output_endline outc " ### missing footnote ###"
     | Some l -> output_endline outc l
   in
-  Array.iteri print_foot foots;;
+  Array.iteri print_foot foots
 
 (* renumber the footnote references by the original footnote order *)
 let renumber_by_foots inc outc =
     output_string outc (ref_of_int n);
     output_endline outc (Str.string_after l (Str.match_end ()))
   in
-  process_foots inc print_foot (output_endline outc);;
+  process_foots inc print_foot (output_endline outc)
 
 (* renumber the footnote references *)
 let footnotes by_footnotes =
-  if by_footnotes then renumber_by_foots else renumber_by_body;;
+  if by_footnotes then renumber_by_foots else renumber_by_body
 
 (* process options and files given on command line or stdin *)
 let main () =
       do_file "Usage: footnotes [OPTION...] [file...]"
   else renumber_by_body stdin stdout;;
 
-main ();;
+main ()