mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Export tabstospaces() from conf.c to helpers.[ch]
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
7f19474d8d
commit
4cdd5f8ccc
3 files changed
+12
-11
No files matched your search
-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