(** abstract datatype for the line buffer.. *) type t (** the feed-functions may be called before calling get-functions, in which case the internal buffer is used to store the data. the buffer contents will be processed after the first call to a get-function. *) (** you cannot call a get-function if you've already called it, not until your callback function has been called. you may also use discard to discard the contents of the buffer and reset the handler. *) (** create a new line buffer *) val create : unit -> t (** discard read input; reset handler *) val discard : t -> unit (** call the callback when a line is read *) val get_line : t -> (string -> unit) -> unit (** call the callback when n bytes is read *) val get_n : t -> int -> (string -> unit) -> unit (** feed a substring to the system *) val feed_substring : t -> string -> int -> int -> unit (** feed a whole string *) val feed : t -> string -> unit