Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > by-pkgid > 48ba0d16e39b8afcf8164999b65b206b > files > 1

advi-1.6.0-4mdv2008.0.src.rpm

--- ./advi-1.6.0/misc.ml.old	2006-07-08 09:11:42.000000000 +0200
+++ ./advi-1.6.0/misc.ml	2006-07-08 09:34:40.000000000 +0200
@@ -114,7 +114,6 @@
 
 (* Strings auxilliaries. *)
 let string_prefix char s =
- let l = String.length s in
  let i = String.index s char in
  String.sub s 0 (i + 1);;
 
@@ -180,7 +179,6 @@
 
 let string_substitute_var f s =
   let b = Buffer.create (String.length s * 2) in
-  let len = String.length s in
   let rec loop ib =
     Scanf.bscanf ib "%c" (function
     | '@'
@@ -189,10 +187,9 @@
         begin
           try Buffer.add_string b (f id) with
           | Not_found -> Buffer.add_char b c; Buffer.add_char b id
-        end;
-        loop ib)
-    | c -> Buffer.add_char b c; loop ib) in
-  try loop (Scanf.Scanning.from_string s); Buffer.contents b with
+        end)
+    | c -> Buffer.add_char b c) in
+  try let bli = Scanf.Scanning.from_string s in loop bli; Buffer.contents b with
   | _ -> Buffer.contents b;;
 
 let string_replace pat templ str =
--- ./advi-1.6.0/symbol.ml.old	2006-07-08 09:36:14.000000000 +0200
+++ ./advi-1.6.0/symbol.ml	2006-07-08 09:36:34.000000000 +0200
@@ -555,7 +555,7 @@
 let around b x y =
   try
     let position = position x y in
-    let space_ref = position.history.(position.first) in
+    let _ = position.history.(position.first) in
     let valid = valid position in
     let rec skip_spaces move i =
       if valid i then
@@ -576,7 +576,7 @@
         | Rule (_, _) -> return w
         | _ ->
             if pre <> dummy_symbol && above pre h <> 0 then return w else
-            let c = symbol_name pre h in
+            let _ = symbol_name pre h in
             let add x y = if move 0 > 0 then x ^ y else y ^ x in
             word move i (add (true_symbol_name h) w) next
       else -1, w in
--- ./advi-1.6.0/grdev.ml.old	2006-07-08 09:37:44.000000000 +0200
+++ ./advi-1.6.0/grdev.ml	2006-07-08 09:38:52.000000000 +0200
@@ -429,8 +429,8 @@
    within the background viewport we choose it;
    otherwise, we choose the center of the background viewport. *)
 let make_center xcr ycr
-    ({vx = x; vy = y; vw = w; vh = h} as bgviewport)
-    ({vx = fx; vy = fy; vw = fw; vh = fh} as funviewport) =
+    ({vx = x; vy = y; vw = w; vh = h})
+    ({vx = fx; vy = fy; vw = fw; vh = fh}) =
   let xc = match xcr with
   | Some xcr ->
       (* Get the center coordinates integer values in the funviewport. *)
@@ -917,7 +917,7 @@
       Graphics.set_color (get_color ())
 
     let make_anchors tag all_draw =
-      let make_anchor draw (x, y as orig) w h voff =
+      let make_anchor draw (x, y) w h voff =
         let anchor = {tag = tag; draw = List.rev draw} in
         let bw =
           match tag with
@@ -1607,7 +1607,7 @@
         try match H.find ev.mouse_x ev.mouse_y with
         | {A.action = {H.tag = H.Href h; H.draw = d}} as act ->
             if ev.button then
-              let ev' = GraphicsY11.wait_next_event button_up in
+              let _ = GraphicsY11.wait_next_event button_up in
               send (Href h) else
             if H.up_to_date act emph then event emph b else begin
               H.deemphasize true emph;
--- ./advi-1.6.0/ttfont.ml.old	2006-07-08 09:36:50.000000000 +0200
+++ ./advi-1.6.0/ttfont.ml	2006-07-08 09:37:07.000000000 +0200
@@ -52,7 +52,7 @@
   
 let build face dpi pt unicode =
   set_char_size face (float dpi) (float dpi) pt pt;
