This is an automated email from the git hooks/post-receive script.

treinen pushed a commit to branch master
in repository hevea.

commit 3c48e0a037765cf653e7811d9968968d3823e6a4
Author: Ralf Treinen <trei...@free.fr>
Date:   Fri Mar 28 08:19:53 2014 +0100

    Imported Upstream version 2.13
---
 CHANGES       |  2 ++
 Makefile      |  5 +----
 README        |  2 +-
 foot.ml       |  4 ++--
 foot.mli      |  3 ++-
 htmllex.mll   |  1 -
 htmltext.ml   |  4 ++--
 iso-symb.hva  |  2 +-
 latexscan.mll | 16 +++++++++-------
 outUnicode.ml | 10 +++++-----
 package.ml    |  6 +++---
 saver.mll     |  8 ++++++--
 version.ml    |  4 ++--
 13 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/CHANGES b/CHANGES
index 99bb91e..ac61280 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+version 2.13
+     * More effort to skip comments in arguments.
 version 2.12
      * esponja: allow ':' in attribute names.
 version 2.11
diff --git a/Makefile b/Makefile
index e52e0f6..b3fe4a8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,7 @@ SUF=
 DIR=
 OCAMLC=$(DIR)ocamlc$(SUF)
 #OCAMLFLAGS=-w +a-4-9 -warn-error +a
-OCAMLFLAGS=-w +a-4-9
-OCAMLCI=$(OCAMLC)
-OCAMLOPT=$(DIR)ocamlopt$(SUF)
-OCAMLLEX=$(DIR)ocamllex$(SUF) -q
+OCAMLFLAGS=-w +a-4-9-41-45
 OCBFLAGS=-j 4 -classic-display
 
 #### End of configuration parameters
diff --git a/README b/README
index 6f29844..d93b945 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This is HEVEA, version 2.12, a fast Latex to HTML translator.
+This is HEVEA, version 2.13, a fast Latex to HTML translator.
 
 
 ADVERTISEMENT
diff --git a/foot.ml b/foot.ml
index 844fe5a..9327bb6 100644
--- a/foot.ml
+++ b/foot.ml
@@ -79,7 +79,7 @@ let sub_notes () =
   some := false
 
 
-let flush sticky lexer sec_notes sec_here =
+let flush sticky lexer out sec_notes sec_here =
   if !some && Section.value sec_here <= Section.value sec_notes then begin
 (*
     Misc.warning
@@ -108,7 +108,7 @@ let flush sticky lexer sec_notes sec_here =
            "\\@noteref{text}{note}{"^
            string_of_int anchor^
            "}{\\@print{"^themark^"}}]") ;
-        lexer ("\\@print{"^text^"\n}"))
+        out text)
       !all ;
     lexer "\\end{thefootnotes}" ;
     List.iter
diff --git a/foot.mli b/foot.mli
index 5bc825f..a889185 100644
--- a/foot.mli
+++ b/foot.mli
@@ -18,7 +18,8 @@ val step_anchor : int -> unit
 val get_anchor : int -> int
 val register : int -> string -> string -> unit
 val sub_notes : unit -> unit
-val flush : bool -> (string -> unit)  -> string -> string -> unit
+val flush : bool -> (string -> unit) (* lexer *) ->
+  (string -> unit) (* just output *) -> string -> string -> unit
 val end_notes : unit -> unit
 
 
diff --git a/htmllex.mll b/htmllex.mll
index 408d2ef..a727bb1 100644
--- a/htmllex.mll
+++ b/htmllex.mll
@@ -183,7 +183,6 @@ let aput s = Buff.put abuff s
 
 }
  
-
 let blank = [' ''\t''\n''\r']
 let tag = ['a'-'z''A'-'Z''0'-'9']+
 let class_name = ['a'-'z''A'-'Z''0'-'9''-']+
diff --git a/htmltext.ml b/htmltext.ml
index bb947a0..c53dbbc 100644
--- a/htmltext.ml
+++ b/htmltext.ml
@@ -121,7 +121,7 @@ let is_font = function
   | Size (Int _) | Face _ | Color _ -> true
   | _ -> false
 
