c_create/3
Module: builtins
c_create/3 — equivalent to c_alloc/2 plus c_set/3
c_create_abs/3 — equivalent to c_alloc_abs/2 plus c_set/3
c_createn/4 — allocate and initialize an array of data values in a UIA
c_createn_abs/4 — allocate and initialize an array of data values in a C area
c_create_arglist/[2,3] — create an initialized ARGLIST structure for X Toolkit
c_free_arglist/1 — perform c_free_abs on each item of PtrList
c_call/3 — calls a C function
FORMS
c_create(Type, Val, UIA)
c_create_abs(Type, Val, Ptr)
c_createn(Type, Num,[ Val,...], UIA)
c_createn_abs(Type, Num,[ Val,...], Ptr)
c_create_arglist([Name, Val,...], Ptr)
c_free_arglist(PtrList)
c_call(CFuncPtr, Arglist, RetVal)
DESCRIPTION
c_create(Type, Val, UIA)
c_create(SType,[ FieldName, Val,...], UIA) equivalent to c_alloc/2 plus c_set/3. Type can be an integral type or 'str'. SType must be a structure type.
c_create_abs(Type, Val, Ptr)
c_create_abs(SType,[ FieldName, Val,...], Ptr) equivalent to c_alloc_abs/2 plus c_set/3. Type can be an integral type or 'str'. SType must be a structure type.
c_createn(Type, Num,[ Val,...], UIA)
c_createn( SType, Num,[[ FieldName, Val,...], ...], UIA) allocate and initialize an array of data values in a UIA. equivalent to c_allocn/3 plus several c_setn/4.
c_createn_abs(Type, Num,[ Val,...], Ptr)
c_createn_abs( SType, Num,[[ FieldName, Val,...], ...], Ptr) same as c_createn/4, except that the data is created in a C malloced area.
c_create_arglist([Name, Val,...], Ptr)
c_create_arglist([Name, Val,...], Ptr, PtrList) create an initialized ARGLIST structure for X Toolkit and return a pointer to the arg structure in Ptr and a list of pointers that can be freed using c_free_arglist/1.
c_free_arglist(PtrList) performs c_free_abs on each item of PtrList.
c_call(CFuncPtr, Arglist, RetVal) calls the C function whose address is CFuncPtr with arguments from Arglist that are assumed to be longs and binds RetVal with the return value of function.
NOTES
Implemented in ~builtins/cutils.pro over the predicates in ‘$c_malloc’/2.