Overview
Comment: | Add a final terminating null to first message in kcli_usage. This was causing the shared library build to segfault. Not perfect, as if there are no options, there will be two nulls, but two is better than none. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6aeac330cedb6d70e71b74adde2dd98c |
User & Date: | glowpelt on 2020-01-31 05:58:38 |
Other Links: | manifest | tags |
Context
2020-01-31
| ||
06:05 | Merge install script branch. Seems to be Good Enough for now, and shouldn't break anything at all to merge this. check-in: 12a51d9c50 user: glowpelt tags: trunk | |
05:58 | Add a final terminating null to first message in kcli_usage. This was causing the shared library build to segfault. Not perfect, as if there are no options, there will be two nulls, but two is better than none. check-in: 6aeac330ce user: glowpelt tags: trunk | |
2020-01-30
| ||
07:15 | Merge the shared library build fixes into trunk check-in: d49a706cc4 user: glowpelt tags: trunk | |
Changes
Modified mod/kcli/usage.fn.c from [51bd833f89] to [a2f98072f0].
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
const char* name = prg.name != null ? prg.name : _k_internal_binary_name; const char* msg [] = { name, " v", prg.version, "\n\n", prg.desc, "\n\n", "usage: ", _k_internal_binary_name, prg.optc == 0 ? null : " [-", }; if (!kokay(c = ksbufwrite(out, msg))) return c; u8 longest_opt = 0; u8 opt_lens [prg.optc]; for (sz i = 0; i != prg.optc; ++ i) { |
| |
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
const char* name = prg.name != null ?
prg.name : _k_internal_binary_name;
const char* msg [] = {
name, " v", prg.version, "\n\n",
prg.desc, "\n\n",
"usage: ", _k_internal_binary_name,
prg.optc == 0 ? null : " [-", null,
};
if (!kokay(c = ksbufwrite(out, msg))) return c;
u8 longest_opt = 0;
u8 opt_lens [prg.optc];
for (sz i = 0; i != prg.optc; ++ i) {
|