Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/blume-private-devel/src/ml-nlffi-lib/Tests/readline/rl.sml
ViewVC logotype

View of /sml/branches/blume-private-devel/src/ml-nlffi-lib/Tests/readline/rl.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1441 - (download) (annotate)
Thu Jan 15 23:01:21 2004 UTC (16 years, 6 months ago) by mblume
File size: 468 byte(s)
implemented readline stream
structure RL : sig
    type prompt
    val noprompt : prompt
    val prompt : string -> prompt
    val rl : prompt -> string option
end = struct
    type prompt = (C.uchar, C.ro) C.obj C.ptr'
    val noprompt = C.Ptr.null'
    val prompt = ZString.dupML'
    fun rl p = let
      val cres = F_readline.f' p
    in
      if C.Ptr.isNull' cres then NONE
      else SOME (ZString.toML' cres) before (F_add_history.f' (C.Ptr.ro' cres);
					     C.free' cres)
    end
end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0