feat: add benchmark target to Makefile and optimize isspam.c with stricmp

- Add 'benchmark' target to Makefile that extracts books archive and runs bench.py
- Reorder includes in isspam.c (rstr.h before rstring_list.h)
- Replace file_exists() with case-insensitive stricmp() for forbidden word matching
- Remove unused flags (show_capitalized, show_sentences, etc.) and stripws() function
- Add memory usage comment and fix trailing newline in rstr.h header guard
This commit is contained in:
2024-12-01 21:02:32 +00:00
parent 8b7f05b129
commit ef3c9b5c5b
4 changed files with 124 additions and 171 deletions
+1 -3
View File
@@ -26,8 +26,6 @@ void stra(str_t *str, const char *to_append) {
if (required_new_length > str->size) {
str->size += required_new_length + str->buffer_size;
str->content = (char *)realloc(str->content, str->size + 1);
} else {
// printf("NO NDEED\n");
}
strcat(str->content, to_append);
str->content[str->length] = 0;
@@ -49,4 +47,4 @@ char *strc(str_t *str) {
return content;
}
#endif
#endif