-CHANGES.txt - 2.1rc1 - 2015-07-31
----------------------------------
+CHANGES.txt - 2.1.0 - 2015-08-31
+--------------------------------
+
+CHANGES IN CUPS V2.1.0
+
+ - Fixed more scheduler crash bugs in the new logging code (STR #4687,
+ STR #4690)
+ - The scheduler did not use the ConfigFilePerm setting when copying PPD
+ files or interface scripts attached to a request (STR #4703)
+ - Now support new Chinese locale IDs and their correct fallback locales
+ (<rdar://problem/22086642>, <rdar://problem/22130168>)
+ - "make check" incorrectly reported an expectation of 18 warning
+ messages when 8 were expected (STR #4684)
+ - The new PDF file type rule did not work (STR #4692)
+ - The scheduler did not update the jobs.cache file when job files were
+ expired (STR #4706)
+ - Fixed some configure script issues (STR #4694, STR #4695, STR #4698)
+ - Documentation updates (STR #4691, STR #4693)
+
CHANGES IN CUPS V2.1rc1
-INSTALL - CUPS v2.1rc1 - 2015-07-31
------------------------------------
+INSTALL - CUPS v2.1.0 - 2015-08-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.1rc1 - 2015-07-31
-----------------------------------
+README - CUPS v2.1.0 - 2015-08-31
+---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt" instead...
#
#application/msword doc string(0,<D0CF11E0A1B11AE1>)
-application/pdf pdf regex(0,^[\\n\\r]*%PDF)
+application/pdf pdf regex(0,^[\n\r]*%PDF)
application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=POSTSCRIPT") \
dnl
-dnl "$Id: cups-common.m4 12785 2015-07-14 18:07:49Z msweet $"
+dnl "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $"
dnl
dnl Common configuration stuff for CUPS.
dnl
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION=2.1rc1
+CUPS_VERSION=2.1.0
case "$CUPS_VERSION" in
*svn)
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
-if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
AC_MSG_CHECKING(for DBUS)
if $PKGCONFIG --exists dbus-1; then
AC_MSG_RESULT(yes)
AC_SUBST(BUILDDIRS)
dnl
-dnl End of "$Id: cups-common.m4 12785 2015-07-14 18:07:49Z msweet $".
+dnl End of "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $".
dnl
dnl
-dnl "$Id: cups-defaults.m4 12350 2014-12-09 22:18:21Z msweet $"
+dnl "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $"
dnl
dnl Default cupsd configuration settings for CUPS.
dnl
-dnl Copyright 2007-2014 by Apple Inc.
+dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ACCESS_LOG_LEVEL, "$CUPS_ACCESS_LOG_LEVEL")
dnl Default PageLogFormat
-AC_ARG_WITH(page_logging, [ --enable-page-logging enable page_log by default])
+AC_ARG_ENABLE(page_logging, [ --enable-page-logging enable page_log by default])
if test "x$enable_page_logging" = xyes; then
CUPS_PAGE_LOG_FORMAT=""
else
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
dnl
-dnl End of "$Id: cups-defaults.m4 12350 2014-12-09 22:18:21Z msweet $".
+dnl End of "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $".
dnl
dnl
-dnl "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $"
+dnl "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $"
dnl
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
dnl
-dnl Copyright 2007-2012 by Apple Inc.
+dnl Copyright 2007-2015 by Apple Inc.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
IPPFIND_BIN=""
IPPFIND_MAN=""
-if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
+if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then
AC_MSG_CHECKING(for Avahi)
if $PKGCONFIG --exists avahi-client; then
AC_MSG_RESULT(yes)
AC_SUBST(IPPFIND_MAN)
dnl
-dnl End of "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $".
+dnl End of "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $".
dnl
dnl
-dnl "$Id: cups-startup.m4 12784 2015-07-14 17:39:26Z msweet $"
+dnl "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $"
dnl
dnl Launch-on-demand/startup stuff for CUPS.
dnl
AC_MSG_ERROR(Need pkg-config to enable systemd support.)
fi
else
+ have_systemd=no
AC_MSG_CHECKING(for libsystemd)
if $PKGCONFIG --exists libsystemd; then
AC_MSG_RESULT(yes)
+ have_systemd=yes
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
+ elif $PKGCONFIG --exists libsystemd-daemon; then
+ AC_MSG_RESULT(yes - legacy)
+ have_systemd=yes
+ ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
+ ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
+
+ if $PKGCONFIG --exists libsystemd-journal; then
+ ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
+ ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ if test $have_systemd = yes; then
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
fi
fi
dnl
-dnl End of "$Id: cups-startup.m4 12784 2015-07-14 17:39:26Z msweet $".
+dnl End of "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $".
dnl
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for CUPS 2.1rc1.
+# Generated by GNU Autoconf 2.68 for CUPS 2.1.0.
#
# Report bugs to <https://www.cups.org/str.php>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# Use a proper internal environment variable to ensure we don't fall
- # into an infinite loop, continuously re-executing ourselves.
- if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
- _as_can_reexec=no; export _as_can_reexec;
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
- fi
- # We don't want this to propagate to other subprocesses.
- { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
+test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
if test "x$CONFIG_SHELL" != x; then :
- export CONFIG_SHELL
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
- # already done that, so ensure we don't try to do so again and fall
- # in an infinite loop. This has already happened in practice.
- _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
as_mkdir_p=false
fi
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Identity of this package.
PACKAGE_NAME='CUPS'
PACKAGE_TARNAME='cups'
-PACKAGE_VERSION='2.1rc1'
-PACKAGE_STRING='CUPS 2.1rc1'
+PACKAGE_VERSION='2.1.0'
+PACKAGE_STRING='CUPS 2.1.0'
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
PACKAGE_URL='https://www.cups.org/'
with_fatal_errors
with_log_level
with_access_log_level
-with_page_logging
+enable_page_logging
enable_browsing
with_local_protocols
enable_default_shared
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures CUPS 2.1rc1 to adapt to many kinds of systems.
+\`configure' configures CUPS 2.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of CUPS 2.1rc1:";;
+ short | recursive ) echo "Configuration of CUPS 2.1.0:";;
esac
cat <<\_ACEOF
--disable-dnssd disable DNS Service Discovery support using mDNSResponder
--disable-launchd disable launchd support
--disable-systemd disable systemd support
+ --enable-page-logging enable page_log by default
--disable-browsing disable Browsing by default
--disable-default-shared
disable DefaultShared by default
--with-fatal-errors set default FatalErrors value, default=config
--with-log-level set default LogLevel value, default=warn
--with-access-log-level set default AccessLogLevel value, default=none
- --enable-page-logging enable page_log by default
--with-local-protocols set default BrowseLocalProtocols, default=""
--with-cups-user set default user for CUPS
--with-cups-group set default group for CUPS
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-CUPS configure 2.1rc1
-generated by GNU Autoconf 2.69
+CUPS configure 2.1.0
+generated by GNU Autoconf 2.68
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
+ $as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by CUPS $as_me 2.1rc1, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by CUPS $as_me 2.1.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION=2.1rc1
+CUPS_VERSION=2.1.0
case "$CUPS_VERSION" in
*svn)
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-struct stat;
+#include <sys/types.h>
+#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_XDGOPEN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
-if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
$as_echo_n "checking for DBUS... " >&6; }
if $PKGCONFIG --exists dbus-1; then
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LIBGCRYPTCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_LIBGCRYPTCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
esac
rm -rf conftest*
fi
-
-
fi
IPPFIND_BIN=""
IPPFIND_MAN=""
-if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
+if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Avahi" >&5
$as_echo_n "checking for Avahi... " >&6; }
if $PKGCONFIG --exists avahi-client; then
as_fn_error $? "Need pkg-config to enable systemd support." "$LINENO" 5
fi
else
+ have_systemd=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
$as_echo_n "checking for libsystemd... " >&6; }
if $PKGCONFIG --exists libsystemd; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ have_systemd=yes
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
+ elif $PKGCONFIG --exists libsystemd-daemon; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - legacy" >&5
+$as_echo "yes - legacy" >&6; }
+ have_systemd=yes
+ ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
+ ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
+
+ if $PKGCONFIG --exists libsystemd-journal; then
+ ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
+ ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+
+ if test $have_systemd = yes; then
$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
if test "x$SYSTEMD_DIR" = x; then
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
fi
fi
fi
_ACEOF
-
-# Check whether --with-page_logging was given.
-if test "${with_page_logging+set}" = set; then :
- withval=$with_page_logging;
+# Check whether --enable-page_logging was given.
+if test "${enable_page_logging+set}" = set; then :
+ enableval=$enable_page_logging;
fi
if test "x$enable_page_logging" = xyes; then
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PHPCGI="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PHP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
as_mkdir_p=false
fi
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by CUPS $as_me 2.1rc1, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by CUPS $as_me 2.1.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-CUPS config.status 2.1rc1
-configured by $0, generated by GNU Autoconf 2.69,
+CUPS config.status 2.1.0
+configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
dnl
-dnl "$Id: configure.ac 12787 2015-07-14 21:19:57Z msweet $"
+dnl "$Id: configure.ac 12831 2015-08-05 14:24:32Z msweet $"
dnl
dnl Configuration script for CUPS.
dnl
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/])
+AC_INIT([CUPS], [2.1.0], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
chmod +x cups-config
dnl
-dnl End of "$Id: configure.ac 12787 2015-07-14 21:19:57Z msweet $".
+dnl End of "$Id: configure.ac 12831 2015-08-05 14:24:32Z msweet $".
dnl
#
-# "$Id: Makefile 12635 2015-05-19 02:12:22Z msweet $"
+# "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $"
#
# API library Makefile for CUPS.
#
TESTOBJS = \
testadmin.o \
testarray.o \
+ testcache.o \
testconflicts.o \
testcups.o \
testdest.o \
#
-# End of "$Id: Makefile 12635 2015-05-19 02:12:22Z msweet $".
+# End of "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $".
#
/*
- * "$Id: http.c 12333 2014-12-09 21:01:46Z msweet $"
+ * "$Id: http.c 12848 2015-08-26 18:51:57Z msweet $"
*
* HTTP routines for CUPS.
*
*/
const char * /* O - Cookie data or NULL */
-httpGetCookie(http_t *http) /* I - HTTP connecion */
+httpGetCookie(http_t *http) /* I - HTTP connection */
{
return (http ? http->cookie : NULL);
}
/*
- * End of "$Id: http.c 12333 2014-12-09 21:01:46Z msweet $".
+ * End of "$Id: http.c 12848 2015-08-26 18:51:57Z msweet $".
*/
/*
- * "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $"
+ * "$Id: http.h 12848 2015-08-26 18:51:57Z msweet $"
*
* Hyper-Text Transport Protocol definitions for CUPS.
*
HTTP_STATUS_NOT_AUTHORITATIVE, /* Information isn't authoritative */
HTTP_STATUS_NO_CONTENT, /* Successful command, no new data */
HTTP_STATUS_RESET_CONTENT, /* Content was reset/recreated */
- HTTP_STATUS_PARTIAL_CONTENT, /* Only a partial file was recieved/sent */
+ HTTP_STATUS_PARTIAL_CONTENT, /* Only a partial file was received/sent */
HTTP_STATUS_MULTIPLE_CHOICES = 300, /* Multiple files match request */
HTTP_STATUS_MOVED_PERMANENTLY, /* Document has moved permanently */
#endif /* !_CUPS_HTTP_H_ */
/*
- * End of "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $".
+ * End of "$Id: http.h 12848 2015-08-26 18:51:57Z msweet $".
*/
/*
- * "$Id: language.c 12790 2015-07-20 17:05:06Z msweet $"
+ * "$Id: language.c 12841 2015-08-10 17:07:30Z msweet $"
*
* I18N/language support for CUPS.
*
* See if we have an Info.plist file in the bundle...
*/
- CFStringGetCString(cfpath, path,sizeof(path), kCFStringEncodingUTF8);
+ CFStringGetCString(cfpath, path, sizeof(path), kCFStringEncodingUTF8);
DEBUG_printf(("3appleLangDefault: Got a resource URL (\"%s\")", path));
strlcat(path, "Contents/Info.plist", sizeof(path));
if (localizationList)
{
-
#ifdef DEBUG
if (CFGetTypeID(localizationList) == CFArrayGetTypeID())
DEBUG_printf(("3appleLangDefault: Got localizationList, %d entries.",
strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language));
}
}
+ else
+ DEBUG_printf(("3appleLangDefault: Using previous locale \"%s\".", cg->language));
/*
* Return the cached locale...
snprintf(filename, sizeof(filename),
CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings",
_cupsAppleLanguage(locale, applelang, sizeof(applelang)));
+
+ if (access(filename, 0))
+ {
+ /*
+ * <rdar://problem/22086642>
+ *
+ * Try with original locale string...
+ */
+
+ snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale);
+ }
+
DEBUG_printf(("1appleMessageLoad: filename=\"%s\"", filename));
if (access(filename, 0))
locale = "Japanese";
else if (!strncmp(locale, "es", 2))
locale = "Spanish";
+ else if (!strcmp(locale, "zh_HK"))
+ {
+ /*
+ * <rdar://problem/22130168>
+ *
+ * Try zh_TW first, then zh... Sigh...
+ */
+
+ if (!access(CUPS_BUNDLEDIR "/Resources/zh_TW.lproj/cups.strings", 0))
+ locale = "zh_TW";
+ else
+ locale = "zh";
+ }
else if (strstr(locale, "_") != NULL || strstr(locale, "-") != NULL)
{
/*
/*
- * End of "$Id: language.c 12790 2015-07-20 17:05:06Z msweet $".
+ * End of "$Id: language.c 12841 2015-08-10 17:07:30Z msweet $".
*/
/*
- * "$Id: localize.c 11698 2014-03-17 11:58:18Z msweet $"
+ * "$Id: localize.c 12834 2015-08-06 13:56:32Z msweet $"
*
* PPD localization 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
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll_CC, keyword);
if ((attr = ppdFindAttr(ppd, lkeyword, spec)) == NULL)
{
- snprintf(lkeyword, sizeof(lkeyword), "%2.2s.%s", ll_CC, keyword);
- attr = ppdFindAttr(ppd, lkeyword, spec);
+ /*
+ * <rdar://problem/22130168>
+ *
+ * Hong Kong locale needs special handling... Sigh...
+ */
+
+ if (!strcmp(ll_CC, "zh_HK"))
+ {
+ snprintf(lkeyword, sizeof(lkeyword), "zh_TW.%s", keyword);
+ attr = ppdFindAttr(ppd, lkeyword, spec);
+ }
+
+ if (!attr)
+ {
+ snprintf(lkeyword, sizeof(lkeyword), "%2.2s.%s", ll_CC, keyword);
+ attr = ppdFindAttr(ppd, lkeyword, spec);
+ }
if (!attr)
{
/*
- * End of "$Id: localize.c 11698 2014-03-17 11:58:18Z msweet $".
+ * End of "$Id: localize.c 12834 2015-08-06 13:56:32Z msweet $".
*/
/*
- * "$Id: ppd.c 11558 2014-02-06 18:33:34Z msweet $"
+ * "$Id: ppd.c 12848 2015-08-26 18:51:57Z msweet $"
*
* PPD file 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
/*
- * 'ppdErrorString()' - Returns the text assocated with a status.
+ * 'ppdErrorString()' - Returns the text associated with a status.
*
* @since CUPS 1.1.19/OS X 10.3@
*/
char custom_name[PPD_MAX_NAME];
/* CustomFoo attribute name */
ppd_attr_t *custom_attr; /* CustomFoo attribute */
- char ll[4], /* Language + '.' */
- ll_CC[7]; /* Language + country + '.' */
- size_t ll_len = 0, /* Language length */
- ll_CC_len = 0; /* Language + country length */
+ char ll[7], /* Base language + '.' */
+ ll_CC[7]; /* Language w/country + '.' */
+ size_t ll_len = 0, /* Base language length */
+ ll_CC_len = 0; /* Language w/country length */
static const char * const ui_keywords[] =
{
#ifdef CUPS_USE_FULL_UI_KEYWORDS_LIST
return (NULL);
snprintf(ll_CC, sizeof(ll_CC), "%s.", lang->language);
- snprintf(ll, sizeof(ll), "%2.2s.", lang->language);
+
+ /*
+ * <rdar://problem/22130168>
+ *
+ * Need to use a different base language for some locales...
+ */
+
+ if (!strcmp(lang->language, "zh_HK"))
+ strlcpy(ll, "zh_TW.", sizeof(ll));
+ else
+ snprintf(ll, sizeof(ll), "%2.2s.", lang->language);
ll_CC_len = strlen(ll_CC);
ll_len = strlen(ll);
/*
- * End of "$Id: ppd.c 11558 2014-02-06 18:33:34Z msweet $".
+ * End of "$Id: ppd.c 12848 2015-08-26 18:51:57Z msweet $".
*/
/*
- * "$Id: testlang.c 10996 2013-05-29 11:51:34Z msweet $"
+ * "$Id: testlang.c 12841 2015-08-10 17:07:30Z msweet $"
*
* Localization test program for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
};
- _cupsSetLocale(argv);
-
if (argc == 1)
{
language = cupsLangDefault();
{
language = cupsLangGet(argv[1]);
language2 = cupsLangGet(argv[1]);
+
+ setenv("LANG", argv[1], 1);
+ setenv("SOFTWARE", "CUPS/" CUPS_SVERSION, 1);
}
+ _cupsSetLocale(argv);
+
if (language != language2)
{
errors ++;
}
}
+ if (argc == 3)
+ {
+ ppd_file_t *ppd; /* PPD file */
+ ppd_option_t *option; /* PageSize option */
+ ppd_choice_t *choice; /* PageSize/Letter choice */
+
+ if ((ppd = ppdOpenFile(argv[2])) == NULL)
+ {
+ printf("Unable to open PPD file \"%s\".\n", argv[2]);
+ errors ++;
+ }
+ else
+ {
+ ppdLocalize(ppd);
+
+ if ((option = ppdFindOption(ppd, "PageSize")) == NULL)
+ {
+ puts("No PageSize option.");
+ errors ++;
+ }
+ else
+ {
+ printf("PageSize: %s\n", option->text);
+
+ if ((choice = ppdFindChoice(option, "Letter")) == NULL)
+ {
+ puts("No Letter PageSize choice.");
+ errors ++;
+ }
+ else
+ {
+ printf("Letter: %s\n", choice->text);
+ }
+ }
+
+ ppdClose(ppd);
+ }
+ }
+
return (errors > 0);
}
/*
- * End of "$Id: testlang.c 10996 2013-05-29 11:51:34Z msweet $".
+ * End of "$Id: testlang.c 12841 2015-08-10 17:07:30Z msweet $".
*/
The <CODE>job-quota-period</CODE> option determines the time interval for
quota tracking. The interval is expressed in seconds, so a day is
86,400, a week is 604,800, and a month is 2,592,000 seconds. The
-<CODE>job-k-limit</CODE> option specifies the job size limit in killobytes. The
+<CODE>job-k-limit</CODE> option specifies the job size limit in kilobytes. The
<CODE>job-page-limit</CODE> option specifies the number of pages limit.</P>
<P>For quotas to be enforced, the period and at least one of the limits
<title>Array API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>CGI API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>CUPS API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
constants</p>
<h4 class="constants">Constants</h4>
<dl>
+<dt>CUPS_PRINTER_3D <span class="info"> CUPS 2.1 </span></dt>
+<dd class="description">3D Printing </dd>
<dt>CUPS_PRINTER_AUTHENTICATED <span class="info"> CUPS 1.2/OS X 10.5 </span></dt>
<dd class="description">Printer requires authentication
</dd>
<title>File and Directory APIs </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Filter and Backend Programming </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>HTTP and IPP APIs </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<h4 class="parameters">Parameters</h4>
<dl>
<dt>http</dt>
-<dd class="description">HTTP connecion</dd>
+<dd class="description">HTTP connection</dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Cookie data or NULL</p>
<dt>HTTP_STATUS_OK </dt>
<dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
<dt>HTTP_STATUS_PARTIAL_CONTENT </dt>
-<dd class="description">Only a partial file was recieved/sent</dd>
+<dd class="description">Only a partial file was received/sent</dd>
<dt>HTTP_STATUS_PAYMENT_REQUIRED </dt>
<dd class="description">Payment required</dd>
<dt>HTTP_STATUS_PRECONDITION </dt>
<title>MIME API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Introduction to CUPS Programming </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>PPD API (DEPRECATED) </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<li><a href="#ppdEmitJCL" title="Emit code for JCL options to a file.">ppdEmitJCL</a></li>
<li><a href="#ppdEmitJCLEnd" title="Emit JCLEnd code to a file.">ppdEmitJCLEnd</a></li>
<li><a href="#ppdEmitString" title="Get a string containing the code for marked options.">ppdEmitString</a></li>
- <li><a href="#ppdErrorString" title="Returns the text assocated with a status.">ppdErrorString</a></li>
+ <li><a href="#ppdErrorString" title="Returns the text associated with a status.">ppdErrorString</a></li>
<li><a href="#ppdFindAttr" title="Find the first matching attribute.">ppdFindAttr</a></li>
<li><a href="#ppdFindChoice" title="Return a pointer to an option choice.">ppdFindChoice</a></li>
<li><a href="#ppdFindCustomOption" title="Find a custom option.">ppdFindCustomOption</a></li>
</p>
<h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ppdErrorString">ppdErrorString</a></h3>
-<p class="description">Returns the text assocated with a status.</p>
+<p class="description">Returns the text associated with a status.</p>
<p class="code">
const char *ppdErrorString (<br>
<a href="#ppd_status_t">ppd_status_t</a> status<br>
<title>PPD Compiler API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Raster API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<H2 CLASS="title"><A NAME="CUPS">Configuring CUPS to Use Kerberos</A></H2>
-<P>Once youhave configured Kerberos on your system(s), you can then enable Kerberos authentication by selecting the <tt>Negotiate</tt> authentication type. The simplest way to do this is using the <tt>cupsctl(8)</tt> command on your server(s):</P>
+<P>Once you have configured Kerberos on your system(s), you can then enable Kerberos authentication by selecting the <tt>Negotiate</tt> authentication type. The simplest way to do this is using the <tt>cupsctl(8)</tt> command on your server(s):</P>
<PRE CLASS="command">
<KBD>cupsctl DefaultAuthType=Negotiate</KBD>
<dt><b>serial</b>
<dd style="margin-left: 5.0em">The device-uri refers to a serial device with configurable baud rate and other options. If the device-uri contains a baud value, it represents the maximum baud rate supported by the device.
</dl>
-<p>The
+<p>The
<i>scheme</i>
field provides the URI scheme that is supported by the backend. Backends should use this form only when the backend supports any URI using that scheme. The
<i>device-uri</i>
<br>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-subscriptions.conf.html?TOPIC=Man+Pages"><b>subscriptions.conf</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-cups.html?TOPIC=Man+Pages"><b>cups</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
CUPS Online Help (<a href="http://localhost:631/help)">http://localhost:631/help)</a>,
RFC 2569
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-cups-snmp.html?TOPIC=Man+Pages"><b>cups-snmp</b>(8),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpinfo.html?TOPIC=Man+Pages"><b>lpinfo</b>(8),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
CUPS Web Site (<a href="http://www.CUPS.org)">http://www.CUPS.org)</a>,
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp">http://www.pwg.org/ipp</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<br>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<b>smb.conf</b>(5),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<br>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdcfile.html?TOPIC=Man+Pages"><b>ppdcfile</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
[
<b>-c</b>
<i>config-file</i>
-] [
+] [
<b>-f</b>
] [
<b>-F</b>
<b>systemd</b>(8),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
<a href="man-mime.types.html?TOPIC=Man+Pages"><b>mime.types</b>(7),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
Adobe PostScript Language Document Structuring Conventions
Specification, Version 3.0.
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
CUPS Online Help (<a href="http://localhost:631/help)">http://localhost:631/help)</a>,
Adobe PostScript Printer Description File Format Specification, Version 4.3.
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
function to load the options into a <b>cups_option_t</b> array and the
<b>cupsGetOption</b>()
function to get the value of a specific attribute.
-Be careful to look for common aliases of IPP attributes such as "lansdscape" for the IPP "orientation-requested" attribute.
+Be careful to look for common aliases of IPP attributes such as "landscape" for the IPP "orientation-requested" attribute.
<p>Options passed on the command-line typically do not include the default choices the printer's PPD file. Use the
<b>ppdMarkDefaults</b>()
and
<br>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(1)</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2013-2014 by Apple Inc.
+Copyright © 2013-2015 by Apple Inc.
</body>
</html>
<h2 class="title"><a name="EXIT_STATUS">Exit Status</a></h2>
The
<b>ipptool</b>
-program returns 0 if all tests were sucessful and 1 otherwise.
+program returns 0 if all tests were successful and 1 otherwise.
<h2 class="title"><a name="FILES">Files</a></h2>
The following standard files are available:
<pre class="man">
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpadmin.html?TOPIC=Man+Pages"><b>lpadmin</b>(8),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<br>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lprm.html?TOPIC=Man+Pages"><b>lprm</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-lprm.html?TOPIC=Man+Pages"><b>lprm</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
</pre>
The <i>source/type</i> field specifies the source MIME media type that is consumed by the filter.
-<p>The <i>destination/type</i> field specifies the destiantion MIME media type that is produced by the filter.
+<p>The <i>destination/type</i> field specifies the destination MIME media type that is produced by the filter.
<p>The <i>cost</i> field specifies the relative cost for running the filter.
A value of 100 means that the filter uses a large amount of resources while a value of 0 means that the filter uses very few resources.
<p>The <i>filter</i> field specifies the filter program filename.
<a href="man-mime.types.html?TOPIC=Man+Pages"><b>mime.types</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-mime.convs.html?TOPIC=Man+Pages"><b>mime.convs</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-filter.html?TOPIC=Man+Pages"><b>filter</b>(7),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdcfile.html?TOPIC=Man+Pages"><b>ppdcfile</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdpo.html?TOPIC=Man+Pages"><b>ppdpo</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdpo.html?TOPIC=Man+Pages"><b>ppdpo</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdcfile.html?TOPIC=Man+Pages"><b>ppdcfile</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-ppdcfile.html?TOPIC=Man+Pages"><b>ppdcfile</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<b>ppdcfile(5),</b>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-subscriptions.conf.html?TOPIC=Man+Pages"><b>subscriptions.conf</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<a href="man-printers.conf.html?TOPIC=Man+Pages"><b>printers.conf</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2014 by Apple Inc.
+Copyright © 2007-2015 by Apple Inc.
</body>
</html>
<title>Developing PostScript Printer Drivers </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Introduction to the PPD Compiler </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Developing Raster Printer Drivers </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<P>Backends (<A HREF="man-backend.html">backend(7)</A>) send print data to the printer and enumerate available printers/devices as needed. Backends use the same interface as filters.</P>
-<P>CUPS includes backends for AppSocket (JetDirect), IPP, LPD, parallel, SCSI, serial, and USB connections. Additional backends can be added as needed without additional configuration.</P>
+<P>CUPS includes backends for AppSocket (JetDirect), IPP, LPD, and USB connections and DNS-SD and SNMP for discovery. Additional backends can be added as needed without additional configuration.</P>
<H2 CLASS="title"><A NAME="PROGRAMMING">Programming Interfaces</A></H2>
<title>CUPS PPD Extensions </title>
<meta name="keywords" content="Specifications">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<p class="summary">*JCLToPDFInterpreter: "JCL"</p>
-<p>This keyword provfides the JCL command to insert a PDF job file into a printer-ready data stream. The JCL command is added after the <tt>JCLBegin</tt> value and any commands for JCL options in the PPD file.</p>
+<p>This keyword provides the JCL command to insert a PDF job file into a printer-ready data stream. The JCL command is added after the <tt>JCLBegin</tt> value and any commands for JCL options in the PPD file.</p>
<p>Example:</p>
<p class="summary">*JCLToPDFInterpreter: "JCL"</p>
-<p>This keyword provfides the JCL command to insert a PDF job file into a printer-ready data stream. The JCL command is added after the <tt>JCLBegin</tt> value and any commands for JCL options in the PPD file.</p>
+<p>This keyword provides the JCL command to insert a PDF job file into a printer-ready data stream. The JCL command is added after the <tt>JCLBegin</tt> value and any commands for JCL options in the PPD file.</p>
<p>Example:</p>
.\"
-.\" "$Id: backend.man 11793 2014-04-04 19:02:20Z msweet $"
+.\" "$Id: backend.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" Backend man page for CUPS.
.\"
.B serial
The device-uri refers to a serial device with configurable baud rate and other options. If the device-uri contains a baud value, it represents the maximum baud rate supported by the device.
.LP
-The
+The
.I scheme
field provides the URI scheme that is supported by the backend. Backends should use this form only when the backend supports any URI using that scheme. The
.I device-uri
.br
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: backend.man 11793 2014-04-04 19:02:20Z msweet $".
+.\" End of "$Id: backend.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cancel.man 11905 2014-06-03 18:46:30Z msweet $"
+.\" "$Id: cancel.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cancel man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cancel.man 11905 2014-06-03 18:46:30Z msweet $".
+.\" End of "$Id: cancel.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: classes.conf.man 11817 2014-04-15 16:31:11Z msweet $"
+.\" "$Id: classes.conf.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" classes.conf man page for CUPS.
.\"
.BR subscriptions.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: classes.conf.man 11817 2014-04-15 16:31:11Z msweet $".
+.\" End of "$Id: classes.conf.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cups-config.man 11817 2014-04-15 16:31:11Z msweet $"
+.\" "$Id: cups-config.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cups-config man page for CUPS.
.\"
.BR cups (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cups-config.man 11817 2014-04-15 16:31:11Z msweet $".
+.\" End of "$Id: cups-config.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cups-lpd.man.in 11905 2014-06-03 18:46:30Z msweet $"
+.\" "$Id: cups-lpd.man.in 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cups-lpd man page for CUPS.
.\"
CUPS Online Help (http://localhost:631/help),
RFC 2569
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cups-lpd.man.in 11905 2014-06-03 18:46:30Z msweet $".
+.\" End of "$Id: cups-lpd.man.in 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cups-snmp.conf.man 11913 2014-06-10 19:00:24Z msweet $"
+.\" "$Id: cups-snmp.conf.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" snmp.conf man page for CUPS.
.\"
.BR cups-snmp (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cups-snmp.conf.man 11913 2014-06-10 19:00:24Z msweet $".
+.\" End of "$Id: cups-snmp.conf.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cups-snmp.man.in 11913 2014-06-10 19:00:24Z msweet $"
+.\" "$Id: cups-snmp.man.in 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" SNMP backend man page for CUPS.
.\"
.BR lpinfo (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cups-snmp.man.in 11913 2014-06-10 19:00:24Z msweet $".
+.\" End of "$Id: cups-snmp.man.in 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cups.man 11822 2014-04-21 11:49:06Z msweet $"
+.\" "$Id: cups.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cups (intro) man page for CUPS.
.\"
CUPS Web Site (http://www.CUPS.org),
PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cups.man 11822 2014-04-21 11:49:06Z msweet $".
+.\" End of "$Id: cups.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsaccept.man 11913 2014-06-10 19:00:24Z msweet $"
+.\" "$Id: cupsaccept.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" accept/reject man page for CUPS.
.\"
.br
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsaccept.man 11913 2014-06-10 19:00:24Z msweet $".
+.\" End of "$Id: cupsaccept.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsaddsmb.man.in 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupsaddsmb.man.in 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsaddsmb man page for CUPS.
.\"
.BR smb.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsaddsmb.man.in 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupsaddsmb.man.in 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsctl.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupsctl.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsctl man page for CUPS.
.\"
.br
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsctl.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupsctl.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsd-helper.man 11817 2014-04-15 16:31:11Z msweet $"
+.\" "$Id: cupsd-helper.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsd-helper man page for CUPS.
.\"
.BR ppdcfile (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsd-helper.man 11817 2014-04-15 16:31:11Z msweet $".
+.\" End of "$Id: cupsd-helper.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsd-logs.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupsd-logs.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsd-logs man page for CUPS.
.\"
.BR cups-files.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsd-logs.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupsd-logs.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsd.man.in 12003 2014-07-08 15:29:14Z msweet $"
+.\" "$Id: cupsd.man.in 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsd man page for CUPS.
.\"
[
.B \-c
.I config-file
-] [
+] [
.B \-f
] [
.B \-F
.BR systemd (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsd.man.in 12003 2014-07-08 15:29:14Z msweet $".
+.\" End of "$Id: cupsd.man.in 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsenable.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupsenable.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsenable/cupsdisable man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsenable.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupsenable.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupsfilter.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupsfilter.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupsfilter man page for CUPS.
.\"
.BR mime.types (7),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupsfilter.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupsfilter.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupstestdsc.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupstestdsc.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupstestdsc man page for CUPS.
.\"
Adobe PostScript Language Document Structuring Conventions
Specification, Version 3.0.
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupstestdsc.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupstestdsc.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: cupstestppd.man 11920 2014-06-11 19:03:59Z msweet $"
+.\" "$Id: cupstestppd.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" cupstestppd man page for CUPS.
.\"
CUPS Online Help (http://localhost:631/help),
Adobe PostScript Printer Description File Format Specification, Version 4.3.
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: cupstestppd.man 11920 2014-06-11 19:03:59Z msweet $".
+.\" End of "$Id: cupstestppd.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: filter.man 11793 2014-04-04 19:02:20Z msweet $"
+.\" "$Id: filter.man 12848 2015-08-26 18:51:57Z msweet $"
.\"
.\" filter man page 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
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH filter 7 "CUPS" "4 April 2014" "Apple Inc."
+.TH filter 7 "CUPS" "26 August 2015" "Apple Inc."
.SH NAME
filter \- cups file conversion filter interface
.SH SYNOPSIS
function to load the options into a \fBcups_option_t\fR array and the
.BR cupsGetOption ()
function to get the value of a specific attribute.
-Be careful to look for common aliases of IPP attributes such as "lansdscape" for the IPP "orientation-requested" attribute.
+Be careful to look for common aliases of IPP attributes such as "landscape" for the IPP "orientation-requested" attribute.
.LP
Options passed on the command-line typically do not include the default choices the printer's PPD file. Use the
.BR ppdMarkDefaults ()
.br
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: filter.man 11793 2014-04-04 19:02:20Z msweet $".
+.\" End of "$Id: filter.man 12848 2015-08-26 18:51:57Z msweet $".
.\"
.\"
-.\" "$Id: ippfind.man 11938 2014-06-22 12:44:05Z msweet $"
+.\" "$Id: ippfind.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ippfind man page for CUPS.
.\"
.SH SEE ALSO
.BR ipptool (1)
.SH COPYRIGHT
-Copyright \[co] 2013-2014 by Apple Inc.
+Copyright \[co] 2013-2015 by Apple Inc.
.\"
-.\" End of "$Id: ippfind.man 11938 2014-06-22 12:44:05Z msweet $".
+.\" End of "$Id: ippfind.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ipptool.man 12484 2015-02-03 19:25:57Z msweet $"
+.\" "$Id: ipptool.man 12848 2015-08-26 18:51:57Z msweet $"
.\"
.\" ipptool man page for CUPS.
.\"
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH ipptool 1 "CUPS" "3 February 2015" "Apple Inc."
+.TH ipptool 1 "CUPS" "26 August 2015" "Apple Inc."
.SH NAME
ipptool \- perform internet printing protocol requests
.SH SYNOPSIS
.SH EXIT STATUS
The
.B ipptool
-program returns 0 if all tests were sucessful and 1 otherwise.
+program returns 0 if all tests were successful and 1 otherwise.
.SH FILES
The following standard files are available:
.nf
.SH COPYRIGHT
Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ipptool.man 12484 2015-02-03 19:25:57Z msweet $".
+.\" End of "$Id: ipptool.man 12848 2015-08-26 18:51:57Z msweet $".
.\"
.\"
-.\" "$Id: lp.man 11922 2014-06-11 23:35:37Z msweet $"
+.\" "$Id: lp.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lp man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lp.man 11922 2014-06-11 23:35:37Z msweet $".
+.\" End of "$Id: lp.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpc.man 11923 2014-06-12 12:55:34Z msweet $"
+.\" "$Id: lpc.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpc man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpc.man 11923 2014-06-12 12:55:34Z msweet $".
+.\" End of "$Id: lpc.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpinfo.man 11923 2014-06-12 12:55:34Z msweet $"
+.\" "$Id: lpinfo.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpinfo man page for CUPS.
.\"
.BR lpadmin (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpinfo.man 11923 2014-06-12 12:55:34Z msweet $".
+.\" End of "$Id: lpinfo.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpmove.man 11923 2014-06-12 12:55:34Z msweet $"
+.\" "$Id: lpmove.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpmove man page for CUPS.
.\"
.br
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpmove.man 11923 2014-06-12 12:55:34Z msweet $".
+.\" End of "$Id: lpmove.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpoptions.man.in 11923 2014-06-12 12:55:34Z msweet $"
+.\" "$Id: lpoptions.man.in 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpoptions man page for CUPS.
.\"
.BR lprm (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpoptions.man.in 11923 2014-06-12 12:55:34Z msweet $".
+.\" End of "$Id: lpoptions.man.in 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpq.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: lpq.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpq man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpq.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: lpq.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpr.man 11922 2014-06-11 23:35:37Z msweet $"
+.\" "$Id: lpr.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpr man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpr.man 11922 2014-06-11 23:35:37Z msweet $".
+.\" End of "$Id: lpr.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lprm.man 11893 2014-05-23 02:45:48Z msweet $"
+.\" "$Id: lprm.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lprm man page for CUPS.
.\"
.BR lpstat (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lprm.man 11893 2014-05-23 02:45:48Z msweet $".
+.\" End of "$Id: lprm.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: lpstat.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: lpstat.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" lpstat man page for CUPS.
.\"
.BR lprm (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: lpstat.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: lpstat.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: mailto.conf.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: mailto.conf.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" mailto.conf man page for CUPS.
.\"
.BR cupsd (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: mailto.conf.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: mailto.conf.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: mime.convs.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: mime.convs.man 12848 2015-08-26 18:51:57Z msweet $"
.\"
.\" mime.convs man page for CUPS.
.\"
-.\" Copyright 2007-2014 by Apple Inc.
+.\" Copyright 2007-2015 by Apple Inc.
.\" Copyright 1997-2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH mime.convs 5 "CUPS" "12 June 2014" "Apple Inc."
+.TH mime.convs 5 "CUPS" "26 August 2015" "Apple Inc."
.SH NAME
mime.convs \- mime type conversion file for cups
.SH DESCRIPTION
.fi
The \fIsource/type\fR field specifies the source MIME media type that is consumed by the filter.
.LP
-The \fIdestination/type\fR field specifies the destiantion MIME media type that is produced by the filter.
+The \fIdestination/type\fR field specifies the destination MIME media type that is produced by the filter.
.LP
The \fIcost\fR field specifies the relative cost for running the filter.
A value of 100 means that the filter uses a large amount of resources while a value of 0 means that the filter uses very few resources.
.BR mime.types (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: mime.convs.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: mime.convs.man 12848 2015-08-26 18:51:57Z msweet $".
.\"
.\"
-.\" "$Id: mime.types.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: mime.types.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" mime.types man page for CUPS.
.\"
.BR mime.convs (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: mime.types.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: mime.types.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: notifier.man 11924 2014-06-12 19:10:33Z msweet $"
+.\" "$Id: notifier.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" notifier man page for CUPS.
.\"
.BR filter (7),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: notifier.man 11924 2014-06-12 19:10:33Z msweet $".
+.\" End of "$Id: notifier.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdc.man 11927 2014-06-13 00:01:23Z msweet $"
+.\" "$Id: ppdc.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdc man page for CUPS.
.\"
.BR ppdcfile (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdc.man 11927 2014-06-13 00:01:23Z msweet $".
+.\" End of "$Id: ppdc.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdcfile.man 11925 2014-06-12 19:36:12Z msweet $"
+.\" "$Id: ppdcfile.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdcfile man page for CUPS.
.\"
.BR ppdpo (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdcfile.man 11925 2014-06-12 19:36:12Z msweet $".
+.\" End of "$Id: ppdcfile.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdhtml.man 11927 2014-06-13 00:01:23Z msweet $"
+.\" "$Id: ppdhtml.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdhtml man page for CUPS.
.\"
.BR ppdpo (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdhtml.man 11927 2014-06-13 00:01:23Z msweet $".
+.\" End of "$Id: ppdhtml.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdi.man 11927 2014-06-13 00:01:23Z msweet $"
+.\" "$Id: ppdi.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdi man page for CUPS.
.\"
.BR ppdcfile (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdi.man 11927 2014-06-13 00:01:23Z msweet $".
+.\" End of "$Id: ppdi.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdmerge.man 11927 2014-06-13 00:01:23Z msweet $"
+.\" "$Id: ppdmerge.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdmerge man page for CUPS.
.\"
.BR ppdcfile (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdmerge.man 11927 2014-06-13 00:01:23Z msweet $".
+.\" End of "$Id: ppdmerge.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: ppdpo.man 11927 2014-06-13 00:01:23Z msweet $"
+.\" "$Id: ppdpo.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" ppdpo man page for CUPS.
.\"
.BR ppdcfile(5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdpo.man 11927 2014-06-13 00:01:23Z msweet $".
+.\" End of "$Id: ppdpo.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: printers.conf.man 11817 2014-04-15 16:31:11Z msweet $"
+.\" "$Id: printers.conf.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" printers.conf man page for CUPS.
.\"
.BR subscriptions.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: printers.conf.man 11817 2014-04-15 16:31:11Z msweet $".
+.\" End of "$Id: printers.conf.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
.\"
-.\" "$Id: subscriptions.conf.man 11817 2014-04-15 16:31:11Z msweet $"
+.\" "$Id: subscriptions.conf.man 12854 2015-08-28 14:08:00Z msweet $"
.\"
.\" subscriptions.conf man page for CUPS.
.\"
.BR printers.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2014 by Apple Inc.
+Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: subscriptions.conf.man 11817 2014-04-15 16:31:11Z msweet $".
+.\" End of "$Id: subscriptions.conf.man 12854 2015-08-28 14:08:00Z msweet $".
.\"
#
-# "$Id: cups.spec.in 12713 2015-06-08 21:10:09Z msweet $"
+# "$Id: cups.spec.in 12857 2015-08-31 15:00:45Z msweet $"
#
# RPM "spec" file for CUPS.
#
# dnssd - Enable/disable DNS-SD support (default = enable)
# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
# static - Enable/disable static libraries (default = enable)
+# systemd - Enable/disable systemd support (default = enable)
%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
%{?_with_dbus: %define _dbus --enable-dbus}
Summary: CUPS
Name: cups
-Version: 2.1rc1
+Version: 2.1.0
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: http://www.cups.org/software/2.1rc1/cups-2.1rc1-source.tar.bz2
+Source: http://www.cups.org/software/2.1.0/cups-2.1.0-source.tar.bz2
Url: http://www.cups.org
Packager: Anonymous <anonymous@foo.com>
Vendor: Apple Inc.
/usr/share/man/man1/lpstat.1.gz
%dir /usr/share/man/man5
/usr/share/man/man5/*.conf.5.gz
+/usr/share/man/man5/cupsd-logs.5.gz
/usr/share/man/man5/ipptoolfile.5.gz
/usr/share/man/man5/mime.*.5.gz
%dir /usr/share/man/man8
/usr/share/man/man8/cupsfilter.8.gz
/usr/share/man/man8/cupsd.8.gz
/usr/share/man/man8/cupsd-helper.8.gz
-/usr/share/man/man8/cupsd-logs.8.gz
/usr/share/man/man8/cupsdisable.8.gz
/usr/share/man/man8/cupsenable.8.gz
/usr/share/man/man8/cupsreject.8.gz
#
-# End of "$Id: cups.spec.in 12713 2015-06-08 21:10:09Z msweet $".
+# End of "$Id: cups.spec.in 12857 2015-08-31 15:00:45Z msweet $".
#
#
-# "$Id: cups.spec.in 12713 2015-06-08 21:10:09Z msweet $"
+# "$Id: cups.spec.in 12857 2015-08-31 15:00:45Z msweet $"
#
# RPM "spec" file for CUPS.
#
# dnssd - Enable/disable DNS-SD support (default = enable)
# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
# static - Enable/disable static libraries (default = enable)
+# systemd - Enable/disable systemd support (default = enable)
%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
%{?_with_dbus: %define _dbus --enable-dbus}
/usr/share/man/man1/lpstat.1.gz
%dir /usr/share/man/man5
/usr/share/man/man5/*.conf.5.gz
+/usr/share/man/man5/cupsd-logs.5.gz
/usr/share/man/man5/ipptoolfile.5.gz
/usr/share/man/man5/mime.*.5.gz
%dir /usr/share/man/man8
/usr/share/man/man8/cupsfilter.8.gz
/usr/share/man/man8/cupsd.8.gz
/usr/share/man/man8/cupsd-helper.8.gz
-/usr/share/man/man8/cupsd-logs.8.gz
/usr/share/man/man8/cupsdisable.8.gz
/usr/share/man/man8/cupsenable.8.gz
/usr/share/man/man8/cupsreject.8.gz
#
-# End of "$Id: cups.spec.in 12713 2015-06-08 21:10:09Z msweet $".
+# End of "$Id: cups.spec.in 12857 2015-08-31 15:00:45Z msweet $".
#
/*
- * "$Id: ipp.c 12777 2015-07-07 17:24:06Z msweet $"
+ * "$Id: ipp.c 12851 2015-08-28 13:17:53Z msweet $"
*
* IPP routines for the CUPS scheduler.
*
cups_array_t *exclude);
static int copy_banner(cupsd_client_t *con, cupsd_job_t *job,
const char *name);
-static int copy_file(const char *from, const char *to);
+static int copy_file(const char *from, const char *to, mode_t mode);
static int copy_model(cupsd_client_t *con, const char *from,
const char *to);
static void copy_job_attrs(cupsd_client_t *con,
* interfaces directory and make it executable...
*/
- if (copy_file(srcfile, dstfile))
+ if (copy_file(srcfile, dstfile, ConfigFilePerm | 0110))
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
_("Unable to copy interface script - %s"),
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Copied interface script successfully");
- chmod(dstfile, 0755);
}
snprintf(dstfile, sizeof(dstfile), "%s/ppd/%s.ppd", ServerRoot,
* ppd directory and make it readable by all...
*/
- if (copy_file(srcfile, dstfile))
+ if (copy_file(srcfile, dstfile, ConfigFilePerm))
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
_("Unable to copy PPD file - %s"),
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Copied PPD file successfully");
- chmod(dstfile, 0644);
}
else
{
static int /* O - 0 = success, -1 = error */
copy_file(const char *from, /* I - Source file */
- const char *to) /* I - Destination file */
+ const char *to, /* I - Destination file */
+ mode_t mode) /* I - Permissions */
{
cups_file_t *src, /* Source file */
*dst; /* Destination file */
if ((src = cupsFileOpen(from, "rb")) == NULL)
return (-1);
- if ((dst = cupsFileOpen(to, "wb")) == NULL)
+ if ((dst = cupsdCreateConfFile(to, mode)) == NULL)
{
cupsFileClose(src);
return (-1);
cupsFileClose(src);
- return (cupsFileClose(dst));
+ return (cupsdCloseCreatedConfFile(dst, to));
}
/*
- * End of "$Id: ipp.c 12777 2015-07-07 17:24:06Z msweet $".
+ * End of "$Id: ipp.c 12851 2015-08-28 13:17:53Z msweet $".
*/
/*
- * "$Id: job.c 12777 2015-07-07 17:24:06Z msweet $"
+ * "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $"
*
* Job management routines for the CUPS scheduler.
*
cupsdLogJob(job, CUPSD_LOG_DEBUG, "Removing document files.");
remove_job_files(job);
+ cupsdMarkDirty(CUPSD_DIRTY_JOBS);
+
if (job->history_time < JobHistoryUpdate || !JobHistoryUpdate)
JobHistoryUpdate = job->history_time;
}
/*
- * End of "$Id: job.c 12777 2015-07-07 17:24:06Z msweet $".
+ * End of "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $".
*/
/*
- * "$Id: log.c 12816 2015-07-30 15:38:57Z msweet $"
+ * "$Id: log.c 12857 2015-08-31 15:00:45Z msweet $"
*
* Log file routines for the CUPS scheduler.
*
asl_set(m, PWG_Event, "JobStateChanged");
asl_set(m, PWG_JobID, job_id);
- asl_set(m, PWG_JobState, job_states[job->state_value - IPP_JSTATE_PENDING]);
+ asl_set(m, PWG_JobState, job->state_value < IPP_JSTATE_PENDING ? "" : job_states[job->state_value - IPP_JSTATE_PENDING]);
if (job->impressions)
{
#elif defined(HAVE_SYSTEMD_SD_JOURNAL_H)
if (!strcmp(ErrorLog, "syslog"))
{
- cupsd_printer_t *printer = job->printer ? job->printer : job->dest ? cupsdFindDest(job->dest) : NULL;
+ cupsd_printer_t *printer = job ? (job->printer ? job->printer : (job->dest ? cupsdFindDest(job->dest) : NULL)) : NULL;
static const char * const job_states[] =
{ /* job-state strings */
"Pending",
PWG_Event"=JobStateChanged",
PWG_ServiceURI"=%s", printer ? printer->uri : "",
PWG_JobID"=%d", job->id,
- PWG_JobState"=%s", job_states[job->state_value - IPP_JSTATE_PENDING],
+ PWG_JobState"=%s", job->state_value < IPP_JSTATE_PENDING ? "" : job_states[job->state_value - IPP_JSTATE_PENDING],
PWG_JobImpressionsCompleted"=%d", ippGetInteger(job->impressions, 0),
NULL);
else
/*
- * End of "$Id: log.c 12816 2015-07-30 15:38:57Z msweet $".
+ * End of "$Id: log.c 12857 2015-08-31 15:00:45Z msweet $".
*/
--- /dev/null
+# Make the printer display a message
+{
+ # The name of the test...
+ NAME "Identify Printer with Message"
+
+ # The operation to use
+ OPERATION Identify-Printer
+
+ # Attributes, starting in the operation group...
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword identify-actions display
+ ATTR text message "Hello\, World!"
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
--- /dev/null
+# Make the printer display a message and beep
+{
+ # The name of the test...
+ NAME "Identify Printer with Message and Beep"
+
+ # The operation to use
+ OPERATION Identify-Printer
+
+ # Attributes, starting in the operation group...
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword identify-actions sound,display
+ ATTR text message "Hello\, World!"
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
/*
- * "$Id: ippserver.c 12598 2015-05-05 18:57:57Z msweet $"
+ * "$Id: ippserver.c 12840 2015-08-09 02:10:23Z msweet $"
*
* Sample IPP Everywhere server for CUPS.
*
_IPP_PREASON_TONER_LOW = 0x8000 /* toner-low */
};
typedef unsigned int _ipp_preason_t; /* Bitfield for printer-state-reasons */
+static const char * const _ipp_preason_strings[] =
+{ /* Strings for each bit */
+ /* "none" is implied for no bits set */
+ "other",
+ "cover-open",
+ "input-tray-missing",
+ "marker-supply-empty",
+ "marker-supply-low",
+ "marker-waste-almost-full",
+ "marker-waste-full",
+ "media-empty",
+ "media-jam",
+ "media-low",
+ "media-needed",
+ "moving-to-paused",
+ "paused",
+ "spool-area-full",
+ "toner-empty",
+ "toner-low"
+};
typedef enum _ipp_media_class_e
{
"Toner Waste"
};
+/*
+ * URL scheme for web resources...
+ */
+
+#ifdef HAVE_SSL
+# define WEB_SCHEME "https"
+#else
+# define WEB_SCHEME "http"
+#endif /* HAVE_SSL */
+
/*
* Structures...
int ppm_color, int duplex, int port,
int pin, const char *subtype,
const char *directory,
- const char *command);
+ const char *command,
+ const char *attrfile);
static void debug_attributes(const char *title, ipp_t *ipp,
int response);
static void delete_client(_ipp_client_t *client);
static void dnssd_init(void);
static int filter_cb(_ipp_filter_t *filter, ipp_t *dst, ipp_attribute_t *attr);
static _ipp_job_t *find_job(_ipp_client_t *client);
+static ipp_t *get_collection(FILE *fp, const char *filename, int *linenum);
+static char *get_token(FILE *fp, char *buf, int buflen, int *linenum);
static void html_escape(_ipp_client_t *client, const char *s,
size_t slen);
static void html_footer(_ipp_client_t *client);
static void ipp_send_document(_ipp_client_t *client);
static void ipp_send_uri(_ipp_client_t *client);
static void ipp_validate_job(_ipp_client_t *client);
+static void load_attributes(const char *filename, ipp_t *attrs);
static int parse_options(_ipp_client_t *client, cups_option_t **options);
+static void process_attr_message(_ipp_job_t *job, char *message);
static void *process_client(_ipp_client_t *client);
static int process_http(_ipp_client_t *client);
static int process_ipp(_ipp_client_t *client);
static void *process_job(_ipp_job_t *job);
+static void process_state_message(_ipp_job_t *job, char *message);
static int register_printer(_ipp_printer_t *printer, const char *location, const char *make, const char *model, const char *formats, const char *adminurl, const char *uuid, int color, int duplex, const char *regtype);
static int respond_http(_ipp_client_t *client, http_status_t code,
const char *content_coding,
{
int i; /* Looping var */
const char *opt, /* Current option character */
+ *attrfile = NULL, /* Attributes file */
*command = NULL, /* Command to run with job files */
*servername = NULL, /* Server host name */
*name = NULL, /* Printer name */
pin = 1;
break;
+ case 'a' : /* -a attributes-file */
+ i ++;
+ if (i >= argc)
+ usage(1);
+
+ attrfile = argv[i];
+ break;
+
case 'c' : /* -c command */
i ++;
if (i >= argc)
if ((printer = create_printer(servername, name, location, make, model, icon,
formats, ppm, ppm_color, duplex, port, pin,
- subtype, directory, command)) == NULL)
+ subtype, directory, command, attrfile)) == NULL)
return (1);
/*
int pin, /* I - Require PIN printing */
const char *subtype, /* I - Bonjour service subtype */
const char *directory, /* I - Spool directory */
- const char *command) /* I - Command to run on job files */
+ const char *command, /* I - Command to run on job files */
+ const char *attrfile) /* I - Attributes file */
{
int i, j; /* Looping vars */
_ipp_printer_t *printer; /* Printer */
char path[1024]; /* Full path to command */
#endif /* !WIN32 */
char uri[1024], /* Printer URI */
+#ifdef HAVE_SSL
+ securi[1024], /* Secure printer URI */
+ *uris[2], /* All URIs */
+#endif /* HAVE_SSL */
icons[1024], /* printer-icons URI */
adminurl[1024], /* printer-more-info URI */
supplyurl[1024],/* printer-supply-info-uri URI */
"W8",
"DM1"
};
+#ifdef HAVE_SSL
+ static const char * const uri_authentication_supported[] =
+ { /* uri-authentication-supported values */
+ "none",
+ "none"
+ };
+ static const char * const uri_security_supported[] =
+ { /* uri-security-supported values */
+ "none",
+ "tls"
+ };
+#endif /* HAVE_SSL */
static const char * const which_jobs[] =
{ /* which-jobs-supported values */
"completed",
printer->jobs = cupsArrayNew((cups_array_func_t)compare_jobs, NULL);
printer->next_job_id = 1;
- httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
- printer->hostname, printer->port, "/ipp/print");
+ httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, printer->hostname, printer->port, "/ipp/print");
printer->uri = strdup(uri);
printer->urilen = strlen(uri);
+#ifdef HAVE_SSL
+ httpAssembleURI(HTTP_URI_CODING_ALL, securi, sizeof(securi), "ipps", NULL, printer->hostname, printer->port, "/ipp/print");
+#endif /* HAVE_SSL */
+
if (icon)
printer->icon = strdup(icon);
* Prepare values for the printer attributes...
*/
- httpAssembleURI(HTTP_URI_CODING_ALL, icons, sizeof(icons), "http", NULL,
- printer->hostname, printer->port, "/icon.png");
- httpAssembleURI(HTTP_URI_CODING_ALL, adminurl, sizeof(adminurl), "http", NULL, printer->hostname, printer->port, "/");
- httpAssembleURI(HTTP_URI_CODING_ALL, supplyurl, sizeof(supplyurl), "http", NULL, printer->hostname, printer->port, "/supplies");
+ httpAssembleURI(HTTP_URI_CODING_ALL, icons, sizeof(icons), WEB_SCHEME, NULL, printer->hostname, printer->port, "/icon.png");
+ httpAssembleURI(HTTP_URI_CODING_ALL, adminurl, sizeof(adminurl), WEB_SCHEME, NULL, printer->hostname, printer->port, "/");
+ httpAssembleURI(HTTP_URI_CODING_ALL, supplyurl, sizeof(supplyurl), WEB_SCHEME, NULL, printer->hostname, printer->port, "/supplies");
if (Verbosity)
{
printer->attrs = ippNew();
+ if (attrfile)
+ load_attributes(attrfile, printer->attrs);
+
/* charset-configured */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_CHARSET),
- "charset-configured", NULL, "utf-8");
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_CHARSET), "charset-configured", NULL, "utf-8");
/* charset-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_CHARSET),
- "charset-supported", sizeof(charsets) / sizeof(charsets[0]),
- NULL, charsets);
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_CHARSET), "charset-supported", sizeof(charsets) / sizeof(charsets[0]), NULL, charsets);
/* color-supported */
- ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "color-supported",
- ppm_color > 0);
+ if (!ippFindAttribute(printer->attrs, "color-supported", IPP_TAG_ZERO))
+ ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "color-supported", ppm_color > 0);
/* compression-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "compression-supported",
- (int)(sizeof(compressions) / sizeof(compressions[0])), NULL,
- compressions);
+ if (!ippFindAttribute(printer->attrs, "compression-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "compression-supported", (int)(sizeof(compressions) / sizeof(compressions[0])), NULL, compressions);
/* copies-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "copies-default", 1);
+ if (!ippFindAttribute(printer->attrs, "copies-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "copies-default", 1);
/* copies-supported */
- ippAddRange(printer->attrs, IPP_TAG_PRINTER, "copies-supported", 1, 999);
+ if (!ippFindAttribute(printer->attrs, "copies-supported", IPP_TAG_ZERO))
+ ippAddRange(printer->attrs, IPP_TAG_PRINTER, "copies-supported", 1, 999);
/* document-format-default */
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
(const char * const *)formats);
/* document-password-supported */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "document-password-supported", 127);
+ if (!ippFindAttribute(printer->attrs, "document-password-supported", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "document-password-supported", 127);
/* finishings-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
- "finishings-default", IPP_FINISHINGS_NONE);
+ if (!ippFindAttribute(printer->attrs, "finishings-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "finishings-default", IPP_FINISHINGS_NONE);
/* finishings-supported */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
- "finishings-supported", IPP_FINISHINGS_NONE);
+ if (!ippFindAttribute(printer->attrs, "finishings-supported", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "finishings-supported", IPP_FINISHINGS_NONE);
/* generated-natural-language-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_LANGUAGE),
- "generated-natural-language-supported", NULL, "en");
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_LANGUAGE), "generated-natural-language-supported", NULL, "en");
/* identify-actions-default */
- ippAddString (printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "identify-actions-default", NULL, "sound");
+ if (!ippFindAttribute(printer->attrs, "identify-actions-default", IPP_TAG_ZERO))
+ ippAddString (printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "identify-actions-default", NULL, "sound");
/* identify-actions-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "identify-actions-supported", sizeof(identify_actions) / sizeof(identify_actions[0]), NULL, identify_actions);
+ if (!ippFindAttribute(printer->attrs, "identify-actions-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "identify-actions-supported", sizeof(identify_actions) / sizeof(identify_actions[0]), NULL, identify_actions);
/* ipp-features-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "ipp-features-supported", sizeof(features) / sizeof(features[0]), NULL, features);
+ if (!ippFindAttribute(printer->attrs, "ipp-features-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "ipp-features-supported", sizeof(features) / sizeof(features[0]), NULL, features);
/* ipp-versions-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "ipp-versions-supported", sizeof(versions) / sizeof(versions[0]), NULL, versions);
+ if (!ippFindAttribute(printer->attrs, "ipp-versions-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "ipp-versions-supported", sizeof(versions) / sizeof(versions[0]), NULL, versions);
/* job-account-id-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-account-id-default", NULL, "");
+ if (!ippFindAttribute(printer->attrs, "job-account-id-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-account-id-default", NULL, "");
/* job-account-id-supported */
- ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-account-id-supported", 1);
+ if (!ippFindAttribute(printer->attrs, "job-account-id-supported", IPP_TAG_ZERO))
+ ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-account-id-supported", 1);
/* job-accounting-user-id-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-accounting-user-id-default", NULL, "");
+ if (!ippFindAttribute(printer->attrs, "job-accounting-user-id-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-accounting-user-id-default", NULL, "");
/* job-accounting-user-id-supported */
- ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-accounting-user-id-supported", 1);
+ if (!ippFindAttribute(printer->attrs, "job-accounting-user-id-supported", IPP_TAG_ZERO))
+ ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-accounting-user-id-supported", 1);
/* job-creation-attributes-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "job-creation-attributes-supported", sizeof(job_creation) / sizeof(job_creation[0]), NULL, job_creation);
+ if (!ippFindAttribute(printer->attrs, "job-creation-attributes-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "job-creation-attributes-supported", sizeof(job_creation) / sizeof(job_creation[0]), NULL, job_creation);
/* job-ids-supported */
ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-ids-supported", 1);
k_supported);
/* job-password-supported */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "job-password-supported", 4);
+ if (!ippFindAttribute(printer->attrs, "job-password-supported", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "job-password-supported", 4);
/* job-preferred-attributes-supported */
ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "job-preferred-attributes-supported", 0);
/* job-priority-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "job-priority-default", 50);
+ if (!ippFindAttribute(printer->attrs, "job-priority-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "job-priority-default", 50);
/* job-priority-supported */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "job-priority-supported", 100);
+ if (!ippFindAttribute(printer->attrs, "job-priority-supported", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "job-priority-supported", 100);
/* job-sheets-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_NAME),
- "job-sheets-default", NULL, "none");
+ if (!ippFindAttribute(printer->attrs, "job-sheets-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-sheets-default", NULL, "none");
/* job-sheets-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_NAME),
- "job-sheets-supported", NULL, "none");
+ if (!ippFindAttribute(printer->attrs, "job-sheets-supported", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "job-sheets-supported", NULL, "none");
/* media-bottom-margin-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "media-bottom-margin-supported",
- (int)(sizeof(media_xxx_margin_supported) /
- sizeof(media_xxx_margin_supported[0])),
- media_xxx_margin_supported);
+ if (!ippFindAttribute(printer->attrs, "media-bottom-margin-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-bottom-margin-supported", (int)(sizeof(media_xxx_margin_supported) / sizeof(media_xxx_margin_supported[0])), media_xxx_margin_supported);
/* media-col-database */
- for (num_database = 0, i = 0;
- i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
- i ++)
- {
- if (media_col_sizes[i][2] == _IPP_ENV_ONLY)
- num_database += 3; /* auto + manual + envelope */
- else if (media_col_sizes[i][2] == _IPP_PHOTO_ONLY)
- num_database += 6 * 3; /* auto + photographic-* from auto, manual, and photo */
- else
- num_database += 2; /* Regular + borderless */
- }
-
- media_col_database = ippAddCollections(printer->attrs, IPP_TAG_PRINTER,
- "media-col-database", num_database,
- NULL);
- for (media_col_index = 0, i = 0;
- i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
- i ++)
+ if (!ippFindAttribute(printer->attrs, "media-col-database", IPP_TAG_ZERO))
{
- switch (media_col_sizes[i][2])
+ for (num_database = 0, i = 0;
+ i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
+ i ++)
{
- case _IPP_GENERAL :
- /*
- * Regular + borderless for the general class; no source/type
- * selectors...
- */
+ if (media_col_sizes[i][2] == _IPP_ENV_ONLY)
+ num_database += 3; /* auto + manual + envelope */
+ else if (media_col_sizes[i][2] == _IPP_PHOTO_ONLY)
+ num_database += 6 * 3; /* auto + photographic-* from auto, manual, and photo */
+ else
+ num_database += 2; /* Regular + borderless */
+ }
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], NULL, NULL, media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], NULL, NULL, media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
- break;
+ media_col_database = ippAddCollections(printer->attrs, IPP_TAG_PRINTER, "media-col-database", num_database, NULL);
+ for (media_col_index = 0, i = 0;
+ i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
+ i ++)
+ {
+ switch (media_col_sizes[i][2])
+ {
+ case _IPP_GENERAL :
+ /*
+ * Regular + borderless for the general class; no source/type
+ * selectors...
+ */
- case _IPP_ENV_ONLY :
- /*
- * Regular margins for "auto", "manual", and "envelope" sources.
- */
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], NULL, NULL, media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], NULL, NULL, media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
+ break;
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "auto", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "manual", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "envelope", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
- break;
- case _IPP_PHOTO_ONLY :
- /*
- * Photos have specific media types and can only be printed via
- * the auto, manual, and photo sources...
- */
+ case _IPP_ENV_ONLY :
+ /*
+ * Regular margins for "auto", "manual", and "envelope" sources.
+ */
- for (j = 0;
- j < (int)(sizeof(media_type_supported) /
- sizeof(media_type_supported[0]));
- j ++)
- {
- if (strcmp(media_type_supported[j], "auto") && strncmp(media_type_supported[j], "photographic-", 13))
- continue;
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "auto", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "manual", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "envelope", "envelope", media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[1]));
+ break;
+ case _IPP_PHOTO_ONLY :
+ /*
+ * Photos have specific media types and can only be printed via
+ * the auto, manual, and photo sources...
+ */
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "auto", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "manual", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
- ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "photo", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
- }
- break;
+ for (j = 0;
+ j < (int)(sizeof(media_type_supported) /
+ sizeof(media_type_supported[0]));
+ j ++)
+ {
+ if (strcmp(media_type_supported[j], "auto") && strncmp(media_type_supported[j], "photographic-", 13))
+ continue;
+
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "auto", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "manual", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
+ ippSetCollection(printer->attrs, &media_col_database, media_col_index ++, create_media_col(media_supported[i], "photo", media_type_supported[j], media_col_sizes[i][0], media_col_sizes[i][1], media_xxx_margin_supported[0]));
+ }
+ break;
+ }
}
}
/* media-col-default */
- media_col_default = create_media_col(media_supported[0],
- media_source_supported[0],
- media_type_supported[0],
- media_col_sizes[0][0],
- media_col_sizes[0][1],
- media_xxx_margin_supported[1]);
+ if (!ippFindAttribute(printer->attrs, "media-col-default", IPP_TAG_ZERO))
+ {
+ media_col_default = create_media_col(media_supported[0], media_source_supported[0], media_type_supported[0], media_col_sizes[0][0], media_col_sizes[0][1],media_xxx_margin_supported[1]);
- ippAddCollection(printer->attrs, IPP_TAG_PRINTER, "media-col-default",
- media_col_default);
- ippDelete(media_col_default);
+ ippAddCollection(printer->attrs, IPP_TAG_PRINTER, "media-col-default",
+ media_col_default);
+ ippDelete(media_col_default);
+ }
/* media-col-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "media-col-supported",
- (int)(sizeof(media_col_supported) /
- sizeof(media_col_supported[0])), NULL,
- media_col_supported);
+ if (!ippFindAttribute(printer->attrs, "media-col-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-col-supported", (int)(sizeof(media_col_supported) / sizeof(media_col_supported[0])), NULL, media_col_supported);
/* media-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "media-default", NULL, media_supported[0]);
+ if (!ippFindAttribute(printer->attrs, "media-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-default", NULL, media_supported[0]);
/* media-left-margin-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "media-left-margin-supported",
- (int)(sizeof(media_xxx_margin_supported) /
- sizeof(media_xxx_margin_supported[0])),
- media_xxx_margin_supported);
+ if (!ippFindAttribute(printer->attrs, "media-left-margin-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-left-margin-supported", (int)(sizeof(media_xxx_margin_supported) / sizeof(media_xxx_margin_supported[0])), media_xxx_margin_supported);
/* media-right-margin-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "media-right-margin-supported",
- (int)(sizeof(media_xxx_margin_supported) /
- sizeof(media_xxx_margin_supported[0])),
- media_xxx_margin_supported);
+ if (!ippFindAttribute(printer->attrs, "media-right-margin-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-right-margin-supported", (int)(sizeof(media_xxx_margin_supported) / sizeof(media_xxx_margin_supported[0])), media_xxx_margin_supported);
/* media-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "media-supported",
- (int)(sizeof(media_supported) / sizeof(media_supported[0])),
- NULL, media_supported);
+ if (!ippFindAttribute(printer->attrs, "media-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-supported", (int)(sizeof(media_supported) / sizeof(media_supported[0])), NULL, media_supported);
/* media-size-supported */
- media_size_supported = ippAddCollections(printer->attrs, IPP_TAG_PRINTER,
- "media-size-supported",
- (int)(sizeof(media_col_sizes) /
- sizeof(media_col_sizes[0])),
- NULL);
- for (i = 0;
- i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
- i ++)
- ippSetCollection(printer->attrs, &media_size_supported, i,
- create_media_size(media_col_sizes[i][0],
- media_col_sizes[i][1]));
+ if (!ippFindAttribute(printer->attrs, "media-size-supported", IPP_TAG_ZERO))
+ {
+ media_size_supported = ippAddCollections(printer->attrs, IPP_TAG_PRINTER, "media-size-supported", (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0])), NULL);
+
+ for (i = 0;
+ i < (int)(sizeof(media_col_sizes) / sizeof(media_col_sizes[0]));
+ i ++)
+ {
+ ipp_t *size = create_media_size(media_col_sizes[i][0], media_col_sizes[i][1]);
+
+ ippSetCollection(printer->attrs, &media_size_supported, i, size);
+ ippDelete(size);
+ }
+ }
/* media-source-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-source-supported", (int)(sizeof(media_source_supported) / sizeof(media_source_supported[0])), NULL, media_source_supported);
+ if (!ippFindAttribute(printer->attrs, "media-source-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-source-supported", (int)(sizeof(media_source_supported) / sizeof(media_source_supported[0])), NULL, media_source_supported);
/* media-top-margin-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "media-top-margin-supported",
- (int)(sizeof(media_xxx_margin_supported) /
- sizeof(media_xxx_margin_supported[0])),
- media_xxx_margin_supported);
+ if (!ippFindAttribute(printer->attrs, "media-top-margin-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-top-margin-supported", (int)(sizeof(media_xxx_margin_supported) / sizeof(media_xxx_margin_supported[0])), media_xxx_margin_supported);
/* media-type-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-type-supported", (int)(sizeof(media_type_supported) / sizeof(media_type_supported[0])), NULL, media_type_supported);
+ if (!ippFindAttribute(printer->attrs, "media-type-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "media-type-supported", (int)(sizeof(media_type_supported) / sizeof(media_type_supported[0])), NULL, media_type_supported);
/* multiple-document-handling-supported */
ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "multiple-document-handling-supported", sizeof(multiple_document_handling) / sizeof(multiple_document_handling[0]), NULL, multiple_document_handling);
"natural-language-configured", NULL, "en");
/* number-up-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "number-up-default", 1);
+ if (!ippFindAttribute(printer->attrs, "number-up-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "number-up-default", 1);
/* number-up-supported */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
- "number-up-supported", 1);
+ if (!ippFindAttribute(printer->attrs, "number-up-supported", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "number-up-supported", 1);
/* operations-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
- "operations-supported", sizeof(ops) / sizeof(ops[0]), ops);
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "operations-supported", sizeof(ops) / sizeof(ops[0]), ops);
/* orientation-requested-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_NOVALUE,
- "orientation-requested-default", 0);
+ if (!ippFindAttribute(printer->attrs, "orientation-requested-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, "orientation-requested-default", 0);
/* orientation-requested-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
- "orientation-requested-supported", 4, orients);
+ if (!ippFindAttribute(printer->attrs, "orientation-requested-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "orientation-requested-supported", 4, orients);
/* output-bin-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "output-bin-default", NULL, "face-down");
+ if (!ippFindAttribute(printer->attrs, "output-bin-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "output-bin-default", NULL, "face-down");
/* output-bin-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "output-bin-supported", NULL, "face-down");
+ if (!ippFindAttribute(printer->attrs, "output-bin-supported", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "output-bin-supported", NULL, "face-down");
/* overrides-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "overrides-supported", (int)(sizeof(overrides) / sizeof(overrides[0])), NULL, overrides);
+ if (!ippFindAttribute(printer->attrs, "overrides-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "overrides-supported", (int)(sizeof(overrides) / sizeof(overrides[0])), NULL, overrides);
/* page-ranges-supported */
- ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "page-ranges-supported", 1);
+ if (!ippFindAttribute(printer->attrs, "page-ranges-supported", IPP_TAG_ZERO))
+ ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "page-ranges-supported", 1);
/* pages-per-minute */
ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
"pages-per-minute-color", ppm_color);
/* pdl-override-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "pdl-override-supported", NULL, "attempted");
+ if (!ippFindAttribute(printer->attrs, "pdl-override-supported", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "pdl-override-supported", NULL, "attempted");
/* print-color-mode-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-color-mode-default", NULL, "auto");
+ if (!ippFindAttribute(printer->attrs, "print-color-mode-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-color-mode-default", NULL, "auto");
/* print-color-mode-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-color-mode-supported", (int)(sizeof(print_color_mode_supported) / sizeof(print_color_mode_supported[0])), NULL, print_color_mode_supported);
+ if (!ippFindAttribute(printer->attrs, "print-color-mode-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-color-mode-supported", (int)(sizeof(print_color_mode_supported) / sizeof(print_color_mode_supported[0])), NULL, print_color_mode_supported);
/* print-content-optimize-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-content-optimize-default", NULL, "auto");
+ if (!ippFindAttribute(printer->attrs, "print-content-optimize-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-content-optimize-default", NULL, "auto");
/* print-content-optimize-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-content-optimize-supported", NULL, "auto");
+ if (!ippFindAttribute(printer->attrs, "print-content-optimize-supported", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-content-optimize-supported", NULL, "auto");
/* print-rendering-intent-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-rendering-intent-default", NULL, "auto");
+ if (!ippFindAttribute(printer->attrs, "print-rendering-intent-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-rendering-intent-default", NULL, "auto");
/* print-rendering-intent-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-rendering-intent-supported", NULL, "auto");
+ if (!ippFindAttribute(printer->attrs, "print-rendering-intent-supported", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "print-rendering-intent-supported", NULL, "auto");
/* print-quality-default */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "print-quality-default", IPP_QUALITY_NORMAL);
+ if (!ippFindAttribute(printer->attrs, "print-quality-default", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "print-quality-default", IPP_QUALITY_NORMAL);
/* print-quality-supported */
- ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "print-quality-supported", (int)(sizeof(print_quality_supported) / sizeof(print_quality_supported[0])), print_quality_supported);
+ if (!ippFindAttribute(printer->attrs, "print-quality-supported", IPP_TAG_ZERO))
+ ippAddIntegers(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "print-quality-supported", (int)(sizeof(print_quality_supported) / sizeof(print_quality_supported[0])), print_quality_supported);
/* printer-device-id */
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT,
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "printer-get-attributes-supported", NULL, "document-format");
/* printer-geo-location */
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_UNKNOWN, "printer-geo-location", 0);
+ if (!ippFindAttribute(printer->attrs, "printer-geo-location", IPP_TAG_ZERO))
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_UNKNOWN, "printer-geo-location", 0);
/* printer-icons */
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
"printer-icons", NULL, icons);
/* printer-is-accepting-jobs */
- ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "printer-is-accepting-jobs",
- 1);
+ ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
/* printer-info */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info",
- NULL, name);
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", NULL, name);
/* printer-location */
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT,
"printer-make-and-model", NULL, make_model);
/* printer-mandatory-job-attributes */
- if (pin)
+ if (pin && !ippFindAttribute(printer->attrs, "", IPP_TAG_ZERO))
{
static const char * const names[] =
{
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-more-info", NULL, adminurl);
/* printer-name */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name",
- NULL, name);
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", NULL, name);
/* printer-organization */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "printer-organization", NULL, "Apple Inc.");
+ if (!ippFindAttribute(printer->attrs, "printer-organization", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "printer-organization", NULL, "Apple Inc.");
/* printer-organizational-unit */
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "printer-organizational-unit", NULL, "Printing Engineering");
+ if (!ippFindAttribute(printer->attrs, "printer-organizational-unit", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "printer-organizational-unit", NULL, "Printing Engineering");
/* printer-resolution-default */
- ippAddResolution(printer->attrs, IPP_TAG_PRINTER,
- "printer-resolution-default", IPP_RES_PER_INCH, 600, 600);
+ if (!ippFindAttribute(printer->attrs, "printer-resolution-default", IPP_TAG_ZERO))
+ ippAddResolution(printer->attrs, IPP_TAG_PRINTER, "printer-resolution-default", IPP_RES_PER_INCH, 600, 600);
/* printer-resolution-supported */
- ippAddResolution(printer->attrs, IPP_TAG_PRINTER,
- "printer-resolution-supported", IPP_RES_PER_INCH, 600, 600);
+ if (!ippFindAttribute(printer->attrs, "printer-resolutions-supported", IPP_TAG_ZERO))
+ ippAddResolution(printer->attrs, IPP_TAG_PRINTER, "printer-resolution-supported", IPP_RES_PER_INCH, 600, 600);
/* printer-supply-description */
ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_TEXT), "printer-supply-description", (int)(sizeof(printer_supplies) / sizeof(printer_supplies[0])), NULL, printer_supplies);
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-supply-info-uri", NULL, supplyurl);
/* printer-uri-supported */
+#ifdef HAVE_SSL
+ uris[0] = uri;
+ uris[1] = securi;
+
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-uri-supported", 2, NULL, (const char **)uris);
+
+#else
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-uri-supported", NULL, uri);
+#endif /* HAVE_SSL */
/* printer-uuid */
httpAssembleUUID(printer->hostname, port, name, 0, uuid, sizeof(uuid));
if (i < num_formats)
{
- ippAddResolutions(printer->attrs, IPP_TAG_PRINTER,
- "pwg-raster-document-resolution-supported",
- (int)(sizeof(pwg_raster_document_resolution_supported) /
- sizeof(pwg_raster_document_resolution_supported[0])),
- IPP_RES_PER_INCH,
- pwg_raster_document_resolution_supported,
- pwg_raster_document_resolution_supported);
- ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
- "pwg-raster-document-sheet-back", NULL, "normal");
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
- "pwg-raster-document-type-supported",
- (int)(sizeof(pwg_raster_document_type_supported) /
- sizeof(pwg_raster_document_type_supported[0])), NULL,
- pwg_raster_document_type_supported);
+ if (!ippFindAttribute(printer->attrs, "pwg-raster-document-resolution-supported", IPP_TAG_ZERO))
+ ippAddResolutions(printer->attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", (int)(sizeof(pwg_raster_document_resolution_supported) / sizeof(pwg_raster_document_resolution_supported[0])), IPP_RES_PER_INCH, pwg_raster_document_resolution_supported, pwg_raster_document_resolution_supported);
+ if (!ippFindAttribute(printer->attrs, "pwg-raster-document-sheet-back", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-sheet-back", NULL, "normal");
+ if (!ippFindAttribute(printer->attrs, "pwg-raster-document-type-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-type-supported", (int)(sizeof(pwg_raster_document_type_supported) / sizeof(pwg_raster_document_type_supported[0])), NULL, pwg_raster_document_type_supported);
}
/* reference-uri-scheme-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_URISCHEME),
- "reference-uri-schemes-supported",
- (int)(sizeof(reference_uri_schemes_supported) /
- sizeof(reference_uri_schemes_supported[0])),
- NULL, reference_uri_schemes_supported);
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_URISCHEME), "reference-uri-schemes-supported", (int)(sizeof(reference_uri_schemes_supported) / sizeof(reference_uri_schemes_supported[0])), NULL, reference_uri_schemes_supported);
/* sides-default */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "sides-default", NULL, "one-sided");
+ if (!ippFindAttribute(printer->attrs, "sides-default", IPP_TAG_ZERO))
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "sides-default", NULL, "one-sided");
/* sides-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "sides-supported", duplex ? 3 : 1, NULL, sides_supported);
+ if (!ippFindAttribute(printer->attrs, "sides-supported", IPP_TAG_ZERO))
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "sides-supported", duplex ? 3 : 1, NULL, sides_supported);
/* urf-supported */
for (i = 0; i < num_formats; i ++)
if (!strcasecmp(formats[i], "image/urf"))
break;
- if (i < num_formats)
+ if (i < num_formats && !ippFindAttribute(printer->attrs, "urf-supported", IPP_TAG_ZERO))
ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "urf-supported", (int)(sizeof(urf_supported) / sizeof(urf_supported[0])) - !duplex, NULL, urf_supported);
/* uri-authentication-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "uri-authentication-supported", NULL, "none");
+#ifdef HAVE_SSL
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", 2, NULL, uri_authentication_supported);
+#else
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", NULL, "none");
+#endif /* HAVE_SSL */
/* uri-security-supported */
- ippAddString(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "uri-security-supported", NULL, "none");
+#ifdef HAVE_SSL
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-security-supported", 2, NULL, uri_security_supported);
+#else
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-security-supported", NULL, "none");
+#endif /* HAVE_SSL */
/* which-jobs-supported */
- ippAddStrings(printer->attrs, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "which-jobs-supported",
- sizeof(which_jobs) / sizeof(which_jobs[0]), NULL, which_jobs);
+ ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "which-jobs-supported", sizeof(which_jobs) / sizeof(which_jobs[0]), NULL, which_jobs);
free(formats[0]);
}
+/*
+ * 'get_collection()' - Get a collection value from a file.
+ */
+
+static ipp_t * /* O - Collection value */
+get_collection(FILE *fp, /* I - File to read from */
+ const char *filename, /* I - Attributes filename */
+ int *linenum) /* IO - Line number */
+{
+ char token[1024], /* Token from file */
+ attr[128]; /* Attribute name */
+ ipp_tag_t value; /* Current value type */
+ ipp_t *col = ippNew(); /* Collection value */
+ ipp_attribute_t *lastcol = NULL; /* Last collection attribute */
+
+
+ while (get_token(fp, token, sizeof(token), linenum) != NULL)
+ {
+ if (!strcmp(token, "}"))
+ break;
+ else if (!strcmp(token, "{") && lastcol)
+ {
+ /*
+ * Another collection value
+ */
+
+ ipp_t *subcol = get_collection(fp, filename, linenum);
+ /* Collection value */
+
+ if (subcol)
+ ippSetCollection(col, &lastcol, ippGetCount(lastcol), subcol);
+ else
+ goto col_error;
+ }
+ else if (!_cups_strcasecmp(token, "MEMBER"))
+ {
+ /*
+ * Attribute...
+ */
+
+ lastcol = NULL;
+
+ if (!get_token(fp, token, sizeof(token), linenum))
+ {
+ fprintf(stderr, "ippserver: Missing MEMBER value tag on line %d of \"%s\".\n", *linenum, filename);
+ goto col_error;
+ }
+
+ if ((value = ippTagValue(token)) == IPP_TAG_ZERO)
+ {
+ fprintf(stderr, "ippserver: Bad MEMBER value tag \"%s\" on line %d of \"%s\".\n", token, *linenum, filename);
+ goto col_error;
+ }
+
+ if (!get_token(fp, attr, sizeof(attr), linenum))
+ {
+ fprintf(stderr, "ippserver: Missing MEMBER name on line %d of \"%s\".\n", *linenum, filename);
+ goto col_error;
+ }
+
+ if (!get_token(fp, token, sizeof(token), linenum))
+ {
+ fprintf(stderr, "ippserver: Missing MEMBER value on line %d of \"%s\".\n", *linenum, filename);
+ goto col_error;
+ }
+
+ switch (value)
+ {
+ case IPP_TAG_BOOLEAN :
+ if (!_cups_strcasecmp(token, "true"))
+ ippAddBoolean(col, IPP_TAG_ZERO, attr, 1);
+ else
+ ippAddBoolean(col, IPP_TAG_ZERO, attr, (char)atoi(token));
+ break;
+
+ case IPP_TAG_INTEGER :
+ case IPP_TAG_ENUM :
+ ippAddInteger(col, IPP_TAG_ZERO, value, attr, atoi(token));
+ break;
+
+ case IPP_TAG_RESOLUTION :
+ {
+ int xres, /* X resolution */
+ yres; /* Y resolution */
+ char units[6]; /* Units */
+
+ if (sscanf(token, "%dx%d%5s", &xres, &yres, units) != 3 ||
+ (_cups_strcasecmp(units, "dpi") &&
+ _cups_strcasecmp(units, "dpc") &&
+ _cups_strcasecmp(units, "dpcm") &&
+ _cups_strcasecmp(units, "other")))
+ {
+ fprintf(stderr, "ippserver: Bad resolution value \"%s\" on line %d of \"%s\".\n", token, *linenum, filename);
+ goto col_error;
+ }
+
+ if (!_cups_strcasecmp(units, "dpi"))
+ ippAddResolution(col, IPP_TAG_ZERO, attr, IPP_RES_PER_INCH, xres, yres);
+ else if (!_cups_strcasecmp(units, "dpc") ||
+ !_cups_strcasecmp(units, "dpcm"))
+ ippAddResolution(col, IPP_TAG_ZERO, attr, IPP_RES_PER_CM, xres, yres);
+ else
+ ippAddResolution(col, IPP_TAG_ZERO, attr, (ipp_res_t)0, xres, yres);
+ }
+ break;
+
+ case IPP_TAG_RANGE :
+ {
+ int lowers[4], /* Lower value */
+ uppers[4], /* Upper values */
+ num_vals; /* Number of values */
+
+
+ num_vals = sscanf(token, "%d-%d,%d-%d,%d-%d,%d-%d",
+ lowers + 0, uppers + 0,
+ lowers + 1, uppers + 1,
+ lowers + 2, uppers + 2,
+ lowers + 3, uppers + 3);
+
+ if ((num_vals & 1) || num_vals == 0)
+ {
+ fprintf(stderr, "ippserver: Bad rangeOfInteger value \"%s\" on line %d of \"%s\".\n", token, *linenum, filename);
+ goto col_error;
+ }
+
+ ippAddRanges(col, IPP_TAG_ZERO, attr, num_vals / 2, lowers,
+ uppers);
+ }
+ break;
+
+ case IPP_TAG_BEGIN_COLLECTION :
+ if (!strcmp(token, "{"))
+ {
+ ipp_t *subcol = get_collection(fp, filename, linenum);
+ /* Collection value */
+
+ if (subcol)
+ {
+ lastcol = ippAddCollection(col, IPP_TAG_ZERO, attr, subcol);
+ ippDelete(subcol);
+ }
+ else
+ goto col_error;
+ }
+ else
+ {
+ fprintf(stderr, "ippserver: Bad collection value on line %d of \"%s\".\n", *linenum, filename);
+ goto col_error;
+ }
+ break;
+ case IPP_TAG_STRING :
+ ippAddOctetString(col, IPP_TAG_ZERO, attr, token, (int)strlen(token));
+ break;
+
+ default :
+ if (!strchr(token, ','))
+ ippAddString(col, IPP_TAG_ZERO, value, attr, NULL, token);
+ else
+ {
+ /*
+ * Multiple string values...
+ */
+
+ int num_values; /* Number of values */
+ char *values[100], /* Values */
+ *ptr; /* Pointer to next value */
+
+
+ values[0] = token;
+ num_values = 1;
+
+ for (ptr = strchr(token, ','); ptr; ptr = strchr(ptr, ','))
+ {
+ *ptr++ = '\0';
+ values[num_values] = ptr;
+ num_values ++;
+ if (num_values >= (int)(sizeof(values) / sizeof(values[0])))
+ break;
+ }
+
+ ippAddStrings(col, IPP_TAG_ZERO, value, attr, num_values,
+ NULL, (const char **)values);
+ }
+ break;
+ }
+ }
+ }
+
+ return (col);
+
+ /*
+ * If we get here there was a parse error; free memory and return.
+ */
+
+ col_error:
+
+ ippDelete(col);
+
+ return (NULL);
+}
+
+
+/*
+ * 'get_token()' - Get a token from a file.
+ */
+
+static char * /* O - Token from file or NULL on EOF */
+get_token(FILE *fp, /* I - File to read from */
+ char *buf, /* I - Buffer to read into */
+ int buflen, /* I - Length of buffer */
+ int *linenum) /* IO - Current line number */
+{
+ int ch, /* Character from file */
+ quote; /* Quoting character */
+ char *bufptr, /* Pointer into buffer */
+ *bufend; /* End of buffer */
+
+
+ for (;;)
+ {
+ /*
+ * Skip whitespace...
+ */
+
+ while (isspace(ch = getc(fp)))
+ {
+ if (ch == '\n')
+ (*linenum) ++;
+ }
+
+ /*
+ * Read a token...
+ */
+
+ if (ch == EOF)
+ return (NULL);
+ else if (ch == '\'' || ch == '\"')
+ {
+ /*
+ * Quoted text or regular expression...
+ */
+
+ quote = ch;
+ bufptr = buf;
+ bufend = buf + buflen - 1;
+
+ while ((ch = getc(fp)) != EOF)
+ {
+ if (ch == '\\')
+ {
+ /*
+ * Escape next character...
+ */
+
+ if (bufptr < bufend)
+ *bufptr++ = (char)ch;
+
+ if ((ch = getc(fp)) != EOF && bufptr < bufend)
+ *bufptr++ = (char)ch;
+ }
+ else if (ch == quote)
+ break;
+ else if (bufptr < bufend)
+ *bufptr++ = (char)ch;
+ }
+
+ *bufptr = '\0';
+
+ return (buf);
+ }
+ else if (ch == '#')
+ {
+ /*
+ * Comment...
+ */
+
+ while ((ch = getc(fp)) != EOF)
+ if (ch == '\n')
+ break;
+
+ (*linenum) ++;
+ }
+ else if (ch == '{' || ch == '}' || ch == ',')
+ {
+ buf[0] = (char)ch;
+ buf[1] = '\0';
+
+ return (buf);
+ }
+ else
+ {
+ /*
+ * Whitespace delimited text...
+ */
+
+ ungetc(ch, fp);
+
+ bufptr = buf;
+ bufend = buf + buflen - 1;
+
+ while ((ch = getc(fp)) != EOF)
+ if (isspace(ch) || ch == '#')
+ break;
+ else if (bufptr < bufend)
+ *bufptr++ = (char)ch;
+
+ if (ch == '#')
+ ungetc(ch, fp);
+ else if (ch == '\n')
+ (*linenum) ++;
+
+ *bufptr = '\0';
+
+ return (buf);
+ }
+ }
+}
+
+
/*
* 'html_escape()' - Write a HTML-safe string.
*/
"printer-state-reasons", NULL, "none");
else
{
- int num_reasons = 0;/* Number of reasons */
- const char *reasons[32]; /* Reason strings */
-
- if (printer->state_reasons & _IPP_PREASON_OTHER)
- reasons[num_reasons ++] = "other";
- if (printer->state_reasons & _IPP_PREASON_COVER_OPEN)
- reasons[num_reasons ++] = "cover-open";
- if (printer->state_reasons & _IPP_PREASON_INPUT_TRAY_MISSING)
- reasons[num_reasons ++] = "input-tray-missing";
- if (printer->state_reasons & _IPP_PREASON_MARKER_SUPPLY_EMPTY)
- reasons[num_reasons ++] = "marker-supply-empty-warning";
- if (printer->state_reasons & _IPP_PREASON_MARKER_SUPPLY_LOW)
- reasons[num_reasons ++] = "marker-supply-low-report";
- if (printer->state_reasons & _IPP_PREASON_MARKER_WASTE_ALMOST_FULL)
- reasons[num_reasons ++] = "marker-waste-almost-full-report";
- if (printer->state_reasons & _IPP_PREASON_MARKER_WASTE_FULL)
- reasons[num_reasons ++] = "marker-waste-full-warning";
- if (printer->state_reasons & _IPP_PREASON_MEDIA_EMPTY)
- reasons[num_reasons ++] = "media-empty-warning";
- if (printer->state_reasons & _IPP_PREASON_MEDIA_JAM)
- reasons[num_reasons ++] = "media-jam-warning";
- if (printer->state_reasons & _IPP_PREASON_MEDIA_LOW)
- reasons[num_reasons ++] = "media-low-report";
- if (printer->state_reasons & _IPP_PREASON_MEDIA_NEEDED)
- reasons[num_reasons ++] = "media-needed-report";
- if (printer->state_reasons & _IPP_PREASON_MOVING_TO_PAUSED)
- reasons[num_reasons ++] = "moving-to-paused";
- if (printer->state_reasons & _IPP_PREASON_PAUSED)
- reasons[num_reasons ++] = "paused";
- if (printer->state_reasons & _IPP_PREASON_SPOOL_AREA_FULL)
- reasons[num_reasons ++] = "spool-area-full";
- if (printer->state_reasons & _IPP_PREASON_TONER_EMPTY)
- reasons[num_reasons ++] = "toner-empty-warning";
- if (printer->state_reasons & _IPP_PREASON_TONER_LOW)
- reasons[num_reasons ++] = "toner-low-report";
-
- ippAddStrings(client->response, IPP_TAG_PRINTER,
- IPP_CONST_TAG(IPP_TAG_KEYWORD),
- "printer-state-reasons", num_reasons, NULL, reasons);
+ ipp_attribute_t *attr = NULL; /* printer-state-reasons */
+ _ipp_preason_t bit; /* Reason bit */
+ int i; /* Looping var */
+ char reason[32]; /* Reason string */
+
+ for (i = 0, bit = 1; i < (int)(sizeof(_ipp_preason_strings) / sizeof(_ipp_preason_strings[0])); i ++, bit *= 2)
+ {
+ if (printer->state_reasons & bit)
+ {
+ snprintf(reason, sizeof(reason), "%s-%s", _ipp_preason_strings[0], printer->state == IPP_PSTATE_IDLE ? "report" : printer->state == IPP_PSTATE_PROCESSING ? "warning" : "error");
+ if (attr)
+ ippSetString(client->response, &attr, ippGetCount(attr), reason);
+ else
+ attr = ippAddString(client->response, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "printer-state-reasons", NULL, reason);
+ }
+ }
}
}
ipp_identify_printer(
_ipp_client_t *client) /* I - Client */
{
- /* TODO: Do something */
+ ipp_attribute_t *actions, /* identify-actions */
+ *message; /* message */
+
+
+ actions = ippFindAttribute(client->request, "identify-actions", IPP_TAG_KEYWORD);
+ message = ippFindAttribute(client->request, "message", IPP_TAG_TEXT);
+
+ if (!actions || ippContainsString(actions, "sound"))
+ {
+ putchar(0x07);
+ fflush(stdout);
+ }
+
+ if (ippContainsString(actions, "display"))
+ printf("IDENTIFY from %s: %s\n", client->hostname, message ? ippGetString(message, 0, NULL) : "No message supplied");
respond_ipp(client, IPP_STATUS_OK, NULL);
}
}
+/*
+ * 'load_attributes()' - Load printer attributes from a file.
+ *
+ * Syntax is based on ipptool format:
+ *
+ * ATTR value-tag name value
+ */
+
+static void
+load_attributes(const char *filename, /* I - File to load */
+ ipp_t *attrs) /* I - Printer attributes */
+{
+ int linenum = 0; /* Current line number */
+ FILE *fp = NULL; /* Test file */
+ char attr[128], /* Attribute name */
+ token[1024], /* Token from file */
+ *tokenptr; /* Pointer into token */
+ ipp_tag_t value; /* Current value type */
+ ipp_attribute_t *attrptr, /* Attribute pointer */
+ *lastcol = NULL; /* Last collection attribute */
+
+
+ if ((fp = fopen(filename, "r")) == NULL)
+ {
+ fprintf(stderr, "ippserver: Unable to open \"%s\": %s\n", filename, strerror(errno));
+ exit(1);
+ }
+
+ while (get_token(fp, token, sizeof(token), &linenum) != NULL)
+ {
+ if (!_cups_strcasecmp(token, "ATTR"))
+ {
+ /*
+ * Attribute...
+ */
+
+ if (!get_token(fp, token, sizeof(token), &linenum))
+ {
+ fprintf(stderr, "ippserver: Missing ATTR value tag on line %d of \"%s\".\n", linenum, filename);
+ exit(1);
+ }
+
+ if ((value = ippTagValue(token)) == IPP_TAG_ZERO)
+ {
+ fprintf(stderr, "ippserver: Bad ATTR value tag \"%s\" on line %d of \"%s\".\n", token, linenum, filename);
+ exit(1);
+ }
+
+ if (!get_token(fp, attr, sizeof(attr), &linenum))
+ {
+ fprintf(stderr, "ippserver: Missing ATTR name on line %d of \"%s\".\n", linenum, filename);
+ exit(1);
+ }
+
+ if (!get_token(fp, token, sizeof(token), &linenum))
+ {
+ fprintf(stderr, "ippserver: Missing ATTR value on line %d of \"%s\".\n", linenum, filename);
+ exit(1);
+ }
+
+ attrptr = NULL;
+
+ switch (value)
+ {
+ case IPP_TAG_BOOLEAN :
+ if (!_cups_strcasecmp(token, "true"))
+ attrptr = ippAddBoolean(attrs, IPP_TAG_PRINTER, attr, 1);
+ else
+ attrptr = ippAddBoolean(attrs, IPP_TAG_PRINTER, attr, (char)atoi(token));
+ break;
+
+ case IPP_TAG_INTEGER :
+ case IPP_TAG_ENUM :
+ if (!strchr(token, ','))
+ attrptr = ippAddInteger(attrs, IPP_TAG_PRINTER, value, attr, (int)strtol(token, &tokenptr, 0));
+ else
+ {
+ int values[100], /* Values */
+ num_values = 1; /* Number of values */
+
+ values[0] = (int)strtol(token, &tokenptr, 10);
+ while (tokenptr && *tokenptr &&
+ num_values < (int)(sizeof(values) / sizeof(values[0])))
+ {
+ if (*tokenptr == ',')
+ tokenptr ++;
+ else if (!isdigit(*tokenptr & 255) && *tokenptr != '-')
+ break;
+
+ values[num_values] = (int)strtol(tokenptr, &tokenptr, 0);
+ num_values ++;
+ }
+
+ attrptr = ippAddIntegers(attrs, IPP_TAG_PRINTER, value, attr, num_values, values);
+ }
+
+ if (!tokenptr || *tokenptr)
+ {
+ fprintf(stderr, "ippserver: Bad %s value \"%s\" on line %d of \"%s\".\n", ippTagString(value), token, linenum, filename);
+ exit(1);
+ }
+ break;
+
+ case IPP_TAG_RESOLUTION :
+ {
+ int xres, /* X resolution */
+ yres; /* Y resolution */
+ ipp_res_t units; /* Units */
+ char *start, /* Start of value */
+ *ptr, /* Pointer into value */
+ *next = NULL; /* Next value */
+
+ for (start = token; start; start = next)
+ {
+ xres = yres = (int)strtol(start, (char **)&ptr, 10);
+ if (ptr > start && xres > 0)
+ {
+ if (*ptr == 'x')
+ yres = (int)strtol(ptr + 1, (char **)&ptr, 10);
+ }
+
+ if (ptr && (next = strchr(ptr, ',')) != NULL)
+ *next++ = '\0';
+
+ if (ptr <= start || xres <= 0 || yres <= 0 || !ptr ||
+ (_cups_strcasecmp(ptr, "dpi") &&
+ _cups_strcasecmp(ptr, "dpc") &&
+ _cups_strcasecmp(ptr, "dpcm") &&
+ _cups_strcasecmp(ptr, "other")))
+ {
+ fprintf(stderr, "ippserver: Bad resolution value \"%s\" on line %d of \"%s\".\n", token, linenum, filename);
+ exit(1);
+ }
+
+ if (!_cups_strcasecmp(ptr, "dpc") || !_cups_strcasecmp(ptr, "dpcm"))
+ units = IPP_RES_PER_CM;
+ else
+ units = IPP_RES_PER_INCH;
+
+ if (attrptr)
+ ippSetResolution(attrs, &attrptr, ippGetCount(attrptr), units, xres, yres);
+ else
+ attrptr = ippAddResolution(attrs, IPP_TAG_PRINTER, attr, units, xres, yres);
+ }
+ }
+ break;
+
+ case IPP_TAG_RANGE :
+ {
+ int lowers[4], /* Lower value */
+ uppers[4], /* Upper values */
+ num_vals; /* Number of values */
+
+
+ num_vals = sscanf(token, "%d-%d,%d-%d,%d-%d,%d-%d",
+ lowers + 0, uppers + 0,
+ lowers + 1, uppers + 1,
+ lowers + 2, uppers + 2,
+ lowers + 3, uppers + 3);
+
+ if ((num_vals & 1) || num_vals == 0)
+ {
+ fprintf(stderr, "ippserver: Bad rangeOfInteger value \"%s\" on line %d of \"%s\".", token, linenum, filename);
+ exit(1);
+ }
+
+ attrptr = ippAddRanges(attrs, IPP_TAG_PRINTER, attr, num_vals / 2, lowers,
+ uppers);
+ }
+ break;
+
+ case IPP_TAG_BEGIN_COLLECTION :
+ if (!strcmp(token, "{"))
+ {
+ ipp_t *col = get_collection(fp, filename, &linenum);
+ /* Collection value */
+
+ if (col)
+ {
+ attrptr = lastcol = ippAddCollection(attrs, IPP_TAG_PRINTER, attr, col);
+ ippDelete(col);
+ }
+ else
+ exit(1);
+ }
+ else
+ {
+ fprintf(stderr, "ippserver: Bad ATTR collection value on line %d of \"%s\".\n", linenum, filename);
+ exit(1);
+ }
+
+ do
+ {
+ ipp_t *col; /* Collection value */
+ long pos = ftell(fp); /* Save position of file */
+
+ if (!get_token(fp, token, sizeof(token), &linenum))
+ break;
+
+ if (strcmp(token, ","))
+ {
+ fseek(fp, pos, SEEK_SET);
+ break;
+ }
+
+ if (!get_token(fp, token, sizeof(token), &linenum) || strcmp(token, "{"))
+ {
+ fprintf(stderr, "ippserver: Unexpected \"%s\" on line %d of \"%s\".\n", token, linenum, filename);
+ exit(1);
+ }
+
+ if ((col = get_collection(fp, filename, &linenum)) == NULL)
+ break;
+
+ ippSetCollection(attrs, &attrptr, ippGetCount(attrptr), col);
+ lastcol = attrptr;
+ }
+ while (!strcmp(token, "{"));
+ break;
+
+ case IPP_TAG_STRING :
+ attrptr = ippAddOctetString(attrs, IPP_TAG_PRINTER, attr, token, (int)strlen(token));
+ break;
+
+ default :
+ fprintf(stderr, "ippserver: Unsupported ATTR value tag %s on line %d of \"%s\".\n", ippTagString(value), linenum, filename);
+ exit(1);
+
+ case IPP_TAG_TEXTLANG :
+ case IPP_TAG_NAMELANG :
+ case IPP_TAG_TEXT :
+ case IPP_TAG_NAME :
+ case IPP_TAG_KEYWORD :
+ case IPP_TAG_URI :
+ case IPP_TAG_URISCHEME :
+ case IPP_TAG_CHARSET :
+ case IPP_TAG_LANGUAGE :
+ case IPP_TAG_MIMETYPE :
+ if (!strchr(token, ','))
+ attrptr = ippAddString(attrs, IPP_TAG_PRINTER, value, attr, NULL, token);
+ else
+ {
+ /*
+ * Multiple string values...
+ */
+
+ int num_values; /* Number of values */
+ char *values[100], /* Values */
+ *ptr; /* Pointer to next value */
+
+
+ values[0] = token;
+ num_values = 1;
+
+ for (ptr = strchr(token, ','); ptr; ptr = strchr(ptr, ','))
+ {
+ if (ptr > token && ptr[-1] == '\\')
+ _cups_strcpy(ptr - 1, ptr);
+ else
+ {
+ *ptr++ = '\0';
+ values[num_values] = ptr;
+ num_values ++;
+ if (num_values >= (int)(sizeof(values) / sizeof(values[0])))
+ break;
+ }
+ }
+
+ attrptr = ippAddStrings(attrs, IPP_TAG_PRINTER, value, attr, num_values, NULL, (const char **)values);
+ }
+ break;
+ }
+
+ if (!attrptr)
+ {
+ fprintf(stderr, "ippserver: Unable to add attribute on line %d of \"%s\": %s\n", linenum, filename, cupsLastErrorString());
+ exit(1);
+ }
+ }
+ else
+ {
+ fprintf(stderr, "ippserver: Unknown directive \"%s\" on line %d of \"%s\".\n", token, linenum, filename);
+ exit(1);
+ }
+ }
+
+ fclose(fp);
+}
+
+
/*
* 'parse_options()' - Parse URL options into CUPS options.
*
}
+/*
+ * 'process_attr_message()' - Process an ATTR: message from a command.
+ */
+
+static void
+process_attr_message(
+ _ipp_job_t *job, /* I - Job */
+ char *message) /* I - Message */
+{
+ (void)job;
+ (void)message;
+}
+
+
/*
* 'process_client()' - Process client requests on a thread.
*/
ipp_attribute_t *attr; /* Job attribute */
char val[1280], /* IPP_NAME=value */
*valptr; /* Pointer into string */
+#ifndef WIN32
+ int mypipe[2]; /* Pipe for stderr */
+ char line[2048], /* Line from stderr */
+ *ptr, /* Pointer into line */
+ *endptr; /* End of line */
+ ssize_t bytes; /* Bytes read */
+#endif /* !WIN32 */
fprintf(stderr, "Running command \"%s %s\".\n", job->printer->command,
job->filename);
#ifdef WIN32
status = _spawnvpe(_P_WAIT, job->printer->command, myargv, myenvp);
+
#else
+ if (pipe(mypipe))
+ {
+ perror("Unable to create pipe for stderr");
+ mypipe[0] = mypipe[1] = -1;
+ }
+
if ((pid = fork()) == 0)
{
/*
* Child comes here...
*/
+ close(2);
+ dup2(mypipe[1], 2);
+ close(mypipe[0]);
+ close(mypipe[1]);
+
execve(job->printer->command, myargv, myenvp);
exit(errno);
}
perror("Unable to start job processing command");
status = -1;
+ close(mypipe[0]);
+ close(mypipe[1]);
+
/*
* Free memory used for environment...
*/
while (myenvc > 0)
free(myenvp[-- myenvc]);
+
+ /*
+ * If the pipe exists, read from it until EOF...
+ */
+
+ if (mypipe[0] >= 0)
+ {
+ close(mypipe[1]);
+
+ endptr = line;
+ while ((bytes = read(mypipe[0], endptr, sizeof(line) - (size_t)(endptr - line) - 1)) > 0)
+ {
+ endptr += bytes;
+ *endptr = '\0';
+
+ while ((ptr = strchr(line, '\n')) != NULL)
+ {
+ *ptr++ = '\0';
+
+ if (!strncmp(line, "STATE:", 6))
+ {
+ /*
+ * Process printer-state-reasons keywords.
+ */
+
+ process_state_message(job, line);
+ }
+ else if (!strncmp(line, "ATTR:", 5))
+ {
+ /*
+ * Process printer attribute update.
+ */
+
+ process_attr_message(job, line);
+ }
+ else if (Verbosity > 1)
+ fprintf(stderr, "%s: %s\n", job->printer->command, line);
+
+ bytes = ptr - line;
+ if (ptr < endptr)
+ memmove(line, ptr, (size_t)(endptr - ptr));
+ endptr -= bytes;
+ *endptr = '\0';
+ }
+ }
+
+ close(mypipe[0]);
+ }
+
/*
* Wait for child to complete...
*/
}
+/*
+ * 'process_state_message()' - Process a STATE: message from a command.
+ */
+
+static void
+process_state_message(
+ _ipp_job_t *job, /* I - Job */
+ char *message) /* I - Message */
+{
+ int i; /* Looping var */
+ _ipp_preason_t state_reasons, /* printer-state-reasons values */
+ bit; /* Current reason bit */
+ char *ptr, /* Pointer into message */
+ *next; /* Next keyword in message */
+ int remove; /* Non-zero if we are removing keywords */
+
+
+ /*
+ * Skip leading "STATE:" and any whitespace...
+ */
+
+ for (message += 6; *message; message ++)
+ if (*message != ' ' && *message != '\t')
+ break;
+
+ /*
+ * Support the following forms of message:
+ *
+ * "keyword[,keyword,...]" to set the printer-state-reasons value(s).
+ *
+ * "-keyword[,keyword,...]" to remove keywords.
+ *
+ * "+keyword[,keyword,...]" to add keywords.
+ *
+ * Keywords may or may not have a suffix (-report, -warning, -error) per
+ * RFC 2911.
+ */
+
+ if (*message == '-')
+ {
+ remove = 1;
+ state_reasons = job->printer->state_reasons;
+ message ++;
+ }
+ else if (*message == '+')
+ {
+ remove = 0;
+ state_reasons = job->printer->state_reasons;
+ message ++;
+ }
+ else
+ {
+ remove = 0;
+ state_reasons = _IPP_PREASON_NONE;
+ }
+
+ while (*message)
+ {
+ if ((next = strchr(message, ',')) != NULL)
+ *next++ = '\0';
+
+ if ((ptr = strstr(message, "-error")) != NULL)
+ *ptr = '\0';
+ else if ((ptr = strstr(message, "-report")) != NULL)
+ *ptr = '\0';
+ else if ((ptr = strstr(message, "-warning")) != NULL)
+ *ptr = '\0';
+
+ for (i = 0, bit = 1; i < (int)(sizeof(_ipp_preason_strings) / sizeof(_ipp_preason_strings[0])); i ++, bit *= 2)
+ {
+ if (!strcmp(message, _ipp_preason_strings[i]))
+ {
+ if (remove)
+ state_reasons &= ~bit;
+ else
+ state_reasons |= bit;
+ }
+ }
+
+ if (next)
+ message = next;
+ else
+ break;
+ }
+
+ job->printer->state_reasons = state_reasons;
+}
+
+
/*
* 'register_printer()' - Register a printer object via Bonjour.
*/
{
if (!status)
{
- puts(CUPS_SVERSION " - Copyright 2010-2014 by Apple Inc. All rights "
+ puts(CUPS_SVERSION " - Copyright 2010-2015 by Apple Inc. All rights "
"reserved.");
puts("");
}
puts("-2 Supports 2-sided printing (default=1-sided)");
puts("-M manufacturer Manufacturer name (default=Test)");
puts("-P PIN printing mode");
+ puts("-a attributes-file Load printer attributes from file");
puts("-c command Run command for every print job");
printf("-d spool-directory Spool directory "
"(default=/tmp/ippserver.%d)\n", (int)getpid());
_ipp_client_t *client) /* I - Client */
{
int i, /* Looping var */
+ count, /* Number of values */
valid = 1; /* Valid attributes? */
ipp_attribute_t *attr, /* Current attribute */
*supported; /* xxx-supported attribute */
}
else
{
- for (i = 0;
- i < (int)(sizeof(media_supported) / sizeof(media_supported[0]));
- i ++)
- if (!strcmp(ippGetString(attr, 0, NULL), media_supported[i]))
- break;
+ supported = ippFindAttribute(client->printer->attrs, "media-supported", IPP_TAG_KEYWORD);
- if (i >= (int)(sizeof(media_supported) / sizeof(media_supported[0])))
+ if (!ippContainsString(supported, ippGetString(attr, 0, NULL)))
{
respond_unsupported(client, attr);
valid = 0;
if ((attr = ippFindAttribute(client->request, "media-col", IPP_TAG_ZERO)) != NULL)
{
+ ipp_t *col, /* media-col collection */
+ *size; /* media-size collection */
+ ipp_attribute_t *member, /* Member attribute */
+ *x_dim, /* x-dimension */
+ *y_dim; /* y-dimension */
+ int x_value, /* y-dimension value */
+ y_value; /* x-dimension value */
+
if (ippGetCount(attr) != 1 ||
ippGetValueTag(attr) != IPP_TAG_BEGIN_COLLECTION)
{
respond_unsupported(client, attr);
valid = 0;
}
- /* TODO: check for valid media-col */
+
+ col = ippGetCollection(attr, 0);
+
+ if ((member = ippFindAttribute(col, "media-size-name", IPP_TAG_ZERO)) != NULL)
+ {
+ if (ippGetCount(member) != 1 ||
+ (ippGetValueTag(member) != IPP_TAG_NAME &&
+ ippGetValueTag(member) != IPP_TAG_NAMELANG &&
+ ippGetValueTag(member) != IPP_TAG_KEYWORD))
+ {
+ respond_unsupported(client, attr);
+ valid = 0;
+ }
+ else
+ {
+ supported = ippFindAttribute(client->printer->attrs, "media-supported", IPP_TAG_KEYWORD);
+
+ if (!ippContainsString(supported, ippGetString(member, 0, NULL)))
+ {
+ respond_unsupported(client, attr);
+ valid = 0;
+ }
+ }
+ }
+ else if ((member = ippFindAttribute(col, "media-size", IPP_TAG_BEGIN_COLLECTION)) != NULL)
+ {
+ if (ippGetCount(member) != 1)
+ {
+ respond_unsupported(client, attr);
+ valid = 0;
+ }
+ else
+ {
+ size = ippGetCollection(member, 0);
+
+ if ((x_dim = ippFindAttribute(size, "x-dimension", IPP_TAG_INTEGER)) == NULL || ippGetCount(x_dim) != 1 ||
+ (y_dim = ippFindAttribute(size, "y-dimension", IPP_TAG_INTEGER)) == NULL || ippGetCount(y_dim) != 1)
+ {
+ respond_unsupported(client, attr);
+ valid = 0;
+ }
+ else
+ {
+ x_value = ippGetInteger(x_dim, 0);
+ y_value = ippGetInteger(y_dim, 0);
+ supported = ippFindAttribute(client->printer->attrs, "media-size-supported", IPP_TAG_BEGIN_COLLECTION);
+ count = ippGetCount(supported);
+
+ for (i = 0; i < count ; i ++)
+ {
+ size = ippGetCollection(supported, i);
+ x_dim = ippFindAttribute(size, "x-dimension", IPP_TAG_ZERO);
+ y_dim = ippFindAttribute(size, "y-dimension", IPP_TAG_ZERO);
+
+ if (ippContainsInteger(x_dim, x_value) && ippContainsInteger(y_dim, y_value))
+ break;
+ }
+
+ if (i >= count)
+ {
+ respond_unsupported(client, attr);
+ valid = 0;
+ }
+ }
+ }
+ }
}
if ((attr = ippFindAttribute(client->request, "multiple-document-handling", IPP_TAG_ZERO)) != NULL)
}
else
{
- int count, /* Number of supported values */
- xdpi, /* Horizontal resolution for job template attribute */
+ int xdpi, /* Horizontal resolution for job template attribute */
ydpi, /* Vertical resolution for job template attribute */
sydpi; /* Vertical resolution for supported value */
ipp_res_t units, /* Units for job template attribute */
/*
- * End of "$Id: ippserver.c 12598 2015-05-05 18:57:57Z msweet $".
+ * End of "$Id: ippserver.c 12840 2015-08-09 02:10:23Z msweet $".
*/
#!/bin/sh
#
-# "$Id: run-stp-tests.sh 12820 2015-07-31 14:12:25Z msweet $"
+# "$Id: run-stp-tests.sh 12853 2015-08-28 13:38:46Z msweet $"
#
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
pjobs=10
pprinters=0
loglevel="debug2"
+ testtype="1"
;;
esac
# Warning log messages
count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | wc -l | awk '{print $1}'`
if test $count != 8; then
- echo "FAIL: $count warning messages, expected 18."
+ echo "FAIL: $count warning messages, expected 8."
$GREP '^W ' $BASE/log/error_log
- echo "<P>FAIL: $count warning messages, expected 18.</P>" >>$strfile
+ echo "<P>FAIL: $count warning messages, expected 8.</P>" >>$strfile
echo "<PRE>" >>$strfile
$GREP '^W ' $BASE/log/error_log | sed -e '1,$s/&/&/g' -e '1,$s/</</g' >>$strfile
echo "</PRE>" >>$strfile
fi
#
-# End of "$Id: run-stp-tests.sh 12820 2015-07-31 14:12:25Z msweet $"
+# End of "$Id: run-stp-tests.sh 12853 2015-08-28 13:38:46Z msweet $"
#
/*
- * "$Id: config.h 12763 2015-06-24 20:12:22Z msweet $"
+ * "$Id: config.h 12831 2015-08-05 14:24:32Z msweet $"
*
* Configuration file for CUPS on Windows.
*
* Version of software...
*/
-#define CUPS_SVERSION "CUPS v2.1b2"
-#define CUPS_MINIMAL "CUPS/2.1b2"
+#define CUPS_SVERSION "CUPS v2.1.0"
+#define CUPS_MINIMAL "CUPS/2.1.0"
/*
#endif /* !_CUPS_CONFIG_H_ */
/*
- * End of "$Id: config.h 12763 2015-06-24 20:12:22Z msweet $".
+ * End of "$Id: config.h 12831 2015-08-05 14:24:32Z msweet $".
*/
/*
- * "$Id: config.h 12763 2015-06-24 20:12:22Z msweet $"
+ * "$Id: config.h 12831 2015-08-05 14:24:32Z msweet $"
*
* Configuration file for CUPS and Xcode.
*
* Version of software...
*/
-#define CUPS_SVERSION "CUPS v2.1b2"
-#define CUPS_MINIMAL "CUPS/2.1b2"
+#define CUPS_SVERSION "CUPS v2.1.0"
+#define CUPS_MINIMAL "CUPS/2.1.0"
/*
#endif /* !_CUPS_CONFIG_H_ */
/*
- * End of "$Id: config.h 12763 2015-06-24 20:12:22Z msweet $".
+ * End of "$Id: config.h 12831 2015-08-05 14:24:32Z msweet $".
*/