]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/debugger/primitives.mli
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / debugger / primitives.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*          Jerome Vouillon, projet Cristal, INRIA Rocquencourt        *)
6 (*          Objective Caml port by John Malecki and Xavier Leroy       *)
7 (*                                                                     *)
8 (*  Copyright 1996 Institut National de Recherche en Informatique et   *)
9 (*  en Automatique.  All rights reserved.  This file is distributed    *)
10 (*  under the terms of the Q Public License version 1.0.               *)
11 (*                                                                     *)
12 (***********************************************************************)
13
14 (* $Id: primitives.mli 9226 2009-04-02 09:44:21Z xclerc $ *)
15
16 (********************* Basic functions and types ***********************)
17
18 (*** Miscellaneous ***)
19 val nothing : 'a -> unit
20
21 (*** Types and exceptions. ***)
22 exception Out_of_range
23
24 (*** Operations on lists. ***)
25
26 (* Remove an element from a list *)
27 val except : 'a -> 'a list -> 'a list
28
29 (* Position of an element in a list. Head of list has position 0. *)
30 val index : 'a -> 'a list -> int
31
32 (* Return the `n' first elements of `l'. *)
33 (* ### n l -> l' *)
34 val list_truncate : int -> 'a list -> 'a list
35
36 (* Separe the `n' first elements of `l' and the others. *)
37 (* ### n list -> (first, last) *)
38 val list_truncate2 : int -> 'a list -> 'a list * 'a list
39
40 (* Replace x by y in list l *)
41 (* ### x y l -> l' *)
42 val list_replace : 'a -> 'a -> 'a list -> 'a list
43
44 (*** Operations on strings. ***)
45
46 (* Remove blanks (spaces and tabs) at beginning and end of a string. *)
47 val string_trim : string -> string
48
49 (* isprefix s1 s2 returns true if s1 is a prefix of s2. *)
50 val isprefix : string -> string -> bool
51
52 (* Split a string at the given delimiter char *)
53 val split_string : char -> string -> string list
54
55 (*** I/O channels ***)
56
57 type io_channel = {
58   io_in : in_channel;
59   io_out : out_channel;
60   io_fd : Unix.file_descr
61   }
62
63 val io_channel_of_descr : Unix.file_descr -> io_channel
64 val close_io : io_channel -> unit
65 val std_io : io_channel