mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
Export tabstospaces() from conf.c to helpers.[ch]
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
-11
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user