From: Carl Worth Date: Wed, 13 Feb 2008 19:18:05 +0000 (-0800) Subject: Remove CGIC code X-Git-Url: https://git.cworth.org/git?p=spritext;a=commitdiff_plain;h=00364b1038bfd29bf210d3524319532cf7ab9f52 Remove CGIC code It had already bit-rotted so it's not really worth keeping around. It will be easier to just recode it later with the histroy as reference. --- diff --git a/spritext.c b/spritext.c index 212b872..fd031a4 100644 --- a/spritext.c +++ b/spritext.c @@ -19,11 +19,6 @@ #define TRUE (1==1) #define FALSE (!TRUE) -#if USE_CGIC -static cairo_status_t -stdio_write (void *closure, const unsigned char *data, unsigned int length); -#endif - static double get_max_width (cairo_t *cr, const char *characters, int num_characters) { @@ -316,15 +311,6 @@ main (void) parse_args (&args); -#if USE_CGIC - if (outputJson) - { - cgiHeaderContentType("application/json"); - } else { - cgiHeaderContentType("image/png"); - } -#endif - ft_face = load_ft_face_for_family (args.family); get_characters_max_width_height (ft_face, args.size, @@ -347,15 +333,6 @@ main (void) characters, ARRAY_SIZE (characters), max_width, max_height); -#if USE_CGIC - if (outputJson) - { - printf("}"); - } else { - cairo_surface_write_to_png_stream (surface, stdio_write, cgiOut); - } -#endif - cairo_surface_write_to_png (surface, "spritext-output.png"); printf ("Result written to spritext-output.png\n"); @@ -365,15 +342,3 @@ main (void) return 0; } - -#if USE_CGIC -static cairo_status_t -stdio_write (void *closure, const unsigned char *data, unsigned int length) -{ - FILE *file = closure; - if (fwrite (data, 1, length, file) == length) - return CAIRO_STATUS_SUCCESS; - else - return CAIRO_STATUS_WRITE_ERROR; -} -#endif