]> git.cworth.org Git - spritext/commitdiff
Remove CGIC code
authorCarl Worth <cworth@cworth.org>
Wed, 13 Feb 2008 19:18:05 +0000 (11:18 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 13 Feb 2008 19:18:05 +0000 (11:18 -0800)
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.

spritext.c

index 212b87214dc1cb9cec7569946892cb8f9690c083..fd031a479d4f9caac2841ac46f0719d9a8dee241 100644 (file)
 #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