Skip to content
Snippets Groups Projects
Commit 8f0dec22 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Remove trailing newlines from strings in list returned from findstr_list()

parent 694744fb
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,7 @@ bool find2strs(const char* str1, const char* str2, const char* fname, char* meta
static char* process_findstr_item(size_t index, char *str, void* cbdata)
{
SKIP_WHITESPACE(str);
truncnl(str);
return c_unescape_str(str);
}
......
......@@ -53,7 +53,7 @@ int maint(const char* fname)
char item[256];
if(!trash_parse_details(list[i], &trash, item, sizeof item)
|| (prot != NULL && stricmp(trash.prot, prot) != 0)) {
fputs(list[i], fp);
fprintf(fp, "%s\n", list[i]);
continue;
}
if(verbosity > 1) {
......@@ -75,7 +75,7 @@ int maint(const char* fname)
continue;
}
}
fputs(list[i], fp);
fprintf(fp, "%s\n", list[i]);
}
fclose(fp);
strListFree(&list);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment