Compare commits

..

2 Commits

Author SHA1 Message Date
Abdelrahman Said f599b5f425 Reformat
Release / release (push) Successful in 3s
2026-08-22 20:32:58 +01:00
abdelrahman 0063bb8641 Fix missing log in Makefile
Release / release (push) Successful in 4s
2026-08-17 05:24:10 +01:00
2 changed files with 13 additions and 9 deletions
+5 -1
View File
@@ -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
+8 -8
View File
@@ -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
/** /**