[go: up one dir, main page]

File: rc.mli

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 (55 lines) | stat: -rw-r--r-- 2,811 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
(***********************************************************************)
(*                                                                     *)
(*                             Active-DVI                              *)
(*                                                                     *)
(*                   Projet Cristal, INRIA Rocquencourt                *)
(*                                                                     *)
(*  Copyright 2002 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.          *)
(*                                                                     *)
(*  Jun Furuse, Didier Rmy and Pierre Weis.                           *)
(*  Contributions by Roberto Di Cosmo, Didier Le Botlan,               *)
(*  Xavier Leroy, and Alan Schmitt.                                    *)
(*                                                                     *)
(*  Based on Mldvi by Alexandre Miquel.                                *)
(***********************************************************************)

(* $Id: rc.mli,v 1.1 2007/01/18 14:14:36 rousse Exp $ *)

(* Init file loading. *)
open Arg;;

val parse_file : Misc.file_name ->
  (string * spec * string) list -> (string -> unit) -> string -> unit
(** [Rc.parse_file fname speclist anonfun usage_msg] parses the file
  fname as if it were the command line.
  Syntax is exactly similar to a shell call to the command, except
  that the command call can spread on more than one line and comments
  are allowed (a comment starts with a sharp sign and ends at the end
  of the line). *)

val cautious_parse_file : Misc.file_name ->
  (string * spec * string) list -> (string -> unit) -> string -> unit
(** [Rc.cautious_parse_file] is equivalent to [parse_file], except
 that it traps syntactic mistakes in the source file and emits a
 warning instead of raising an exception. *)

val parse_string : string ->
  (string * spec * string) list -> (string -> unit) -> string -> unit
(** [Rc.parse_string s speclist anonfun usage_msg] parses the string [s]
  as if it were the command line. *)

val argv_of_string : string -> string array;;
val argv_of_file : string -> string array;;
val parse_argv : string -> string array -> 
  (string * spec * string) list -> (string -> unit) -> string -> unit;;

val at_init : (unit -> unit) -> unit;;
(** [at_init f] records initialization function [f] to be executed
    when [init] will be invoked. *)
val init : unit -> unit;;
(** [init ()] initializes the program by calling all the functions
    that have been recorded as initialization functions via
    [add_init] (initialization functions are called in the order of
    addition). *)