summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2019-03-18 17:40:25 +0100
committerDidier Raboud <odyx@debian.org>2019-03-18 17:40:25 +0100
commit033f39b092ecf7882cdae9dce6bfe36f003cfa3f (patch)
tree29fdf1fda435bd4e56e2f0f9d5eb63b02eb9f362
parent0030fffefd69db302f302c3494a08f192609b2a2 (diff)
New upstream version 1.22.2
-rw-r--r--INSTALL2
-rw-r--r--NEWS30
-rw-r--r--README2
-rwxr-xr-xconfigure33
-rw-r--r--configure.ac2
-rw-r--r--cupsfilters/image.c27
-rw-r--r--cupsfilters/image.h3
-rw-r--r--filter/imagetopdf.c131
-rw-r--r--filter/imagetoraster.c128
-rw-r--r--filter/pdftopdf/pdftopdf.cc24
-rw-r--r--filter/pdftopdf/pdftopdf_processor.cc31
-rw-r--r--filter/pdftopdf/pdftopdf_processor.h9
-rw-r--r--filter/pdftopdf/qpdf_pdftopdf_processor.cc83
-rw-r--r--filter/pdftopdf/qpdf_pdftopdf_processor.h3
-rw-r--r--ltmain.sh375
-rw-r--r--m4/libtool.m49
-rw-r--r--utils/cups-browsed.c209
-rw-r--r--utils/driverless.122
18 files changed, 766 insertions, 357 deletions
diff --git a/INSTALL b/INSTALL
index 8ba14e7d9..ce9ebb805 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-INSTALL - OpenPrinting CUPS Filters v1.22.1 - 2019-02-15
+INSTALL - OpenPrinting CUPS Filters v1.22.2 - 2019-03-15
--------------------------------------------------------
This file describes how to compile and install OpenPrinting CUPS
diff --git a/NEWS b/NEWS
index 827902ba5..8863c3aae 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,34 @@
-NEWS - OpenPrinting CUPS Filters v1.22.1 - 2019-02-15
+NEWS - OpenPrinting CUPS Filters v1.22.2 - 2019-03-15
-----------------------------------------------------
+CHANGES IN V1.22.2
+
+ - cups-browsed: Let distribution of jobs sent to queues with
+ "implicitclass" backend (usually clusters) be done by a
+ "job-state" CUPS notification and not by
+ "printer-state-changed" any more. The "job-state"
+ notification already contains the job ID. Before we had to
+ poll the job ID from CUPS via IPP which was sometimes
+ unreliable (Issue #97).
+ - imagetopdf, imagetoraster, pdftopdf, libcupsfilters: Added
+ new page scaling options: "fill" scales the input page
+ (typically a photo) so that the output page (typically with
+ different aspect ratio) gets completely filled, aloowing for
+ some content of the input page getting lost. "crop-to-fit"
+ allows for easy printing of documents on slightly different
+ output page sizes (A4 <-> Letter) maintaining the size and
+ centering and cropping into the destination page. Thanks to
+ Dheeraj Yadav (dhirajyadav135 at gmail dot com) for the
+ patch (Pull request #92).
+ - cups-browsed: Do not do IPP request for printer-is-shared
+ option for remote cups queues with CUPS 2.2.x and newer
+ (Pull request #91).
+ - cups-browsed: Fix crash bug when reading "Cluster"
+ directive from configuration file (Issue #94).
+ - driverless: Updated man page as now also Mopria and
+ Wi-Fi Direct printers are supported. Mentioned also
+ ippusbxd.
+
CHANGES IN V1.22.1
- braille: Use sort command with LC_ALL=C for reproducibility
diff --git a/README b/README
index 1e469a5a3..d840e5180 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README - OpenPrinting CUPS Filters v1.22.1 - 2019-02-15
+README - OpenPrinting CUPS Filters v1.22.2 - 2019-03-15
-------------------------------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
diff --git a/configure b/configure
index fcf8c945a..053f475eb 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for cups-filters 1.22.1.
+# Generated by GNU Autoconf 2.69 for cups-filters 1.22.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cups-filters'
PACKAGE_TARNAME='cups-filters'
-PACKAGE_VERSION='1.22.1'
-PACKAGE_STRING='cups-filters 1.22.1'
+PACKAGE_VERSION='1.22.2'
+PACKAGE_STRING='cups-filters 1.22.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1500,7 +1500,7 @@ if test "$ac_init_help" = "long"; then
# 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-filters 1.22.1 to adapt to many kinds of systems.
+\`configure' configures cups-filters 1.22.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1571,7 +1571,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cups-filters 1.22.1:";;
+ short | recursive ) echo "Configuration of cups-filters 1.22.2:";;
esac
cat <<\_ACEOF
@@ -1801,7 +1801,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cups-filters configure 1.22.1
+cups-filters configure 1.22.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2439,7 +2439,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cups-filters $as_me 1.22.1, which was
+It was created by cups-filters $as_me 1.22.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3474,7 +3474,7 @@ fi
# Define the identity of the package.
PACKAGE='cups-filters'
- VERSION='1.22.1'
+ VERSION='1.22.2'
cat >>confdefs.h <<_ACEOF
@@ -8052,11 +8052,8 @@ _LT_EOF
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -10279,6 +10276,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@@ -21790,7 +21793,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cups-filters $as_me 1.22.1, which was
+This file was extended by cups-filters $as_me 1.22.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21856,7 +21859,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-cups-filters config.status 1.22.1
+cups-filters config.status 1.22.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 7a2563f6e..9503b42d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_PREREQ([2.65])
# ====================
m4_define([cups_filters_version_major],[1])
m4_define([cups_filters_version_minor],[22])
-m4_define([cups_filters_version_micro],[1])
+m4_define([cups_filters_version_micro],[2])
m4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro])
# =============
diff --git a/cupsfilters/image.c b/cupsfilters/image.c
index 736c7fea7..1eb12f2f1 100644
--- a/cupsfilters/image.c
+++ b/cupsfilters/image.c
@@ -807,3 +807,30 @@ get_tile(cups_image_t *img, /* I - Image */
return (ic->pixels + bpp * (y * CUPS_TILE_SIZE + x));
}
+/*
+ * Crop a image.
+ * (posw,posh): Position of left corner
+ * (width,height): width and height of required image.
+ */
+cups_image_t* cupsImageCrop(cups_image_t* img,int posw,int posh,int width,int height)
+{
+ int image_width = cupsImageGetWidth(img);
+ cups_image_t* temp=calloc(sizeof(cups_image_t),1);
+ cups_ib_t *pixels=(cups_ib_t*)malloc(img->xsize*cupsImageGetDepth(img));
+ temp->cachefile = -1;
+ temp->max_ics = CUPS_TILE_MINIMUM;
+ temp->colorspace=img->colorspace;
+ temp->xppi = img->xppi;
+ temp->yppi = img->yppi;
+ temp->num_ics = 0;
+ temp->first =temp->last = NULL;
+ temp->tiles = NULL;
+ temp->xsize = width;
+ temp->ysize = height;
+ for(int i=posh;i<min(cupsImageGetHeight(img),posh+height);i++){
+ cupsImageGetRow(img,posw,i,min(width,image_width-posw),pixels);
+ _cupsImagePutRow(temp,0,i-posh,min(width,image_width-posw),pixels);
+ }
+ free(pixels);
+ return temp;
+}
diff --git a/cupsfilters/image.h b/cupsfilters/image.h
index 3c7e48078..afeb74d20 100644
--- a/cupsfilters/image.h
+++ b/cupsfilters/image.h
@@ -112,7 +112,8 @@ extern void cupsImageWhiteToRGB(const cups_ib_t *in,
cups_ib_t *out, int count) _CUPS_API_1_2;
extern void cupsImageWhiteToWhite(const cups_ib_t *in,
cups_ib_t *out, int count) _CUPS_API_1_2;
-
+extern cups_image_t* cupsImageCrop(cups_image_t* img,int posw,
+ int posh,int width,int height);
# ifdef __cplusplus
}
diff --git a/filter/imagetopdf.c b/filter/imagetopdf.c
index 658e1131a..0bf2618dd 100644
--- a/filter/imagetopdf.c
+++ b/filter/imagetopdf.c
@@ -693,7 +693,8 @@ main(int argc, /* I - Number of command-line arguments */
int deviceReverse = 0;
ppd_attr_t *attr;
int pl,pr;
-
+ int fillprint = 0; /* print-scaling = fill */
+ int cropfit = 0; /* -o crop-to-fit = true */
/*
* Make sure status messages are not buffered...
*/
@@ -810,6 +811,29 @@ main(int argc, /* I - Number of command-line arguments */
}
}
+ /*
+ * print-scaling = fill functionality.
+ */
+ if((val = cupsGetOption("print-scaling",num_options,options)) !=0) {
+ if(!strcasecmp(val,"fill")) {
+ fillprint = 1;
+ }
+ }
+ else if((val = cupsGetOption("fill",num_options,options))!=0) {
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ fillprint = 1;
+ }
+ }
+ /*
+ * crop-to-fit
+ */
+ if((val = cupsGetOption("crop-to-fit",num_options,options))!= NULL){
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ cropfit=1;
+ }
+ }
if ((val = cupsGetOption("OutputOrder",num_options,options)) != 0) {
if (!strcasecmp(val, "Reverse")) {
@@ -973,6 +997,111 @@ main(int argc, /* I - Number of command-line arguments */
colorspace = ColorDevice ? CUPS_IMAGE_RGB_CMYK : CUPS_IMAGE_WHITE;
img = cupsImageOpen(filename, colorspace, CUPS_IMAGE_WHITE, sat, hue, NULL);
+ if(fillprint||cropfit)
+ {
+ float w = (float)cupsImageGetWidth(img);
+ float h = (float)cupsImageGetHeight(img);
+ float pw = PageRight-PageLeft;
+ float ph = PageTop-PageBottom;
+ int tempOrientation = Orientation;
+ char *val;
+ int flag = 3;
+ if((val = cupsGetOption("orientation-requested",num_options,options))!=NULL)
+ {
+ tempOrientation = atoi(val);
+ }
+ else if((val = cupsGetOption("landscape",num_options,options))!=NULL)
+ {
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ tempOrientation = 4;
+ }
+ }
+ if(tempOrientation>0)
+ {
+ if(tempOrientation==4||tempOrientation==5)
+ {
+ float temp = pw;
+ pw = ph;
+ ph = temp;
+ flag = 4;
+ }
+ }
+ if(tempOrientation==0)
+ {
+ int temp1 = pw,
+ temp2 = ph,
+ temp3 = pw,
+ temp4 = ph;
+ if(temp1>w) temp1 = w;
+ if(temp2>h) temp2 = h;
+ if(temp3>h) temp3 = h;
+ if(temp4>w) temp4 = w;
+ if(temp1*temp2<temp3*temp4)
+ {
+ int temp = pw;
+ pw = ph;
+ ph = temp;
+ flag = 4;
+ }
+ }
+ if(fillprint){
+ float final_w,final_h;
+ if(w*ph/pw <=h){
+ final_w =w;
+ final_h =w*ph/pw;
+ }
+ else{
+ final_w = h*pw/ph;
+ final_h = h;
+ }
+ float posw=(w-final_w)/2,posh=(h-final_h)/2;
+ posw = (1+XPosition)*posw;
+ posh = (1-YPosition)*posh;
+ cups_image_t *img2 = cupsImageCrop(img,posw,posh,final_w,final_h);
+ cupsImageClose(img);
+ img = img2;
+ }
+ else {
+ float final_w=w,final_h=h;
+ if(final_w>pw)
+ {
+ final_w = pw;
+ }
+ if(final_h>ph)
+ {
+ final_h = ph;
+ }
+ if((fabs(final_w-w)>0.5*w)||(fabs(final_h-h)>0.5*h))
+ {
+ fprintf(stderr,"[DEBUG]: Ignoring crop-to-fit option!\n");
+ cropfit=0;
+ }
+ else{
+ float posw=(w-final_w)/2,posh=(h-final_h)/2;
+ posw = (1+XPosition)*posw;
+ posh = (1-YPosition)*posh;
+ cups_image_t *img2 = cupsImageCrop(img,posw,posh,final_w,final_h);
+ cupsImageClose(img);
+ img = img2;
+ if(flag==4)
+ {
+ PageBottom+=(PageTop-PageBottom-final_w)/2;
+ PageTop = PageBottom+final_w;
+ PageLeft +=(PageRight-PageLeft-final_h)/2;
+ PageRight = PageLeft+final_h;
+ }
+ else{
+ PageBottom+=(PageTop-PageBottom-final_h)/2;
+ PageTop = PageBottom+final_h;
+ PageLeft +=(PageRight-PageLeft-final_w)/2;
+ PageRight = PageLeft+final_w;
+ }
+ if(PageBottom<0) PageBottom = 0;
+ if(PageLeft<0) PageLeft = 0;
+ }
+ }
+ }
#if defined(USE_CONVERT_CMD) && defined(CONVERT_CMD)
if (img == NULL) {
diff --git a/filter/imagetoraster.c b/filter/imagetoraster.c
index 67876f389..5b5674d8f 100644
--- a/filter/imagetoraster.c
+++ b/filter/imagetoraster.c
@@ -190,8 +190,8 @@ main(int argc, /* I - Number of command-line arguments */
char filename[1024]; /* Name of file to print */
cm_calibration_t cm_calibrate; /* Are we color calibrating the device? */
int cm_disabled; /* Color management disabled? */
-
-
+ int fillprint = 0; /* print-scaling = fill */
+ int cropfit = 0; /* -o crop-to-fit */
/*
* Make sure status messages are not buffered...
*/
@@ -240,7 +240,6 @@ main(int argc, /* I - Number of command-line arguments */
perror("ERROR: Unable to create pipes for filters");
return (errno);
}
-
if ((pid = fork()) == 0)
{
/*
@@ -264,7 +263,6 @@ main(int argc, /* I - Number of command-line arguments */
perror("ERROR: Unable to fork filter");
return (errno);
}
-
/*
* Update stdout so it points at the new pstoraster...
*/
@@ -392,6 +390,24 @@ main(int argc, /* I - Number of command-line arguments */
else if ((val = cupsGetOption("natural-scaling", num_options, options)) != NULL)
zoom = 0.0;
+ if((val = cupsGetOption("print-scaling",num_options,options)) !=0) {
+ if(!strcasecmp(val,"fill")) {
+ fillprint = 1;
+ }
+ }
+ else if((val = cupsGetOption("fill",num_options,options))!=0) {
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ fillprint = 1;
+ }
+ }
+ if((val = cupsGetOption("crop-to-fit",num_options,options))!= NULL){
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ cropfit=1;
+ }
+ }
+
if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
{
if (sscanf(val, "%dx%d", &xppi, &yppi) < 2)
@@ -691,7 +707,109 @@ main(int argc, /* I - Number of command-line arguments */
img = cupsImageOpen(filename, primary, secondary, sat, hue, NULL);
else
img = cupsImageOpen(filename, primary, secondary, sat, hue, lut);
-
+ if(img!=NULL)
+ {
+ if(fillprint||cropfit)
+ {
+ float w = (float)cupsImageGetWidth(img);
+ float h = (float)cupsImageGetHeight(img);
+ float pw = PageRight-PageLeft;
+ float ph = PageTop-PageBottom;
+ char *val;
+ int tempOrientation = Orientation;
+ int flag =3;
+ if((val = cupsGetOption("orientation-requested",num_options,options))!=NULL)
+ {
+ tempOrientation = atoi(val);
+ }
+ else if((val = cupsGetOption("landscape",num_options,options))!=NULL)
+ {
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ tempOrientation = 4;
+ }
+ }
+ if(tempOrientation>0)
+ {
+ if(tempOrientation==4||tempOrientation==5)
+ {
+ float temp = pw;
+ pw = ph;
+ ph = temp;
+ flag = 4;
+ }
+ }
+ if(tempOrientation==0)
+ {
+ if(min(pw,w)*min(ph,h)<min(pw,h)*min(ph,w))
+ {
+ int temp = pw;
+ pw = ph;
+ ph = temp;
+ flag = 4;
+ }
+ }
+ if(fillprint)
+ {
+ // Final width and height of cropped image.
+ float final_w,final_h;
+ if(w*ph/pw <=h){
+ final_w =w;
+ final_h =w*ph/pw;
+ }
+ else{
+ final_w = h*pw/ph;
+ final_h = h;
+ }
+ // posw and posh are position of the cropped image along width and height.
+ float posw=(w-final_w)/2,posh=(h-final_h)/2;
+ posw = (1+XPosition)*posw;
+ posh = (1-YPosition)*posh;
+ cups_image_t *img2 = cupsImageCrop(img,posw,posh,final_w,final_h);
+ cupsImageClose(img);
+ img = img2;
+ }
+ else {
+ float final_w=w,final_h=h;
+ if(w>pw)
+ {
+ final_w = pw;
+ }
+ if(h>ph)
+ {
+ final_h = ph;
+ }
+ if((fabs(final_w-w)>0.5*w)||(fabs(final_h-h)>0.5*h))
+ {
+ fprintf(stderr,"[DEBUG]: Ignoring crop-to-fit option!\n");
+ cropfit=0;
+ }
+ else{
+ float posw=(w-final_w)/2,posh=(h-final_h)/2;
+ posw = (1+XPosition)*posw;
+ posh = (1-YPosition)*posh;
+ cups_image_t *img2 = cupsImageCrop(img,posw,posh,final_w,final_h);
+ cupsImageClose(img);
+ img = img2;
+ if(flag==4)
+ {
+ PageBottom+=(PageTop-PageBottom-final_w)/2;
+ PageTop = PageBottom+final_w;
+ PageLeft +=(PageRight-PageLeft-final_h)/2;
+ PageRight = PageLeft+final_h;
+ }
+ else{
+ PageBottom+=(PageTop-PageBottom-final_h)/2;
+ PageTop = PageBottom+final_h;
+ PageLeft +=(PageRight-PageLeft-final_w)/2;
+ PageRight = PageLeft+final_w;
+ }
+ if(PageBottom<0) PageBottom = 0;
+ if(PageLeft<0) PageLeft = 0;
+ }
+ }
+ }
+ }
if (argc == 6)
unlink(filename);
diff --git a/filter/pdftopdf/pdftopdf.cc b/filter/pdftopdf/pdftopdf.cc
index cfaf0d4d6..3b9bb3043 100644
--- a/filter/pdftopdf/pdftopdf.cc
+++ b/filter/pdftopdf/pdftopdf.cc
@@ -326,6 +326,27 @@ void getParameters(ppd_file_t *ppd,int num_options,cups_option_t *options,Proces
// TODO? pstops checks =="true", pdftops !is_false ... pstops says: fitplot only for PS (i.e. not for PDF, cmp. cgpdftopdf)
param.fitplot=(val)&&(!is_false(val));
+ if((val=cupsGetOption("print-scaling",num_options,options))!=NULL) {
+ if(!strcasecmp(val,"fill")) {
+ param.fillprint=true;
+ }
+ }
+ else if((val = cupsGetOption("fill",num_options,options))!=0) {
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ param.fillprint = true;
+ }
+ }
+ /*
+ * crop-to-fit
+ */
+ if((val = cupsGetOption("crop-to-fit",num_options,options))!= NULL){
+ if(!strcasecmp(val,"true")||!strcasecmp(val,"yes"))
+ {
+ param.cropfit=1;
+ }
+ }
+
if (ppd && (ppd->landscape < 0)) { // direction the printer rotates landscape (90 or -90)
param.normal_landscape=ROT_270;
} else {
@@ -348,6 +369,8 @@ void getParameters(ppd_file_t *ppd,int num_options,cups_option_t *options,Proces
static const Rotation ipp2rot[4]={ROT_0, ROT_90, ROT_270, ROT_180};
param.orientation=ipp2rot[ipprot-3];
}
+ } else {
+ param.noOrientation = true;
}
ppd_size_t *pagesize;
@@ -1023,6 +1046,7 @@ int main(int argc,char **argv)
param.nup.nupY=2;
//param.nup.yalign=TOP;
param.border=BorderType::NONE;
+ //param.fillprint = true;
//param.mirror=true;
//param.reverse=true;
//param.numCopies=3;
diff --git a/filter/pdftopdf/pdftopdf_processor.cc b/filter/pdftopdf/pdftopdf_processor.cc
index 22ff0c5ce..850bddc90 100644
--- a/filter/pdftopdf/pdftopdf_processor.cc
+++ b/filter/pdftopdf/pdftopdf_processor.cc
@@ -175,6 +175,22 @@ bool processPDFTOPDF(PDFTOPDF_Processor &proc,ProcessingParameters &param) // {{
}
const int numPages=std::max(shuffle.size(),pages.size());
+ if(param.fillprint||param.cropfit){
+ fprintf(stderr,"[DEBUG]: Cropping input pdf and Enabling fitplot.\n");
+ if(param.noOrientation&&pages.size())
+ {
+ bool land = pages[0]->is_landscape(param.orientation);
+ if(land)
+ param.orientation = param.normal_landscape;
+ }
+ for(int i=0;i<(int)pages.size();i++)
+ {
+ std::shared_ptr<PDFTOPDF_PageHandle> page = pages[i];
+ Rotation currRot = page->crop(param.page,param.orientation,param.xpos,param.ypos,!param.cropfit);
+ }
+ param.fitplot = 1;
+ }
+
std::shared_ptr<PDFTOPDF_PageHandle> curpage;
int outputpage=0;
int outputno=0;
@@ -322,7 +338,20 @@ bool processPDFTOPDF(PDFTOPDF_Processor &proc,ProcessingParameters &param) // {{
if (!param.fitplot) {
curpage->add_subpage(page,pgedit.xpos+xpos,pgedit.ypos+ypos,pgedit.scale,&rect);
} else {
- curpage->add_subpage(page,pgedit.xpos+xpos,pgedit.ypos+ypos,pgedit.scale);
+ if(param.cropfit){
+ double xpos2 = (param.page.right-param.page.left-(page->getRect().width))/2;
+ double ypos2 = (param.page.top-param.page.bottom-(page->getRect().height))/2;
+ if(param.orientation==ROT_270||param.orientation==ROT_90)
+ {
+ xpos2 = (param.page.right-param.page.left-(page->getRect().height))/2;
+ ypos2 = (param.page.top-param.page.bottom-(page->getRect().width))/2;
+ curpage->add_subpage(page,ypos2+param.page.bottom,xpos2+param.page.left,1);
+ }else{
+ curpage->add_subpage(page,xpos2+param.page.left,ypos2+param.page.bottom,1);
+ }
+ }
+ else
+ curpage->add_subpage(page,pgedit.xpos+xpos,pgedit.ypos+ypos,pgedit.scale);
}
#ifdef DEBUG
diff --git a/filter/pdftopdf/pdftopdf_processor.h b/filter/pdftopdf/pdftopdf_processor.h
index 9e3d871b3..b1bbac549 100644
--- a/filter/pdftopdf/pdftopdf_processor.h
+++ b/filter/pdftopdf/pdftopdf_processor.h
@@ -14,6 +14,9 @@ ProcessingParameters()
: jobId(0),numCopies(1),
user(0),title(0),
fitplot(false),
+ fillprint(false), //print-scaling = fill
+ cropfit(false),
+ noOrientation(false),
orientation(ROT_0),normal_landscape(ROT_270),
paper_is_landscape(false),
duplex(false),
@@ -38,7 +41,6 @@ ProcessingParameters()
deviceCollate(false),setDuplex(false),
page_logging(-1)
-
{
page.width=612.0; // letter
page.height=792.0;
@@ -55,6 +57,9 @@ ProcessingParameters()
int jobId, numCopies;
const char *user, *title; // will stay around
bool fitplot;
+ bool fillprint; //print-scaling = fill
+ bool cropfit; // -o crop-to-fit
+ bool noOrientation;
PageRect page;
Rotation orientation,normal_landscape; // normal_landscape (i.e. default direction) is e.g. needed for number-up=2
bool paper_is_landscape;
@@ -107,6 +112,8 @@ class PDFTOPDF_PageHandle {
// fscale: inverse_scale (from nup, fitplot)
virtual void add_border_rect(const PageRect &rect,BorderType border,float fscale) =0;
// TODO?! add standalone crop(...) method (not only for subpages)
+ virtual Rotation crop(const PageRect &cropRect,Rotation orientation,Position xpos,Position ypos,bool scale) =0;
+ virtual bool is_landscape(Rotation orientation) =0 ;
virtual void add_subpage(const std::shared_ptr<PDFTOPDF_PageHandle> &sub,float xpos,float ypos,float scale,const PageRect *crop=NULL) =0;
virtual void mirror() =0;
virtual void rotate(Rotation rot) =0;
diff --git a/filter/pdftopdf/qpdf_pdftopdf_processor.cc b/filter/pdftopdf/qpdf_pdftopdf_processor.cc
index a72d7049f..7321e427c 100644
--- a/filter/pdftopdf/qpdf_pdftopdf_processor.cc
+++ b/filter/pdftopdf/qpdf_pdftopdf_processor.cc
@@ -171,6 +171,89 @@ void QPDF_PDFTOPDF_PageHandle::add_border_rect(const PageRect &_rect,BorderType
#endif
}
// }}}
+/*
+ * This crop function is written for print-scaling=fill option.
+ * Trim Box is used for trimming the page in required size.
+ * scale tells if we need to scale input file.
+ */
+Rotation QPDF_PDFTOPDF_PageHandle::crop(const PageRect &cropRect,Rotation orientation,Position xpos,Position ypos,bool scale)
+{
+ page.assertInitialized();
+ if(orientation==ROT_0||orientation==ROT_180)
+ page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_90));
+ else
+ page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_0));
+
+ PageRect currpage= getBoxAsRect(getTrimBox(page));
+ double width = currpage.right-currpage.left;
+ double height = currpage.top-currpage.bottom;
+ double pageWidth = cropRect.right-cropRect.left;
+ double pageHeight = cropRect.top-cropRect.bottom;
+ double final_w,final_h; //Width and height of cropped image.
+
+ Rotation pageRot = getRotate(page);
+ if(pageRot==ROT_0||pageRot==ROT_180)
+ {
+ std::swap(pageHeight,pageWidth);
+ }
+ if(scale)
+ {
+ if(width*pageHeight/pageWidth<=height)
+ {
+ final_w = width;
+ final_h = width*pageHeight/pageWidth;
+ }
+ else{
+ final_w = height*pageWidth/pageHeight;
+ final_h = height;
+ }
+ }
+ else{
+ final_w = std::min(width,pageWidth);
+ final_h = std::min(height,pageHeight);
+ }
+ fprintf(stderr,"After Cropping: %lf %lf %lf %lf\n",width,height,final_w,final_h);
+ double posw = (width-final_w)/2,
+ posh = (height-final_h)/2;
+ // posw, posh : Position along width and height respectively.
+ // Calculating required position.
+ if(xpos==Position::LEFT)
+ posw =0;
+ else if(xpos==Position::RIGHT)
+ posw*=2;
+
+ if(ypos==Position::TOP)
+ posh*=2;
+ else if(ypos==Position::BOTTOM)
+ posh=0;
+
+ // making PageRect for cropping.
+ currpage.left += posw;
+ currpage.bottom += posh;
+ currpage.top =currpage.bottom+final_h;
+ currpage.right=currpage.left+final_w;
+ //Cropping.
+ // TODO: Borders are covered by the image. buffer space?
+ page.replaceKey("/TrimBox",makeBox(currpage.left,currpage.bottom,currpage.right,currpage.top));
+ page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_0));
+ return getRotate(page);
+}
+
+bool QPDF_PDFTOPDF_PageHandle::is_landscape(Rotation orientation)
+{
+ page.assertInitialized();
+ if(orientation==ROT_0||orientation==ROT_180)
+ page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_90));
+ else
+ page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_0));
+
+ PageRect currpage= getBoxAsRect(getTrimBox(page));
+ double width = currpage.right-currpage.left;
+ double height = currpage.top-currpage.bottom;
+ if(width>height)
+ return true;
+ return false;
+}
// TODO: better cropping
// TODO: test/fix with qsub rotation
diff --git a/filter/pdftopdf/qpdf_pdftopdf_processor.h b/filter/pdftopdf/qpdf_pdftopdf_processor.h
index 39d3669cf..f721d9390 100644
--- a/filter/pdftopdf/qpdf_pdftopdf_processor.h
+++ b/filter/pdftopdf/qpdf_pdftopdf_processor.h
@@ -12,7 +12,8 @@ class QPDF_PDFTOPDF_PageHandle : public PDFTOPDF_PageHandle {
virtual void mirror();
virtual void rotate(Rotation rot);
virtual void add_label(const PageRect &rect, const std::string label);
-
+ virtual Rotation crop(const PageRect &cropRect,Rotation orientation,Position xpos,Position ypos,bool scale);
+ virtual bool is_landscape(Rotation orientation);
void debug(const PageRect &rect,float xpos,float ypos);
private:
bool isExisting() const;
diff --git a/ltmain.sh b/ltmain.sh
index d3230f7c3..f402c9c17 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-4"
+VERSION="2.4.6 Debian-2.4.6-10"
package_revision=2.4.6
@@ -64,7 +64,7 @@ package_revision=2.4.6
# libraries, which are installed to $pkgauxdir.
# Set a version string for this script.
-scriptversion=2015-10-12.13; # UTC
+scriptversion=2015-01-20.17; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
@@ -580,16 +580,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
{
$debug_cmd
- func_quote_arg pretty "$2"
- eval "$1+=\\ \$func_quote_arg_result"
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
}'
else
func_append_quoted ()
{
$debug_cmd
- func_quote_arg pretty "$2"
- eval "$1=\$$1\\ \$func_quote_arg_result"
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
}
fi
@@ -1091,181 +1091,85 @@ func_relative_path ()
}
-# func_quote_portable EVAL ARG
-# ----------------------------
-# Internal function to portably implement func_quote_arg. Note that we still
-# keep attention to performance here so we as much as possible try to avoid
-# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
-func_quote_portable ()
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
{
$debug_cmd
- func_quote_portable_result=$2
-
- # one-time-loop (easy break)
- while true
- do
- if $1; then
- func_quote_portable_result=`$ECHO "$2" | $SED \
- -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
- break
- fi
-
- # Quote for eval.
- case $func_quote_portable_result in
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
*[\\\`\"\$]*)
- case $func_quote_portable_result in
- *[\[\*\?]*)
- func_quote_portable_result=`$ECHO "$func_quote_portable_result" | $SED "$sed_quote_subst"`
- break
- ;;
- esac
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
- func_quote_portable_old_IFS=$IFS
- for _G_char in '\' '`' '"' '$'
- do
- # STATE($1) PREV($2) SEPARATOR($3)
- set start "" ""
- func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
- IFS=$_G_char
- for _G_part in $func_quote_portable_result
- do
- case $1 in
- quote)
- func_append func_quote_portable_result "$3$2"
- set quote "$_G_part" "\\$_G_char"
- ;;
- start)
- set first "" ""
- func_quote_portable_result=
- ;;
- first)
- set quote "$_G_part" ""
- ;;
- esac
- done
- done
- IFS=$func_quote_portable_old_IFS
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
;;
- *) ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
esac
- break
- done
- func_quote_portable_unquoted_result=$func_quote_portable_result
- case $func_quote_portable_result in
- # double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and variable expansion
- # for a subsequent eval.
- # many bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_portable_result=\"$func_quote_portable_result\"
- ;;
- esac
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
}
-# func_quotefast_eval ARG
-# -----------------------
-# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
-# but optimized for speed. Result is stored in $func_quotefast_eval.
-if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
- func_quotefast_eval ()
- {
- printf -v func_quotefast_eval_result %q "$1"
- }
-else
- func_quotefast_eval ()
- {
- func_quote_portable false "$1"
- func_quotefast_eval_result=$func_quote_portable_result
- }
-fi
-
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
-# func_quote_arg MODEs ARG
-# ------------------------
-# Quote one ARG to be evaled later. MODEs argument may contain zero ore more
-# specifiers listed below separated by ',' character. This function returns two
-# values:
-# i) func_quote_arg_result
-# double-quoted (when needed), suitable for a subsequent eval
-# ii) func_quote_arg_unquoted_result
-# has all characters that are still active within double
-# quotes backslashified. Available only if 'unquoted' is specified.
-#
-# Available modes:
-# ----------------
-# 'eval' (default)
-# - escape shell special characters
-# 'expand'
-# - the same as 'eval'; but do not quote variable references
-# 'pretty'
-# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
-# later used in func_quote to get output like: 'echo "a b"' instead of
-# 'echo a\ b'. This is slower than default on some shells.
-# 'unquoted'
-# - produce also $func_quote_arg_unquoted_result which does not contain
-# wrapping double-quotes.
-#
-# Examples for 'func_quote_arg pretty,unquoted string':
-#
-# string | *_result | *_unquoted_result
-# ------------+-----------------------+-------------------
-# " | \" | \"
-# a b | "a b" | a b
-# "a b" | "\"a b\"" | \"a b\"
-# * | "*" | *
-# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
-#
-# Examples for 'func_quote_arg pretty,unquoted,expand string':
-#
-# string | *_result | *_unquoted_result
-# --------------+---------------------+--------------------
-# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
-func_quote_arg ()
-{
- _G_quote_expand=false
- case ,$1, in
- *,expand,*)
- _G_quote_expand=:
- ;;
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
esac
- case ,$1, in
- *,pretty,*|*,expand,*|*,unquoted,*)
- func_quote_portable $_G_quote_expand "$2"
- func_quote_arg_result=$func_quote_portable_result
- func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
- ;;
- *)
- # Faster quote-for-eval for some shells.
- func_quotefast_eval "$2"
- func_quote_arg_result=$func_quotefast_eval_result
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
;;
esac
-}
-
-# func_quote MODEs ARGs...
-# ------------------------
-# Quote all ARGs to be evaled later and join them into single command. See
-# func_quote_arg's description for more info.
-func_quote ()
-{
- $debug_cmd
- _G_func_quote_mode=$1 ; shift
- func_quote_result=
- while test 0 -lt $#; do
- func_quote_arg "$_G_func_quote_mode" "$1"
- if test -n "$func_quote_result"; then
- func_append func_quote_result " $func_quote_arg_result"
- else
- func_append func_quote_result "$func_quote_arg_result"
- fi
- shift
- done
+ func_quote_for_expand_result=$_G_arg
}
@@ -1311,8 +1215,8 @@ func_show_eval ()
_G_cmd=$1
_G_fail_exp=${2-':'}
- func_quote_arg pretty,expand "$_G_cmd"
- eval "func_notquiet $func_quote_arg_result"
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
$opt_dry_run || {
eval "$_G_cmd"
@@ -1337,8 +1241,8 @@ func_show_eval_locale ()
_G_fail_exp=${2-':'}
$opt_quiet || {
- func_quote_arg expand,pretty "$_G_cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || {
@@ -1466,7 +1370,7 @@ func_lt_ver ()
#! /bin/sh
# Set a version string for this script.
-scriptversion=2015-10-12.13; # UTC
+scriptversion=2015-10-07.11; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
@@ -1676,8 +1580,8 @@ func_run_hooks ()
# '
# # No change in '$@' (ignored completely by this hook). There is
# # no need to do the equivalent (but slower) action:
-# # func_quote eval ${1+"$@"}
-# # my_options_prep_result=$func_quote_result
+# # func_quote_for_eval ${1+"$@"}
+# # my_options_prep_result=$func_quote_for_eval_result
# false
# }
# func_add_hook func_options_prep my_options_prep
@@ -1713,8 +1617,8 @@ func_run_hooks ()
# done
#
# if $args_changed; then
-# func_quote eval ${1+"$@"}
-# my_silent_option_result=$func_quote_result
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
# fi
#
# $args_changed
@@ -1781,8 +1685,8 @@ func_options ()
if $_G_rc_options; then
func_options_result=$_G_res_var
else
- func_quote eval ${1+"$@"}
- func_options_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ func_options_result=$func_quote_for_eval_result
fi
$_G_rc_options
@@ -1925,8 +1829,8 @@ func_parse_options ()
if $_G_rc_parse_options; then
# save modified positional parameters for caller
- func_quote eval ${1+"$@"}
- func_parse_options_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
fi
$_G_rc_parse_options
@@ -2237,7 +2141,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname $scriptversion Debian-2.4.6-4
+ version: $progname $scriptversion Debian-2.4.6-10
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
@@ -2471,8 +2375,8 @@ libtool_options_prep ()
if $_G_rc_lt_options_prep; then
# Pass back the list of options.
- func_quote eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
fi
$_G_rc_lt_options_prep
@@ -2578,8 +2482,8 @@ libtool_parse_options ()
if $_G_rc_lt_parse_options; then
# save modified positional parameters for caller
- func_quote eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
fi
$_G_rc_lt_parse_options
@@ -2639,8 +2543,8 @@ libtool_validate_options ()
}
# Pass back the unparsed argument list
- func_quote eval ${1+"$@"}
- libtool_validate_options_result=$func_quote_result
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
}
func_add_hook func_validate_options libtool_validate_options
@@ -3606,8 +3510,8 @@ func_mode_compile ()
esac
done
- func_quote_arg pretty "$libobj"
- test "X$libobj" != "X$func_quote_arg_result" \
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
&& func_warning "libobj name '$libobj' may not contain shell special characters."
func_dirname_and_basename "$obj" "/" ""
@@ -3680,8 +3584,8 @@ compiler."
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
srcfile=$func_to_tool_file_result
- func_quote_arg pretty "$srcfile"
- qsrcfile=$func_quote_arg_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
# Only build a PIC object if we are building libtool libraries.
if test yes = "$build_libtool_libs"; then
@@ -4284,8 +4188,8 @@ func_mode_install ()
case $nonopt in *shtool*) :;; *) false;; esac
then
# Aesthetically quote it.
- func_quote_arg pretty "$nonopt"
- install_prog="$func_quote_arg_result "
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
arg=$1
shift
else
@@ -4295,8 +4199,8 @@ func_mode_install ()
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
- func_quote_arg pretty "$arg"
- func_append install_prog "$func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
install_shared_prog=$install_prog
case " $install_prog " in
*[\\\ /]cp\ *) install_cp=: ;;
@@ -4353,12 +4257,12 @@ func_mode_install ()
esac
# Aesthetically quote the argument.
- func_quote_arg pretty "$arg"
- func_append install_prog " $func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
if test -n "$arg2"; then
- func_quote_arg pretty "$arg2"
+ func_quote_for_eval "$arg2"
fi
- func_append install_shared_prog " $func_quote_arg_result"
+ func_append install_shared_prog " $func_quote_for_eval_result"
done
test -z "$install_prog" && \
@@ -4369,8 +4273,8 @@ func_mode_install ()
if test -n "$install_override_mode" && $no_mode; then
if $install_cp; then :; else
- func_quote_arg pretty "$install_override_mode"
- func_append install_shared_prog " -m $func_quote_arg_result"
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
fi
fi
@@ -4666,8 +4570,8 @@ func_mode_install ()
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
$opt_quiet || {
- func_quote_arg expand,pretty "$relink_command"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
}
if eval "$relink_command"; then :
else
@@ -5446,8 +5350,7 @@ else
if test \"\$libtool_execute_magic\" != \"$magic\"; then
file=\"\$0\""
- func_quote_arg pretty "$ECHO"
- qECHO=$func_quote_arg_result
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
$ECHO "\
# A function that is used when there is no print builtin or printf.
@@ -5457,7 +5360,7 @@ func_fallback_echo ()
\$1
_LTECHO_EOF'
}
- ECHO=$qECHO
+ ECHO=\"$qECHO\"
fi
# Very basic option parsing. These options are (a) specific to
@@ -6800,9 +6703,9 @@ func_mode_link ()
while test "$#" -gt 0; do
arg=$1
shift
- func_quote_arg pretty,unquoted "$arg"
- qarg=$func_quote_arg_unquoted_result
- func_append libtool_args " $func_quote_arg_result"
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
@@ -7400,9 +7303,9 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_arg pretty "$flag"
- func_append arg " $func_quote_arg_result"
- func_append compiler_flags " $func_quote_arg_result"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@@ -7416,10 +7319,10 @@ func_mode_link ()
save_ifs=$IFS; IFS=,
for flag in $args; do
IFS=$save_ifs
- func_quote_arg pretty "$flag"
- func_append arg " $wl$func_quote_arg_result"
- func_append compiler_flags " $wl$func_quote_arg_result"
- func_append linker_flags " $func_quote_arg_result"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@@ -7443,8 +7346,8 @@ func_mode_link ()
# -msg_* for osf cc
-msg_*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
# Flags to be passed through unchanged, with rationale:
@@ -7464,12 +7367,13 @@ func_mode_link ()
# -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ -specs=*|-fsanitize=*|-fuse-ld=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
@@ -7490,15 +7394,15 @@ func_mode_link ()
continue
else
# Otherwise treat like 'Some other compiler flag' below
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
fi
;;
# Some other compiler flag.
-* | +*)
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
*.$objext)
@@ -7618,8 +7522,8 @@ func_mode_link ()
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
- func_quote_arg pretty "$arg"
- arg=$func_quote_arg_result
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
;;
esac # arg
@@ -10131,8 +10035,8 @@ EOF
for cmd in $concat_cmds; do
IFS=$save_ifs
$opt_quiet || {
- func_quote_arg expand,pretty "$cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10225,8 +10129,8 @@ EOF
eval cmd=\"$cmd\"
IFS=$save_ifs
$opt_quiet || {
- func_quote_arg expand,pretty "$cmd"
- eval "func_echo $func_quote_arg_result"
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
}
$opt_dry_run || eval "$cmd" || {
lt_exit=$?
@@ -10700,12 +10604,12 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_arg pretty "$var_value"
- relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
- func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)"
- relink_command=$func_quote_arg_unquoted_result
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
fi
# Only actually do things if not in dry run mode.
@@ -10945,14 +10849,13 @@ EOF
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- func_quote_arg pretty,unquoted "$var_value"
- relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- func_quote_arg pretty,unquoted "$relink_command"
- relink_command=$func_quote_arg_unquoted_result
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
if test yes = "$hardcode_automatic"; then
relink_command=
fi
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index e67ed6997..9d6dd9fce 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4063,7 +4063,8 @@ _LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index c1921d6f5..ac4392012 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -451,6 +451,19 @@ static remote_printer_t
#endif
/*
+ * Option 'printer-is-shared' cannot be set on remote CUPS
+ * queue and requests for setting it ends with error since
+ * 2.1.1. Define HAVE_CUPS_2_2 to do not send IPP request
+ * for setting 'printer-is-shared' option on remote CUPS queues
+ * for newer versions of CUPS.
+ */
+#if (CUPS_VERSION_MAJOR > 2) || (CUPS_VERSION_MINOR > 1)
+#define HAVE_CUPS_2_2 1
+#else
+#define HAVE_CUPS_2_2 0
+#endif
+
+/*
* CUPS 1.6 makes various structures private and
* introduces these ippGet and ippSet functions
* for all of the fields in these structures.
@@ -3106,39 +3119,7 @@ on_printer_state_changed (CupsNotifier *object,
gboolean printer_is_accepting_jobs,
gpointer user_data)
{
- int i;
char *ptr, buf[2048];
- remote_printer_t *p, *q;
- http_t *http = NULL;
- ipp_t *request, *response;
- ipp_attribute_t *attr;
- const char *pname = NULL;
- char *remote_cups_queue;
- ipp_pstate_t pstate = IPP_PRINTER_IDLE;
- int paccept = 0;
- int num_jobs, min_jobs = 99999999;
- cups_job_t *jobs = NULL;
- const char *dest_host = NULL;
- int dest_port = 0;
- char dest_name[1024];
- int dest_index = 0;
- int valid_dest_found = 0;
- char uri[HTTP_MAX_URI];
- int job_id = 0;
- int num_options;
- cups_option_t *options;
- static const char *pattrs[] =
- {
- "printer-name",
- "printer-state",
- "printer-is-accepting-jobs"
- };
- static const char *jattrs[] =
- {
- "job-id",
- "job-state"
- };
- http_t *conn = NULL;
debug_printf("on_printer_state_changed() in THREAD %ld\n", pthread_self());
@@ -3217,7 +3198,94 @@ on_printer_state_changed (CupsNotifier *object,
strncpy(buf, text, ptr - text);
buf[ptr - text] = '\0';
debug_printf("[CUPS Notification] %s not default printer any more.\n", buf);
- } else if ((ptr = strstr(text, " state changed to processing")) != NULL) {
+ }
+}
+
+static void
+on_job_state (CupsNotifier *object,
+ const gchar *text,
+ const gchar *printer_uri,
+ const gchar *printer,
+ guint printer_state,
+ const gchar *printer_state_reasons,
+ gboolean printer_is_accepting_jobs,
+ guint job_id,
+ guint job_state,
+ const gchar *job_state_reasons,
+ const gchar *job_name,
+ guint job_impressions_completed,
+ gpointer user_data)
+{
+ int i;
+ char buf[2048];
+ remote_printer_t *p, *q;
+ http_t *http = NULL;
+ ipp_t *request, *response;
+ ipp_attribute_t *attr;
+ const char *pname = NULL;
+ char *remote_cups_queue;
+ ipp_pstate_t pstate = IPP_PRINTER_IDLE;
+ int paccept = 0;
+ int num_jobs, min_jobs = 99999999;
+ cups_job_t *jobs = NULL;
+ const char *dest_host = NULL;
+ int dest_port = 0;
+ char dest_name[1024];
+ int dest_index = 0;
+ int valid_dest_found = 0;
+ char uri[HTTP_MAX_URI];
+ /*int job_id = 0;*/
+ int num_options;
+ cups_option_t *options;
+ static const char *pattrs[] =
+ {
+ "printer-name",
+ "printer-state",
+ "printer-is-accepting-jobs"
+ };
+ http_t *conn = NULL;
+
+ debug_printf("on_job_state() in THREAD %ld\n", pthread_self());
+
+ debug_printf("[CUPS Notification] Job state changed on printer %s: %s\n",
+ printer, text);
+ debug_printf("[CUPS Notification] Printer state reasons: %s\n",
+ printer_state_reasons);
+ debug_printf("[CUPS Notification] Job ID: %d\n",
+ job_id);
+ debug_printf("[CUPS Notification] Job State: %s\n",
+ job_state_reasons);
+ debug_printf("[CUPS Notification] Job is processing: %s\n",
+ job_state == IPP_JOB_PROCESSING ? "Yes" : "No");
+
+ if (terminating) {
+ debug_printf("[CUPS Notification]: Ignoring because cups-browsed is terminating.\n");
+ return;
+ }
+
+ if (autoshutdown && autoshutdown_on == NO_JOBS) {
+ if (check_jobs() == 0) {
+ /* If auto shutdown is active for triggering on no jobs being left, we
+ schedule the shutdown in autoshutdown_timeout seconds */
+ if (!autoshutdown_exec_id) {
+ debug_printf ("No jobs there any more on printers made available by us, shutting down in %d sec...\n", autoshutdown_timeout);
+ autoshutdown_exec_id =
+ g_timeout_add_seconds (autoshutdown_timeout, autoshutdown_execute,
+ NULL);
+ }
+ } else {
+ /* If auto shutdown is active for triggering on no jobs being left, we
+ cancel a shutdown in autoshutdown_timeout seconds as there are jobs
+ again. */
+ if (autoshutdown_exec_id) {
+ debug_printf ("New jobs there on the printers made available by us, killing auto shutdown timer.\n");
+ g_source_remove(autoshutdown_exec_id);
+ autoshutdown_exec_id = 0;
+ }
+ }
+ }
+
+ if (job_id != 0 && job_state == IPP_JOB_PROCESSING) {
/* Printer started processing a job, check if it uses the implicitclass
backend and if so, we select the remote queue to which to send the job
in a way so that we get load balancing between all remote queues
@@ -3406,46 +3474,13 @@ on_printer_state_changed (CupsNotifier *object,
if (i == q->last_printer)
break;
}
- /* Find the ID of the current job */
- request = ippNewRequest(IPP_GET_JOBS);
- httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
- "localhost", ippPort(), "/printers/%s", printer);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
- "printer-uri", NULL, uri);
- ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
- "requested-attributes",
- sizeof(jattrs) / sizeof(jattrs[0]), NULL, jattrs);
- job_id = 0;
- if ((response = cupsDoRequest(conn, request, "/")) != NULL) {
- /* Get the current active job on this queue... */
- ipp_jstate_t jobstate = IPP_JOB_PENDING;
- for (attr = ippFirstAttribute(response); attr != NULL;
- attr = ippNextAttribute(response)) {
- if (!ippGetName(attr)) {
- if (jobstate == IPP_JOB_PROCESSING)
- break;
- else
- continue;
- }
- if (!strcmp(ippGetName(attr), "job-id") &&
- ippGetValueTag(attr) == IPP_TAG_INTEGER)
- job_id = ippGetInteger(attr, 0);
- else if (!strcmp(ippGetName(attr), "job-state") &&
- ippGetValueTag(attr) == IPP_TAG_ENUM)
- jobstate = (ipp_jstate_t)ippGetInteger(attr, 0);
- }
- if (jobstate != IPP_JOB_PROCESSING)
- job_id = 0;
- ippDelete(response);
- }
- if (job_id == 0)
- debug_printf("ERROR: could not determine ID of curremt job on %s\n",
- printer);
/* Write the selected destination host into an option of our implicit
class queue (cups-browsed-dest-printer="<dest>") so that the
implicitclass backend will pick it up */
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
+ "localhost", ippPort(), "/printers/%s", printer);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
@@ -5438,7 +5473,15 @@ gboolean update_cups_queues(gpointer unused) {
}
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
- ippDelete(cupsDoRequest(http, request, "/admin/"));
+ /*
+ * Do IPP request for printer-is-shared option only when we have
+ * network printer or if we have remote CUPS queue, do IPP request
+ * only if we have CUPS older than 2.2.
+ */
+ if (p->netprinter != 0 || !HAVE_CUPS_2_2)
+ ippDelete(cupsDoRequest(http, request, "/admin/"));
+ else
+ ippDelete(request);
cupsFreeOptions(num_options, options);
if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE)
debug_printf("Unable to modify the printer-is-shared bit (%s)!\n",
@@ -7777,7 +7820,7 @@ read_configuration (const char *filename)
cups_file_t *fp;
int i, linenum = 0;
char line[HTTP_MAX_BUFFER];
- char *value = NULL, *ptr, *start = NULL;
+ char *value = NULL, *ptr, *ptr2, *start;
const char *delim = " \t,";
int browse_allow_line_found = 0;
int browse_deny_line_found = 0;
@@ -8175,6 +8218,7 @@ read_configuration (const char *filename)
AutoClustering = 0;
} else if (!strcasecmp(line, "Cluster") && value) {
ptr = value;
+ ptr2 = NULL;
/* Skip white space */
while (*ptr && isspace(*ptr)) ptr ++;
/* Premature line end */
@@ -8193,26 +8237,27 @@ read_configuration (const char *filename)
if (strlen(start) <= 0)
goto cluster_fail;
/* Clean queue name */
- start = remove_bad_chars(start, 0);
+ ptr2 = remove_bad_chars(start, 0);
/* Check whether we have already a cluster with this name */
for (cluster = cupsArrayFirst(clusters);
cluster;
cluster = cupsArrayNext(clusters))
- if (!strcasecmp(start, cluster->local_queue_name)) {
+ if (!strcasecmp(ptr2, cluster->local_queue_name)) {
debug_printf("Duplicate cluster with queue name \"%s\".\n",
- start);
+ ptr2);
cluster = NULL;
goto cluster_fail;
}
/* Create the new cluster definition */
cluster = calloc (1, sizeof (cluster_t));
if (!cluster) goto cluster_fail;
- cluster->local_queue_name = start;
+ cluster->local_queue_name = ptr2;
cluster->members = cupsArrayNew(NULL, NULL);
+ ptr2 = NULL;
if (!*ptr) {
/* Only local queue name given, so assume this name as the only
member name (only remote queues with this name match) */
- cupsArrayAdd(cluster->members, remove_bad_chars(start, 2));
+ cupsArrayAdd(cluster->members, remove_bad_chars(ptr2, 2));
} else {
/* The rest of the line lists one or more member queue names */
while (*ptr) {
@@ -8231,9 +8276,9 @@ read_configuration (const char *filename)
}
}
cupsArrayAdd (clusters, cluster);
- if (start != NULL) {
- free(start);
- start = NULL;
+ if (ptr2 != NULL) {
+ free(ptr2);
+ ptr2 = NULL;
}
continue;
cluster_fail:
@@ -8250,9 +8295,9 @@ read_configuration (const char *filename)
free(cluster);
cluster = NULL;
}
- if (start != NULL) {
- free(start);
- start = NULL;
+ if (ptr2 != NULL) {
+ free(ptr2);
+ ptr2 = NULL;
}
} else if (!strcasecmp(line, "LoadBalancing") && value) {
if (!strncasecmp(value, "QueueOnClient", 13))
@@ -8885,6 +8930,8 @@ int main(int argc, char*argv[]) {
if (cups_notifier != NULL) {
g_signal_connect (cups_notifier, "printer-state-changed",
G_CALLBACK (on_printer_state_changed), NULL);
+ g_signal_connect (cups_notifier, "job-state",
+ G_CALLBACK (on_job_state), NULL);
g_signal_connect (cups_notifier, "printer-deleted",
G_CALLBACK (on_printer_deleted), NULL);
g_signal_connect (cups_notifier, "printer-modified",
diff --git a/utils/driverless.1 b/utils/driverless.1
index 7dfa11bd5..189a612f5 100644
--- a/utils/driverless.1
+++ b/utils/driverless.1
@@ -13,13 +13,14 @@
.fi
.SH DESCRIPTION
\fBdriverless\fP generates PPD files for printers which are designed
-for driverless printing (currently IPP Everywhere and AirPrint
-printers) by polling capability information from the printers via
-IPP. it can be either called for listing suitable printers in the
-network and for actually generating the PPD. It can also be called by
-CUPS when CUPS is listing available PPDs/drivers or creating print
-queues, making the setup of driverless printers with printer setup
-tools transparently working.
+for driverless IPP printing (currently IPP Everywhere, AirPrint,
+Mopria, and Wi-Fi-Direct printers, network printers and also
+IPP-over-USB printers with the help of ippusbxd(8)) by polling
+capability information from the printers via IPP. it can be either
+called for listing suitable printers in the network and for actually
+generating the PPD. It can also be called by CUPS when CUPS is listing
+available PPDs/drivers or creating print queues, making the setup of
+driverless printers with printer setup tools transparently working.
.P
driverless is placed in /usr/lib/cups/driver/ for listing available
driverless-capable printers and generating PPDs for them. It should
@@ -58,12 +59,13 @@ Generate the PPD file for the supplied \fIdriver URI\fP from the output of "list
.B
\fIIPP printer URI\fB
Generate the PPD file for the supplied \fIIPP printer URI\fP (suitable URIs are listed when calling driverless without options).
-.TP
-When called without options, the IPP printer URIs of all available IPP printers will be listed.
+.P
+When called without options, the IPP printer URIs of all available
+driverless-capable IPP printers will be listed.
.P
.SH SEE ALSO
-\fBcups-browsed\fP(8), \fBippfind\fP(1)
+\fBcups-browsed\fP(8), \fBippfind\fP(1), \fBippusbxd\fP(8)
.PP
.SH AUTHOR
The authors of \fBdriverless\fP are listed in /usr/share/doc/\fBcups-filters\fP/AUTHORS.