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:
+1
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user