summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-05-09 11:40:34 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-05-09 11:40:34 +0200
commitb6b192b49333ff18e1a4df53f27fc4873bf1ac25 (patch)
tree127345f6e6d0e0e9bcf9852b6ee1cf0bec79e7a7
parentde5cecd9bd63c0f7732fe266ee95e878d33ba61f (diff)
downloadcqrlogo-b6b192b49333ff18e1a4df53f27fc4873bf1ac25.tar.gz
cqrlogo-b6b192b49333ff18e1a4df53f27fc4873bf1ac25.tar.zst
fix function names
get_query_value() -> cqr_get_query_uint()
-rw-r--r--lib/libcqrlogo.c10
-rw-r--r--lib/libcqrlogo.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libcqrlogo.c b/lib/libcqrlogo.c
index 82b394d..d2690ab 100644
--- a/lib/libcqrlogo.c
+++ b/lib/libcqrlogo.c
@@ -233,8 +233,8 @@ struct cqr_png * cqr_encode_qrcode_to_png(const char *text, const struct cqr_con
return png;
}
-/*** get_query_value ***/
-unsigned int get_query_value(const char *query_string, const char *pattern,
+/*** cqr_get_query_uint ***/
+unsigned int cqr_get_query_uint(const char *query_string, const char *pattern,
unsigned int value, unsigned int min, unsigned int max) {
char *match = NULL, *newpattern = NULL;
unsigned int length;
@@ -316,11 +316,11 @@ void cqr_conf_string(const char * query_string, struct cqr_conf * conf) {
return;
/* do we have a special scale? */
- conf->scale = get_query_value(query_string, "scale", conf->scale, 1, QRCODE_MAX_SCALE);
+ conf->scale = cqr_get_query_uint(query_string, "scale", conf->scale, 1, QRCODE_MAX_SCALE);
/* width of the border? */
- conf->border = get_query_value(query_string, "border", conf->border, 0, QRCODE_MAX_BORDER);
+ conf->border = cqr_get_query_uint(query_string, "border", conf->border, 0, QRCODE_MAX_BORDER);
/* error correction level? */
- conf->level = get_query_value(query_string, "level", conf->level, QR_ECLEVEL_L, QR_ECLEVEL_H);
+ conf->level = cqr_get_query_uint(query_string, "level", conf->level, QR_ECLEVEL_L, QR_ECLEVEL_H);
}
diff --git a/lib/libcqrlogo.h b/lib/libcqrlogo.h
index 110a0ab..4be5087 100644
--- a/lib/libcqrlogo.h
+++ b/lib/libcqrlogo.h
@@ -77,8 +77,8 @@ struct cqr_png * cqr_bitmap_to_png(struct cqr_bitmap *bitmap, const char *text,
/*** cqr_encode_qrcode_to_png ***/
struct cqr_png * cqr_encode_qrcode_to_png(const char *text, const struct cqr_conf conf, const uint8_t meta);
-/*** cqr_get_query_value ***/
-unsigned int cqr_get_query_value(const char *query_string, const char *pattern,
+/*** cqr_get_query_uint ***/
+unsigned int cqr_get_query_uint(const char *query_string, const char *pattern,
unsigned int value, unsigned int min, unsigned int max);
/*** cqr_get_ini_value ***/
unsigned int cqr_get_ini_value(dictionary * ini, uint8_t type, const char * section, const char * parameter,