$NetBSD: patch-aj,v 1.1 2006/04/19 13:13:05 tonio Exp $ --- dviview.ml.orig 2004-09-03 16:31:33.000000000 +0200 +++ dviview.ml @@ -320,9 +320,7 @@ let init_geometry all st = | 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) - and real_width = Misc.round (base_dpi *. w_in *. st.ratio) + let 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 and fheight = base_dpi *. h_in in @@ -371,7 +369,6 @@ let init master filename = try (Unix.stat filename).Unix.st_mtime with _ -> 0.0 in Gs.init_do_ps (); - let npages = Array.length dvi.Cdvi.pages in let st = let npages = Array.length dvi.Cdvi.pages in { filename = filename; @@ -680,7 +677,6 @@ let make_thumbnails st = 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 ist = { st with size_x = st.size_x / r; @@ -765,14 +761,6 @@ let rec reload foreground st = st.last_modified <- reload_time st; let dvi = Cdvi.load st.filename in let cdvi = Driver.cook_dvi dvi in - let dvi_res = !dpi_resolution - and mag = float dvi.Cdvi.preamble.Dvicommands.pre_mag /. 1000.0 in - let w_sp = dvi.Cdvi.postamble.Dvicommands.post_width - 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 npages = Array.length dvi.Cdvi.pages in st.dvi <- dvi; st.cdvi <- cdvi; @@ -830,7 +818,6 @@ let show_thumbnails st r page = 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 Array.iteri (fun p' (p, img) -> let x = size_x * (p' mod r) / r in @@ -1354,13 +1341,13 @@ module B = 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 _re = 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 _re = Str.regexp re_string in () let duplex = duplex_switch false