![]() |
DDraceNetwork Documentation
|
Classes | |
| class | CCmdlineFix |
Functions | |
| void | cmdline_fix (int *argc, const char ***argv) |
| void | cmdline_free (int argc, const char **argv) |
| int | os_open_link (const char *link) |
| int | os_open_file (const char *path) |
| bool | os_version_str (char *version, size_t length) |
| void | os_locale_str (char *locale, size_t length) |
OS specific functionality.
| void cmdline_fix | ( | int * | argc, |
| const char *** | argv ) |
Fixes the command line arguments to be encoded in UTF-8 on all systems.
| argc | A pointer to the argc parameter that was passed to the main function. |
| argv | A pointer to the argv parameter that was passed to the main function. |
| void cmdline_free | ( | int | argc, |
| const char ** | argv ) |
Frees memory that was allocated by cmdline_fix.
| argc | The argc obtained from cmdline_fix. |
| argv | The argv obtained from cmdline_fix. |
| void os_locale_str | ( | char * | locale, |
| size_t | length ) |
Returns a string of the preferred locale of the user / operating system. The string conforms to RFC 3066 and only contains the characters a-z, A-Z, 0-9 and -. If the preferred locale could not be determined this function falls back to the locale "en-US".
| locale | Buffer to use for the output. |
| length | Length of the output buffer. |
| int os_open_file | ( | const char * | path | ) |
Opens a file or directory with the default program.
| path | The file or folder to open with the default program. |
| int os_open_link | ( | const char * | link | ) |
Opens a link in the browser.
| link | The link to open in a browser. |
| bool os_version_str | ( | char * | version, |
| size_t | length ) |
Returns a human-readable version string of the operating system.
| version | Buffer to use for the output. |
| length | Length of the output buffer. |