#include #include #include "pikul.h" struct shipping { enum pikul_company company; char *base; struct curl_slist *headers; }; inline void headers(const char *fields[], char *provisions[], struct shipping *shipping) { shipping->headers = NULL; while (*fields) { char header[strlen(*fields) + strlen(*provisions) + 2]; sprintf(header, "%s:%s", *fields++, *provisions++); shipping->headers = curl_slist_append(shipping->headers, header); } }