From b24e0bdf48e6e4ec2cab90bec1f4a03d26cdfd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Mon, 19 Jul 2021 14:08:38 +0800 Subject: Implementations don't need the CURL* object that much --- anteraja.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'anteraja.c') diff --git a/anteraja.c b/anteraja.c index 2037db6..057b22e 100644 --- a/anteraja.c +++ b/anteraja.c @@ -50,8 +50,6 @@ #define ORDER_ITEM_PRICE 9 #define ORDER_ITEM_WEIGHT 5 -extern CURL *curl; - static const char *status_trail[] = { "status", NULL }; static char *prefix = NULL; @@ -75,7 +73,6 @@ void anteraja_services(const char *origin, const char *destination, double weigh *post = malloc(strlen(SERVICES_POST) + strlen(origin) + strlen(destination) + SERVICES_WEIGHT - 2 * strlen("%s") - strlen("%d") + 1); sprintf(*post, SERVICES_POST, origin, destination, weight < 1.0 ? 1000 : (int)weight * 1000); - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, *post); } size_t anteraja_services_handle(const char *contents, size_t size, size_t nmemb, @@ -144,7 +141,6 @@ void anteraja_order(const char *order_number, const char *service, const char *s sender_phone, origin, sender_address, sender_postal, receiver_name, receiver_phone, destination, receiver_address, receiver_postal, json, total_weight < 1000.0 ? "true" : "false", subtotal < 1000.0 ? 1000 : (int)subtotal); - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, *post); } size_t anteraja_order_handle(const char *contents, size_t size, size_t nmemb, char **tracking_number) -- cgit v1.2.3