]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libppd: Renamed formerly private-to-CUPS PPD handling functions for public API
authorTill Kamppeter <till.kamppeter@gmail.com>
Wed, 1 Jul 2020 22:03:00 +0000 (00:03 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Wed, 1 Jul 2020 22:03:00 +0000 (00:03 +0200)
ppd/ppd-attr.c
ppd/ppd-cache.c
ppd/ppd-localize.c
ppd/ppd-mark.c
ppd/ppd.c
ppd/ppd.h
ppd/raster-interpret.c
ppd/raster-interstub.c
ppd/testppd.c

index 881149f81318dbcd875db2190d0f47319bad3031..357755470eab8a44a35d20c3ed7bdeb48a89eb51 100644 (file)
@@ -129,14 +129,14 @@ ppdFindNextAttr(ppd_file_t *ppd,  /* I - PPD file data */
 
 
 /*
- * '_ppdNormalizeMakeAndModel()' - Normalize a product/make-and-model string.
+ * 'ppdNormalizeMakeAndModel()' - Normalize a product/make-and-model string.
  *
  * This function tries to undo the mistakes made by many printer manufacturers
  * to produce a clean make-and-model string we can use.
  */
 
 char *                                 /* O - Normalized make-and-model string or NULL on error */
-_ppdNormalizeMakeAndModel(
+ppdNormalizeMakeAndModel(
     const char *make_and_model,                /* I - Original make-and-model string */
     char       *buffer,                        /* I - String buffer */
     size_t     bufsize)                        /* I - Size of string buffer */
index 5c23ae4c23b22c26d1f00f9a11b295457165fe99..9ef633e0f46b6cc0c232ec446c5e10cef073e77b 100644 (file)
@@ -99,14 +99,14 @@ set_error(const char   *message,    /* I - status-message value */
 }
 
 /*
- * '_ppdConvertOptions()' - Convert printer options to standard IPP attributes.
+ * 'ppdConvertOptions()' - Convert printer options to standard IPP attributes.
  *
  * This functions converts PPD and CUPS-specific options to their standard IPP
  * attributes and values and adds them to the specified IPP request.
  */
 
 int                                    /* O - New number of copies */
-_ppdConvertOptions(
+ppdConvertOptions(
     ipp_t           *request,          /* I - IPP request */
     ppd_file_t      *ppd,              /* I - PPD file */
     _ppd_cache_t    *pc,               /* I - PPD cache info */
@@ -258,9 +258,9 @@ _ppdConvertOptions(
   if ((keyword = cupsGetOption("PageSize", num_options, options)) == NULL)
     keyword = cupsGetOption("media", num_options, options);
 
-  media_source = _ppdCacheGetSource(pc, cupsGetOption("InputSlot", num_options, options));
-  media_type   = _ppdCacheGetType(pc, cupsGetOption("MediaType", num_options, options));
-  size         = _ppdCacheGetSize(pc, keyword);
+  media_source = ppdCacheGetSource(pc, cupsGetOption("InputSlot", num_options, options));
+  media_type   = ppdCacheGetType(pc, cupsGetOption("MediaType", num_options, options));
+  size         = ppdCacheGetSize(pc, keyword);
 
   if (size || media_source || media_type)
   {
@@ -315,7 +315,7 @@ _ppdConvertOptions(
   if ((keyword = cupsGetOption("output-bin", num_options, options)) == NULL)
   {
     if ((choice = ppdFindMarkedChoice(ppd, "OutputBin")) != NULL)
-      keyword = _ppdCacheGetBin(pc, choice->choice);
+      keyword = ppdCacheGetBin(pc, choice->choice);
   }
 
   if (keyword)
@@ -457,7 +457,7 @@ _ppdConvertOptions(
   }
   else
   {
-    num_finishings = _ppdCacheGetFinishingValues(ppd, pc, (int)(sizeof(finishings) / sizeof(finishings[0])), finishings);
+    num_finishings = ppdCacheGetFinishingValues(ppd, pc, (int)(sizeof(finishings) / sizeof(finishings[0])), finishings);
     if (num_finishings > 0)
     {
       ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings", num_finishings, finishings);
@@ -478,15 +478,15 @@ _ppdConvertOptions(
 
 
 /*
- * '_ppdCacheCreateWithFile()' - Create PPD cache and mapping data from a
+ * 'ppdCacheCreateWithFile()' - Create PPD cache and mapping data from a
  *                               written file.
  *
- * Use the @link _ppdCacheWriteFile@ function to write PWG mapping data to a
+ * Use the @link ppdCacheWriteFile@ function to write PWG mapping data to a
  * file.
  */
 
 _ppd_cache_t *                         /* O  - PPD cache and mapping data */
-_ppdCacheCreateWithFile(
+ppdCacheCreateWithFile(
     const char *filename,              /* I  - File to read */
     ipp_t      **attrs)                        /* IO - IPP attributes, if any */
 {
@@ -511,7 +511,7 @@ _ppdCacheCreateWithFile(
   _ppd_pwg_print_quality_t print_quality;      /* Print quality for preset */
 
 
-  DEBUG_printf(("_ppdCacheCreateWithFile(filename=\"%s\")", filename));
+  DEBUG_printf(("ppdCacheCreateWithFile(filename=\"%s\")", filename));
 
  /*
   * Range check input...
@@ -543,7 +543,7 @@ _ppdCacheCreateWithFile(
   if (!cupsFileGets(fp, line, sizeof(line)))
   {
     set_error(strerror(errno), 0);
-    DEBUG_puts("_ppdCacheCreateWithFile: Unable to read first line.");
+    DEBUG_puts("ppdCacheCreateWithFile: Unable to read first line.");
     cupsFileClose(fp);
     return (NULL);
   }
@@ -551,7 +551,7 @@ _ppdCacheCreateWithFile(
   if (strncmp(line, "#CUPS-PPD-CACHE-", 16))
   {
     set_error(_("Bad PPD cache file."), 1);
-    DEBUG_printf(("_ppdCacheCreateWithFile: Wrong first line \"%s\".", line));
+    DEBUG_printf(("ppdCacheCreateWithFile: Wrong first line \"%s\".", line));
     cupsFileClose(fp);
     return (NULL);
   }
@@ -559,7 +559,7 @@ _ppdCacheCreateWithFile(
   if (atoi(line + 16) != _PPD_CACHE_VERSION)
   {
     set_error(_("Out of date PPD cache file."), 1);
-    DEBUG_printf(("_ppdCacheCreateWithFile: Cache file has version %s, "
+    DEBUG_printf(("ppdCacheCreateWithFile: Cache file has version %s, "
                   "expected %d.", line + 16, _PPD_CACHE_VERSION));
     cupsFileClose(fp);
     return (NULL);
@@ -572,7 +572,7 @@ _ppdCacheCreateWithFile(
   if ((pc = calloc(1, sizeof(_ppd_cache_t))) == NULL)
   {
     set_error(strerror(errno), 0);
-    DEBUG_puts("_ppdCacheCreateWithFile: Unable to allocate _ppd_cache_t.");
+    DEBUG_puts("ppdCacheCreateWithFile: Unable to allocate _ppd_cache_t.");
     goto create_error;
   }
 
@@ -590,12 +590,12 @@ _ppdCacheCreateWithFile(
 
   while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
   {
-    DEBUG_printf(("_ppdCacheCreateWithFile: line=\"%s\", value=\"%s\", "
+    DEBUG_printf(("ppdCacheCreateWithFile: line=\"%s\", value=\"%s\", "
                   "linenum=%d", line, value, linenum));
 
     if (!value)
     {
-      DEBUG_printf(("_ppdCacheCreateWithFile: Missing value on line %d.",
+      DEBUG_printf(("ppdCacheCreateWithFile: Missing value on line %d.",
                     linenum));
       set_error(_("Bad PPD cache file."), 1);
       goto create_error;
@@ -630,13 +630,13 @@ _ppdCacheCreateWithFile(
 
       if (attrs && *attrs)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: IPP listed multiple times.");
+        DEBUG_puts("ppdCacheCreateWithFile: IPP listed multiple times.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
       else if (length <= 0)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: Bad IPP length.");
+        DEBUG_puts("ppdCacheCreateWithFile: Bad IPP length.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
@@ -652,7 +652,7 @@ _ppdCacheCreateWithFile(
         if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL,
                      *attrs) != IPP_STATE_DATA)
        {
-         DEBUG_puts("_ppdCacheCreateWithFile: Bad IPP data.");
+         DEBUG_puts("ppdCacheCreateWithFile: Bad IPP data.");
          set_error(_("Bad PPD cache file."), 1);
          goto create_error;
        }
@@ -668,7 +668,7 @@ _ppdCacheCreateWithFile(
 
       if (cupsFileTell(fp) != (pos + length))
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: Bad IPP data.");
+        DEBUG_puts("ppdCacheCreateWithFile: Bad IPP data.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
@@ -677,14 +677,14 @@ _ppdCacheCreateWithFile(
     {
       if (num_bins > 0)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: NumBins listed multiple times.");
+        DEBUG_puts("ppdCacheCreateWithFile: NumBins listed multiple times.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
 
       if ((num_bins = atoi(value)) <= 0 || num_bins > 65536)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad NumBins value %d on line "
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad NumBins value %d on line "
                      "%d.", num_sizes, linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -692,7 +692,7 @@ _ppdCacheCreateWithFile(
 
       if ((pc->bins = calloc((size_t)num_bins, sizeof(pwg_map_t))) == NULL)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d bins.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Unable to allocate %d bins.",
                      num_sizes));
        set_error(strerror(errno), 0);
        goto create_error;
@@ -702,14 +702,14 @@ _ppdCacheCreateWithFile(
     {
       if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad Bin on line %d.", linenum));
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad Bin on line %d.", linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
 
       if (pc->num_bins >= num_bins)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Too many Bin's on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Too many Bin's on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -725,14 +725,14 @@ _ppdCacheCreateWithFile(
     {
       if (num_sizes > 0)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: NumSizes listed multiple times.");
+        DEBUG_puts("ppdCacheCreateWithFile: NumSizes listed multiple times.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
 
       if ((num_sizes = atoi(value)) < 0 || num_sizes > 65536)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad NumSizes value %d on line "
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad NumSizes value %d on line "
                      "%d.", num_sizes, linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -742,7 +742,7 @@ _ppdCacheCreateWithFile(
       {
        if ((pc->sizes = calloc((size_t)num_sizes, sizeof(pwg_size_t))) == NULL)
        {
-         DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d sizes.",
+         DEBUG_printf(("ppdCacheCreateWithFile: Unable to allocate %d sizes.",
                        num_sizes));
          set_error(strerror(errno), 0);
          goto create_error;
@@ -753,7 +753,7 @@ _ppdCacheCreateWithFile(
     {
       if (pc->num_sizes >= num_sizes)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Too many Size's on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Too many Size's on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -765,7 +765,7 @@ _ppdCacheCreateWithFile(
                 &(size->width), &(size->length), &(size->left),
                 &(size->bottom), &(size->right), &(size->top)) != 8)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad Size on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad Size on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -780,7 +780,7 @@ _ppdCacheCreateWithFile(
     {
       if (pc->custom_max_width > 0)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Too many CustomSize's on line "
+        DEBUG_printf(("ppdCacheCreateWithFile: Too many CustomSize's on line "
                      "%d.", linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -792,7 +792,7 @@ _ppdCacheCreateWithFile(
                 &(pc->custom_size.bottom), &(pc->custom_size.right),
                 &(pc->custom_size.top)) != 8)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad CustomSize on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad CustomSize on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -814,7 +814,7 @@ _ppdCacheCreateWithFile(
     {
       if (num_sources > 0)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: NumSources listed multiple "
+        DEBUG_puts("ppdCacheCreateWithFile: NumSources listed multiple "
                   "times.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -822,7 +822,7 @@ _ppdCacheCreateWithFile(
 
       if ((num_sources = atoi(value)) <= 0 || num_sources > 65536)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad NumSources value %d on "
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad NumSources value %d on "
                      "line %d.", num_sources, linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -830,7 +830,7 @@ _ppdCacheCreateWithFile(
 
       if ((pc->sources = calloc((size_t)num_sources, sizeof(pwg_map_t))) == NULL)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d sources.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Unable to allocate %d sources.",
                      num_sources));
        set_error(strerror(errno), 0);
        goto create_error;
@@ -840,7 +840,7 @@ _ppdCacheCreateWithFile(
     {
       if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad Source on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad Source on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -848,7 +848,7 @@ _ppdCacheCreateWithFile(
 
       if (pc->num_sources >= num_sources)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Too many Source's on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Too many Source's on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -864,14 +864,14 @@ _ppdCacheCreateWithFile(
     {
       if (num_types > 0)
       {
-        DEBUG_puts("_ppdCacheCreateWithFile: NumTypes listed multiple times.");
+        DEBUG_puts("ppdCacheCreateWithFile: NumTypes listed multiple times.");
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
       }
 
       if ((num_types = atoi(value)) <= 0 || num_types > 65536)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad NumTypes value %d on "
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad NumTypes value %d on "
                      "line %d.", num_types, linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -879,7 +879,7 @@ _ppdCacheCreateWithFile(
 
       if ((pc->types = calloc((size_t)num_types, sizeof(pwg_map_t))) == NULL)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d types.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Unable to allocate %d types.",
                      num_types));
        set_error(strerror(errno), 0);
        goto create_error;
@@ -889,7 +889,7 @@ _ppdCacheCreateWithFile(
     {
       if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad Type on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad Type on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -897,7 +897,7 @@ _ppdCacheCreateWithFile(
 
       if (pc->num_types >= num_types)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Too many Type's on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Too many Type's on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -924,7 +924,7 @@ _ppdCacheCreateWithFile(
          print_quality >= _PPD_PWG_PRINT_QUALITY_MAX ||
          valueptr == value || !*valueptr)
       {
-        DEBUG_printf(("_ppdCacheCreateWithFile: Bad Preset on line %d.",
+        DEBUG_printf(("ppdCacheCreateWithFile: Bad Preset on line %d.",
                      linenum));
        set_error(_("Bad PPD cache file."), 1);
        goto create_error;
@@ -992,14 +992,14 @@ _ppdCacheCreateWithFile(
     }
     else
     {
-      DEBUG_printf(("_ppdCacheCreateWithFile: Unknown %s on line %d.", line,
+      DEBUG_printf(("ppdCacheCreateWithFile: Unknown %s on line %d.", line,
                    linenum));
     }
   }
 
   if (pc->num_sizes < num_sizes)
   {
-    DEBUG_printf(("_ppdCacheCreateWithFile: Not enough sizes (%d < %d).",
+    DEBUG_printf(("ppdCacheCreateWithFile: Not enough sizes (%d < %d).",
                   pc->num_sizes, num_sizes));
     set_error(_("Bad PPD cache file."), 1);
     goto create_error;
@@ -1007,7 +1007,7 @@ _ppdCacheCreateWithFile(
 
   if (pc->num_sources < num_sources)
   {
-    DEBUG_printf(("_ppdCacheCreateWithFile: Not enough sources (%d < %d).",
+    DEBUG_printf(("ppdCacheCreateWithFile: Not enough sources (%d < %d).",
                   pc->num_sources, num_sources));
     set_error(_("Bad PPD cache file."), 1);
     goto create_error;
@@ -1015,7 +1015,7 @@ _ppdCacheCreateWithFile(
 
   if (pc->num_types < num_types)
   {
-    DEBUG_printf(("_ppdCacheCreateWithFile: Not enough types (%d < %d).",
+    DEBUG_printf(("ppdCacheCreateWithFile: Not enough types (%d < %d).",
                   pc->num_types, num_types));
     set_error(_("Bad PPD cache file."), 1);
     goto create_error;
@@ -1032,7 +1032,7 @@ _ppdCacheCreateWithFile(
   create_error:
 
   cupsFileClose(fp);
-  _ppdCacheDestroy(pc);
+  ppdCacheDestroy(pc);
 
   if (attrs)
   {
@@ -1045,11 +1045,11 @@ _ppdCacheCreateWithFile(
 
 
 /*
- * '_ppdCacheCreateWithPPD()' - Create PWG mapping data from a PPD file.
+ * 'ppdCacheCreateWithPPD()' - Create PWG mapping data from a PPD file.
  */
 
 _ppd_cache_t *                         /* O - PPD cache and mapping data */
-_ppdCacheCreateWithPPD(ppd_file_t *ppd)        /* I - PPD file */
+ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
 {
   int                  i, j, k;        /* Looping vars */
   _ppd_cache_t         *pc;            /* PWG mapping data */
@@ -1096,7 +1096,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
   char                 msg_id[256];    /* Message identifier */
 
 
-  DEBUG_printf(("_ppdCacheCreateWithPPD(ppd=%p)", ppd));
+  DEBUG_printf(("ppdCacheCreateWithPPD(ppd=%p)", ppd));
 
  /*
   * Range check input...
@@ -1111,7 +1111,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
 
   if ((pc = calloc(1, sizeof(_ppd_cache_t))) == NULL)
   {
-    DEBUG_puts("_ppdCacheCreateWithPPD: Unable to allocate _ppd_cache_t.");
+    DEBUG_puts("ppdCacheCreateWithPPD: Unable to allocate _ppd_cache_t.");
     goto create_error;
   }
 
@@ -1125,7 +1125,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
   {
     if ((pc->sizes = calloc((size_t)ppd->num_sizes, sizeof(pwg_size_t))) == NULL)
     {
-      DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
+      DEBUG_printf(("ppdCacheCreateWithPPD: Unable to allocate %d "
                    "pwg_size_t's.", ppd->num_sizes));
       goto create_error;
     }
@@ -1303,7 +1303,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
 
     if ((pc->sources = calloc((size_t)input_slot->num_choices, sizeof(pwg_map_t))) == NULL)
     {
-      DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
+      DEBUG_printf(("ppdCacheCreateWithPPD: Unable to allocate %d "
                     "pwg_map_t's for InputSlot.", input_slot->num_choices));
       goto create_error;
     }
@@ -1371,7 +1371,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
   {
     if ((pc->types = calloc((size_t)media_type->num_choices, sizeof(pwg_map_t))) == NULL)
     {
-      DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
+      DEBUG_printf(("ppdCacheCreateWithPPD: Unable to allocate %d "
                     "pwg_map_t's for MediaType.", media_type->num_choices));
       goto create_error;
     }
@@ -1442,7 +1442,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
   {
     if ((pc->bins = calloc((size_t)output_bin->num_choices, sizeof(pwg_map_t))) == NULL)
     {
-      DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
+      DEBUG_printf(("ppdCacheCreateWithPPD: Unable to allocate %d "
                     "pwg_map_t's for OutputBin.", output_bin->num_choices));
       goto create_error;
     }
@@ -1493,7 +1493,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
       * Get the options for this preset...
       */
 
-      num_options = _ppdParseOptions(ppd_attr->value, 0, &options,
+      num_options = ppdParseOptions(ppd_attr->value, 0, &options,
                                      _PPD_PARSE_ALL);
 
       if ((quality = cupsGetOption("com.apple.print.preset.quality",
@@ -1567,7 +1567,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
 
         if (!pc->num_presets[pwg_print_color_mode][pwg_print_quality])
          pc->num_presets[pwg_print_color_mode][pwg_print_quality] =
-             _ppdParseOptions(ppd_attr->value, 0,
+             ppdParseOptions(ppd_attr->value, 0,
                               pc->presets[pwg_print_color_mode] +
                                   pwg_print_quality, _PPD_PARSE_OPTIONS);
       }
@@ -1811,7 +1811,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
         goto create_error;
 
       finishings->value       = (ipp_finishings_t)atoi(ppd_attr->spec);
-      finishings->num_options = _ppdParseOptions(ppd_attr->value, 0,
+      finishings->num_options = ppdParseOptions(ppd_attr->value, 0,
                                                  &(finishings->options),
                                                  _PPD_PARSE_OPTIONS);
 
@@ -2002,18 +2002,18 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
   create_error:
 
   set_error(_("Out of memory."), 1);
-  _ppdCacheDestroy(pc);
+  ppdCacheDestroy(pc);
 
   return (NULL);
 }
 
 
 /*
- * '_ppdCacheDestroy()' - Free all memory used for PWG mapping data.
+ * 'ppdCacheDestroy()' - Free all memory used for PWG mapping data.
  */
 
 void
-_ppdCacheDestroy(_ppd_cache_t *pc)     /* I - PPD cache and mapping data */
+ppdCacheDestroy(_ppd_cache_t *pc)      /* I - PPD cache and mapping data */
 {
   int          i;                      /* Looping var */
   pwg_map_t    *map;                   /* Current map */
@@ -2099,12 +2099,12 @@ _ppdCacheDestroy(_ppd_cache_t *pc)      /* I - PPD cache and mapping data */
 
 
 /*
- * '_ppdCacheGetBin()' - Get the PWG output-bin keyword associated with a PPD
+ * 'ppdCacheGetBin()' - Get the PWG output-bin keyword associated with a PPD
  *                  OutputBin.
  */
 
 const char *                           /* O - output-bin or NULL */
-_ppdCacheGetBin(
+ppdCacheGetBin(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *output_bin)          /* I - PPD OutputBin string */
 {
@@ -2132,12 +2132,12 @@ _ppdCacheGetBin(
 
 
 /*
- * '_ppdCacheGetFinishingOptions()' - Get PPD finishing options for the given
+ * 'ppdCacheGetFinishingOptions()' - Get PPD finishing options for the given
  *                                    IPP finishings value(s).
  */
 
 int                                    /* O  - New number of options */
-_ppdCacheGetFinishingOptions(
+ppdCacheGetFinishingOptions(
     _ppd_cache_t     *pc,              /* I  - PPD cache and mapping data */
     ipp_t            *job,             /* I  - Job attributes or NULL */
     ipp_finishings_t value,            /* I  - IPP finishings value of IPP_FINISHINGS_NONE */
@@ -2200,12 +2200,12 @@ _ppdCacheGetFinishingOptions(
 
 
 /*
- * '_ppdCacheGetFinishingValues()' - Get IPP finishings value(s) from the given
+ * 'ppdCacheGetFinishingValues()' - Get IPP finishings value(s) from the given
  *                                   PPD options.
  */
 
 int                                    /* O - Number of finishings values */
-_ppdCacheGetFinishingValues(
+ppdCacheGetFinishingValues(
     ppd_file_t    *ppd,                        /* I - Marked PPD file */
     _ppd_cache_t  *pc,                 /* I - PPD cache and mapping data */
     int           max_values,          /* I - Maximum number of finishings values */
@@ -2222,16 +2222,16 @@ _ppdCacheGetFinishingValues(
   * Range check input...
   */
 
-  DEBUG_printf(("_ppdCacheGetFinishingValues(ppd=%p, pc=%p, max_values=%d, values=%p)", ppd, pc, max_values, values));
+  DEBUG_printf(("ppdCacheGetFinishingValues(ppd=%p, pc=%p, max_values=%d, values=%p)", ppd, pc, max_values, values));
 
   if (!ppd || !pc || max_values < 1 || !values)
   {
-    DEBUG_puts("_ppdCacheGetFinishingValues: Bad arguments, returning 0.");
+    DEBUG_puts("ppdCacheGetFinishingValues: Bad arguments, returning 0.");
     return (0);
   }
   else if (!pc->finishings)
   {
-    DEBUG_puts("_ppdCacheGetFinishingValues: No finishings support, returning 0.");
+    DEBUG_puts("ppdCacheGetFinishingValues: No finishings support, returning 0.");
     return (0);
   }
 
@@ -2243,22 +2243,22 @@ _ppdCacheGetFinishingValues(
        f;
        f = (_ppd_pwg_finishings_t *)cupsArrayNext(pc->finishings))
   {
-    DEBUG_printf(("_ppdCacheGetFinishingValues: Checking %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
+    DEBUG_printf(("ppdCacheGetFinishingValues: Checking %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
 
     for (i = f->num_options, option = f->options; i > 0; i --, option ++)
     {
-      DEBUG_printf(("_ppdCacheGetFinishingValues: %s=%s?", option->name, option->value));
+      DEBUG_printf(("ppdCacheGetFinishingValues: %s=%s?", option->name, option->value));
 
       if ((choice = ppdFindMarkedChoice(ppd, option->name)) == NULL || _ppd_strcasecmp(option->value, choice->choice))
       {
-        DEBUG_puts("_ppdCacheGetFinishingValues: NO");
+        DEBUG_puts("ppdCacheGetFinishingValues: NO");
         break;
       }
     }
 
     if (i == 0)
     {
-      DEBUG_printf(("_ppdCacheGetFinishingValues: Adding %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
+      DEBUG_printf(("ppdCacheGetFinishingValues: Adding %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
 
       values[num_values ++] = (int)f->value;
 
@@ -2273,24 +2273,24 @@ _ppdCacheGetFinishingValues(
     * Always have at least "finishings" = 'none'...
     */
 
-    DEBUG_puts("_ppdCacheGetFinishingValues: Adding 3 (none).");
+    DEBUG_puts("ppdCacheGetFinishingValues: Adding 3 (none).");
     values[0] = IPP_FINISHINGS_NONE;
     num_values ++;
   }
 
-  DEBUG_printf(("_ppdCacheGetFinishingValues: Returning %d.", num_values));
+  DEBUG_printf(("ppdCacheGetFinishingValues: Returning %d.", num_values));
 
   return (num_values);
 }
 
 
 /*
- * '_ppdCacheGetInputSlot()' - Get the PPD InputSlot associated with the job
+ * 'ppdCacheGetInputSlot()' - Get the PPD InputSlot associated with the job
  *                        attributes or a keyword string.
  */
 
 const char *                           /* O - PPD InputSlot or NULL */
-_ppdCacheGetInputSlot(
+ppdCacheGetInputSlot(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     ipp_t        *job,                 /* I - Job attributes or NULL */
     const char   *keyword)             /* I - Keyword string or NULL */
@@ -2350,12 +2350,12 @@ _ppdCacheGetInputSlot(
 
 
 /*
- * '_ppdCacheGetMediaType()' - Get the PPD MediaType associated with the job
+ * 'ppdCacheGetMediaType()' - Get the PPD MediaType associated with the job
  *                        attributes or a keyword string.
  */
 
 const char *                           /* O - PPD MediaType or NULL */
-_ppdCacheGetMediaType(
+ppdCacheGetMediaType(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     ipp_t        *job,                 /* I - Job attributes or NULL */
     const char   *keyword)             /* I - Keyword string or NULL */
@@ -2404,12 +2404,12 @@ _ppdCacheGetMediaType(
 
 
 /*
- * '_ppdCacheGetOutputBin()' - Get the PPD OutputBin associated with the keyword
+ * 'ppdCacheGetOutputBin()' - Get the PPD OutputBin associated with the keyword
  *                        string.
  */
 
 const char *                           /* O - PPD OutputBin or NULL */
-_ppdCacheGetOutputBin(
+ppdCacheGetOutputBin(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *output_bin)          /* I - Keyword string */
 {
@@ -2437,12 +2437,12 @@ _ppdCacheGetOutputBin(
 
 
 /*
- * '_ppdCacheGetPageSize()' - Get the PPD PageSize associated with the job
+ * 'ppdCacheGetPageSize()' - Get the PPD PageSize associated with the job
  *                       attributes or a keyword string.
  */
 
 const char *                           /* O - PPD PageSize or NULL */
-_ppdCacheGetPageSize(
+ppdCacheGetPageSize(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     ipp_t        *job,                 /* I - Job attributes or NULL */
     const char   *keyword,             /* I - Keyword string or NULL */
@@ -2464,7 +2464,7 @@ _ppdCacheGetPageSize(
   const char   *ppd_name;              /* PPD media name */
 
 
-  DEBUG_printf(("_ppdCacheGetPageSize(pc=%p, job=%p, keyword=\"%s\", exact=%p)",
+  DEBUG_printf(("ppdCacheGetPageSize(pc=%p, job=%p, keyword=\"%s\", exact=%p)",
                pc, job, keyword, exact));
 
  /*
@@ -2677,11 +2677,11 @@ _ppdCacheGetPageSize(
 
 
 /*
- * '_ppdCacheGetSize()' - Get the PWG size associated with a PPD PageSize.
+ * 'ppdCacheGetSize()' - Get the PWG size associated with a PPD PageSize.
  */
 
 pwg_size_t *                           /* O - PWG size or NULL */
-_ppdCacheGetSize(
+ppdCacheGetSize(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *page_size)           /* I - PPD PageSize */
 {
@@ -2790,12 +2790,12 @@ _ppdCacheGetSize(
 
 
 /*
- * '_ppdCacheGetSource()' - Get the PWG media-source associated with a PPD
+ * 'ppdCacheGetSource()' - Get the PWG media-source associated with a PPD
  *                          InputSlot.
  */
 
 const char *                           /* O - PWG media-source keyword */
-_ppdCacheGetSource(
+ppdCacheGetSource(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *input_slot)          /* I - PPD InputSlot */
 {
@@ -2819,12 +2819,12 @@ _ppdCacheGetSource(
 
 
 /*
- * '_ppdCacheGetType()' - Get the PWG media-type associated with a PPD
+ * 'ppdCacheGetType()' - Get the PWG media-type associated with a PPD
  *                        MediaType.
  */
 
 const char *                           /* O - PWG media-type keyword */
-_ppdCacheGetType(
+ppdCacheGetType(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *media_type)          /* I - PPD MediaType */
 {
@@ -2848,11 +2848,11 @@ _ppdCacheGetType(
 
 
 /*
- * '_ppdCacheWriteFile()' - Write PWG mapping data to a file.
+ * 'ppdCacheWriteFile()' - Write PWG mapping data to a file.
  */
 
 int                                    /* O - 1 on success, 0 on failure */
-_ppdCacheWriteFile(
+ppdCacheWriteFile(
     _ppd_cache_t *pc,                  /* I - PPD cache and mapping data */
     const char   *filename,            /* I - File to write */
     ipp_t        *attrs)               /* I - Attributes to write, if any */
@@ -3076,12 +3076,12 @@ _ppdCacheWriteFile(
 
 
 /*
- * '_ppdCreateFromIPP()' - Create a PPD file describing the capabilities
+ * 'ppdCreateFromIPPCUPS()' - Create a PPD file describing the capabilities
  *                         of an IPP printer.
  */
 
 char *                                 /* O - PPD filename or @code NULL@ on error */
-_ppdCreateFromIPP(char   *buffer,      /* I - Filename buffer */
+ppdCreateFromIPPCUPS(char   *buffer,   /* I - Filename buffer */
                   size_t bufsize,      /* I - Size of filename buffer */
                  ipp_t  *response)     /* I - Get-Printer-Attributes response */
 {
@@ -4818,12 +4818,12 @@ _ppdCreateFromIPP(char   *buffer,       /* I - Filename buffer */
 
 
 /*
- * '_pwgInputSlotForSource()' - Get the InputSlot name for the given PWG
+ * 'ppdPwgInputSlotForSource()' - Get the InputSlot name for the given PWG
  *                              media-source.
  */
 
 const char *                           /* O - InputSlot name */
-_pwgInputSlotForSource(
+ppdPwgInputSlotForSource(
     const char *media_source,          /* I - PWG media-source */
     char       *name,                  /* I - Name buffer */
     size_t     namesize)               /* I - Size of name buffer */
@@ -4865,12 +4865,12 @@ _pwgInputSlotForSource(
 
 
 /*
- * '_pwgMediaTypeForType()' - Get the MediaType name for the given PWG
+ * 'ppdPwgMediaTypeForType()' - Get the MediaType name for the given PWG
  *                            media-type.
  */
 
 const char *                           /* O - MediaType name */
-_pwgMediaTypeForType(
+ppdPwgMediaTypeForType(
     const char *media_type,            /* I - PWG media-type */
     char       *name,                  /* I - Name buffer */
     size_t     namesize)               /* I - Size of name buffer */
@@ -4914,11 +4914,11 @@ _pwgMediaTypeForType(
 
 
 /*
- * '_pwgPageSizeForMedia()' - Get the PageSize name for the given media.
+ * 'ppdPwgPageSizeForMedia()' - Get the PageSize name for the given media.
  */
 
 const char *                           /* O - PageSize name */
-_pwgPageSizeForMedia(
+ppdPwgPageSizeForMedia(
     pwg_media_t *media,                        /* I - Media */
     char        *name,                 /* I - PageSize name buffer */
     size_t      namesize)              /* I - Size of name buffer */
index f6fcdfb6b32a3e3759b1ae06dca5bd8d8e370b24..341f84c91cb9a4d4fb168a616ea9c7f17baaaab2 100644 (file)
@@ -73,13 +73,13 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
 
   for (i = ppd->num_groups, group = ppd->groups; i > 0; i --, group ++)
   {
-    if ((locattr = _ppdLocalizedAttr(ppd, "Translation", group->name,
+    if ((locattr = ppdLocalizedAttr(ppd, "Translation", group->name,
                                      ll_CC)) != NULL)
       strlcpy(group->text, locattr->text, sizeof(group->text));
 
     for (j = group->num_options, option = group->options; j > 0; j --, option ++)
     {
-      if ((locattr = _ppdLocalizedAttr(ppd, "Translation", option->keyword,
+      if ((locattr = ppdLocalizedAttr(ppd, "Translation", option->keyword,
                                        ll_CC)) != NULL)
        strlcpy(option->text, locattr->text, sizeof(option->text));
 
@@ -89,13 +89,13 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
       {
         if (strcmp(choice->choice, "Custom") ||
            !ppdFindCustomOption(ppd, option->keyword))
-         locattr = _ppdLocalizedAttr(ppd, option->keyword, choice->choice,
+         locattr = ppdLocalizedAttr(ppd, option->keyword, choice->choice,
                                      ll_CC);
        else
        {
          snprintf(ckeyword, sizeof(ckeyword), "Custom%s", option->keyword);
 
-         locattr = _ppdLocalizedAttr(ppd, ckeyword, "True", ll_CC);
+         locattr = ppdLocalizedAttr(ppd, ckeyword, "True", ll_CC);
        }
 
         if (locattr)
@@ -119,7 +119,7 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
       snprintf(ckeyword, sizeof(ckeyword), "ParamCustom%.29s",
               coption->keyword);
 
-      if ((locattr = _ppdLocalizedAttr(ppd, ckeyword, cparam->name,
+      if ((locattr = ppdLocalizedAttr(ppd, ckeyword, cparam->name,
                                        ll_CC)) != NULL)
         strlcpy(cparam->text, locattr->text, sizeof(cparam->text));
     }
@@ -131,7 +131,7 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
 
   if ((attr = ppdFindAttr(ppd, "APCustomColorMatchingName", NULL)) != NULL)
   {
-    if ((locattr = _ppdLocalizedAttr(ppd, "APCustomColorMatchingName",
+    if ((locattr = ppdLocalizedAttr(ppd, "APCustomColorMatchingName",
                                      attr->spec, ll_CC)) != NULL)
       strlcpy(attr->text, locattr->text, sizeof(attr->text));
   }
@@ -142,7 +142,7 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
   {
     cupsArraySave(ppd->sorted_attrs);
 
-    if ((locattr = _ppdLocalizedAttr(ppd, "cupsICCProfile", attr->spec,
+    if ((locattr = ppdLocalizedAttr(ppd, "cupsICCProfile", attr->spec,
                                      ll_CC)) != NULL)
       strlcpy(attr->text, locattr->text, sizeof(attr->text));
 
@@ -159,7 +159,7 @@ ppdLocalize(ppd_file_t *ppd)                /* I - PPD file */
   {
     cupsArraySave(ppd->sorted_attrs);
 
-    if ((locattr = _ppdLocalizedAttr(ppd, "APPrinterPreset", attr->spec,
+    if ((locattr = ppdLocalizedAttr(ppd, "APPrinterPreset", attr->spec,
                                      ll_CC)) != NULL)
       strlcpy(attr->text, locattr->text, sizeof(attr->text));
 
@@ -198,9 +198,9 @@ ppdLocalizeAttr(ppd_file_t *ppd,    /* I - PPD file */
   */
 
   if (spec)
-    locattr = _ppdLocalizedAttr(ppd, keyword, spec, ll_CC);
+    locattr = ppdLocalizedAttr(ppd, keyword, spec, ll_CC);
   else
-    locattr = _ppdLocalizedAttr(ppd, "Translation", keyword, ll_CC);
+    locattr = ppdLocalizedAttr(ppd, "Translation", keyword, ll_CC);
 
   if (!locattr)
     locattr = ppdFindAttr(ppd, keyword, spec);
@@ -262,7 +262,7 @@ ppdLocalizeIPPReason(
   * Find the localized attribute...
   */
 
-  if ((locattr = _ppdLocalizedAttr(ppd, "cupsIPPReason", reason,
+  if ((locattr = ppdLocalizedAttr(ppd, "cupsIPPReason", reason,
                                    ll_CC)) == NULL)
     locattr = ppdFindAttr(ppd, "cupsIPPReason", reason);
 
@@ -460,7 +460,7 @@ ppdLocalizeMarkerName(
   * Find the localized attribute...
   */
 
-  if ((locattr = _ppdLocalizedAttr(ppd, "cupsMarkerName", name,
+  if ((locattr = ppdLocalizedAttr(ppd, "cupsMarkerName", name,
                                    ll_CC)) == NULL)
     locattr = ppdFindAttr(ppd, "cupsMarkerName", name);
 
@@ -469,11 +469,11 @@ ppdLocalizeMarkerName(
 
 
 /*
- * '_ppdFreeLanguages()' - Free an array of languages from _ppdGetLanguages.
+ * 'ppdFreeLanguages()' - Free an array of languages from ppdGetLanguages.
  */
 
 void
-_ppdFreeLanguages(
+ppdFreeLanguages(
     cups_array_t *languages)           /* I - Languages array */
 {
   char *language;                      /* Current language */
@@ -489,11 +489,11 @@ _ppdFreeLanguages(
 
 
 /*
- * '_ppdGetLanguages()' - Get an array of languages from a PPD file.
+ * 'ppdGetLanguages()' - Get an array of languages from a PPD file.
  */
 
 cups_array_t *                         /* O - Languages array */
-_ppdGetLanguages(ppd_file_t *ppd)      /* I - PPD file */
+ppdGetLanguages(ppd_file_t *ppd)       /* I - PPD file */
 {
   cups_array_t *languages;             /* Languages array */
   ppd_attr_t   *attr;                  /* cupsLanguages attribute */
@@ -567,14 +567,14 @@ _ppdGetLanguages(ppd_file_t *ppd) /* I - PPD file */
 
 
 /*
- * '_ppdHashName()' - Generate a hash value for a device or profile name.
+ * 'ppdHashName()' - Generate a hash value for a device or profile name.
  *
  * This function is primarily used on macOS, but is generally accessible
  * since cupstestppd needs to check for profile name collisions in PPD files...
  */
 
 unsigned                               /* O - Hash value */
-_ppdHashName(const char *name)         /* I - Name to hash */
+ppdHashName(const char *name)          /* I - Name to hash */
 {
   unsigned     mult,                   /* Multiplier */
                hash = 0;               /* Hash value */
@@ -588,11 +588,11 @@ _ppdHashName(const char *name)            /* I - Name to hash */
 
 
 /*
- * '_ppdLocalizedAttr()' - Find a localized attribute.
+ * 'ppdLocalizedAttr()' - Find a localized attribute.
  */
 
 ppd_attr_t *                           /* O - Localized attribute or NULL */
-_ppdLocalizedAttr(ppd_file_t *ppd,     /* I - PPD file */
+ppdLocalizedAttr(ppd_file_t *ppd,      /* I - PPD file */
                  const char *keyword,  /* I - Main keyword */
                  const char *spec,     /* I - Option keyword */
                  const char *ll_CC)    /* I - Language + country locale */
index 8a6c9d3fb3db4ba7b2f2438400d9fc6228821f11..62c0c9ce7b32ae12ca3d6e394d769db49541d190 100644 (file)
@@ -96,7 +96,7 @@ cupsMarkOptions(
     * Load PPD cache and mapping data as needed...
     */
 
-    ppd->cache = _ppdCacheCreateWithPPD(ppd);
+    ppd->cache = ppdCacheCreateWithPPD(ppd);
   }
 
   cache = ppd->cache;
@@ -134,17 +134,17 @@ cupsMarkOptions(
       {
         if (!_ppd_strncasecmp(s, "Custom.", 7) || ppdPageSize(ppd, s))
           ppd_mark_option(ppd, "PageSize", s);
-        else if ((ppd_keyword = _ppdCacheGetPageSize(cache, NULL, s, NULL)) != NULL)
+        else if ((ppd_keyword = ppdCacheGetPageSize(cache, NULL, s, NULL)) != NULL)
          ppd_mark_option(ppd, "PageSize", ppd_keyword);
       }
 
       if (cache && cache->source_option &&
           !cupsGetOption(cache->source_option, num_options, options) &&
-         (ppd_keyword = _ppdCacheGetInputSlot(cache, NULL, s)) != NULL)
+         (ppd_keyword = ppdCacheGetInputSlot(cache, NULL, s)) != NULL)
        ppd_mark_option(ppd, cache->source_option, ppd_keyword);
 
       if (!cupsGetOption("MediaType", num_options, options) &&
-         (ppd_keyword = _ppdCacheGetMediaType(cache, NULL, s)) != NULL)
+         (ppd_keyword = ppdCacheGetMediaType(cache, NULL, s)) != NULL)
        ppd_mark_option(ppd, "MediaType", ppd_keyword);
     }
   }
@@ -217,7 +217,7 @@ cupsMarkOptions(
     }
 
     if (output_bin && !cupsGetOption("OutputBin", num_options, options) &&
-       (ppd_keyword = _ppdCacheGetOutputBin(cache, output_bin)) != NULL)
+       (ppd_keyword = ppdCacheGetOutputBin(cache, output_bin)) != NULL)
     {
      /*
       * Map output-bin to OutputBin...
@@ -603,7 +603,7 @@ ppdNextOption(ppd_file_t *ppd)              /* I - PPD file */
 
 
 /*
- * '_ppdParseOptions()' - Parse options from a PPD file.
+ * 'ppdParseOptions()' - Parse options from a PPD file.
  *
  * This function looks for strings of the form:
  *
@@ -614,7 +614,7 @@ ppdNextOption(ppd_file_t *ppd)              /* I - PPD file */
  */
 
 int                                    /* O  - Number of options */
-_ppdParseOptions(
+ppdParseOptions(
     const char    *s,                  /* I  - String to parse */
     int           num_options,         /* I  - Number of options */
     cups_option_t **options,           /* IO - Options */
@@ -750,7 +750,7 @@ ppd_mark_choices(ppd_file_t *ppd,   /* I - PPD file */
     return;
 
   options     = NULL;
-  num_options = _ppdParseOptions(s, 0, &options, 0);
+  num_options = ppdParseOptions(s, 0, &options, 0);
 
   for (i = num_options, option = options; i > 0; i --, option ++)
     ppd_mark_option(ppd, option->name, option->value);
index 36a3a70c135e1ab6c2d723b7ae84c7c8dd997790..6feac0983493171ae252c4a236d35ba3642f2ada 100644 (file)
--- a/ppd/ppd.c
+++ b/ppd/ppd.c
@@ -261,7 +261,7 @@ ppdClose(ppd_file_t *ppd)           /* I - PPD file record */
   */
 
   if (ppd->cache)
-    _ppdCacheDestroy(ppd->cache);
+    ppdCacheDestroy(ppd->cache);
 
  /*
   * Free the whole record...
@@ -319,12 +319,12 @@ ppdErrorString(ppd_status_t status)       /* I - PPD status */
 
 
 /*
- * '_ppdGetEncoding()' - Get the CUPS encoding value for the given
+ * 'ppdGetEncoding()' - Get the CUPS encoding value for the given
  *                       LanguageEncoding.
  */
 
 cups_encoding_t                                /* O - CUPS encoding value */
-_ppdGetEncoding(const char *name)      /* I - LanguageEncoding string */
+ppdGetEncoding(const char *name)       /* I - LanguageEncoding string */
 {
   if (!_ppd_strcasecmp(name, "ISOLatin1"))
     return (CUPS_ISO8859_1);
@@ -344,11 +344,11 @@ _ppdGetEncoding(const char *name) /* I - LanguageEncoding string */
 
 
 /*
- * '_ppdGlobals()' - Return a pointer to thread local storage
+ * 'ppdGlobals()' - Return a pointer to thread local storage
  */
 
 _ppd_globals_t *                       /* O - Pointer to global data */
-_ppdGlobals(void)
+ppdGlobals(void)
 {
   _ppd_globals_t *pg;                  /* Pointer to global data */
 
@@ -392,7 +392,7 @@ _ppdGlobals(void)
 ppd_status_t                           /* O - Status code */
 ppdLastError(int *line)                        /* O - Line number */
 {
-  _ppd_globals_t       *pg = _ppdGlobals();
+  _ppd_globals_t       *pg = ppdGlobals();
                                        /* Global data */
 
 
@@ -404,13 +404,13 @@ ppdLastError(int *line)                   /* O - Line number */
 
 
 /*
- * '_ppdOpen()' - Read a PPD file into memory.
+ * 'ppdOpenWithLocalization()' - Read a PPD file into memory.
  *
  * @since CUPS 1.2/macOS 10.5@
  */
 
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
-_ppdOpen(
+ppdOpenWithLocalization(
     cups_file_t                *fp,            /* I - File to read from */
     _ppd_localization_t        localization)   /* I - Localization to load */
 {
@@ -442,7 +442,7 @@ _ppdOpen(
   int                  ui_keyword;     /* Is this line a UI keyword? */
   cups_lang_t          *lang;          /* Language data */
   cups_encoding_t      encoding;       /* Encoding of PPD file */
-  _ppd_globals_t       *pg = _ppdGlobals();
+  _ppd_globals_t       *pg = ppdGlobals();
                                        /* Global data */
   char                 custom_name[PPD_MAX_NAME];
                                        /* CustomFoo attribute name */
@@ -519,7 +519,7 @@ _ppdOpen(
                        };
 
 
-  DEBUG_printf(("_ppdOpen(fp=%p)", fp));
+  DEBUG_printf(("ppdOpenWithLocalization(fp=%p)", fp));
 
  /*
   * Default to "OK" status...
@@ -579,7 +579,7 @@ _ppdOpen(
     ll_CC_len = strlen(ll_CC);
     ll_len    = strlen(ll);
 
-    DEBUG_printf(("2_ppdOpen: Loading localizations matching \"%s\" and \"%s\"",
+    DEBUG_printf(("2ppdOpenWithLocalization: Loading localizations matching \"%s\" and \"%s\"",
                   ll_CC, ll));
   }
 
@@ -592,7 +592,7 @@ _ppdOpen(
 
   mask = ppd_read(fp, &line, keyword, name, text, &string, 0, pg);
 
-  DEBUG_printf(("2_ppdOpen: mask=%x, keyword=\"%s\"...", mask, keyword));
+  DEBUG_printf(("2ppdOpenWithLocalization: mask=%x, keyword=\"%s\"...", mask, keyword));
 
   if (mask == 0 ||
       strcmp(keyword, "PPD-Adobe") ||
@@ -611,7 +611,7 @@ _ppdOpen(
     return (NULL);
   }
 
-  DEBUG_printf(("2_ppdOpen: keyword=%s, string=%p", keyword, string));
+  DEBUG_printf(("2ppdOpenWithLocalization: keyword=%s, string=%p", keyword, string));
 
  /*
   * Allocate memory for the PPD file record...
@@ -650,7 +650,7 @@ _ppdOpen(
 
   while ((mask = ppd_read(fp, &line, keyword, name, text, &string, 1, pg)) != 0)
   {
-    DEBUG_printf(("2_ppdOpen: mask=%x, keyword=\"%s\", name=\"%s\", "
+    DEBUG_printf(("2ppdOpenWithLocalization: mask=%x, keyword=\"%s\", name=\"%s\", "
                   "text=\"%s\", string=%d chars...", mask, keyword, name, text,
                  string ? (int)strlen(string) : 0));
 
@@ -706,7 +706,7 @@ _ppdOpen(
           strncmp(ll_CC, keyword, ll_CC_len) &&
           strncmp(ll, keyword, ll_len)))
       {
-       DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
+       DEBUG_printf(("2ppdOpenWithLocalization: Ignoring localization: \"%s\"\n", keyword));
        free(string);
        string = NULL;
        continue;
@@ -727,7 +727,7 @@ _ppdOpen(
 
        if (i >= (int)(sizeof(color_keywords) / sizeof(color_keywords[0])))
        {
-         DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
+         DEBUG_printf(("2ppdOpenWithLocalization: Ignoring localization: \"%s\"\n", keyword));
          free(string);
          string = NULL;
          continue;
@@ -751,7 +751,7 @@ _ppdOpen(
 
         ui_keyword = 1;
 
-        DEBUG_printf(("2_ppdOpen: FOUND ADOBE UI KEYWORD %s WITHOUT OPENUI!",
+        DEBUG_printf(("2ppdOpenWithLocalization: FOUND ADOBE UI KEYWORD %s WITHOUT OPENUI!",
                      keyword));
 
         if (!group)
@@ -760,7 +760,7 @@ _ppdOpen(
                                     encoding)) == NULL)
            goto error;
 
-          DEBUG_printf(("2_ppdOpen: Adding to group %s...", group->text));
+          DEBUG_printf(("2ppdOpenWithLocalization: Adding to group %s...", group->text));
           option = ppd_get_option(group, keyword);
          group  = NULL;
        }
@@ -795,7 +795,7 @@ _ppdOpen(
              !strcmp(ppd->attrs[j]->name + 7, keyword) &&
              ppd->attrs[j]->value)
          {
-           DEBUG_printf(("2_ppdOpen: Setting Default%s to %s via attribute...",
+           DEBUG_printf(("2ppdOpenWithLocalization: Setting Default%s to %s via attribute...",
                          option->keyword, ppd->attrs[j]->value));
            strlcpy(option->defchoice, ppd->attrs[j]->value,
                    sizeof(option->defchoice));
@@ -826,7 +826,7 @@ _ppdOpen(
       */
 
       ppd->lang_encoding = strdup("UTF-8");
-      encoding           = _ppdGetEncoding(string);
+      encoding           = ppdGetEncoding(string);
     }
     else if (!strcmp(keyword, "LanguageVersion"))
       ppd->lang_version = string;
@@ -1098,7 +1098,7 @@ _ppdOpen(
     {
       ppd_option_t     *custom_option; /* Custom option */
 
-      DEBUG_puts("2_ppdOpen: Processing Custom option...");
+      DEBUG_puts("2ppdOpenWithLocalization: Processing Custom option...");
 
      /*
       * Get the option and custom option...
@@ -1125,7 +1125,7 @@ _ppdOpen(
         if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
          if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
          {
-           DEBUG_puts("1_ppdOpen: Unable to add Custom choice!");
+           DEBUG_puts("1ppdOpenWithLocalization: Unable to add Custom choice!");
 
            pg->ppd_status = PPD_ALLOC_ERROR;
 
@@ -1165,7 +1165,7 @@ _ppdOpen(
          if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
            if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
            {
-             DEBUG_puts("1_ppdOpen: Unable to add Custom choice!");
+             DEBUG_puts("1ppdOpenWithLocalization: Unable to add Custom choice!");
 
              pg->ppd_status = PPD_ALLOC_ERROR;
 
@@ -1270,7 +1270,7 @@ _ppdOpen(
       * Add an option record to the current sub-group, group, or file...
       */
 
-      DEBUG_printf(("2_ppdOpen: name=\"%s\" (%d)", name, (int)strlen(name)));
+      DEBUG_printf(("2ppdOpenWithLocalization: name=\"%s\" (%d)", name, (int)strlen(name)));
 
       if (name[0] == '*')
         _ppd_strcpy(name, name + 1); /* Eliminate leading asterisk */
@@ -1278,7 +1278,7 @@ _ppdOpen(
       for (i = (int)strlen(name) - 1; i > 0 && _ppd_isspace(name[i]); i --)
         name[i] = '\0'; /* Eliminate trailing spaces */
 
-      DEBUG_printf(("2_ppdOpen: OpenUI of %s in group %s...", name,
+      DEBUG_printf(("2ppdOpenWithLocalization: OpenUI of %s in group %s...", name,
                     group ? group->text : "(null)"));
 
       if (subgroup != NULL)
@@ -1289,7 +1289,7 @@ _ppdOpen(
                                   encoding)) == NULL)
          goto error;
 
-        DEBUG_printf(("2_ppdOpen: Adding to group %s...", group->text));
+        DEBUG_printf(("2ppdOpenWithLocalization: Adding to group %s...", group->text));
         option = ppd_get_option(group, name);
        group  = NULL;
       }
@@ -1327,7 +1327,7 @@ _ppdOpen(
            !strcmp(ppd->attrs[j]->name + 7, name) &&
            ppd->attrs[j]->value)
        {
-         DEBUG_printf(("2_ppdOpen: Setting Default%s to %s via attribute...",
+         DEBUG_printf(("2ppdOpenWithLocalization: Setting Default%s to %s via attribute...",
                        option->keyword, ppd->attrs[j]->value));
          strlcpy(option->defchoice, ppd->attrs[j]->value,
                  sizeof(option->defchoice));
@@ -1373,7 +1373,7 @@ _ppdOpen(
         if ((choice = ppdFindChoice(option, "Custom")) == NULL)
          if ((choice = ppd_add_choice(option, "Custom")) == NULL)
          {
-           DEBUG_puts("1_ppdOpen: Unable to add Custom choice!");
+           DEBUG_puts("1ppdOpenWithLocalization: Unable to add Custom choice!");
 
            pg->ppd_status = PPD_ALLOC_ERROR;
 
@@ -1446,7 +1446,7 @@ _ppdOpen(
            !strcmp(ppd->attrs[j]->name + 7, name) &&
            ppd->attrs[j]->value)
        {
-         DEBUG_printf(("2_ppdOpen: Setting Default%s to %s via attribute...",
+         DEBUG_printf(("2ppdOpenWithLocalization: Setting Default%s to %s via attribute...",
                        option->keyword, ppd->attrs[j]->value));
          strlcpy(option->defchoice, ppd->attrs[j]->value,
                  sizeof(option->defchoice));
@@ -1476,7 +1476,7 @@ _ppdOpen(
       {
        if ((choice = ppd_add_choice(option, "Custom")) == NULL)
        {
-         DEBUG_puts("1_ppdOpen: Unable to add Custom choice!");
+         DEBUG_puts("1ppdOpenWithLocalization: Unable to add Custom choice!");
 
          pg->ppd_status = PPD_ALLOC_ERROR;
 
@@ -1670,11 +1670,11 @@ _ppdOpen(
         * Set the default as part of the current option...
        */
 
-        DEBUG_printf(("2_ppdOpen: Setting %s to %s...", keyword, string));
+        DEBUG_printf(("2ppdOpenWithLocalization: Setting %s to %s...", keyword, string));
 
         strlcpy(option->defchoice, string, sizeof(option->defchoice));
 
-        DEBUG_printf(("2_ppdOpen: %s is now %s...", keyword, option->defchoice));
+        DEBUG_printf(("2ppdOpenWithLocalization: %s is now %s...", keyword, option->defchoice));
       }
       else
       {
@@ -1687,7 +1687,7 @@ _ppdOpen(
 
         if ((toption = ppdFindOption(ppd, keyword + 7)) != NULL)
        {
-         DEBUG_printf(("2_ppdOpen: Setting %s to %s...", keyword, string));
+         DEBUG_printf(("2ppdOpenWithLocalization: Setting %s to %s...", keyword, string));
          strlcpy(toption->defchoice, string, sizeof(toption->defchoice));
        }
       }
@@ -1936,7 +1936,7 @@ _ppdOpen(
                 (PPD_KEYWORD | PPD_OPTION | PPD_STRING) &&
             !strcmp(keyword, option->keyword))
     {
-      DEBUG_printf(("2_ppdOpen: group=%p, subgroup=%p", group, subgroup));
+      DEBUG_printf(("2ppdOpenWithLocalization: group=%p, subgroup=%p", group, subgroup));
 
       if (!_ppd_strcasecmp(name, "custom") || !_ppd_strncasecmp(name, "custom.", 7))
       {
@@ -2022,7 +2022,7 @@ _ppdOpen(
 
 #ifdef DEBUG
   if (!cupsFileEOF(fp))
-    DEBUG_printf(("1_ppdOpen: Premature EOF at %lu...\n",
+    DEBUG_printf(("1ppdOpenWithLocalization: Premature EOF at %lu...\n",
                   (unsigned long)cupsFileTell(fp)));
 #endif /* DEBUG */
 
@@ -2127,7 +2127,7 @@ ppdOpen(FILE *fp)                 /* I - File to read from */
   * Load the PPD file using the newer API...
   */
 
-  ppd = _ppdOpen(cf, _PPD_LOCALIZATION_DEFAULT);
+  ppd = ppdOpenWithLocalization(cf, _PPD_LOCALIZATION_DEFAULT);
 
  /*
   * Close the CUPS file and return the PPD...
@@ -2148,7 +2148,7 @@ ppdOpen(FILE *fp)                 /* I - File to read from */
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
 ppdOpen2(cups_file_t *fp)              /* I - File to read from */
 {
-  return _ppdOpen(fp, _PPD_LOCALIZATION_DEFAULT);
+  return ppdOpenWithLocalization(fp, _PPD_LOCALIZATION_DEFAULT);
 }
 
 
@@ -2161,7 +2161,7 @@ ppdOpenFd(int fd)                 /* I - File to read from */
 {
   cups_file_t          *fp;            /* CUPS file pointer */
   ppd_file_t           *ppd;           /* PPD file record */
-  _ppd_globals_t       *pg = _ppdGlobals();
+  _ppd_globals_t       *pg = ppdGlobals();
                                        /* Global data */
 
 
@@ -2203,16 +2203,16 @@ ppdOpenFd(int fd)                       /* I - File to read from */
 
 
 /*
- * '_ppdOpenFile()' - Read a PPD file into memory.
+ * 'ppdOpenFileWithLocalization()' - Read a PPD file into memory.
  */
 
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
-_ppdOpenFile(const char                  *filename,    /* I - File to read from */
+ppdOpenFileWithLocalization(const char           *filename,    /* I - File to read from */
             _ppd_localization_t  localization) /* I - Localization to load */
 {
   cups_file_t          *fp;            /* File pointer */
   ppd_file_t           *ppd;           /* PPD file record */
-  _ppd_globals_t       *pg = _ppdGlobals();
+  _ppd_globals_t       *pg = ppdGlobals();
                                        /* Global data */
 
 
@@ -2239,7 +2239,7 @@ _ppdOpenFile(const char             *filename,    /* I - File to read from */
 
   if ((fp = cupsFileOpen(filename, "r")) != NULL)
   {
-    ppd = _ppdOpen(fp, localization);
+    ppd = ppdOpenWithLocalization(fp, localization);
 
     cupsFileClose(fp);
   }
@@ -2260,7 +2260,7 @@ _ppdOpenFile(const char             *filename,    /* I - File to read from */
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
 ppdOpenFile(const char *filename)      /* I - File to read from */
 {
-  return _ppdOpenFile(filename, _PPD_LOCALIZATION_DEFAULT);
+  return ppdOpenFileWithLocalization(filename, _PPD_LOCALIZATION_DEFAULT);
 }
 
 
@@ -2273,7 +2273,7 @@ ppdOpenFile(const char *filename) /* I - File to read from */
 void
 ppdSetConformance(ppd_conform_t c)     /* I - Conformance level */
 {
-  _ppd_globals_t       *pg = _ppdGlobals();
+  _ppd_globals_t       *pg = ppdGlobals();
                                        /* Global data */
 
 
index 4417874db932d4a0da25e6b127d21124c460a7c3..456210a1da7a0e250ff4c74042049acdd60069e0 100644 (file)
--- a/ppd/ppd.h
+++ b/ppd/ppd.h
@@ -296,7 +296,7 @@ typedef struct _ppd_globals_s               /**** CUPS PPD global state data ****/
                                        /* PPD filename */
 } _ppd_globals_t;
 
-typedef enum _ppd_localization_e       /**** Selector for _ppdOpen ****/
+typedef enum _ppd_localization_e       /**** Selector for ppdOpenWithLocalization ****/
 {
   _PPD_LOCALIZATION_DEFAULT,           /* Load only the default localization */
   _PPD_LOCALIZATION_ICC_PROFILES,      /* Load only the color profile localization */
@@ -304,7 +304,7 @@ typedef enum _ppd_localization_e    /**** Selector for _ppdOpen ****/
   _PPD_LOCALIZATION_ALL                        /* Load all localizations */
 } _ppd_localization_t;
 
-typedef enum _ppd_parse_e              /**** Selector for _ppdParseOptions ****/
+typedef enum _ppd_parse_e              /**** Selector for ppdParseOptions ****/
 {
   _PPD_PARSE_OPTIONS,                  /* Parse only the options */
   _PPD_PARSE_PROPERTIES,               /* Parse only the properties */
@@ -560,62 +560,61 @@ extern int                ppdPageSizeLimits(ppd_file_t *ppd,
 /**** New in libppd (cups-filters) ****/
 
 /**** New in cups-filters 1.0.28 ****/
-extern int             _ppdConvertOptions(ipp_t *request, ppd_file_t *ppd, _ppd_cache_t *pc, ipp_attribute_t *media_col_sup, ipp_attribute_t *doc_handling_sup, ipp_attribute_t *print_color_mode_sup, const char *user, const char *format, int copies, int num_options, cups_option_t *options);
-extern int             _ppdRasterExecPS(cups_page_header2_t *h, int *preferred_bits, const char *code);
-extern int             _ppdRasterInterpretPPD(cups_page_header2_t *h, ppd_file_t *ppd, int num_options, cups_option_t *options, cups_interpret_cb_t func);
+extern int             ppdConvertOptions(ipp_t *request, ppd_file_t *ppd, _ppd_cache_t *pc, ipp_attribute_t *media_col_sup, ipp_attribute_t *doc_handling_sup, ipp_attribute_t *print_color_mode_sup, const char *user, const char *format, int copies, int num_options, cups_option_t *options);
+extern int             ppdRasterExecPS(cups_page_header2_t *h, int *preferred_bits, const char *code);
+extern int             ppdRasterInterpretPPD(cups_page_header2_t *h, ppd_file_t *ppd, int num_options, cups_option_t *options, cups_interpret_cb_t func);
 
-extern _ppd_cache_t    *_ppdCacheCreateWithFile(const char *filename,
+extern _ppd_cache_t    *ppdCacheCreateWithFile(const char *filename,
                                                 ipp_t **attrs);
-extern _ppd_cache_t    *_ppdCacheCreateWithPPD(ppd_file_t *ppd);
-extern void            _ppdCacheDestroy(_ppd_cache_t *pc);
-extern const char      *_ppdCacheGetBin(_ppd_cache_t *pc,
+extern _ppd_cache_t    *ppdCacheCreateWithPPD(ppd_file_t *ppd);
+extern void            ppdCacheDestroy(_ppd_cache_t *pc);
+extern const char      *ppdCacheGetBin(_ppd_cache_t *pc,
                                         const char *output_bin);
-extern int             _ppdCacheGetFinishingOptions(_ppd_cache_t *pc,
+extern int             ppdCacheGetFinishingOptions(_ppd_cache_t *pc,
                                                     ipp_t *job,
                                                     ipp_finishings_t value,
                                                     int num_options,
                                                     cups_option_t **options);
-extern int             _ppdCacheGetFinishingValues(ppd_file_t *ppd, _ppd_cache_t *pc, int max_values, int *values);
-extern const char      *_ppdCacheGetInputSlot(_ppd_cache_t *pc, ipp_t *job,
+extern int             ppdCacheGetFinishingValues(ppd_file_t *ppd, _ppd_cache_t *pc, int max_values, int *values);
+extern const char      *ppdCacheGetInputSlot(_ppd_cache_t *pc, ipp_t *job,
                                               const char *keyword);
-extern const char      *_ppdCacheGetMediaType(_ppd_cache_t *pc, ipp_t *job,
+extern const char      *ppdCacheGetMediaType(_ppd_cache_t *pc, ipp_t *job,
                                               const char *keyword);
-extern const char      *_ppdCacheGetOutputBin(_ppd_cache_t *pc,
+extern const char      *ppdCacheGetOutputBin(_ppd_cache_t *pc,
                                               const char *keyword);
-extern const char      *_ppdCacheGetPageSize(_ppd_cache_t *pc, ipp_t *job,
+extern const char      *ppdCacheGetPageSize(_ppd_cache_t *pc, ipp_t *job,
                                              const char *keyword, int *exact);
-extern pwg_size_t      *_ppdCacheGetSize(_ppd_cache_t *pc,
+extern pwg_size_t      *ppdCacheGetSize(_ppd_cache_t *pc,
                                          const char *page_size);
-extern const char      *_ppdCacheGetSource(_ppd_cache_t *pc,
+extern const char      *ppdCacheGetSource(_ppd_cache_t *pc,
                                            const char *input_slot);
-extern const char      *_ppdCacheGetType(_ppd_cache_t *pc,
+extern const char      *ppdCacheGetType(_ppd_cache_t *pc,
                                          const char *media_type);
-extern int             _ppdCacheWriteFile(_ppd_cache_t *pc,
+extern int             ppdCacheWriteFile(_ppd_cache_t *pc,
                                           const char *filename, ipp_t *attrs);
-extern char            *_ppdCreateFromIPP(char *buffer, size_t bufsize, ipp_t *response);
-extern void            _ppdFreeLanguages(cups_array_t *languages);
-extern cups_encoding_t _ppdGetEncoding(const char *name);
-extern cups_array_t    *_ppdGetLanguages(ppd_file_t *ppd);
-extern _ppd_globals_t  *_ppdGlobals(void);
-extern unsigned                _ppdHashName(const char *name);
-extern ppd_attr_t      *_ppdLocalizedAttr(ppd_file_t *ppd, const char *keyword,
+extern char            *ppdCreateFromIPPCUPS(char *buffer, size_t bufsize, ipp_t *response);
+extern void            ppdFreeLanguages(cups_array_t *languages);
+extern cups_encoding_t ppdGetEncoding(const char *name);
+extern cups_array_t    *ppdGetLanguages(ppd_file_t *ppd);
+extern _ppd_globals_t  *ppdGlobals(void);
+extern unsigned                ppdHashName(const char *name);
+extern ppd_attr_t      *ppdLocalizedAttr(ppd_file_t *ppd, const char *keyword,
                                           const char *spec, const char *ll_CC);
-extern char            *_ppdNormalizeMakeAndModel(const char *make_and_model,
+extern char            *ppdNormalizeMakeAndModel(const char *make_and_model,
                                                   char *buffer,
                                                   size_t bufsize);
-extern ppd_file_t      *_ppdOpen(cups_file_t *fp,
-                                 _ppd_localization_t localization); /* XXX */
-extern ppd_file_t      *_ppdOpenFile(const char *filename,
+extern ppd_file_t      *ppdOpenWithLocalization(cups_file_t *fp,
+                                 _ppd_localization_t localization);
+extern ppd_file_t      *ppdOpenFileWithLocalization(const char *filename,
                                      _ppd_localization_t localization);
-                                      /* XXX */
-extern int             _ppdParseOptions(const char *s, int num_options,
+extern int             ppdParseOptions(const char *s, int num_options,
                                         cups_option_t **options,
                                         _ppd_parse_t which);
-extern const char      *_pwgInputSlotForSource(const char *media_source,
+extern const char      *ppdPwgInputSlotForSource(const char *media_source,
                                                char *name, size_t namesize);
-extern const char      *_pwgMediaTypeForType(const char *media_type,
+extern const char      *ppdPwgMediaTypeForType(const char *media_type,
                                              char *name, size_t namesize);
-extern const char      *_pwgPageSizeForMedia(pwg_media_t *media,
+extern const char      *ppdPwgPageSizeForMedia(pwg_media_t *media,
                                              char *name, size_t namesize);
 
 
index 90674cb130a214153569394da299f76266573e51..fca3802523bc10396174d0478999104db86cf0d8 100644 (file)
@@ -92,7 +92,7 @@ static void           ppd_DEBUG_stack(const char *prefix, _ppd_ps_stack_t *st);
 
 
 /*
- * '_ppdRasterInterpretPPD()' - Interpret PPD commands to create a page header.
+ * 'ppdRasterInterpretPPD()' - Interpret PPD commands to create a page header.
  *
  * This function is used by raster image processing (RIP) filters like
  * cgpdftoraster and imagetoraster when writing CUPS raster data for a page.
@@ -122,7 +122,7 @@ static void         ppd_DEBUG_stack(const char *prefix, _ppd_ps_stack_t *st);
  */
 
 int                                    /* O - 0 on success, -1 on failure */
-_ppdRasterInterpretPPD(
+ppdRasterInterpretPPD(
     cups_page_header2_t *h,            /* O - Page header to create */
     ppd_file_t          *ppd,          /* I - PPD file */
     int                 num_options,   /* I - Number of options */
@@ -200,7 +200,7 @@ _ppdRasterInterpretPPD(
     */
 
     if (ppd->patches)
-      status |= _ppdRasterExecPS(h, &preferred_bits, ppd->patches);
+      status |= ppdRasterExecPS(h, &preferred_bits, ppd->patches);
 
    /*
     * Then apply printer options in the proper order...
@@ -208,25 +208,25 @@ _ppdRasterInterpretPPD(
 
     if ((code = ppdEmitString(ppd, PPD_ORDER_DOCUMENT, 0.0)) != NULL)
     {
-      status |= _ppdRasterExecPS(h, &preferred_bits, code);
+      status |= ppdRasterExecPS(h, &preferred_bits, code);
       free(code);
     }
 
     if ((code = ppdEmitString(ppd, PPD_ORDER_ANY, 0.0)) != NULL)
     {
-      status |= _ppdRasterExecPS(h, &preferred_bits, code);
+      status |= ppdRasterExecPS(h, &preferred_bits, code);
       free(code);
     }
 
     if ((code = ppdEmitString(ppd, PPD_ORDER_PROLOG, 0.0)) != NULL)
     {
-      status |= _ppdRasterExecPS(h, &preferred_bits, code);
+      status |= ppdRasterExecPS(h, &preferred_bits, code);
       free(code);
     }
 
     if ((code = ppdEmitString(ppd, PPD_ORDER_PAGE, 0.0)) != NULL)
     {
-      status |= _ppdRasterExecPS(h, &preferred_bits, code);
+      status |= ppdRasterExecPS(h, &preferred_bits, code);
       free(code);
     }
   }
@@ -497,11 +497,11 @@ _ppdRasterInterpretPPD(
 
 
 /*
- * '_ppdRasterExecPS()' - Execute PostScript code to initialize a page header.
+ * 'ppdRasterExecPS()' - Execute PostScript code to initialize a page header.
  */
 
 int                                    /* O - 0 on success, -1 on error */
-_ppdRasterExecPS(
+ppdRasterExecPS(
     cups_page_header2_t *h,            /* O - Page header */
     int                 *preferred_bits,/* O - Preferred bits per color */
     const char          *code)         /* I - PS code to execute */
@@ -513,7 +513,7 @@ _ppdRasterExecPS(
                        *codeptr;       /* Pointer into copy of code */
 
 
-  DEBUG_printf(("_ppdRasterExecPS(h=%p, preferred_bits=%p, code=\"%s\")\n",
+  DEBUG_printf(("ppdRasterExecPS(h=%p, preferred_bits=%p, code=\"%s\")\n",
                 h, preferred_bits, code));
 
  /*
@@ -542,8 +542,8 @@ _ppdRasterExecPS(
   while ((obj = ppd_scan_ps(st, &codeptr)) != NULL)
   {
 #ifdef DEBUG
-    DEBUG_printf(("_ppdRasterExecPS: Stack (%d objects)", st->num_objs));
-    ppd_DEBUG_object("_ppdRasterExecPS", obj);
+    DEBUG_printf(("ppdRasterExecPS: Stack (%d objects)", st->num_objs));
+    ppd_DEBUG_object("ppdRasterExecPS", obj);
 #endif /* DEBUG */
 
     switch (obj->type)
@@ -560,7 +560,7 @@ _ppdRasterExecPS(
 
 #ifdef DEBUG
           DEBUG_puts("1_cupsRasterExecPS:    dup");
-         ppd_DEBUG_stack("_ppdRasterExecPS", st);
+         ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           break;
 
@@ -571,8 +571,8 @@ _ppdRasterExecPS(
            ppd_copy_stack(st, (int)obj->value.number);
 
 #ifdef DEBUG
-            DEBUG_puts("_ppdRasterExecPS: copy");
-           ppd_DEBUG_stack("_ppdRasterExecPS", st);
+            DEBUG_puts("ppdRasterExecPS: copy");
+           ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           }
           break;
@@ -582,8 +582,8 @@ _ppdRasterExecPS(
          ppd_copy_stack(st, 1);
 
 #ifdef DEBUG
-          DEBUG_puts("_ppdRasterExecPS: dup");
-         ppd_DEBUG_stack("_ppdRasterExecPS", st);
+          DEBUG_puts("ppdRasterExecPS: dup");
+         ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           break;
 
@@ -594,8 +594,8 @@ _ppdRasterExecPS(
            ppd_index_stack(st, (int)obj->value.number);
 
 #ifdef DEBUG
-            DEBUG_puts("_ppdRasterExecPS: index");
-           ppd_DEBUG_stack("_ppdRasterExecPS", st);
+            DEBUG_puts("ppdRasterExecPS: index");
+           ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           }
           break;
@@ -605,8 +605,8 @@ _ppdRasterExecPS(
           ppd_pop_stack(st);
 
 #ifdef DEBUG
-          DEBUG_puts("_ppdRasterExecPS: pop");
-         ppd_DEBUG_stack("_ppdRasterExecPS", st);
+          DEBUG_puts("ppdRasterExecPS: pop");
+         ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           break;
 
@@ -624,8 +624,8 @@ _ppdRasterExecPS(
              ppd_roll_stack(st, (int)obj->value.number, c);
 
 #ifdef DEBUG
-              DEBUG_puts("_ppdRasterExecPS: roll");
-             ppd_DEBUG_stack("_ppdRasterExecPS", st);
+              DEBUG_puts("ppdRasterExecPS: roll");
+             ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
             }
          }
@@ -636,8 +636,8 @@ _ppdRasterExecPS(
          ppd_setpagedevice(st, h, preferred_bits);
 
 #ifdef DEBUG
-          DEBUG_puts("_ppdRasterExecPS: setpagedevice");
-         ppd_DEBUG_stack("_ppdRasterExecPS", st);
+          DEBUG_puts("ppdRasterExecPS: setpagedevice");
+         ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
           break;
 
@@ -650,7 +650,7 @@ _ppdRasterExecPS(
       case PPD_PS_OTHER :
           _ppdRasterAddError("Unknown operator \"%s\".\n", obj->value.other);
          error = 1;
-          DEBUG_printf(("_ppdRasterExecPS: Unknown operator \"%s\".", obj->value.other));
+          DEBUG_printf(("ppdRasterExecPS: Unknown operator \"%s\".", obj->value.other));
           break;
     }
 
@@ -669,8 +669,8 @@ _ppdRasterExecPS(
     ppd_error_stack(st, "Stack not empty:");
 
 #ifdef DEBUG
-    DEBUG_puts("_ppdRasterExecPS: Stack not empty");
-    ppd_DEBUG_stack("_ppdRasterExecPS", st);
+    DEBUG_puts("ppdRasterExecPS: Stack not empty");
+    ppd_DEBUG_stack("ppdRasterExecPS", st);
 #endif /* DEBUG */
 
     ppd_delete_stack(st);
index 2c05f97c9f10386c70abfb17057f66c92fe1314e..804411df54eac43e31d366791df27c74e1ed9897 100644 (file)
@@ -15,7 +15,7 @@
 
 
 /*
- * This stub wraps the _ppdRasterInterpretPPD function in libcups - this allows
+ * This stub wraps the ppdRasterInterpretPPD function in libcups - this allows
  * one library to provide all of the CUPS API functions while still supporting
  * the old split library organization...
  */
@@ -59,5 +59,5 @@ cupsRasterInterpretPPD(
     cups_option_t       *options,      /* I - Options */
     cups_interpret_cb_t func)          /* I - Optional page header callback (@code NULL@ for none) */
 {
-  return (_ppdRasterInterpretPPD(h, ppd, num_options, options, func));
+  return (ppdRasterInterpretPPD(h, ppd, num_options, options, func));
 }
index 78738376780849fc679be49c6a350f48f8d21583..e78ccc49641ab19ea0a9d683c8607acc39530c6b 100644 (file)
@@ -422,7 +422,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
     fputs("ppdOpenFile(test.ppd): ", stdout);
 
-    if ((ppd = _ppdOpenFile("test.ppd", _PPD_LOCALIZATION_ALL)) != NULL)
+    if ((ppd = ppdOpenFileWithLocalization("test.ppd", _PPD_LOCALIZATION_ALL)) != NULL)
       puts("PASS");
     else
     {
@@ -1172,7 +1172,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(pattrs) / sizeof(pattrs[0]), NULL, pattrs);
     response = cupsDoRequest(http, request, resource);
 
-    if (_ppdCreateFromIPP(buffer, sizeof(buffer), response))
+    if (ppdCreateFromIPPCUPS(buffer, sizeof(buffer), response))
       printf("Created PPD: %s\n", buffer);
     else
       puts("Unable to create PPD.");
@@ -1383,11 +1383,11 @@ main(int  argc,                         /* I - Number of command-line arguments */
               attr->text, attr->value ? attr->value : "");
 
       puts("\nPPD Cache:");
-      if ((pc = _ppdCacheCreateWithPPD(ppd)) == NULL)
+      if ((pc = ppdCacheCreateWithPPD(ppd)) == NULL)
         printf("    Unable to create: %s\n", cupsLastErrorString());
       else
       {
-        _ppdCacheWriteFile(pc, "t.cache", NULL);
+        ppdCacheWriteFile(pc, "t.cache", NULL);
         puts("    Wrote t.cache.");
       }
     }
@@ -1479,14 +1479,14 @@ do_ps_tests(void)
   * Test PS exec code...
   */
 
-  fputs("_ppdRasterExecPS(\"setpagedevice\"): ", stdout);
+  fputs("ppdRasterExecPS(\"setpagedevice\"): ", stdout);
   fflush(stdout);
 
   memset(&header, 0, sizeof(header));
   header.Collate = CUPS_TRUE;
   preferred_bits = 0;
 
-  if (_ppdRasterExecPS(&header, &preferred_bits, setpagedevice_code))
+  if (ppdRasterExecPS(&header, &preferred_bits, setpagedevice_code))
   {
     puts("FAIL (error from function)");
     puts(_ppdRasterErrorString());
@@ -1507,10 +1507,10 @@ do_ps_tests(void)
   else
     puts("PASS");
 
-  fputs("_ppdRasterExecPS(\"roll\"): ", stdout);
+  fputs("ppdRasterExecPS(\"roll\"): ", stdout);
   fflush(stdout);
 
-  if (_ppdRasterExecPS(&header, &preferred_bits,
+  if (ppdRasterExecPS(&header, &preferred_bits,
                         "792 612 0 0 0\n"
                        "pop pop pop\n"
                        "<</PageSize[5 -2 roll]/ImagingBBox null>>"
@@ -1529,10 +1529,10 @@ do_ps_tests(void)
   else
     puts("PASS");
 
-  fputs("_ppdRasterExecPS(\"dup index\"): ", stdout);
+  fputs("ppdRasterExecPS(\"dup index\"): ", stdout);
   fflush(stdout);
 
-  if (_ppdRasterExecPS(&header, &preferred_bits,
+  if (ppdRasterExecPS(&header, &preferred_bits,
                         "true false dup\n"
                        "<</Collate 4 index"
                        "/Duplex 5 index"
@@ -1567,10 +1567,10 @@ do_ps_tests(void)
       puts("PASS");
   }
 
-  fputs("_ppdRasterExecPS(\"%%Begin/EndFeature code\"): ", stdout);
+  fputs("ppdRasterExecPS(\"%%Begin/EndFeature code\"): ", stdout);
   fflush(stdout);
 
-  if (_ppdRasterExecPS(&header, &preferred_bits, dsc_code))
+  if (ppdRasterExecPS(&header, &preferred_bits, dsc_code))
   {
     puts("FAIL (error from function)");
     puts(_ppdRasterErrorString());