Export tabstospaces() from conf.c to helpers.[ch]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-05-06 07:57:07 +02:00
1 parent 7f19474d8d
commit 4cdd5f8ccc
3 files changed
+12 -11

No files matched your search

+11
View File
@@ -102,6 +102,17 @@ ssize_t cprintf(const char *fmt, ...)
return size;
}
void tabstospaces(char *line)
{
if (!line)
return;
for (int i = 0; line[i]; i++) {
if (line[i] == '\t')
line[i] = ' ';
}
}
char *strip_line(char *line)
{
char *ptr;