CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
entry.h
1#pragma once
2
3// Platform-independent entry point
4
5#include <cx/cx.h>
6#include <cx/platform/base.h>
8
9// Command-line arguments (UTF-8)
10extern string cmdProgram;
11extern sa_string cmdArgs;
12
13// DEFINE_ENTRY_POINT
14// Put this macro in a translation unit somewhere to define the platform
15// dependent entry point, which will parse the command-line arguments and
16// call entryPoint()
17
18// User-supplied function that is called by DEFINE_ENTRY_POINT
19int entryPoint();
20
21// Internal support functions, do not call these directly
22void _entryParseArgs(int argc, const char **argv);
23void _entryParseArgsU16(int argc, const uint16 **argv);
24
25#if defined(_PLATFORM_WIN)
26#include "cx/platform/win/win_sys_entry.h"
27#elif defined(_PLATFORM_UNIX)
28#include "cx/platform/unix/unix_sys_entry.h"
29#elif defined (_PLATFORM_WASM)
30#include "cx/platform/wasm/wasm_sys_entry.h"
31#endif
Compiler and platform detection macros.
Dynamic arrays with type-safe generic programming.