diff options
-rw-r--r-- | content/fetchers/about.c | 5 | ||||
-rw-r--r-- | desktop/options.c | 6 | ||||
-rw-r--r-- | desktop/options.h | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index c93fdbad4..c5d421c29 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -199,7 +199,8 @@ static bool fetch_about_config_handler(struct fetch_about_context *ctx) "<table><tr><th></th><th></th><th></th></tr>"); do { - res = snoptionf(buffer + slen, sizeof buffer - slen, opt_loop, + res = options_snoptionf(buffer + slen, sizeof buffer - slen, + opt_loop, "<tr><td>%k</td><td>%t</td><td>%V</td></tr>"); if (res <= 0) break; /* last option */ @@ -255,7 +256,7 @@ static bool fetch_about_choices_handler(struct fetch_about_context *ctx) "# Automatically generated current NetSurf browser Choices\n"); do { - res = snoptionf(buffer + slen, + res = options_snoptionf(buffer + slen, sizeof buffer - slen, opt_loop, "%k:%v\n"); diff --git a/desktop/options.c b/desktop/options.c index a9f67637a..2f4d3775e 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -468,7 +468,8 @@ void options_write(const char *path) /* exported interface documented in options.h */ -int snoptionf(char *string, size_t size, unsigned int option, const char *fmt) +int options_snoptionf(char *string, size_t size, unsigned int option, + const char *fmt) { size_t slen = 0; /* current output string length */ int fmtc = 0; /* current index into format string */ @@ -597,7 +598,8 @@ void options_dump(FILE *outf) int res; do { - res = snoptionf(buffer, sizeof buffer, opt_loop, "%k:%v\n"); + res = options_snoptionf(buffer, sizeof buffer, opt_loop, + "%k:%v\n"); if (res > 0) { fprintf(outf, "%s", buffer); } diff --git a/desktop/options.h b/desktop/options.h index c75ba18a8..47a648d75 100644 --- a/desktop/options.h +++ b/desktop/options.h @@ -187,6 +187,8 @@ void options_dump(FILE *outf); * \param fmt The format string. * \return The number of bytes written to \a string or -1 on error */ -int snoptionf(char *string, size_t size, unsigned int option, const char *fmt); +int options_snoptionf(char *string, size_t size, unsigned int option, + const char *fmt); #endif + |