FMI Library: part of JModelica.org
|
Typedefs | |
typedef void * | jm_dll_function_ptr |
A function pointer as returned when DLL symbol is loaded. More... | |
Functions | |
DLL_HANDLE | jm_portability_load_dll_handle (const char *dll_file_path) |
Load a dll/so library into the process and return a handle. More... | |
jm_status_enu_t | jm_portability_free_dll_handle (DLL_HANDLE dll_handle) |
Unload a Dll and release the handle. More... | |
jm_status_enu_t | jm_portability_load_dll_function (DLL_HANDLE dll_handle, char *dll_function_name, jm_dll_function_ptr *dll_function_ptrptr) |
Find a function in the Dll and return a function pointer. More... | |
char * | jm_portability_get_last_dll_error (void) |
Return error associated with Dll handling. More... | |
jm_status_enu_t | jm_portability_get_current_working_directory (char *buffer, size_t len) |
Get current working directory name. More... | |
jm_status_enu_t | jm_portability_set_current_working_directory (const char *cwd) |
Set current working directory. More... | |
const char * | jm_get_system_temp_dir () |
Get system-wide temporary directory. More... | |
char * | jm_mkdtemp (jm_callbacks *cb, char *tmplt) |
Create a uniquely named temporary directory. More... | |
char * | jm_get_dir_abspath (jm_callbacks *cb, const char *dir, char *outPath, size_t len) |
Get absolute path to an existing directory. More... | |
char * | jm_mk_temp_dir (jm_callbacks *cb, const char *systemTempDir, const char *tempPrefix) |
Create a unique temporary directory. More... | |
char * | jm_create_URL_from_abs_path (jm_callbacks *cb, const char *absPath) |
Create a file:// URL from absolute path. More... | |
jm_status_enu_t | jm_mkdir (jm_callbacks *cb, const char *dir) |
Make a directory. More... | |
jm_status_enu_t | jm_rmdir (jm_callbacks *cb, const char *dir) |
Remove directory and all it contents. More... | |
FMILIB_EXPORT int | jm_vsnprintf (char *str, size_t size, const char *fmt, va_list al) |
C89 compatible implementation of C99 vsnprintf. More... | |
FMILIB_EXPORT int | jm_snprintf (char *str, size_t size, const char *fmt,...) |
C89 compatible implementation of C99 snprintf. More... | |
typedef void* jm_dll_function_ptr |
A function pointer as returned when DLL symbol is loaded.
Definition at line 52 of file jm_portability.h.
DLL_HANDLE jm_portability_load_dll_handle | ( | const char * | dll_file_path | ) |
Load a dll/so library into the process and return a handle.
jm_status_enu_t jm_portability_free_dll_handle | ( | DLL_HANDLE | dll_handle | ) |
Unload a Dll and release the handle.
jm_status_enu_t jm_portability_load_dll_function | ( | DLL_HANDLE | dll_handle, |
char * | dll_function_name, | ||
jm_dll_function_ptr * | dll_function_ptrptr | ||
) |
Find a function in the Dll and return a function pointer.
char* jm_portability_get_last_dll_error | ( | void | ) |
Return error associated with Dll handling.
jm_status_enu_t jm_portability_get_current_working_directory | ( | char * | buffer, |
size_t | len | ||
) |
Get current working directory name.
jm_status_enu_t jm_portability_set_current_working_directory | ( | const char * | cwd | ) |
Set current working directory.
const char* jm_get_system_temp_dir | ( | ) |
Get system-wide temporary directory.
char* jm_mkdtemp | ( | jm_callbacks * | cb, |
char * | tmplt | ||
) |
Create a uniquely named temporary directory.
cb | - callbacks for memory allocation and logging. Default callbacks are used if this parameter is NULL. |
tmplt | Directory name template ending with XXXXXX. The template is modified by the call. |
char* jm_get_dir_abspath | ( | jm_callbacks * | cb, |
const char * | dir, | ||
char * | outPath, | ||
size_t | len | ||
) |
Get absolute path to an existing directory.
cb | - callbacks for memory allocation and logging. Default callbacks are used if this parameter is NULL. |
dir | - path to a directory (relative or absolute). |
outPath | - buffer for storing the directory |
len | - of the buffer (if size is larger than FILENAME_MAX + 1 then the path will always fit in) |
char* jm_mk_temp_dir | ( | jm_callbacks * | cb, |
const char * | systemTempDir, | ||
const char * | tempPrefix | ||
) |
Create a unique temporary directory.
cb | - callbacks for memory allocation and logging. Default callbacks are used if this parameter is NULL. |
systemTempDir | - directory where the temp dir should be located both absolute and relative path are accepted. System-wide directory is used if this parameter is NULL. |
tempPrefix | - File name template prefix used when creating temporaty directories. "jm" is used if this is NULL. |
char* jm_create_URL_from_abs_path | ( | jm_callbacks * | cb, |
const char * | absPath | ||
) |
Create a file:// URL from absolute path.
cb | - callbacks for memory allocation and logging. Default callbacks are used if this parameter is NULL. |
absPath | - absolute path to be converted into the URL |
jm_status_enu_t jm_mkdir | ( | jm_callbacks * | cb, |
const char * | dir | ||
) |
Make a directory.
jm_status_enu_t jm_rmdir | ( | jm_callbacks * | cb, |
const char * | dir | ||
) |
Remove directory and all it contents.
FMILIB_EXPORT int jm_vsnprintf | ( | char * | str, |
size_t | size, | ||
const char * | fmt, | ||
va_list | al | ||
) |
C89 compatible implementation of C99 vsnprintf.
FMILIB_EXPORT int jm_snprintf | ( | char * | str, |
size_t | size, | ||
const char * | fmt, | ||
... | |||
) |
C89 compatible implementation of C99 snprintf.