-  let advx, advy = render_char face unicode [] Render_Mono in
+  let _, _ = render_char face unicode [] Render_Mono in
   let bitmapinfo = get_bitmap_info face in
   let width = bitmapinfo.bitmap_width in
   let height = bitmapinfo.bitmap_height in
--- ./advi-1.6.0/addons.ml.old	2006-07-08 09:39:00.000000000 +0200
+++ ./advi-1.6.0/addons.ml	2006-07-08 09:39:17.000000000 +0200
@@ -86,7 +86,7 @@
 
 let cgradient {
     argcolor = c0; argcolorstart = c1; argcolorstop = c2;
-    argfunviewport = {vx = x; vy = y; vw = w; vh = h} as viewport;
+    argfunviewport = {vx = x; vy = y; vw = w; vh = h};
     argxcenter = xc; argycenter = yc;
     argviewport = _;
    } =
@@ -96,7 +96,7 @@
 
 let circgradient {
     argcolor = c0; argcolorstart = c1; argcolorstop = c2;
-    argfunviewport = {vx = x; vy = y; vw = w; vh = h} as viewport;
+    argfunviewport = {vx = x; vy = y; vw = w; vh = h};
     argxcenter = xc; argycenter = yc;
     argviewport = _;
    } =
--- ./advi-1.6.0/gs.ml.old	2006-07-08 09:37:18.000000000 +0200
+++ ./advi-1.6.0/gs.ml	2006-07-08 09:37:31.000000000 +0200
@@ -63,7 +63,7 @@
 
 let parse_pos s =
   let c = String.index s ',' in
-  let bc = s.[3] in
+  let _ = s.[3] in
   (* y comes first, then x *)
   let y = String.sub s 3 (c - 3) in
   let x = String.sub s (c + 1) (String.length s - c - 1) in
@@ -106,7 +106,7 @@
   try
     Unix.select fd_in fd_out fd_exn timeout
   with
-    Unix.Unix_error (Unix.EINTR, _, _) as exn ->
+    Unix.Unix_error (Unix.EINTR, _, _) ->
       let now = Unix.gettimeofday () in
       let remaining = start +. timeout -. now in
       if remaining > 0.0 then select fd_in fd_out fd_exn timeout else [], [], []
--- ./advi-1.6.0/dviview.ml.old	2006-07-08 09:40:12.000000000 +0200
+++ ./advi-1.6.0/dviview.ml	2006-07-08 09:41:53.000000000 +0200
@@ -320,8 +320,8 @@
     | In f -> float attr.geom.Ageometry.height /. (h_in +. 2.0 *. f)
     | _ -> assert false in
   let base_dpi = min wdpi hdpi in
-  let width = Misc.round (base_dpi *. w_in)
-  and height = Misc.round (base_dpi *. h_in)
+  let _ = Misc.round (base_dpi *. w_in)
+  and _ = Misc.round (base_dpi *. h_in)
   and real_width = Misc.round (base_dpi *. w_in *. st.ratio)
   and real_height = Misc.round (base_dpi *. h_in *. st.ratio) in
   let fwidth = base_dpi *. w_in
@@ -371,7 +371,7 @@
     try (Unix.stat filename).Unix.st_mtime
     with _ -> 0.0 in
   Gs.init_do_ps ();
