|
hoshi-lang dev
Yet another programming language
|

Go to the source code of this file.
Macros | |
| #define | WAI_FUNCSPEC |
| #define | WAI_PREFIX(function) wai_##function |
Functions | |
| WAI_FUNCSPEC int WAI_PREFIX() | getExecutablePath (char *out, int capacity, int *dirname_length) |
| WAI_FUNCSPEC int WAI_PREFIX() | getModulePath (char *out, int capacity, int *dirname_length) |
| #define WAI_FUNCSPEC |
Definition at line 10 of file whereami.h.
| #define WAI_PREFIX | ( | function | ) | wai_##function |
Definition at line 13 of file whereami.h.
| WAI_FUNCSPEC int WAI_PREFIX() getExecutablePath | ( | char * | out, |
| int | capacity, | ||
| int * | dirname_length | ||
| ) |
Returns the path to the current executable.
Usage:
int length = wai_getExecutablePath(NULL, 0, NULL); to retrieve the length of the pathpath = (char*)malloc(length + 1);wai_getExecutablePath(path, length, NULL) again to retrieve the path| out | destination buffer, optional |
| capacity | destination buffer capacity |
| dirname_length | optional recipient for the length of the dirname part of the path. |
-1 | WAI_FUNCSPEC int WAI_PREFIX() getModulePath | ( | char * | out, |
| int | capacity, | ||
| int * | dirname_length | ||
| ) |
Returns the path to the current module
Usage:
int length = wai_getModulePath(NULL, 0, NULL); to retrieve the length of the pathpath = (char*)malloc(length + 1);wai_getModulePath(path, length, NULL) again to retrieve the path| out | destination buffer, optional |
| capacity | destination buffer capacity |
| dirname_length | optional recipient for the length of the dirname part of the path. |
-1