|
29 | 29 | // macro definitions |
30 | 30 | // ***************************************************************************** |
31 | 31 |
|
32 | | -#define FOSSIL_PIZZA_VERSION "1.3.4" |
| 32 | +#define FOSSIL_PIZZA_VERSION "1.3.2" |
33 | 33 | #define FOSSIL_PIZZA_AUTHOR "Fossil Logic" |
34 | 34 | #define FOSSIL_PIZZA_WEBSITE "https://fossillogic.com" |
35 | 35 |
|
@@ -257,13 +257,9 @@ static void _show_subhelp_color(void) { |
257 | 257 |
|
258 | 258 | static void _show_subhelp_theme(void) { |
259 | 259 | pizza_io_printf("{blue}Theme command options:{reset}\n"); |
260 | | - pizza_io_printf("{cyan} fossil Fossil theme (C, C++ Fossil Test Framework){reset}\n"); |
261 | | - pizza_io_printf("{cyan} catch Catch theme (C++ Test Framework){reset}\n"); |
262 | | - pizza_io_printf("{cyan} doctest Doctest theme (C++ Test Framework){reset}\n"); |
263 | | - pizza_io_printf("{cyan} cpputest CppUTest theme (C Test Framework){reset}\n"); |
264 | | - pizza_io_printf("{cyan} tap TAP theme (C Test Framework){reset}\n"); |
265 | | - pizza_io_printf("{cyan} gtest GoogleTest theme (C++ Test Framework){reset}\n"); |
266 | | - pizza_io_printf("{cyan} unity Unity theme (C Test Framework){reset}\n"); |
| 260 | + pizza_io_printf("{cyan} fossil Fossil theme{reset}\n"); |
| 261 | + pizza_io_printf("{cyan} light Light theme{reset}\n"); |
| 262 | + pizza_io_printf("{cyan} dark Dark theme{reset}\n"); |
267 | 263 | exit(EXIT_SUCCESS); |
268 | 264 | } |
269 | 265 |
|
@@ -605,24 +601,12 @@ fossil_pizza_pallet_t fossil_pizza_pallet_create(int argc, char** argv) { |
605 | 601 | if (pizza_io_cstr_compare(theme_str, "fossil") == 0) { |
606 | 602 | pallet.theme = PIZZA_THEME_FOSSIL; |
607 | 603 | G_PIZZA_THEME = PIZZA_THEME_FOSSIL; |
608 | | - } else if (pizza_io_cstr_compare(theme_str, "catch") == 0) { |
609 | | - pallet.theme = PIZZA_THEME_CATCH; |
610 | | - G_PIZZA_THEME = PIZZA_THEME_CATCH; |
611 | | - } else if (pizza_io_cstr_compare(theme_str, "doctest") == 0) { |
612 | | - pallet.theme = PIZZA_THEME_DOCTEST; |
613 | | - G_PIZZA_THEME = PIZZA_THEME_DOCTEST; |
614 | | - } else if (pizza_io_cstr_compare(theme_str, "cpputest") == 0) { |
615 | | - pallet.theme = PIZZA_THEME_CPPUTEST; |
616 | | - G_PIZZA_THEME = PIZZA_THEME_CPPUTEST; |
617 | | - } else if (pizza_io_cstr_compare(theme_str, "tap") == 0) { |
618 | | - pallet.theme = PIZZA_THEME_TAP; |
619 | | - G_PIZZA_THEME = PIZZA_THEME_TAP; |
620 | | - } else if (pizza_io_cstr_compare(theme_str, "gtest") == 0) { |
621 | | - pallet.theme = PIZZA_THEME_GOOGLETEST; |
622 | | - G_PIZZA_THEME = PIZZA_THEME_GOOGLETEST; |
623 | | - } else if (pizza_io_cstr_compare(theme_str, "unity") == 0) { |
624 | | - pallet.theme = PIZZA_THEME_UNITY; |
625 | | - G_PIZZA_THEME = PIZZA_THEME_UNITY; |
| 604 | + } else if (pizza_io_cstr_compare(theme_str, "dark") == 0) { |
| 605 | + pallet.theme = PIZZA_THEME_DARK; |
| 606 | + G_PIZZA_THEME = PIZZA_THEME_DARK; |
| 607 | + } else if (pizza_io_cstr_compare(theme_str, "light") == 0) { |
| 608 | + pallet.theme = PIZZA_THEME_LIGHT; |
| 609 | + G_PIZZA_THEME = PIZZA_THEME_LIGHT; |
626 | 610 | } |
627 | 611 | } else if (pizza_io_cstr_compare(argv[i], "theme") == 0) { |
628 | 612 | if (i + 1 < argc && pizza_io_cstr_compare(argv[i + 1], "--help") == 0) { |
@@ -762,18 +746,10 @@ int fossil_pizza_ini_parse(const char *filename, fossil_pizza_pallet_t *pallet) |
762 | 746 | if (pizza_io_cstr_compare(key, "theme") == 0) { |
763 | 747 | if (pizza_io_cstr_compare(value, "fossil") == 0) { |
764 | 748 | pallet->theme = PIZZA_THEME_FOSSIL; |
765 | | - } else if (pizza_io_cstr_compare(value, "catch") == 0) { |
766 | | - pallet->theme = PIZZA_THEME_CATCH; |
767 | | - } else if (pizza_io_cstr_compare(value, "doctest") == 0) { |
768 | | - pallet->theme = PIZZA_THEME_DOCTEST; |
769 | | - } else if (pizza_io_cstr_compare(value, "cpputest") == 0) { |
770 | | - pallet->theme = PIZZA_THEME_CPPUTEST; |
771 | | - } else if (pizza_io_cstr_compare(value, "tap") == 0) { |
772 | | - pallet->theme = PIZZA_THEME_TAP; |
773 | | - } else if (pizza_io_cstr_compare(value, "gtest") == 0) { |
774 | | - pallet->theme = PIZZA_THEME_GOOGLETEST; |
775 | | - } else if (pizza_io_cstr_compare(value, "unity") == 0) { |
776 | | - pallet->theme = PIZZA_THEME_UNITY; |
| 749 | + } else if (pizza_io_cstr_compare(value, "dark") == 0) { |
| 750 | + pallet->theme = PIZZA_THEME_DARK; |
| 751 | + } else if (pizza_io_cstr_compare(value, "light") == 0) { |
| 752 | + pallet->theme = PIZZA_THEME_LIGHT; |
777 | 753 | } |
778 | 754 | } |
779 | 755 | } else if (pizza_io_cstr_compare(section, "test") == 0) { |
@@ -1199,7 +1175,7 @@ static const struct { |
1199 | 1175 | }; |
1200 | 1176 |
|
1201 | 1177 | /** Lookup table for sarcastic phrases */ |
1202 | | -static const char *SARCASTIC_PHRASES[] = { |
| 1178 | +static const char *SARCASTIcpp_PHRASES[] = { |
1203 | 1179 | "Oh, great", |
1204 | 1180 | "Yeah, right", |
1205 | 1181 | "Nice job", |
@@ -1516,8 +1492,8 @@ void pizza_io_soap_clear_custom_filters(void) { |
1516 | 1492 | * AI trick: prioritize sarcastic, then formal, else casual. |
1517 | 1493 | */ |
1518 | 1494 | const char *pizza_io_soap_detect_tone(const char *text) { |
1519 | | - for (size_t i = 0; SARCASTIC_PHRASES[i] != null; i++) { |
1520 | | - if (custom_strcasestr(text, SARCASTIC_PHRASES[i])) { |
| 1495 | + for (size_t i = 0; SARCASTIcpp_PHRASES[i] != null; i++) { |
| 1496 | + if (custom_strcasestr(text, SARCASTIcpp_PHRASES[i])) { |
1521 | 1497 | return "sarcastic"; |
1522 | 1498 | } |
1523 | 1499 | } |
@@ -2416,13 +2392,13 @@ bool pizza_io_cstr_append(cstr dest, size_t max_len, cstr src) { |
2416 | 2392 | // If no null-terminator found in range, dest is not safe |
2417 | 2393 | if (dest_len == max_len) return false; |
2418 | 2394 |
|
2419 | | - size_t src_len = strlen(src); |
| 2395 | + size_t srcpp_len = strlen(src); |
2420 | 2396 |
|
2421 | 2397 | // Make sure there's enough space (including null terminator) |
2422 | | - if (dest_len + src_len >= max_len) return false; |
| 2398 | + if (dest_len + srcpp_len >= max_len) return false; |
2423 | 2399 |
|
2424 | | - memcpy(dest + dest_len, src, src_len); |
2425 | | - dest[dest_len + src_len] = '\0'; |
| 2400 | + memcpy(dest + dest_len, src, srcpp_len); |
| 2401 | + dest[dest_len + srcpp_len] = '\0'; |
2426 | 2402 |
|
2427 | 2403 | return true; |
2428 | 2404 | } |
0 commit comments