From 8b8fcdd17bf243440f52bd74e447afcface8b107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 26 Sep 2019 11:52:37 +0800 Subject: Fix prefixes --- icclient/product.h | 10 +++++----- product.c | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/icclient/product.h b/icclient/product.h index 2ea1f53..12da846 100644 --- a/icclient/product.h +++ b/icclient/product.h @@ -1,24 +1,24 @@ #ifndef ICCLIENT_PRODUCT_H #define ICCLIENT_PRODUCT_H -struct ic_product { +struct icclient_product { char *sku, *description, *comment, *image; double price; }; -struct ic_catalog { +struct icclient_catalog { size_t length; - struct ic_product *products[]; + struct icclient_product *products[]; }; #ifdef __cplusplus extern "C" { #endif - void icclient_product_all(struct ic_catalog **catalogptr + void icclient_product_all(struct icclient_catalog **catalogptr , size_t (*callback)(void *contents, size_t size , size_t nmemb, void *userdata)); - void rtclient_product_freecatalog(struct ic_catalog *catalog); + void icclient_product_freecatalog(struct icclient_catalog *catalog); #ifdef __cplusplus } diff --git a/product.c b/product.c index bc7a7ea..71f47a5 100644 --- a/product.c +++ b/product.c @@ -2,16 +2,18 @@ #include "request.h" #include "icclient/product.h" -void icclient_product_all(struct ic_catalog **catalogptr +typedef struct icclient_catalog icclient_catalog; + +void icclient_product_all(icclient_catalog **catalogptr , size_t (*callback)(void *, size_t, size_t, void *)) { request(NULL, NULL, NULL, "%s", "All-Products"); } -void rtclient_product_freecatalog(struct ic_catalog *catalog) +void icclient_product_freecatalog(icclient_catalog *catalog) { for (size_t i = 0; i < catalog->length; i++) { - struct ic_product *product = catalog->products[i]; + struct icclient_product *product = catalog->products[i]; if (product->image) free(product->image); if (product->comment) -- cgit v1.2.3