-let is_span = function
+let is_span (n:nat) = match n with
   | Fstyle _ -> true
   | _ -> false
 
@@ -206,7 +206,7 @@ let add_fontattrs = do_addattrs add_fontattr
 
 (* For SPAN tag *)
 let add_spanattr txt ctxt a env =
-  let nat = match a with
+  let (nat:nat) = match a with
   | ASTYLE (a,v) -> Fstyle (a,v)
   | SIZE _| COLOR _| FACE _ |CLASS _|OTHER   -> raise No in
   add {nat=nat ; txt=txt ; ctxt=ctxt} env
diff --git a/iso-symb.hva b/iso-symb.hva
index ac57b16..d7310e7 100644
--- a/iso-symb.hva
+++ b/iso-symb.hva
@@ -1,5 +1,5 @@
 %% Escapable special characters
-\def\%{\@print{%}}
+\def\%{\@print{\char045}}
 \def\${\@print{$}}%$
 \def\#{\@print{#}}
 \def\&{\@print{&}}
diff --git a/latexscan.mll b/latexscan.mll
index bf1ebb4..242e65b 100644
--- a/latexscan.mll
+++ b/latexscan.mll
@@ -871,9 +871,9 @@ let rec do_expand_command main skip_blanks name lexbuf =
               scan_this_list_may_cont main lexbuf cur_subst (string_to_arg 
body) ;
               let _ =  MyStack.pop stack_alltt in
               alltt :=
-                 (match old_alltt, !alltt with
-                 | Not, Inside         -> Inside
-                 | (Macro|Inside), Not -> Not
+                  (match old_alltt, !alltt with
+                 | Not, Lexstate.Inside         -> Inside
+                 | (Macro|Lexstate.Inside), Not -> Not
                  | _, _                -> old_alltt)
 (*
   fprintf stderr
@@ -2363,6 +2363,7 @@ def_code "\\@getprintnostyle"
 def_code "\\@getprint"
   (fun lexbuf ->
     let arg = get_prim_arg lexbuf in
+(*    eprintf "GET PRINT: '%s'\n" arg ; *)
     let buff = MyLexing.from_string arg in
     Dest.put (Save.tagout buff)) ;
 ;;
@@ -2541,7 +2542,7 @@ def_code "\\textalltt"
        let arg = save_arg lexbuf in
        let old = !alltt in
        scan_this main "\\mbox{" ;
-       alltt := Inside ;
+       alltt := Lexstate.Inside ;
        Dest.open_group opt ;
        scan_this_arg main arg ;
        Dest.close_group () ;
@@ -2833,7 +2834,8 @@ let foot_noteflush sticky lexbuf =
   let sec_here = get_prim_arg lexbuf
   and sec_notes = get_prim "\\@footnotelevel" in
   start_lexstate () ;
-  Foot.flush sticky (scan_this main) sec_notes sec_here ;
+  Foot.flush sticky (scan_this main)
+    Dest.put sec_notes sec_here ;
   restore_lexstate ()
 ;;
 
@@ -3118,7 +3120,7 @@ let fnsymbol_of_int = function
   0 -> " "
 | 1 -> "*"
 | 2 -> "#"
-| 3 -> "%"
+| 3 -> "\\%"
 | 4 -> "\167"
 | 5 -> "\182"
 | 6 -> "||"
@@ -3306,7 +3308,7 @@ register_init "alltt"
       def_code "\\alltt"
         (fun _ ->
           if !verbose > 1 then prerr_endline "begin alltt" ;
-          alltt := Inside ;
+          alltt := Lexstate.Inside ;
           fun_register (fun () -> alltt := Not) ;
           Dest.close_block "" ; Dest.open_block "pre" "") ;
 
diff --git a/outUnicode.ml b/outUnicode.ml
index d2419cf..1ffe0cd 100644
--- a/outUnicode.ml
+++ b/outUnicode.ml
@@ -90,8 +90,8 @@ let translate_utf8_in c next = match c with
     let n1 = Char.code c in
     let n2 = next () in
     let n3 = next () in
-    if n2 < 128 or n2 > 191 then cannot();
-    if n3 < 128 or n3 > 191 then cannot();
+    if n2 < 128 || n2 > 191 then cannot();
+    if n3 < 128 || n3 > 191 then cannot();
     let p =
       ((n1 land 0b1111) lsl 12) lor
       ((n2 land 0b111111) lsl 6) lor
@@ -107,9 +107,9 @@ let translate_utf8_in c next = match c with
     let n2 = next () in
     let n3 = next () in
     let n4 = next () in
-    if n2 < 128 or n2 > 191 then cannot();
-    if n3 < 128 or n3 > 191 then cannot();
-    if n4 < 128 or n4 > 191 then cannot();
+    if n2 < 128 || n2 > 191 then cannot();
+    if n3 < 128 || n3 > 191 then cannot();
+    if n4 < 128 || n4 > 191 then cannot();
     let p =
       ((n1 land 0b111) lsl 18) lor
       ((n2 land 0b111111) lsl 12) lor
diff --git a/package.ml b/package.ml
index ea92561..bc218ac 100644
--- a/package.ml
+++ b/package.ml
@@ -23,9 +23,8 @@ open Lexing
 open Lexstate
 open Latexmacros
 open Subst
-open MyStack
 open Scan
-;;
+
 
 (*********************************************************)
 (* Accents are here, to make latexscan.mll a bit smaller *)
@@ -291,6 +290,7 @@ def_code "\\@find@file"
 def_code "\\@tr@url"
 (fun lexbuf ->
   let x = get_prim_arg lexbuf in
+(*  eprintf "TR URL: '%s'\n" x ; *)
   scan_this main "{\\@nostyle" ;
   Url.encode_fragment Dest.put_char Dest.put x ;
   scan_this main "}")
@@ -479,7 +479,7 @@ def_code "\\hva@newstack"
          try
            let pat,body = MyStack.pop stack in
            Latexmacros.def cmd pat body
-         with Fatal _ ->
+         with MyStack.Fatal _ ->
            warning (Printf.sprintf "Pop empty stack '%s'" name)))
 ;;
 
