diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/apps/settings.c b/apps/settings.c index 17122ecd84..bc1e6c7506 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -836,39 +836,6 @@ void settings_load(int which) | |||
836 | } | 836 | } |
837 | } | 837 | } |
838 | 838 | ||
839 | /* parse a line from a configuration file. the line format is: | ||
840 | |||
841 | setting name: setting value | ||
842 | |||
843 | Any whitespace before setting name or value (after ':') is ignored. | ||
844 | A # as first non-whitespace character discards the whole line. | ||
845 | Function sets pointers to null-terminated setting name and value. | ||
846 | Returns false if no valid config entry was found. | ||
847 | */ | ||
848 | |||
849 | static bool settings_parseline(char* line, char** name, char** value) | ||
850 | { | ||
851 | char* ptr; | ||
852 | |||
853 | while ( isspace(*line) ) | ||
854 | line++; | ||
855 | |||
856 | if ( *line == '#' ) | ||
857 | return false; | ||
858 | |||
859 | ptr = strchr(line, ':'); | ||
860 | if ( !ptr ) | ||
861 | return false; | ||
862 | |||
863 | *name = line; | ||
864 | *ptr = 0; | ||
865 | ptr++; | ||
866 | while (isspace(*ptr)) | ||
867 | ptr++; | ||
868 | *value = ptr; | ||
869 | return true; | ||
870 | } | ||
871 | |||
872 | void set_file(char* filename, char* setting, int maxlen) | 839 | void set_file(char* filename, char* setting, int maxlen) |
873 | { | 840 | { |
874 | char* fptr = strrchr(filename,'/'); | 841 | char* fptr = strrchr(filename,'/'); |