[go: up one dir, main page]

File: global_options.ml

package info (click to toggle)
advi 1.10.2-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 15,008 kB
  • sloc: ml: 12,279; sh: 1,032; ansic: 1,016; makefile: 705; perl: 55
file content (57 lines) | stat: -rw-r--r-- 2,275 bytes parent folder | download | duplicates (6)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(***********************************************************************)
(*                                                                     *)
(*                             Active-DVI                              *)
(*                                                                     *)
(*                   Projet Cristal, INRIA Rocquencourt                *)
(*                                                                     *)
(*  Copyright 2003 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  under the terms of the GNU Lesser General Public License.          *)
(*                                                                     *)
(*  Pierre Weis.                                                       *)
(*                                                                     *)
(***********************************************************************)

(* $Id: global_options.ml,v 1.2 2010/03/09 14:39:48 remy Exp $ *)

(* Global Active-DVI options. *)

(* To print debugging messages. *)
let debug_endline = Options.debug "--debug" " General debug";;

(* Setting the forward in Misc. *)
Misc.set_forward_debug_endline debug_endline;;

(* Some global options for Active-DVI. *)

(* let try_epsbygs = true;; *)

let pson =
  if Config.have_gs then
    Options.flag true
      "-nogs"
      " Turn off the display of inlined Postscript.\
      \n\t (the default is to display inlined Postscript)."
  else ref false;;

let get_global_display_mode, set_global_display_mode =
 let global_display_mode = ref false in
 (fun () -> !global_display_mode),
 (fun b ->
    GraphicsY11.set_enable_display_mode b;
    global_display_mode := b);;

Options.add "-fg"
 (Arg.Unit (fun () -> set_global_display_mode true))
 " Set the drawing policy to ``screen only'',\
 \n\t (the default is to draw both on the screen and in the memory).";;

Options.add "-w"
 (Arg.String
    (function
     | "a" -> Misc.set_warnings false
     | "A" -> Misc.set_warnings true
     | s -> raise (Arg.Bad (Printf.sprintf "-w %s is unknown" s))))
 "<flags>  Enable/disable warnings according to <flags>,\
 \n\t A/a enable/disable all warnings\
 \n\t (the default is \"A\", to enable all warnings).";;