diff --git a/saver.mll b/saver.mll
index 3343aec..a72e165 100644
--- a/saver.mll
+++ b/saver.mll
@@ -38,6 +38,7 @@ rule opt = parse
 | space* '\n'? space* '['
     {put_echo (lexeme lexbuf) ;
     opt2 lexbuf}
+| '%' { skip_comment lexbuf ; opt lexbuf }
 |  eof  {raise Eof}
 |  ""   {raise NoOpt}
 
@@ -58,6 +59,7 @@ and opt2 =  parse
       put_echo_char ']' ;
       C.of_out arg_buff
     end}
+| '%' { skip_comment lexbuf ; opt2 lexbuf }
 | command_name as lxm
    {put_both lxm ; opt2 lexbuf }
 | _ as lxm 
@@ -124,8 +126,10 @@ and arg2 = parse
        put_echo_char '}' ;
        C.of_out arg_buff
      end}
-| "\\{" | "\\}" | "\\\\"
-| [^'\\''{''}']+
+| '%'
+     {skip_comment lexbuf  ; arg2 lexbuf}
+| command_name
+| [^'\\''{''}''%']+
       {blit_both lexbuf ; arg2 lexbuf }
 | _
     {let c = lexeme_char lexbuf 0 in
diff --git a/version.ml b/version.ml
index 2e7cecf..762439d 100644
--- a/version.ml
+++ b/version.ml
@@ -9,8 +9,8 @@
 (*                                                                     *)
 (***********************************************************************)
 
-let real_version = "2.12"
-let release_date = "2014-01-14"
+let real_version = "2.13"
+let release_date = "2014-03-18"
 
 
 let version =

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/hevea.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to