]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Rename API functions of dither.h to "cf..."
authorTill Kamppeter <till.kamppeter@gmail.com>
Wed, 6 Apr 2022 12:57:44 +0000 (14:57 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Wed, 6 Apr 2022 12:57:44 +0000 (14:57 +0200)
Also renamed constants to start with "CF_" and data types to start
with "cf_".

16 files changed:
cupsfilters/attr.c
cupsfilters/check.c
cupsfilters/cmyk.c
cupsfilters/dither.c
cupsfilters/driver.h
cupsfilters/lut.c
cupsfilters/pack.c
cupsfilters/rgb.c
cupsfilters/srgb.c
cupsfilters/testcmyk.c
cupsfilters/testdither.c
cupsfilters/testrgb.c
filter/commandtoescpx.c
filter/commandtopclx.c
filter/rastertoescpx.c
filter/rastertopclx.c

index c1574e4c2fb42f01c219310c7e17502710831b25..625c4c8613e0d57434be128c9fcfd69d6ef26eb6 100644 (file)
@@ -11,7 +11,7 @@
  *
  * Contents:
  *
- *   cupsFindAttr() - Find a PPD attribute based on the colormodel,
+ *   cfFindAttr() - Find a PPD attribute based on the colormodel,
  *                    media, and resolution.
  */
 
 
 
 /*
- * 'cupsFindAttr()' - Find a PPD attribute based on the colormodel,
+ * 'cfFindAttr()' - Find a PPD attribute based on the colormodel,
  *                    media, and resolution.
  */
 
 ppd_attr_t *                           /* O - Matching attribute or NULL */
-cupsFindAttr(ppd_file_t *ppd,          /* I - PPD file */
+cfFindAttr(ppd_file_t *ppd,            /* I - PPD file */
              const char *name,         /* I - Attribute name */
              const char *colormodel,   /* I - Color model */
              const char *media,                /* I - Media type */
index c2f374dbcc6809519304b961a3ed12acd6ff5068..d08b057baa4739e19653c83549f8183557604f7f 100644 (file)
@@ -11,8 +11,8 @@
  *
  * Contents:
  *
- *   cupsCheckBytes() - Check to see if all bytes are zero.
- *   cupsCheckValue() - Check to see if all bytes match the given value.
+ *   cfCheckBytes() - Check to see if all bytes are zero.
+ *   cfCheckValue() - Check to see if all bytes match the given value.
  */
 
 /*
 
 
 /*
- * 'cupsCheckBytes()' - Check to see if all bytes are zero.
+ * 'cfCheckBytes()' - Check to see if all bytes are zero.
  */
 
 int                                            /* O - 1 if they match */
-cupsCheckBytes(const unsigned char *bytes,     /* I - Bytes to check */
+cfCheckBytes(const unsigned char *bytes,       /* I - Bytes to check */
                int                 length)     /* I - Number of bytes to check */
 {
   while (length > 7)
@@ -63,11 +63,11 @@ cupsCheckBytes(const unsigned char *bytes,  /* I - Bytes to check */
 
 
 /*
- * 'cupsCheckValue()' - Check to see if all bytes match the given value.
+ * 'cfCheckValue()' - Check to see if all bytes match the given value.
  */
 
 int                                            /* O - 1 if they match */
-cupsCheckValue(const unsigned char *bytes,     /* I - Bytes to check */
+cfCheckValue(const unsigned char *bytes,       /* I - Bytes to check */
                int                 length,     /* I - Number of bytes to check */
               const unsigned char value)       /* I - Value to check */
 {
index 0b787882e75f71253067eb87db1ddd4193c40e10..242d004404ff1845af1a6f03e3c98eb302c82a2d 100644 (file)
  *
  * Contents:
  *
- *   cupsCMYKDelete()      - Delete a color separation.
- *   cupsCMYKDoBlack()     - Do a black separation...
- *   cupsCMYKDoCMYK()      - Do a CMYK separation...
- *   cupsCMYKDoGray()      - Do a grayscale separation...
- *   cupsCMYKDoRGB()       - Do an sRGB separation...
- *   cupsCMYKLoad()        - Load a CMYK color profile from PPD attributes.
- *   cupsCMYKNew()         - Create a new CMYK color separation.
- *   cupsCMYKSetBlack()    - Set the transition range for CMY to black.
- *   cupsCMYKSetCurve()    - Set a color transform curve using points.
- *   cupsCMYKSetGamma()    - Set a color transform curve using gamma and
+ *   cfCMYKDelete()      - Delete a color separation.
+ *   cfCMYKDoBlack()     - Do a black separation...
+ *   cfCMYKDoCMYK()      - Do a CMYK separation...
+ *   cfCMYKDoGray()      - Do a grayscale separation...
+ *   cfCMYKDoRGB()       - Do an sRGB separation...
+ *   cfCMYKLoad()        - Load a CMYK color profile from PPD attributes.
+ *   cfCMYKNew()         - Create a new CMYK color separation.
+ *   cfCMYKSetBlack()    - Set the transition range for CMY to black.
+ *   cfCMYKSetCurve()    - Set a color transform curve using points.
+ *   cfCMYKSetGamma()    - Set a color transform curve using gamma and
  *                           density.
- *   cupsCMYKSetInkLimit() - Set the limit on the amount of ink.
- *   cupsCMYKSetLtDk()     - Set light/dark ink transforms.
+ *   cfCMYKSetInkLimit() - Set the limit on the amount of ink.
+ *   cfCMYKSetLtDk()     - Set light/dark ink transforms.
  */
 
 /*
 
 
 /*
- * 'cupsCMYKDelete()' - Delete a color separation.
+ * 'cfCMYKDelete()' - Delete a color separation.
  */
 
 void
-cupsCMYKDelete(cups_cmyk_t *cmyk)      /* I - Color separation */
+cfCMYKDelete(cf_cmyk_t *cmyk)  /* I - Color separation */
 {
  /*
   * Range check input...
@@ -60,11 +60,11 @@ cupsCMYKDelete(cups_cmyk_t *cmyk)   /* I - Color separation */
 
 
 /*
- * 'cupsCMYKDoBlack()' - Do a black separation...
+ * 'cfCMYKDoBlack()' - Do a black separation...
  */
 
 void
-cupsCMYKDoBlack(const cups_cmyk_t   *cmyk,
+cfCMYKDoBlack(const cf_cmyk_t   *cmyk,
                                        /* I - Color separation */
                const unsigned char *input,
                                        /* I - Input grayscale pixels */
@@ -243,11 +243,11 @@ cupsCMYKDoBlack(const cups_cmyk_t   *cmyk,
 
 
 /*
- * 'cupsCMYKDoCMYK()' - Do a CMYK separation...
+ * 'cfCMYKDoCMYK()' - Do a CMYK separation...
  */
 
 void
-cupsCMYKDoCMYK(const cups_cmyk_t   *cmyk,
+cfCMYKDoCMYK(const cf_cmyk_t   *cmyk,
                                        /* I - Color separation */
               const unsigned char *input,
                                        /* I - Input grayscale pixels */
@@ -515,11 +515,11 @@ cupsCMYKDoCMYK(const cups_cmyk_t   *cmyk,
 
 
 /*
- * 'cupsCMYKDoGray()' - Do a grayscale separation...
+ * 'cfCMYKDoGray()' - Do a grayscale separation...
  */
 
 void
-cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
+cfCMYKDoGray(const cf_cmyk_t   *cmyk,
                                        /* I - Color separation */
               const unsigned char *input,
                                        /* I - Input grayscale pixels */
@@ -559,7 +559,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          *output++ = channels[0][k];
 
           num_pixels --;
@@ -574,7 +574,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          output[0] = channels[0][k];
          output[1] = channels[1][k];
 
@@ -602,7 +602,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          output[0] = channels[0][k];
          output[1] = channels[1][k];
          output[2] = channels[2][k];
@@ -632,7 +632,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          kc        = cmyk->color_lut[k];
          k         = cmyk->black_lut[k];
          output[0] = channels[0][kc];
@@ -666,7 +666,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          kc        = cmyk->color_lut[k];
          k         = cmyk->black_lut[k];
          output[0] = channels[0][kc];
@@ -705,7 +705,7 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         k         = cups_scmy_lut[*input++];
+         k         = cf_scmy_lut[*input++];
          kc        = cmyk->color_lut[k];
          k         = cmyk->black_lut[k];
          output[0] = channels[0][kc];
@@ -742,11 +742,11 @@ cupsCMYKDoGray(const cups_cmyk_t   *cmyk,
 
 
 /*
- * 'cupsCMYKDoRGB()' - Do an sRGB separation...
+ * 'cfCMYKDoRGB()' - Do an sRGB separation...
  */
 
 void
-cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
+cfCMYKDoRGB(const cf_cmyk_t   *cmyk,
                                        /* I - Color separation */
              const unsigned char *input,
                                        /* I - Input grayscale pixels */
@@ -790,9 +790,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c = cups_scmy_lut[*input++];
-         m = cups_scmy_lut[*input++];
-         y = cups_scmy_lut[*input++];
+         c = cf_scmy_lut[*input++];
+         m = cf_scmy_lut[*input++];
+         y = cf_scmy_lut[*input++];
          k = (c * 31 + m * 61 + y * 8) / 100;
 
           *output++ = channels[0][k];
@@ -809,9 +809,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c = cups_scmy_lut[*input++];
-         m = cups_scmy_lut[*input++];
-         y = cups_scmy_lut[*input++];
+         c = cf_scmy_lut[*input++];
+         m = cf_scmy_lut[*input++];
+         y = cf_scmy_lut[*input++];
          k = (c * 31 + m * 61 + y * 8) / 100;
 
           output[0] = channels[0][k];
@@ -841,9 +841,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c = cups_scmy_lut[*input++];
-         m = cups_scmy_lut[*input++];
-         y = cups_scmy_lut[*input++];
+         c = cf_scmy_lut[*input++];
+         m = cf_scmy_lut[*input++];
+         y = cf_scmy_lut[*input++];
 
          output[0] = channels[0][c];
           output[1] = channels[1][m];
@@ -874,9 +874,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c  = cups_scmy_lut[*input++];
-         m  = cups_scmy_lut[*input++];
-         y  = cups_scmy_lut[*input++];
+         c  = cf_scmy_lut[*input++];
+         m  = cf_scmy_lut[*input++];
+         y  = cf_scmy_lut[*input++];
          k  = min(c, min(m, y));
 
          if ((km = max(c, max(m, y))) > k)
@@ -919,9 +919,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c  = cups_scmy_lut[*input++];
-         m  = cups_scmy_lut[*input++];
-         y  = cups_scmy_lut[*input++];
+         c  = cf_scmy_lut[*input++];
+         m  = cf_scmy_lut[*input++];
+         y  = cf_scmy_lut[*input++];
          k  = min(c, min(m, y));
 
          if ((km = max(c, max(m, y))) > k)
@@ -969,9 +969,9 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
          * channel values...
          */
 
-         c  = cups_scmy_lut[*input++];
-         m  = cups_scmy_lut[*input++];
-         y  = cups_scmy_lut[*input++];
+         c  = cf_scmy_lut[*input++];
+         m  = cf_scmy_lut[*input++];
+         y  = cf_scmy_lut[*input++];
          k  = min(c, min(m, y));
 
          if ((km = max(c, max(m, y))) > k)
@@ -1017,18 +1017,18 @@ cupsCMYKDoRGB(const cups_cmyk_t   *cmyk,
 
 
 /*
- * 'cupsCMYKLoad()' - Load a CMYK color profile from PPD attributes.
+ * 'cfCMYKLoad()' - Load a CMYK color profile from PPD attributes.
  */
 
-cups_cmyk_t *                          /* O - CMYK color separation */
-cupsCMYKLoad(ppd_file_t *ppd,          /* I - PPD file */
+cf_cmyk_t *                            /* O - CMYK color separation */
+cfCMYKLoad(ppd_file_t *ppd,            /* I - PPD file */
             const char *colormodel,    /* I - ColorModel value */
             const char *media,         /* I - MediaType value */
             const char *resolution,    /* I - Resolution value */
             filter_logfunc_t log,      /* I - Log function */
             void       *ld)            /* I - Log function data */
 {
-  cups_cmyk_t  *cmyk;                  /* CMYK color separation */
+  cf_cmyk_t    *cmyk;                  /* CMYK color separation */
   char         spec[PPD_MAX_NAME];     /* Profile name */
   ppd_attr_t   *attr;                  /* Attribute from PPD file */
   int          num_channels;           /* Number of color components */
@@ -1087,7 +1087,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
   * Get the required cupsInkChannels attribute...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsInkChannels", colormodel, media,
+  if ((attr = cfFindAttr(ppd, "cupsInkChannels", colormodel, media,
                            resolution, spec, sizeof(spec), log, ld)) == NULL)
     return (NULL);
 
@@ -1096,26 +1096,26 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
   if (num_channels < 1 || num_channels > 7 || num_channels == 5)
     return (NULL);
 
-  if ((cmyk = cupsCMYKNew(num_channels)) == NULL)
+  if ((cmyk = cfCMYKNew(num_channels)) == NULL)
     return (NULL);
 
  /*
   * Get the optional cupsInkLimit attribute...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsInkLimit", colormodel, media,
+  if ((attr = cfFindAttr(ppd, "cupsInkLimit", colormodel, media,
                            resolution, spec, sizeof(spec), log, ld)) != NULL)
-    cupsCMYKSetInkLimit(cmyk, atof(attr->value));
+    cfCMYKSetInkLimit(cmyk, atof(attr->value));
 
  /*
   * Get the optional cupsBlackGeneration attribute...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsBlackGeneration", colormodel, media,
+  if ((attr = cfFindAttr(ppd, "cupsBlackGeneration", colormodel, media,
                            resolution, spec, sizeof(spec), log, ld)) != NULL)
   {
     if (sscanf(attr->value, "%f%f", &lower, &upper) == 2)
-      cupsCMYKSetBlack(cmyk, lower, upper, log, ld);
+      cfCMYKSetBlack(cmyk, lower, upper, log, ld);
   }
 
  /*
@@ -1124,7 +1124,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
 
   if (num_channels != 3)
   {
-    if ((attr = cupsFindAttr(ppd, "cupsBlackXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsBlackXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1140,18 +1140,18 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 1 :
        case 2 :
-            cupsCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
            break;
        case 4 :
-            cupsCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 5, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 5, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsBlackGamma", colormodel,
+    else if ((attr = cfFindAttr(ppd, "cupsBlackGamma", colormodel,
                                   media, resolution, spec,
                                  sizeof(spec), log, ld)) != NULL)
     {
@@ -1160,18 +1160,18 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 1 :
          case 2 :
-              cupsCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
              break;
          case 4 :
-              cupsCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 5, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 5, gamval, density, log, ld);
              break;
        }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllXY", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllXY", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1188,18 +1188,18 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 1 :
        case 2 :
-            cupsCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
            break;
        case 4 :
-            cupsCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 5, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 5, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllGamma", colormodel,
+    else if ((attr = cfFindAttr(ppd, "cupsAllGamma", colormodel,
                                   media, resolution, spec,
                                  sizeof(spec), log, ld)) != NULL &&
              num_channels != 3)
@@ -1209,14 +1209,14 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 1 :
          case 2 :
-              cupsCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
              break;
          case 4 :
-              cupsCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 5, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 5, gamval, density, log, ld);
              break;
        }
     }
@@ -1228,7 +1228,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
     * Get the optional cupsCyanXY or cupsCyanGamma attributes...
     */
 
-    if ((attr = cupsFindAttr(ppd, "cupsCyanXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsCyanXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1240,16 +1240,16 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
          xyptr += 2;
        }
 
-      cupsCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
+      cfCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsCyanGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsCyanGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
       if (sscanf(attr->value, "%f%f", &gamval, &density) == 2)
-       cupsCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
+       cfCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllXY", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllXY", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1262,21 +1262,21 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
          xyptr += 2;
        }
 
-      cupsCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
+      cfCMYKSetCurve(cmyk, 0, num_xypoints, xypoints, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
       if (sscanf(attr->value, "%f%f", &gamval, &density) == 2)
-       cupsCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
+       cfCMYKSetGamma(cmyk, 0, gamval, density, log, ld);
     }
 
    /*
     * Get the optional cupsMagentaXY or cupsMagentaGamma attributes...
     */
 
-    if ((attr = cupsFindAttr(ppd, "cupsMagentaXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsMagentaXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1292,15 +1292,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 3 :
        case 4 :
-            cupsCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsMagentaGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsMagentaGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1309,15 +1309,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 3 :
          case 4 :
-              cupsCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
              break;
        }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllXY", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllXY", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1334,15 +1334,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 3 :
        case 4 :
-            cupsCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1351,11 +1351,11 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 3 :
          case 4 :
-              cupsCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
              break;
        }
     }
@@ -1364,7 +1364,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
     * Get the optional cupsYellowXY or cupsYellowGamma attributes...
     */
 
-    if ((attr = cupsFindAttr(ppd, "cupsYellowXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsYellowXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1380,15 +1380,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 3 :
        case 4 :
-            cupsCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 4, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 4, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsYellowGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsYellowGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1397,15 +1397,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 3 :
          case 4 :
-              cupsCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 4, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 4, gamval, density, log, ld);
              break;
        }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllXY", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllXY", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1422,15 +1422,15 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       {
        case 3 :
        case 4 :
-            cupsCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 2, num_xypoints, xypoints, log, ld);
            break;
        case 6 :
        case 7 :
-            cupsCMYKSetCurve(cmyk, 4, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 4, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsAllGamma", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsAllGamma", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1439,11 +1439,11 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        {
          case 3 :
          case 4 :
-              cupsCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 2, gamval, density, log, ld);
              break;
          case 6 :
          case 7 :
-              cupsCMYKSetGamma(cmyk, 4, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 4, gamval, density, log, ld);
              break;
        }
     }
@@ -1456,7 +1456,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
 
   if (num_channels == 2 || num_channels == 7)
   {
-    if ((attr = cupsFindAttr(ppd, "cupsLightBlackXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsLightBlackXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1471,14 +1471,14 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
       switch (num_channels)
       {
        case 2 :
-            cupsCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
            break;
        case 7 :
-            cupsCMYKSetCurve(cmyk, 6, num_xypoints, xypoints, log, ld);
+            cfCMYKSetCurve(cmyk, 6, num_xypoints, xypoints, log, ld);
            break;
       }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsLightBlackGamma", colormodel,
+    else if ((attr = cfFindAttr(ppd, "cupsLightBlackGamma", colormodel,
                                   media, resolution, spec,
                                  sizeof(spec), log, ld)) != NULL)
     {
@@ -1486,14 +1486,14 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        switch (num_channels)
        {
          case 2 :
-              cupsCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
              break;
          case 7 :
-              cupsCMYKSetGamma(cmyk, 6, gamval, density, log, ld);
+              cfCMYKSetGamma(cmyk, 6, gamval, density, log, ld);
              break;
        }
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsBlackLtDk", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsBlackLtDk", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
@@ -1501,10 +1501,10 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
        switch (num_channels)
        {
          case 2 :
-              cupsCMYKSetLtDk(cmyk, 0, light, dark, log, ld);
+              cfCMYKSetLtDk(cmyk, 0, light, dark, log, ld);
              break;
          case 7 :
-              cupsCMYKSetLtDk(cmyk, 5, light, dark, log, ld);
+              cfCMYKSetLtDk(cmyk, 5, light, dark, log, ld);
              break;
        }
       else
@@ -1525,7 +1525,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
     * cupsCyanLtDk attributes...
     */
 
-    if ((attr = cupsFindAttr(ppd, "cupsLightCyanXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsLightCyanXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1537,21 +1537,21 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
          xyptr += 2;
        }
 
-      cupsCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
+      cfCMYKSetCurve(cmyk, 1, num_xypoints, xypoints, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsLightCyanGamma", colormodel,
+    else if ((attr = cfFindAttr(ppd, "cupsLightCyanGamma", colormodel,
                                   media, resolution, spec,
                                  sizeof(spec), log, ld)) != NULL)
     {
       if (sscanf(attr->value, "%f%f", &gamval, &density) == 2)
-       cupsCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
+       cfCMYKSetGamma(cmyk, 1, gamval, density, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsCyanLtDk", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsCyanLtDk", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
       if (sscanf(attr->value, "%f%f", &light, &dark) == 2)
-       cupsCMYKSetLtDk(cmyk, 0, light, dark, log, ld);
+       cfCMYKSetLtDk(cmyk, 0, light, dark, log, ld);
       else
        if (log) log(ld, FILTER_LOGLEVEL_ERROR,
                     "Bad cupsCyanLtDk value \"%s\"!",
@@ -1567,7 +1567,7 @@ cupsCMYKLoad(ppd_file_t *ppd,             /* I - PPD file */
     * cupsMagentaLtDk attributes...
     */
 
-    if ((attr = cupsFindAttr(ppd, "cupsLightMagentaXY", colormodel, media,
+    if ((attr = cfFindAttr(ppd, "cupsLightMagentaXY", colormodel, media,
                              resolution, spec, sizeof(spec), log, ld)) != NULL)
     {
       for (num_xypoints = 0, xyptr = xypoints;
@@ -1579,21 +1579,21 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
          xyptr += 2;
        }
 
-      cupsCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
+      cfCMYKSetCurve(cmyk, 3, num_xypoints, xypoints, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsLightMagentaGamma", colormodel,
+    else if ((attr = cfFindAttr(ppd, "cupsLightMagentaGamma", colormodel,
                                   media, resolution, spec,
                                  sizeof(spec), log, ld)) != NULL)
     {
       if (sscanf(attr->value, "%f%f", &gamval, &density) == 2)
-       cupsCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
+       cfCMYKSetGamma(cmyk, 3, gamval, density, log, ld);
     }
-    else if ((attr = cupsFindAttr(ppd, "cupsMagentaLtDk", colormodel, media,
+    else if ((attr = cfFindAttr(ppd, "cupsMagentaLtDk", colormodel, media,
                                   resolution, spec, sizeof(spec), log, ld)) !=
             NULL)
     {
       if (sscanf(attr->value, "%f%f", &light, &dark) == 2)
-       cupsCMYKSetLtDk(cmyk, 2, light, dark, log, ld);
+       cfCMYKSetLtDk(cmyk, 2, light, dark, log, ld);
       else
        if (log) log(ld, FILTER_LOGLEVEL_ERROR,
                     "Bad cupsMagentaLtDk value \"%s\"!",
@@ -1614,13 +1614,13 @@ cupsCMYKLoad(ppd_file_t *ppd,           /* I - PPD file */
 
 
 /*
- * 'cupsCMYKNew()' - Create a new CMYK color separation.
+ * 'cfCMYKNew()' - Create a new CMYK color separation.
  */
 
-cups_cmyk_t *                          /* O - New CMYK separation or NULL */
-cupsCMYKNew(int num_channels)          /* I - Number of color components */
+cf_cmyk_t *                            /* O - New CMYK separation or NULL */
+cfCMYKNew(int num_channels)            /* I - Number of color components */
 {
-  cups_cmyk_t  *cmyk;                  /* New color separation */
+  cf_cmyk_t    *cmyk;                  /* New color separation */
   int          i;                      /* Looping var */
 
 
@@ -1635,7 +1635,7 @@ cupsCMYKNew(int num_channels)             /* I - Number of color components */
   * Allocate memory for the separation...
   */
 
-  if ((cmyk = calloc(1, sizeof(cups_cmyk_t))) == NULL)
+  if ((cmyk = calloc(1, sizeof(cf_cmyk_t))) == NULL)
     return (NULL);
 
  /*
@@ -1666,34 +1666,34 @@ cupsCMYKNew(int num_channels)           /* I - Number of color components */
     case 2 : /* Kk */
        for (i = 0; i < 256; i ++)
        {
-         cmyk->channels[0][i] = CUPS_MAX_LUT * i / 255;
+         cmyk->channels[0][i] = CF_MAX_LUT * i / 255;
        }
        break;
     case 3 : /* CMY */
        for (i = 0; i < 256; i ++)
        {
-         cmyk->channels[0][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[1][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[2][i] = CUPS_MAX_LUT * i / 255;
+         cmyk->channels[0][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[1][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[2][i] = CF_MAX_LUT * i / 255;
        }
        break;
     case 4 : /* CMYK */
        for (i = 0; i < 256; i ++)
        {
-         cmyk->channels[0][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[1][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[2][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[3][i] = CUPS_MAX_LUT * i / 255;
+         cmyk->channels[0][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[1][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[2][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[3][i] = CF_MAX_LUT * i / 255;
        }
        break;
     case 6 : /* CcMmYK */
     case 7 : /* CcMmYKk */
        for (i = 0; i < 256; i ++)
        {
-         cmyk->channels[0][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[2][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[4][i] = CUPS_MAX_LUT * i / 255;
-         cmyk->channels[5][i] = CUPS_MAX_LUT * i / 255;
+         cmyk->channels[0][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[2][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[4][i] = CF_MAX_LUT * i / 255;
+         cmyk->channels[5][i] = CF_MAX_LUT * i / 255;
        }
        break;
   }
@@ -1707,11 +1707,11 @@ cupsCMYKNew(int num_channels)           /* I - Number of color components */
 
 
 /*
- * 'cupsCMYKSetBlack()' - Set the transition range for CMY to black.
+ * 'cfCMYKSetBlack()' - Set the transition range for CMY to black.
  */
 
 void
-cupsCMYKSetBlack(cups_cmyk_t *cmyk,    /* I - CMYK color separation */
+cfCMYKSetBlack(cf_cmyk_t *cmyk,        /* I - CMYK color separation */
                 float       lower,     /* I - No black ink */
                 float       upper,     /* I - Only black ink */
                 filter_logfunc_t log,  /* I - Log function */
@@ -1770,7 +1770,7 @@ cupsCMYKSetBlack(cups_cmyk_t *cmyk,       /* I - CMYK color separation */
   }
 
   if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
-              "cupsCMYKSetBlack(cmyk, lower=%.3f, upper=%.3f)",
+              "cfCMYKSetBlack(cmyk, lower=%.3f, upper=%.3f)",
               lower, upper);
 
   if (log)
@@ -1782,11 +1782,11 @@ cupsCMYKSetBlack(cups_cmyk_t *cmyk,     /* I - CMYK color separation */
 
 
 /*
- * 'cupsCMYKSetCurve()' - Set a color transform curve using points.
+ * 'cfCMYKSetCurve()' - Set a color transform curve using points.
  */
 
 void
-cupsCMYKSetCurve(cups_cmyk_t *cmyk,    /* I - CMYK color separation */
+cfCMYKSetCurve(cf_cmyk_t *cmyk,        /* I - CMYK color separation */
                  int         channel,  /* I - Color channel */
                 int         num_xypoints,
                                        /* I - Number of X,Y points */
@@ -1820,7 +1820,7 @@ cupsCMYKSetCurve(cups_cmyk_t *cmyk,       /* I - CMYK color separation */
        num_xypoints --, xypoints += 2, xstart = xend, ystart = yend)
   {
     xend   = (int)(255.0 * xypoints[1] + 0.5);
-    yend   = (int)(CUPS_MAX_LUT * xypoints[0] + 0.5);
+    yend   = (int)(CF_MAX_LUT * xypoints[0] + 0.5);
     xdelta = xend - xstart;
     ydelta = yend - ystart;
 
@@ -1850,11 +1850,11 @@ cupsCMYKSetCurve(cups_cmyk_t *cmyk,     /* I - CMYK color separation */
 
 
 /*
- * 'cupsCMYKSetGamma()' - Set a color transform curve using gamma and density.
+ * 'cfCMYKSetGamma()' - Set a color transform curve using gamma and density.
  */
 
 void
-cupsCMYKSetGamma(cups_cmyk_t *cmyk,    /* I - CMYK color separation */
+cfCMYKSetGamma(cf_cmyk_t *cmyk,        /* I - CMYK color separation */
                  int         channel,  /* I - Ink channel */
                  float       gamval,   /* I - Gamma correction */
                 float       density,   /* I - Maximum density */
@@ -1877,11 +1877,11 @@ cupsCMYKSetGamma(cups_cmyk_t *cmyk,     /* I - CMYK color separation */
   */
 
   for (i = 0; i < 256; i ++)
-    cmyk->channels[channel][i] = (int)(density * CUPS_MAX_LUT *
+    cmyk->channels[channel][i] = (int)(density * CF_MAX_LUT *
                                        pow((float)i / 255.0, gamval) + 0.5);
 
   if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
-              "cupsCMYKSetGamma(cmyk, channel=%d, gamval=%.3f, "
+              "cfCMYKSetGamma(cmyk, channel=%d, gamval=%.3f, "
               "density=%.3f)", channel, gamval, density);
 
   if (log)
@@ -1893,26 +1893,26 @@ cupsCMYKSetGamma(cups_cmyk_t *cmyk,     /* I - CMYK color separation */
 
 
 /*
- * 'cupsCMYKSetInkLimit()' - Set the limit on the amount of ink.
+ * 'cfCMYKSetInkLimit()' - Set the limit on the amount of ink.
  */
 
 void
-cupsCMYKSetInkLimit(cups_cmyk_t *cmyk, /* I - CMYK color separation */
+cfCMYKSetInkLimit(cf_cmyk_t *cmyk,     /* I - CMYK color separation */
                     float       limit) /* I - Limit of ink */
 {
   if (!cmyk || limit < 0.0)
     return;
 
-  cmyk->ink_limit = limit * CUPS_MAX_LUT;
+  cmyk->ink_limit = limit * CF_MAX_LUT;
 }
 
 
 /*
- * 'cupsCMYKSetLtDk()' - Set light/dark ink transforms.
+ * 'cfCMYKSetLtDk()' - Set light/dark ink transforms.
  */
 
 void
-cupsCMYKSetLtDk(cups_cmyk_t *cmyk,     /* I - CMYK color separation */
+cfCMYKSetLtDk(cf_cmyk_t *cmyk, /* I - CMYK color separation */
                 int         channel,   /* I - Dark ink channel (+1 for light) */
                float       light,      /* I - Light ink only level */
                float       dark,       /* I - Dark ink only level */
@@ -1955,7 +1955,7 @@ cupsCMYKSetLtDk(cups_cmyk_t *cmyk,        /* I - CMYK color separation */
   for (i = 0; i < ilight; i ++)
   {
     cmyk->channels[channel + 0][i] = 0;
-    cmyk->channels[channel + 1][i] = CUPS_MAX_LUT * i / ilight;
+    cmyk->channels[channel + 1][i] = CF_MAX_LUT * i / ilight;
   }
 
  /*
@@ -1964,9 +1964,9 @@ cupsCMYKSetLtDk(cups_cmyk_t *cmyk,        /* I - CMYK color separation */
 
   for (; i < idark; i ++)
   {
-    cmyk->channels[channel + 0][i] = CUPS_MAX_LUT * idark * (i - ilight) /
+    cmyk->channels[channel + 0][i] = CF_MAX_LUT * idark * (i - ilight) /
                                      delta / 255;
-    cmyk->channels[channel + 1][i] = CUPS_MAX_LUT - CUPS_MAX_LUT *
+    cmyk->channels[channel + 1][i] = CF_MAX_LUT - CF_MAX_LUT *
                                      (i - ilight) / delta;
   }
 
@@ -1976,12 +1976,12 @@ cupsCMYKSetLtDk(cups_cmyk_t *cmyk,      /* I - CMYK color separation */
 
   for (; i < 256; i ++)
   {
-    cmyk->channels[channel + 0][i] = CUPS_MAX_LUT * i / 255;
+    cmyk->channels[channel + 0][i] = CF_MAX_LUT * i / 255;
     cmyk->channels[channel + 1][i] = 0;
   }
 
   if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
-              "cupsCMYKSetLtDk(cmyk, channel=%d, light=%.3f, "
+              "cfCMYKSetLtDk(cmyk, channel=%d, light=%.3f, "
               "dark=%.3f)", channel, light, dark);
 
   if (log)
index 11c97c4ff993ae2476ae67933ca0561e20ce4382..acac78c3646b0b02ca960070543b72eaa5819ffe 100644 (file)
@@ -11,9 +11,9 @@
  *
  * Contents:
  *
- *   cupsDitherDelete() - Free a dithering buffer.
- *   cupsDitherLine()   - Dither a line of pixels...
- *   cupsDitherNew()    - Create a dithering buffer.
+ *   cfDitherDelete() - Free a dithering buffer.
+ *   cfDitherLine()   - Dither a line of pixels...
+ *   cfDitherNew()    - Create a dithering buffer.
  */
 
 /*
 
 
 /*
- * 'cupsDitherDelete()' - Free a dithering buffer.
+ * 'cfDitherDelete()' - Free a dithering buffer.
  *
  * Returns 0 on success, -1 on failure.
  */
 
 void
-cupsDitherDelete(cups_dither_t *d)     /* I - Dithering buffer */
+cfDitherDelete(cf_dither_t *d) /* I - Dithering buffer */
 {
   if (d != NULL)
     free(d);
@@ -39,12 +39,12 @@ cupsDitherDelete(cups_dither_t *d)  /* I - Dithering buffer */
 
 
 /*
- * 'cupsDitherLine()' - Dither a line of pixels...
+ * 'cfDitherLine()' - Dither a line of pixels...
  */
 
 void
-cupsDitherLine(cups_dither_t    *d,    /* I - Dither data */
-               const cups_lut_t *lut,  /* I - Lookup table */
+cfDitherLine(cf_dither_t    *d,        /* I - Dither data */
+               const cf_lut_t *lut,    /* I - Lookup table */
               const short      *data,  /* I - Separation data */
               int              num_channels,
                                        /* I - Number of components */
@@ -126,8 +126,8 @@ cupsDitherLine(cups_dither_t    *d, /* I - Dither data */
 
       pixel = lut[*data].intensity + e0 / 128;
 
-      if (pixel > CUPS_MAX_LUT)
-       pixel = CUPS_MAX_LUT;
+      if (pixel > CF_MAX_LUT)
+       pixel = CF_MAX_LUT;
       else if (pixel < 0)
        pixel = 0;
 
@@ -220,8 +220,8 @@ cupsDitherLine(cups_dither_t    *d, /* I - Dither data */
 
       pixel = lut[*data].intensity + e0 / 128;
 
-      if (pixel > CUPS_MAX_LUT)
-       pixel = CUPS_MAX_LUT;
+      if (pixel > CF_MAX_LUT)
+       pixel = CF_MAX_LUT;
       else if (pixel < 0)
        pixel = 0;
 
@@ -278,16 +278,16 @@ cupsDitherLine(cups_dither_t    *d,       /* I - Dither data */
 
 
 /*
- * 'cupsDitherNew()' - Create an error-diffusion dithering buffer.
+ * 'cfDitherNew()' - Create an error-diffusion dithering buffer.
  */
 
-cups_dither_t *                        /* O - New state array */
-cupsDitherNew(int width)       /* I - Width of output in pixels */
+cf_dither_t *                  /* O - New state array */
+cfDitherNew(int width) /* I - Width of output in pixels */
 {
-  cups_dither_t        *d;             /* New dithering buffer */
+  cf_dither_t  *d;             /* New dithering buffer */
 
 
-  if ((d = (cups_dither_t *)calloc(1, sizeof(cups_dither_t) +
+  if ((d = (cf_dither_t *)calloc(1, sizeof(cf_dither_t) +
                                    2 * (width + 4) *
                                       sizeof(int))) == NULL)
     return (NULL);
index f7ae46c17a65c2ab91599515655cfa618cf3da15..66187b03db5189849f7709031b81193e48db92b4 100644 (file)
@@ -53,36 +53,36 @@ extern "C" {
  * Constants...
  */
 
-#define CUPS_MAX_CHAN  15              /* Maximum number of color components */
-#define CUPS_MAX_LUT   4095            /* Maximum LUT value */
-#define CUPS_MAX_RGB   4               /* Maximum number of sRGB components */
+#define CF_MAX_CHAN    15              /* Maximum number of color components */
+#define CF_MAX_LUT     4095            /* Maximum LUT value */
+#define CF_MAX_RGB     4               /* Maximum number of sRGB components */
 
 
 /*
  * Types/structures for the various routines.
  */
 
-typedef struct cups_lut_s              /**** Lookup Table for Dithering ****/
+typedef struct cf_lut_s                        /**** Lookup Table for Dithering ****/
 {
   short                intensity;              /* Adjusted intensity */
   short                pixel;                  /* Output pixel value */
   int          error;                  /* Error from desired value */
-} cups_lut_t;
+} cf_lut_t;
 
-typedef struct cups_dither_s           /**** Dithering State ****/
+typedef struct cf_dither_s             /**** Dithering State ****/
 {
   int          width;                  /* Width of buffer */
   int          row;                    /* Current row */
   int          errors[96];             /* Error values */
-} cups_dither_t;
+} cf_dither_t;
 
-typedef struct cups_sample_s           /**** Color sample point ****/
+typedef struct cf_sample_s             /**** Color sample point ****/
 {
   unsigned char        rgb[3];                 /* sRGB values */
-  unsigned char        colors[CUPS_MAX_RGB];   /* Color values */
-} cups_sample_t;
+  unsigned char        colors[CF_MAX_RGB];     /* Color values */
+} cf_sample_t;
 
-typedef struct cups_rgb_s              /**** Color separation lookup table ****/
+typedef struct cf_rgb_s                        /*** Color separation lookup table ***/
 {
   int          cube_size;              /* Size of color cube (2-N) on a side */
   int          num_channels;           /* Number of colors per sample */
@@ -90,19 +90,19 @@ typedef struct cups_rgb_s           /**** Color separation lookup table ****/
   int          cube_index[256];        /* Index into cube for a given sRGB value */
   int          cube_mult[256];         /* Multiplier value for a given sRGB value */
   int          cache_init;             /* Are cached values initialized? */
-  unsigned char        black[CUPS_MAX_RGB];    /* Cached black (sRGB = 0,0,0) */
-  unsigned char        white[CUPS_MAX_RGB];    /* Cached white (sRGB = 255,255,255) */
-} cups_rgb_t;
+  unsigned char        black[CF_MAX_RGB];      /* Cached black (sRGB = 0,0,0) */
+  unsigned char        white[CF_MAX_RGB];      /* Cached white (sRGB = 255,255,255) */
+} cf_rgb_t;
 
-typedef struct cups_cmyk_s             /**** Simple CMYK lookup table ****/
+typedef struct cf_cmyk_s               /**** Simple CMYK lookup table ****/
 {
   unsigned char        black_lut[256];         /* Black generation LUT */
   unsigned char        color_lut[256];         /* Color removal LUT */
   int          ink_limit;              /* Ink limit */
   int          num_channels;           /* Number of components */
-  short                *channels[CUPS_MAX_CHAN];
+  short                *channels[CF_MAX_CHAN];
                                        /* Lookup tables */
-} cups_cmyk_t;
+} cf_cmyk_t;
 
 
 /*
@@ -110,10 +110,10 @@ typedef struct cups_cmyk_s                /**** Simple CMYK lookup table ****/
  */
 
 extern const unsigned char
-                       cups_srgb_lut[256];
+                       cf_srgb_lut[256];
                                        /* sRGB gamma lookup table */
 extern const unsigned char
-                       cups_scmy_lut[256];
+                       cf_scmy_lut[256];
                                        /* sRGB gamma lookup table (inverted) */
 
 
@@ -125,133 +125,132 @@ extern const unsigned char
  * Attribute function...
  */
 
-extern ppd_attr_t      *cupsFindAttr(ppd_file_t *ppd, const char *name,
-                                     const char *colormodel,
-                                     const char *media,
-                                     const char *resolution,
-                                     char *spec, int specsize,
-                                     filter_logfunc_t log,
-                                     void *ld);
+extern ppd_attr_t      *cfFindAttr(ppd_file_t *ppd, const char *name,
+                                   const char *colormodel,
+                                   const char *media,
+                                   const char *resolution,
+                                   char *spec, int specsize,
+                                   filter_logfunc_t log,
+                                   void *ld);
                               
 /*
  * Byte checking functions...
  */
 
-extern int             cupsCheckBytes(const unsigned char *, int);
-extern int             cupsCheckValue(const unsigned char *, int,
-                                      const unsigned char);
+extern int             cfCheckBytes(const unsigned char *, int);
+extern int             cfCheckValue(const unsigned char *, int,
+                                    const unsigned char);
 
 /*
  * Dithering functions...
  */
 
-extern void            cupsDitherLine(cups_dither_t *d, const cups_lut_t *lut,
-                                      const short *data, int num_channels,
-                                      unsigned char *p);
-extern cups_dither_t   *cupsDitherNew(int width);
-extern void            cupsDitherDelete(cups_dither_t *);
+extern void            cfDitherLine(cf_dither_t *d, const cf_lut_t *lut,
+                                    const short *data, int num_channels,
+                                    unsigned char *p);
+extern cf_dither_t     *cfDitherNew(int width);
+extern void            cfDitherDelete(cf_dither_t *);
 
 /*
  * Lookup table functions for dithering...
  */
 
-extern cups_lut_t      *cupsLutNew(int num_vals, const float *vals,
-                                   filter_logfunc_t log, void *ld);
-extern void            cupsLutDelete(cups_lut_t *lut);
-extern cups_lut_t      *cupsLutLoad(ppd_file_t *ppd,
-                                    const char *colormodel,
-                                    const char *media,
-                                    const char *resolution,
-                                    const char *ink,
-                                    filter_logfunc_t log,
-                                    void *ld);
+extern cf_lut_t                *cfLutNew(int num_vals, const float *vals,
+                                 filter_logfunc_t log, void *ld);
+extern void            cfLutDelete(cf_lut_t *lut);
+extern cf_lut_t                *cfLutLoad(ppd_file_t *ppd,
+                                  const char *colormodel,
+                                  const char *media,
+                                  const char *resolution,
+                                  const char *ink,
+                                  filter_logfunc_t log,
+                                  void *ld);
 
 
 /*
  * Bit packing functions...
  */
 
-extern void            cupsPackHorizontal(const unsigned char *,
-                                          unsigned char *, int,
-                                          const unsigned char, const int);
-extern void            cupsPackHorizontal2(const unsigned char *,
-                                           unsigned char *, int, const int);
-extern void            cupsPackHorizontalBit(const unsigned char *,
-                                             unsigned char *, int,
-                                             const unsigned char,
-                                             const unsigned char);
-extern void            cupsPackVertical(const unsigned char *, unsigned char *,
-                                        int, const unsigned char, const int);
+extern void            cfPackHorizontal(const unsigned char *,
+                                        unsigned char *, int,
+                                        const unsigned char, const int);
+  extern void          cfPackHorizontal2(const unsigned char *,
+                                         unsigned char *, int, const int);
+extern void            cfPackHorizontalBit(const unsigned char *,
+                                           unsigned char *, int,
+                                           const unsigned char,
+                                           const unsigned char);
+extern void            cfPackVertical(const unsigned char *, unsigned char *,
+                                      int, const unsigned char, const int);
 
 /*
  * Color separation functions...
  */
 
-extern void            cupsRGBDelete(cups_rgb_t *rgb);
-extern void            cupsRGBDoGray(cups_rgb_t *rgb,
-                                     const unsigned char *input,
-                                     unsigned char *output, int num_pixels);
-extern void            cupsRGBDoRGB(cups_rgb_t *rgb,
-                                    const unsigned char *input,
-                                    unsigned char *output, int num_pixels);
-extern cups_rgb_t      *cupsRGBLoad(ppd_file_t *ppd,
-                                    const char *colormodel,
-                                    const char *media,
-                                    const char *resolution,
-                                    filter_logfunc_t log,
-                                    void *ld);
-extern cups_rgb_t      *cupsRGBNew(int num_samples, cups_sample_t *samples,
-                                   int cube_size, int num_channels);
+extern void            cfRGBDelete(cf_rgb_t *rgb);
+extern void            cfRGBDoGray(cf_rgb_t *rgb,
+                                   const unsigned char *input,
+                                   unsigned char *output, int num_pixels);
+extern void            cfRGBDoRGB(cf_rgb_t *rgb,
+                                  const unsigned char *input,
+                                  unsigned char *output, int num_pixels);
+extern cf_rgb_t                *cfRGBLoad(ppd_file_t *ppd,
+                                  const char *colormodel,
+                                  const char *media,
+                                  const char *resolution,
+                                  filter_logfunc_t log,
+                                  void *ld);
+extern cf_rgb_t                *cfRGBNew(int num_samples, cf_sample_t *samples,
+                                 int cube_size, int num_channels);
 
 /*
  * CMYK separation functions...
  */
 
-extern cups_cmyk_t     *cupsCMYKNew(int num_channels);
-extern void            cupsCMYKDelete(cups_cmyk_t *cmyk);
-extern void            cupsCMYKDoBlack(const cups_cmyk_t *cmyk,
-                                       const unsigned char *input,
-                                       short *output, int num_pixels);
-extern void            cupsCMYKDoCMYK(const cups_cmyk_t *cmyk,
-                                      const unsigned char *input,
-                                      short *output, int num_pixels);
-extern void            cupsCMYKDoGray(const cups_cmyk_t *cmyk,
-                                      const unsigned char *input,
-                                      short *output, int num_pixels);
-extern void            cupsCMYKDoRGB(const cups_cmyk_t *cmyk,
-                                     const unsigned char *input,
-                                     short *output, int num_pixels);
-extern cups_cmyk_t     *cupsCMYKLoad(ppd_file_t *ppd,
-                                     const char *colormodel,
-                                     const char *media,
-                                     const char *resolution,
-                                     filter_logfunc_t log,
-                                     void *ld);
-extern void            cupsCMYKSetBlack(cups_cmyk_t *cmyk,
-                                        float lower, float upper,
-                                        filter_logfunc_t log, void *ld);
-extern void            cupsCMYKSetCurve(cups_cmyk_t *cmyk, int channel,
-                                        int num_xypoints,
-                                        const float *xypoints,
-                                        filter_logfunc_t log, void *ld);
-extern void            cupsCMYKSetGamma(cups_cmyk_t *cmyk, int channel,
-                                        float gamval, float density,
-                                        filter_logfunc_t log, void *ld);
-extern void            cupsCMYKSetInkLimit(cups_cmyk_t *cmyk, float limit);
-extern void            cupsCMYKSetLtDk(cups_cmyk_t *cmyk, int channel,
-                                       float light, float dark,
-                                       filter_logfunc_t log, void *ld);
+extern cf_cmyk_t       *cfCMYKNew(int num_channels);
+extern void            cfCMYKDelete(cf_cmyk_t *cmyk);
+extern void            cfCMYKDoBlack(const cf_cmyk_t *cmyk,
+                                     const unsigned char *input,
+                                     short *output, int num_pixels);
+extern void            cfCMYKDoCMYK(const cf_cmyk_t *cmyk,
+                                    const unsigned char *input,
+                                    short *output, int num_pixels);
+extern void            cfCMYKDoGray(const cf_cmyk_t *cmyk,
+                                    const unsigned char *input,
+                                    short *output, int num_pixels);
+extern void            cfCMYKDoRGB(const cf_cmyk_t *cmyk,
+                                   const unsigned char *input,
+                                   short *output, int num_pixels);
+extern cf_cmyk_t       *cfCMYKLoad(ppd_file_t *ppd,
+                                   const char *colormodel,
+                                   const char *media,
+                                   const char *resolution,
+                                   filter_logfunc_t log,
+                                   void *ld);
+  extern void          cfCMYKSetBlack(cf_cmyk_t *cmyk,
+                                      float lower, float upper,
+                                      filter_logfunc_t log, void *ld);
+extern void            cfCMYKSetCurve(cf_cmyk_t *cmyk, int channel,
+                                      int num_xypoints,
+                                      const float *xypoints,
+                                      filter_logfunc_t log, void *ld);
+extern void            cfCMYKSetGamma(cf_cmyk_t *cmyk, int channel,
+                                      float gamval, float density,
+                                      filter_logfunc_t log, void *ld);
+extern void            cfCMYKSetInkLimit(cf_cmyk_t *cmyk, float limit);
+  extern void          cfCMYKSetLtDk(cf_cmyk_t *cmyk, int channel,
+                                     float light, float dark,
+                                     filter_logfunc_t log, void *ld);
 
 
 /*
  * Convenience macro for writing print data...
  */
 
-#  define cupsWritePrintData(s,n) fwrite((s), 1, (n), stdout)
+#  define cfWritePrintData(s,n) fwrite((s), 1, (n), stdout)
 
 #  ifdef __cplusplus
 }
 #  endif /* __cplusplus */
 
 #endif /* !_CUPS_FILTERS_DRIVER_H_ */
-
index 34d54e502a1995e3810a110af7d82548ad780ec3..24890322030a1fcc6fd7e776c624f31a787ff645 100644 (file)
@@ -11,9 +11,9 @@
  *
  * Contents:
  *
- *   cupsLutDelete() - Free the memory used by a lookup table.
- *   cupsLutLoad()   - Load a LUT from a PPD file.
- *   cupsLutNew()    - Make a lookup table from a list of pixel values.
+ *   cfLutDelete() - Free the memory used by a lookup table.
+ *   cfLutLoad()   - Load a LUT from a PPD file.
+ *   cfLutNew()    - Make a lookup table from a list of pixel values.
  */
 
 /*
 
 
 /*
- * 'cupsLutDelete()' - Free the memory used by a lookup table.
+ * 'cfLutDelete()' - Free the memory used by a lookup table.
  */
 
 void
-cupsLutDelete(cups_lut_t *lut)         /* I - Lookup table to free */
+cfLutDelete(cf_lut_t *lut)             /* I - Lookup table to free */
 {
   if (lut != NULL)
     free(lut);
@@ -37,11 +37,11 @@ cupsLutDelete(cups_lut_t *lut)              /* I - Lookup table to free */
 
 
 /*
- * 'cupsLutLoad()' - Load a LUT from a PPD file.
+ * 'cfLutLoad()' - Load a LUT from a PPD file.
  */
 
-cups_lut_t *                           /* O - New lookup table */
-cupsLutLoad(ppd_file_t *ppd,           /* I - PPD file */
+cf_lut_t *                             /* O - New lookup table */
+cfLutLoad(ppd_file_t *ppd,             /* I - PPD file */
             const char *colormodel,    /* I - Color model */
             const char *media,         /* I - Media type */
             const char *resolution,    /* I - Resolution */
@@ -69,9 +69,9 @@ cupsLutLoad(ppd_file_t *ppd,          /* I - PPD file */
 
   snprintf(name, sizeof(name), "cups%sDither", ink);
 
-  if ((attr = cupsFindAttr(ppd, name, colormodel, media, resolution, spec,
+  if ((attr = cfFindAttr(ppd, name, colormodel, media, resolution, spec,
                            sizeof(spec), log, ld)) == NULL)
-    attr = cupsFindAttr(ppd, "cupsAllDither", colormodel, media,
+    attr = cfFindAttr(ppd, "cupsAllDither", colormodel, media,
                         resolution, spec, sizeof(spec), log, ld);
 
   if (!attr)
@@ -87,24 +87,24 @@ cupsLutLoad(ppd_file_t *ppd,                /* I - PPD file */
               "Loaded LUT %s from PPD with values [%.3f %.3f %.3f %.3f]",
               name, vals[0], vals[1], vals[2], vals[3]);
 
-  return (cupsLutNew(nvals, vals, log, ld));
+  return (cfLutNew(nvals, vals, log, ld));
 }
 
 
 /*
- * 'cupsLutNew()' - Make a lookup table from a list of pixel values.
+ * 'cfLutNew()' - Make a lookup table from a list of pixel values.
  *
  * Returns a pointer to the lookup table on success, NULL on failure.
  */
 
-cups_lut_t *                           /* O - New lookup table */
-cupsLutNew(int         num_values,     /* I - Number of values */
+cf_lut_t *                             /* O - New lookup table */
+cfLutNew(int         num_values,       /* I - Number of values */
           const float *values,         /* I - Lookup table values */
           filter_logfunc_t log,        /* I - Log function */
           void        *ld)             /* I - Log function data */
 {
   int          pixel;                  /* Pixel value */
-  cups_lut_t   *lut;                   /* Lookup table */
+  cf_lut_t     *lut;                   /* Lookup table */
   int          start,                  /* Start value */
                end,                    /* End value */
                maxval;                 /* Maximum value */
@@ -121,8 +121,8 @@ cupsLutNew(int         num_values,  /* I - Number of values */
   * Allocate memory for the lookup table...
   */
 
-  if ((lut = (cups_lut_t *)calloc((CUPS_MAX_LUT + 1),
-                                  sizeof(cups_lut_t))) == NULL)
+  if ((lut = (cf_lut_t *)calloc((CF_MAX_LUT + 1),
+                                  sizeof(cf_lut_t))) == NULL)
     return (NULL);
 
  /*
@@ -132,10 +132,10 @@ cupsLutNew(int         num_values,        /* I - Number of values */
   * close enough for jazz.
   */
 
-  maxval = CUPS_MAX_LUT / values[num_values - 1];
+  maxval = CF_MAX_LUT / values[num_values - 1];
 
-  for (start = 0; start <= CUPS_MAX_LUT; start ++)
-    lut[start].intensity = start * maxval / CUPS_MAX_LUT;
+  for (start = 0; start <= CF_MAX_LUT; start ++)
+    lut[start].intensity = start * maxval / CF_MAX_LUT;
 
   for (pixel = 0; pixel < num_values; pixel ++)
   {
@@ -151,18 +151,18 @@ cupsLutNew(int         num_values,        /* I - Number of values */
 
     if (start < 0)
       start = 0;
-    else if (start > CUPS_MAX_LUT)
-      start = CUPS_MAX_LUT;
+    else if (start > CF_MAX_LUT)
+      start = CF_MAX_LUT;
 
     if (pixel == (num_values - 1))
-      end = CUPS_MAX_LUT;
+      end = CF_MAX_LUT;
     else
       end = (int)(0.5 * maxval * (values[pixel] + values[pixel + 1]));
 
     if (end < 0)
       end = 0;
-    else if (end > CUPS_MAX_LUT)
-      end = CUPS_MAX_LUT;
+    else if (end > CF_MAX_LUT)
+      end = CF_MAX_LUT;
 
     if (start == end)
       break;
@@ -188,7 +188,7 @@ cupsLutNew(int         num_values,  /* I - Number of values */
   */
 
   if (log)
-    for (start = 0; start <= CUPS_MAX_LUT; start += CUPS_MAX_LUT / 15)
+    for (start = 0; start <= CF_MAX_LUT; start += CF_MAX_LUT / 15)
       log(ld, FILTER_LOGLEVEL_DEBUG,
          "%d = %d/%d/%d", start, lut[start].intensity,
          lut[start].pixel, lut[start].error);
index 3ac1a07d61251c291c62f10ca3a5b987b1b40340..9adf2b2d4dc33891265b2d824b72e68d57c0bddc 100644 (file)
  *
  * Contents:
  *
- *   cupsPackHorizontal()    - Pack pixels horizontally...
- *   cupsPackHorizontal2()   - Pack 2-bit pixels horizontally...
- *   cupsPackHorizontalBit() - Pack pixels horizontally by bit...
- *   cupsPackVertical()      - Pack pixels vertically...
+ *   cfPackHorizontal()    - Pack pixels horizontally...
+ *   cfPackHorizontal2()   - Pack 2-bit pixels horizontally...
+ *   cfPackHorizontalBit() - Pack pixels horizontally by bit...
+ *   cfPackVertical()      - Pack pixels vertically...
  */
 
 /*
 
 
 /*
- * 'cupsPackHorizontal()' - Pack pixels horizontally...
+ * 'cfPackHorizontal()' - Pack pixels horizontally...
  */
 
 void
-cupsPackHorizontal(const unsigned char *ipixels,/* I - Input pixels */
+cfPackHorizontal(const unsigned char *ipixels,/* I - Input pixels */
                   unsigned char       *obytes, /* O - Output bytes */
                   int                 width,   /* I - Number of pixels */
                   const unsigned char clearto, /* I - Initial value of bytes */
@@ -112,11 +112,11 @@ cupsPackHorizontal(const unsigned char *ipixels,/* I - Input pixels */
 
 
 /*
- * 'cupsPackHorizontal2()' - Pack 2-bit pixels horizontally...
+ * 'cfPackHorizontal2()' - Pack 2-bit pixels horizontally...
  */
 
 void
-cupsPackHorizontal2(const unsigned char *ipixels,      /* I - Input pixels */
+cfPackHorizontal2(const unsigned char *ipixels,        /* I - Input pixels */
                    unsigned char       *obytes,        /* O - Output bytes */
                    int                 width,          /* I - Number of pixels */
                    const int           step)           /* I - Stepping value */
@@ -165,11 +165,11 @@ cupsPackHorizontal2(const unsigned char *ipixels, /* I - Input pixels */
 
 
 /*
- * 'cupsPackHorizontalBit()' - Pack pixels horizontally by bit...
+ * 'cfPackHorizontalBit()' - Pack pixels horizontally by bit...
  */
 
 void
-cupsPackHorizontalBit(const unsigned char *ipixels,    /* I - Input pixels */
+cfPackHorizontalBit(const unsigned char *ipixels,      /* I - Input pixels */
                       unsigned char       *obytes,     /* O - Output bytes */
                       int                 width,       /* I - Number of pixels */
                       const unsigned char clearto,     /* I - Initial value of bytes */
@@ -244,11 +244,11 @@ cupsPackHorizontalBit(const unsigned char *ipixels,       /* I - Input pixels */
 
 
 /*
- * 'cupsPackVertical()' - Pack pixels vertically...
+ * 'cfPackVertical()' - Pack pixels vertically...
  */
 
 void
-cupsPackVertical(const unsigned char *ipixels, /* I - Input pixels */
+cfPackVertical(const unsigned char *ipixels,   /* I - Input pixels */
                  unsigned char       *obytes,  /* O - Output bytes */
                  int                 width,    /* I - Number of input pixels */
                  const unsigned char bit,      /* I - Output bit */
index 2e742a20b4189f6c77abfaff52ea0774678e20ab..dc39c76747c65405a6366ad4230b9551b8805608 100644 (file)
  *
  * Contents:
  *
- *   cupsRGBDelete() - Delete a color separation.
- *   cupsRGBDoGray() - Do a grayscale separation...
- *   cupsRGBDoRGB()  - Do a RGB separation...
- *   cupsRGBLoad()   - Load a RGB color profile from a PPD file.
- *   cupsRGBNew()    - Create a new RGB color separation.
+ *   cfRGBDelete() - Delete a color separation.
+ *   cfRGBDoGray() - Do a grayscale separation...
+ *   cfRGBDoRGB()  - Do a RGB separation...
+ *   cfRGBLoad()   - Load a RGB color profile from a PPD file.
+ *   cfRGBNew()    - Create a new RGB color separation.
  */
 
 /*
 
 
 /*
- * 'cupsRGBDelete()' - Delete a color separation.
+ * 'cfRGBDelete()' - Delete a color separation.
  */
 
 void
-cupsRGBDelete(cups_rgb_t *rgbptr)      /* I - Color separation */
+cfRGBDelete(cf_rgb_t *rgbptr)  /* I - Color separation */
 {
   if (rgbptr == NULL)
     return;
@@ -44,11 +44,11 @@ cupsRGBDelete(cups_rgb_t *rgbptr)   /* I - Color separation */
 
 
 /*
- * 'cupsRGBDoGray()' - Do a grayscale separation...
+ * 'cfRGBDoGray()' - Do a grayscale separation...
  */
 
 void
-cupsRGBDoGray(cups_rgb_t          *rgbptr,
+cfRGBDoGray(cf_rgb_t          *rgbptr,
                                        /* I - Color separation */
              const unsigned char *input,
                                        /* I - Input grayscale pixels */
@@ -95,7 +95,7 @@ cupsRGBDoGray(cups_rgb_t          *rgbptr,
 
     num_pixels --;
 
-    g = cups_srgb_lut[*input++];
+    g = cf_srgb_lut[*input++];
 
     if (g == lastgray)
     {
@@ -157,11 +157,11 @@ cupsRGBDoGray(cups_rgb_t          *rgbptr,
 
 
 /*
- * 'cupsRGBDoRGB()' - Do a RGB separation...
+ * 'cfRGBDoRGB()' - Do a RGB separation...
  */
 
 void
-cupsRGBDoRGB(cups_rgb_t          *rgbptr,
+cfRGBDoRGB(cf_rgb_t          *rgbptr,
                                        /* I - Color separation */
             const unsigned char *input,
                                        /* I - Input RGB pixels */
@@ -215,9 +215,9 @@ cupsRGBDoRGB(cups_rgb_t          *rgbptr,
 
     num_pixels --;
 
-    r   = cups_srgb_lut[*input++];
-    g   = cups_srgb_lut[*input++];
-    b   = cups_srgb_lut[*input++];
+    r   = cf_srgb_lut[*input++];
+    g   = cf_srgb_lut[*input++];
+    b   = cf_srgb_lut[*input++];
     rgb = (((r << 8) | g) << 8) | b;
 
     if (rgb == lastrgb)
@@ -300,11 +300,11 @@ cupsRGBDoRGB(cups_rgb_t          *rgbptr,
 
 
 /*
- * 'cupsRGBLoad()' - Load a RGB color profile from a PPD file.
+ * 'cfRGBLoad()' - Load a RGB color profile from a PPD file.
  */
 
-cups_rgb_t *                           /* O - New color profile */
-cupsRGBLoad(ppd_file_t *ppd,           /* I - PPD file */
+cf_rgb_t *                             /* O - New color profile */
+cfRGBLoad(ppd_file_t *ppd,             /* I - PPD file */
             const char *colormodel,    /* I - Color model */
             const char *media,         /* I - Media type */
             const char *resolution,    /* I - Resolution */
@@ -315,11 +315,11 @@ cupsRGBLoad(ppd_file_t *ppd,              /* I - PPD file */
                cube_size,              /* Size of color lookup cube */
                num_channels,           /* Number of color channels */
                num_samples;            /* Number of color samples */
-  cups_sample_t        *samples;               /* Color samples */
+  cf_sample_t  *samples;               /* Color samples */
   float                values[7];              /* Color sample values */
   char         spec[PPD_MAX_NAME];     /* Profile name */
   ppd_attr_t   *attr;                  /* Attribute from PPD file */
-  cups_rgb_t   *rgbptr;                /* RGB color profile */
+  cf_rgb_t     *rgbptr;                /* RGB color profile */
 
 
  /*
@@ -330,7 +330,7 @@ cupsRGBLoad(ppd_file_t *ppd,                /* I - PPD file */
   *    cupsRGBSample   - Specifies an RGB to CMYK color sample
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsRGBProfile", colormodel, media,
+  if ((attr = cfFindAttr(ppd, "cupsRGBProfile", colormodel, media,
                            resolution, spec, sizeof(spec), log, ld)) == NULL)
   {
     if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
@@ -348,7 +348,7 @@ cupsRGBLoad(ppd_file_t *ppd,                /* I - PPD file */
   }
 
   if (cube_size < 2 || cube_size > 16 ||
-      num_channels < 1 || num_channels > CUPS_MAX_RGB ||
+      num_channels < 1 || num_channels > CF_MAX_RGB ||
       num_samples != (cube_size * cube_size * cube_size))
   {
     if (log) log(ld, FILTER_LOGLEVEL_ERROR,
@@ -361,7 +361,7 @@ cupsRGBLoad(ppd_file_t *ppd,                /* I - PPD file */
   * Allocate memory for the samples and read them...
   */
 
-  if ((samples = calloc(num_samples, sizeof(cups_sample_t))) == NULL)
+  if ((samples = calloc(num_samples, sizeof(cf_sample_t))) == NULL)
   {
     if (log) log(ld, FILTER_LOGLEVEL_ERROR,
                 "Unable to allocate memory for RGB profile!");
@@ -408,7 +408,7 @@ cupsRGBLoad(ppd_file_t *ppd,                /* I - PPD file */
   */
 
   if (i == num_samples)
-    rgbptr = cupsRGBNew(num_samples, samples, cube_size, num_channels);
+    rgbptr = cfRGBNew(num_samples, samples, cube_size, num_channels);
   else
     rgbptr = NULL;
 
@@ -423,16 +423,16 @@ cupsRGBLoad(ppd_file_t *ppd,              /* I - PPD file */
 
 
 /*
- * 'cupsRGBNew()' - Create a new RGB color separation.
+ * 'cfRGBNew()' - Create a new RGB color separation.
  */
 
-cups_rgb_t *                           /* O - New color separation or NULL */
-cupsRGBNew(int           num_samples,  /* I - Number of samples */
-          cups_sample_t *samples,      /* I - Samples */
+cf_rgb_t *                             /* O - New color separation or NULL */
+cfRGBNew(int           num_samples,    /* I - Number of samples */
+          cf_sample_t *samples,        /* I - Samples */
           int           cube_size,     /* I - Size of LUT cube */
            int           num_channels) /* I - Number of color components */
 {
-  cups_rgb_t           *rgbptr;        /* New color separation */
+  cf_rgb_t             *rgbptr;        /* New color separation */
   int                  i;              /* Looping var */
   int                  r, g, b;        /* Current RGB */
   int                  tempsize;       /* Sibe of main arrays */
@@ -448,14 +448,14 @@ cupsRGBNew(int           num_samples,     /* I - Number of samples */
   */
 
   if (!samples || num_samples != (cube_size * cube_size * cube_size) ||
-      num_channels <= 0 || num_channels > CUPS_MAX_RGB)
+      num_channels <= 0 || num_channels > CF_MAX_RGB)
     return (NULL);
 
  /*
   * Allocate memory for the separation...
   */
 
-  if ((rgbptr = calloc(1, sizeof(cups_rgb_t))) == NULL)
+  if ((rgbptr = calloc(1, sizeof(cf_rgb_t))) == NULL)
     return (NULL);
 
  /*
@@ -540,13 +540,13 @@ cupsRGBNew(int           num_samples,     /* I - Number of samples */
   rgb[1] = 0;
   rgb[2] = 0;
 
-  cupsRGBDoRGB(rgbptr, rgb, rgbptr->black, 1);
+  cfRGBDoRGB(rgbptr, rgb, rgbptr->black, 1);
 
   rgb[0] = 255;
   rgb[1] = 255;
   rgb[2] = 255;
 
-  cupsRGBDoRGB(rgbptr, rgb, rgbptr->white, 1);
+  cfRGBDoRGB(rgbptr, rgb, rgbptr->white, 1);
 
   rgbptr->cache_init = 1;
 
index bce4e9ef054828fe0b9d2cfffeedb91864c4b6c2..8a4ad6ddc2c9b6ac67c6f16baa0b835607a4779d 100644 (file)
@@ -21,7 +21,7 @@
  * sRGB gamma lookup table.
  */
 
-const unsigned char cups_srgb_lut[256] =
+const unsigned char cf_srgb_lut[256] =
 {
     0,  20,  28,  33,  38,  42,  46,  49,  52,  55,  58,  61,  63,  65,  68,
    70,  72,  74,  76,  78,  80,  81,  83,  85,  87,  88,  90,  91,  93,  94,
@@ -48,7 +48,7 @@ const unsigned char cups_srgb_lut[256] =
  * sRGB gamma lookup table (inverted output to map to CMYK...)
  */
 
-const unsigned char cups_scmy_lut[256] =
+const unsigned char cf_scmy_lut[256] =
 {
   255, 235, 227, 222, 217, 213, 209, 206, 203, 200, 197, 194, 192, 190, 187,
   185, 183, 181, 179, 177, 175, 174, 172, 170, 168, 167, 165, 164, 162, 161,
index ab919b90143946a172b57aabcf236cd71f51a188..ecef8656dc89e39f21c63c0a5d78db0b70f9a62d 100644 (file)
@@ -91,10 +91,10 @@ test_gray(int        num_comps,             /* I - Number of components */
   short                        output[48000],  /* Output separation data */
                        *outptr;        /* Pointer in output */
   FILE                 *in;            /* Input PPM file */
-  FILE                 *out[CUPS_MAX_CHAN];
+  FILE                 *out[CF_MAX_CHAN];
                                        /* Output PGM files */
   FILE                 *comp;          /* Composite output */
-  cups_cmyk_t          *cmyk;          /* Color separation */
+  cf_cmyk_t            *cmyk;          /* Color separation */
 
 
  /*
@@ -114,31 +114,31 @@ test_gray(int        num_comps,           /* I - Number of components */
   * Create the color separation...
   */
 
-  cmyk = cupsCMYKNew(num_comps);
+  cmyk = cfCMYKNew(num_comps);
 
   switch (num_comps)
   {
     case 2 : /* Kk */
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
        break;
 
     case 4 :
-       cupsCMYKSetGamma(cmyk, 2, 1.0, 0.9, logfunc, ld);
-        cupsCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 2, 1.0, 0.9, logfunc, ld);
+        cfCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
        break;
 
     case 6 : /* CcMmYK */
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
-       cupsCMYKSetGamma(cmyk, 4, 1.0, 0.9, logfunc, ld);
-        cupsCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 4, 1.0, 0.9, logfunc, ld);
+        cfCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
        break;
 
     case 7 : /* CcMmYKk */
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
-       cupsCMYKSetGamma(cmyk, 4, 1.0, 0.9, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 5, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 4, 1.0, 0.9, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 5, 0.5, 1.0, logfunc, ld);
        break;
   }
 
@@ -167,7 +167,7 @@ test_gray(int        num_comps,             /* I - Number of components */
   {
     fread(input, width, 1, in);
 
-    cupsCMYKDoGray(cmyk, input, output, width);
+    cfCMYKDoGray(cmyk, input, output, width);
 
     for (x = 0, outptr = output; x < width; x ++, outptr += num_comps)
     {
@@ -251,7 +251,7 @@ test_gray(int        num_comps,             /* I - Number of components */
   fclose(comp);
   fclose(in);
 
-  cupsCMYKDelete(cmyk);
+  cfCMYKDelete(cmyk);
 }
 
 
@@ -273,10 +273,10 @@ test_rgb(int        num_comps,            /* I - Number of components */
   short                        output[48000],  /* Output separation data */
                        *outptr;        /* Pointer in output */
   FILE                 *in;            /* Input PPM file */
-  FILE                 *out[CUPS_MAX_CHAN];
+  FILE                 *out[CF_MAX_CHAN];
                                        /* Output PGM files */
   FILE                 *comp;          /* Composite output */
-  cups_cmyk_t          *cmyk;          /* Color separation */
+  cf_cmyk_t            *cmyk;          /* Color separation */
 
 
  /*
@@ -296,27 +296,27 @@ test_rgb(int        num_comps,            /* I - Number of components */
   * Create the color separation...
   */
 
-  cmyk = cupsCMYKNew(num_comps);
+  cmyk = cfCMYKNew(num_comps);
 
-  cupsCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
+  cfCMYKSetBlack(cmyk, 0.5, 1.0, logfunc, ld);
 
   switch (num_comps)
   {
     case 2 : /* Kk */
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
        break;
     case 6 : /* CcMmYK */
-       cupsCMYKSetGamma(cmyk, 0, 1.0, 0.8, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
-       cupsCMYKSetGamma(cmyk, 2, 1.0, 0.8, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 0, 1.0, 0.8, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 2, 1.0, 0.8, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
        break;
     case 7 : /* CcMmYKk */
-       cupsCMYKSetGamma(cmyk, 0, 1.0, 0.8, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
-       cupsCMYKSetGamma(cmyk, 2, 1.0, 0.8, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
-        cupsCMYKSetLtDk(cmyk, 5, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 0, 1.0, 0.8, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 0, 0.5, 1.0, logfunc, ld);
+       cfCMYKSetGamma(cmyk, 2, 1.0, 0.8, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 2, 0.5, 1.0, logfunc, ld);
+        cfCMYKSetLtDk(cmyk, 5, 0.5, 1.0, logfunc, ld);
        break;
   }
 
@@ -345,7 +345,7 @@ test_rgb(int        num_comps,              /* I - Number of components */
   {
     fread(input, width, 3, in);
 
-    cupsCMYKDoRGB(cmyk, input, output, width);
+    cfCMYKDoRGB(cmyk, input, output, width);
 
     for (x = 0, outptr = output; x < width; x ++, outptr += num_comps)
     {
@@ -429,6 +429,6 @@ test_rgb(int        num_comps,              /* I - Number of components */
   fclose(comp);
   fclose(in);
 
-  cupsCMYKDelete(cmyk);
+  cfCMYKDelete(cmyk);
 }
 
index 7e3d9f9efe951797ebebca150cb581c72079fb5a..f6c590de69357486f61fa076714e3dfaf635b37a 100644 (file)
@@ -57,8 +57,8 @@ main(int  argc,                       /* I - Number of command-line arguments */
   unsigned char        pixels[512],    /* Dither pixels */
                *pixptr;        /* Pointer in line */
   int          output;         /* Output pixel */
-  cups_lut_t   *lut;           /* Dither lookup table */
-  cups_dither_t        *dither;        /* Dither state */
+  cf_lut_t     *lut;           /* Dither lookup table */
+  cf_dither_t  *dither;        /* Dither state */
   int          nlutvals;       /* Number of lookup values */
   float                lutvals[16];    /* Lookup values */
   int          pixvals[16];    /* Pixel values */
@@ -110,8 +110,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
   * Create the lookup table and dither state...
   */
 
-  lut    = cupsLutNew(nlutvals, lutvals, logfunc, ld);
-  dither = cupsDitherNew(512);
+  lut    = cfLutNew(nlutvals, lutvals, logfunc, ld);
+  dither = cfDitherNew(512);
 
  /*
   * Put out the PGM header for a raw 256x256x8-bit grayscale file...
@@ -136,7 +136,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
     * Dither the line...
     */
 
-    cupsDitherLine(dither, lut, line, 1, pixels);
+    cfDitherLine(dither, lut, line, 1, pixels);
 
     if (y == 0)
     {
@@ -165,8 +165,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
   * Free the dither state and lookup table...
   */
 
-  cupsDitherDelete(dither);
-  cupsLutDelete(lut);
+  cfDitherDelete(dither);
+  cfLutDelete(lut);
 
  /*
   * Return with no errors...
index 11fcf7d6c898ede9ad31d967fdaf8950a30cdd5a..4051ecb9f33ca98586242c0f837a1dd6a20bb3a3 100644 (file)
@@ -31,9 +31,9 @@
 #endif /* USE_LCMS1 */
 
 
-void   test_gray(cups_sample_t *samples, int num_samples,
+void   test_gray(cf_sample_t *samples, int num_samples,
                  int cube_size, int num_comps, const char *basename);
-void   test_rgb(cups_sample_t *samples, int num_samples,
+void   test_rgb(cf_sample_t *samples, int num_samples,
                 int cube_size, int num_comps,
                 const char *basename);
 
@@ -46,7 +46,7 @@ int                                           /* O - Exit status */
 main(int  argc,                                        /* I - Number of command-line arguments */
      char *argv[])                             /* I - Command-line arguments */
 {
-  static cups_sample_t CMYK[] =                /* Basic 4-color sep */
+  static cf_sample_t   CMYK[] =                /* Basic 4-color sep */
                        {
                          /*{ r,   g,   b   }, { C,   M,   Y,   K   }*/
                          { { 0,   0,   0   }, { 0,   0,   0,   255 } },
@@ -87,7 +87,7 @@ main(int  argc,                                       /* I - Number of command-line arguments */
  */
 
 void
-test_gray(cups_sample_t *samples,      /* I - Sample values */
+test_gray(cf_sample_t *samples,        /* I - Sample values */
           int           num_samples,   /* I - Number of samples */
          int           cube_size,      /* I - Cube size */
           int           num_comps,     /* I - Number of components */
@@ -103,10 +103,10 @@ test_gray(cups_sample_t *samples, /* I - Sample values */
   unsigned char                output[48000],  /* Output rgb data */
                        *outptr;        /* Pointer in output */
   FILE                 *in;            /* Input PPM file */
-  FILE                 *out[CUPS_MAX_CHAN];
+  FILE                 *out[CF_MAX_CHAN];
                                        /* Output PGM files */
   FILE                 *comp;          /* Composite output */
-  cups_rgb_t           *rgb;           /* Color separation */
+  cf_rgb_t             *rgb;           /* Color separation */
 
 
  /*
@@ -126,7 +126,7 @@ test_gray(cups_sample_t *samples,   /* I - Sample values */
   * Create the color rgb...
   */
 
-  rgb = cupsRGBNew(num_samples, samples, cube_size, num_comps);
+  rgb = cfRGBNew(num_samples, samples, cube_size, num_comps);
 
  /*
   * Open the color rgb files...
@@ -153,7 +153,7 @@ test_gray(cups_sample_t *samples,   /* I - Sample values */
   {
     fread(input, width, 1, in);
 
-    cupsRGBDoGray(rgb, input, output, width);
+    cfRGBDoGray(rgb, input, output, width);
 
     for (x = 0, outptr = output; x < width; x ++, outptr += num_comps)
     {
@@ -208,7 +208,7 @@ test_gray(cups_sample_t *samples,   /* I - Sample values */
   fclose(comp);
   fclose(in);
 
-  cupsRGBDelete(rgb);
+  cfRGBDelete(rgb);
 }
 
 
@@ -217,7 +217,7 @@ test_gray(cups_sample_t *samples,   /* I - Sample values */
  */
 
 void
-test_rgb(cups_sample_t *samples,       /* I - Sample values */
+test_rgb(cf_sample_t *samples, /* I - Sample values */
          int           num_samples,    /* I - Number of samples */
         int           cube_size,       /* I - Cube size */
          int           num_comps,      /* I - Number of components */
@@ -233,10 +233,10 @@ test_rgb(cups_sample_t *samples,  /* I - Sample values */
   unsigned char                output[48000],  /* Output rgb data */
                        *outptr;        /* Pointer in output */
   FILE                 *in;            /* Input PPM file */
-  FILE                 *out[CUPS_MAX_CHAN];
+  FILE                 *out[CF_MAX_CHAN];
                                        /* Output PGM files */
   FILE                 *comp;          /* Composite output */
-  cups_rgb_t           *rgb;           /* Color separation */
+  cf_rgb_t             *rgb;           /* Color separation */
 
 
  /*
@@ -256,7 +256,7 @@ test_rgb(cups_sample_t *samples,    /* I - Sample values */
   * Create the color rgb...
   */
 
-  rgb = cupsRGBNew(num_samples, samples, cube_size, num_comps);
+  rgb = cfRGBNew(num_samples, samples, cube_size, num_comps);
 
  /*
   * Open the color rgb files...
@@ -283,7 +283,7 @@ test_rgb(cups_sample_t *samples,    /* I - Sample values */
   {
     fread(input, width, 3, in);
 
-    cupsRGBDoRGB(rgb, input, output, width);
+    cfRGBDoRGB(rgb, input, output, width);
 
     for (x = 0, outptr = output; x < width; x ++, outptr += num_comps)
     {
@@ -338,6 +338,6 @@ test_rgb(cups_sample_t *samples,    /* I - Sample values */
   fclose(comp);
   fclose(in);
 
-  cupsRGBDelete(rgb);
+  cfRGBDelete(rgb);
 }
 
index ed5fdb67033bde6efc8298b74528fd4aa9f1a233..128081763e55142e293b560e18a93c73d6fcfc77 100644 (file)
@@ -89,19 +89,19 @@ main(int  argc,                                     /* I - Number of command-line arguments */
   */
 
   if (ppd->model_number & ESCP_USB)
-    cupsWritePrintData("\000\000\000\033\001@EJL 1284.4\n@EJL     \n\033@", 29);
+    cfWritePrintData("\000\000\000\033\001@EJL 1284.4\n@EJL     \n\033@", 29);
 
  /*
   * Reset the printer...
   */
 
-  cupsWritePrintData("\033@", 2);
+  cfWritePrintData("\033@", 2);
 
  /*
   * Enter remote mode...
   */
 
-  cupsWritePrintData("\033(R\010\000\000REMOTE1", 13);
+  cfWritePrintData("\033(R\010\000\000REMOTE1", 13);
   feedpage = 0;
 
  /*
@@ -141,7 +141,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
       * Clean heads...
       */
 
-      cupsWritePrintData("CH\002\000\000\000", 6);
+      cfWritePrintData("CH\002\000\000\000", 6);
     }
     else if (strncasecmp(lineptr, "PrintAlignmentPage", 18) == 0)
     {
@@ -153,7 +153,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
 
       phase = atoi(lineptr + 18);
 
-      cupsWritePrintData("DT\003\000\000", 5);
+      cfWritePrintData("DT\003\000\000", 5);
       putchar(phase & 255);
       putchar(phase >> 8);
       feedpage = 1;
@@ -164,8 +164,8 @@ main(int  argc,                                     /* I - Number of command-line arguments */
       * Print version info and nozzle check...
       */
 
-      cupsWritePrintData("VI\002\000\000\000", 6);
-      cupsWritePrintData("NC\002\000\000\000", 6);
+      cfWritePrintData("VI\002\000\000\000", 6);
+      cfWritePrintData("NC\002\000\000\000", 6);
       feedpage = 1;
     }
     else if (strncasecmp(lineptr, "ReportLevels", 12) == 0)
@@ -174,7 +174,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
       * Report ink levels...
       */
 
-      cupsWritePrintData("IQ\001\000\001", 5);
+      cfWritePrintData("IQ\001\000\001", 5);
     }
     else if (strncasecmp(lineptr, "SetAlignment", 12) == 0)
     {
@@ -190,12 +190,12 @@ main(int  argc,                                   /* I - Number of command-line arguments */
         continue;
       }
 
-      cupsWritePrintData("DA\004\000", 4);
+      cfWritePrintData("DA\004\000", 4);
       putchar(0);
       putchar(phase);
       putchar(0);
       putchar(x);
-      cupsWritePrintData("SV\000\000", 4);
+      cfWritePrintData("SV\000\000", 4);
     }
     else
       fprintf(stderr, "ERROR: Invalid printer command \"%s\"!\n", lineptr);
@@ -205,7 +205,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
   * Exit remote mode...
   */
 
-  cupsWritePrintData("\033\000\000\000", 4);
+  cfWritePrintData("\033\000\000\000", 4);
 
  /*
   * Eject the page as needed...
@@ -224,7 +224,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
   * Reset the printer...
   */
 
-  cupsWritePrintData("\033@", 2);
+  cfWritePrintData("\033@", 2);
 
  /*
   * Close the command file and return...
index ab30b786d756f9845ef24fd1b265397f00dc1232..096b144528dcb5d846cf6b2f17ff2a86618f8515 100644 (file)
@@ -87,7 +87,7 @@ main(int  argc,                                       /* I - Number of command-line arguments */
   * Reset the printer...
   */
 
-  cupsWritePrintData("\033E", 2);
+  cfWritePrintData("\033E", 2);
 
  /*
   * Read the commands from the file and send the appropriate commands...
@@ -129,7 +129,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
       * Clean heads...
       */
 
-      cupsWritePrintData("\033&b16WPML \004\000\006\001\004\001\005\001"
+      cfWritePrintData("\033&b16WPML \004\000\006\001\004\001\005\001"
                          "\001\004\001\144", 22);
     }
     else
@@ -151,7 +151,7 @@ main(int  argc,                                     /* I - Number of command-line arguments */
   * Reset the printer...
   */
 
-  cupsWritePrintData("\033E", 2);
+  cfWritePrintData("\033E", 2);
 
  /*
   * Close the command file and return...
index b35a94dd31ae44a3a1ea6189705f214b1a669293..a34830468a4d6baadae9a93e16aa5a6c044dc9ec 100644 (file)
@@ -55,8 +55,8 @@ typedef struct cups_weave_str
  * Globals...
  */
 
-cups_rgb_t     *RGB;                   /* RGB color separation data */
-cups_cmyk_t    *CMYK;                  /* CMYK color separation data */
+cf_rgb_t       *RGB;                   /* RGB color separation data */
+cf_cmyk_t      *CMYK;                  /* CMYK color separation data */
 unsigned char  *PixelBuffer,           /* Pixel buffer */
                *CMYKBuffer,            /* CMYK buffer */
                *OutputBuffers[7],      /* Output buffers */
@@ -79,8 +79,8 @@ int           PrinterPlanes,          /* # of color planes */
                BitPlanes,              /* # of bit planes per color */
                PrinterTop,             /* Top of page */
                PrinterLength;          /* Length of page */
-cups_lut_t     *DitherLuts[7];         /* Lookup tables for dithering */
-cups_dither_t  *DitherStates[7];       /* Dither state tables */
+cf_lut_t       *DitherLuts[7];         /* Lookup tables for dithering */
+cf_dither_t    *DitherStates[7];       /* Dither state tables */
 int            OutputFeed;             /* Number of lines to skip */
 int            Canceled;               /* Is the job canceled? */
 filter_logfunc_t logfunc;               /* Log function */
@@ -120,7 +120,7 @@ Setup(ppd_file_t *ppd)              /* I - PPD file */
   */
 
   if (ppd->model_number & ESCP_USB)
-    cupsWritePrintData("\000\000\000\033\001@EJL 1284.4\n@EJL     \n\033@", 29);
+    cfWritePrintData("\000\000\000\033\001@EJL 1284.4\n@EJL     \n\033@", 29);
 }
 
 
@@ -244,12 +244,12 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
 
   if (header->cupsColorSpace == CUPS_CSPACE_RGB ||
       header->cupsColorSpace == CUPS_CSPACE_W)
-    RGB = cupsRGBLoad(ppd, colormodel, header->MediaType, resolution,
+    RGB = cfRGBLoad(ppd, colormodel, header->MediaType, resolution,
                      logfunc, ld);
   else
     RGB = NULL;
 
-  CMYK = cupsCMYKLoad(ppd, colormodel, header->MediaType, resolution,
+  CMYK = cfCMYKLoad(ppd, colormodel, header->MediaType, resolution,
                      logfunc, ld);
 
   if (RGB)
@@ -260,7 +260,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   else
   {
     fputs("DEBUG: Loading default CMYK separation.\n", stderr);
-    CMYK = cupsCMYKNew(4);
+    CMYK = cfCMYKNew(4);
   }
 
   PrinterPlanes = CMYK->num_channels;
@@ -274,76 +274,76 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
   switch (PrinterPlanes)
   {
     case 1 : /* K */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Black", logfunc, ld);
         break;
 
     case 2 : /* Kk */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Black", logfunc, ld);
-        DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightBlack", logfunc, ld);
         break;
 
     case 3 : /* CMY */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Cyan", logfunc, ld);
-        DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Magenta", logfunc, ld);
-        DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Yellow", logfunc, ld);
         break;
 
     case 4 : /* CMYK */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Cyan", logfunc, ld);
-        DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Magenta", logfunc, ld);
-        DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Yellow", logfunc, ld);
-        DitherLuts[3] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[3] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Black", logfunc, ld);
         break;
 
     case 6 : /* CcMmYK */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Cyan", logfunc, ld);
-        DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightCyan", logfunc, ld);
-        DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Magenta", logfunc, ld);
-        DitherLuts[3] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[3] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightMagenta", logfunc, ld);
-        DitherLuts[4] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[4] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Yellow", logfunc, ld);
-        DitherLuts[5] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[5] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Black", logfunc, ld);
         break;
 
     case 7 : /* CcMmYKk */
-        DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Cyan", logfunc, ld);
-        DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightCyan", logfunc, ld);
-        DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Magenta", logfunc, ld);
-        DitherLuts[3] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[3] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightMagenta", logfunc, ld);
-        DitherLuts[4] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[4] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Yellow", logfunc, ld);
-        DitherLuts[5] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[5] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "Black", logfunc, ld);
-        DitherLuts[6] = cupsLutLoad(ppd, colormodel, header->MediaType,
+        DitherLuts[6] = cfLutLoad(ppd, colormodel, header->MediaType,
                                    resolution, "LightBlack", logfunc, ld);
         break;
   }
 
   for (plane = 0; plane < PrinterPlanes; plane ++)
   {
-    DitherStates[plane] = cupsDitherNew(header->cupsWidth);
+    DitherStates[plane] = cfDitherNew(header->cupsWidth);
 
     if (!DitherLuts[plane])
-      DitherLuts[plane] = cupsLutNew(2, default_lut, logfunc, ld);
+      DitherLuts[plane] = cfLutNew(2, default_lut, logfunc, ld);
   }
 
   if (DitherLuts[0][4095].pixel > 1)
@@ -363,13 +363,13 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
     * Go into remote mode...
     */
 
-    cupsWritePrintData("\033(R\010\000\000REMOTE1", 13);
+    cfWritePrintData("\033(R\010\000\000REMOTE1", 13);
 
    /*
     * Disable status reporting...
     */
 
-    cupsWritePrintData("ST\002\000\000\000", 6);
+    cfWritePrintData("ST\002\000\000\000", 6);
 
    /*
     * Enable borderless printing...
@@ -383,7 +383,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
 
       i = atoi(attr->value);
 
-      cupsWritePrintData("FP\003\000\000", 5);
+      cfWritePrintData("FP\003\000\000", 5);
       putchar(i & 255);
       putchar(i >> 8);
     }
@@ -402,7 +402,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Set feed sequence...
        */
 
-       cupsWritePrintData("SN\003\000\000\000", 6);
+       cfWritePrintData("SN\003\000\000\000", 6);
        putchar(atoi(attr->value));
       }
 
@@ -412,7 +412,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Set platten gap...
        */
 
-       cupsWritePrintData("SN\003\000\000\001", 6);
+       cfWritePrintData("SN\003\000\000\001", 6);
        putchar(atoi(attr->value));
       }
 
@@ -422,7 +422,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Paper feeding/ejecting sequence...
        */
 
-       cupsWritePrintData("SN\003\000\000\002", 6);
+       cfWritePrintData("SN\003\000\000\002", 6);
        putchar(atoi(attr->value));
       }
 
@@ -432,7 +432,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Eject delay...
        */
 
-        cupsWritePrintData("SN\003\000\000\006", 6);
+        cfWritePrintData("SN\003\000\000\006", 6);
         putchar(atoi(attr->value));
       }
 
@@ -442,7 +442,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Set media type.
        */
 
-       cupsWritePrintData("MT\003\000\000\000", 6);
+       cfWritePrintData("MT\003\000\000\000", 6);
         putchar(atoi(attr->value));
       }
 
@@ -452,7 +452,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         * Set paper thickness.
         */
 
-       cupsWritePrintData("PH\002\000\000", 5);
+       cfWritePrintData("PH\002\000\000", 5);
         putchar(atoi(attr->value));
       }
     }
@@ -467,7 +467,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
        * Paper check.
        */
 
-       cupsWritePrintData("PC\002\000\000", 5);
+       cfWritePrintData("PC\002\000\000", 5);
         putchar(atoi(attr->value));
       }
 
@@ -482,7 +482,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
         a = b = 0;
         sscanf(attr->value, "%d%d", &a, &b);
 
-       cupsWritePrintData("PP\003\000\000", 5);
+       cfWritePrintData("PP\003\000\000", 5);
         putchar(a);
         putchar(b);
       }
@@ -493,7 +493,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
        * Set media position.
        */
 
-       cupsWritePrintData("EX\006\000\000\000\000\000\005", 9);
+       cfWritePrintData("EX\006\000\000\000\000\000\005", 9);
         putchar(atoi(attr->value));
       }
     }
@@ -504,7 +504,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
       * Set media size...
       */
 
-      cupsWritePrintData("MS\010\000\000", 5);
+      cfWritePrintData("MS\010\000\000", 5);
       putchar(atoi(attr->value));
 
       switch (header->PageSize[1])
@@ -618,7 +618,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
       * Enable/disable cutter.
       */
 
-      cupsWritePrintData("AC\002\000\000", 5);
+      cfWritePrintData("AC\002\000\000", 5);
       putchar(atoi(attr->value));
 
       if ((attr = ppdFindAttr(ppd, "cupsESCPSN80", header->MediaType)) != NULL && attr->value)
@@ -627,7 +627,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
        * Cutting method...
        */
 
-       cupsWritePrintData("SN\003\000\000\200", 6);
+       cfWritePrintData("SN\003\000\000\200", 6);
        putchar(atoi(attr->value));
       }
 
@@ -637,7 +637,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
        * Cutting pressure...
        */
 
-       cupsWritePrintData("SN\003\000\000\201", 6);
+       cfWritePrintData("SN\003\000\000\201", 6);
        putchar(atoi(attr->value));
       }
     }
@@ -648,23 +648,23 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
       * Enable/disable cutter.
       */
 
-      cupsWritePrintData("CO\010\000\000\000", 6);
+      cfWritePrintData("CO\010\000\000\000", 6);
       putchar(atoi(attr->value));
-      cupsWritePrintData("\000\000\000\000\000", 5);
+      cfWritePrintData("\000\000\000\000\000", 5);
     }
 
    /*
     * Exit remote mode...
     */
 
-    cupsWritePrintData("\033\000\000\000", 4);
+    cfWritePrintData("\033\000\000\000", 4);
   }
 
  /*
   * Enter graphics mode...
   */
 
-  cupsWritePrintData("\033(G\001\000\001", 6);
+  cfWritePrintData("\033(G\001\000\001", 6);
 
  /*
   * Set the line feed increment...
@@ -675,7 +675,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
 
   if (ppd->model_number & ESCP_EXT_UNITS)
   {
-    cupsWritePrintData("\033(U\005\000", 5);
+    cfWritePrintData("\033(U\005\000", 5);
     putchar(units / header->HWResolution[1]);
     putchar(units / header->HWResolution[1]);
     putchar(units / header->HWResolution[0]);
@@ -684,7 +684,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   }
   else
   {
-    cupsWritePrintData("\033(U\001\000", 5);
+    cfWritePrintData("\033(U\001\000", 5);
     putchar(3600 / header->HWResolution[1]);
   }
 
@@ -700,7 +700,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
     * Set page size (expands bottom margin)...
     */
 
-    cupsWritePrintData("\033(S\010\000", 5);
+    cfWritePrintData("\033(S\010\000", 5);
 
     i = header->PageSize[0] * header->HWResolution[1] / 72;
     putchar(i);
@@ -716,7 +716,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   }
   else
   {
-    cupsWritePrintData("\033(C\002\000", 5);
+    cfWritePrintData("\033(C\002\000", 5);
     putchar(PrinterLength & 255);
     putchar(PrinterLength >> 8);
   }
@@ -730,7 +730,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
 
   if (ppd->model_number & ESCP_EXT_MARGINS)
   {
-    cupsWritePrintData("\033(c\010\000", 5);
+    cfWritePrintData("\033(c\010\000", 5);
 
     putchar(PrinterTop);
     putchar(PrinterTop >> 8);
@@ -744,7 +744,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   }
   else
   {
-    cupsWritePrintData("\033(c\004\000", 5);
+    cfWritePrintData("\033(c\004\000", 5);
 
     putchar(PrinterTop & 255);
     putchar(PrinterTop >> 8);
@@ -757,13 +757,13 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
   * Set the top position...
   */
 
-  cupsWritePrintData("\033(V\002\000\000\000", 7);
+  cfWritePrintData("\033(V\002\000\000\000", 7);
 
  /*
   * Enable unidirectional printing depending on the mode...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsESCPDirection", colormodel,
+  if ((attr = cfFindAttr(ppd, "cupsESCPDirection", colormodel,
                            header->MediaType, resolution, spec,
                           sizeof(spec), logfunc, ld)) != NULL)
     printf("\033U%c", atoi(attr->value));
@@ -772,7 +772,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   * Enable/disable microweaving as needed...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsESCPMicroWeave", colormodel,
+  if ((attr = cfFindAttr(ppd, "cupsESCPMicroWeave", colormodel,
                            header->MediaType, resolution, spec,
                           sizeof(spec), logfunc, ld)) != NULL)
     printf("\033(i\001%c%c", 0, atoi(attr->value));
@@ -781,7 +781,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   * Set the dot size and print speed as needed...
   */
 
-  if ((attr = cupsFindAttr(ppd, "cupsESCPDotSize", colormodel,
+  if ((attr = cfFindAttr(ppd, "cupsESCPDotSize", colormodel,
                            header->MediaType, resolution, spec,
                           sizeof(spec), logfunc, ld)) != NULL)
     printf("\033(e\002%c%c%c", 0, 0, atoi(attr->value));
@@ -798,7 +798,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
       * Fast black printing.
       */
 
-      cupsWritePrintData("\033(K\002\000\000\001", 7);
+      cfWritePrintData("\033(K\002\000\000\001", 7);
     }
     else
     {
@@ -806,7 +806,7 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
       * Color printing.
       */
 
-      cupsWritePrintData("\033(K\002\000\000\002", 7);
+      cfWritePrintData("\033(K\002\000\000\002", 7);
     }
   }
 
@@ -1019,7 +1019,7 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
   * Set the output resolution...
   */
 
-  cupsWritePrintData("\033(D\004\000", 5);
+  cfWritePrintData("\033(D\004\000", 5);
   putchar(units);
   putchar(units >> 8);
   putchar(units * DotRowStep / header->HWResolution[1]);
@@ -1162,8 +1162,8 @@ EndPage(ppd_file_t         *ppd,  /* I - PPD file */
 
   for (i = 0; i < PrinterPlanes; i ++)
   {
-    cupsDitherDelete(DitherStates[i]);
-    cupsLutDelete(DitherLuts[i]);
+    cfDitherDelete(DitherStates[i]);
+    cfLutDelete(DitherLuts[i]);
   }
 
   free(OutputBuffers[0]);
@@ -1172,11 +1172,11 @@ EndPage(ppd_file_t         *ppd,        /* I - PPD file */
   free(InputBuffer);
   free(CompBuffer);
 
-  cupsCMYKDelete(CMYK);
+  cfCMYKDelete(CMYK);
 
   if (RGB)
   {
-    cupsRGBDelete(RGB);
+    cfRGBDelete(RGB);
     free(CMYKBuffer);
   }
 }
@@ -1201,19 +1201,19 @@ Shutdown(ppd_file_t *ppd)               /* I - PPD file */
     * Go into remote mode...
     */
 
-    cupsWritePrintData("\033(R\010\000\000REMOTE1", 13);
+    cfWritePrintData("\033(R\010\000\000REMOTE1", 13);
 
    /*
     * Load defaults...
     */
 
-    cupsWritePrintData("LD\000\000", 4);
+    cfWritePrintData("LD\000\000", 4);
 
    /*
     * Exit remote mode...
     */
 
-    cupsWritePrintData("\033\000\000\000", 4);
+    cfWritePrintData("\033\000\000\000", 4);
   }
 }
 
@@ -1425,7 +1425,7 @@ CompressData(ppd_file_t          *ppd,    /* I - PPD file information */
   if (offset)
   {
     if (BitPlanes == 1)
-      cupsWritePrintData("\033(\\\004\000\240\005", 7);
+      cfWritePrintData("\033(\\\004\000\240\005", 7);
     else
       printf("\033\\");
 
@@ -1485,7 +1485,7 @@ CompressData(ppd_file_t          *ppd,    /* I - PPD file information */
     putchar(bytes >> 8);
   }
 
-  cupsWritePrintData(line_ptr, line_end - line_ptr);
+  cfWritePrintData(line_ptr, line_end - line_ptr);
 }
 
 
@@ -1525,7 +1525,7 @@ OutputBand(ppd_file_t         *ppd,       /* I - PPD file */
 
   if (OutputFeed > 0)
   {
-    cupsWritePrintData("\033(v\002\000", 5);
+    cfWritePrintData("\033(v\002\000", 5);
     putchar(OutputFeed & 255);
     putchar(OutputFeed >> 8);
 
@@ -1592,30 +1592,30 @@ ProcessLine(ppd_file_t         *ppd,    /* I - PPD file */
     case CUPS_CSPACE_W :
         if (RGB)
        {
-         cupsRGBDoGray(RGB, PixelBuffer, CMYKBuffer, width);
-         cupsCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
+         cfRGBDoGray(RGB, PixelBuffer, CMYKBuffer, width);
+         cfCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
        }
        else
-          cupsCMYKDoGray(CMYK, PixelBuffer, InputBuffer, width);
+          cfCMYKDoGray(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     case CUPS_CSPACE_K :
-        cupsCMYKDoBlack(CMYK, PixelBuffer, InputBuffer, width);
+        cfCMYKDoBlack(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     default :
     case CUPS_CSPACE_RGB :
         if (RGB)
        {
-         cupsRGBDoRGB(RGB, PixelBuffer, CMYKBuffer, width);
-         cupsCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
+         cfRGBDoRGB(RGB, PixelBuffer, CMYKBuffer, width);
+         cfCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
        }
        else
-          cupsCMYKDoRGB(CMYK, PixelBuffer, InputBuffer, width);
+          cfCMYKDoRGB(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     case CUPS_CSPACE_CMYK :
-        cupsCMYKDoCMYK(CMYK, PixelBuffer, InputBuffer, width);
+        cfCMYKDoCMYK(CMYK, PixelBuffer, InputBuffer, width);
        break;
   }
 
@@ -1625,7 +1625,7 @@ ProcessLine(ppd_file_t         *ppd,      /* I - PPD file */
 
   for (plane = 0; plane < PrinterPlanes; plane ++)
   {
-    cupsDitherLine(DitherStates[plane], DitherLuts[plane], InputBuffer + plane,
+    cfDitherLine(DitherStates[plane], DitherLuts[plane], InputBuffer + plane,
                    PrinterPlanes, OutputBuffers[plane]);
 
     if (DotRowMax == 1)
@@ -1634,19 +1634,19 @@ ProcessLine(ppd_file_t         *ppd,    /* I - PPD file */
       * Handle microweaved output...
       */
 
-      if (cupsCheckBytes(OutputBuffers[plane], width))
+      if (cfCheckBytes(OutputBuffers[plane], width))
        continue;
 
       if (BitPlanes == 1)
-       cupsPackHorizontal(OutputBuffers[plane], DotBuffers[plane],
+       cfPackHorizontal(OutputBuffers[plane], DotBuffers[plane],
                           width, 0, 1);
       else
-       cupsPackHorizontal2(OutputBuffers[plane], DotBuffers[plane],
+       cfPackHorizontal2(OutputBuffers[plane], DotBuffers[plane],
                            width, 1);
 
       if (OutputFeed > 0)
       {
-       cupsWritePrintData("\033(v\002\000", 5);
+       cfWritePrintData("\033(v\002\000", 5);
        putchar(OutputFeed & 255);
        putchar(OutputFeed >> 8);
        OutputFeed = 0;
@@ -1674,14 +1674,14 @@ ProcessLine(ppd_file_t         *ppd,    /* I - PPD file */
        offset = band->row * DotBufferSize;
 
         if (BitPlanes == 1)
-         cupsPackHorizontal(OutputBuffers[plane] + pass,
+         cfPackHorizontal(OutputBuffers[plane] + pass,
                             band->buffer + offset, subwidth, 0, DotColStep);
         else
-         cupsPackHorizontal2(OutputBuffers[plane] + pass,
+         cfPackHorizontal2(OutputBuffers[plane] + pass,
                              band->buffer + offset, subwidth, DotColStep);
 
         band->row ++;
-       band->dirty |= !cupsCheckBytes(band->buffer + offset, DotBufferSize);
+       band->dirty |= !cfCheckBytes(band->buffer + offset, DotBufferSize);
        if (band->row >= band->count)
        {
          if (band->dirty)
index 43f41f8dc98496b1d7b03a26e4964260ad84077f..b5a15eb02e6f39b1cf5c9c47ce110c53a8d19455 100644 (file)
@@ -49,8 +49,8 @@ typedef enum
  * Globals...
  */
 
-cups_rgb_t     *RGB;                   /* RGB color separation data */
-cups_cmyk_t    *CMYK;                  /* CMYK color separation data */
+cf_rgb_t       *RGB;                   /* RGB color separation data */
+cf_cmyk_t      *CMYK;                  /* CMYK color separation data */
 unsigned char  *PixelBuffer,           /* Pixel buffer */
                *CMYKBuffer,            /* CMYK buffer */
                *OutputBuffers[6],      /* Output buffers */
@@ -59,8 +59,8 @@ unsigned char *PixelBuffer,           /* Pixel buffer */
                *SeedBuffer,            /* Mode 3 seed buffers */
                BlankValue;             /* The blank value */
 short          *InputBuffer;           /* Color separation buffer */
-cups_lut_t     *DitherLuts[6];         /* Lookup tables for dithering */
-cups_dither_t  *DitherStates[6];       /* Dither state tables */
+cf_lut_t       *DitherLuts[6];         /* Lookup tables for dithering */
+cf_dither_t    *DitherStates[6];       /* Dither state tables */
 int            PrinterPlanes,          /* Number of color planes */
                SeedInvalid,            /* Contents of seed buffer invalid? */
                DotBits[6],             /* Number of bits per color */
@@ -358,10 +358,10 @@ StartPage(filter_data_t      *data,       /* I - filter data */
     {
       if (header->cupsColorSpace == CUPS_CSPACE_RGB ||
          header->cupsColorSpace == CUPS_CSPACE_W)
-       RGB = cupsRGBLoad(ppd, colormodel, header->MediaType, resolution,
+       RGB = cfRGBLoad(ppd, colormodel, header->MediaType, resolution,
                          logfunc, ld);
 
-      CMYK = cupsCMYKLoad(ppd, colormodel, header->MediaType, resolution,
+      CMYK = cfCMYKLoad(ppd, colormodel, header->MediaType, resolution,
                          logfunc, ld);
     }
 
@@ -381,7 +381,7 @@ StartPage(filter_data_t      *data, /* I - filter data */
        PrinterPlanes = 1;
       /*fputs("DEBUG: Loading default K separation.\n", stderr);*/
       fprintf(stderr, "DEBUG: Color Space: %d; Color Planes %d\n", header->cupsColorSpace, PrinterPlanes);
-      CMYK = cupsCMYKNew(PrinterPlanes);
+      CMYK = cfCMYKNew(PrinterPlanes);
     }
 
     PrinterPlanes = CMYK->num_channels;
@@ -393,42 +393,42 @@ StartPage(filter_data_t      *data,       /* I - filter data */
     switch (PrinterPlanes)
     {
       case 1 : /* K */
-          DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Black", logfunc, ld);
           break;
 
       case 3 : /* CMY */
-          DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Cyan", logfunc, ld);
-          DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Magenta", logfunc, ld);
-          DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Yellow", logfunc, ld);
           break;
 
       case 4 : /* CMYK */
-          DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Cyan", logfunc, ld);
-          DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Magenta", logfunc, ld);
-          DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Yellow", logfunc, ld);
-          DitherLuts[3] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[3] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Black", logfunc, ld);
           break;
 
       case 6 : /* CcMmYK */
-          DitherLuts[0] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[0] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Cyan", logfunc, ld);
-          DitherLuts[1] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[1] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "LightCyan", logfunc, ld);
-          DitherLuts[2] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[2] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Magenta", logfunc, ld);
-          DitherLuts[3] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[3] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "LightMagenta", logfunc, ld);
-          DitherLuts[4] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[4] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Yellow", logfunc, ld);
-          DitherLuts[5] = cupsLutLoad(ppd, colormodel, header->MediaType,
+          DitherLuts[5] = cfLutLoad(ppd, colormodel, header->MediaType,
                                      resolution, "Black", logfunc, ld);
           break;
     }
@@ -436,17 +436,17 @@ StartPage(filter_data_t      *data,       /* I - filter data */
     for (plane = 0; plane < PrinterPlanes; plane ++)
     {
       if (!DitherLuts[plane])
-        DitherLuts[plane] = cupsLutNew(2, default_lut, logfunc, ld);
+        DitherLuts[plane] = cfLutNew(2, default_lut, logfunc, ld);
 
       if (DitherLuts[plane][4095].pixel > 1)
        DotBits[plane] = 2;
       else
        DotBits[plane] = 1;
 
-      DitherStates[plane] = cupsDitherNew(header->cupsWidth);
+      DitherStates[plane] = cfDitherNew(header->cupsWidth);
 
       if (!DitherLuts[plane])
-       DitherLuts[plane] = cupsLutNew(2, default_lut, logfunc, ld);
+       DitherLuts[plane] = cfLutNew(2, default_lut, logfunc, ld);
     }
   }
 
@@ -666,7 +666,7 @@ StartPage(filter_data_t      *data, /* I - filter data */
     printf("\033*p0Y\033*p0X");
   }
 
-  if (ppd && ((attr = cupsFindAttr(ppd, "cupsPCLQuality", colormodel,
+  if (ppd && ((attr = cfFindAttr(ppd, "cupsPCLQuality", colormodel,
                                   header->MediaType, resolution, spec,
                                   sizeof(spec), logfunc, ld)) != NULL))
   {
@@ -697,7 +697,7 @@ StartPage(filter_data_t      *data, /* I - filter data */
       * vertical resolutions as well as a color count...
       */
 
-      if (ppd && ((attr = cupsFindAttr(ppd, "cupsPCLCRDMode", colormodel,
+      if (ppd && ((attr = cfFindAttr(ppd, "cupsPCLCRDMode", colormodel,
                                       header->MediaType, resolution, spec,
                                       sizeof(spec), logfunc, ld)) != NULL))
         i = atoi(attr->value);
@@ -756,7 +756,7 @@ StartPage(filter_data_t      *data, /* I - filter data */
     pcl_set_simple_resolution(header->HWResolution[0]);
                                        /* Set output resolution */
 
-    cupsWritePrintData("\033*v6W\2\3\0\10\10\10", 11);
+    cfWritePrintData("\033*v6W\2\3\0\10\10\10", 11);
                                        /* 24-bit sRGB */
   }
   else
@@ -876,19 +876,19 @@ EndPage(ppd_file_t         *ppd,  /* I - PPD file */
   {
     for (plane = 0; plane < PrinterPlanes; plane ++)
     {
-      cupsDitherDelete(DitherStates[plane]);
-      cupsLutDelete(DitherLuts[plane]);
+      cfDitherDelete(DitherStates[plane]);
+      cfLutDelete(DitherLuts[plane]);
     }
 
     free(DotBuffers[0]);
     free(InputBuffer);
     free(OutputBuffers[0]);
 
-    cupsCMYKDelete(CMYK);
+    cfCMYKDelete(CMYK);
 
     if (RGB)
     {
-      cupsRGBDelete(RGB);
+      cfRGBDelete(RGB);
       free(CMYKBuffer);
     }
   }
@@ -994,7 +994,7 @@ CompressData(unsigned char *line,   /* I - Data to compress */
 
        line_ptr = line;
 
-        if (cupsCheckBytes(line, length))
+        if (cfCheckBytes(line, length))
           line_end = line;             /* Blank line */
         else
          line_end = line + length;     /* Non-blank line */
@@ -1554,7 +1554,7 @@ CompressData(unsigned char *line, /* I - Data to compress */
   */
 
   printf("\033*b%d%c", (int)(line_end - line_ptr), pend);
-  cupsWritePrintData(line_ptr, line_end - line_ptr);
+  cfWritePrintData(line_ptr, line_end - line_ptr);
 }
 
 
@@ -1678,7 +1678,7 @@ OutputLine(ppd_file_t         *ppd,       /* I - PPD file */
               bit <= DotBits[plane];
               bit <<= 1, ptr += bytes, j ++)
          {
-           cupsPackHorizontalBit(OutputBuffers[plane], DotBuffers[plane],
+           cfPackHorizontalBit(OutputBuffers[plane], DotBuffers[plane],
                                  width, 0, bit);
             CompressData(ptr, bytes, j,
                         i == (PrinterPlanes - 1) &&
@@ -1719,7 +1719,7 @@ ReadLine(cups_raster_t      *ras, /* I - Raster stream */
   * See if it is blank; if so, return right away...
   */
 
-  if (cupsCheckValue(PixelBuffer, header->cupsBytesPerLine, BlankValue))
+  if (cfCheckValue(PixelBuffer, header->cupsBytesPerLine, BlankValue))
     return (0);
 
  /*
@@ -1740,38 +1740,38 @@ ReadLine(cups_raster_t      *ras,       /* I - Raster stream */
     case CUPS_CSPACE_W :
         if (RGB)
        {
-         cupsRGBDoGray(RGB, PixelBuffer, CMYKBuffer, width);
+         cfRGBDoGray(RGB, PixelBuffer, CMYKBuffer, width);
 
          if (RGB->num_channels == 1)
-           cupsCMYKDoBlack(CMYK, CMYKBuffer, InputBuffer, width);
+           cfCMYKDoBlack(CMYK, CMYKBuffer, InputBuffer, width);
          else
-           cupsCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
+           cfCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
        }
        else
-          cupsCMYKDoGray(CMYK, PixelBuffer, InputBuffer, width);
+          cfCMYKDoGray(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     case CUPS_CSPACE_K :
-        cupsCMYKDoBlack(CMYK, PixelBuffer, InputBuffer, width);
+        cfCMYKDoBlack(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     default :
     case CUPS_CSPACE_RGB :
         if (RGB)
        {
-         cupsRGBDoRGB(RGB, PixelBuffer, CMYKBuffer, width);
+         cfRGBDoRGB(RGB, PixelBuffer, CMYKBuffer, width);
 
          if (RGB->num_channels == 1)
-           cupsCMYKDoBlack(CMYK, CMYKBuffer, InputBuffer, width);
+           cfCMYKDoBlack(CMYK, CMYKBuffer, InputBuffer, width);
          else
-           cupsCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
+           cfCMYKDoCMYK(CMYK, CMYKBuffer, InputBuffer, width);
        }
        else
-          cupsCMYKDoRGB(CMYK, PixelBuffer, InputBuffer, width);
+          cfCMYKDoRGB(CMYK, PixelBuffer, InputBuffer, width);
        break;
 
     case CUPS_CSPACE_CMYK :
-        cupsCMYKDoCMYK(CMYK, PixelBuffer, InputBuffer, width);
+        cfCMYKDoCMYK(CMYK, PixelBuffer, InputBuffer, width);
        break;
   }
 
@@ -1780,7 +1780,7 @@ ReadLine(cups_raster_t      *ras, /* I - Raster stream */
   */
 
   for (plane = 0; plane < PrinterPlanes; plane ++)
-    cupsDitherLine(DitherStates[plane], DitherLuts[plane], InputBuffer + plane,
+    cfDitherLine(DitherStates[plane], DitherLuts[plane], InputBuffer + plane,
                    PrinterPlanes, OutputBuffers[plane]);
 
  /*