summaryrefslogtreecommitdiff
path: root/print/advi/patches/patch-aa
blob: fd8dfc639a920ff5b80e8519b256cf967d82c1f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-aa,v 1.3 2006/04/19 13:13:05 tonio Exp $

--- misc.ml.orig	2004-08-12 00:08:06.000000000 +0200
+++ misc.ml
@@ -114,7 +114,6 @@ let rec reverse_concat l1 = function
 
 (* 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 is_digit c = c >= '0' && c <= '9';;
 
 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
     | '@'
@@ -192,7 +190,7 @@ let string_substitute_var f s =
         end;
         loop ib)
     | c -> Buffer.add_char b c; loop ib) in
-  try loop (Scanf.Scanning.from_string s); Buffer.contents b with
+  try loop (Scanf.Scanning.from_string s) with
   | _ -> Buffer.contents b;;
 
 let string_replace pat templ str =