Commit eb59f0d8 authored by Didier Raboud's avatar Didier Raboud

Merge tag 'upstream/2.1_rc1' into debian/experimental

Upstream version 2.1~rc1
parents 6d767845 072fb10d
CHANGES-2.0.txt
---------------
CHANGES IN CUPS V2.0.4
- Fixed a bug in cupsRasterWritePixels (STR #4650)
- Fixed redirection in the web interface (STR #4538)
- The IPP backend did not respond to side-channel requests (STR #4645)
- The scheduler did not start all pending jobs at once (STR #4646)
- The web search incorrectly searched time-at-xxx values (STR #4652)
- Fixed an RPM spec file issue (STR #4657)
- The scheduler incorrectly started jobs while canceling multiple jobs
(STR #4648)
- Fixed processing of server overrides without port numbers (STR #4675)
- Documentation changes (STR #4651, STR #4674)
CHANGES IN CUPS V2.0.3
- Security: Fixed CERT VU #810572 exploiting the dynamic linker
......
CHANGES.txt - 2.1b1 - 2015-06-03
--------------------------------
CHANGES.txt - 2.1rc1 - 2015-07-31
---------------------------------
CHANGES IN CUPS V2.1rc1
- Added support for 3D printers (basic types only, no built-in filters)
based on PWG white paper.
- Fixed bugs in the new journald support (STR #4655, STR #4658,
STR #4661)
- Fixed domain socket support on Linux (STR #4679)
- Fixed signal handlers in the dnssd and usb backends (STR #4671)
- <Limit All> in <Policy> sections now applies to all operations when
used by itself (STR #4659)
- Configure script changes for systemd support (STR #4669)
- Updated autoconf sources to use newer form of AC_INIT (STR #4664)
CHANGES IN CUPS V2.1b1
......
INSTALL - CUPS v2.1b1 - 2015-06-08
----------------------------------
INSTALL - CUPS v2.1rc1 - 2015-07-31
-----------------------------------
This file describes how to compile and install CUPS from source code. For more
information on CUPS see the file called "README.txt". A complete change log can
......
README - CUPS v2.1b1 - 2015-06-08
---------------------------------
README - CUPS v2.1rc1 - 2015-07-31
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt" instead...
......
/*
* "$Id: dnssd.c 12659 2015-05-22 19:06:41Z msweet $"
* "$Id: dnssd.c 12818 2015-07-31 13:29:25Z msweet $"
*
* DNS-SD discovery backend for CUPS.
*
......@@ -1289,7 +1289,7 @@ sigterm_handler(int sig) /* I - Signal number (unused) */
(void)sig;
if (job_canceled)
exit(CUPS_BACKEND_OK);
_exit(CUPS_BACKEND_OK);
else
job_canceled = 1;
}
......@@ -1330,5 +1330,5 @@ unquote(char *dst, /* I - Destination buffer */
/*
* End of "$Id: dnssd.c 12659 2015-05-22 19:06:41Z msweet $".
* End of "$Id: dnssd.c 12818 2015-07-31 13:29:25Z msweet $".
*/
/*
* "$Id: ipp.c 12676 2015-05-28 01:19:14Z msweet $"
* "$Id: ipp.c 12757 2015-06-24 19:55:31Z msweet $"
*
* IPP backend for CUPS.
*
......@@ -1571,6 +1571,7 @@ main(int argc, /* I - Number of command-line args */
FD_ZERO(&input);
FD_SET(fd, &input);
FD_SET(snmp_fd, &input);
FD_SET(CUPS_SC_FD, &input);
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
NULL) <= 0 && !job_canceled);
......@@ -3483,5 +3484,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
}
/*
* End of "$Id: ipp.c 12676 2015-05-28 01:19:14Z msweet $".
* End of "$Id: ipp.c 12757 2015-06-24 19:55:31Z msweet $".
*/
This diff is collapsed.
/*
* "$Id: ipp-var.c 12700 2015-06-08 18:32:35Z msweet $"
* "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $"
*
* CGI <-> IPP variable routines for CUPS.
*
......@@ -222,6 +222,9 @@ cgiGetIPPObjects(ipp_t *response, /* I - IPP response */
break;
case IPP_TAG_INTEGER :
if (!strncmp(ippGetName(attr), "time-at-", 8))
break; /* Ignore time-at-xxx */
for (i = 0; !add && i < attr->num_values; i ++)
{
char buf[255]; /* Number buffer */
......@@ -1547,5 +1550,5 @@ cgiText(const char *message) /* I - Message */
/*
* End of "$Id: ipp-var.c 12700 2015-06-08 18:32:35Z msweet $".
* End of "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $".
*/
......@@ -7,7 +7,7 @@
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
#
# Copyright 2007-2014 by Apple Inc.
# Copyright 2007-2015 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
......@@ -81,6 +81,13 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
(contains(0,4096,<0a>%!) + \
!contains(0,4096,"ENTER LANGUAGE")))
application/g-code gcode
application/sla stl string(0,"solid ") + contains(0,4096,"facet") + contains(0,4096,"vertex")
application/vnd.makerbot-s3g x3g
model/amf amf
model/vnd.collada+xml dae
########################################################################
#
# Image files...
......
dnl
dnl "$Id: cups-common.m4 12697 2015-06-08 17:42:16Z msweet $"
dnl "$Id: cups-common.m4 12785 2015-07-14 18:07:49Z msweet $"
dnl
dnl Common configuration stuff for CUPS.
dnl
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
......@@ -13,18 +13,26 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION=2.1b1
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
#fi
CUPS_VERSION=2.1rc1
case "$CUPS_VERSION" in
*svn)
if test -z "$CUPS_REVISION" -a -d .svn; then
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
else
CUPS_REVISION=""
fi
;;
*)
CUPS_REVISION=""
;;
esac
CUPS_BUILD="cups-$CUPS_VERSION"
AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
......@@ -33,8 +41,8 @@ AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" str
AC_SUBST(CUPS_VERSION)
AC_SUBST(CUPS_REVISION)
AC_SUBST(CUPS_BUILD)
AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION$CUPS_REVISION")
AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "CUPS/$CUPS_VERSION$CUPS_REVISION")
AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION")
AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION")
dnl Default compiler flags...
CFLAGS="${CFLAGS:=}"
......@@ -466,5 +474,5 @@ esac
AC_SUBST(BUILDDIRS)
dnl
dnl End of "$Id: cups-common.m4 12697 2015-06-08 17:42:16Z msweet $".
dnl End of "$Id: cups-common.m4 12785 2015-07-14 18:07:49Z msweet $".
dnl
dnl
dnl "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $"
dnl "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $"
dnl
dnl Compiler stuff for CUPS.
dnl
......@@ -156,6 +156,15 @@ if test -n "$GCC"; then
# Add useful warning options for tracking down problems...
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
AC_MSG_CHECKING(whether compiler supports -Wno-unused-result)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wno-unused-result"
AC_TRY_COMPILE(,,
[OPTIM="$OPTIM -Wno-unused-result"
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
AC_MSG_CHECKING(whether compiler supports -Wsign-conversion)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wsign-conversion"
......@@ -237,5 +246,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $".
dnl End of "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $".
dnl
dnl
dnl "$Id: cups-startup.m4 12691 2015-06-04 18:00:31Z msweet $"
dnl "$Id: cups-startup.m4 12784 2015-07-14 17:39:26Z msweet $"
dnl
dnl Launch-on-demand/startup stuff for CUPS.
dnl
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
......@@ -56,27 +56,19 @@ if test x$enable_systemd != xno; then
AC_MSG_ERROR(Need pkg-config to enable systemd support.)
fi
else
AC_MSG_CHECKING(for libsystemd-daemon)
if $PKGCONFIG --exists libsystemd-daemon; then
AC_MSG_CHECKING(for libsystemd)
if $PKGCONFIG --exists libsystemd; then
AC_MSG_RESULT(yes)
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
AC_DEFINE(HAVE_SYSTEMD)
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
if test "x$SYSTEMD_DIR" = x; then
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
fi
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for libsystemd-journal)
if $PKGCONFIG --exists libsystemd-journal; then
AC_MSG_RESULT(yes)
ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
else
AC_MSG_RESULT(no)
fi
fi
fi
......@@ -181,5 +173,5 @@ fi
dnl
dnl End of "$Id: cups-startup.m4 12691 2015-06-04 18:00:31Z msweet $".
dnl End of "$Id: cups-startup.m4 12784 2015-07-14 17:39:26Z msweet $".
dnl
This diff is collapsed.
dnl
dnl "$Id: configure.ac 12278 2014-12-01 13:53:56Z msweet $"
dnl "$Id: configure.ac 12787 2015-07-14 21:19:57Z msweet $"
dnl
dnl Configuration script for CUPS.
dnl
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
......@@ -13,7 +13,11 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_INIT(cups/cups.h)
dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl Package name and version...
AC_INIT([CUPS], [2.1rc1], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
......@@ -91,5 +95,5 @@ AC_OUTPUT(Makedefs
chmod +x cups-config
dnl
dnl End of "$Id: configure.ac 12278 2014-12-01 13:53:56Z msweet $".
dnl End of "$Id: configure.ac 12787 2015-07-14 21:19:57Z msweet $".
dnl
/*
* "$Id: cups.h 12722 2015-06-08 22:00:19Z msweet $"
* "$Id: cups.h 12733 2015-06-12 01:21:05Z msweet $"
*
* API definitions for CUPS.
*
......@@ -250,6 +250,7 @@ enum cups_ptype_e /* Printer type/capability bit
* @since CUPS 1.4/OS X 10.6@ */
CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities
* @since CUPS 1.4/OS X 10.6@ */
CUPS_PRINTER_3D = 0x8000000, /* 3D Printing @since CUPS 2.1@ */
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT |
* DEFAULT | FAX | REJECTING | DELETE |
* NOT_SHARED | AUTHENTICATED |
......@@ -635,5 +636,5 @@ extern int cupsSetServerCredentials(const char *path, const char *common_name,
#endif /* !_CUPS_CUPS_H_ */
/*
* End of "$Id: cups.h 12722 2015-06-08 22:00:19Z msweet $".
* End of "$Id: cups.h 12733 2015-06-12 01:21:05Z msweet $".
*/
/*
* "$Id: dest.c 12722 2015-06-08 22:00:19Z msweet $"
* "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $"
*
* User-defined destination (and option) support for CUPS.
*
......@@ -871,7 +871,7 @@ cupsEnumDests(
*/
num_dests = _cupsGetDests(CUPS_HTTP_DEFAULT, IPP_OP_CUPS_GET_PRINTERS, NULL,
&dests, type, mask);
&dests, type, mask | CUPS_PRINTER_3D);
if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
defprinter = name;
......@@ -1743,7 +1743,7 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
*/
*dests = (cups_dest_t *)0;
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, dests, 0, 0);
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, dests, 0, CUPS_PRINTER_3D);
if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE)
{
......@@ -1960,7 +1960,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
* Get the printer's attributes...
*/
if (!_cupsGetDests(http, op, name, &dest, 0, 0))
if (!_cupsGetDests(http, op, name, &dest, 0, CUPS_PRINTER_3D))
return (NULL);
if (instance)
......@@ -2136,7 +2136,7 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
* Get the server destinations...
*/
num_temps = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &temps, 0, 0);
num_temps = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &temps, 0, CUPS_PRINTER_3D);
if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE)
{
......@@ -3943,5 +3943,5 @@ cups_make_string(
/*
* End of "$Id: dest.c 12722 2015-06-08 22:00:19Z msweet $".
* End of "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $".
*/
/*
* "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $"
* "$Id: http-support.c 12752 2015-06-24 19:30:47Z msweet $"
*
* HTTP support routines for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
* Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
......@@ -1722,7 +1722,7 @@ _httpResolveURI(
while (time(NULL) < end_time)
{
if (options & _HTTP_RESOLVE_STDERR)
_cupsLangPrintFilter(stderr, "INFO", _("Looking for printer."));
_cupsLangPrintFilter(stderr, "INFO", _("Looking for printer..."));
if (cb && !(*cb)(context))
{
......@@ -2544,5 +2544,5 @@ http_resolve_cb(
/*
* End of "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $".
* End of "$Id: http-support.c 12752 2015-06-24 19:30:47Z msweet $".
*/
/*
* "$Id: language.c 12262 2014-11-19 15:18:33Z msweet $"
* "$Id: language.c 12790 2015-07-20 17:05:06Z msweet $"
*
* I18N/language support for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
* Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
......@@ -1305,7 +1305,8 @@ static cups_array_t * /* O - Message catalog */
appleMessageLoad(const char *locale) /* I - Locale ID */
{
char filename[1024], /* Path to cups.strings file */
applelang[256]; /* Apple language ID */
applelang[256], /* Apple language ID */
baselang[3]; /* Base language */
CFURLRef url; /* URL to cups.strings file */
CFReadStreamRef stream = NULL; /* File stream */
CFPropertyListRef plist = NULL; /* Localization file */
......@@ -1345,6 +1346,15 @@ appleMessageLoad(const char *locale) /* I - Locale ID */
locale = "Japanese";
else if (!strncmp(locale, "es", 2))
locale = "Spanish";
else if (strstr(locale, "_") != NULL || strstr(locale, "-") != NULL)
{
/*
* Drop country code, just try language...
*/
strlcpy(baselang, locale, sizeof(baselang));
locale = baselang;
}
snprintf(filename, sizeof(filename),
CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale);
......@@ -1588,5 +1598,5 @@ cups_unquote(char *d, /* O - Unquoted string */
/*
* End of "$Id: language.c 12262 2014-11-19 15:18:33Z msweet $".
* End of "$Id: language.c 12790 2015-07-20 17:05:06Z msweet $".
*/
/*
* "$Id: ppd-cache.c 12722 2015-06-08 22:00:19Z msweet $"
* "$Id: ppd-cache.c 12733 2015-06-12 01:21:05Z msweet $"
*
* PPD cache implementation for CUPS.
*
......@@ -36,6 +36,7 @@
static int pwg_compare_finishings(_pwg_finishings_t *a,
_pwg_finishings_t *b);
static void pwg_free_finishings(_pwg_finishings_t *f);
static void pwg_free_material(_pwg_material_t *m);
static void pwg_ppdize_name(const char *ipp, char *name, size_t namesize);
static void pwg_ppdize_resolution(ipp_attribute_t *attr, int element, int *xres, int *yres, char *name, size_t namesize);
static void pwg_unppdize_name(const char *ppd, char *name, size_t namesize,
......@@ -480,6 +481,53 @@ _ppdCacheCreateWithFile(
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad PPD cache file."), 1);
goto create_error;
}
else if (!_cups_strcasecmp(line, "3D"))
{
pc->cups_3d = _cupsStrAlloc(value);
}
else if (!_cups_strcasecmp(line, "LayerOrder"))
{
pc->cups_layer_order = _cupsStrAlloc(value);
}
else if (!_cups_strcasecmp(line, "Accuracy"))
{
sscanf(value, "%d%d%d", pc->cups_accuracy + 0, pc->cups_accuracy + 1, pc->cups_accuracy + 2);
}
else if (!_cups_strcasecmp(line, "Volume"))
{
sscanf(value, "%d%d%d", pc->cups_volume + 0, pc->cups_volume + 1, pc->cups_volume + 2);
}
else if (!_cups_strcasecmp(line, "Material"))
{
/*
* Material key "name" name=value ... name=value
*/
if ((valueptr = strchr(value, ' ')) != NULL)
{
_pwg_material_t *material = (_pwg_material_t *)calloc(1, sizeof(_pwg_material_t));
*valueptr++ = '\0';
material->key = _cupsStrAlloc(value);
if (*valueptr == '\"')
{
value = valueptr + 1;
if ((valueptr = strchr(value, '\"')) != NULL)
{
*valueptr++ = '\0';
material->name = _cupsStrAlloc(value);
material->num_props = cupsParseOptions(valueptr, 0, &material->props);
}
}
if (!pc->materials)
pc->materials = cupsArrayNew3(NULL, NULL, NULL, 0, NULL, (cups_afree_func_t)pwg_free_material);
cupsArrayAdd(pc->materials, material);
}
}
else if (!_cups_strcasecmp(line, "Filter"))
{
if (!pc->filters)
......@@ -1711,6 +1759,42 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
if ((ppd_attr = ppdFindAttr(ppd, "APPrinterIconPath", NULL)) != NULL)
cupsArrayAdd(pc->support_files, ppd_attr->value);
/*
* 3D stuff...
*/
if ((ppd_attr = ppdFindAttr(ppd, "cups3D", NULL)) != NULL)
pc->cups_3d = _cupsStrAlloc(ppd_attr->value);
if ((ppd_attr = ppdFindAttr(ppd, "cupsLayerOrder", NULL)) != NULL)
pc->cups_layer_order = _cupsStrAlloc(ppd_attr->value);
if ((ppd_attr = ppdFindAttr(ppd, "cupsAccuracy", NULL)) != NULL)
sscanf(ppd_attr->value, "%d%d%d", pc->cups_accuracy + 0, pc->cups_accuracy + 1, pc->cups_accuracy + 2);
if ((ppd_attr = ppdFindAttr(ppd, "cupsVolume", NULL)) != NULL)
sscanf(ppd_attr->value, "%d%d%d", pc->cups_volume + 0, pc->cups_volume + 1, pc->cups_volume + 2);
for (ppd_attr = ppdFindAttr(ppd, "cupsMaterial", NULL);
ppd_attr;
ppd_attr = ppdFindNextAttr(ppd, "cupsMaterial", NULL))
{
/*
* *cupsMaterial key/name: "name=value ... name=value"
*/
_pwg_material_t *material = (_pwg_material_t *)calloc(1, sizeof(_pwg_material_t));
material->key = _cupsStrAlloc(ppd_attr->name);
material->name = _cupsStrAlloc(ppd_attr->text);
material->num_props = cupsParseOptions(ppd_attr->value, 0, &material->props);
if (!pc->materials)
pc->materials = cupsArrayNew3(NULL, NULL, NULL, 0, NULL, (cups_afree_func_t)pwg_free_material);
cupsArrayAdd(pc->materials, material);
}
/*
* Return the cache data...
*/
......@@ -1818,6 +1902,11 @@ _ppdCacheDestroy(_ppd_cache_t *pc) /* I - PPD cache and mapping data */
cupsArrayDelete(pc->support_files);
_cupsStrFree(pc->cups_3d);
_cupsStrFree(pc->cups_layer_order);
cupsArrayDelete(pc->materials);
free(pc);
}
......@@ -2575,6 +2664,7 @@ _ppdCacheWriteFile(
cups_option_t *option; /* Current option */
const char *value; /* Filter/pre-filter value */
char newfile[1024]; /* New filename */
_pwg_material_t *m; /* Material */
/*
......@@ -2755,6 +2845,32 @@ _ppdCacheWriteFile(
value = (char *)cupsArrayNext(pc->support_files))
cupsFilePutConf(fp, "SupportFile", value);
/*
* 3D stuff...
*/
if (pc->cups_3d)
cupsFilePutConf(fp, "3D", pc->cups_3d);
if (pc->cups_layer_order)
cupsFilePutConf(fp, "LayerOrder", pc->cups_layer_order);
if (pc->cups_accuracy[0] || pc->cups_accuracy[0] || pc->cups_accuracy[2])
cupsFilePrintf(fp, "Accuracy %d %d %d\n", pc->cups_accuracy[0], pc->cups_accuracy[1], pc->cups_accuracy[2]);
if (pc->cups_volume[0] || pc->cups_volume[0] || pc->cups_volume[2])
cupsFilePrintf(fp, "Volume %d %d %d\n", pc->cups_volume[0], pc->cups_volume[1], pc->cups_volume[2]);
for (m = (_pwg_material_t *)cupsArrayFirst(pc->materials);
m;
m = (_pwg_material_t *)cupsArrayNext(pc->materials))
{
cupsFilePrintf(fp, "Material %s \"%s\"", m->key, m->name);
for (i = 0; i < m->num_props; i ++)
cupsFilePrintf(fp, " %s=%s", m->props[i].name, m->props[i].value);
cupsFilePuts(fp, "\n");
}
/*
* IPP attributes, if any...
*/
......@@ -3561,6 +3677,22 @@ pwg_free_finishings(
}
/*
* 'pwg_free_material()' - Free a material value.
*/
static void
pwg_free_material(_pwg_material_t *m) /* I - Material value */
{
_cupsStrFree(m->key);
_cupsStrFree(m->name);
cupsFreeOptions(m->num_props, m->props);
free(m);
}
/*
* 'pwg_ppdize_name()' - Convert an IPP keyword to a PPD keyword.
*/
......@@ -3591,7 +3723,6 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
}
/*
* 'pwg_ppdize_resolution()' - Convert PWG resolution values to PPD values.
*/
......@@ -3680,5 +3811,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
/*
* End of "$Id: ppd-cache.c 12722 2015-06-08 22:00:19Z msweet $".
* End of "$Id: ppd-cache.c 12733 2015-06-12 01:21:05Z msweet $".
*/
/*
* "$Id: ppd-private.h 12722 2015-06-08 22:00:19Z msweet $"
* "$Id: ppd-private.h 12733 2015-06-12 01:21:05Z msweet $"
*
* Private PPD definitions for CUPS.
*
......@@ -109,6 +109,14 @@ typedef struct _pwg_finishings_s /**** PWG finishings mapping data ****/
cups_option_t *options; /* Options to apply */
} _pwg_finishings_t;
typedef struct _pwg_material_s /**** PWG material mapping data ****/
{
char *key, /* material-key value */
*name; /* material-name value */
int num_props; /* Number of properties */
cups_option_t *props; /* Material properties */
} _pwg_material_t;
struct _ppd_cache_s /**** PPD cache and PWG conversion data ****/
{
int num_bins; /* Number of output bins */
......@@ -148,6 +156,11 @@ struct _ppd_cache_s /**** PPD cache and PWG conversion data ****/
cups_array_t *mandatory; /* cupsMandatory value */
char *charge_info_uri; /* cupsChargeInfoURI value */
cups_array_t *support_files; /* Support files - ICC profiles, etc. */
char *cups_3d, /* cups3D value */
*cups_layer_order; /* cupsLayerOrder value */
int cups_accuracy[3]; /* cupsAccuracy value - x, y, and z in nanometers */
int cups_volume[3]; /* cupsVolume value - x, y, and z in millimeters */
cups_array_t *materials; /* cupsMaterial values */
};
......@@ -223,5 +236,5 @@ extern const char *_pwgPageSizeForMedia(pwg_media_t *media,
#endif /* !_CUPS_PPD_PRIVATE_H_ */
/*
* End of "$Id: ppd-private.h 12722 2015-06-08 22:00:19Z msweet $".
* End of "$Id: ppd-private.h 12733 2015-06-12 01:21:05Z msweet $".
*/
/*
* "$Id: usersys.c 12647 2015-05-20 18:37:52Z msweet $"
* "$Id: usersys.c 12817 2015-07-30 15:45:46Z msweet $"
*
* User, system, and password routines for CUPS.
*
......@@ -68,6 +68,7 @@ typedef struct _cups_client_conf_s /**** client.conf config data ****/
static void cups_finalize_client_conf(_cups_client_conf_t *cc);
static void cups_init_client_conf(_cups_client_conf_t *cc);
static void cups_read_client_conf(cups_file_t *fp, _cups_client_conf_t *cc);
static void cups_set_default_ipp_port(_cups_globals_t *cg);
static void cups_set_encryption(_cups_client_conf_t *cc, const char *value);
#ifdef HAVE_GSSAPI
static void cups_set_gss_service_name(_cups_client_conf_t *cc, const char *value);
......@@ -382,6 +383,9 @@ cupsSetServer(const char *server) /* I - Server name */
cg->ipp_port = atoi(port);
}
if (!cg->ipp_port)
cups_set_default_ipp_port(cg);
if (cg->server[0] == '/')
strlcpy(cg->servername, "localhost", sizeof(cg->servername));
else
......@@ -392,6 +396,7 @@ cupsSetServer(const char *server) /* I - Server name */
cg->server[0] = '\0';
cg->servername[0] = '\0';
cg->server_version = 20;
cg->ipp_port = 0;
}
if (cg->http)
......@@ -908,17 +913,7 @@ _cupsSetDefaults(void)
cupsSetServer(cc.server_name);
if (!cg->ipp_port)