]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Separate PPD depdendencies.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 1 Apr 2010 17:01:09 +0000 (17:01 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 1 Apr 2010 17:01:09 +0000 (17:01 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9063 7a7537e8-13f0-0310-91df-b6672ffda945

17 files changed:
cgi-bin/admin.c
cups/adminutil.h
cups/cups-private.h
cups/cups.h
cups/ppd-private.h
cups/ppd.h
cups/pwg-private.h
cups/raster.h
cups/testconflicts.c
cups/testcups.c
cups/testpwg.c
filter/commandtops.c
filter/common.h
filter/rastertohp.c
filter/rastertolabel.c
monitor/bcp.c
monitor/tbcp.c

index e3ba0badc675632bc1da6e24c58ca7fce10afca7..81679ff71231c04ba671e535dd8ad6d3fc8087e0 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "cgi-private.h"
 #include <cups/adminutil.h>
-#include <cups/file.h>
+#include <cups/ppd.h>
 #include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
index 7562fe596f3f4c4fbfac52538742e8f4d1b63910..89119a11ad97369fb949cb1cda0287707cb550e4 100644 (file)
@@ -22,6 +22,7 @@
  * Include necessary headers...
  */
 
+#  include <stdio.h>
 #  include "cups.h"
 
 
index 5fa1a242c0c1133cf3c076bf638d021722c67ea7..0a0e9e2bc91155e12fc7d059fad163cccd947327 100644 (file)
@@ -25,6 +25,7 @@
 #  include <cups/cups.h>
 #  include "string-private.h"
 #  include "debug-private.h"
+#  include "ppd-private.h"
 #  include "http-private.h"
 #  include "ipp-private.h"
 #  include "language-private.h"
index d21eed6d616f155d5bcb4164e4cc998b39625c95..b5171d7d7a479d14760c26c9584a4b44e5c0b791 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * "$Id$"
  *
- *   API definitions for the Common UNIX Printing System (CUPS).
+ *   API definitions for CUPS.
  *
- *   Copyright 2007-2009 by Apple Inc.
+ *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -29,8 +29,8 @@
 typedef off_t ssize_t;                 /* @private@ */
 #  endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
 
+#  include "file.h"
 #  include "ipp.h"
-#  include "ppd.h"
 #  include "language.h"
 
 
@@ -212,8 +212,6 @@ extern void         cupsEncodeOptions(ipp_t *ipp, int num_options,
 extern void            cupsFreeOptions(int num_options, cups_option_t *options);
 extern const char      *cupsGetOption(const char *name, int num_options,
                                       cups_option_t *options);
-extern int             cupsMarkOptions(ppd_file_t *ppd, int num_options,
-                                       cups_option_t *options);
 extern int             cupsParseOptions(const char *arg, int num_options,
                                         cups_option_t **options);
 
@@ -289,10 +287,6 @@ extern int         cupsCreateJob(http_t *http, const char *name,
                                      cups_option_t *options) _CUPS_API_1_4;
 extern ipp_status_t    cupsFinishDocument(http_t *http,
                                           const char *name) _CUPS_API_1_4;
-extern int             cupsGetConflicts(ppd_file_t *ppd, const char *option,
-                                        const char *choice,
-                                        cups_option_t **options)
-                                            _CUPS_API_1_4;
 extern ipp_status_t    cupsGetDevices(http_t *http, int timeout,
                                       const char *include_schemes,
                                       const char *exclude_schemes,
@@ -310,11 +304,6 @@ extern ipp_t               *cupsGetResponse(http_t *http,
                                         const char *resource) _CUPS_API_1_4;
 extern ssize_t         cupsReadResponseData(http_t *http, char *buffer,
                                             size_t length) _CUPS_API_1_4;
-extern int             cupsResolveConflicts(ppd_file_t *ppd, const char *option,
-                                            const char *choice,
-                                            int *num_options,
-                                            cups_option_t **options)
-                                            _CUPS_API_1_4;
 extern http_status_t   cupsSendRequest(http_t *http, ipp_t *request,
                                        const char *resource,
                                        size_t length) _CUPS_API_1_4;
index 9966931058845a3cb5938f6a06d969eeade10eda..f7ade94072df0e124a7f71c6be5871d2349c6f42 100644 (file)
@@ -31,7 +31,8 @@
  * Include necessary headers...
  */
 
-#  include <cups/cups.h>
+#  include <cups/ppd.h>
+#  include "pwg-private.h"
 
 
 /*
@@ -78,6 +79,23 @@ extern char          *_ppdNormalizeMakeAndModel(const char *make_and_model,
                                                   size_t bufsize);
 extern int             _ppdParseOptions(const char *s, int num_options,
                                         cups_option_t **options);
+extern _pwg_t          *_pwgCreateWithPPD(ppd_file_t *ppd);
+extern const char      *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job,
+                                         const char *keyword);
+extern const char      *_pwgGetMediaType(_pwg_t *pwg, ipp_t *job,
+                                         const char *keyword);
+extern const char      *_pwgGetPageSize(_pwg_t *pwg, ipp_t *job,
+                                        const char *keyword, int *exact);
+extern _pwg_size_t     *_pwgGetSize(_pwg_t *pwg, const char *page_size);
+extern const char      *_pwgGetSource(_pwg_t *pwg, const char *input_slot);
+extern const char      *_pwgGetType(_pwg_t *pwg, const char *media_type);
+extern const char      *_pwgInputSlotForSource(const char *media_source,
+                                               char *name, size_t namesize);
+extern _pwg_media_t    *_pwgMediaForPPD(const char *ppd);
+extern const char      *_pwgMediaTypeForType(const char *media_source,
+                                             char *name, size_t namesize);
+extern const char      *_pwgPageSizeForMedia(_pwg_media_t *media,
+                                             char *name, size_t namesize);
 
 
 /*
index e9e99b0a13d91c53ecc48ff001b8249791facf8d..793afdc163eadda671e1edcd4c2881f869dd454e 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #  include <stdio.h>
+#  include "cups.h"
 #  include "array.h"
 #  include "file.h"
 
@@ -343,6 +344,8 @@ typedef struct ppd_file_s           /**** PPD File ****/
  * Prototypes...
  */
 
+extern int             cupsMarkOptions(ppd_file_t *ppd, int num_options,
+                                       cups_option_t *options);
 extern void            ppdClose(ppd_file_t *ppd);
 extern int             ppdCollect(ppd_file_t *ppd, ppd_section_t section,
                                   ppd_choice_t  ***choices);
@@ -399,19 +402,29 @@ extern ppd_option_t       *ppdNextOption(ppd_file_t *ppd) _CUPS_API_1_2;
 extern int             ppdLocalize(ppd_file_t *ppd) _CUPS_API_1_2;
 extern ppd_file_t      *ppdOpen2(cups_file_t *fp) _CUPS_API_1_2;
 
-/**** New in CUPS 1.3 ****/
+/**** New in CUPS 1.3/Mac OS X 10.5 ****/
 extern const char      *ppdLocalizeIPPReason(ppd_file_t *ppd,
                                              const char *reason,
                                              const char *scheme,
                                              char *buffer,
                                              size_t bufsize) _CUPS_API_1_3;
 
-/**** New in CUPS 1.4 ****/
+/**** New in CUPS 1.4/Mac OS X 10.6 ****/
+extern int             cupsGetConflicts(ppd_file_t *ppd, const char *option,
+                                        const char *choice,
+                                        cups_option_t **options)
+                                            _CUPS_API_1_4;
+extern int             cupsResolveConflicts(ppd_file_t *ppd, const char *option,
+                                            const char *choice,
+                                            int *num_options,
+                                            cups_option_t **options)
+                                            _CUPS_API_1_4;
 extern int             ppdInstallableConflict(ppd_file_t *ppd,
                                               const char *option,
-                                              const char *choice);
+                                              const char *choice)
+                                                  _CUPS_API_1_4;
 extern ppd_attr_t      *ppdLocalizeAttr(ppd_file_t *ppd, const char *keyword,
-                                        const char *spec);
+                                        const char *spec) _CUPS_API_1_4;
 extern const char      *ppdLocalizeMarkerName(ppd_file_t *ppd,
                                               const char *name) _CUPS_API_1_4;
 extern int             ppdPageSizeLimits(ppd_file_t *ppd,
index 4bf074e848f5ba1698f57aa2cdf5f80b075c3028..fa266a2bf0923e01a53eb2e858d49fe19c607618 100644 (file)
@@ -48,6 +48,10 @@ extern "C" {
  * Types and structures...
  */
 
+#  ifndef _CUPS_PPD_H_
+typedef struct ppd_file_s ppd_file_t;
+#  endif /* _CUPS_PPD_H_ */
+
 typedef struct _pwg_media_s            /**** Common media size data ****/
 {
   const char   *pwg,                   /* PWG 5101.1 "self describing" name */
@@ -84,8 +88,7 @@ typedef struct _pwg_s                 /**** PWG-PPD conversion data ****/
                custom_min_length;      /* Minimum custom length in 2540ths */
   char         *custom_max_keyword,    /* Maximum custom size PWG keyword */
                *custom_min_keyword,    /* Minimum custom size PWG keyword */
-               custom_ppd_size[PPD_MAX_NAME];
-                                       /* Custom PPD size name */
+               custom_ppd_size[41];    /* Custom PPD size name */
   _pwg_size_t  custom_size;            /* Custom size record */
   int          num_sources;            /* Number of media sources */
   _pwg_map_t   *sources;               /* Media sources */
@@ -99,33 +102,16 @@ typedef struct _pwg_s                      /**** PWG-PPD conversion data ****/
  */
 
 extern _pwg_t          *_pwgCreateWithFile(const char *filename);
-extern _pwg_t          *_pwgCreateWithPPD(ppd_file_t *ppd);
 extern void            _pwgDestroy(_pwg_t *pwg);
 extern void            _pwgGenerateSize(char *keyword, size_t keysize,
                                         const char *prefix,
                                         const char *ppdname,
                                         int width, int length);
-extern const char      *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job,
-                                         const char *keyword);
-extern const char      *_pwgGetMediaType(_pwg_t *pwg, ipp_t *job,
-                                         const char *keyword);
-extern const char      *_pwgGetPageSize(_pwg_t *pwg, ipp_t *job,
-                                        const char *keyword, int *exact);
-extern _pwg_size_t     *_pwgGetSize(_pwg_t *pwg, const char *page_size);
-extern const char      *_pwgGetSource(_pwg_t *pwg, const char *input_slot);
-extern const char      *_pwgGetType(_pwg_t *pwg, const char *media_type);
 extern int             _pwgInitSize(_pwg_size_t *size, ipp_t *job,
                                     int *margins_set);
-extern const char      *_pwgInputSlotForSource(const char *media_source,
-                                               char *name, size_t namesize);
 extern _pwg_media_t    *_pwgMediaForLegacy(const char *legacy);
-extern _pwg_media_t    *_pwgMediaForPPD(const char *ppd);
 extern _pwg_media_t    *_pwgMediaForPWG(const char *pwg);
 extern _pwg_media_t    *_pwgMediaForSize(int width, int length);
-extern const char      *_pwgMediaTypeForType(const char *media_source,
-                                             char *name, size_t namesize);
-extern const char      *_pwgPageSizeForMedia(_pwg_media_t *media,
-                                             char *name, size_t namesize);
 extern int             _pwgWriteFile(_pwg_t *pwg, const char *filename);
 
 
index 86d4a255c11ead3937a287b0e42306db18a36cbe..4848dacc2946cbb79ae7a732c01d5bfdd9cf687e 100644 (file)
@@ -24,7 +24,9 @@
  * Include necessary headers...
  */
 
-#  include <cups/cups.h>
+#  include "cups.h"
+#  include "ppd.h"
+
 
 #  ifdef __cplusplus
 extern "C" {
index 831582128151f4589d7ee877230e60920599015f..7bfe420bf7aa351c9498b68800a3915fc55993ab 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "cups.h"
+#include "ppd.h"
 #include "string-private.h"
 
 
index 22ee86607bf05c27cc75ea24c7bd11826dd3e138..f595568f60bf89cf55de1c86c740b28252bde14f 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "string-private.h"
 #include "cups.h"
+#include "ppd.h"
 #include <stdlib.h>
 
 
@@ -90,7 +91,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
              cupsLastErrorString());
       return (1);
     }
-              
+
     interval = atoi(argv[3]);
 
     if (cupsStartDocument(CUPS_HTTP_DEFAULT, argv[1], job_id, argv[2],
index ef2b7426f531409334dd83f779a6cf40df3fff62..051d734cda0c565277572b190d033569cb1f6743 100644 (file)
@@ -23,7 +23,7 @@
  * Include necessary headers...
  */
 
-#include "pwg-private.h"
+#include "ppd-private.h"
 
 
 /*
index ebbf13732afcbf7f04b86feecfd672605d855c2c..deab27e2b510de463bec9630bcfaff93f1c7f47f 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <cups/cups.h>
+#include <cups/ppd.h>
 #include <cups/string-private.h>
 #include <cups/sidechannel.h>
 
index 0463ce10c894b73cfe19f9ff6cb69af79ec81953..bbaf99eed0ef55e13191b0ab0505adb7497b0cc7 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <cups/string-private.h>
 #include <cups/cups.h>
-#include <cups/language.h>
+#include <cups/ppd.h>
 #include <time.h>
 
 
index 53000c9e383030a0a17bf47b3e47762ff033faa9..613749724c76aad1e2ca1374854cdca3ea53e888 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include <cups/cups.h>
+#include <cups/ppd.h>
 #include <cups/string-private.h>
 #include <cups/language-private.h>
 #include <cups/raster.h>
index 2af27dabdba1b1efb2b1cc2cfaec244a058f8429..0decc39067ef17486970d41ddbf7063a799f4744 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include <cups/cups.h>
+#include <cups/ppd.h>
 #include <cups/string-private.h>
 #include <cups/language-private.h>
 #include <cups/raster.h>
@@ -1057,8 +1058,8 @@ ZPLCompress(char repeat_char,             /* I - Character to repeat */
   {
    /*
     * Print as many z's as possible - they are the largest denomination
-    * representing 400 characters (zC stands for 400 adjacent C's)     
-    */ 
+    * representing 400 characters (zC stands for 400 adjacent C's)
+    */
 
     while (repeat_count >= 400)
     {
index 33ff1544142026cf3b787ee871460a18cd313d5e..ffe04bc40ce0ac8f7732cd6d7b50dfeec8a7b124 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <cups/string-private.h>
 #include <cups/cups.h>
+#include <cups/ppd.h>
 
 
 /*
index 4bc175cdc35274bcbab69e52483e658273096b45..b24b36a761c4fbf0c3245b98079a5aa06297e751 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <cups/string-private.h>
 #include <cups/cups.h>
+#include <cups/ppd.h>
 
 
 /*