]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/debugger/source.mli
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / debugger / source.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: source.mli 9299 2009-06-17 08:15:39Z xclerc $ *)
15
16 (************************ Source management ****************************)
17
18 (*** Conversion function. ***)
19
20 val source_of_module: Lexing.position -> string -> string
21
22 (*** buffer cache ***)
23
24 type buffer
25
26 val buffer_max_count : int ref
27
28 val flush_buffer_list : unit -> unit
29
30 val get_buffer : Lexing.position -> string -> buffer
31
32 val buffer_content : buffer -> string
33 val buffer_length : buffer -> int
34
35 (*** Position conversions. ***)
36
37 (* Pair (position, line) where `position' is the position in character of *)
38 (* the beginning of the line (first character is 0) and `line' is its *)
39 (* number (first line number is 1). *)
40 type position = int * int
41
42 (* Position of the next linefeed after `pos'. *)
43 (* Position just after the buffer end if no linefeed found. *)
44 (* Raise `Out_of_range' if already there. *)
45 val next_linefeed : buffer -> int -> int
46
47 (* Go to next line. *)
48 val next_line : buffer -> position -> position
49
50 (* Convert a position in the buffer to a line number. *)
51 val line_of_pos : buffer -> int -> position
52
53 (* Convert a line number to a position. *)
54 val pos_of_line : buffer -> int -> position
55
56 (* Convert a coordinate (line / column) into a position. *)
57 (* --- The first line and column are line 1 and column 1. *)
58 val point_of_coord : buffer -> int -> int -> int
59
60 (* Return the offsets of both line start and cnum for the passed position. *)
61 val start_and_cnum : buffer -> Lexing.position -> (int * int)