#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>
* Include necessary headers...
*/
+# include <stdio.h>
# include "cups.h"
# 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"
/*
* "$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
typedef off_t ssize_t; /* @private@ */
# endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
+# include "file.h"
# include "ipp.h"
-# include "ppd.h"
# include "language.h"
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);
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,
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;
* Include necessary headers...
*/
-# include <cups/cups.h>
+# include <cups/ppd.h>
+# include "pwg-private.h"
/*
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);
/*
*/
# include <stdio.h>
+# include "cups.h"
# include "array.h"
# include "file.h"
* 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);
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,
* 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 */
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 */
*/
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);
* Include necessary headers...
*/
-# include <cups/cups.h>
+# include "cups.h"
+# include "ppd.h"
+
# ifdef __cplusplus
extern "C" {
*/
#include "cups.h"
+#include "ppd.h"
#include "string-private.h"
#include "string-private.h"
#include "cups.h"
+#include "ppd.h"
#include <stdlib.h>
cupsLastErrorString());
return (1);
}
-
+
interval = atoi(argv[3]);
if (cupsStartDocument(CUPS_HTTP_DEFAULT, argv[1], job_id, argv[2],
* Include necessary headers...
*/
-#include "pwg-private.h"
+#include "ppd-private.h"
/*
*/
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <cups/string-private.h>
#include <cups/sidechannel.h>
#include <cups/string-private.h>
#include <cups/cups.h>
-#include <cups/language.h>
+#include <cups/ppd.h>
#include <time.h>
*/
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <cups/string-private.h>
#include <cups/language-private.h>
#include <cups/raster.h>
*/
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <cups/string-private.h>
#include <cups/language-private.h>
#include <cups/raster.h>
{
/*
* 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)
{
#include <cups/string-private.h>
#include <cups/cups.h>
+#include <cups/ppd.h>
/*
#include <cups/string-private.h>
#include <cups/cups.h>
+#include <cups/ppd.h>
/*