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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/ml-nlffi-lib/zstring.sig
ViewVC logotype

Annotation of /sml/trunk/src/ml-nlffi-lib/zstring.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 837 - (view) (download) (as text)

1 : blume 837 (*
2 :     * Functions for translating between 0-terminated C strings and native
3 :     * ML strings.
4 :     *
5 :     * (C) 2001, Lucent Technologies, Bell Laboratories
6 :     *
7 :     * author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
8 :     *)
9 :     signature ZSTRING = sig
10 :    
11 :     type 'c zstring = (C.uchar, 'c) C.ptr
12 :     type 'c zstring' = (C.uchar, 'c) C.ptr'
13 :    
14 :     (* the C strlen function *)
15 :     val length : 'c zstring -> int
16 :     val length' : 'c zstring' -> int
17 :    
18 :     (* make ML string from 0-terminated C string *)
19 :     val toML : 'c zstring -> string
20 :     val toML' : 'c zstring' -> string
21 :    
22 :     (* Copy contents of ML string into C string and add terminating 0. *)
23 :     val cpML : { from: string, to: C.rw zstring } -> unit
24 :     val cpML' : { from: string, to: C.rw zstring' } -> unit
25 :    
26 :     (* Make C-duplicate of ML string (allocate memory and then copy). *)
27 :     val dupML : string -> C.rw zstring option
28 :     val dupML' : string -> C.rw zstring' option
29 :     end

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