From 23f3f8592c21ee58b0ac040736b5b766d52de193 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Wed, 13 Nov 2019 19:16:21 +0300 Subject: Cosmetical changes. --- examples/cookie.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'examples/cookie.c') diff --git a/examples/cookie.c b/examples/cookie.c index dd18cc6..5ef56ac 100644 --- a/examples/cookie.c +++ b/examples/cookie.c @@ -7,34 +7,26 @@ void print_preamble() { - puts( - "Set-Cookie:cookie=monstre\r\n" /* Important to set cookies before: */ - "Content-Type: application/xhtml+xml\r\n\r\n" - ); + puts("Set-Cookie:cookie=monstre\r\n" /* Important to set cookies before: */ + "Content-Type: application/xhtml+xml\r\n\r\n"); } void print_webpage_top() { - puts( - "" - "" - "Cookie Listing and Setting" - "" - ); + puts("" + "" + "Cookie Listing and Setting" + ""); } void read_and_print_cookies() { struct magi_request request; if (magi_cgi(&request, 0, 0)) { - struct magi_cookie_list *cookie; + struct magi_cookie_list * cookie; for (cookie = request.cookies; cookie; cookie = cookie->next) { - printf( - "[%s] = [%s]
", - cookie->item.name, - cookie->item.data - ); + printf("[%s] = [%s]
", cookie->item.name, cookie->item.data); } magi_request_destroy(&request); } @@ -42,13 +34,11 @@ void read_and_print_cookies() void print_webpage_bottom() { - puts( - "" - "" - ); + puts("" + ""); } -int main(int argc, char const *argv[]) +int main(int argc, char const * argv[]) { print_preamble(); /* Following probably will be much more pleasant with use of templates. */ -- cgit v1.2.3