10#ifndef _MACHINESTATE_H_
11#define _MACHINESTATE_H_
16#define EXTRA_BYTES DEF_ALIGN
18typedef void *(*malloc_f)(size_t);
20typedef void *(*free_and_return_f)(
void *);
21typedef void *(*memcpy_f)(
void *,
const void *, size_t);
22typedef int (*
memcmp_f)(
const void *,
const void *, size_t);
23typedef void *(*memset_f)(
void *, int, size_t);
24typedef void *(*memmove_f)(
void *,
const void *, size_t);
25typedef void *(*realloc_f)(
void *, size_t);
26typedef void *(*calloc_f)(size_t, size_t);
27typedef void *(*malloc_and_copy_f)(size_t,
const void *);
46#define lives_malloc malloc
49#define lives_realloc realloc
52#define lives_free free
55#define lives_memcpy memcpy
58#define lives_memcmp memcmp
61#define lives_memset memset
64#define lives_memmove memmove
67#define lives_calloc calloc
73#ifdef _lives_malloc_and_copy
74#undef _lives_malloc_and_copy
98#ifndef USE_STD_MEMFUNCS
102#if defined (HAVE_OPENCV) || defined (HAVE_OPENCV4)
103#ifndef NO_OPENCV_MEMFUNCS
104#define _lives_malloc(sz) alignPtr(sz, DEF_ALIGN);
105#define _lives_free fastFree
106#define _lives_realloc proxy_realloc
113#ifndef NO_ORC_MEMFUNCS
114#define _lives_memcpy lives_orc_memcpy
121#ifndef NO_OIL_MEMFUNCS
122#define _lives_memcpy(dest, src, n) {if (n >= 32 && n <= OIL_MEMCPY_MAX_BYTES) { \
123 oil_memcpy((uint8_t *)dest, (const uint8_t *)src, n); \
132#define __STDC_FORMAT_MACROS
143#define LONGSIZE __WORDSIZE
145#if defined __x86_64__
147#ifndef __WORDSIZE_COMPAT32
148# define __WORDSIZE_COMPAT32 1
161# define __PRI64_PREFIX "l"
163# define __PRI64_PREFIX "ll"
169# define PRId64 __PRI64_PREFIX "d"
170# define PRIu64 __PRI64_PREFIX "u"
193#define WEED_LEAF_MD5SUM "md5sum"
196#define WEED_PLANT_LIVES 31337
198#define WEED_LEAF_LIVES_SUBTYPE "subtype"
199#define WEED_LEAF_LIVES_MESSAGE_STRING "message_string"
201#define LIVES_WEED_SUBTYPE_MESSAGE 1
202#define LIVES_WEED_SUBTYPE_WIDGET 2
203#define LIVES_WEED_SUBTYPE_TUNABLE 3
204#define LIVES_WEED_SUBTYPE_PROC_THREAD 4
222#define OVERRIDE_MEMFUNCS
223static void *(*_lsd_memcpy)(
void *dest,
const void *src,
size_t n) =
_ext_memcpy;
224static void *(*_lsd_memset)(
void *s,
int c,
size_t n) =
_ext_memset;
225static void (*_lsd_free)(
void *ptr) =
rpfree;
226#define OVERRIDE_CALLOC_ALIGNED
227static int _lsd_calloc_aligned_(
void **memptr,
size_t nmemb,
size_t size) {
228 return !memptr ? 0 : (!(*memptr = (
rpaligned_calloc)(64, nmemb, size))) ? ENOMEM : 0;
234#define LSD_RANDFUNC(ptr, size) (lives_get_randbytes((ptr), (size)))
238#undef OVERRIDE_MEMFUNCS
242#define lives_malloc_auto(size) __builtin_alloc(size)
243#define lives_malloc_auto_aligned(size, align) __builtin_alloc_with_align(size, align)
255const char *
lives_strappendf(
const char *
string,
int len,
const char *fmt, ...);
257void swab2(
const void *from,
const void *to,
size_t granularity)
GNU_HOT;
258void swab4(
const void *from,
const void *to,
size_t granularity)
GNU_HOT;
259void swab8(
const void *from,
const void *to,
size_t granularity)
GNU_HOT;
263uint64_t
nxtval(uint64_t val, uint64_t lim,
boolean less);
265void autotune_u64(weed_plant_t *tuner, uint64_t min, uint64_t max,
int ntrials,
double cost);
279void *lives_orc_memcpy(
void *dest,
const void *src,
size_t n);
283void *lives_oil_memcpy(
void *dest,
const void *src,
size_t n);
307#define lives_nanosleep(nanosec) {struct timespec ts; ts.tv_sec = (uint64_t)nanosec / ONE_BILLION; \
308 ts.tv_nsec = (uint64_t)nanosec - ts.tv_sec * ONE_BILLION; while (nanosleep(&ts, &ts) == -1 && \
309 errno != ETIMEDOUT);}
310#define lives_nanosleep_until_nonzero(condition) {while (!(condition)) lives_nanosleep(1000);}
326#define EXTRA_DETAILS_CHECK_MISSING (1ul << 0)
327#define EXTRA_DETAILS_DIRSIZE (1ul << 1)
328#define EXTRA_DETAILS_EMPTY_DIRS (1ul << 2)
329#define EXTRA_DETAILS_SYMLINK (1ul << 3)
330#define EXTRA_DETAILS_ACCESSIBLE (1ul << 4)
331#define EXTRA_DETAILS_WRITEABLE (1ul << 5)
332#define EXTRA_DETAILS_EXECUTABLE (1ul << 6)
333#define EXTRA_DETAILS_CLIPHDR (1ul << 7)
336#define EXTRA_DETAILS_MD5SUM (1ul << 33)
358 LiVESWidget *widgets[16];
363void lives_log(
const char *what);
378typedef void *(*lives_funcptr_t)(
void *);
411#define WEED_LEAF_NOTIFY "notify"
412#define WEED_LEAF_DONE "done"
413#define WEED_LEAF_THREADFUNC "tfunction"
414#define WEED_LEAF_THREAD_PROCESSING "t_processing"
415#define WEED_LEAF_THREAD_CANCELLABLE "t_can_cancel"
416#define WEED_LEAF_THREAD_CANCELLED "t_cancelled"
417#define WEED_LEAF_RETURN_VALUE "return_value"
418#define WEED_LEAF_DONTCARE "dontcare"
419#define WEED_LEAF_DONTCARE_MUTEX "dontcare_mutex"
421#define WEED_LEAF_SIGNALLED "signalled"
422#define WEED_LEAF_SIGNAL_DATA "signal_data"
424#define WEED_LEAF_THREAD_PARAM "thrd_param"
425#define _WEED_LEAF_THREAD_PARAM(n) WEED_LEAF_THREAD_PARAM n
426#define WEED_LEAF_THREAD_PARAM0 _WEED_LEAF_THREAD_PARAM("0")
427#define WEED_LEAF_THREAD_PARAM1 _WEED_LEAF_THREAD_PARAM("1")
428#define WEED_LEAF_THREAD_PARAM2 _WEED_LEAF_THREAD_PARAM("2")
430#define LIVES_THRDFLAG_AUTODELETE (1 << 0)
431#define LIVES_THRDFLAG_TUNING (1 << 1)
432#define LIVES_THRDFLAG_WAIT_SYNC (1 << 2)
437#define LIVES_THRDATTR_NONE 0
438#define LIVES_THRDATTR_AUTODELETE (1 << 0)
439#define LIVES_THRDATTR_PRIORITY (1 << 1)
440#define LIVES_THRDATTR_WAIT_SYNC (1 << 2)
441#define LIVES_THRDATTR_FG_THREAD (1 << 3)
442#define LIVES_THRDATTR_NO_GUI (1 << 4)
451#define _RV_ WEED_LEAF_RETURN_VALUE
458typedef char *(*funcptr_string_t)();
461typedef void *(*funcptr_voidptr_t)();
464#define GETARG(type, n) WEED_LEAF_GET(info, _WEED_LEAF_THREAD_PARAM(n), type)
466#define ARGS1(t1) GETARG(t1, "0")
467#define ARGS2(t1, t2) ARGS1(t1), GETARG(t2, "1")
468#define ARGS3(t1, t2, t3) ARGS2(t1, t2), GETARG(t3, "2")
469#define ARGS4(t1, t2, t3, t4) ARGS3(t1, t2, t3), GETARG(t4, "3")
470#define ARGS5(t1, t2, t3, t4, t5) ARGS4(t1, t2, t3, t4), GETARG(t5, "4")
471#define ARGS6(t1, t2, t3, t4, t5, t6) ARGS5(t1, t2, t3, t4, t5), GETARG(t6, "5")
472#define ARGS7(t1, t2, t3, t4, t5, t6, t7) ARGS6(t1, t2, t3, t4, t5, t6), GETARG(t7, "6")
473#define ARGS8(t1, t2, t3, t4, t5, t6, t7, t8) ARGS7(t1, t2, t3, t4, t5, t6, t7), GETARG(t8, "7")
474#define ARGS9(t1, t2, t3, t4, t5, t6, t7, t8, t9) ARGS8(t1, t2, t3, t4, t5, t6, t7. t8), GETARG(t9, "8")
475#define ARGS10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) ARGS9(t1, t2, t3, t4, t5, t6, t7, t8, t9), GETARG(t10, "9")
477#define CALL_VOID_10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) (*thefunc->func)(ARGS10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10))
478#define CALL_VOID_9(t1, t2, t3, t4, t5, t6, t7, t8, t9) (*thefunc->func)(ARGS9(t1, t2, t3, t4, t5, t6, t7, t8, t9))
479#define CALL_VOID_8(t1, t2, t3, t4, t5, t6, t7, t8) (*thefunc->func)(ARGS8(t1, t2, t3, t4, t5, t6, t7, t8))
480#define CALL_VOID_7(t1, t2, t3, t4, t5, t6, t7) (*thefunc->func)(ARGS7(t1, t2, t3, t4, t5, t6, t7))
481#define CALL_VOID_6(t1, t2, t3, t4, t5, t6) (*thefunc->func)(ARGS6(t1, t2, t3, t4, t5, t6))
482#define CALL_VOID_5(t1, t2, t3, t4, t5) (*thefunc->func)(ARGS5(t1, t2, t3, t4, t5))
483#define CALL_VOID_4(t1, t2, t3, t4) (*thefunc->func)(ARGS4(t1, t2, t3, t4))
484#define CALL_VOID_3(t1, t2, t3) (*thefunc->func)(ARGS3(t1, t2, t3))
485#define CALL_VOID_2(t1, t2) (*thefunc->func)(ARGS2(t1, t2))
486#define CALL_VOID_1(t1) (*thefunc->func)(ARGS1(t1))
487#define CALL_VOID_0() (*thefunc->func)()
489#define CALL_10(ret, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) weed_set_##ret##_value(info, _RV_, \
490 (*thefunc->func##ret)(ARGS10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t19)))
491#define CALL_9(ret, t1, t2, t3, t4, t5, t6, t7, t8, t9) weed_set_##ret##_value(info, _RV_, \
492 (*thefunc->func##ret)(ARGS9(t1, t2, t3, t4, t5, t6, t7, t8, t9)))
493#define CALL_8(ret, t1, t2, t3, t4, t5, t6, t7, t8) weed_set_##ret##_value(info, _RV_, \
494 (*thefunc->func##ret)(ARGS8(t1, t2, t3, t4, t5, t6, t7, t7)))
495#define CALL_7(ret, t1, t2, t3, t4, t5, t6, t7) weed_set_##ret##_value(info, _RV_, \
496 (*thefunc->func##ret)(ARGS7(t1, t2, t3, t4, t5, t6, t7)))
497#define CALL_6(ret, t1, t2, t3, t4, t5, t6) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS6(t1, t2, t3, t4, t5, t6)))
498#define CALL_5(ret, t1, t2, t3, t4, t5) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS5(t1, t2, t3, t4, t5)))
499#define CALL_4(ret, t1, t2, t3, t4) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS4(t1, t2, t3, t4)))
500#define CALL_3(ret, t1, t2, t3) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS3(t1, t2, t3)))
501#define CALL_2(ret, t1, t2) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS2(t1, t2)))
502#define CALL_1(ret, t1) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)(ARGS1(t1)))
503#define CALL_0(ret) weed_set_##ret##_value(info, _RV_, (*thefunc->func##ret)())
531#define THREADVAR(var) (get_threadvars()->var_##var)
565 const char *orig_loc, uint64_t extra);
567 const char *orig_loc, uint64_t extra);
570char *
grep_in_cmd(
const char *cmd,
int mstart,
int npieces,
const char *mphrase,
int ridx,
int rlen);
583#define WM_XFWM4 "Xfwm4"
584#define WM_XFCE4_PANEL "xfce4-panel"
585#define WM_XFCE4_SSAVE "xfce4-ssave"
586#define WM_XFCE4_COLOR "xfce4-color-settings"
587#define WM_XFCE4_DISP "xfce4-display-settings"
588#define WM_XFCE4_POW "xfce4-power-manager-settings"
589#define WM_XFCE4_SETTINGS "xfce4-settings-manager"
590#define WM_XFCE4_TERMINAL "xfce4-terminal"
591#define WM_XFCE4_TASKMGR "xfce4-taskmanager"
592#define WM_XFCE4_SSHOT "xfce4-screenshooter"
594#define WM_KWIN "KWin"
595#define WM_KWIN_PANEL ""
596#define WM_KWIN_SSAVE ""
597#define WM_KWIN_COLOR ""
598#define WM_KWIN_DISP ""
599#define WM_KWIN_POW ""
600#define WM_KWIN_SETTINGS "systemseettings5"
601#define WM_KWIN_TERMINAL "Konsole"
602#define WM_KWIN_TASKMGR "systemmonitor"
603#define WM_KWIN_SSHOT ""
605#define XDG_CURRENT_DESKTOP "XDG_CURRENT_DESKTOP"
606#define XDG_SESSION_TYPE "XDG_SESSION_TYPE"
615char *
get_systmp(
const char *suff,
boolean is_dir);
weed_plantptr_t lives_proc_thread_t
lives proc_threads API
weed_plant_t * lives_plant_new(int subtype)
void * quick_calloc(size_t n, size_t s)
int get_window_stack_level(LiVESXWindow *, int *nwins)
weed_plantptr_t lives_proc_thread_join_plantptr(lives_proc_thread_t)
boolean show_desktop_panel(void)
uint32_t fastrand_int(uint32_t range)
pick a pseudo random uint between 0 and range (inclusive)
boolean lives_proc_thread_cancel(lives_proc_thread_t)
lives_proc_thread_t dir_to_file_details(LiVESList **, const char *dir, const char *orig_loc, uint64_t extra)
create a list from a (sub)directory '.
char * lives_datetime(uint64_t secs, boolean use_local)
boolean hide_desktop_panel(void)
boolean get_x11_visible(const char *wname)
void lives_srandom(unsigned int seed)
boolean get_distro_dets(void)
boolean reverse_buffer(uint8_t *buff, size_t count, size_t chunk) GNU_HOT
char * get_md5sum(const char *filename)
size_t lives_strlen(const char *) GNU_HOT GNU_PURE
void swab2(const void *from, const void *to, size_t granularity) GNU_HOT
off_t get_dir_size(const char *dirname)
weed_plantptr_t lives_proc_thread_t
boolean unhide_x11_window(const char *wid)
char * get_worktmpfile(const char *prefix)
uint32_t fast_hash(const char *key) GNU_PURE GNU_HOT
void lives_proc_thread_join(lives_proc_thread_t)
char * get_mountpoint_for(const char *dir)
lives_thread_data_t * lives_thread_data_create(uint64_t idx)
uint64_t get_ds_free(const char *dir)
boolean activate_x11_window(const char *wid)
weed_funcptr_t lives_proc_thread_join_funcptr(lives_proc_thread_t)
off_t get_file_size(int fd)
boolean lives_proc_thread_dontcare(lives_proc_thread_t)
tell a threead with return value that we no longer need the value so it can free itself
void _ext_unmalloc_and_copy(size_t, void *)
lives_proc_thread_t disk_monitor_start(const char *dir)
weed_plant_t(* funcptr_plantptr_t)()
weed_plant_t * lives_plant_new_with_index(int subtype, int64_t index)
lives_storage_status_t
disk/storage status values
@ LIVES_STORAGE_STATUS_CRITICAL
@ LIVES_STORAGE_STATUS_NORMAL
@ LIVES_STORAGE_STATUS_WARNING
@ LIVES_STORAGE_STATUS_OFFLINE
@ LIVES_STORAGE_STATUS_UNKNOWN
@ LIVES_STORAGE_STATUS_OVER_QUOTA
@ LIVES_STORAGE_STATUS_OVERFLOW
boolean init_memfuncs(void)
void fastrand_add(uint64_t entropy)
void * _ext_memset(void *, int, size_t)
off_t sget_file_size(const char *name)
double lives_proc_thread_join_double(lives_proc_thread_t)
void * lives_free_and_return(void *p)
TODO: this file should be split into at least: memory functions, thread functions,...
void(* unmalloc_and_copy_f)(size_t, void *)
boolean lives_strncmp(const char *, const char *, size_t) GNU_HOT GNU_PURE
returns FALSE if strings match
void swab8(const void *from, const void *to, size_t granularity) GNU_HOT
boolean lives_proc_thread_check(lives_proc_thread_t)
returns FALSE while the thread is running, TRUE once it has finished
void lives_free_check(void *p)
void * proxy_realloc(void *ptr, size_t new_size)
boolean lives_strcmp(const char *, const char *) GNU_HOT GNU_PURE
returns FALSE if strings match
weed_funcptr_t(* funcptr_funcptr_t)()
uint64_t lives_random(void)
void lives_proc_thread_free(lives_proc_thread_t lpt)
void autotune_u64(weed_plant_t *tuner, uint64_t min, uint64_t max, int ntrials, double cost)
ticks_t lives_get_current_ticks(void)
LiVESResponseType send_to_trash(const char *item)
int lives_proc_thread_signalled(lives_proc_thread_t tinfo)
void * fg_run_func(lives_proc_thread_t lpt, void *retval)
void lives_threadpool_init(void)
char * lives_proc_thread_join_string(lives_proc_thread_t)
boolean lives_proc_thread_cancelled(lives_proc_thread_t)
char * lives_chomp(char *string)
void disk_monitor_forget(void)
lives_thread_data_t * get_thread_data(void)
int64_t disk_monitor_wait_result(const char *dir, ticks_t timeout)
void * _ext_calloc(size_t, size_t) GNU_MALLOC_SIZE2(1
lives_threadvars_t * get_threadvars(void)
lives_proc_thread_t lives_proc_thread_create(lives_thread_attr_t, lives_funcptr_t, int return_type, const char *args_fmt,...)
create the specific plant which defines a background task to be run
int lives_proc_thread_join_int(lives_proc_thread_t)
ticks_t lives_get_relative_ticks(ticks_t origsecs, ticks_t orignsecs)
char *(* funcptr_string_t)()
char * lives_strstop(char *, const char term) GNU_HOT
void * _ext_malloc(size_t n) GNU_MALLOC
void update_effort(int nthings, boolean badthings)
boolean disk_monitor_running(const char *dir)
char * lives_strtrim(const char *buff)
const char * lives_strappendf(const char *string, int len, const char *fmt,...)
int lives_strappend(const char *string, int len, const char *xnew)
boolean lives_proc_thread_get_cancellable(lives_proc_thread_t)
int64_t lives_proc_thread_join_int64(lives_proc_thread_t)
boolean get_machine_dets(void)
int64_t disk_monitor_check_result(const char *dir)
boolean hide_x11_window(const char *wid)
boolean compress_files_in_dir(const char *dir, int method, void *data)
double get_disk_load(const char *mp)
char * lives_strdup_quick(const char *s)
uint64_t nxtval(uint64_t val, uint64_t lim, boolean less)
void * _ext_realloc(void *, size_t) GNU_MALLOC_SIZE(2)
boolean check_snap(const char *prog)
uint32_t lives_string_hash(const char *string) GNU_PURE GNU_HOT
int lives_proc_thread_join_boolean(lives_proc_thread_t)
char * lives_concat(char *, char *) GNU_HOT
uint64_t lives_thread_attr_t
void lives_threadpool_finish(void)
double fastrand_dbl(double range)
char * get_wid_for_name(const char *wname)
x11
char * lives_format_storage_space_string(uint64_t space)
char * lives_concat_sep(char *st, const char *sep, char *x)
uint64_t autotune_u64_end(weed_plant_t **tuner, uint64_t val)
void lives_proc_thread_set_cancellable(lives_proc_thread_t)
only threads with no return value can possibly be cancellable. For threads with a value,...
uint64_t gen_unique_id(void)
off_t reget_afilesize_inner(int fileno)
void * _ext_memmove(void *, const void *, size_t)
void * lives_recalloc(void *p, size_t nmemb, size_t omemb, size_t xsize) GNU_ALIGNED(DEF_ALIGN)
void * lives_calloc_safety(size_t nmemb, size_t xsize) GNU_ALIGNED(DEF_ALIGN)
double(* funcptr_dbl_t)()
size_t get_max_align(size_t req_size, size_t align_max)
uint64_t fastrand(void) GNU_HOT
void reverse_bytes(char *buff, size_t count, size_t granularity) GNU_HOT GNU_FLATTEN
char * get_worktmp(const char *prefix)
void lives_proc_thread_sync_ready(lives_proc_thread_t)
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, int64_t *dsval, int64_t resvd)
int64_t get_cpu_load(int cpun)
percent * 1 million
void * _ext_malloc_and_copy(size_t, const void *) GNU_MALLOC_SIZE(1)
void *(* funcptr_voidptr_t)()
void free_fdets_list(LiVESList **)
void * _ext_free_and_return(void *)
void * main_thread_execute(lives_funcptr_t func, int return_type, void *retval, const char *args_fmt,...)
uint64_t lives_thread_join(lives_thread_t work, void **retval)
int64_t lives_proc_thread_signalled_idx(lives_proc_thread_t tinfo)
boolean get_wm_caps(void)
int check_dev_busy(char *devstr)
void *(* lives_funcptr_t)(void *)
int check_for_bad_ffmpeg(void)
int lives_strcmp_ordered(const char *, const char *) GNU_HOT GNU_PURE
void swab4(const void *from, const void *to, size_t granularity) GNU_HOT
void * lives_proc_thread_join_voidptr(lives_proc_thread_t)
int lives_thread_create(lives_thread_t *thread, lives_thread_attr_t attr, lives_funcptr_t func, void *arg)
char * get_systmp(const char *suff, boolean is_dir)
int(* memcmp_f)(const void *, const void *, size_t)
void lives_get_randbytes(void *ptr, size_t size)
char * lives_datetime_rel(const char *datetime)
void * _ext_memcpy(void *, const void *, size_t)
void resubmit_proc_thread(lives_proc_thread_t, lives_thread_attr_t)
(re)submission point, the function call is added to the threadpool tasklist if we have sufficient thr...
void reget_afilesize(int fileno)
int64_t(* funcptr_int64_t)()
lives_proc_thread_t ordfile_to_file_details(LiVESList **listp, const char *ofname, const char *orig_loc, uint64_t extra)
char * grep_in_cmd(const char *cmd, int mstart, int npieces, const char *mphrase, int ridx, int rlen)
#define GNU_MALLOC_SIZE(x)
#define GNU_MALLOC_SIZE2(x, y)
void rpfree(void *ptr)
Free the given memory block.
RPMALLOC_ALLOCATOR void * rpaligned_calloc(size_t alignment, size_t num, size_t size)
uint64_t uniq
< if we can retrieve some kind of uinque id, we set it here may be useful in future for dictionary lo...
char * extra_details
only filled if EXTRA_DETAILS_MD5 is set, otherwis NULL
uint64_t gid
userid as uint64_t
off_t size
e.g. LIVES_FILE_TYPE_FILE
int var_rowstride_alignment_hint
lives_thread_data_t * var_mydata
int var_rowstride_alignment
lives_proc_thread_t var_tinfo
volatile boolean sync_ready
funcptr_int64_t funcint64
funcptr_string_t funcstring
funcptr_bool_t funcboolean
funcptr_voidptr_t funcvoidptr
funcptr_funcptr_t funcfuncptr
funcptr_plantptr_t funcplantptr