From 1ea62d837531c4d5795381da5a2566606e03ac4b Mon Sep 17 00:00:00 2001 From: Leo Uino Date: Tue, 19 Jul 2011 12:06:08 +0900 Subject: Consistent function names --- lpg/libqr/data-common.c | 2 +- lpg/libqr/data-create.c | 2 +- lpg/libqr/qr/data.h | 4 ++-- lpg/libqr/qrgen.c | 4 ++-- lpg/libqr/qrparse.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lpg') diff --git a/lpg/libqr/data-common.c b/lpg/libqr/data-common.c index 8a05f4a..af3a766 100644 --- a/lpg/libqr/data-common.c +++ b/lpg/libqr/data-common.c @@ -3,7 +3,7 @@ #include #include -void qr_free_data(struct qr_data * data) +void qr_data_destroy(struct qr_data * data) { qr_bitstream_destroy(data->bits); free(data); diff --git a/lpg/libqr/data-create.c b/lpg/libqr/data-create.c index 6437bc1..8ab127d 100644 --- a/lpg/libqr/data-create.c +++ b/lpg/libqr/data-create.c @@ -182,7 +182,7 @@ static int calc_min_version(enum qr_data_type type, return -1; } -struct qr_data * qr_create_data(int version, +struct qr_data * qr_data_create(int version, enum qr_ec_level ec, enum qr_data_type type, const char * input, diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h index 3cc665a..f2b4b45 100644 --- a/lpg/libqr/qr/data.h +++ b/lpg/libqr/qr/data.h @@ -11,13 +11,13 @@ struct qr_data { size_t offset; }; -struct qr_data * qr_create_data(int format, /* 1 ~ 40; 0=auto */ +struct qr_data * qr_data_create(int format, /* 1 ~ 40; 0=auto */ enum qr_ec_level ec, enum qr_data_type type, const char * input, size_t length); -void qr_free_data(struct qr_data *); +void qr_data_destroy(struct qr_data *); enum qr_data_type qr_data_type(const struct qr_data *); diff --git a/lpg/libqr/qrgen.c b/lpg/libqr/qrgen.c index 3007011..d59954d 100644 --- a/lpg/libqr/qrgen.c +++ b/lpg/libqr/qrgen.c @@ -31,7 +31,7 @@ struct qr_code * create(int version, len = strlen(input); - data = qr_create_data(version, ec, dtype, input, len); + data = qr_data_create(version, ec, dtype, input, len); if (!data) { /* BUG: this could also indicate OOM or @@ -42,7 +42,7 @@ struct qr_code * create(int version, } code = qr_code_create(data); - qr_free_data(data); + qr_data_destroy(data); if (!code) { perror("Failed to create code"); diff --git a/lpg/libqr/qrparse.c b/lpg/libqr/qrparse.c index 4a9312f..013066b 100644 --- a/lpg/libqr/qrparse.c +++ b/lpg/libqr/qrparse.c @@ -51,7 +51,7 @@ int main(int argc, char ** argv) } fprintf(stderr, "Data type: %s; %lu bytes\nContent: %s\n", type_str, data_len, data_str); free(data_str); - qr_free_data(data); + qr_data_destroy(data); } return 0; -- cgit v1.2.3-70-g09d2