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

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-05-06 07:57:07 +02:00
parent 7f19474d8d
commit 4cdd5f8ccc
3 changed files with 12 additions and 11 deletions
-11
View File
@@ -755,17 +755,6 @@ static int parse_dynamic(char *line, struct rlimit rlimit[], char *file)
return 1;
}
static void tabstospaces(char *line)
{
if (!line)
return;
for (int i = 0; line[i]; i++) {
if (line[i] == '\t')
line[i] = ' ';
}
}
static int parse_conf(char *file, int is_rcsd)
{
struct rlimit rlimit[RLIMIT_NLIMITS];
+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;
+1
View File
@@ -49,6 +49,7 @@ char *console (void);
void console_init (void);
ssize_t cprintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
void tabstospaces (char *line);
char *strip_line (char *line);
void enable_progress (int onoff);