X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Finclude%2Fconffile.h;h=ce7aa218a56527d9bcc1d77f275bab6a10c4e2fc;hp=3309788d1c7eb21a8c180961269a7caeb88bdb19;hb=9bb85c5e8d2285f82367c75df5530a71a9a5a5f2;hpb=1a9010602442f466d700fbc4d64fe82ac69b1dd3 diff --git a/support/include/conffile.h b/support/include/conffile.h index 3309788..ce7aa21 100644 --- a/support/include/conffile.h +++ b/support/include/conffile.h @@ -34,6 +34,7 @@ #define _CONFFILE_H_ #include +#include struct conf_list_node { TAILQ_ENTRY(conf_list_node) link; @@ -56,12 +57,24 @@ extern struct conf_list *conf_get_list(char *, char *); extern struct conf_list *conf_get_tag_list(char *); extern int conf_get_num(char *, char *, int); extern char *conf_get_str(char *, char *); +extern char *conf_get_section(char *, char *, char *); extern void conf_init(void); extern int conf_match_num(char *, char *, int); extern void conf_reinit(void); extern int conf_remove(int, char *, char *); extern int conf_remove_section(int, char *); -extern int conf_set(int, char *, char *, char *, int, int); extern void conf_report(void); +/* + * Convert letter from upper case to lower case + */ +static inline void upper2lower(char *str) +{ + char c; + + while ((c = tolower(*str))) + *str++ = c; +} + + #endif /* _CONFFILE_H_ */