Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (35 sloc) 1.589 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (*
19 @author Adam Koprowski
20 **)
21
340a986 [cleanup] open: remove Base in libbase & libtool
Raja authored
22 (* depends *)
23 module List = BaseList
fccc685 Initial open-source release
MLstate authored
24
25 let emph s = "" ^ s ^ ""
26 let strong s = "" ^ emph s ^ ""
27
28 let red s = "" ^ s ^ ""
29 let blue s = "" ^ s ^ ""
30 let green s = "" ^ s ^ ""
31
32 let emph_fmt fmt = "" ^^ fmt ^^ ""
33 let strong_fmt fmt = "" ^^ emph_fmt fmt ^^ ""
34 let blue_fmt s = "" ^^ s ^^ ""
35
36 let build_logger fn label format = fn (strong_fmt label ^^ " " ^^ format)
37
38 let walker () =
39 let size = 12 in
40 let seq = "o" in
41 let make_frame i j = Printf.sprintf "|%s%c%s|" (String.make i ' ') (String.get seq j) (String.make (size - i - 1) ' ') in
42 let make_entry i = List.init (String.length seq) (make_frame (if i >= size then 2*size - i - 2 else i)) in
43 let al = List.concat (List.init (size + size - 2) make_entry) in
44 let a = Array.map (fun s -> [| s |]) (Array.of_list al) in
45 ConsoleAnim.init ~och:stdout ~auto_walking:false a a
Something went wrong with that request. Please try again.