-  let npages =  Array.length dvi.Cdvi.pages in
+  let _ =  Array.length dvi.Cdvi.pages in
   let st =
     let npages = Array.length dvi.Cdvi.pages in
     { filename = filename;
@@ -680,7 +680,7 @@
   let num_nails = Array.length page_nails in
   let r_fit = int_of_float (ceil (sqrt (float_of_int num_nails))) in
   let r = min r_fit !thumbnail_limit in
-  let pages = num_nails - 1 / r / r in
+  let _ = num_nails - 1 / r / r in
   let ist =
     { st with
       size_x = st.size_x / r;
@@ -771,8 +771,8 @@
     and h_sp = dvi.Cdvi.postamble.Dvicommands.post_height in
     let w_in = mag *. ldexp (float w_sp /. dvi_res) (-16)
     and h_in = mag *. ldexp (float h_sp /. dvi_res) (-16) in
-    let width = Misc.round (w_in *. st.base_dpi *. st.ratio)
-    and height = Misc.round (h_in *. st.base_dpi *. st.ratio) in
+    let _ = Misc.round (w_in *. st.base_dpi *. st.ratio)
+    and _ = Misc.round (h_in *. st.base_dpi *. st.ratio) in
     let npages =  Array.length dvi.Cdvi.pages in
     st.dvi <- dvi;
     st.cdvi <- cdvi;
@@ -830,7 +830,7 @@
   let size_y = Graphics.size_y () in
   let dx = size_x / r
   and dy = size_y / r in
-  let pages = Array.length page / r / r in
+  let _ = Array.length page / r / r in
   Array.iteri
     (fun p' (p, img) ->
        let x = size_x * (p' mod r) / r in
@@ -1354,13 +1354,13 @@
     let search_forward st =
       let re_string = ask_to_search "Search Forward (re): " in
       Misc.warning (Printf.sprintf "Search forward %s" re_string);
-      let re = Str.regexp re_string in
+      let _ = Str.regexp re_string in
       ()
 
     let search_backward st =
       let re_string = ask_to_search "Search Backward (re): " in
       Misc.warning (Printf.sprintf "Search backward %s" re_string);
-      let re = Str.regexp re_string in
+      let _ = Str.regexp re_string in
       ()
 
     let duplex = duplex_switch false
--- ./advi-1.6.0/driver.ml.old	2006-07-08 09:39:26.000000000 +0200
+++ ./advi-1.6.0/driver.ml	2006-07-08 09:40:01.000000000 +0200
@@ -437,7 +437,7 @@
   | "color" :: "pop" :: [] ->
      color_pop st
   | "color" :: args ->
-     let c = Dvicolor.parse_color_args args in
+     let _ = Dvicolor.parse_color_args args in
      Misc.warning "global color special is not supported"
   | _ -> ill_formed_special s;;
 
@@ -557,8 +557,8 @@
     let y = st.y_origin + Misc.round (st.conv *. float st.v) in
     if !visible then
       if drawbygs then
-        let dx = st.x_origin in
-        let dy = st.y_origin in
+        let _ = st.x_origin in
+        let _ = st.y_origin in
         Dev.draw_ps_by_gs file bbox (rwi, rhi)
           (x - st.x_origin) (y - st.y_origin)
       else 
@@ -1685,8 +1685,8 @@
   let sdpi = Misc.round (mag *. ldexp dpi 16)
   and mtable = ref dummy_mtable
   and gtable = ref dummy_gtable in
-  let headers = ref []
-  and xrefs = cdvi.base_dvi.Cdvi.xrefs in
+  let _ = ref []
+  and _ = cdvi.base_dvi.Cdvi.xrefs in
   let otherwise = function
     | Dvicommands.C_fnt n ->
         let (mt, gt) =
--- ./advi-1.6.0/gterm.ml.old	2006-07-08 09:34:55.000000000 +0200
+++ ./advi-1.6.0/gterm.ml	2006-07-08 09:35:24.000000000 +0200
@@ -361,7 +361,7 @@
 (* Basic functions to input strings. *)
 let rec flush_keys () =
   if GraphicsY11.key_pressed () then
-    let c = GraphicsY11.read_key () in
+    let _ = GraphicsY11.read_key () in
     flush_keys ();;
 
 type prompt = string;;
@@ -372,7 +372,7 @@
   let get t =
     flush_keys ();
     let limx = t.cursor_x
-    and limy = t.cursor_y in
+    and _ = t.cursor_y in
     let rec read t =
       let c = get_next_key t in
       match c with
--- ./advi-1.6.0/laser_pointer.ml.old	2006-07-08 09:35:37.000000000 +0200
+++ ./advi-1.6.0/laser_pointer.ml	2006-07-08 09:36:04.000000000 +0200
@@ -144,7 +144,7 @@
    | { mouse_x = x; mouse_y = y;
        button = btn;
        keypressed = kp;
-       key = c; } as ev ->
+       key = c; } ->
        show_pointer ptr x y;
        if kp then begin
          match c with