From: Joe Groff Date: Tue, 23 Feb 2010 19:42:02 +0000 (-0800) Subject: rename current string-mangling "char*" to "c-string". char* is now just a boring... X-Git-Tag: 0.97~4831 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=4cfa1a6c77465f75745da24ce92456bae7258e10 rename current string-mangling "char*" to "c-string". char* is now just a boring old pointer to char --- diff --git a/basis/alien/arrays/arrays.factor b/basis/alien/arrays/arrays.factor index f9a47f256c..ce6eb85245 100644 --- a/basis/alien/arrays/arrays.factor +++ b/basis/alien/arrays/arrays.factor @@ -40,7 +40,7 @@ M: array c-type-boxer-quot M: array c-type-unboxer-quot drop [ >c-ptr ] ; PREDICATE: string-type < pair - first2 [ char* = ] [ word? ] bi* and ; + first2 [ c-string = ] [ word? ] bi* and ; M: string-type c-type ; @@ -100,9 +100,5 @@ M: string-type c-type-getter M: string-type c-type-setter drop [ set-alien-cell ] ; -{ char* utf8 } char typedef -{ char* utf8 } char* typedef -{ char* utf8 } uchar typedef -{ char* binary } byte typedef -{ char* binary } ubyte typedef +{ c-string utf8 } c-string typedef diff --git a/basis/alien/c-types/c-types-docs.factor b/basis/alien/c-types/c-types-docs.factor index f0a339b1aa..e73ce556b5 100644 --- a/basis/alien/c-types/c-types-docs.factor +++ b/basis/alien/c-types/c-types-docs.factor @@ -104,7 +104,7 @@ HELP: void { $description "This symbol is not a valid C type, but it can be used as the return type for a " { $link POSTPONE: FUNCTION: } " or " { $link POSTPONE: CALLBACK: } " definition or for an " { $link alien-invoke } " or " { $link alien-callback } " call." } ; HELP: void* { $description "This C type represents a generic pointer to C memory. See " { $link pointer } " for information on pointer C types." } -HELP: char* +HELP: c-string { $description "This C type represents a pointer to a C string. See " { $link "c-strings" } " for details about using strings with the FFI." } ; HELP: float { $description "This C type represents a single-precision IEEE 754 floating-point type. Input values will be converted to Factor " { $link math:float } "s and demoted to single-precision; output values will be returned as Factor " { $link math:float } "s." } ; diff --git a/basis/alien/c-types/c-types-tests.factor b/basis/alien/c-types/c-types-tests.factor index 10a7b50ebb..7ad4bbb074 100644 --- a/basis/alien/c-types/c-types-tests.factor +++ b/basis/alien/c-types/c-types-tests.factor @@ -22,7 +22,7 @@ UNION-STRUCT: foo [ f ] [ pointer: foo c-type void* c-type = ] unit-test [ t ] [ pointer: foo* c-type void* c-type = ] unit-test -[ t ] [ pointer: char c-type char* c-type = ] unit-test +[ t ] [ c-string c-type c-string c-type = ] unit-test [ t ] [ foo heap-size int heap-size = ] unit-test @@ -35,36 +35,21 @@ TYPEDEF: int MyInt TYPEDEF: char MyChar -[ t ] [ pointer: char c-type pointer: MyChar c-type = ] unit-test -[ t ] [ char* c-type pointer: MyChar c-type = ] unit-test +[ t ] [ pointer: void c-type pointer: MyChar c-type = ] unit-test -TYPEDEF: char MyFunkyChar -{ char* ascii } pointer: MyFunkyChar typedef +TYPEDEF: { c-string ascii } MyFunkyString -[ f ] [ pointer: char c-type pointer: MyFunkyChar c-type = ] unit-test -[ { char* ascii } ] [ pointer: MyFunkyChar c-type ] unit-test +[ { c-string ascii } ] [ MyFunkyString c-type ] unit-test -TYPEDEF: MyFunkyChar MyFunkyTypedef +TYPEDEF: c-string MyString -[ { char* ascii } ] [ pointer: MyFunkyTypedef c-type ] unit-test - -TYPEDEF: MyFunkyChar* MyFunkyString - -[ { char* ascii } ] [ MyFunkyString c-type ] unit-test - -TYPEDEF: char* MyString - -[ t ] [ char* c-type MyString c-type = ] unit-test +[ t ] [ c-string c-type MyString c-type = ] unit-test [ t ] [ void* c-type pointer: MyString c-type = ] unit-test TYPEDEF: int* MyIntArray [ t ] [ void* c-type MyIntArray c-type = ] unit-test -TYPEDEF: char* MyLPBYTE - -[ t ] [ { char* utf8 } c-type MyLPBYTE c-type = ] unit-test - [ 0 B{ 1 2 3 4 } ] must-fail diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index 3255d16d80..73da41cc69 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -273,7 +273,7 @@ M: long-long-type box-return ( c-type -- ) SYMBOLS: ptrdiff_t intptr_t uintptr_t size_t - byte ubyte char* ; + c-string ; CONSTANT: primitive-types { @@ -284,7 +284,7 @@ CONSTANT: primitive-types longlong ulonglong float double void* bool - char* + c-string } : (pointer-c-type) ( void* type -- void*' ) @@ -530,8 +530,6 @@ M: pointer c-type \ uint c-type \ size_t typedef ] if - \ char \ byte typedef - \ uchar \ ubyte typedef ] with-compilation-unit M: char-16-rep rep-component-type drop char ; diff --git a/basis/alien/data/data-docs.factor b/basis/alien/data/data-docs.factor index 0536d15736..895b8536f7 100644 --- a/basis/alien/data/data-docs.factor +++ b/basis/alien/data/data-docs.factor @@ -140,13 +140,13 @@ HELP: { $notes "The appropriate specialized array vocabulary must be loaded; otherwise, an error will be thrown. The vocabulary can be loaded with the " { $link require-c-array } " word. See the " { $vocab-link "specialized-arrays" } " vocabulary for details on the underlying sequence type constructed." } ; ARTICLE: "c-strings" "C strings" -"C string types are arrays with shape " { $snippet "{ char* encoding }" } ", where " { $snippet "encoding" } " is an encoding descriptor. The type " { $link char* } " is an alias for " { $snippet "{ char* utf8 }" } ". See " { $link "encodings-descriptors" } " for information about encoding descriptors." +"C string types are arrays with shape " { $snippet "{ c-string encoding }" } ", where " { $snippet "encoding" } " is an encoding descriptor. The type " { $link c-string } " is an alias for " { $snippet "{ c-string utf8 }" } ". See " { $link "encodings-descriptors" } " for information about encoding descriptors. In " { $link POSTPONE: TYPEDEF: } ", " { $link POSTPONE: FUNCTION: } ", " { $link POSTPONE: CALLBACK: } ", and " { $link POSTPONE: STRUCT: } " definitions, the shorthand syntax " { $snippet "c-string[encoding]" } " can be used to specify the string encoding." $nl -"Passing a Factor string to a C function expecting a C string allocates a " { $link byte-array } " in the Factor heap; the string is then converted to the requested format and a raw pointer is passed to the function." +"Passing a Factor string to a C function expecting a " { $link c-string } " allocates a " { $link byte-array } " in the Factor heap; the string is then converted to the requested format and a raw pointer is passed to the function." $nl "If the conversion fails, for example if the string contains null bytes or characters with values higher than 255, a " { $link c-string-error. } " is thrown." $nl -"Care must be taken if the C function expects a " { $link char* } " with a length in bytes, rather than a null-terminated " { $link char* } "; passing the result of calling " { $link length } " on the string object will not suffice. This is because a Factor string of " { $emphasis "n" } " characters will not necessarily encode to " { $emphasis "n" } " bytes. The correct idiom for C functions which take a string with a length is to first encode the string using " { $link encode } ", and then pass the resulting byte array together with the length of this byte array." +"Care must be taken if the C function expects a pointer to a string with its length represented by another parameter rather than a null terminator. Passing the result of calling " { $link length } " on the string object will not suffice. This is because a Factor string of " { $emphasis "n" } " characters will not necessarily encode to " { $emphasis "n" } " bytes. The correct idiom for C functions which take a string with a length is to first encode the string using " { $link encode } ", and then pass the resulting byte array together with the length of this byte array." $nl "Sometimes a C function has a parameter type of " { $link void* } ", and various data types, among them strings, can be passed in. In this case, strings are not automatically converted to aliens, and instead you must call one of these words:" { $subsections @@ -155,7 +155,9 @@ $nl } "The first allocates " { $link byte-array } "s, and the latter allocates manually-managed memory which is not moved by the garbage collector and has to be explicitly freed by calling " { $link free } ". See " { $link "byte-arrays-gc" } " for a discussion of the two approaches." $nl +"The C type " { $link char } { $snippet "*" } " represents a generic pointer to " { $snippet "char" } "; arguments with this type will expect and return " { $link alien } "s, and won't perform any implicit string conversion." +$nl "A word to read strings from arbitrary addresses:" { $subsections alien>string } -"For example, if a C function returns a " { $link char* } " but stipulates that the caller must deallocate the memory afterward, you must define the function as returning " { $link void* } ", and call one of the above words before passing the pointer to " { $link free } "." ; +"For example, if a C function returns a " { $link c-string } " but stipulates that the caller must deallocate the memory afterward, you must define the function as returning " { $snippet "char*" } " and call one of the above words before passing the pointer to " { $link free } "." ; diff --git a/basis/alien/parser/parser-tests.factor b/basis/alien/parser/parser-tests.factor index 37f10722d1..a730e3084f 100644 --- a/basis/alien/parser/parser-tests.factor +++ b/basis/alien/parser/parser-tests.factor @@ -23,9 +23,9 @@ CONSTANT: eleven 11 [ pointer: int* ] [ "int**" parse-c-type ] unit-test [ pointer: int** ] [ "int***" parse-c-type ] unit-test [ pointer: int*** ] [ "int****" parse-c-type ] unit-test - [ pointer: char ] [ "char*" parse-c-type ] unit-test + [ c-string ] [ "c-string" parse-c-type ] unit-test [ char2 ] [ "char2" parse-c-type ] unit-test - [ pointer: char2 ] [ "char2*" parse-c-type ] unit-test + [ c-string2 ] [ "char2*" parse-c-type ] unit-test [ "not-word" parse-c-type ] [ error>> no-word-error? ] must-fail-with ] with-file-vocabs diff --git a/basis/alien/remote-control/remote-control.factor b/basis/alien/remote-control/remote-control.factor index ae694bed9c..c305d720f0 100644 --- a/basis/alien/remote-control/remote-control.factor +++ b/basis/alien/remote-control/remote-control.factor @@ -6,7 +6,7 @@ eval ; IN: alien.remote-control : eval-callback ( -- callback ) - void* { char* } "cdecl" + void* { c-string } "cdecl" [ eval>string utf8 malloc-string ] alien-callback ; : yield-callback ( -- callback ) diff --git a/basis/alien/syntax/syntax-docs.factor b/basis/alien/syntax/syntax-docs.factor index 8ec67d2f65..3d1c757035 100644 --- a/basis/alien/syntax/syntax-docs.factor +++ b/basis/alien/syntax/syntax-docs.factor @@ -40,11 +40,11 @@ $nl } "You can define a word for invoking it:" { $unchecked-example - "LIBRARY: foo\nFUNCTION: void the_answer ( char* question, int value ) ;" - "USE: compiler" + "LIBRARY: foo\nFUNCTION: void the_answer ( c-string question, int value ) ;" "\"the question\" 42 the_answer" "The answer to the question is 42." } } +"Using the " { $link c-string } " type instead of " { $snippet "char*" } " causes the FFI to automatically convert Factor strings to C strings. See " { $link "c-strings" } " for more information on using strings with the FFI." { $notes "Note that the parentheses and commas are only syntax sugar and can be omitted; they serve no purpose other than to make the declaration slightly easier to read:" { $code "FUNCTION: void glHint ( GLenum target, GLenum mode ) ;" diff --git a/basis/cairo/ffi/ffi.factor b/basis/cairo/ffi/ffi.factor index 49975afc61..bca02c1f17 100644 --- a/basis/cairo/ffi/ffi.factor +++ b/basis/cairo/ffi/ffi.factor @@ -18,7 +18,7 @@ IN: cairo.ffi LIBRARY: cairo FUNCTION: int cairo_version ( ) ; -FUNCTION: char* cairo_version_string ( ) ; +FUNCTION: c-string cairo_version_string ( ) ; TYPEDEF: int cairo_bool_t @@ -79,11 +79,11 @@ CONSTANT: CAIRO_CONTENT_COLOR_ALPHA HEX: 3000 TYPEDEF: void* cairo_write_func_t : cairo-write-func ( quot -- callback ) - [ cairo_status_t { pointer: void pointer: uchar int } "cdecl" ] dip alien-callback ; inline + [ cairo_status_t { pointer: void c-string int } "cdecl" ] dip alien-callback ; inline TYPEDEF: void* cairo_read_func_t : cairo-read-func ( quot -- callback ) - [ cairo_status_t { pointer: void pointer: uchar int } "cdecl" ] dip alien-callback ; inline + [ cairo_status_t { pointer: void c-string int } "cdecl" ] dip alien-callback ; inline ! Functions for manipulating state objects FUNCTION: cairo_t* @@ -463,7 +463,7 @@ cairo_font_options_get_hint_metrics ( cairo_font_options_t* options ) ; ! font object inside the the cairo_t. FUNCTION: void -cairo_select_font_face ( cairo_t* cr, char* family, cairo_font_slant_t slant, cairo_font_weight_t weight ) ; +cairo_select_font_face ( cairo_t* cr, c-string family, cairo_font_slant_t slant, cairo_font_weight_t weight ) ; FUNCTION: void cairo_set_font_size ( cairo_t* cr, double size ) ; @@ -493,19 +493,19 @@ FUNCTION: cairo_scaled_font_t* cairo_get_scaled_font ( cairo_t* cr ) ; FUNCTION: void -cairo_show_text ( cairo_t* cr, char* utf8 ) ; +cairo_show_text ( cairo_t* cr, c-string utf8 ) ; FUNCTION: void cairo_show_glyphs ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ; FUNCTION: void -cairo_text_path ( cairo_t* cr, char* utf8 ) ; +cairo_text_path ( cairo_t* cr, c-string utf8 ) ; FUNCTION: void cairo_glyph_path ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs ) ; FUNCTION: void -cairo_text_extents ( cairo_t* cr, char* utf8, cairo_text_extents_t* extents ) ; +cairo_text_extents ( cairo_t* cr, c-string utf8, cairo_text_extents_t* extents ) ; FUNCTION: void cairo_glyph_extents ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ; @@ -573,7 +573,7 @@ FUNCTION: void cairo_scaled_font_extents ( cairo_scaled_font_t* scaled_font, cairo_font_extents_t* extents ) ; FUNCTION: void -cairo_scaled_font_text_extents ( cairo_scaled_font_t* scaled_font, char* utf8, cairo_text_extents_t* extents ) ; +cairo_scaled_font_text_extents ( cairo_scaled_font_t* scaled_font, c-string utf8, cairo_text_extents_t* extents ) ; FUNCTION: void cairo_scaled_font_glyph_extents ( cairo_scaled_font_t* scaled_font, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents ) ; @@ -682,7 +682,7 @@ cairo_path_destroy ( cairo_path_t* path ) ; FUNCTION: cairo_status_t cairo_status ( cairo_t* cr ) ; -FUNCTION: char* +FUNCTION: c-string cairo_status_to_string ( cairo_status_t status ) ; ! Surface manipulation @@ -731,7 +731,7 @@ FUNCTION: cairo_content_t cairo_surface_get_content ( cairo_surface_t* surface ) ; FUNCTION: cairo_status_t -cairo_surface_write_to_png ( cairo_surface_t* surface, char* filename ) ; +cairo_surface_write_to_png ( cairo_surface_t* surface, c-string filename ) ; FUNCTION: cairo_status_t cairo_surface_write_to_png_stream ( cairo_surface_t* surface, cairo_write_func_t write_func, void* closure ) ; @@ -786,9 +786,9 @@ FUNCTION: int cairo_format_stride_for_width ( cairo_format_t format, int width ) ; FUNCTION: cairo_surface_t* -cairo_image_surface_create_for_data ( uchar* data, cairo_format_t format, int width, int height, int stride ) ; +cairo_image_surface_create_for_data ( c-string data, cairo_format_t format, int width, int height, int stride ) ; -FUNCTION: uchar* +FUNCTION: c-string cairo_image_surface_get_data ( cairo_surface_t* surface ) ; FUNCTION: cairo_format_t @@ -804,7 +804,7 @@ FUNCTION: int cairo_image_surface_get_stride ( cairo_surface_t* surface ) ; FUNCTION: cairo_surface_t* -cairo_image_surface_create_from_png ( char* filename ) ; +cairo_image_surface_create_from_png ( c-string filename ) ; FUNCTION: cairo_surface_t* cairo_image_surface_create_from_png_stream ( cairo_read_func_t read_func, void* closure ) ; diff --git a/basis/classes/struct/struct-docs.factor b/basis/classes/struct/struct-docs.factor index 1a5294992e..7dbfda1f4f 100644 --- a/basis/classes/struct/struct-docs.factor +++ b/basis/classes/struct/struct-docs.factor @@ -159,7 +159,7 @@ $nl "A C function which returns a struct by value:" { $code "USING: alien.syntax ;" - "FUNCTION: Point give_me_a_point ( char* description ) ;" + "FUNCTION: Point give_me_a_point ( c-string description ) ;" } "A C function which takes a struct parameter by reference:" { $code diff --git a/basis/classes/struct/struct-tests.factor b/basis/classes/struct/struct-tests.factor index 82530614bf..c94ef48f4c 100644 --- a/basis/classes/struct/struct-tests.factor +++ b/basis/classes/struct/struct-tests.factor @@ -139,7 +139,7 @@ UNION-STRUCT: struct-test-float-and-bits [ 123 ] [ [ struct-test-foo malloc-struct &free y>> ] with-destructors ] unit-test STRUCT: struct-test-string-ptr - { x char* } ; + { x c-string } ; [ "hello world" ] [ [ diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index 76b77721ff..2569c391d1 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -110,7 +110,7 @@ H{ { "d" c:double } { "B" c:bool } { "v" c:void } - { "*" c:char* } + { "*" c:c-string } { "?" unknown_type } { "@" id } { "#" Class } diff --git a/basis/cocoa/runtime/runtime.factor b/basis/cocoa/runtime/runtime.factor index f02f1f6182..9e49835242 100644 --- a/basis/cocoa/runtime/runtime.factor +++ b/basis/cocoa/runtime/runtime.factor @@ -7,11 +7,11 @@ TYPEDEF: void* SEL TYPEDEF: void* id -FUNCTION: char* sel_getName ( SEL aSelector ) ; +FUNCTION: c-string sel_getName ( SEL aSelector ) ; FUNCTION: char sel_isMapped ( SEL aSelector ) ; -FUNCTION: SEL sel_registerName ( char* str ) ; +FUNCTION: SEL sel_registerName ( c-string str ) ; TYPEDEF: void* Class TYPEDEF: void* Method @@ -33,13 +33,13 @@ CONSTANT: CLS_METHOD_ARRAY HEX: 100 FUNCTION: int objc_getClassList ( void* buffer, int bufferLen ) ; -FUNCTION: Class objc_getClass ( char* class ) ; +FUNCTION: Class objc_getClass ( c-string class ) ; -FUNCTION: Class objc_getMetaClass ( char* class ) ; +FUNCTION: Class objc_getMetaClass ( c-string class ) ; -FUNCTION: Protocol objc_getProtocol ( char* class ) ; +FUNCTION: Protocol objc_getProtocol ( c-string class ) ; -FUNCTION: Class objc_allocateClassPair ( Class superclass, char* name, size_t extraBytes ) ; +FUNCTION: Class objc_allocateClassPair ( Class superclass, c-string name, size_t extraBytes ) ; FUNCTION: void objc_registerClassPair ( Class cls ) ; FUNCTION: id class_createInstance ( Class class, uint additionalByteCount ) ; @@ -54,7 +54,7 @@ FUNCTION: Method* class_copyMethodList ( Class class, uint* outCount ) ; FUNCTION: Class class_getSuperclass ( Class cls ) ; -FUNCTION: char* class_getName ( Class cls ) ; +FUNCTION: c-string class_getName ( Class cls ) ; FUNCTION: char class_addMethod ( Class class, SEL name, void* imp, void* types ) ; @@ -64,7 +64,7 @@ FUNCTION: uint method_getNumberOfArguments ( Method method ) ; FUNCTION: uint method_getSizeOfArguments ( Method method ) ; -FUNCTION: uint method_getArgumentInfo ( Method method, int argIndex, char** type, int* offset ) ; +FUNCTION: uint method_getArgumentInfo ( Method method, int argIndex, c-string* type, int* offset ) ; FUNCTION: void* method_copyReturnType ( Method method ) ; diff --git a/basis/compiler/tests/alien.factor b/basis/compiler/tests/alien.factor index aba73d1a22..acb5555bc3 100755 --- a/basis/compiler/tests/alien.factor +++ b/basis/compiler/tests/alien.factor @@ -67,7 +67,7 @@ FUNCTION: FOO ffi_test_14 int x int y ; [ 11 6 ] [ 11 6 ffi_test_14 [ x>> ] [ y>> ] bi ] unit-test -FUNCTION: char* ffi_test_15 char* x char* y ; +FUNCTION: c-string ffi_test_15 c-string x c-string y ; [ "foo" ] [ "xy" "zt" ffi_test_15 ] unit-test [ "bar" ] [ "xy" "xy" ffi_test_15 ] unit-test @@ -576,7 +576,7 @@ FUNCTION: complex-float ffi_test_47 ( complex-float x, complex-double y ) ; ! Reported by jedahu STRUCT: bool-field-test - { name char* } + { name c-string } { on bool } { parents short } ; diff --git a/basis/core-foundation/data/data.factor b/basis/core-foundation/data/data.factor index c4c09d0cc5..65d6d728c1 100644 --- a/basis/core-foundation/data/data.factor +++ b/basis/core-foundation/data/data.factor @@ -12,7 +12,7 @@ CONSTANT: kCFPropertyListImmutable 0 CONSTANT: kCFPropertyListMutableContainers 1 CONSTANT: kCFPropertyListMutableContainersAndLeaves 2 -FUNCTION: CFDataRef CFDataCreate ( CFAllocatorRef allocator, uchar* bytes, CFIndex length ) ; +FUNCTION: CFDataRef CFDataCreate ( CFAllocatorRef allocator, c-string bytes, CFIndex length ) ; FUNCTION: CFTypeID CFGetTypeID ( CFTypeRef cf ) ; diff --git a/basis/core-foundation/strings/strings.factor b/basis/core-foundation/strings/strings.factor index cbabb083aa..9a91335ae2 100644 --- a/basis/core-foundation/strings/strings.factor +++ b/basis/core-foundation/strings/strings.factor @@ -37,7 +37,7 @@ FUNCTION: void CFStringGetCharacters ( void* theString, CFIndex start, CFIndex l FUNCTION: Boolean CFStringGetCString ( CFStringRef theString, - char* buffer, + c-string buffer, CFIndex bufferSize, CFStringEncoding encoding ) ; @@ -55,7 +55,7 @@ FUNCTION: CFIndex CFStringGetBytes ( FUNCTION: CFStringRef CFStringCreateWithCString ( CFAllocatorRef alloc, - char* cStr, + c-string cStr, CFStringEncoding encoding ) ; diff --git a/basis/db/postgresql/ffi/ffi.factor b/basis/db/postgresql/ffi/ffi.factor index 69ac2c5e5e..812507a20f 100644 --- a/basis/db/postgresql/ffi/ffi.factor +++ b/basis/db/postgresql/ffi/ffi.factor @@ -77,15 +77,15 @@ LIBRARY: postgresql ! make a new client connection to the backend ! Asynchronous (non-blocking) -FUNCTION: PGconn* PQconnectStart ( char* conninfo ) ; +FUNCTION: PGconn* PQconnectStart ( c-string conninfo ) ; FUNCTION: PostgresPollingStatusType PQconnectPoll ( PGconn* conn ) ; ! Synchronous (blocking) -FUNCTION: PGconn* PQconnectdb ( char* conninfo ) ; -FUNCTION: PGconn* PQsetdbLogin ( char* pghost, char* pgport, - char* pgoptions, char* pgtty, - char* dbName, - char* login, char* pwd ) ; +FUNCTION: PGconn* PQconnectdb ( c-string conninfo ) ; +FUNCTION: PGconn* PQsetdbLogin ( c-string pghost, c-string pgport, + c-string pgoptions, c-string pgtty, + c-string dbName, + c-string login, c-string pwd ) ; : PQsetdb ( M_PGHOST M_PGPORT M_PGOPT M_PGTTY M_DBNAME -- PGconn* ) f f PQsetdbLogin ; @@ -116,24 +116,24 @@ FUNCTION: void PQfreeCancel ( PGcancel* cancel ) ; FUNCTION: int PQrequestCancel ( PGconn* conn ) ; ! Accessor functions for PGconn objects -FUNCTION: char* PQdb ( PGconn* conn ) ; -FUNCTION: char* PQuser ( PGconn* conn ) ; -FUNCTION: char* PQpass ( PGconn* conn ) ; -FUNCTION: char* PQhost ( PGconn* conn ) ; -FUNCTION: char* PQport ( PGconn* conn ) ; -FUNCTION: char* PQtty ( PGconn* conn ) ; -FUNCTION: char* PQoptions ( PGconn* conn ) ; +FUNCTION: c-string PQdb ( PGconn* conn ) ; +FUNCTION: c-string PQuser ( PGconn* conn ) ; +FUNCTION: c-string PQpass ( PGconn* conn ) ; +FUNCTION: c-string PQhost ( PGconn* conn ) ; +FUNCTION: c-string PQport ( PGconn* conn ) ; +FUNCTION: c-string PQtty ( PGconn* conn ) ; +FUNCTION: c-string PQoptions ( PGconn* conn ) ; FUNCTION: ConnStatusType PQstatus ( PGconn* conn ) ; FUNCTION: PGTransactionStatusType PQtransactionStatus ( PGconn* conn ) ; -FUNCTION: char* PQparameterStatus ( PGconn* conn, - char* paramName ) ; +FUNCTION: c-string PQparameterStatus ( PGconn* conn, + c-string paramName ) ; FUNCTION: int PQprotocolVersion ( PGconn* conn ) ; ! FUNCTION: int PQServerVersion ( PGconn* conn ) ; -FUNCTION: char* PQerrorMessage ( PGconn* conn ) ; +FUNCTION: c-string PQerrorMessage ( PGconn* conn ) ; FUNCTION: int PQsocket ( PGconn* conn ) ; FUNCTION: int PQbackendPID ( PGconn* conn ) ; FUNCTION: int PQclientEncoding ( PGconn* conn ) ; -FUNCTION: int PQsetClientEncoding ( PGconn* conn, char* encoding ) ; +FUNCTION: int PQsetClientEncoding ( PGconn* conn, c-string encoding ) ; ! May not be compiled into libpq ! Get the SSL structure associated with a connection @@ -153,7 +153,7 @@ FUNCTION: void PQuntrace ( PGconn* conn ) ; ! BROKEN ! Function types for notice-handling callbacks ! typedef void (*PQnoticeReceiver) (void *arg, PGresult *res); -! typedef void (*PQnoticeProcessor) (void *arg, char* message); +! typedef void (*PQnoticeProcessor) (void *arg, c-string message); ! ALIAS: void* PQnoticeReceiver ! ALIAS: void* PQnoticeProcessor @@ -169,43 +169,43 @@ FUNCTION: void PQuntrace ( PGconn* conn ) ; ! === in fe-exec.c === ! Simple synchronous query -FUNCTION: PGresult* PQexec ( PGconn* conn, char* query ) ; +FUNCTION: PGresult* PQexec ( PGconn* conn, c-string query ) ; FUNCTION: PGresult* PQexecParams ( PGconn* conn, - char* command, + c-string command, int nParams, Oid* paramTypes, - char** paramValues, + c-string* paramValues, int* paramLengths, int* paramFormats, int resultFormat ) ; -FUNCTION: PGresult* PQprepare ( PGconn* conn, char* stmtName, - char* query, int nParams, +FUNCTION: PGresult* PQprepare ( PGconn* conn, c-string stmtName, + c-string query, int nParams, Oid* paramTypes ) ; FUNCTION: PGresult* PQexecPrepared ( PGconn* conn, - char* stmtName, + c-string stmtName, int nParams, - char** paramValues, + c-string* paramValues, int* paramLengths, int* paramFormats, int resultFormat ) ; ! Interface for multiple-result or asynchronous queries -FUNCTION: int PQsendQuery ( PGconn* conn, char* query ) ; +FUNCTION: int PQsendQuery ( PGconn* conn, c-string query ) ; FUNCTION: int PQsendQueryParams ( PGconn* conn, - char* command, + c-string command, int nParams, Oid* paramTypes, - char** paramValues, + c-string* paramValues, int* paramLengths, int* paramFormats, int resultFormat ) ; -FUNCTION: PGresult* PQsendPrepare ( PGconn* conn, char* stmtName, - char* query, int nParams, +FUNCTION: PGresult* PQsendPrepare ( PGconn* conn, c-string stmtName, + c-string query, int nParams, Oid* paramTypes ) ; FUNCTION: int PQsendQueryPrepared ( PGconn* conn, - char* stmtName, + c-string stmtName, int nParams, - char** paramValues, + c-string* paramValues, int *paramLengths, int *paramFormats, int resultFormat ) ; @@ -219,15 +219,15 @@ FUNCTION: int PQconsumeInput ( PGconn* conn ) ; FUNCTION: PGnotify* PQnotifies ( PGconn* conn ) ; ! Routines for copy in/out -FUNCTION: int PQputCopyData ( PGconn* conn, char* buffer, int nbytes ) ; -FUNCTION: int PQputCopyEnd ( PGconn* conn, char* errormsg ) ; -FUNCTION: int PQgetCopyData ( PGconn* conn, char** buffer, int async ) ; +FUNCTION: int PQputCopyData ( PGconn* conn, c-string buffer, int nbytes ) ; +FUNCTION: int PQputCopyEnd ( PGconn* conn, c-string errormsg ) ; +FUNCTION: int PQgetCopyData ( PGconn* conn, c-string* buffer, int async ) ; ! Deprecated routines for copy in/out -FUNCTION: int PQgetline ( PGconn* conn, char* string, int length ) ; -FUNCTION: int PQputline ( PGconn* conn, char* string ) ; -FUNCTION: int PQgetlineAsync ( PGconn* conn, char* buffer, int bufsize ) ; -FUNCTION: int PQputnbytes ( PGconn* conn, char* buffer, int nbytes ) ; +FUNCTION: int PQgetline ( PGconn* conn, c-string string, int length ) ; +FUNCTION: int PQputline ( PGconn* conn, c-string string ) ; +FUNCTION: int PQgetlineAsync ( PGconn* conn, c-string buffer, int bufsize ) ; +FUNCTION: int PQputnbytes ( PGconn* conn, c-string buffer, int nbytes ) ; FUNCTION: int PQendcopy ( PGconn* conn ) ; ! Set blocking/nonblocking connection to the backend @@ -251,25 +251,25 @@ FUNCTION: PGresult* PQfn ( PGconn* conn, ! Accessor functions for PGresult objects FUNCTION: ExecStatusType PQresultStatus ( PGresult* res ) ; -FUNCTION: char* PQresStatus ( ExecStatusType status ) ; -FUNCTION: char* PQresultErrorMessage ( PGresult* res ) ; -FUNCTION: char* PQresultErrorField ( PGresult* res, int fieldcode ) ; +FUNCTION: c-string PQresStatus ( ExecStatusType status ) ; +FUNCTION: c-string PQresultErrorMessage ( PGresult* res ) ; +FUNCTION: c-string PQresultErrorField ( PGresult* res, int fieldcode ) ; FUNCTION: int PQntuples ( PGresult* res ) ; FUNCTION: int PQnfields ( PGresult* res ) ; FUNCTION: int PQbinaryTuples ( PGresult* res ) ; -FUNCTION: char* PQfname ( PGresult* res, int field_num ) ; -FUNCTION: int PQfnumber ( PGresult* res, char* field_name ) ; +FUNCTION: c-string PQfname ( PGresult* res, int field_num ) ; +FUNCTION: int PQfnumber ( PGresult* res, c-string field_name ) ; FUNCTION: Oid PQftable ( PGresult* res, int field_num ) ; FUNCTION: int PQftablecol ( PGresult* res, int field_num ) ; FUNCTION: int PQfformat ( PGresult* res, int field_num ) ; FUNCTION: Oid PQftype ( PGresult* res, int field_num ) ; FUNCTION: int PQfsize ( PGresult* res, int field_num ) ; FUNCTION: int PQfmod ( PGresult* res, int field_num ) ; -FUNCTION: char* PQcmdStatus ( PGresult* res ) ; -FUNCTION: char* PQoidStatus ( PGresult* res ) ; +FUNCTION: c-string PQcmdStatus ( PGresult* res ) ; +FUNCTION: c-string PQoidStatus ( PGresult* res ) ; FUNCTION: Oid PQoidValue ( PGresult* res ) ; -FUNCTION: char* PQcmdTuples ( PGresult* res ) ; -! FUNCTION: char* PQgetvalue ( PGresult* res, int tup_num, int field_num ) ; +FUNCTION: c-string PQcmdTuples ( PGresult* res ) ; +! FUNCTION: c-string PQgetvalue ( PGresult* res, int tup_num, int field_num ) ; FUNCTION: void* PQgetvalue ( PGresult* res, int tup_num, int field_num ) ; FUNCTION: int PQgetlength ( PGresult* res, int tup_num, int field_num ) ; FUNCTION: int PQgetisnull ( PGresult* res, int tup_num, int field_num ) ; @@ -292,16 +292,16 @@ FUNCTION: PGresult* PQmakeEmptyPGresult ( PGconn* conn, ExecStatusType status ) ! Quoting strings before inclusion in queries. FUNCTION: size_t PQescapeStringConn ( PGconn* conn, - char* to, char* from, size_t length, + c-string to, c-string from, size_t length, int* error ) ; -FUNCTION: uchar* PQescapeByteaConn ( PGconn* conn, - char* from, size_t length, +FUNCTION: c-string PQescapeByteaConn ( PGconn* conn, + c-string from, size_t length, size_t* to_length ) ; -FUNCTION: void* PQunescapeBytea ( uchar* strtext, size_t* retbuflen ) ; -! FUNCTION: uchar* PQunescapeBytea ( uchar* strtext, size_t* retbuflen ) ; +FUNCTION: void* PQunescapeBytea ( c-string strtext, size_t* retbuflen ) ; +! FUNCTION: c-string PQunescapeBytea ( c-string strtext, size_t* retbuflen ) ; ! These forms are deprecated! -FUNCTION: size_t PQescapeString ( void* to, char* from, size_t length ) ; -FUNCTION: uchar* PQescapeBytea ( uchar* bintext, size_t binlen, +FUNCTION: size_t PQescapeString ( void* to, c-string from, size_t length ) ; +FUNCTION: c-string PQescapeBytea ( c-string bintext, size_t binlen, size_t* bytealen ) ; ! === in fe-print.c === @@ -312,7 +312,7 @@ FUNCTION: void PQprint ( FILE* fout, PGresult* res, PQprintOpt* ps ) ; FUNCTION: void PQdisplayTuples ( PGresult* res, FILE* fp, int fillAlign, - char* fieldSep, + c-string fieldSep, int printHeader, int quiet ) ; @@ -326,23 +326,23 @@ FUNCTION: void PQprintTuples ( PGresult* res, ! Large-object access routines FUNCTION: int lo_open ( PGconn* conn, Oid lobjId, int mode ) ; FUNCTION: int lo_close ( PGconn* conn, int fd ) ; -FUNCTION: int lo_read ( PGconn* conn, int fd, char* buf, size_t len ) ; -FUNCTION: int lo_write ( PGconn* conn, int fd, char* buf, size_t len ) ; +FUNCTION: int lo_read ( PGconn* conn, int fd, c-string buf, size_t len ) ; +FUNCTION: int lo_write ( PGconn* conn, int fd, c-string buf, size_t len ) ; FUNCTION: int lo_lseek ( PGconn* conn, int fd, int offset, int whence ) ; FUNCTION: Oid lo_creat ( PGconn* conn, int mode ) ; ! FUNCTION: Oid lo_creat ( PGconn* conn, Oid lobjId ) ; FUNCTION: int lo_tell ( PGconn* conn, int fd ) ; FUNCTION: int lo_unlink ( PGconn* conn, Oid lobjId ) ; -FUNCTION: Oid lo_import ( PGconn* conn, char* filename ) ; -FUNCTION: int lo_export ( PGconn* conn, Oid lobjId, char* filename ) ; +FUNCTION: Oid lo_import ( PGconn* conn, c-string filename ) ; +FUNCTION: int lo_export ( PGconn* conn, Oid lobjId, c-string filename ) ; ! === in fe-misc.c === ! Determine length of multibyte encoded char at *s -FUNCTION: int PQmblen ( uchar* s, int encoding ) ; +FUNCTION: int PQmblen ( c-string s, int encoding ) ; ! Determine display length of multibyte encoded char at *s -FUNCTION: int PQdsplen ( uchar* s, int encoding ) ; +FUNCTION: int PQdsplen ( c-string s, int encoding ) ; ! Get encoding id from environment variable PGCLIENTENCODING FUNCTION: int PQenv2encoding ( ) ; diff --git a/basis/db/sqlite/ffi/ffi.factor b/basis/db/sqlite/ffi/ffi.factor index 53562fd87e..f93b961799 100644 --- a/basis/db/sqlite/ffi/ffi.factor +++ b/basis/db/sqlite/ffi/ffi.factor @@ -105,11 +105,11 @@ TYPEDEF: longlong sqlite3_int64 TYPEDEF: ulonglong sqlite3_uint64 LIBRARY: sqlite -FUNCTION: int sqlite3_open ( char* filename, void* ppDb ) ; +FUNCTION: int sqlite3_open ( c-string filename, void* ppDb ) ; FUNCTION: int sqlite3_close ( sqlite3* pDb ) ; -FUNCTION: char* sqlite3_errmsg ( sqlite3* pDb ) ; -FUNCTION: int sqlite3_prepare ( sqlite3* pDb, char* zSql, int nBytes, void* ppStmt, void* pzTail ) ; -FUNCTION: int sqlite3_prepare_v2 ( sqlite3* pDb, char* zSql, int nBytes, void* ppStmt, void* pzTail ) ; +FUNCTION: c-string sqlite3_errmsg ( sqlite3* pDb ) ; +FUNCTION: int sqlite3_prepare ( sqlite3* pDb, c-string zSql, int nBytes, void* ppStmt, void* pzTail ) ; +FUNCTION: int sqlite3_prepare_v2 ( sqlite3* pDb, c-string zSql, int nBytes, void* ppStmt, void* pzTail ) ; FUNCTION: int sqlite3_finalize ( sqlite3_stmt* pStmt ) ; FUNCTION: int sqlite3_reset ( sqlite3_stmt* pStmt ) ; FUNCTION: int sqlite3_step ( sqlite3_stmt* pStmt ) ; @@ -123,13 +123,13 @@ FUNCTION: int sqlite3_bind_int64 ( sqlite3_stmt* pStmt, int index, sqlite3_int64 int "sqlite" "sqlite3_bind_int64" { pointer: sqlite3_stmt int sqlite3_uint64 } alien-invoke ; FUNCTION: int sqlite3_bind_null ( sqlite3_stmt* pStmt, int n ) ; -FUNCTION: int sqlite3_bind_text ( sqlite3_stmt* pStmt, int index, char* text, int len, int destructor ) ; -FUNCTION: int sqlite3_bind_parameter_index ( sqlite3_stmt* pStmt, char* name ) ; +FUNCTION: int sqlite3_bind_text ( sqlite3_stmt* pStmt, int index, c-string text, int len, int destructor ) ; +FUNCTION: int sqlite3_bind_parameter_index ( sqlite3_stmt* pStmt, c-string name ) ; FUNCTION: int sqlite3_clear_bindings ( sqlite3_stmt* pStmt ) ; FUNCTION: int sqlite3_column_count ( sqlite3_stmt* pStmt ) ; FUNCTION: void* sqlite3_column_blob ( sqlite3_stmt* pStmt, int col ) ; FUNCTION: int sqlite3_column_bytes ( sqlite3_stmt* pStmt, int col ) ; -FUNCTION: char* sqlite3_column_decltype ( sqlite3_stmt* pStmt, int col ) ; +FUNCTION: c-string sqlite3_column_decltype ( sqlite3_stmt* pStmt, int col ) ; FUNCTION: int sqlite3_column_int ( sqlite3_stmt* pStmt, int col ) ; FUNCTION: sqlite3_int64 sqlite3_column_int64 ( sqlite3_stmt* pStmt, int col ) ; ! Bind the same function as above, but for unsigned 64bit integers @@ -137,6 +137,6 @@ FUNCTION: sqlite3_int64 sqlite3_column_int64 ( sqlite3_stmt* pStmt, int col ) ; sqlite3_uint64 "sqlite" "sqlite3_column_int64" { pointer: sqlite3_stmt int } alien-invoke ; FUNCTION: double sqlite3_column_double ( sqlite3_stmt* pStmt, int col ) ; -FUNCTION: char* sqlite3_column_name ( sqlite3_stmt* pStmt, int col ) ; -FUNCTION: char* sqlite3_column_text ( sqlite3_stmt* pStmt, int col ) ; +FUNCTION: c-string sqlite3_column_name ( sqlite3_stmt* pStmt, int col ) ; +FUNCTION: c-string sqlite3_column_text ( sqlite3_stmt* pStmt, int col ) ; FUNCTION: int sqlite3_column_type ( sqlite3_stmt* pStmt, int col ) ; diff --git a/basis/iokit/hid/hid.factor b/basis/iokit/hid/hid.factor index ca339a78ef..bd3fc1e968 100644 --- a/basis/iokit/hid/hid.factor +++ b/basis/iokit/hid/hid.factor @@ -132,7 +132,7 @@ TYPEDEF: UInt32 IOHIDValueScaleType TYPEDEF: UInt32 IOHIDTransactionDirectionType CALLBACK: void IOHIDCallback ( void* context, IOReturn result, void* sender ) ; -CALLBACK: void IOHIDReportCallback ( void* context, IOReturn result, void* sender, IOHIDReportType type, UInt32 reportID, uchar* report, CFIndex reportLength ) ; +CALLBACK: void IOHIDReportCallback ( void* context, IOReturn result, void* sender, IOHIDReportType type, UInt32 reportID, c-string report, CFIndex reportLength ) ; CALLBACK: void IOHIDValueCallback ( void* context, IOReturn result, void* sender, IOHIDValueRef value ) ; CALLBACK: void IOHIDValueMultipleCallback ( void* context, IOReturn result, void* sender, CFDictionaryRef multiple ) ; CALLBACK: void IOHIDDeviceCallback ( void* context, IOReturn result, void* sender, IOHIDDeviceRef device ) ; @@ -151,7 +151,7 @@ FUNCTION: void IOHIDDeviceScheduleWithRunLoop ( IOHIDDeviceRef device, CFRunLoop FUNCTION: void IOHIDDeviceUnscheduleFromRunLoop ( IOHIDDeviceRef device, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ; FUNCTION: void IOHIDDeviceRegisterRemovalCallback ( IOHIDDeviceRef device, IOHIDCallback callback, void* context ) ; FUNCTION: void IOHIDDeviceRegisterInputValueCallback ( IOHIDDeviceRef device, IOHIDValueCallback callback, void* context ) ; -FUNCTION: void IOHIDDeviceRegisterInputReportCallback ( IOHIDDeviceRef device, uchar* report, CFIndex reportLength, IOHIDReportCallback callback, void* context ) ; +FUNCTION: void IOHIDDeviceRegisterInputReportCallback ( IOHIDDeviceRef device, c-string report, CFIndex reportLength, IOHIDReportCallback callback, void* context ) ; FUNCTION: void IOHIDDeviceSetInputValueMatching ( IOHIDDeviceRef device, CFDictionaryRef matching ) ; FUNCTION: void IOHIDDeviceSetInputValueMatchingMultiple ( IOHIDDeviceRef device, CFArrayRef multiple ) ; FUNCTION: IOReturn IOHIDDeviceSetValue ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef value ) ; @@ -162,10 +162,10 @@ FUNCTION: IOReturn IOHIDDeviceGetValue ( IOHIDDeviceRef device, IOHIDElementRef FUNCTION: IOReturn IOHIDDeviceCopyValueMultiple ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple ) ; FUNCTION: IOReturn IOHIDDeviceGetValueWithCallback ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef* pValue, CFTimeInterval timeout, IOHIDValueCallback callback, void* context ) ; FUNCTION: IOReturn IOHIDDeviceCopyValueMultipleWithCallback ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple, CFTimeInterval timeout, IOHIDValueMultipleCallback callback, void* context ) ; -FUNCTION: IOReturn IOHIDDeviceSetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength ) ; -FUNCTION: IOReturn IOHIDDeviceSetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ; -FUNCTION: IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength ) ; -FUNCTION: IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ; +FUNCTION: IOReturn IOHIDDeviceSetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, c-string report, CFIndex reportLength ) ; +FUNCTION: IOReturn IOHIDDeviceSetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, c-string report, CFIndex reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ; +FUNCTION: IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, c-string report, CFIndex* pReportLength ) ; +FUNCTION: IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, c-string report, CFIndex* pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ; ! IOHIDManager @@ -226,12 +226,12 @@ FUNCTION: Boolean IOHIDElementSetProperty ( IOHIDElementRef element, CFStringRef FUNCTION: CFTypeID IOHIDValueGetTypeID ( ) ; FUNCTION: IOHIDValueRef IOHIDValueCreateWithIntegerValue ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, CFIndex value ) ; -FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytes ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ; -FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytesNoCopy ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ; +FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytes ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, c-string bytes, CFIndex length ) ; +FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytesNoCopy ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, c-string bytes, CFIndex length ) ; FUNCTION: IOHIDElementRef IOHIDValueGetElement ( IOHIDValueRef value ) ; FUNCTION: ulonglong IOHIDValueGetTimeStamp ( IOHIDValueRef value ) ; FUNCTION: CFIndex IOHIDValueGetLength ( IOHIDValueRef value ) ; -FUNCTION: uchar* IOHIDValueGetBytePtr ( IOHIDValueRef value ) ; +FUNCTION: c-string IOHIDValueGetBytePtr ( IOHIDValueRef value ) ; FUNCTION: CFIndex IOHIDValueGetIntegerValue ( IOHIDValueRef value ) ; FUNCTION: double IOHIDValueGetScaledValue ( IOHIDValueRef value, IOHIDValueScaleType type ) ; diff --git a/basis/iokit/iokit.factor b/basis/iokit/iokit.factor index 2b31e5c8a8..577c9e1273 100644 --- a/basis/iokit/iokit.factor +++ b/basis/iokit/iokit.factor @@ -104,9 +104,9 @@ CONSTANT: KERN_SUCCESS 0 FUNCTION: IOReturn IOMasterPort ( mach_port_t bootstrap, mach_port_t* master ) ; -FUNCTION: CFDictionaryRef IOServiceMatching ( char* name ) ; -FUNCTION: CFDictionaryRef IOServiceNameMatching ( char* name ) ; -FUNCTION: CFDictionaryRef IOBSDNameMatching ( char* name ) ; +FUNCTION: CFDictionaryRef IOServiceMatching ( c-string name ) ; +FUNCTION: CFDictionaryRef IOServiceNameMatching ( c-string name ) ; +FUNCTION: CFDictionaryRef IOBSDNameMatching ( c-string name ) ; FUNCTION: IOReturn IOObjectRetain ( io_object_t o ) ; FUNCTION: IOReturn IOObjectRelease ( io_object_t o ) ; @@ -121,7 +121,7 @@ FUNCTION: IOReturn IORegistryEntryGetPath ( io_registry_entry_t entry, io_name_t FUNCTION: IOReturn IORegistryEntryCreateCFProperties ( io_registry_entry_t entry, CFMutableDictionaryRef properties, CFAllocatorRef allocator, IOOptionBits options ) ; -FUNCTION: char* mach_error_string ( IOReturn error ) ; +FUNCTION: c-string mach_error_string ( IOReturn error ) ; TUPLE: mach-error error-code error-string ; : ( code -- error ) diff --git a/basis/libc/libc.factor b/basis/libc/libc.factor index e935d49748..5f6a808b2e 100644 --- a/basis/libc/libc.factor +++ b/basis/libc/libc.factor @@ -96,6 +96,6 @@ PRIVATE> memcmp 0 = ; : strlen ( alien -- len ) - size_t "libc" "strlen" { char* } alien-invoke ; + size_t "libc" "strlen" { c-string } alien-invoke ; DESTRUCTOR: free diff --git a/basis/opengl/gl/gl.factor b/basis/opengl/gl/gl.factor index 27d24718c2..7652720f1a 100644 --- a/basis/opengl/gl/gl.factor +++ b/basis/opengl/gl/gl.factor @@ -668,7 +668,7 @@ FUNCTION: void glPopClientAttrib ( ) ; FUNCTION: GLint glRenderMode ( GLenum mode ) ; FUNCTION: GLenum glGetError ( ) ; -FUNCTION: char* glGetString ( GLenum name ) ; +FUNCTION: c-string glGetString ( GLenum name ) ; FUNCTION: void glFinish ( ) ; FUNCTION: void glFlush ( ) ; FUNCTION: void glHint ( GLenum target, GLenum mode ) ; diff --git a/basis/opengl/gl/windows/windows.factor b/basis/opengl/gl/windows/windows.factor index 5821e3f212..8bceb865e2 100644 --- a/basis/opengl/gl/windows/windows.factor +++ b/basis/opengl/gl/windows/windows.factor @@ -4,7 +4,7 @@ IN: opengl.gl.windows LIBRARY: gl FUNCTION: HGLRC wglGetCurrentContext ( ) ; -FUNCTION: void* wglGetProcAddress ( char* name ) ; +FUNCTION: void* wglGetProcAddress ( c-string name ) ; : gl-function-context ( -- context ) wglGetCurrentContext ; inline : gl-function-address ( name -- address ) wglGetProcAddress ; inline diff --git a/basis/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor index fd5c757bc4..f9983d7813 100644 --- a/basis/openssl/libcrypto/libcrypto.factor +++ b/basis/openssl/libcrypto/libcrypto.factor @@ -65,9 +65,9 @@ LIBRARY: libcrypto ! bio.h ! =============================================== -FUNCTION: bio* BIO_new_file ( char* filename, char* mode ) ; +FUNCTION: bio* BIO_new_file ( c-string filename, c-string mode ) ; -FUNCTION: int BIO_printf ( bio* bio, char* format ) ; +FUNCTION: int BIO_printf ( bio* bio, c-string format ) ; FUNCTION: long BIO_ctrl ( void* bio, int cmd, long larg, void* parg ) ; @@ -83,17 +83,17 @@ FUNCTION: void* BIO_push ( void* bio, void* append ) ; FUNCTION: int BIO_read ( void* b, void* buf, int len ) ; -FUNCTION: int BIO_gets ( void* b, char* buf, int size ) ; +FUNCTION: int BIO_gets ( void* b, c-string buf, int size ) ; FUNCTION: int BIO_write ( void* b, void* buf, int len ) ; -FUNCTION: int BIO_puts ( void* bp, char* buf ) ; +FUNCTION: int BIO_puts ( void* bp, c-string buf ) ; FUNCTION: ulong ERR_get_error ( ) ; FUNCTION: void ERR_clear_error ( ) ; -FUNCTION: char* ERR_error_string ( ulong e, void* buf ) ; +FUNCTION: c-string ERR_error_string ( ulong e, void* buf ) ; FUNCTION: void* BIO_f_buffer ( ) ; @@ -120,7 +120,7 @@ FUNCTION: void OpenSSL_add_all_digests ( ) ; ! Clean them up before exiting FUNCTION: void EVP_cleanup ( ) ; -FUNCTION: EVP_MD* EVP_get_digestbyname ( char* name ) ; +FUNCTION: EVP_MD* EVP_get_digestbyname ( c-string name ) ; FUNCTION: void EVP_MD_CTX_init ( EVP_MD* ctx ) ; @@ -166,7 +166,7 @@ FUNCTION: int RSA_print_fp ( void* fp, void* x, int offset ) ; ! objects.h ! =============================================== -FUNCTION: int OBJ_sn2nid ( char* s ) ; +FUNCTION: int OBJ_sn2nid ( c-string s ) ; ! =============================================== ! bn.h diff --git a/basis/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor index 1c6fbec011..bfd59cde25 100644 --- a/basis/openssl/libssl/libssl.factor +++ b/basis/openssl/libssl/libssl.factor @@ -109,7 +109,7 @@ FUNCTION: X509_NAME* X509_get_subject_name ( X509* a ) ; ! ssl.h ! =============================================== -FUNCTION: char* SSL_get_version ( SSL* ssl ) ; +FUNCTION: c-string SSL_get_version ( SSL* ssl ) ; ! Maps OpenSSL errors to strings FUNCTION: void SSL_load_error_strings ( ) ; @@ -143,7 +143,7 @@ FUNCTION: SSL_CTX* SSL_CTX_new ( ssl-method method ) ; ! Load the certificates and private keys into the SSL_CTX FUNCTION: int SSL_CTX_use_certificate_chain_file ( SSL_CTX* ctx, - char* file ) ; ! PEM type + c-string file ) ; ! PEM type FUNCTION: SSL* SSL_new ( SSL_CTX* ctx ) ; @@ -174,7 +174,7 @@ CONSTANT: SSL_RECEIVED_SHUTDOWN 2 FUNCTION: int SSL_get_shutdown ( SSL* ssl ) ; -FUNCTION: int SSL_CTX_set_session_id_context ( SSL_CTX* ctx, char* sid_ctx, uint len ) ; +FUNCTION: int SSL_CTX_set_session_id_context ( SSL_CTX* ctx, c-string sid_ctx, uint len ) ; FUNCTION: SSL_SESSION* SSL_get1_session ( SSL* ssl ) ; @@ -197,17 +197,17 @@ FUNCTION: void SSL_CTX_free ( SSL_CTX* ctx ) ; FUNCTION: void RAND_seed ( void* buf, int num ) ; -FUNCTION: int SSL_set_cipher_list ( SSL* ssl, char* str ) ; +FUNCTION: int SSL_set_cipher_list ( SSL* ssl, c-string str ) ; -FUNCTION: int SSL_use_RSAPrivateKey_file ( SSL* ssl, char* str ) ; +FUNCTION: int SSL_use_RSAPrivateKey_file ( SSL* ssl, c-string str ) ; FUNCTION: int SSL_CTX_use_RSAPrivateKey_file ( SSL_CTX* ctx, int type ) ; FUNCTION: int SSL_use_certificate_file ( SSL* ssl, - char* str, int type ) ; + c-string str, int type ) ; -FUNCTION: int SSL_CTX_load_verify_locations ( SSL_CTX* ctx, char* CAfile, - char* CApath ) ; +FUNCTION: int SSL_CTX_load_verify_locations ( SSL_CTX* ctx, c-string CAfile, + c-string CApath ) ; FUNCTION: int SSL_CTX_set_default_verify_paths ( SSL_CTX* ctx ) ; @@ -220,7 +220,7 @@ FUNCTION: void SSL_CTX_set_verify ( SSL_CTX* ctx, int mode, void* callback ) ; FUNCTION: void SSL_CTX_set_client_CA_list ( SSL_CTX* ctx, SSL* list ) ; -FUNCTION: SSL* SSL_load_client_CA_file ( char* file ) ; +FUNCTION: SSL* SSL_load_client_CA_file ( c-string file ) ; ! Used to manipulate settings of the SSL_CTX and SSL objects. ! This function should never be called directly @@ -231,7 +231,7 @@ FUNCTION: void SSL_CTX_set_default_passwd_cb ( SSL_CTX* ctx, void* cb ) ; FUNCTION: void SSL_CTX_set_default_passwd_cb_userdata ( SSL_CTX* ctx, void* u ) ; -FUNCTION: int SSL_CTX_use_PrivateKey_file ( SSL_CTX* ctx, char* file, +FUNCTION: int SSL_CTX_use_PrivateKey_file ( SSL_CTX* ctx, c-string file, int type ) ; ! Sets the maximum depth for the allowed ctx certificate chain verification diff --git a/basis/pango/fonts/fonts.factor b/basis/pango/fonts/fonts.factor index 31a51e3f12..c2a7ef128d 100644 --- a/basis/pango/fonts/fonts.factor +++ b/basis/pango/fonts/fonts.factor @@ -45,16 +45,16 @@ pango_font_description_free ( PangoFontDescription* desc ) ; DESTRUCTOR: pango_font_description_free FUNCTION: PangoFontDescription* -pango_font_description_from_string ( char* str ) ; +pango_font_description_from_string ( c-string str ) ; -FUNCTION: char* +FUNCTION: c-string pango_font_description_to_string ( PangoFontDescription* desc ) ; -FUNCTION: char* +FUNCTION: c-string pango_font_description_to_filename ( PangoFontDescription* desc ) ; FUNCTION: void -pango_font_description_set_family ( PangoFontDescription* desc, char* family ) ; +pango_font_description_set_family ( PangoFontDescription* desc, c-string family ) ; FUNCTION: void pango_font_description_set_style ( PangoFontDescription* desc, PangoStyle style ) ; @@ -68,7 +68,7 @@ pango_font_description_set_size ( PangoFontDescription* desc, gint size ) ; FUNCTION: void pango_font_map_list_families ( PangoFontMap* fontmap, PangoFontFamily*** families, int* n_families ) ; -FUNCTION: char* +FUNCTION: c-string pango_font_family_get_name ( PangoFontFamily* family ) ; FUNCTION: int @@ -77,7 +77,7 @@ pango_font_family_is_monospace ( PangoFontFamily* family ) ; FUNCTION: void pango_font_family_list_faces ( PangoFontFamily* family, PangoFontFace*** faces, int* n_faces ) ; -FUNCTION: char* +FUNCTION: c-string pango_font_face_get_face_name ( PangoFontFace* face ) ; FUNCTION: void diff --git a/basis/pango/layouts/layouts.factor b/basis/pango/layouts/layouts.factor index 74b6d0b0c3..3f3b02c7c7 100644 --- a/basis/pango/layouts/layouts.factor +++ b/basis/pango/layouts/layouts.factor @@ -21,9 +21,9 @@ FUNCTION: PangoContext* pango_layout_get_context ( PangoLayout* layout ) ; FUNCTION: void -pango_layout_set_text ( PangoLayout* layout, char* text, int length ) ; +pango_layout_set_text ( PangoLayout* layout, c-string text, int length ) ; -FUNCTION: char* +FUNCTION: c-string pango_layout_get_text ( PangoLayout* layout ) ; FUNCTION: void diff --git a/basis/system-info/linux/linux.factor b/basis/system-info/linux/linux.factor index 0c21597a2f..1a565705fb 100644 --- a/basis/system-info/linux/linux.factor +++ b/basis/system-info/linux/linux.factor @@ -7,7 +7,7 @@ SPECIALIZED-ARRAY: char IN: system-info.linux : (uname) ( buf -- int ) - int f "uname" { char* } alien-invoke ; + int f "uname" { c-string } alien-invoke ; : uname ( -- seq ) 65536 [ (uname) io-error ] keep diff --git a/basis/tools/disassembler/udis/udis.factor b/basis/tools/disassembler/udis/udis.factor index ee77268e22..ae8827e093 100644 --- a/basis/tools/disassembler/udis/udis.factor +++ b/basis/tools/disassembler/udis/udis.factor @@ -32,8 +32,8 @@ STRUCT: ud { inp_fill uchar } { inp_file void* } { inp_ctr uchar } - { inp_buff uchar* } - { inp_buff_end uchar* } + { inp_buff c-string } + { inp_buff_end c-string } { inp_end uchar } { translator void* } { insn_offset ulonglong } @@ -83,19 +83,19 @@ CONSTANT: UD_VENDOR_INTEL 1 FUNCTION: void ud_init ( ud* u ) ; FUNCTION: void ud_set_mode ( ud* u, uchar mode ) ; FUNCTION: void ud_set_pc ( ud* u, ulonglong pc ) ; -FUNCTION: void ud_set_input_buffer ( ud* u, uchar* offset, size_t size ) ; +FUNCTION: void ud_set_input_buffer ( ud* u, c-string offset, size_t size ) ; FUNCTION: void ud_set_vendor ( ud* u, uint vendor ) ; FUNCTION: void ud_set_syntax ( ud* u, void* syntax ) ; FUNCTION: void ud_input_skip ( ud* u, size_t size ) ; FUNCTION: int ud_input_end ( ud* u ) ; FUNCTION: uint ud_decode ( ud* u ) ; FUNCTION: uint ud_disassemble ( ud* u ) ; -FUNCTION: char* ud_insn_asm ( ud* u ) ; +FUNCTION: c-string ud_insn_asm ( ud* u ) ; FUNCTION: void* ud_insn_ptr ( ud* u ) ; FUNCTION: ulonglong ud_insn_off ( ud* u ) ; -FUNCTION: char* ud_insn_hex ( ud* u ) ; +FUNCTION: c-string ud_insn_hex ( ud* u ) ; FUNCTION: uint ud_insn_len ( ud* u ) ; -FUNCTION: char* ud_lookup_mnemonic ( int c ) ; +FUNCTION: c-string ud_lookup_mnemonic ( int c ) ; : ( -- ud ) ud malloc-struct &free diff --git a/basis/unix/ffi/bsd/bsd.factor b/basis/unix/ffi/bsd/bsd.factor index bda99422fc..ad323bf14a 100644 --- a/basis/unix/ffi/bsd/bsd.factor +++ b/basis/unix/ffi/bsd/bsd.factor @@ -48,15 +48,15 @@ STRUCT: sockaddr-un { path char[104] } ; STRUCT: passwd - { pw_name char* } - { pw_passwd char* } + { pw_name c-string } + { pw_passwd c-string } { pw_uid uid_t } { pw_gid gid_t } { pw_change time_t } - { pw_class char* } - { pw_gecos char* } - { pw_dir char* } - { pw_shell char* } + { pw_class c-string } + { pw_gecos c-string } + { pw_dir c-string } + { pw_shell c-string } { pw_expire time_t } { pw_fields int } ; diff --git a/basis/unix/ffi/bsd/freebsd/freebsd.factor b/basis/unix/ffi/bsd/freebsd/freebsd.factor index 992d1c3ad0..112758a3e8 100644 --- a/basis/unix/ffi/bsd/freebsd/freebsd.factor +++ b/basis/unix/ffi/bsd/freebsd/freebsd.factor @@ -9,7 +9,7 @@ STRUCT: addrinfo { socktype int } { protocol int } { addrlen socklen_t } - { canonname char* } + { canonname c-string } { addr void* } { next addrinfo* } ; diff --git a/basis/unix/ffi/bsd/macosx/macosx.factor b/basis/unix/ffi/bsd/macosx/macosx.factor index a7c47f0ff8..2ca1d9315d 100644 --- a/basis/unix/ffi/bsd/macosx/macosx.factor +++ b/basis/unix/ffi/bsd/macosx/macosx.factor @@ -11,7 +11,7 @@ STRUCT: addrinfo { socktype int } { protocol int } { addrlen socklen_t } - { canonname char* } + { canonname c-string } { addr void* } { next addrinfo* } ; diff --git a/basis/unix/ffi/bsd/netbsd/netbsd.factor b/basis/unix/ffi/bsd/netbsd/netbsd.factor index d755caf874..e15971b150 100644 --- a/basis/unix/ffi/bsd/netbsd/netbsd.factor +++ b/basis/unix/ffi/bsd/netbsd/netbsd.factor @@ -10,7 +10,7 @@ STRUCT: addrinfo { socktype int } { protocol int } { addrlen socklen_t } - { canonname char* } + { canonname c-string } { addr void* } { next addrinfo* } ; diff --git a/basis/unix/ffi/bsd/openbsd/openbsd.factor b/basis/unix/ffi/bsd/openbsd/openbsd.factor index 076dbdfd24..1f4eddef66 100644 --- a/basis/unix/ffi/bsd/openbsd/openbsd.factor +++ b/basis/unix/ffi/bsd/openbsd/openbsd.factor @@ -10,7 +10,7 @@ STRUCT: addrinfo { protocol int } { addrlen socklen_t } { addr void* } - { canonname char* } + { canonname c-string } { next addrinfo* } ; STRUCT: dirent diff --git a/basis/unix/ffi/ffi.factor b/basis/unix/ffi/ffi.factor index 10346cff2c..555bab32e4 100644 --- a/basis/unix/ffi/ffi.factor +++ b/basis/unix/ffi/ffi.factor @@ -44,21 +44,21 @@ CONSTANT: DT_WHT 14 LIBRARY: libc -FUNCTION: char* strerror ( int errno ) ; +FUNCTION: c-string strerror ( int errno ) ; STRUCT: group - { gr_name char* } - { gr_passwd char* } + { gr_name c-string } + { gr_passwd c-string } { gr_gid int } - { gr_mem char** } ; + { gr_mem c-string* } ; FUNCTION: int accept ( int s, void* sockaddr, socklen_t* socklen ) ; FUNCTION: int bind ( int s, void* name, socklen_t namelen ) ; -FUNCTION: int chdir ( char* path ) ; -FUNCTION: int chmod ( char* path, mode_t mode ) ; +FUNCTION: int chdir ( c-string path ) ; +FUNCTION: int chmod ( c-string path, mode_t mode ) ; FUNCTION: int fchmod ( int fd, mode_t mode ) ; -FUNCTION: int chown ( char* path, uid_t owner, gid_t group ) ; -FUNCTION: int chroot ( char* path ) ; +FUNCTION: int chown ( c-string path, uid_t owner, gid_t group ) ; +FUNCTION: int chroot ( c-string path ) ; FUNCTION: int close ( int fd ) ; FUNCTION: int closedir ( DIR* dirp ) ; FUNCTION: int connect ( int s, void* name, socklen_t namelen ) ; @@ -70,31 +70,31 @@ FUNCTION: int fcntl ( int fd, int cmd, int arg ) ; FUNCTION: int flock ( int fd, int operation ) ; FUNCTION: void freeaddrinfo ( addrinfo* ai ) ; FUNCTION: int futimes ( int id, timeval[2] times ) ; -FUNCTION: char* gai_strerror ( int ecode ) ; -FUNCTION: int getaddrinfo ( char* hostname, char* servname, addrinfo* hints, addrinfo** res ) ; -FUNCTION: char* getcwd ( char* buf, size_t size ) ; +FUNCTION: c-string gai_strerror ( int ecode ) ; +FUNCTION: int getaddrinfo ( c-string hostname, c-string servname, addrinfo* hints, addrinfo** res ) ; +FUNCTION: c-string getcwd ( c-string buf, size_t size ) ; FUNCTION: pid_t getpid ; FUNCTION: int getdtablesize ; FUNCTION: gid_t getegid ; FUNCTION: uid_t geteuid ; FUNCTION: gid_t getgid ; -FUNCTION: char* getenv ( char* name ) ; +FUNCTION: c-string getenv ( c-string name ) ; -FUNCTION: int getgrgid_r ( gid_t gid, group* grp, char* buffer, size_t bufsize, group** result ) ; -FUNCTION: int getgrnam_r ( char* name, group* grp, char* buffer, size_t bufsize, group** result ) ; +FUNCTION: int getgrgid_r ( gid_t gid, group* grp, c-string buffer, size_t bufsize, group** result ) ; +FUNCTION: int getgrnam_r ( c-string name, group* grp, c-string buffer, size_t bufsize, group** result ) ; FUNCTION: passwd* getpwent ( ) ; FUNCTION: passwd* getpwuid ( uid_t uid ) ; -FUNCTION: passwd* getpwnam ( char* login ) ; -FUNCTION: int getpwnam_r ( char* login, passwd* pwd, char* buffer, size_t bufsize, passwd** result ) ; +FUNCTION: passwd* getpwnam ( c-string login ) ; +FUNCTION: int getpwnam_r ( c-string login, passwd* pwd, c-string buffer, size_t bufsize, passwd** result ) ; FUNCTION: int getgroups ( int gidsetlen, gid_t* gidset ) ; -FUNCTION: int getgrouplist ( char* name, int basegid, int* groups, int* ngroups ) ; +FUNCTION: int getgrouplist ( c-string name, int basegid, int* groups, int* ngroups ) ; FUNCTION: int getrlimit ( int resource, rlimit* rlp ) ; FUNCTION: int setrlimit ( int resource, rlimit* rlp ) ; FUNCTION: int getpriority ( int which, id_t who ) ; FUNCTION: int setpriority ( int which, id_t who, int prio ) ; FUNCTION: int getrusage ( int who, rusage* r_usage ) ; FUNCTION: group* getgrent ; -FUNCTION: int gethostname ( char* name, int len ) ; +FUNCTION: int gethostname ( c-string name, int len ) ; FUNCTION: int getsockname ( int socket, sockaddr* address, socklen_t* address_len ) ; FUNCTION: int getpeername ( int socket, sockaddr* address, socklen_t* address_len ) ; FUNCTION: uid_t getuid ; @@ -102,44 +102,44 @@ FUNCTION: uint htonl ( uint n ) ; FUNCTION: ushort htons ( ushort n ) ; ! FUNCTION: int issetugid ; FUNCTION: int isatty ( int fildes ) ; -FUNCTION: int ioctl ( int fd, ulong request, char* argp ) ; -FUNCTION: int lchown ( char* path, uid_t owner, gid_t group ) ; +FUNCTION: int ioctl ( int fd, ulong request, c-string argp ) ; +FUNCTION: int lchown ( c-string path, uid_t owner, gid_t group ) ; FUNCTION: int listen ( int s, int backlog ) ; FUNCTION: off_t lseek ( int fildes, off_t offset, int whence ) ; -FUNCTION: int mkdir ( char* path, mode_t mode ) ; +FUNCTION: int mkdir ( c-string path, mode_t mode ) ; FUNCTION: void* mmap ( void* addr, size_t len, int prot, int flags, int fd, off_t offset ) ; FUNCTION: int munmap ( void* addr, size_t len ) ; FUNCTION: uint ntohl ( uint n ) ; FUNCTION: ushort ntohs ( ushort n ) ; FUNCTION: int shutdown ( int fd, int how ) ; -FUNCTION: int open ( char* path, int flags, int prot ) ; -FUNCTION: DIR* opendir ( char* path ) ; +FUNCTION: int open ( c-string path, int flags, int prot ) ; +FUNCTION: DIR* opendir ( c-string path ) ; STRUCT: utimbuf { actime time_t } { modtime time_t } ; -FUNCTION: int utime ( char* path, utimbuf* buf ) ; +FUNCTION: int utime ( c-string path, utimbuf* buf ) ; FUNCTION: int pclose ( void* file ) ; FUNCTION: int pipe ( int* filedes ) ; -FUNCTION: void* popen ( char* command, char* type ) ; +FUNCTION: void* popen ( c-string command, c-string type ) ; FUNCTION: ssize_t read ( int fd, void* buf, size_t nbytes ) ; FUNCTION: dirent* readdir ( DIR* dirp ) ; FUNCTION: int readdir_r ( void* dirp, dirent* entry, dirent** result ) ; -FUNCTION: ssize_t readlink ( char* path, char* buf, size_t bufsize ) ; +FUNCTION: ssize_t readlink ( c-string path, c-string buf, size_t bufsize ) ; CONSTANT: PATH_MAX 1024 FUNCTION: ssize_t recv ( int s, void* buf, size_t nbytes, int flags ) ; FUNCTION: ssize_t recvfrom ( int s, void* buf, size_t nbytes, int flags, sockaddr-in* from, socklen_t* fromlen ) ; -FUNCTION: int rename ( char* from, char* to ) ; -FUNCTION: int rmdir ( char* path ) ; +FUNCTION: int rename ( c-string from, c-string to ) ; +FUNCTION: int rmdir ( c-string path ) ; FUNCTION: int select ( int nfds, void* readfds, void* writefds, void* exceptfds, timeval* timeout ) ; FUNCTION: ssize_t sendto ( int s, void* buf, size_t len, int flags, sockaddr-in* to, socklen_t tolen ) ; -FUNCTION: int setenv ( char* name, char* value, int overwrite ) ; -FUNCTION: int unsetenv ( char* name ) ; +FUNCTION: int setenv ( c-string name, c-string value, int overwrite ) ; +FUNCTION: int unsetenv ( c-string name ) ; FUNCTION: int setegid ( gid_t egid ) ; FUNCTION: int seteuid ( uid_t euid ) ; FUNCTION: int setgid ( gid_t gid ) ; @@ -149,11 +149,11 @@ FUNCTION: int setreuid ( uid_t ruid, uid_t euid ) ; FUNCTION: int setsockopt ( int s, int level, int optname, void* optval, socklen_t optlen ) ; FUNCTION: int setuid ( uid_t uid ) ; FUNCTION: int socket ( int domain, int type, int protocol ) ; -FUNCTION: int symlink ( char* path1, char* path2 ) ; -FUNCTION: int link ( char* path1, char* path2 ) ; -FUNCTION: int system ( char* command ) ; -FUNCTION: int unlink ( char* path ) ; -FUNCTION: int utimes ( char* path, timeval[2] times ) ; +FUNCTION: int symlink ( c-string path1, c-string path2 ) ; +FUNCTION: int link ( c-string path1, c-string path2 ) ; +FUNCTION: int system ( c-string command ) ; +FUNCTION: int unlink ( c-string path ) ; +FUNCTION: int utimes ( c-string path, timeval[2] times ) ; FUNCTION: ssize_t write ( int fd, void* buf, size_t nbytes ) ; "librt" "librt.so" "cdecl" add-library diff --git a/basis/unix/ffi/linux/linux.factor b/basis/unix/ffi/linux/linux.factor index 260796b5e4..3f19e18c14 100644 --- a/basis/unix/ffi/linux/linux.factor +++ b/basis/unix/ffi/linux/linux.factor @@ -38,7 +38,7 @@ STRUCT: addrinfo { protocol int } { addrlen socklen_t } { addr void* } - { canonname char* } + { canonname c-string } { next addrinfo* } ; STRUCT: sockaddr-in @@ -83,13 +83,13 @@ CONSTANT: SEEK_CUR 1 CONSTANT: SEEK_END 2 STRUCT: passwd - { pw_name char* } - { pw_passwd char* } + { pw_name c-string } + { pw_passwd c-string } { pw_uid uid_t } { pw_gid gid_t } - { pw_gecos char* } - { pw_dir char* } - { pw_shell char* } ; + { pw_gecos c-string } + { pw_dir c-string } + { pw_shell c-string } ; ! dirent64 STRUCT: dirent @@ -99,7 +99,7 @@ STRUCT: dirent { d_type uchar } { d_name char[256] } ; -FUNCTION: int open64 ( char* path, int flags, int prot ) ; +FUNCTION: int open64 ( c-string path, int flags, int prot ) ; FUNCTION: dirent* readdir64 ( DIR* dirp ) ; FUNCTION: int readdir64_r ( void* dirp, dirent* entry, dirent** result ) ; diff --git a/basis/unix/ffi/solaris/solaris.factor b/basis/unix/ffi/solaris/solaris.factor index d641961a25..a08785823a 100644 --- a/basis/unix/ffi/solaris/solaris.factor +++ b/basis/unix/ffi/solaris/solaris.factor @@ -35,7 +35,7 @@ STRUCT: addrinfo ! int _ai_pad; ! #endif { addrlen int } - { canonname char* } + { canonname c-string } { addr void* } { next void* } ; diff --git a/basis/unix/linux/inotify/inotify.factor b/basis/unix/linux/inotify/inotify.factor index f589c17e28..c296cc8166 100644 --- a/basis/unix/linux/inotify/inotify.factor +++ b/basis/unix/linux/inotify/inotify.factor @@ -52,5 +52,5 @@ CONSTANT: IN_ONESHOT HEX: 80000000 ! only send event once } flags ; foldable FUNCTION: int inotify_init ( ) ; -FUNCTION: int inotify_add_watch ( int fd, char* name, uint mask ) ; +FUNCTION: int inotify_add_watch ( int fd, c-string name, uint mask ) ; FUNCTION: int inotify_rm_watch ( int fd, uint wd ) ; diff --git a/basis/unix/process/process.factor b/basis/unix/process/process.factor index ab10aef3ea..4b33c37d07 100644 --- a/basis/unix/process/process.factor +++ b/basis/unix/process/process.factor @@ -11,9 +11,9 @@ FUNCTION: pid_t fork ( ) ; : fork-process ( -- pid ) [ fork ] unix-system-call ; -FUNCTION: int execv ( char* path, char** argv ) ; -FUNCTION: int execvp ( char* path, char** argv ) ; -FUNCTION: int execve ( char* path, char** argv, char** envp ) ; +FUNCTION: int execv ( c-string path, c-string* argv ) ; +FUNCTION: int execvp ( c-string path, c-string* argv ) ; +FUNCTION: int execve ( c-string path, c-string* argv, c-string* envp ) ; : exec ( pathname argv -- int ) [ utf8 malloc-string ] [ utf8 strings>alien ] bi* execv ; diff --git a/basis/unix/stat/freebsd/freebsd.factor b/basis/unix/stat/freebsd/freebsd.factor index 04f884e496..93ed1a42db 100644 --- a/basis/unix/stat/freebsd/freebsd.factor +++ b/basis/unix/stat/freebsd/freebsd.factor @@ -24,5 +24,5 @@ STRUCT: stat { st_birthtimespec timespec } { pad0 __int32_t[2] } ; -FUNCTION: int stat ( char* pathname, stat* buf ) ; -FUNCTION: int lstat ( char* pathname, stat* buf ) ; +FUNCTION: int stat ( c-string pathname, stat* buf ) ; +FUNCTION: int lstat ( c-string pathname, stat* buf ) ; diff --git a/basis/unix/stat/linux/32/32.factor b/basis/unix/stat/linux/32/32.factor index f01140ff4b..b3becff240 100644 --- a/basis/unix/stat/linux/32/32.factor +++ b/basis/unix/stat/linux/32/32.factor @@ -21,8 +21,8 @@ STRUCT: stat { st_ctimespec timespec } { st_ino ulonglong } ; -FUNCTION: int __xstat64 ( int ver, char* pathname, stat* buf ) ; -FUNCTION: int __lxstat64 ( int ver, char* pathname, stat* buf ) ; +FUNCTION: int __xstat64 ( int ver, c-string pathname, stat* buf ) ; +FUNCTION: int __lxstat64 ( int ver, c-string pathname, stat* buf ) ; : stat ( pathname buf -- int ) [ 1 ] 2dip __xstat64 ; : lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat64 ; diff --git a/basis/unix/stat/linux/64/64.factor b/basis/unix/stat/linux/64/64.factor index bb16133c76..0862bf82a0 100644 --- a/basis/unix/stat/linux/64/64.factor +++ b/basis/unix/stat/linux/64/64.factor @@ -21,8 +21,8 @@ STRUCT: stat { st_ctimespec timespec } { __unused0 long[3] } ; -FUNCTION: int __xstat64 ( int ver, char* pathname, stat* buf ) ; -FUNCTION: int __lxstat64 ( int ver, char* pathname, stat* buf ) ; +FUNCTION: int __xstat64 ( int ver, c-string pathname, stat* buf ) ; +FUNCTION: int __lxstat64 ( int ver, c-string pathname, stat* buf ) ; : stat ( pathname buf -- int ) [ 1 ] 2dip __xstat64 ; : lstat ( pathname buf -- int ) [ 1 ] 2dip __lxstat64 ; diff --git a/basis/unix/stat/macosx/macosx.factor b/basis/unix/stat/macosx/macosx.factor index 4e6b2dfb21..024cd317e8 100644 --- a/basis/unix/stat/macosx/macosx.factor +++ b/basis/unix/stat/macosx/macosx.factor @@ -26,8 +26,8 @@ STRUCT: stat { st_qspare0 __int64_t } { st_qspare1 __int64_t } ; -FUNCTION: int stat64 ( char* pathname, stat* buf ) ; -FUNCTION: int lstat64 ( char* pathname, stat* buf ) ; +FUNCTION: int stat64 ( c-string pathname, stat* buf ) ; +FUNCTION: int lstat64 ( c-string pathname, stat* buf ) ; : stat ( path buf -- n ) stat64 ; : lstat ( path buf -- n ) lstat64 ; diff --git a/basis/unix/stat/netbsd/32/32.factor b/basis/unix/stat/netbsd/32/32.factor index fb0d61b7e9..bb0a403751 100644 --- a/basis/unix/stat/netbsd/32/32.factor +++ b/basis/unix/stat/netbsd/32/32.factor @@ -23,8 +23,8 @@ STRUCT: stat { st_gen uint32_t } { st_qspare uint32_t[2] } ; -FUNCTION: int __stat30 ( char* pathname, stat* buf ) ; -FUNCTION: int __lstat30 ( char* pathname, stat* buf ) ; +FUNCTION: int __stat30 ( c-string pathname, stat* buf ) ; +FUNCTION: int __lstat30 ( c-string pathname, stat* buf ) ; : stat ( pathname buf -- n ) __stat30 ; : lstat ( pathname buf -- n ) __lstat30 ; diff --git a/basis/unix/stat/netbsd/64/64.factor b/basis/unix/stat/netbsd/64/64.factor index 47c4e0c129..010dcca724 100644 --- a/basis/unix/stat/netbsd/64/64.factor +++ b/basis/unix/stat/netbsd/64/64.factor @@ -23,8 +23,8 @@ STRUCT: stat { st_spare0 uint32_t } { st_birthtimespec timespec } ; -FUNCTION: int __stat13 ( char* pathname, stat* buf ) ; -FUNCTION: int __lstat13 ( char* pathname, stat* buf ) ; +FUNCTION: int __stat13 ( c-string pathname, stat* buf ) ; +FUNCTION: int __lstat13 ( c-string pathname, stat* buf ) ; : stat ( pathname buf -- n ) __stat13 ; : lstat ( pathname buf -- n ) __lstat13 ; diff --git a/basis/unix/stat/openbsd/openbsd.factor b/basis/unix/stat/openbsd/openbsd.factor index 2702e60f6c..b562d085b3 100644 --- a/basis/unix/stat/openbsd/openbsd.factor +++ b/basis/unix/stat/openbsd/openbsd.factor @@ -25,5 +25,5 @@ STRUCT: stat { st_birthtimespec timespec } { st_qspare int64_t[2] } ; -FUNCTION: int stat ( char* pathname, stat* buf ) ; -FUNCTION: int lstat ( char* pathname, stat* buf ) ; +FUNCTION: int stat ( c-string pathname, stat* buf ) ; +FUNCTION: int lstat ( c-string pathname, stat* buf ) ; diff --git a/basis/unix/statfs/freebsd/freebsd.factor b/basis/unix/statfs/freebsd/freebsd.factor index ae418e6eb4..f12473da92 100644 --- a/basis/unix/statfs/freebsd/freebsd.factor +++ b/basis/unix/statfs/freebsd/freebsd.factor @@ -31,4 +31,4 @@ STRUCT: statfs { f_mntfromname { char MNAMELEN } } { f_mntonname { char MNAMELEN } } ; -FUNCTION: int statfs ( char* path, statfs* buf ) ; +FUNCTION: int statfs ( c-string path, statfs* buf ) ; diff --git a/basis/unix/statfs/linux/linux.factor b/basis/unix/statfs/linux/linux.factor index ab37ab9605..2cf2541a10 100644 --- a/basis/unix/statfs/linux/linux.factor +++ b/basis/unix/statfs/linux/linux.factor @@ -16,4 +16,4 @@ STRUCT: statfs64 { f_frsize __SWORD_TYPE } { f_spare __SWORD_TYPE[5] } ; -FUNCTION: int statfs64 ( char* path, statfs64* buf ) ; +FUNCTION: int statfs64 ( c-string path, statfs64* buf ) ; diff --git a/basis/unix/statfs/macosx/macosx.factor b/basis/unix/statfs/macosx/macosx.factor index 56c8989895..75b231da96 100644 --- a/basis/unix/statfs/macosx/macosx.factor +++ b/basis/unix/statfs/macosx/macosx.factor @@ -116,5 +116,5 @@ STRUCT: statfs64 { f_mntfromname { char MAXPATHLEN } } { f_reserved uint32_t[8] } ; -FUNCTION: int statfs64 ( char* path, statfs64* buf ) ; +FUNCTION: int statfs64 ( c-string path, statfs64* buf ) ; FUNCTION: int getmntinfo64 ( statfs64** mntbufp, int flags ) ; diff --git a/basis/unix/statfs/openbsd/openbsd.factor b/basis/unix/statfs/openbsd/openbsd.factor index 4e65e74c2c..9c63bfa96b 100644 --- a/basis/unix/statfs/openbsd/openbsd.factor +++ b/basis/unix/statfs/openbsd/openbsd.factor @@ -31,4 +31,4 @@ STRUCT: statfs { f_mntfromname { char MNAMELEN } } { mount_info char[160] } ; -FUNCTION: int statfs ( char* path, statfs* buf ) ; +FUNCTION: int statfs ( c-string path, statfs* buf ) ; diff --git a/basis/unix/statvfs/freebsd/freebsd.factor b/basis/unix/statvfs/freebsd/freebsd.factor index c2834736b7..5e66a7daf9 100644 --- a/basis/unix/statvfs/freebsd/freebsd.factor +++ b/basis/unix/statvfs/freebsd/freebsd.factor @@ -20,4 +20,4 @@ STRUCT: statvfs CONSTANT: ST_RDONLY HEX: 1 ! Read-only file system CONSTANT: ST_NOSUID HEX: 2 ! Does not honor setuid/setgid -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; +FUNCTION: int statvfs ( c-string path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/linux/linux.factor b/basis/unix/statvfs/linux/linux.factor index d7139d84b2..bda1eb9605 100644 --- a/basis/unix/statvfs/linux/linux.factor +++ b/basis/unix/statvfs/linux/linux.factor @@ -17,7 +17,7 @@ STRUCT: statvfs64 { f_namemax ulong } { __f_spare int[6] } ; -FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ; +FUNCTION: int statvfs64 ( c-string path, statvfs64* buf ) ; CONSTANT: ST_RDONLY 1 ! Mount read-only. CONSTANT: ST_NOSUID 2 ! Ignore suid and sgid bits. diff --git a/basis/unix/statvfs/macosx/macosx.factor b/basis/unix/statvfs/macosx/macosx.factor index 3fe44a28d0..18b794acbf 100644 --- a/basis/unix/statvfs/macosx/macosx.factor +++ b/basis/unix/statvfs/macosx/macosx.factor @@ -20,4 +20,4 @@ STRUCT: statvfs CONSTANT: ST_RDONLY HEX: 1 ! Read-only file system CONSTANT: ST_NOSUID HEX: 2 ! Does not honor setuid/setgid -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; +FUNCTION: int statvfs ( c-string path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/netbsd/netbsd.factor b/basis/unix/statvfs/netbsd/netbsd.factor index a76774b656..f53d72f02e 100644 --- a/basis/unix/statvfs/netbsd/netbsd.factor +++ b/basis/unix/statvfs/netbsd/netbsd.factor @@ -33,4 +33,4 @@ STRUCT: statvfs { f_mntonname { char _VFS_MNAMELEN } } { f_mntfromname { char _VFS_MNAMELEN } } ; -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; +FUNCTION: int statvfs ( c-string path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/openbsd/openbsd.factor b/basis/unix/statvfs/openbsd/openbsd.factor index d5b2ee30a8..146db770ef 100644 --- a/basis/unix/statvfs/openbsd/openbsd.factor +++ b/basis/unix/statvfs/openbsd/openbsd.factor @@ -19,4 +19,4 @@ STRUCT: statvfs CONSTANT: ST_RDONLY 1 CONSTANT: ST_NOSUID 2 -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; +FUNCTION: int statvfs ( c-string path, statvfs* buf ) ; diff --git a/basis/unix/time/time.factor b/basis/unix/time/time.factor index 0a63965c20..72132bb132 100644 --- a/basis/unix/time/time.factor +++ b/basis/unix/time/time.factor @@ -35,7 +35,7 @@ STRUCT: tm { yday int } { isdst int } { gmtoff long } - { zone char* } ; + { zone c-string } ; FUNCTION: time_t time ( time_t* t ) ; FUNCTION: tm* localtime ( time_t* clock ) ; diff --git a/basis/windows/kernel32/kernel32.factor b/basis/windows/kernel32/kernel32.factor index db0005e219..c2622cbf48 100644 --- a/basis/windows/kernel32/kernel32.factor +++ b/basis/windows/kernel32/kernel32.factor @@ -1352,7 +1352,7 @@ FUNCTION: DWORD GetPriorityClass ( HANDLE hProcess ) ; ! FUNCTION: GetPrivateProfileStringW ! FUNCTION: GetPrivateProfileStructA ! FUNCTION: GetPrivateProfileStructW -FUNCTION: LPVOID GetProcAddress ( HMODULE hModule, char* lpProcName ) ; +FUNCTION: LPVOID GetProcAddress ( HMODULE hModule, c-string lpProcName ) ; ! FUNCTION: GetProcessAffinityMask ! FUNCTION: GetProcessHandleCount ! FUNCTION: GetProcessHeap diff --git a/basis/windows/ole32/ole32.factor b/basis/windows/ole32/ole32.factor index 6e90cae89a..538a142878 100644 --- a/basis/windows/ole32/ole32.factor +++ b/basis/windows/ole32/ole32.factor @@ -10,8 +10,8 @@ LIBRARY: ole32 TYPEDEF: GUID* REFGUID TYPEDEF: void* LPUNKNOWN -TYPEDEF: wchar_t* LPOLESTR -TYPEDEF: wchar_t* LPCOLESTR +TYPEDEF: LPWSTR LPOLESTR +TYPEDEF: LPWSTR LPCOLESTR TYPEDEF: REFGUID LPGUID TYPEDEF: REFGUID REFIID diff --git a/basis/windows/opengl32/opengl32.factor b/basis/windows/opengl32/opengl32.factor index 63f705263c..32e067a200 100644 --- a/basis/windows/opengl32/opengl32.factor +++ b/basis/windows/opengl32/opengl32.factor @@ -57,7 +57,7 @@ FUNCTION: BOOL wglMakeCurrent ( HDC hDC, HGLRC hglrc ) ; ! WGL_ARB_extensions_string extension -GL-FUNCTION: char* wglGetExtensionsStringARB { } ( HDC hDC ) ; +GL-FUNCTION: c-string wglGetExtensionsStringARB { } ( HDC hDC ) ; ! WGL_ARB_pixel_format extension diff --git a/basis/windows/types/types.factor b/basis/windows/types/types.factor index d0dac31ea9..e2e4b113a4 100644 --- a/basis/windows/types/types.factor +++ b/basis/windows/types/types.factor @@ -11,7 +11,6 @@ TYPEDEF: uchar UCHAR TYPEDEF: uchar BYTE TYPEDEF: ushort wchar_t -<< { char* utf16n } pointer: wchar_t typedef >> TYPEDEF: wchar_t WCHAR @@ -70,8 +69,8 @@ TYPEDEF: ULARGE_INTEGER* PULARGE_INTEGER TYPEDEF: size_t SIZE_T TYPEDEF: ptrdiff_t SSIZE_T -TYPEDEF: wchar_t* LPCSTR -TYPEDEF: wchar_t* LPWSTR +TYPEDEF: { c-string utf16n } LPCSTR +TYPEDEF: { c-string utf16n } LPWSTR TYPEDEF: WCHAR TCHAR TYPEDEF: LPWSTR LPTCH TYPEDEF: LPWSTR PTCH @@ -125,14 +124,14 @@ TYPEDEF: DWORD LGRPID TYPEDEF: LONG_PTR LPARAM TYPEDEF: BOOL* LPBOOL TYPEDEF: BYTE* LPBYTE -TYPEDEF: WCHAR* LPCWSTR +TYPEDEF: { c-string utf16n } LPCWSTR ! TYPEDEF: WCHAR* LPWSTR -TYPEDEF: WCHAR* LPSTR -TYPEDEF: wchar_t* LPCTSTR -TYPEDEF: wchar_t* LPWTSTR +TYPEDEF: { c-string utf16n } LPSTR +TYPEDEF: { c-string utf16n } LPCTSTR +TYPEDEF: { c-string utf16n } LPWTSTR -TYPEDEF: wchar_t* LPTSTR +TYPEDEF: { c-string utf16n } LPTSTR TYPEDEF: LPCSTR PCTSTR TYPEDEF: LPSTR PTSTR @@ -145,7 +144,7 @@ TYPEDEF: BOOLEAN* PBOOLEAN TYPEDEF: BYTE* PBYTE TYPEDEF: CHAR* PCHAR TYPEDEF: CHAR* PCSTR -TYPEDEF: WCHAR* PCWSTR +TYPEDEF: { c-string utf16n } PCWSTR TYPEDEF: DWORD* PDWORD TYPEDEF: DWORDLONG* PDWORDLONG TYPEDEF: DWORD_PTR* PDWORD_PTR @@ -182,9 +181,9 @@ TYPEDEF: ULONG_PTR* PULONG_PTR TYPEDEF: ULONG32* PULONG32 TYPEDEF: ULONG64* PULONG64 TYPEDEF: USHORT* PUSHORT -TYPEDEF: WCHAR* PWCHAR +TYPEDEF: { c-string utf16n } PWCHAR TYPEDEF: WORD* PWORD -TYPEDEF: WCHAR* PWSTR +TYPEDEF: { c-string utf16n } PWSTR TYPEDEF: HANDLE SC_HANDLE TYPEDEF: LPVOID SC_LOCK TYPEDEF: HANDLE SERVICE_STATUS_HANDLE @@ -350,7 +349,7 @@ STRUCT: LVITEM STRUCT: LVFINDINFO { flags uint } - { psz char* } + { psz c-string } { lParam long } { pt POINT } { vkDirection uint } ; diff --git a/basis/windows/user32/user32.factor b/basis/windows/user32/user32.factor index 27636271cb..a966b63308 100644 --- a/basis/windows/user32/user32.factor +++ b/basis/windows/user32/user32.factor @@ -1186,8 +1186,8 @@ FUNCTION: UINT EnumClipboardFormats ( UINT format ) ; ! FUNCTION: ExcludeUpdateRgn ! FUNCTION: ExitWindowsEx FUNCTION: int FillRect ( HDC hDC, RECT* lprc, HBRUSH hbr ) ; -FUNCTION: HWND FindWindowA ( char* lpClassName, char* lpWindowName ) ; -FUNCTION: HWND FindWindowExA ( HWND hwndParent, HWND childAfter, char* lpClassName, char* lpWindowName ) ; +FUNCTION: HWND FindWindowA ( c-string lpClassName, c-string lpWindowName ) ; +FUNCTION: HWND FindWindowExA ( HWND hwndParent, HWND childAfter, c-string lpClassName, c-string lpWindowName ) ; ! FUNCTION: FindWindowExW ! FUNCTION: FindWindowW ! FUNCTION: FlashWindow @@ -1352,7 +1352,7 @@ ALIAS: GetWindowLong GetWindowLongW FUNCTION: BOOL GetWindowRect ( HWND hWnd, LPRECT lpRect ) ; ! FUNCTION: GetWindowRgn ! FUNCTION: GetWindowRgnBox -FUNCTION: int GetWindowTextA ( HWND hWnd, char* lpString, int nMaxCount ) ; +FUNCTION: int GetWindowTextA ( HWND hWnd, c-string lpString, int nMaxCount ) ; ! FUNCTION: GetWindowTextLengthA ! FUNCTION: GetWindowTextLengthW ! FUNCTION: GetWindowTextW diff --git a/basis/windows/winsock/winsock.factor b/basis/windows/winsock/winsock.factor index 818737ca5a..b58cbcacbd 100644 --- a/basis/windows/winsock/winsock.factor +++ b/basis/windows/winsock/winsock.factor @@ -121,7 +121,7 @@ STRUCT: sockaddr-in6 { scopeid uint } ; STRUCT: hostent - { name char* } + { name c-string } { aliases void* } { addrtype short } { length short } @@ -133,7 +133,7 @@ STRUCT: addrinfo { socktype int } { protocol int } { addrlen size_t } - { canonname char* } + { canonname c-string } { addr sockaddr* } { next addrinfo* } ; @@ -145,29 +145,29 @@ C-TYPE: fd_set LIBRARY: winsock -FUNCTION: int setsockopt ( SOCKET s, int level, int optname, char* optval, int optlen ) ; +FUNCTION: int setsockopt ( SOCKET s, int level, int optname, c-string optval, int optlen ) ; FUNCTION: ushort htons ( ushort n ) ; FUNCTION: ushort ntohs ( ushort n ) ; FUNCTION: int bind ( void* socket, sockaddr-in* sockaddr, int len ) ; FUNCTION: int listen ( void* socket, int backlog ) ; -FUNCTION: char* inet_ntoa ( int in-addr ) ; -FUNCTION: int getaddrinfo ( char* nodename, - char* servername, +FUNCTION: c-string inet_ntoa ( int in-addr ) ; +FUNCTION: int getaddrinfo ( c-string nodename, + c-string servername, addrinfo* hints, addrinfo** res ) ; FUNCTION: void freeaddrinfo ( addrinfo* ai ) ; -FUNCTION: hostent* gethostbyname ( char* name ) ; -FUNCTION: int gethostname ( char* name, int len ) ; +FUNCTION: hostent* gethostbyname ( c-string name ) ; +FUNCTION: int gethostname ( c-string name, int len ) ; FUNCTION: int connect ( void* socket, sockaddr-in* sockaddr, int addrlen ) ; FUNCTION: int select ( int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval* timeout ) ; FUNCTION: int closesocket ( SOCKET s ) ; FUNCTION: int shutdown ( SOCKET s, int how ) ; -FUNCTION: int send ( SOCKET s, char* buf, int len, int flags ) ; -FUNCTION: int recv ( SOCKET s, char* buf, int len, int flags ) ; +FUNCTION: int send ( SOCKET s, c-string buf, int len, int flags ) ; +FUNCTION: int recv ( SOCKET s, c-string buf, int len, int flags ) ; FUNCTION: int getsockname ( SOCKET s, sockaddr-in* address, int* addrlen ) ; FUNCTION: int getpeername ( SOCKET s, sockaddr-in* address, int* addrlen ) ; diff --git a/basis/x11/glx/glx.factor b/basis/x11/glx/glx.factor index 5bc58e5f0a..d095853913 100644 --- a/basis/x11/glx/glx.factor +++ b/basis/x11/glx/glx.factor @@ -55,9 +55,9 @@ X-FUNCTION: void glXSwapBuffers ( Display* dpy, GLXDrawable drawable ) ; X-FUNCTION: void glXUseXFont ( Font font, int first, int count, int listBase ) ; X-FUNCTION: void glXWaitGL ( ) ; X-FUNCTION: void glXWaitX ( ) ; -X-FUNCTION: char* glXGetClientString ( Display* dpy, int name ) ; -X-FUNCTION: char* glXQueryServerString ( Display* dpy, int screen, int name ) ; -X-FUNCTION: char* glXQueryExtensionsString ( Display* dpy, int screen ) ; +X-FUNCTION: c-string glXGetClientString ( Display* dpy, int name ) ; +X-FUNCTION: c-string glXQueryServerString ( Display* dpy, int screen, int name ) ; +X-FUNCTION: c-string glXQueryExtensionsString ( Display* dpy, int screen ) ; ! New for GLX 1.3 X-FUNCTION: GLXFBConfig* glXGetFBConfigs ( Display* dpy, int screen, int* nelements ) ; @@ -80,10 +80,10 @@ X-FUNCTION: void glXSelectEvent ( Display* dpy, GLXDrawable draw, ulong event_ma X-FUNCTION: void glXGetSelectedEvent ( Display* dpy, GLXDrawable draw, ulong* event_mask ) ; ! GLX 1.4 and later -X-FUNCTION: void* glXGetProcAddress ( char* procname ) ; +X-FUNCTION: void* glXGetProcAddress ( c-string procname ) ; ! GLX_ARB_get_proc_address extension -X-FUNCTION: void* glXGetProcAddressARB ( char* procname ) ; +X-FUNCTION: void* glXGetProcAddressARB ( c-string procname ) ; ! GLX_ARB_multisample CONSTANT: GLX_SAMPLE_BUFFERS 100000 diff --git a/basis/x11/xlib/xlib.factor b/basis/x11/xlib/xlib.factor index 7235aaf679..88b058abea 100644 --- a/basis/x11/xlib/xlib.factor +++ b/basis/x11/xlib/xlib.factor @@ -30,7 +30,7 @@ TYPEDEF: XID KeySym TYPEDEF: ulong Atom -TYPEDEF: char* XPointer +TYPEDEF: c-string XPointer C-TYPE: Screen TYPEDEF: void* GC C-TYPE: Visual @@ -256,13 +256,13 @@ X-FUNCTION: Bool XQueryPointer ( Display* display, Window w, Window* root_return ! 4.3 - Properties and Atoms -X-FUNCTION: Atom XInternAtom ( Display* display, char* atom_name, Bool only_if_exists ) ; +X-FUNCTION: Atom XInternAtom ( Display* display, c-string atom_name, Bool only_if_exists ) ; -X-FUNCTION: char* XGetAtomName ( Display* display, Atom atom ) ; +X-FUNCTION: c-string XGetAtomName ( Display* display, Atom atom ) ; ! 4.4 - Obtaining and Changing Window Properties -X-FUNCTION: int XGetWindowProperty ( Display* display, Window w, Atom property, long long_offset, long long_length, Bool delete, Atom req_type, Atom* actual_type_return, int* actual_format_return, ulong* nitems_return, ulong* bytes_after_return, char** prop_return ) ; +X-FUNCTION: int XGetWindowProperty ( Display* display, Window w, Atom property, long long_offset, long long_length, Bool delete, Atom req_type, Atom* actual_type_return, int* actual_format_return, ulong* nitems_return, ulong* bytes_after_return, c-string* prop_return ) ; X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property, Atom type, int format, int mode, void* data, int nelements ) ; @@ -302,7 +302,7 @@ STRUCT: XColor { flags char } { pad char } ; -X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, char* color_name, XColor* exact_def_return, XColor* screen_def_return ) ; +X-FUNCTION: Status XLookupColor ( Display* display, Colormap colormap, c-string color_name, XColor* exact_def_return, XColor* screen_def_return ) ; X-FUNCTION: Status XAllocColor ( Display* display, Colormap colormap, XColor* screen_in_out ) ; X-FUNCTION: Status XQueryColor ( Display* display, Colormap colormap, XColor* def_in_out ) ; @@ -430,11 +430,11 @@ STRUCT: XFontStruct { ascent int } { descent int } ; -X-FUNCTION: Font XLoadFont ( Display* display, char* name ) ; +X-FUNCTION: Font XLoadFont ( Display* display, c-string name ) ; X-FUNCTION: XFontStruct* XQueryFont ( Display* display, XID font_ID ) ; -X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, char* name ) ; +X-FUNCTION: XFontStruct* XLoadQueryFont ( Display* display, c-string name ) ; -X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, char* string, int count ) ; +X-FUNCTION: int XTextWidth ( XFontStruct* font_struct, c-string string, int count ) ; ! 8.6 - Drawing Text @@ -444,7 +444,7 @@ X-FUNCTION: Status XDrawString ( GC gc, int x, int y, - char* string, + c-string string, int length ) ; ! 8.7 - Transferring Images between Client and Server @@ -464,7 +464,7 @@ STRUCT: XImage { height int } { xoffset int } { format int } -{ data char* } +{ data c-string } { byte_order int } { bitmap_unit int } { bitmap_bit_order int } @@ -1116,7 +1116,7 @@ X-FUNCTION: Status XWarpPointer ( Display* display, Window src_w, Window dest_w, ! 14.1 Client to Window Manager Communication -X-FUNCTION: Status XFetchName ( Display* display, Window w, char** window_name_return ) ; +X-FUNCTION: Status XFetchName ( Display* display, Window w, c-string* window_name_return ) ; X-FUNCTION: Status XGetTransientForHint ( Display* display, Window w, Window* prop_window_return ) ; ! 14.1.1. Manipulating Top-Level Windows @@ -1220,7 +1220,7 @@ STRUCT: XVisualInfo X-FUNCTION: Pixmap XCreateBitmapFromData ( Display* display, Drawable d, - char* data, + c-string data, uint width, uint height ) ; @@ -1231,10 +1231,10 @@ X-FUNCTION: Pixmap XCreateBitmapFromData ( X-FUNCTION: Status XSetStandardProperties ( Display* display, Window w, - char* window_name, - char* icon_name, + c-string window_name, + c-string icon_name, Pixmap icon_pixmap, - char** argv, + c-string* argv, int argc, XSizeHints* hints ) ; @@ -1316,7 +1316,7 @@ CONSTANT: XA_LAST_PREDEFINED 68 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! X-FUNCTION: void XFree ( void* data ) ; -X-FUNCTION: int XStoreName ( Display* display, Window w, char* window_name ) ; +X-FUNCTION: int XStoreName ( Display* display, Window w, c-string window_name ) ; X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints ) ; X-FUNCTION: int XBell ( Display* display, int percent ) ; @@ -1384,11 +1384,11 @@ CONSTANT: XLookupBoth 4 X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w ) ; -X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, char* res_name, char* res_class ) ; +X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, c-string res_name, c-string res_class ) ; X-FUNCTION: Status XCloseIM ( XIM im ) ; -X-FUNCTION: XIC XCreateIC ( XIM im, char* key1, Window value1, char* key2, Window value2, char* key3, int value3, char* key4, char* value4, char* key5, char* value5, int key6 ) ; +X-FUNCTION: XIC XCreateIC ( XIM im, c-string key1, Window value1, c-string key2, Window value2, c-string key3, int value3, c-string key4, c-string value4, c-string key5, c-string value5, int key6 ) ; X-FUNCTION: void XDestroyIC ( XIC ic ) ; @@ -1398,7 +1398,7 @@ X-FUNCTION: void XUnsetICFocus ( XIC ic ) ; X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ; -X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, char* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ; +X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, c-string buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return ) ; ! !!! category of setlocale CONSTANT: LC_ALL 0 @@ -1408,8 +1408,8 @@ CONSTANT: LC_MONETARY 3 CONSTANT: LC_NUMERIC 4 CONSTANT: LC_TIME 5 -X-FUNCTION: char* setlocale ( int category, char* name ) ; +X-FUNCTION: c-string setlocale ( int category, c-string name ) ; X-FUNCTION: Bool XSupportsLocale ( ) ; -X-FUNCTION: char* XSetLocaleModifiers ( char* modifier_list ) ; +X-FUNCTION: c-string XSetLocaleModifiers ( c-string modifier_list ) ; diff --git a/extra/chipmunk/chipmunk.factor b/extra/chipmunk/chipmunk.factor index a7cd5e0fd2..b24232147c 100644 --- a/extra/chipmunk/chipmunk.factor +++ b/extra/chipmunk/chipmunk.factor @@ -41,7 +41,7 @@ FUNCTION: cpVect cpvslerp ( cpVect v1, cpVect v2, cpFloat t ) ; FUNCTION: cpVect cpvslerpconst ( cpVect v1, cpVect v2, cpFloat a ) ; FUNCTION: cpVect cpvforangle ( cpFloat a ) ; FUNCTION: cpFloat cpvtoangle ( cpVect v ) ; -FUNCTION: char* cpvstr ( cpVect v ) ; +FUNCTION: c-string cpvstr ( cpVect v ) ; TYPED: cpvadd ( v1: cpVect v2: cpVect -- v3: cpVect ) [ [ x>> ] bi@ + ] diff --git a/extra/curses/ffi/ffi.factor b/extra/curses/ffi/ffi.factor index a9edc2e92b..222885b72c 100644 --- a/extra/curses/ffi/ffi.factor +++ b/extra/curses/ffi/ffi.factor @@ -58,7 +58,7 @@ STRUCT: c-window { _use_keypad bool } { _delay int } - { _line char* } + { _line c-string } { _regtop NCURSES_SIZE_T } { _regbottom NCURSES_SIZE_T } @@ -79,7 +79,7 @@ C-GLOBAL: void* stdscr FUNCTION: WINDOW* initscr ( ) ; FUNCTION: int endwin ( ) ; FUNCTION: bool isendwin ( ) ; -FUNCTION: SCREEN* newterm ( char* type, FILE* outfd, FILE* infd ) ; +FUNCTION: SCREEN* newterm ( c-string type, FILE* outfd, FILE* infd ) ; FUNCTION: SCREEN* set_term ( SCREEN* new ) ; FUNCTION: void delscreen ( SCREEN* sp ) ; @@ -157,21 +157,21 @@ FUNCTION: int mvwgetch ( WINDOW* win, int y, int x ) ; FUNCTION: int ungetch ( int ch ) ; FUNCTION: int has_key ( int ch ) ; -FUNCTION: int getstr ( char* str ) ; -FUNCTION: int getnstr ( char* str, int n ) ; -FUNCTION: int wgetstr ( WINDOW* win, char* str ) ; -FUNCTION: int wgetnstr ( WINDOW* win, char* str, int n ) ; -FUNCTION: int mvgetstr ( int y, int x, char* str ) ; -FUNCTION: int mvwgetstr ( WINDOW* win, int y, int x, char* str ) ; -FUNCTION: int mvgetnstr ( int y, int x, char* str, int n ) ; -FUNCTION: int mvwgetnstr ( WINDOW* win, int y, int x, char* str, int n ) ; - -FUNCTION: int printw ( char* fmt, int lol ) ; -FUNCTION: int wprintw ( WINDOW* win, char* fmt, int lol ) ; -FUNCTION: int mvprintw ( int y, int x, char* fmt, int lol ) ; -FUNCTION: int mvwprintw ( WINDOW* win, int y, int x, char* fmt, int lol ) ; -FUNCTION: int vwprintw ( WINDOW* win, char* fmt, va_list varglist ) ; -FUNCTION: int vw_printw ( WINDOW* win, char* fmt, va_list varglist ) ; +FUNCTION: int getstr ( c-string str ) ; +FUNCTION: int getnstr ( c-string str, int n ) ; +FUNCTION: int wgetstr ( WINDOW* win, c-string str ) ; +FUNCTION: int wgetnstr ( WINDOW* win, c-string str, int n ) ; +FUNCTION: int mvgetstr ( int y, int x, c-string str ) ; +FUNCTION: int mvwgetstr ( WINDOW* win, int y, int x, c-string str ) ; +FUNCTION: int mvgetnstr ( int y, int x, c-string str, int n ) ; +FUNCTION: int mvwgetnstr ( WINDOW* win, int y, int x, c-string str, int n ) ; + +FUNCTION: int printw ( c-string fmt, int lol ) ; +FUNCTION: int wprintw ( WINDOW* win, c-string fmt, int lol ) ; +FUNCTION: int mvprintw ( int y, int x, c-string fmt, int lol ) ; +FUNCTION: int mvwprintw ( WINDOW* win, int y, int x, c-string fmt, int lol ) ; +FUNCTION: int vwprintw ( WINDOW* win, c-string fmt, va_list varglist ) ; +FUNCTION: int vw_printw ( WINDOW* win, c-string fmt, va_list varglist ) ; FUNCTION: int move ( int y, int x ) ; FUNCTION: int wmove ( WINDOW* win, int y, int x ) ; @@ -221,11 +221,11 @@ FUNCTION: int winsdelln ( WINDOW* win, int n ) ; FUNCTION: int insertln ( ) ; FUNCTION: int winsertln ( WINDOW* win ) ; -FUNCTION: int addstr ( char* str ) ; -FUNCTION: int addnstr ( char* str, int n ) ; -FUNCTION: int waddstr ( WINDOW* win, char* str ) ; -FUNCTION: int waddnstr ( WINDOW* win, char* str, int n ) ; -FUNCTION: int mvaddstr ( int y, int x, char* str ) ; -FUNCTION: int mvaddnstr ( int y, int x, char* str, int n ) ; -FUNCTION: int mvwaddstr ( WINDOW* win, int y, int x, char* str ) ; -FUNCTION: int mvwaddnstr ( WINDOW* win, int y, int x, char* str, int n ) ; +FUNCTION: int addstr ( c-string str ) ; +FUNCTION: int addnstr ( c-string str, int n ) ; +FUNCTION: int waddstr ( WINDOW* win, c-string str ) ; +FUNCTION: int waddnstr ( WINDOW* win, c-string str, int n ) ; +FUNCTION: int mvaddstr ( int y, int x, c-string str ) ; +FUNCTION: int mvaddnstr ( int y, int x, c-string str, int n ) ; +FUNCTION: int mvwaddstr ( WINDOW* win, int y, int x, c-string str ) ; +FUNCTION: int mvwaddnstr ( WINDOW* win, int y, int x, c-string str, int n ) ; diff --git a/extra/freetype/freetype.factor b/extra/freetype/freetype.factor index 955672d03b..d131d2eb35 100644 --- a/extra/freetype/freetype.factor +++ b/extra/freetype/freetype.factor @@ -83,7 +83,7 @@ STRUCT: glyph { n-points short } { points void* } - { tags char* } + { tags c-string } { contours short* } { outline-flags int } diff --git a/extra/libusb/libusb.factor b/extra/libusb/libusb.factor index d521015d6f..38bf49ed5b 100644 --- a/extra/libusb/libusb.factor +++ b/extra/libusb/libusb.factor @@ -128,7 +128,7 @@ STRUCT: libusb_endpoint_descriptor { bInterval uint8_t } { bRefresh uint8_t } { bSynchAddress uint8_t } - { extra uchar* } + { extra c-string } { extra_length int } ; STRUCT: libusb_interface_descriptor @@ -142,7 +142,7 @@ STRUCT: libusb_interface_descriptor { bInterfaceProtocol uint8_t } { iInterface uint8_t } { endpoint libusb_endpoint_descriptor* } - { extra uchar* } + { extra c-string } { extra_length int } ; STRUCT: libusb_interface @@ -159,7 +159,7 @@ STRUCT: libusb_config_descriptor { bmAttributes uint8_t } { MaxPower uint8_t } { interface libusb_interface* } - { extra uchar* } + { extra c-string } { extra_length int } ; STRUCT: libusb_control_setup @@ -227,7 +227,7 @@ STRUCT: libusb_transfer { actual_length int } { callback libusb_transfer_cb_fn } { user_data void* } - { buffer uchar* } + { buffer c-string } { num_iso_packets int } { iso_packet_desc libusb_iso_packet_descriptor[0] } ; @@ -370,14 +370,14 @@ FUNCTION: void libusb_free_transfer ( libusb_transfer* transfer ) ; FUNCTION: int libusb_control_transfer ( libusb_device_handle* dev_handle, uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, - uchar* data, uint16_t length, uint timeout ) ; + c-string data, uint16_t length, uint timeout ) ; FUNCTION: int libusb_bulk_transfer ( libusb_device_handle* dev_handle, - uchar endpoint, uchar* data, int length, + uchar endpoint, c-string data, int length, int* actual_length, uint timeout ) ; FUNCTION: int libusb_interrupt_transfer ( libusb_device_handle* dev_handle, - uchar endpoint, uchar* data, int length, + uchar endpoint, c-string data, int length, int* actual_length, int timeout ) ; :: libusb_get_descriptor ( dev desc_type desc_index data length -- int ) @@ -392,7 +392,7 @@ FUNCTION: int libusb_interrupt_transfer ( libusb_device_handle* dev_handle, FUNCTION: int libusb_get_string_descriptor_ascii ( libusb_device_handle* dev, uint8_t index, - uchar* data, + c-string data, int length ) ; FUNCTION: int libusb_try_lock_events ( libusb_context* ctx ) ; diff --git a/extra/llvm/core/core.factor b/extra/llvm/core/core.factor index 0d1b22e288..f0a3cafe33 100644 --- a/extra/llvm/core/core.factor +++ b/extra/llvm/core/core.factor @@ -137,11 +137,11 @@ TYPEDEF: void* LLVMMemoryBufferRef ! Functions -FUNCTION: void LLVMDisposeMessage ( char* Message ) ; +FUNCTION: void LLVMDisposeMessage ( c-string Message ) ; -FUNCTION: LLVMModuleRef LLVMModuleCreateWithName ( char* ModuleID ) ; +FUNCTION: LLVMModuleRef LLVMModuleCreateWithName ( c-string ModuleID ) ; -FUNCTION: int LLVMAddTypeName ( LLVMModuleRef M, char* Name, LLVMTypeRef Ty ) ; +FUNCTION: int LLVMAddTypeName ( LLVMModuleRef M, c-string Name, LLVMTypeRef Ty ) ; FUNCTION: void LLVMDisposeModule ( LLVMModuleRef M ) ; @@ -230,7 +230,7 @@ FUNCTION: unsigned LLVMCountParams ( LLVMValueRef Fn ) ; FUNCTION: void LLVMGetParams ( LLVMValueRef Fn, LLVMValueRef* Params ) ; FUNCTION: LLVMValueRef -LLVMAddFunction ( LLVMModuleRef M, char* Name, LLVMTypeRef FunctionTy ) ; +LLVMAddFunction ( LLVMModuleRef M, c-string Name, LLVMTypeRef FunctionTy ) ; FUNCTION: LLVMValueRef LLVMGetFirstFunction ( LLVMModuleRef M ) ; @@ -241,15 +241,15 @@ FUNCTION: unsigned LLVMGetFunctionCallConv ( LLVMValueRef Fn ) ; FUNCTION: void LLVMSetFunctionCallConv ( LLVMValueRef Fn, unsigned CC ) ; FUNCTION: LLVMBasicBlockRef -LLVMAppendBasicBlock ( LLVMValueRef Fn, char* Name ) ; +LLVMAppendBasicBlock ( LLVMValueRef Fn, c-string Name ) ; FUNCTION: LLVMValueRef LLVMGetBasicBlockParent ( LLVMBasicBlockRef BB ) ; ! Values FUNCTION: LLVMTypeRef LLVMTypeOf ( LLVMValueRef Val ) ; -FUNCTION: char* LLVMGetValueName ( LLVMValueRef Val ) ; -FUNCTION: void LLVMSetValueName ( LLVMValueRef Val, char* Name ) ; +FUNCTION: c-string LLVMGetValueName ( LLVMValueRef Val ) ; +FUNCTION: void LLVMSetValueName ( LLVMValueRef Val, c-string Name ) ; FUNCTION: void LLVMDumpValue ( LLVMValueRef Val ) ; ! Instruction Builders @@ -284,7 +284,7 @@ FUNCTION: LLVMValueRef LLVMBuildSwitch ( LLVMBuilderRef Builder, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases ) ; FUNCTION: LLVMValueRef LLVMBuildInvoke ( LLVMBuilderRef Builder, LLVMValueRef Fn, LLVMValueRef* Args, unsigned NumArgs, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, char* Name ) ; + LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildUnwind ( LLVMBuilderRef Builder ) ; FUNCTION: LLVMValueRef LLVMBuildUnreachable @@ -298,126 +298,126 @@ FUNCTION: void LLVMAddCase ! IB Arithmetic FUNCTION: LLVMValueRef LLVMBuildAdd -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSub -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildMul -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildUDiv -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSDiv -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFDiv -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildURem -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSRem -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFRem -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildShl -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildLShr -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildAShr -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildAnd -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildOr -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildXor -( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildNeg -( LLVMBuilderRef Builder, LLVMValueRef V, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef V, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildNot -( LLVMBuilderRef Builder, LLVMValueRef V, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef V, c-string Name ) ; ! IB Memory FUNCTION: LLVMValueRef LLVMBuildMalloc -( LLVMBuilderRef Builder, LLVMTypeRef Ty, char* Name ) ; +( LLVMBuilderRef Builder, LLVMTypeRef Ty, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildArrayMalloc -( LLVMBuilderRef Builder, LLVMTypeRef Ty, LLVMValueRef Val, char* Name ) ; +( LLVMBuilderRef Builder, LLVMTypeRef Ty, LLVMValueRef Val, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildAlloca -( LLVMBuilderRef Builder, LLVMTypeRef Ty, char* Name ) ; +( LLVMBuilderRef Builder, LLVMTypeRef Ty, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildArrayAlloca -( LLVMBuilderRef Builder, LLVMTypeRef Ty, LLVMValueRef Val, char* Name ) ; +( LLVMBuilderRef Builder, LLVMTypeRef Ty, LLVMValueRef Val, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFree ( LLVMBuilderRef Builder, LLVMValueRef PointerVal ) ; FUNCTION: LLVMValueRef LLVMBuildLoad -( LLVMBuilderRef Builder, LLVMValueRef PointerVal, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef PointerVal, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildStore ( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMValueRef Ptr ) ; FUNCTION: LLVMValueRef LLVMBuildGEP ( LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef* Indices, - unsigned NumIndices, char* Name ) ; + unsigned NumIndices, c-string Name ) ; ! IB Casts FUNCTION: LLVMValueRef LLVMBuildTrunc -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildZExt -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSExt -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFPToUI -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFPToSI -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildUIToFP -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSIToFP -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFPTrunc -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFPExt -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildPtrToInt -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildIntToPtr -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildBitCast -( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Val, LLVMTypeRef DestTy, c-string Name ) ; ! IB Comparisons FUNCTION: LLVMValueRef LLVMBuildICmp -( LLVMBuilderRef Builder, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildFCmp -( LLVMBuilderRef Builder, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, char* Name ) ; +( LLVMBuilderRef Builder, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, c-string Name ) ; ! IB Misc Instructions FUNCTION: LLVMValueRef LLVMBuildPhi -( LLVMBuilderRef Builder, LLVMTypeRef Ty, char* Name ) ; +( LLVMBuilderRef Builder, LLVMTypeRef Ty, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildCall -( LLVMBuilderRef Builder, LLVMValueRef Fn, LLVMValueRef* Args, unsigned NumArgs, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef Fn, LLVMValueRef* Args, unsigned NumArgs, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildSelect -( LLVMBuilderRef Builder, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildVAArg -( LLVMBuilderRef Builder, LLVMValueRef List, LLVMTypeRef Ty, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef List, LLVMTypeRef Ty, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildExtractElement -( LLVMBuilderRef Builder, LLVMValueRef VecVal, LLVMValueRef Index, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef VecVal, LLVMValueRef Index, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildInsertElement -( LLVMBuilderRef Builder, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildShuffleVector -( LLVMBuilderRef Builder, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildExtractValue -( LLVMBuilderRef Builder, LLVMValueRef AggVal, unsigned Index, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef AggVal, unsigned Index, c-string Name ) ; FUNCTION: LLVMValueRef LLVMBuildInsertValue -( LLVMBuilderRef Builder, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, char* Name ) ; +( LLVMBuilderRef Builder, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, c-string Name ) ; ! Memory Buffers/Bit Reader FUNCTION: int LLVMCreateMemoryBufferWithContentsOfFile -( char* Path, LLVMMemoryBufferRef* OutMemBuf, char** OutMessage ) ; +( c-string Path, LLVMMemoryBufferRef* OutMemBuf, c-string* OutMessage ) ; FUNCTION: void LLVMDisposeMemoryBuffer ( LLVMMemoryBufferRef MemBuf ) ; LIBRARY: LLVMBitReader FUNCTION: int LLVMParseBitcode -( LLVMMemoryBufferRef MemBuf, LLVMModuleRef* OutModule, char** OutMessage ) ; +( LLVMMemoryBufferRef MemBuf, LLVMModuleRef* OutModule, c-string* OutMessage ) ; FUNCTION: int LLVMGetBitcodeModuleProvider -( LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef* OutMP, char** OutMessage ) ; +( LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef* OutMP, c-string* OutMessage ) ; diff --git a/extra/llvm/engine/engine.factor b/extra/llvm/engine/engine.factor index d259c740e6..95e425c425 100644 --- a/extra/llvm/engine/engine.factor +++ b/extra/llvm/engine/engine.factor @@ -34,10 +34,10 @@ FUNCTION: ulonglong LLVMGenericValueToInt ( LLVMGenericValueRef GenVal, int IsSigned ) ; FUNCTION: int LLVMCreateExecutionEngine -( LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, char** OutError ) ; +( LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, c-string* OutError ) ; FUNCTION: int LLVMCreateJITCompiler -( LLVMExecutionEngineRef* OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, char** OutError ) ; +( LLVMExecutionEngineRef* OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, c-string* OutError ) ; FUNCTION: void LLVMDisposeExecutionEngine ( LLVMExecutionEngineRef EE ) ; @@ -46,10 +46,10 @@ FUNCTION: void LLVMFreeMachineCodeForFunction ( LLVMExecutionEngineRef EE, LLVMV FUNCTION: void LLVMAddModuleProvider ( LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP ) ; FUNCTION: int LLVMRemoveModuleProvider -( LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef* OutMod, char** OutError ) ; +( LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef* OutMod, c-string* OutError ) ; FUNCTION: int LLVMFindFunction -( LLVMExecutionEngineRef EE, char* Name, LLVMValueRef* OutFn ) ; +( LLVMExecutionEngineRef EE, c-string Name, LLVMValueRef* OutFn ) ; FUNCTION: void* LLVMGetPointerToGlobal ( LLVMExecutionEngineRef EE, LLVMValueRef Global ) ; diff --git a/extra/llvm/types/types.factor b/extra/llvm/types/types.factor index ddb54ecb27..e93cf7a44b 100644 --- a/extra/llvm/types/types.factor +++ b/extra/llvm/types/types.factor @@ -99,7 +99,7 @@ TUPLE: pointer < enclosing type ; M: pointer (>tref)* type>> (>tref) 0 LLVMPointerType ; M: pointer clean* type>> clean ; M: pointer (tref>)* swap LLVMGetElementType (tref>) >>type ; -M: pointer c-type type>> 8 = "char*" "void*" ? ; +M: pointer c-type type>> 8 = "c-string" "void*" ? ; TUPLE: vector < enclosing size type ; : ( s t -- o ) diff --git a/extra/llvm/wrappers/wrappers.factor b/extra/llvm/wrappers/wrappers.factor index a1d757e7e9..05aafce973 100644 --- a/extra/llvm/wrappers/wrappers.factor +++ b/extra/llvm/wrappers/wrappers.factor @@ -6,7 +6,7 @@ llvm.core llvm.engine ; IN: llvm.wrappers -: llvm-throw ( char* -- ) +: llvm-throw ( c-string -- ) [ utf8 alien>string ] [ LLVMDisposeMessage ] bi throw ; : ( alien class -- disposable ) new swap >>value ; diff --git a/extra/native-thread-test/native-thread-test.factor b/extra/native-thread-test/native-thread-test.factor index 4d0df1f454..73b86f53a0 100644 --- a/extra/native-thread-test/native-thread-test.factor +++ b/extra/native-thread-test/native-thread-test.factor @@ -5,7 +5,7 @@ io.encodings.utf8 io.files kernel sequences system threads unix.utilities ; IN: native-thread-test -FUNCTION: void* start_standalone_factor_in_new_thread ( int argc, char** argv ) ; +FUNCTION: void* start_standalone_factor_in_new_thread ( int argc, c-string* argv ) ; : start-vm-in-os-thread ( args -- threadhandle ) vm prefix diff --git a/extra/ogg/ogg.factor b/extra/ogg/ogg.factor index d7abece8bc..ed25740ff6 100644 --- a/extra/ogg/ogg.factor +++ b/extra/ogg/ogg.factor @@ -28,18 +28,18 @@ LIBRARY: ogg STRUCT: oggpack-buffer { endbyte long } { endbit int } - { buffer uchar* } - { ptr uchar* } + { buffer c-string } + { ptr c-string } { storage long } ; STRUCT: ogg-page - { header uchar* } + { header c-string } { header_len long } - { body uchar* } + { body c-string } { body_len long } ; STRUCT: ogg-stream-state - { body_data uchar* } + { body_data c-string } { body_storage long } { body_fill long } { body_returned long } @@ -59,7 +59,7 @@ STRUCT: ogg-stream-state { granulepos longlong } ; STRUCT: ogg-packet - { packet uchar* } + { packet c-string } { bytes long } { b_o_s long } { e_o_s long } @@ -67,7 +67,7 @@ STRUCT: ogg-packet { packetno longlong } ; STRUCT: ogg-sync-state - { data uchar* } + { data c-string } { storage int } { fill int } { returned int } @@ -81,7 +81,7 @@ FUNCTION: void oggpack_writealign ( oggpack-buffer* b) ; FUNCTION: void oggpack_writecopy ( oggpack-buffer* b, void* source, long bits ) ; FUNCTION: void oggpack_reset ( oggpack-buffer* b ) ; FUNCTION: void oggpack_writeclear ( oggpack-buffer* b ) ; -FUNCTION: void oggpack_readinit ( oggpack-buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpack_readinit ( oggpack-buffer* b, c-string buf, int bytes ) ; FUNCTION: void oggpack_write ( oggpack-buffer* b, ulong value, int bits ) ; FUNCTION: long oggpack_look ( oggpack-buffer* b, int bits ) ; FUNCTION: long oggpack_look1 ( oggpack-buffer* b ) ; @@ -91,14 +91,14 @@ FUNCTION: long oggpack_read ( oggpack-buffer* b, int bits ) ; FUNCTION: long oggpack_read1 ( oggpack-buffer* b ) ; FUNCTION: long oggpack_bytes ( oggpack-buffer* b ) ; FUNCTION: long oggpack_bits ( oggpack-buffer* b ) ; -FUNCTION: uchar* oggpack_get_buffer ( oggpack-buffer* b ) ; +FUNCTION: c-string oggpack_get_buffer ( oggpack-buffer* b ) ; FUNCTION: void oggpackB_writeinit ( oggpack-buffer* b ) ; FUNCTION: void oggpackB_writetrunc ( oggpack-buffer* b, long bits ) ; FUNCTION: void oggpackB_writealign ( oggpack-buffer* b ) ; FUNCTION: void oggpackB_writecopy ( oggpack-buffer* b, void* source, long bits ) ; FUNCTION: void oggpackB_reset ( oggpack-buffer* b ) ; FUNCTION: void oggpackB_writeclear ( oggpack-buffer* b ) ; -FUNCTION: void oggpackB_readinit ( oggpack-buffer* b, uchar* buf, int bytes ) ; +FUNCTION: void oggpackB_readinit ( oggpack-buffer* b, c-string buf, int bytes ) ; FUNCTION: void oggpackB_write ( oggpack-buffer* b, ulong value, int bits ) ; FUNCTION: long oggpackB_look ( oggpack-buffer* b, int bits ) ; FUNCTION: long oggpackB_look1 ( oggpack-buffer* b ) ; @@ -108,7 +108,7 @@ FUNCTION: long oggpackB_read ( oggpack-buffer* b, int bits ) ; FUNCTION: long oggpackB_read1 ( oggpack-buffer* b ) ; FUNCTION: long oggpackB_bytes ( oggpack-buffer* b ) ; FUNCTION: long oggpackB_bits ( oggpack-buffer* b ) ; -FUNCTION: uchar* oggpackB_get_buffer ( oggpack-buffer* b ) ; +FUNCTION: c-string oggpackB_get_buffer ( oggpack-buffer* b ) ; FUNCTION: int ogg_stream_packetin ( ogg-stream-state* os, ogg-packet* op ) ; FUNCTION: int ogg_stream_pageout ( ogg-stream-state* os, ogg-page* og ) ; FUNCTION: int ogg_stream_flush ( ogg-stream-state* os, ogg-page* og ) ; diff --git a/extra/ogg/theora/theora.factor b/extra/ogg/theora/theora.factor index c9141fb9e3..3e28129252 100644 --- a/extra/ogg/theora/theora.factor +++ b/extra/ogg/theora/theora.factor @@ -53,7 +53,7 @@ STRUCT: th-img-plane { width int } { height int } { stride int } - { data uchar* } + { data c-string } ; TYPEDEF: th-img-plane[3] th-ycbcr-buffer @@ -80,10 +80,10 @@ STRUCT: th-info ; STRUCT: th-comment - { user-comments char** } + { user-comments c-string* } { comment-lengths int* } { comments int } - { vendor char* } + { vendor c-string } ; TYPEDEF: uchar[64] th-quant-base @@ -110,7 +110,7 @@ STRUCT: th-huff-code ; LIBRARY: theoradec -FUNCTION: char* th_version_string ( ) ; +FUNCTION: c-string th_version_string ( ) ; FUNCTION: uint th_version_number ( ) ; FUNCTION: longlong th_granule_frame ( void* encdec, longlong granpos) ; FUNCTION: int th_packet_isheader ( ogg-packet* op ) ; @@ -118,10 +118,10 @@ FUNCTION: int th_packet_iskeyframe ( ogg-packet* op ) ; FUNCTION: void th_info_init ( th-info* info ) ; FUNCTION: void th_info_clear ( th-info* info ) ; FUNCTION: void th_comment_init ( th-comment* tc ) ; -FUNCTION: void th_comment_add ( th-comment* tc, char* comment ) ; -FUNCTION: void th_comment_add_tag ( th-comment* tc, char* tag, char* value ) ; -FUNCTION: char* th_comment_query ( th-comment* tc, char* tag, int count ) ; -FUNCTION: int th_comment_query_count ( th-comment* tc, char* tag ) ; +FUNCTION: void th_comment_add ( th-comment* tc, c-string comment ) ; +FUNCTION: void th_comment_add_tag ( th-comment* tc, c-string tag, c-string value ) ; +FUNCTION: c-string th_comment_query ( th-comment* tc, c-string tag, int count ) ; +FUNCTION: int th_comment_query_count ( th-comment* tc, c-string tag ) ; FUNCTION: void th_comment_clear ( th-comment* tc ) ; CONSTANT: TH-ENCCTL-SET-HUFFMAN-CODES 0 diff --git a/extra/ogg/vorbis/vorbis.factor b/extra/ogg/vorbis/vorbis.factor index d5905dac9e..ad43750e27 100644 --- a/extra/ogg/vorbis/vorbis.factor +++ b/extra/ogg/vorbis/vorbis.factor @@ -90,20 +90,20 @@ STRUCT: vorbis-block ; STRUCT: vorbis-comment - { usercomments char** } + { usercomments c-string* } { comment_lengths int* } { comments int } - { vendor char* } + { vendor c-string } ; FUNCTION: void vorbis_info_init ( vorbis-info* vi ) ; FUNCTION: void vorbis_info_clear ( vorbis-info* vi ) ; FUNCTION: int vorbis_info_blocksize ( vorbis-info* vi, int zo ) ; FUNCTION: void vorbis_comment_init ( vorbis-comment* vc ) ; -FUNCTION: void vorbis_comment_add ( vorbis-comment* vc, char* comment ) ; -FUNCTION: void vorbis_comment_add_tag ( vorbis-comment* vc, char* tag, char* contents ) ; -FUNCTION: char* vorbis_comment_query ( vorbis-comment* vc, char* tag, int count ) ; -FUNCTION: int vorbis_comment_query_count ( vorbis-comment* vc, char* tag ) ; +FUNCTION: void vorbis_comment_add ( vorbis-comment* vc, c-string comment ) ; +FUNCTION: void vorbis_comment_add_tag ( vorbis-comment* vc, c-string tag, c-string contents ) ; +FUNCTION: c-string vorbis_comment_query ( vorbis-comment* vc, c-string tag, int count ) ; +FUNCTION: int vorbis_comment_query_count ( vorbis-comment* vc, c-string tag ) ; FUNCTION: void vorbis_comment_clear ( vorbis-comment* vc ) ; FUNCTION: int vorbis_block_init ( vorbis-dsp-state* v, vorbis-block* vb ) ; FUNCTION: int vorbis_block_clear ( vorbis-block* vb ) ; diff --git a/extra/openal/alut/alut.factor b/extra/openal/alut/alut.factor index 9e37d9886c..0bf8511647 100755 --- a/extra/openal/alut/alut.factor +++ b/extra/openal/alut/alut.factor @@ -49,20 +49,20 @@ CONSTANT: ALUT_WAVEFORM_IMPULSE HEX: 104 CONSTANT: ALUT_LOADER_BUFFER HEX: 300 CONSTANT: ALUT_LOADER_MEMORY HEX: 301 -FUNCTION: ALboolean alutInit ( int* argcp, char** argv ) ; -FUNCTION: ALboolean alutInitWithoutContext ( int* argcp, char** argv ) ; +FUNCTION: ALboolean alutInit ( int* argcp, c-string* argv ) ; +FUNCTION: ALboolean alutInitWithoutContext ( int* argcp, c-string* argv ) ; FUNCTION: ALboolean alutExit ( ) ; FUNCTION: ALenum alutGetError ( ) ; -FUNCTION: char* alutGetErrorString ( ALenum error ) ; -FUNCTION: ALuint alutCreateBufferFromFile ( char* fileName ) ; +FUNCTION: c-string alutGetErrorString ( ALenum error ) ; +FUNCTION: ALuint alutCreateBufferFromFile ( c-string fileName ) ; FUNCTION: ALuint alutCreateBufferFromFileImage ( void* data, ALsizei length ) ; FUNCTION: ALuint alutCreateBufferHelloWorld ( ) ; FUNCTION: ALuint alutCreateBufferWaveform ( ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration ) ; -FUNCTION: void* alutLoadMemoryFromFile ( char* fileName, ALenum* format, ALsizei* size, ALfloat* frequency ) ; +FUNCTION: void* alutLoadMemoryFromFile ( c-string fileName, ALenum* format, ALsizei* size, ALfloat* frequency ) ; FUNCTION: void* alutLoadMemoryFromFileImage ( void* data, ALsizei length, ALenum* format, ALsizei* size, ALfloat* frequency ) ; FUNCTION: void* alutLoadMemoryHelloWorld ( ALenum* format, ALsizei* size, ALfloat* frequency ) ; FUNCTION: void* alutLoadMemoryWaveform ( ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration, ALenum* format, ALsizei* size, ALfloat* freq ) ; -FUNCTION: char* alutGetMIMETypes ( ALenum loader ) ; +FUNCTION: c-string alutGetMIMETypes ( ALenum loader ) ; FUNCTION: ALint alutGetMajorVersion ( ) ; FUNCTION: ALint alutGetMinorVersion ( ) ; FUNCTION: ALboolean alutSleep ( ALfloat duration ) ; diff --git a/extra/opengl/glu/glu.factor b/extra/opengl/glu/glu.factor index 6409a3781b..86936fdd65 100644 --- a/extra/opengl/glu/glu.factor +++ b/extra/opengl/glu/glu.factor @@ -218,9 +218,9 @@ FUNCTION: void gluEndCurve ( GLUnurbs* nurb ) ; FUNCTION: void gluEndPolygon ( GLUtesselator* tess ) ; FUNCTION: void gluEndSurface ( GLUnurbs* nurb ) ; FUNCTION: void gluEndTrim ( GLUnurbs* nurb ) ; -FUNCTION: char* gluErrorString ( GLenum error ) ; +FUNCTION: c-string gluErrorString ( GLenum error ) ; FUNCTION: void gluGetNurbsProperty ( GLUnurbs* nurb, GLenum property, GLfloat* data ) ; -FUNCTION: char* gluGetString ( GLenum name ) ; +FUNCTION: c-string gluGetString ( GLenum name ) ; FUNCTION: void gluGetTessProperty ( GLUtesselator* tess, GLenum which, GLdouble* data ) ; FUNCTION: void gluLoadSamplingMatrices ( GLUnurbs* nurb, GLfloat* model, GLfloat* perspective, GLint* view ) ; FUNCTION: void gluLookAt ( GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ ) ; diff --git a/extra/tokyo/alien/tcadb/tcadb.factor b/extra/tokyo/alien/tcadb/tcadb.factor index efba5f0374..7e3a2d47c2 100644 --- a/extra/tokyo/alien/tcadb/tcadb.factor +++ b/extra/tokyo/alien/tcadb/tcadb.factor @@ -21,38 +21,38 @@ C-ENUM: FUNCTION: TCADB* tcadbnew ( ) ; FUNCTION: void tcadbdel ( TCADB* adb ) ; -FUNCTION: bool tcadbopen ( TCADB* adb, char* name ) ; +FUNCTION: bool tcadbopen ( TCADB* adb, c-string name ) ; FUNCTION: bool tcadbclose ( TCADB* adb ) ; FUNCTION: bool tcadbput ( TCADB* adb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcadbput2 ( TCADB* adb, char* kstr, char* vstr ) ; +FUNCTION: bool tcadbput2 ( TCADB* adb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcadbputkeep ( TCADB* adb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcadbputkeep2 ( TCADB* adb, char* kstr, char* vstr ) ; +FUNCTION: bool tcadbputkeep2 ( TCADB* adb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcadbputcat ( TCADB* adb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcadbputcat2 ( TCADB* adb, char* kstr, char* vstr ) ; +FUNCTION: bool tcadbputcat2 ( TCADB* adb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcadbout ( TCADB* adb, void* kbuf, int ksiz ) ; -FUNCTION: bool tcadbout2 ( TCADB* adb, char* kstr ) ; +FUNCTION: bool tcadbout2 ( TCADB* adb, c-string kstr ) ; FUNCTION: void* tcadbget ( TCADB* adb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tcadbget2 ( TCADB* adb, char* kstr ) ; +FUNCTION: c-string tcadbget2 ( TCADB* adb, c-string kstr ) ; FUNCTION: int tcadbvsiz ( TCADB* adb, void* kbuf, int ksiz ) ; -FUNCTION: int tcadbvsiz2 ( TCADB* adb, char* kstr ) ; +FUNCTION: int tcadbvsiz2 ( TCADB* adb, c-string kstr ) ; FUNCTION: bool tcadbiterinit ( TCADB* adb ) ; FUNCTION: void* tcadbiternext ( TCADB* adb, int* sp ) ; -FUNCTION: char* tcadbiternext2 ( TCADB* adb ) ; +FUNCTION: c-string tcadbiternext2 ( TCADB* adb ) ; FUNCTION: TCLIST* tcadbfwmkeys ( TCADB* adb, void* pbuf, int psiz, int max ) ; -FUNCTION: TCLIST* tcadbfwmkeys2 ( TCADB* adb, char* pstr, int max ) ; +FUNCTION: TCLIST* tcadbfwmkeys2 ( TCADB* adb, c-string pstr, int max ) ; FUNCTION: int tcadbaddint ( TCADB* adb, void* kbuf, int ksiz, int num ) ; FUNCTION: double tcadbadddouble ( TCADB* adb, void* kbuf, int ksiz, double num ) ; FUNCTION: bool tcadbsync ( TCADB* adb ) ; -FUNCTION: bool tcadboptimize ( TCADB* adb, char* params ) ; +FUNCTION: bool tcadboptimize ( TCADB* adb, c-string params ) ; FUNCTION: bool tcadbvanish ( TCADB* adb ) ; -FUNCTION: bool tcadbcopy ( TCADB* adb, char* path ) ; +FUNCTION: bool tcadbcopy ( TCADB* adb, c-string path ) ; FUNCTION: bool tcadbtranbegin ( TCADB* adb ) ; FUNCTION: bool tcadbtrancommit ( TCADB* adb ) ; FUNCTION: bool tcadbtranabort ( TCADB* adb ) ; -FUNCTION: char* tcadbpath ( TCADB* adb ) ; +FUNCTION: c-string tcadbpath ( TCADB* adb ) ; FUNCTION: ulonglong tcadbrnum ( TCADB* adb ) ; FUNCTION: ulonglong tcadbsize ( TCADB* adb ) ; -FUNCTION: TCLIST* tcadbmisc ( TCADB* adb, char* name, TCLIST* args ) ; +FUNCTION: TCLIST* tcadbmisc ( TCADB* adb, c-string name, TCLIST* args ) ; ! ----- @@ -66,4 +66,4 @@ FUNCTION: void* tcadbreveal ( TCADB* adb ) ; FUNCTION: bool tcadbputproc ( TCADB* adb, void* kbuf, int ksiz, void* vbuf, int vsiz, TCPDPROC proc, void* op ) ; FUNCTION: bool tcadbforeach ( TCADB* adb, TCITER iter, void* op ) ; FUNCTION: bool tcadbmapbdb ( TCADB* adb, TCLIST* keys, TCBDB* bdb, ADBMAPPROC proc, void* op, longlong csiz ) ; -FUNCTION: bool tcadbmapbdbemit ( void* map, char* kbuf, int ksiz, char* vbuf, int vsiz ) ; +FUNCTION: bool tcadbmapbdbemit ( void* map, c-string kbuf, int ksiz, c-string vbuf, int vsiz ) ; diff --git a/extra/tokyo/alien/tcbdb/tcbdb.factor b/extra/tokyo/alien/tcbdb/tcbdb.factor index 8739e04608..6454e6b2fa 100644 --- a/extra/tokyo/alien/tcbdb/tcbdb.factor +++ b/extra/tokyo/alien/tcbdb/tcbdb.factor @@ -32,7 +32,7 @@ C-ENUM: BDBCPBEFORE BDBCPAFTER ; -FUNCTION: char* tcbdberrmsg ( int ecode ) ; +FUNCTION: c-string tcbdberrmsg ( int ecode ) ; FUNCTION: TCBDB* tcbdbnew ( ) ; FUNCTION: void tcbdbdel ( TCBDB* bdb ) ; FUNCTION: int tcbdbecode ( TCBDB* bdb ) ; @@ -41,42 +41,42 @@ FUNCTION: bool tcbdbsetcmpfunc ( TCBDB* bdb, TCCMP cmp, void* cmpop ) ; FUNCTION: bool tcbdbtune ( TCBDB* bdb, int lmemb, int nmemb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tcbdbsetcache ( TCBDB* bdb, int lcnum, int ncnum ) ; FUNCTION: bool tcbdbsetxmsiz ( TCBDB* bdb, longlong xmsiz ) ; -FUNCTION: bool tcbdbopen ( TCBDB* bdb, char* path, int omode ) ; +FUNCTION: bool tcbdbopen ( TCBDB* bdb, c-string path, int omode ) ; FUNCTION: bool tcbdbclose ( TCBDB* bdb ) ; FUNCTION: bool tcbdbput ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcbdbput2 ( TCBDB* bdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcbdbput2 ( TCBDB* bdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcbdbputkeep ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcbdbputkeep2 ( TCBDB* bdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcbdbputkeep2 ( TCBDB* bdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcbdbputcat ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcbdbputcat2 ( TCBDB* bdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcbdbputcat2 ( TCBDB* bdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcbdbputdup ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcbdbputdup2 ( TCBDB* bdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcbdbputdup2 ( TCBDB* bdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcbdbputdup3 ( TCBDB* bdb, void* kbuf, int ksiz, TCLIST* vals ) ; FUNCTION: bool tcbdbout ( TCBDB* bdb, void* kbuf, int ksiz ) ; -FUNCTION: bool tcbdbout2 ( TCBDB* bdb, char* kstr ) ; +FUNCTION: bool tcbdbout2 ( TCBDB* bdb, c-string kstr ) ; FUNCTION: bool tcbdbout3 ( TCBDB* bdb, void* kbuf, int ksiz ) ; FUNCTION: void* tcbdbget ( TCBDB* bdb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tcbdbget2 ( TCBDB* bdb, char* kstr ) ; +FUNCTION: c-string tcbdbget2 ( TCBDB* bdb, c-string kstr ) ; FUNCTION: void* tcbdbget3 ( TCBDB* bdb, void* kbuf, int ksiz, int* sp ) ; FUNCTION: TCLIST* tcbdbget4 ( TCBDB* bdb, void* kbuf, int ksiz ) ; FUNCTION: int tcbdbvnum ( TCBDB* bdb, void* kbuf, int ksiz ) ; -FUNCTION: int tcbdbvnum2 ( TCBDB* bdb, char* kstr ) ; +FUNCTION: int tcbdbvnum2 ( TCBDB* bdb, c-string kstr ) ; FUNCTION: int tcbdbvsiz ( TCBDB* bdb, void* kbuf, int ksiz ) ; -FUNCTION: int tcbdbvsiz2 ( TCBDB* bdb, char* kstr ) ; +FUNCTION: int tcbdbvsiz2 ( TCBDB* bdb, c-string kstr ) ; FUNCTION: TCLIST* tcbdbrange ( TCBDB* bdb, void* bkbuf, int bksiz, bool binc, void* ekbuf, int eksiz, bool einc, int max ) ; -FUNCTION: TCLIST* tcbdbrange2 ( TCBDB* bdb, char* bkstr, bool binc, char* ekstr, bool einc, int max ) ; +FUNCTION: TCLIST* tcbdbrange2 ( TCBDB* bdb, c-string bkstr, bool binc, c-string ekstr, bool einc, int max ) ; FUNCTION: TCLIST* tcbdbfwmkeys ( TCBDB* bdb, void* pbuf, int psiz, int max ) ; -FUNCTION: TCLIST* tcbdbfwmkeys2 ( TCBDB* bdb, char* pstr, int max ) ; +FUNCTION: TCLIST* tcbdbfwmkeys2 ( TCBDB* bdb, c-string pstr, int max ) ; FUNCTION: int tcbdbaddint ( TCBDB* bdb, void* kbuf, int ksiz, int num ) ; FUNCTION: double tcbdbadddouble ( TCBDB* bdb, void* kbuf, int ksiz, double num ) ; FUNCTION: bool tcbdbsync ( TCBDB* bdb ) ; FUNCTION: bool tcbdboptimize ( TCBDB* bdb, int lmemb, int nmemb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tcbdbvanish ( TCBDB* bdb ) ; -FUNCTION: bool tcbdbcopy ( TCBDB* bdb, char* path ) ; +FUNCTION: bool tcbdbcopy ( TCBDB* bdb, c-string path ) ; FUNCTION: bool tcbdbtranbegin ( TCBDB* bdb ) ; FUNCTION: bool tcbdbtrancommit ( TCBDB* bdb ) ; FUNCTION: bool tcbdbtranabort ( TCBDB* bdb ) ; -FUNCTION: char* tcbdbpath ( TCBDB* bdb ) ; +FUNCTION: c-string tcbdbpath ( TCBDB* bdb ) ; FUNCTION: ulonglong tcbdbrnum ( TCBDB* bdb ) ; FUNCTION: ulonglong tcbdbfsiz ( TCBDB* bdb ) ; FUNCTION: BDBCUR* tcbdbcurnew ( TCBDB* bdb ) ; @@ -84,23 +84,23 @@ FUNCTION: void tcbdbcurdel ( BDBCUR* cur ) ; FUNCTION: bool tcbdbcurfirst ( BDBCUR* cur ) ; FUNCTION: bool tcbdbcurlast ( BDBCUR* cur ) ; FUNCTION: bool tcbdbcurjump ( BDBCUR* cur, void* kbuf, int ksiz ) ; -FUNCTION: bool tcbdbcurjump2 ( BDBCUR* cur, char* kstr ) ; +FUNCTION: bool tcbdbcurjump2 ( BDBCUR* cur, c-string kstr ) ; FUNCTION: bool tcbdbcurprev ( BDBCUR* cur ) ; FUNCTION: bool tcbdbcurnext ( BDBCUR* cur ) ; FUNCTION: bool tcbdbcurput ( BDBCUR* cur, void* vbuf, int vsiz, int cpmode ) ; -FUNCTION: bool tcbdbcurput2 ( BDBCUR* cur, char* vstr, int cpmode ) ; +FUNCTION: bool tcbdbcurput2 ( BDBCUR* cur, c-string vstr, int cpmode ) ; FUNCTION: bool tcbdbcurout ( BDBCUR* cur ) ; FUNCTION: void* tcbdbcurkey ( BDBCUR* cur, int* sp ) ; -FUNCTION: char* tcbdbcurkey2 ( BDBCUR* cur ) ; +FUNCTION: c-string tcbdbcurkey2 ( BDBCUR* cur ) ; FUNCTION: void* tcbdbcurkey3 ( BDBCUR* cur, int* sp ) ; FUNCTION: void* tcbdbcurval ( BDBCUR* cur, int* sp ) ; -FUNCTION: char* tcbdbcurval2 ( BDBCUR* cur ) ; +FUNCTION: c-string tcbdbcurval2 ( BDBCUR* cur ) ; FUNCTION: void* tcbdbcurval3 ( BDBCUR* cur, int* sp ) ; FUNCTION: bool tcbdbcurrec ( BDBCUR* cur, TCXSTR* kxstr, TCXSTR* vxstr ) ; ! ----------- -FUNCTION: void tcbdbsetecode ( TCBDB* bdb, int ecode, char* filename, int line, char* func ) ; +FUNCTION: void tcbdbsetecode ( TCBDB* bdb, int ecode, c-string filename, int line, c-string func ) ; FUNCTION: void tcbdbsetdbgfd ( TCBDB* bdb, int fd ) ; FUNCTION: int tcbdbdbgfd ( TCBDB* bdb ) ; FUNCTION: bool tcbdbhasmutex ( TCBDB* bdb ) ; @@ -119,14 +119,14 @@ FUNCTION: ulonglong tcbdbinode ( TCBDB* bdb ) ; FUNCTION: tokyo_time_t tcbdbmtime ( TCBDB* bdb ) ; FUNCTION: uchar tcbdbflags ( TCBDB* bdb ) ; FUNCTION: uchar tcbdbopts ( TCBDB* bdb ) ; -FUNCTION: char* tcbdbopaque ( TCBDB* bdb ) ; +FUNCTION: c-string tcbdbopaque ( TCBDB* bdb ) ; FUNCTION: ulonglong tcbdbbnumused ( TCBDB* bdb ) ; FUNCTION: bool tcbdbsetlsmax ( TCBDB* bdb, uint lsmax ) ; FUNCTION: bool tcbdbsetcapnum ( TCBDB* bdb, ulonglong capnum ) ; FUNCTION: bool tcbdbsetcodecfunc ( TCBDB* bdb, TCCODEC enc, void* encop, TCCODEC dec, void* decop ) ; FUNCTION: bool tcbdbputdupback ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcbdbputdupback2 ( TCBDB* bdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcbdbputdupback2 ( TCBDB* bdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcbdbputproc ( TCBDB* bdb, void* kbuf, int ksiz, void* vbuf, int vsiz, TCPDPROC proc, void* op ) ; FUNCTION: bool tcbdbcurjumpback ( BDBCUR* cur, void* kbuf, int ksiz ) ; -FUNCTION: bool tcbdbcurjumpback2 ( BDBCUR* cur, char* kstr ) ; +FUNCTION: bool tcbdbcurjumpback2 ( BDBCUR* cur, c-string kstr ) ; FUNCTION: bool tcbdbforeach ( TCBDB* bdb, TCITER iter, void* op ) ; diff --git a/extra/tokyo/alien/tcfdb/tcfdb.factor b/extra/tokyo/alien/tcfdb/tcfdb.factor index 91400aaf4e..cde71f27a5 100644 --- a/extra/tokyo/alien/tcfdb/tcfdb.factor +++ b/extra/tokyo/alien/tcfdb/tcfdb.factor @@ -22,40 +22,40 @@ CONSTANT: FDBIDPREV -2 CONSTANT: FDBIDMAX -3 CONSTANT: FDBIDNEXT -4 -FUNCTION: char* tcfdberrmsg ( int ecode ) ; +FUNCTION: c-string tcfdberrmsg ( int ecode ) ; FUNCTION: TCFDB* tcfdbnew ( ) ; FUNCTION: void tcfdbdel ( TCFDB* fdb ) ; FUNCTION: int tcfdbecode ( TCFDB* fdb ) ; FUNCTION: bool tcfdbsetmutex ( TCFDB* fdb ) ; FUNCTION: bool tcfdbtune ( TCFDB* fdb, int width, longlong limsiz ) ; -FUNCTION: bool tcfdbopen ( TCFDB* fdb, char* path, int omode ) ; +FUNCTION: bool tcfdbopen ( TCFDB* fdb, c-string path, int omode ) ; FUNCTION: bool tcfdbclose ( TCFDB* fdb ) ; FUNCTION: bool tcfdbput ( TCFDB* fdb, longlong id, void* vbuf, int vsiz ) ; FUNCTION: bool tcfdbput2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcfdbput3 ( TCFDB* fdb, char* kstr, void* vstr ) ; +FUNCTION: bool tcfdbput3 ( TCFDB* fdb, c-string kstr, void* vstr ) ; FUNCTION: bool tcfdbputkeep ( TCFDB* fdb, longlong id, void* vbuf, int vsiz ) ; FUNCTION: bool tcfdbputkeep2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcfdbputkeep3 ( TCFDB* fdb, char* kstr, void* vstr ) ; +FUNCTION: bool tcfdbputkeep3 ( TCFDB* fdb, c-string kstr, void* vstr ) ; FUNCTION: bool tcfdbputcat ( TCFDB* fdb, longlong id, void* vbuf, int vsiz ) ; FUNCTION: bool tcfdbputcat2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcfdbputcat3 ( TCFDB* fdb, char* kstr, void* vstr ) ; +FUNCTION: bool tcfdbputcat3 ( TCFDB* fdb, c-string kstr, void* vstr ) ; FUNCTION: bool tcfdbout ( TCFDB* fdb, longlong id ) ; FUNCTION: bool tcfdbout2 ( TCFDB* fdb, void* kbuf, int ksiz ) ; -FUNCTION: bool tcfdbout3 ( TCFDB* fdb, char* kstr ) ; +FUNCTION: bool tcfdbout3 ( TCFDB* fdb, c-string kstr ) ; FUNCTION: void* tcfdbget ( TCFDB* fdb, longlong id, int* sp ) ; FUNCTION: void* tcfdbget2 ( TCFDB* fdb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tcfdbget3 ( TCFDB* fdb, char* kstr ) ; +FUNCTION: c-string tcfdbget3 ( TCFDB* fdb, c-string kstr ) ; FUNCTION: int tcfdbget4 ( TCFDB* fdb, longlong id, void* vbuf, int max ) ; FUNCTION: int tcfdbvsiz ( TCFDB* fdb, longlong id ) ; FUNCTION: int tcfdbvsiz2 ( TCFDB* fdb, void* kbuf, int ksiz ) ; -FUNCTION: int tcfdbvsiz3 ( TCFDB* fdb, char* kstr ) ; +FUNCTION: int tcfdbvsiz3 ( TCFDB* fdb, c-string kstr ) ; FUNCTION: bool tcfdbiterinit ( TCFDB* fdb ) ; FUNCTION: ulonglong tcfdbiternext ( TCFDB* fdb ) ; FUNCTION: void* tcfdbiternext2 ( TCFDB* fdb, int* sp ) ; -FUNCTION: char* tcfdbiternext3 ( TCFDB* fdb ) ; +FUNCTION: c-string tcfdbiternext3 ( TCFDB* fdb ) ; FUNCTION: ulonglong* tcfdbrange ( TCFDB* fdb, longlong lower, longlong upper, int max, int* np ) ; FUNCTION: TCLIST* tcfdbrange2 ( TCFDB* fdb, void* lbuf, int lsiz, void* ubuf, int usiz, int max ) ; -FUNCTION: TCLIST* tcfdbrange3 ( TCFDB* fdb, char* lstr, char* ustr, int max ) ; +FUNCTION: TCLIST* tcfdbrange3 ( TCFDB* fdb, c-string lstr, c-string ustr, int max ) ; FUNCTION: TCLIST* tcfdbrange4 ( TCFDB* fdb, void* ibuf, int isiz, int max ) ; FUNCTION: TCLIST* tcfdbrange5 ( TCFDB* fdb, void* istr, int max ) ; FUNCTION: int tcfdbaddint ( TCFDB* fdb, longlong id, int num ) ; @@ -63,17 +63,17 @@ FUNCTION: double tcfdbadddouble ( TCFDB* fdb, longlong id, double num ) ; FUNCTION: bool tcfdbsync ( TCFDB* fdb ) ; FUNCTION: bool tcfdboptimize ( TCFDB* fdb, int width, longlong limsiz ) ; FUNCTION: bool tcfdbvanish ( TCFDB* fdb ) ; -FUNCTION: bool tcfdbcopy ( TCFDB* fdb, char* path ) ; +FUNCTION: bool tcfdbcopy ( TCFDB* fdb, c-string path ) ; FUNCTION: bool tcfdbtranbegin ( TCFDB* fdb ) ; FUNCTION: bool tcfdbtrancommit ( TCFDB* fdb ) ; FUNCTION: bool tcfdbtranabort ( TCFDB* fdb ) ; -FUNCTION: char* tcfdbpath ( TCFDB* fdb ) ; +FUNCTION: c-string tcfdbpath ( TCFDB* fdb ) ; FUNCTION: ulonglong tcfdbrnum ( TCFDB* fdb ) ; FUNCTION: ulonglong tcfdbfsiz ( TCFDB* fdb ) ; ! -------- -FUNCTION: void tcfdbsetecode ( TCFDB* fdb, int ecode, char* filename, int line, char* func ) ; +FUNCTION: void tcfdbsetecode ( TCFDB* fdb, int ecode, c-string filename, int line, c-string func ) ; FUNCTION: void tcfdbsetdbgfd ( TCFDB* fdb, int fd ) ; FUNCTION: int tcfdbdbgfd ( TCFDB* fdb ) ; FUNCTION: bool tcfdbhasmutex ( TCFDB* fdb ) ; @@ -88,7 +88,7 @@ FUNCTION: tokyo_time_t tcfdbmtime ( TCFDB* fdb ) ; FUNCTION: int tcfdbomode ( TCFDB* fdb ) ; FUNCTION: uchar tcfdbtype ( TCFDB* fdb ) ; FUNCTION: uchar tcfdbflags ( TCFDB* fdb ) ; -FUNCTION: char* tcfdbopaque ( TCFDB* fdb ) ; +FUNCTION: c-string tcfdbopaque ( TCFDB* fdb ) ; FUNCTION: bool tcfdbputproc ( TCFDB* fdb, longlong id, void* vbuf, int vsiz, TCPDPROC proc, void* op ) ; FUNCTION: bool tcfdbforeach ( TCFDB* fdb, TCITER iter, void* op ) ; -FUNCTION: longlong tcfdbkeytoid ( char* kbuf, int ksiz ) ; +FUNCTION: longlong tcfdbkeytoid ( c-string kbuf, int ksiz ) ; diff --git a/extra/tokyo/alien/tchdb/tchdb.factor b/extra/tokyo/alien/tchdb/tchdb.factor index fd0464fcec..65d00b2a69 100644 --- a/extra/tokyo/alien/tchdb/tchdb.factor +++ b/extra/tokyo/alien/tchdb/tchdb.factor @@ -26,7 +26,7 @@ CONSTANT: HDBONOLCK 16 CONSTANT: HDBOLCKNB 32 CONSTANT: HDBOTSYNC 64 -FUNCTION: char* tchdberrmsg ( int ecode ) ; +FUNCTION: c-string tchdberrmsg ( int ecode ) ; FUNCTION: TCHDB* tchdbnew ( ) ; FUNCTION: void tchdbdel ( TCHDB* hdb ) ; FUNCTION: int tchdbecode ( TCHDB* hdb ) ; @@ -34,45 +34,45 @@ FUNCTION: bool tchdbsetmutex ( TCHDB* hdb ) ; FUNCTION: bool tchdbtune ( TCHDB* hdb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tchdbsetcache ( TCHDB* hdb, int rcnum ) ; FUNCTION: bool tchdbsetxmsiz ( TCHDB* hdb, longlong xmsiz ) ; -FUNCTION: bool tchdbopen ( TCHDB* hdb, char* path, int omode ) ; +FUNCTION: bool tchdbopen ( TCHDB* hdb, c-string path, int omode ) ; FUNCTION: bool tchdbclose ( TCHDB* hdb ) ; FUNCTION: bool tchdbput ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tchdbput2 ( TCHDB* hdb, char* kstr, char* vstr ) ; +FUNCTION: bool tchdbput2 ( TCHDB* hdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tchdbputkeep ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tchdbputkeep2 ( TCHDB* hdb, char* kstr, char* vstr ) ; +FUNCTION: bool tchdbputkeep2 ( TCHDB* hdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tchdbputcat ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tchdbputcat2 ( TCHDB* hdb, char* kstr, char* vstr ) ; +FUNCTION: bool tchdbputcat2 ( TCHDB* hdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tchdbputasync ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tchdbputasync2 ( TCHDB* hdb, char* kstr, char* vstr ) ; +FUNCTION: bool tchdbputasync2 ( TCHDB* hdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tchdbout ( TCHDB* hdb, void* kbuf, int ksiz ) ; -FUNCTION: bool tchdbout2 ( TCHDB* hdb, char* kstr ) ; +FUNCTION: bool tchdbout2 ( TCHDB* hdb, c-string kstr ) ; FUNCTION: void* tchdbget ( TCHDB* hdb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tchdbget2 ( TCHDB* hdb, char* kstr ) ; +FUNCTION: c-string tchdbget2 ( TCHDB* hdb, c-string kstr ) ; FUNCTION: int tchdbget3 ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int max ) ; FUNCTION: int tchdbvsiz ( TCHDB* hdb, void* kbuf, int ksiz ) ; -FUNCTION: int tchdbvsiz2 ( TCHDB* hdb, char* kstr ) ; +FUNCTION: int tchdbvsiz2 ( TCHDB* hdb, c-string kstr ) ; FUNCTION: bool tchdbiterinit ( TCHDB* hdb ) ; FUNCTION: void* tchdbiternext ( TCHDB* hdb, int* sp ) ; -FUNCTION: char* tchdbiternext2 ( TCHDB* hdb ) ; +FUNCTION: c-string tchdbiternext2 ( TCHDB* hdb ) ; FUNCTION: bool tchdbiternext3 ( TCHDB* hdb, TCXSTR* kxstr, TCXSTR* vxstr ) ; FUNCTION: TCLIST* tchdbfwmkeys ( TCHDB* hdb, void* pbuf, int psiz, int max ) ; -FUNCTION: TCLIST* tchdbfwmkeys2 ( TCHDB* hdb, char* pstr, int max ) ; +FUNCTION: TCLIST* tchdbfwmkeys2 ( TCHDB* hdb, c-string pstr, int max ) ; FUNCTION: int tchdbaddint ( TCHDB* hdb, void* kbuf, int ksiz, int num ) ; FUNCTION: double tchdbadddouble ( TCHDB* hdb, void* kbuf, int ksiz, double num ) ; FUNCTION: bool tchdbsync ( TCHDB* hdb ) ; FUNCTION: bool tchdboptimize ( TCHDB* hdb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tchdbvanish ( TCHDB* hdb ) ; -FUNCTION: bool tchdbcopy ( TCHDB* hdb, char* path ) ; +FUNCTION: bool tchdbcopy ( TCHDB* hdb, c-string path ) ; FUNCTION: bool tchdbtranbegin ( TCHDB* hdb ) ; FUNCTION: bool tchdbtrancommit ( TCHDB* hdb ) ; FUNCTION: bool tchdbtranabort ( TCHDB* hdb ) ; -FUNCTION: char* tchdbpath ( TCHDB* hdb ) ; +FUNCTION: c-string tchdbpath ( TCHDB* hdb ) ; FUNCTION: ulonglong tchdbrnum ( TCHDB* hdb ) ; FUNCTION: ulonglong tchdbfsiz ( TCHDB* hdb ) ; ! -------- -FUNCTION: void tchdbsetecode ( TCHDB* hdb, int ecode, char* filename, int line, char* func ) ; +FUNCTION: void tchdbsetecode ( TCHDB* hdb, int ecode, c-string filename, int line, c-string func ) ; FUNCTION: void tchdbsettype ( TCHDB* hdb, uchar type ) ; FUNCTION: void tchdbsetdbgfd ( TCHDB* hdb, int fd ) ; FUNCTION: int tchdbdbgfd ( TCHDB* hdb ) ; @@ -89,13 +89,13 @@ FUNCTION: int tchdbomode ( TCHDB* hdb ) ; FUNCTION: uchar tchdbtype ( TCHDB* hdb ) ; FUNCTION: uchar tchdbflags ( TCHDB* hdb ) ; FUNCTION: uchar tchdbopts ( TCHDB* hdb ) ; -FUNCTION: char* tchdbopaque ( TCHDB* hdb ) ; +FUNCTION: c-string tchdbopaque ( TCHDB* hdb ) ; FUNCTION: ulonglong tchdbbnumused ( TCHDB* hdb ) ; FUNCTION: bool tchdbsetcodecfunc ( TCHDB* hdb, TCCODEC enc, void* encop, TCCODEC dec, void* decop ) ; FUNCTION: void tchdbcodecfunc ( TCHDB* hdb, TCCODEC* ep, void* *eop, TCCODEC* dp, void* *dop ) ; FUNCTION: bool tchdbputproc ( TCHDB* hdb, void* kbuf, int ksiz, void* vbuf, int vsiz, TCPDPROC proc, void* op ) ; FUNCTION: void* tchdbgetnext ( TCHDB* hdb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tchdbgetnext2 ( TCHDB* hdb, char* kstr ) ; -FUNCTION: char* tchdbgetnext3 ( TCHDB* hdb, char* kbuf, int ksiz, int* sp, char* *vbp, int* vsp ) ; +FUNCTION: c-string tchdbgetnext2 ( TCHDB* hdb, c-string kstr ) ; +FUNCTION: c-string tchdbgetnext3 ( TCHDB* hdb, c-string kbuf, int ksiz, int* sp, c-string *vbp, int* vsp ) ; FUNCTION: bool tchdbforeach ( TCHDB* hdb, TCITER iter, void* op ) ; FUNCTION: bool tchdbtranvoid ( TCHDB* hdb ) ; diff --git a/extra/tokyo/alien/tcrdb/tcrdb.factor b/extra/tokyo/alien/tcrdb/tcrdb.factor index a6e59dbe03..da4a750444 100644 --- a/extra/tokyo/alien/tcrdb/tcrdb.factor +++ b/extra/tokyo/alien/tcrdb/tcrdb.factor @@ -17,9 +17,9 @@ C-TYPE: TCRDB ! STRUCT: TCRDB ! { mmtx pthread_mutex_t } ! { eckey pthread_key_t } -! { host char* } +! { host c-string } ! { port int } -! { expr char* } +! { expr c-string } ! { fd int } ! { sock TTSOCK* } ! { timeout double } @@ -42,52 +42,52 @@ CONSTANT: RDBXOLCKGLB 2 CONSTANT: RDBROCHKCON 1 CONSTANT: RDBMONOULOG 1 -FUNCTION: char* tcrdberrmsg ( int ecode ) ; +FUNCTION: c-string tcrdberrmsg ( int ecode ) ; FUNCTION: TCRDB* tcrdbnew ( ) ; FUNCTION: void tcrdbdel ( TCRDB* rdb ) ; FUNCTION: int tcrdbecode ( TCRDB* rdb ) ; FUNCTION: bool tcrdbtune ( TCRDB* rdb, double timeout, int opts ) ; -FUNCTION: bool tcrdbopen ( TCRDB* rdb, char* host, int port ) ; -FUNCTION: bool tcrdbopen2 ( TCRDB* rdb, char* expr ) ; +FUNCTION: bool tcrdbopen ( TCRDB* rdb, c-string host, int port ) ; +FUNCTION: bool tcrdbopen2 ( TCRDB* rdb, c-string expr ) ; FUNCTION: bool tcrdbclose ( TCRDB* rdb ) ; FUNCTION: bool tcrdbput ( TCRDB* rdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcrdbput2 ( TCRDB* rdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcrdbput2 ( TCRDB* rdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcrdbputkeep ( TCRDB* rdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcrdbputkeep2 ( TCRDB* rdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcrdbputkeep2 ( TCRDB* rdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcrdbputcat ( TCRDB* rdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcrdbputcat2 ( TCRDB* rdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcrdbputcat2 ( TCRDB* rdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcrdbputshl ( TCRDB* rdb, void* kbuf, int ksiz, void* vbuf, int vsiz, int width ) ; -FUNCTION: bool tcrdbputshl2 ( TCRDB* rdb, char* kstr, char* vstr, int width ) ; +FUNCTION: bool tcrdbputshl2 ( TCRDB* rdb, c-string kstr, c-string vstr, int width ) ; FUNCTION: bool tcrdbputnr ( TCRDB* rdb, void* kbuf, int ksiz, void* vbuf, int vsiz ) ; -FUNCTION: bool tcrdbputnr2 ( TCRDB* rdb, char* kstr, char* vstr ) ; +FUNCTION: bool tcrdbputnr2 ( TCRDB* rdb, c-string kstr, c-string vstr ) ; FUNCTION: bool tcrdbout ( TCRDB* rdb, void* kbuf, int ksiz ) ; -FUNCTION: bool tcrdbout2 ( TCRDB* rdb, char* kstr ) ; +FUNCTION: bool tcrdbout2 ( TCRDB* rdb, c-string kstr ) ; FUNCTION: void* tcrdbget ( TCRDB* rdb, void* kbuf, int ksiz, int* sp ) ; -FUNCTION: char* tcrdbget2 ( TCRDB* rdb, char* kstr ) ; +FUNCTION: c-string tcrdbget2 ( TCRDB* rdb, c-string kstr ) ; FUNCTION: bool tcrdbget3 ( TCRDB* rdb, TCMAP* recs ) ; FUNCTION: int tcrdbvsiz ( TCRDB* rdb, void* kbuf, int ksiz ) ; -FUNCTION: int tcrdbvsiz2 ( TCRDB* rdb, char* kstr ) ; +FUNCTION: int tcrdbvsiz2 ( TCRDB* rdb, c-string kstr ) ; FUNCTION: bool tcrdbiterinit ( TCRDB* rdb ) ; FUNCTION: void* tcrdbiternext ( TCRDB* rdb, int* sp ) ; -FUNCTION: char* tcrdbiternext2 ( TCRDB* rdb ) ; +FUNCTION: c-string tcrdbiternext2 ( TCRDB* rdb ) ; FUNCTION: TCLIST* tcrdbfwmkeys ( TCRDB* rdb, void* pbuf, int psiz, int max ) ; -FUNCTION: TCLIST* tcrdbfwmkeys2 ( TCRDB* rdb, char* pstr, int max ) ; +FUNCTION: TCLIST* tcrdbfwmkeys2 ( TCRDB* rdb, c-string pstr, int max ) ; FUNCTION: int tcrdbaddint ( TCRDB* rdb, void* kbuf, int ksiz, int num ) ; FUNCTION: double tcrdbadddouble ( TCRDB* rdb, void* kbuf, int ksiz, double num ) ; -FUNCTION: void* tcrdbext ( TCRDB* rdb, char* name, int opts, void* kbuf, int ksiz, void* vbuf, int vsiz, int* sp ) ; -FUNCTION: char* tcrdbext2 ( TCRDB* rdb, char* name, int opts, char* kstr, char* vstr ) ; +FUNCTION: void* tcrdbext ( TCRDB* rdb, c-string name, int opts, void* kbuf, int ksiz, void* vbuf, int vsiz, int* sp ) ; +FUNCTION: c-string tcrdbext2 ( TCRDB* rdb, c-string name, int opts, c-string kstr, c-string vstr ) ; FUNCTION: bool tcrdbsync ( TCRDB* rdb ) ; -FUNCTION: bool tcrdboptimize ( TCRDB* rdb, char* params ) ; +FUNCTION: bool tcrdboptimize ( TCRDB* rdb, c-string params ) ; FUNCTION: bool tcrdbvanish ( TCRDB* rdb ) ; -FUNCTION: bool tcrdbcopy ( TCRDB* rdb, char* path ) ; -FUNCTION: bool tcrdbrestore ( TCRDB* rdb, char* path, ulonglong ts, int opts ) ; -FUNCTION: bool tcrdbsetmst ( TCRDB* rdb, char* host, int port, int opts ) ; -FUNCTION: bool tcrdbsetmst2 ( TCRDB* rdb, char* expr, int opts ) ; -FUNCTION: char* tcrdbexpr ( TCRDB* rdb ) ; +FUNCTION: bool tcrdbcopy ( TCRDB* rdb, c-string path ) ; +FUNCTION: bool tcrdbrestore ( TCRDB* rdb, c-string path, ulonglong ts, int opts ) ; +FUNCTION: bool tcrdbsetmst ( TCRDB* rdb, c-string host, int port, int opts ) ; +FUNCTION: bool tcrdbsetmst2 ( TCRDB* rdb, c-string expr, int opts ) ; +FUNCTION: c-string tcrdbexpr ( TCRDB* rdb ) ; FUNCTION: ulonglong tcrdbrnum ( TCRDB* rdb ) ; FUNCTION: ulonglong tcrdbsize ( TCRDB* rdb ) ; -FUNCTION: char* tcrdbstat ( TCRDB* rdb ) ; -FUNCTION: TCLIST* tcrdbmisc ( TCRDB* rdb, char* name, int opts, TCLIST* args ) ; +FUNCTION: c-string tcrdbstat ( TCRDB* rdb ) ; +FUNCTION: TCLIST* tcrdbmisc ( TCRDB* rdb, c-string name, int opts, TCLIST* args ) ; CONSTANT: RDBITLEXICAL TDBITLEXICAL CONSTANT: RDBITDECIMAL TDBITDECIMAL @@ -128,12 +128,12 @@ FUNCTION: bool tcrdbtblputkeep ( TCRDB* rdb, void* pkbuf, int pksiz, TCMAP* cols FUNCTION: bool tcrdbtblputcat ( TCRDB* rdb, void* pkbuf, int pksiz, TCMAP* cols ) ; FUNCTION: bool tcrdbtblout ( TCRDB* rdb, void* pkbuf, int pksiz ) ; FUNCTION: TCMAP* tcrdbtblget ( TCRDB* rdb, void* pkbuf, int pksiz ) ; -FUNCTION: bool tcrdbtblsetindex ( TCRDB* rdb, char* name, int type ) ; +FUNCTION: bool tcrdbtblsetindex ( TCRDB* rdb, c-string name, int type ) ; FUNCTION: longlong tcrdbtblgenuid ( TCRDB* rdb ) ; FUNCTION: RDBQRY* tcrdbqrynew ( TCRDB* rdb ) ; FUNCTION: void tcrdbqrydel ( RDBQRY* qry ) ; -FUNCTION: void tcrdbqryaddcond ( RDBQRY* qry, char* name, int op, char* expr ) ; -FUNCTION: void tcrdbqrysetorder ( RDBQRY* qry, char* name, int type ) ; +FUNCTION: void tcrdbqryaddcond ( RDBQRY* qry, c-string name, int op, c-string expr ) ; +FUNCTION: void tcrdbqrysetorder ( RDBQRY* qry, c-string name, int type ) ; FUNCTION: void tcrdbqrysetlimit ( RDBQRY* qry, int max, int skip ) ; FUNCTION: TCLIST* tcrdbqrysearch ( RDBQRY* qry ) ; FUNCTION: bool tcrdbqrysearchout ( RDBQRY* qry ) ; diff --git a/extra/tokyo/alien/tctdb/tctdb.factor b/extra/tokyo/alien/tctdb/tctdb.factor index 9e8071d0df..82100e23c8 100644 --- a/extra/tokyo/alien/tctdb/tctdb.factor +++ b/extra/tokyo/alien/tctdb/tctdb.factor @@ -71,7 +71,7 @@ CONSTANT: TDBQPSTOP 16777216 ! int (*)(const void *pkbuf, int pksiz, TCMAP *cols, void *op); TYPEDEF: void* TDBQRYPROC -FUNCTION: char* tctdberrmsg ( int ecode ) ; +FUNCTION: c-string tctdberrmsg ( int ecode ) ; FUNCTION: TCTDB* tctdbnew ( ) ; FUNCTION: void tctdbdel ( TCTDB* tdb ) ; FUNCTION: int tctdbecode ( TCTDB* tdb ) ; @@ -79,56 +79,56 @@ FUNCTION: bool tctdbsetmutex ( TCTDB* tdb ) ; FUNCTION: bool tctdbtune ( TCTDB* tdb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tctdbsetcache ( TCTDB* tdb, int rcnum, int lcnum, int ncnum ) ; FUNCTION: bool tctdbsetxmsiz ( TCTDB* tdb, longlong xmsiz ) ; -FUNCTION: bool tctdbopen ( TCTDB* tdb, char* path, int omode ) ; +FUNCTION: bool tctdbopen ( TCTDB* tdb, c-string path, int omode ) ; FUNCTION: bool tctdbclose ( TCTDB* tdb ) ; FUNCTION: bool tctdbput ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ; FUNCTION: bool tctdbput2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ; -FUNCTION: bool tctdbput3 ( TCTDB* tdb, char* pkstr, char* cstr ) ; +FUNCTION: bool tctdbput3 ( TCTDB* tdb, c-string pkstr, c-string cstr ) ; FUNCTION: bool tctdbputkeep ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ; FUNCTION: bool tctdbputkeep2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ; -FUNCTION: bool tctdbputkeep3 ( TCTDB* tdb, char* pkstr, char* cstr ) ; +FUNCTION: bool tctdbputkeep3 ( TCTDB* tdb, c-string pkstr, c-string cstr ) ; FUNCTION: bool tctdbputcat ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ; FUNCTION: bool tctdbputcat2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ; -FUNCTION: bool tctdbputcat3 ( TCTDB* tdb, char* pkstr, char* cstr ) ; +FUNCTION: bool tctdbputcat3 ( TCTDB* tdb, c-string pkstr, c-string cstr ) ; FUNCTION: bool tctdbout ( TCTDB* tdb, void* pkbuf, int pksiz ) ; -FUNCTION: bool tctdbout2 ( TCTDB* tdb, char* pkstr ) ; +FUNCTION: bool tctdbout2 ( TCTDB* tdb, c-string pkstr ) ; FUNCTION: TCMAP* tctdbget ( TCTDB* tdb, void* pkbuf, int pksiz ) ; -FUNCTION: char* tctdbget2 ( TCTDB* tdb, void* pkbuf, int pksiz, int* sp ) ; -FUNCTION: char* tctdbget3 ( TCTDB* tdb, char* pkstr ) ; +FUNCTION: c-string tctdbget2 ( TCTDB* tdb, void* pkbuf, int pksiz, int* sp ) ; +FUNCTION: c-string tctdbget3 ( TCTDB* tdb, c-string pkstr ) ; FUNCTION: int tctdbvsiz ( TCTDB* tdb, void* pkbuf, int pksiz ) ; -FUNCTION: int tctdbvsiz2 ( TCTDB* tdb, char* pkstr ) ; +FUNCTION: int tctdbvsiz2 ( TCTDB* tdb, c-string pkstr ) ; FUNCTION: bool tctdbiterinit ( TCTDB* tdb ) ; FUNCTION: void* tctdbiternext ( TCTDB* tdb, int* sp ) ; -FUNCTION: char* tctdbiternext2 ( TCTDB* tdb ) ; +FUNCTION: c-string tctdbiternext2 ( TCTDB* tdb ) ; FUNCTION: TCLIST* tctdbfwmkeys ( TCTDB* tdb, void* pbuf, int psiz, int max ) ; -FUNCTION: TCLIST* tctdbfwmkeys2 ( TCTDB* tdb, char* pstr, int max ) ; +FUNCTION: TCLIST* tctdbfwmkeys2 ( TCTDB* tdb, c-string pstr, int max ) ; FUNCTION: int tctdbaddint ( TCTDB* tdb, void* pkbuf, int pksiz, int num ) ; FUNCTION: double tctdbadddouble ( TCTDB* tdb, void* pkbuf, int pksiz, double num ) ; FUNCTION: bool tctdbsync ( TCTDB* tdb ) ; FUNCTION: bool tctdboptimize ( TCTDB* tdb, longlong bnum, char apow, char fpow, uchar opts ) ; FUNCTION: bool tctdbvanish ( TCTDB* tdb ) ; -FUNCTION: bool tctdbcopy ( TCTDB* tdb, char* path ) ; +FUNCTION: bool tctdbcopy ( TCTDB* tdb, c-string path ) ; FUNCTION: bool tctdbtranbegin ( TCTDB* tdb ) ; FUNCTION: bool tctdbtrancommit ( TCTDB* tdb ) ; FUNCTION: bool tctdbtranabort ( TCTDB* tdb ) ; -FUNCTION: char* tctdbpath ( TCTDB* tdb ) ; +FUNCTION: c-string tctdbpath ( TCTDB* tdb ) ; FUNCTION: ulonglong tctdbrnum ( TCTDB* tdb ) ; FUNCTION: ulonglong tctdbfsiz ( TCTDB* tdb ) ; -FUNCTION: bool tctdbsetindex ( TCTDB* tdb, char* name, int type ) ; +FUNCTION: bool tctdbsetindex ( TCTDB* tdb, c-string name, int type ) ; FUNCTION: longlong tctdbgenuid ( TCTDB* tdb ) ; FUNCTION: TDBQRY* tctdbqrynew ( TCTDB* tdb ) ; FUNCTION: void tctdbqrydel ( TDBQRY* qry ) ; -FUNCTION: void tctdbqryaddcond ( TDBQRY* qry, char* name, int op, char* expr ) ; -FUNCTION: void tctdbqrysetorder ( TDBQRY* qry, char* name, int type ) ; +FUNCTION: void tctdbqryaddcond ( TDBQRY* qry, c-string name, int op, c-string expr ) ; +FUNCTION: void tctdbqrysetorder ( TDBQRY* qry, c-string name, int type ) ; FUNCTION: void tctdbqrysetlimit ( TDBQRY* qry, int max, int skip ) ; FUNCTION: TCLIST* tctdbqrysearch ( TDBQRY* qry ) ; FUNCTION: bool tctdbqrysearchout ( TDBQRY* qry ) ; FUNCTION: bool tctdbqryproc ( TDBQRY* qry, TDBQRYPROC proc, void* op ) ; -FUNCTION: char* tctdbqryhint ( TDBQRY* qry ) ; +FUNCTION: c-string tctdbqryhint ( TDBQRY* qry ) ; ! ======= -FUNCTION: void tctdbsetecode ( TCTDB* tdb, int ecode, char* filename, int line, char* func ) ; +FUNCTION: void tctdbsetecode ( TCTDB* tdb, int ecode, c-string filename, int line, c-string func ) ; FUNCTION: void tctdbsetdbgfd ( TCTDB* tdb, int fd ) ; FUNCTION: int tctdbdbgfd ( TCTDB* tdb ) ; FUNCTION: bool tctdbhasmutex ( TCTDB* tdb ) ; @@ -140,7 +140,7 @@ FUNCTION: ulonglong tctdbinode ( TCTDB* tdb ) ; FUNCTION: tokyo_time_t tctdbmtime ( TCTDB* tdb ) ; FUNCTION: uchar tctdbflags ( TCTDB* tdb ) ; FUNCTION: uchar tctdbopts ( TCTDB* tdb ) ; -FUNCTION: char* tctdbopaque ( TCTDB* tdb ) ; +FUNCTION: c-string tctdbopaque ( TCTDB* tdb ) ; FUNCTION: ulonglong tctdbbnumused ( TCTDB* tdb ) ; FUNCTION: int tctdbinum ( TCTDB* tdb ) ; FUNCTION: longlong tctdbuidseed ( TCTDB* tdb ) ; @@ -150,7 +150,7 @@ FUNCTION: bool tctdbputproc ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, in FUNCTION: bool tctdbforeach ( TCTDB* tdb, TCITER iter, void* op ) ; FUNCTION: bool tctdbqryproc2 ( TDBQRY* qry, TDBQRYPROC proc, void* op ) ; FUNCTION: bool tctdbqrysearchout2 ( TDBQRY* qry ) ; -FUNCTION: int tctdbstrtoindextype ( char* str ) ; +FUNCTION: int tctdbstrtoindextype ( c-string str ) ; FUNCTION: int tctdbqrycount ( TDBQRY* qry ) ; -FUNCTION: int tctdbqrystrtocondop ( char* str ) ; -FUNCTION: int tctdbqrystrtoordertype ( char* str ) ; +FUNCTION: int tctdbqrystrtocondop ( c-string str ) ; +FUNCTION: int tctdbqrystrtoordertype ( c-string str ) ; diff --git a/extra/tokyo/alien/tcutil/tcutil.factor b/extra/tokyo/alien/tcutil/tcutil.factor index 7cb6c5e092..afb78dba22 100644 --- a/extra/tokyo/alien/tcutil/tcutil.factor +++ b/extra/tokyo/alien/tcutil/tcutil.factor @@ -28,9 +28,9 @@ FUNCTION: TCLIST* tclistnew2 ( int anum ) ; FUNCTION: void tclistdel ( TCLIST* list ) ; FUNCTION: int tclistnum ( TCLIST* list ) ; FUNCTION: void* tclistval ( TCLIST* list, int index, int* sp ) ; -FUNCTION: char* tclistval2 ( TCLIST* list, int index ) ; +FUNCTION: c-string tclistval2 ( TCLIST* list, int index ) ; FUNCTION: void tclistpush ( TCLIST* list, void* ptr, int size ) ; -FUNCTION: void tclistpush2 ( TCLIST* list, char* str ) ; +FUNCTION: void tclistpush2 ( TCLIST* list, c-string str ) ; FUNCTION: void tcfree ( void* ptr ) ; TYPEDEF: void* TCCMP