Compare commits
2 Commits
v2.2.0
..
f599b5f425
| Author | SHA1 | Date | |
|---|---|---|---|
| f599b5f425 | |||
| 0063bb8641 |
@@ -121,13 +121,17 @@ help:
|
|||||||
@$(ECHO_E) " $(GREEN)make help$(RESET) Print this help message and exit."
|
@$(ECHO_E) " $(GREEN)make help$(RESET) Print this help message and exit."
|
||||||
|
|
||||||
full: LIB_SRC = src/wapp.c
|
full: LIB_SRC = src/wapp.c
|
||||||
full: INCLUDES = common os base prng testing uuid
|
full: INCLUDES = common os base log prng testing uuid
|
||||||
full: install
|
full: install
|
||||||
|
|
||||||
base: LIB_SRC = src/base/wapp_base.c
|
base: LIB_SRC = src/base/wapp_base.c
|
||||||
base: INCLUDES = common base
|
base: INCLUDES = common base
|
||||||
base: install
|
base: install
|
||||||
|
|
||||||
|
log: LIB_SRC = src/log/wapp_log.c
|
||||||
|
log: INCLUDES = common os base log
|
||||||
|
log: install
|
||||||
|
|
||||||
os: LIB_SRC = src/os/wapp_os.c
|
os: LIB_SRC = src/os/wapp_os.c
|
||||||
os: INCLUDES = common os base
|
os: INCLUDES = common os base
|
||||||
os: install
|
os: install
|
||||||
|
|||||||
@@ -57,19 +57,19 @@ typedef const WpStr8 WpStr8RO;
|
|||||||
// Utilises the fact that memcpy returns pointer to dest buffer and that getting
|
// Utilises the fact that memcpy returns pointer to dest buffer and that getting
|
||||||
// address of compound literals is valid in C to create a string on the stack
|
// address of compound literals is valid in C to create a string on the stack
|
||||||
#define wpStr8Lit(STRING) ((WpStr8){.capacity = (sizeof(STRING) - 1) * 2, \
|
#define wpStr8Lit(STRING) ((WpStr8){.capacity = (sizeof(STRING) - 1) * 2, \
|
||||||
.size = sizeof(STRING) - 1, \
|
.size = sizeof(STRING) - 1, \
|
||||||
.buf = memcpy(&((c8 [sizeof(STRING) * 2]){0}), \
|
.buf = memcpy(&((c8 [sizeof(STRING) * 2]){0}), \
|
||||||
STRING, \
|
STRING, \
|
||||||
sizeof(STRING))})
|
sizeof(STRING))})
|
||||||
#define wpStr8LitRo(STRING) ((WpStr8RO){.capacity = sizeof(STRING) - 1, \
|
#define wpStr8LitRo(STRING) ((WpStr8RO){.capacity = sizeof(STRING) - 1, \
|
||||||
.size = sizeof(STRING) - 1, \
|
.size = sizeof(STRING) - 1, \
|
||||||
.buf = (c8 *)STRING})
|
.buf = (c8 *)STRING})
|
||||||
// To be used only when initialising a static storage variable in compilers that don't support
|
// To be used only when initialising a static storage variable in compilers that don't support
|
||||||
// initialisers with the syntax of wpStr8LitRo (e.g. gcc). Should only be used when necessary
|
// initialisers with the syntax of wpStr8LitRo (e.g. gcc). Should only be used when necessary
|
||||||
// and only be assigned to a WpStr8RO variable to avoid any attempt at modifying the string
|
// and only be assigned to a WpStr8RO variable to avoid any attempt at modifying the string
|
||||||
#define wpStr8LitRoInitialiserList(STRING) {.capacity = sizeof(STRING) - 1, \
|
#define wpStr8LitRoInitialiserList(STRING) {.capacity = sizeof(STRING) - 1, \
|
||||||
.size = sizeof(STRING) - 1, \
|
.size = sizeof(STRING) - 1, \
|
||||||
.buf = (c8 *)STRING}
|
.buf = (c8 *)STRING}
|
||||||
#endif // !WP_PLATFORM_CPP
|
#endif // !WP_PLATFORM_CPP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user