From: msweet Date: Mon, 13 May 2013 19:15:06 +0000 (+0000) Subject: cups.org: ipptool does not proceed past INCLUDE if ignore... X-Git-Tag: release-1.7rc1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9475ec92d83ec01ae78222ed2bce154d7e71eac3;p=thirdparty%2Fcups.git cups.org: ipptool does not proceed past INCLUDE if ignore is not used Also: IPP finishings values for (now standardized) punch and fold stuff, new IPP FaxOut Send-Hardcopy-Document operation. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10980 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 757e4bb9f4..d05d8c820e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ -CHANGES.txt - 1.7b1 - 2013-04-18 +CHANGES.txt - 1.7b1 - 2013-05-13 -------------------------------- +CHANGES IN CUPS V1.7b2 + + - The ipptool program did not continue past include file errors by + default () + + CHANGES IN CUPS V1.7b1 - The configure script now supports a --with-rundir option to change diff --git a/cups/ipp-support.c b/cups/ipp-support.c index 6c7aadeda7..d5c39f9400 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -204,7 +204,7 @@ static const char * const ipp_std_ops[] = "Suspend-Current-Job", "Resume-Job", - /* 0x0030 - 0x003d */ + /* 0x0030 - 0x003e */ "Promote-Job", "Schedule-Job-After", "0x0032", @@ -218,7 +218,8 @@ static const char * const ipp_std_ops[] = "Resubmit-Job", "Close-Job", "Identify-Printer", - "Validate-Document" + "Validate-Document", + "Send-Hardcopy-Document" }, * const ipp_cups_ops[] = { @@ -400,7 +401,44 @@ static const char * const ipp_document_states[] = "trim-after-pages", "trim-after-documents", "trim-after-copies", - "trim-after-job" + "trim-after-job", + "64", + "65", + "66", + "67", + "68", + "69", + "punch-top-left", + "punch-bottom-left", + "punch-top-right", + "punch-bottom-right", + "punch-dual-left", + "punch-dual-top", + "punch-dual-right", + "punch-dual-bottom", + "punch-triple-left", + "punch-triple-top", + "punch-triple-right", + "punch-triple-bottom", + "punch-quad-left", + "punch-quad-top", + "punch-quad-right", + "punch-quad-bottom", + "86", + "87", + "88", + "89", + "fold-accordian", + "fold-double-gate", + "fold-gate", + "fold-half", + "fold-half-z", + "fold-left-gate", + "fold-letter", + "fold-parallel", + "fold-poster", + "fold-right-gate", + "fold-z" }, * const ipp_finishings_vendor[] = { @@ -479,39 +517,39 @@ static const char * const ipp_document_states[] = "0x40000043", "0x40000044", "0x40000045", - "punch-top-left", - "punch-bottom-left", - "punch-top-right", - "punch-bottom-right", - "punch-dual-left", - "punch-dual-top", - "punch-dual-right", - "punch-dual-bottom", - "punch-triple-left", - "punch-triple-top", + "cups-punch-top-left", + "cups-punch-bottom-left", + "cups-punch-top-right", + "cups-punch-bottom-right", + "cups-punch-dual-left", + "cups-punch-dual-top", + "cups-punch-dual-right", + "cups-punch-dual-bottom", + "cups-punch-triple-left", + "cups-punch-triple-top", /* 0x40000050 - 0x4000005F */ - "punch-triple-right", - "punch-triple-bottom", - "punch-quad-left", - "punch-quad-top", - "punch-quad-right", - "punch-quad-bottom", + "cups-punch-triple-right", + "cups-punch-triple-bottom", + "cups-punch-quad-left", + "cups-punch-quad-top", + "cups-punch-quad-right", + "cups-punch-quad-bottom", "0x40000056", "0x40000057", "0x40000058", "0x40000059", - "fold-accordian", - "fold-double-gate", - "fold-gate", - "fold-half", - "fold-half-z", - "fold-left-gate", + "cups-fold-accordian", + "cups-fold-double-gate", + "cups-fold-gate", + "cups-fold-half", + "cups-fold-half-z", + "cups-fold-left-gate", /* 0x40000060 - 0x40000064 */ - "fold-letter", - "fold-parallel", - "fold-poster", - "fold-right-gate", - "fold-z" + "cups-fold-letter", + "cups-fold-parallel", + "cups-fold-poster", + "cups-fold-right-gate", + "cups-fold-z" }, * const ipp_job_collation_types[] = { /* job-collation-type enums */ diff --git a/cups/ipp.h b/cups/ipp.h index 5360ff1a7a..7ae983d88e 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -123,8 +123,35 @@ typedef enum ipp_finishings_e /**** Finishings ****/ IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS, /* Trim output after each document */ IPP_FINISHINGS_TRIM_AFTER_COPIES, /* Trim output after each copy */ IPP_FINISHINGS_TRIM_AFTER_JOB, /* Trim output after job */ - - /* Proposed extensions for finishings */ + IPP_FINISHINGS_PUNCH_TOP_LEFT = 70, /* Punch 1 hole top left */ + IPP_FINISHINGS_PUNCH_BOTTOM_LEFT, /* Punch 1 hole bottom left */ + IPP_FINISHINGS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right */ + IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT, /* Punch 1 hole bottom right */ + IPP_FINISHINGS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side */ + IPP_FINISHINGS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge */ + IPP_FINISHINGS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side */ + IPP_FINISHINGS_PUNCH_DUAL_BOTTOM, /* Punch 2 holes bottom edge */ + IPP_FINISHINGS_PUNCH_TRIPLE_LEFT, /* Punch 3 holes left side */ + IPP_FINISHINGS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge */ + IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT, /* Punch 3 holes right side */ + IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM, /* Punch 3 holes bottom edge */ + IPP_FINISHINGS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side */ + IPP_FINISHINGS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */ + IPP_FINISHINGS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side */ + IPP_FINISHINGS_PUNCH_QUAD_BOTTOM, /* Punch 4 holes bottom edge */ + IPP_FINISHINGS_FOLD_ACCORDIAN = 90, /* Accordian-fold the paper vertically into four sections */ + IPP_FINISHINGS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */ + IPP_FINISHINGS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline */ + IPP_FINISHINGS_FOLD_HALF, /* Fold the paper in half vertically */ + IPP_FINISHINGS_FOLD_HALF_Z, /* Fold the paper in half horizontally, then Z-fold the paper vertically */ + IPP_FINISHINGS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper towards the midline */ + IPP_FINISHINGS_FOLD_LETTER, /* Fold the paper into three sections vertically; sometimes also known as a C fold*/ + IPP_FINISHINGS_FOLD_PARALLEL, /* Fold the paper in half vertically two times, yielding four sections */ + IPP_FINISHINGS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */ + IPP_FINISHINGS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline */ + IPP_FINISHINGS_FOLD_Z, /* Fold the paper vertically into three sections, forming a Z */ + + /* CUPS extensions for finishings (pre-standard versions of values above) */ IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046, /* Punch 1 hole top left */ IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left */ @@ -262,8 +289,10 @@ typedef enum ipp_op_e /**** IPP operations ****/ IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */ IPP_OP_RESUBMIT_JOB, /* Resubmit-Job */ IPP_OP_CLOSE_JOB, /* Close-Job */ - IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer (proposed IPP JPS3) */ - IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document (proposed IPP JPS3) */ + IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer @private@ */ + IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document @private@ */ + IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document @private@ */ + IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */ IPP_OP_CUPS_GET_DEFAULT, /* Get the default printer */ IPP_OP_CUPS_GET_PRINTERS, /* Get a list of printers and/or classes */ diff --git a/doc/help/man-ipptool.html b/doc/help/man-ipptool.html index 189613a9d4..486080c6ac 100644 --- a/doc/help/man-ipptool.html +++ b/doc/help/man-ipptool.html @@ -11,7 +11,8 @@ ipptool - perform internet printing protocol requests

Synopsis

ipptool -[ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T +[ --help ] [ --stop-after-include-error ] [ --version ] +[ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T seconds ] [ -V version @@ -34,6 +35,14 @@ ipptool - perform internet printing protocol requests

Options

The following options are recognized by ipptool:
+
--help +
+
Shows program help. +--stop-after-include-error +Tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive. +--version +Shows the version of ipptool being used. +
-4
Specifies that ipptool must connect to the printer or server using IPv4. @@ -107,6 +116,8 @@ The following options are recognized by ipptool:
Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output.
+

Exit Code

+The ipptool program returns 0 if all tests were sucessful and 1 otherwise.

Compatibility

The ipptool program is unique to CUPS.

Examples

@@ -130,21 +141,28 @@ The following standard files are available: document-letter.ps get-completed-jobs.test get-jobs.test + get-notifications.test get-printer-attributes.test + get-subscriptions.test gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test ipp-2.2.test + ipp-everywhere.test onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps print-job.test + print-job-deflate.test + print-job-gzip.test testfile.jpg + testfile.pcl testfile.pdf testfile.ps testfile.txt + validate-job.test

See Also

ipptoolfile(5), diff --git a/doc/help/man-ipptoolfile.html b/doc/help/man-ipptoolfile.html index 7011a97308..4441d9d759 100644 --- a/doc/help/man-ipptoolfile.html +++ b/doc/help/man-ipptoolfile.html @@ -119,6 +119,13 @@ includes a file from the ipptool include directory.
Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
+
STOP-AFTER-INCLUDE-ERROR no +
+
+
STOP-AFTER-INCLUDE-ERROR yes +
+
Specifies whether tests will be stopped after an error in an included file. +
TRANSFER auto
Specifies that tests will, by default, use "Transfer-Encoding: chunked" for @@ -506,6 +513,7 @@ RFC 2911 and other IPP extension specifications. Here is a complete list: Resume-Printer Schedule-Job-After Send-Document + Send-Hardcopy-Document Send-Notifications Send-URI Set-Job-Attributes diff --git a/man/ipptool.man b/man/ipptool.man index 16b12764b1..75567c11b8 100644 --- a/man/ipptool.man +++ b/man/ipptool.man @@ -11,11 +11,12 @@ .\" 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" "9 November 2010" "Apple Inc." +.TH ipptool 1 "CUPS" "13 May 2013" "Apple Inc." .SH NAME ipptool - perform internet printing protocol requests .SH SYNOPSIS .B ipptool +[ --help ] [ --stop-after-include-error ] [ --version ] [ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T .I seconds ] [ -V @@ -39,6 +40,13 @@ ipptool - perform internet printing protocol requests .SH OPTIONS The following options are recognized by \fIipptool\fR: .TP 5 +--help +Shows program help. +--stop-after-include-error +Tells \fIipptool\fR to stop if an error occurs in an included file. Normally \fIipptool\fR will continue with subsequent tests after the INCLUDE directive. +--version +Shows the version of \fIipptool\fR being used. +.TP 5 -4 Specifies that \fIipptool\fR must connect to the printer or server using IPv4. .TP 5 @@ -92,6 +100,8 @@ Specifies that CUPS test report output is desired instead of the plain text outp .TP 5 -v Specifies that all request and response attributes should be output in CUPS test mode (\fI-t\fR). This is the default for XML output. +.SH EXIT CODE +The \fIipptool\fR program returns 0 if all tests were sucessful and 1 otherwise. .SH COMPATIBILITY The \fIipptool\fR program is unique to CUPS. .SH EXAMPLES @@ -116,21 +126,28 @@ The following standard files are available: document-letter.ps get-completed-jobs.test get-jobs.test + get-notifications.test get-printer-attributes.test + get-subscriptions.test gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test ipp-2.2.test + ipp-everywhere.test onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps print-job.test + print-job-deflate.test + print-job-gzip.test testfile.jpg + testfile.pcl testfile.pdf testfile.ps testfile.txt + validate-job.test .fi .SH SEE ALSO \fIipptoolfile(5)\fR, diff --git a/man/ipptoolfile.man b/man/ipptoolfile.man index a4bba335e1..2049cbde0d 100644 --- a/man/ipptoolfile.man +++ b/man/ipptoolfile.man @@ -11,7 +11,7 @@ .\" 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 ipptoolfile 5 "CUPS" "10 January 2013" "Apple Inc." +.TH ipptoolfile 5 "CUPS" "13 May 2013" "Apple Inc." .SH NAME ipptoolfile \- ipptool file format @@ -111,6 +111,11 @@ SKIP-IF-NOT-DEFINED variable-name Specifies that the remainder of the test file should be skipped when the variable is or is not defined. .TP 5 +STOP-AFTER-INCLUDE-ERROR no +.TP 5 +STOP-AFTER-INCLUDE-ERROR yes +Specifies whether tests will be stopped after an error in an included file. +.TP 5 TRANSFER auto Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached @@ -415,6 +420,7 @@ RFC 2911 and other IPP extension specifications. Here is a complete list: Resume-Printer Schedule-Job-After Send-Document + Send-Hardcopy-Document Send-Notifications Send-URI Set-Job-Attributes diff --git a/test/ipptool.c b/test/ipptool.c index 166336cd24..61fc8ed70e 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -156,6 +156,8 @@ _cups_output_t Output = _CUPS_OUTPUT_LIST; /* Output mode */ int Cancel = 0, /* Cancel test? */ IgnoreErrors = 0, /* Ignore errors? */ + StopAfterIncludeError = 0, + /* Stop after include errors? */ Verbosity = 0, /* Show all attributes? */ Version = 11, /* Default IPP version */ XMLHeader = 0, /* 1 if header is written */ @@ -282,7 +284,20 @@ main(int argc, /* I - Number of command-line args */ for (i = 1; i < argc; i ++) { - if (argv[i][0] == '-') + if (!strcmp(argv[i], "--help")) + { + usage(); + } + else if (!strcmp(argv[i], "--stop-after-include-error")) + { + StopAfterIncludeError = 1; + } + else if (!strcmp(argv[i], "--version")) + { + puts(CUPS_SVERSION); + return (0); + } + else if (argv[i][0] == '-') { for (opt = argv[i] + 1; *opt; opt ++) { @@ -949,7 +964,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ { pass = 0; - if (!IgnoreErrors) + if (StopAfterIncludeError) goto test_exit; } } @@ -983,7 +998,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ { pass = 0; - if (!IgnoreErrors) + if (StopAfterIncludeError) goto test_exit; } } @@ -1018,7 +1033,7 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ { pass = 0; - if (!IgnoreErrors) + if (StopAfterIncludeError) goto test_exit; } } @@ -1071,6 +1086,28 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ goto test_exit; } } + else if (!strcmp(token, "STOP-AFTER-INCLUDE-ERROR")) + { + /* + * STOP-AFTER-INCLUDE-ERROR yes + * STOP-AFTER-INCLUDE-ERROR no + */ + + if (get_token(fp, temp, sizeof(temp), &linenum) && + (!_cups_strcasecmp(temp, "yes") || !_cups_strcasecmp(temp, "no"))) + { + StopAfterIncludeError = !_cups_strcasecmp(temp, "yes"); + } + else + { + print_fatal_error("Missing STOP-AFTER-INCLUDE-ERROR value on line %d.", + linenum); + pass = 0; + goto test_exit; + } + + continue; + } else if (!strcmp(token, "TRANSFER")) { /*