.\"
.\" ipptoolfile man page for CUPS.
.\"
-.\" Copyright 2010 by Apple Inc.
+.\" Copyright 2010-2011 by Apple Inc.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" property of Apple Inc. and are protected by Federal copyright
.\" 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" "6 August 2010" "Apple Inc."
+.TH ipptoolfile 5 "CUPS" "11 May 2011" "Apple Inc."
.SH NAME
ipptoolfile \- ipptool file format
Defines the named variable to the given value. This is equivalent to specifying
"-d variable-name=value" on the \fIipptool\fR command-line.
.TP 5
+DEFINE-DEFAULT variable-name value
+Defines the named variable to the given value if it does not already have a
+value.
+.TP 5
IGNORE-ERRORS yes
.TP 5
IGNORE-ERRORS no
current test file, while the second form includes a file from the \fIipptool\fR
include directory.
.TP 5
+INCLUDE-IF-DEFINED name "filename"
+.TP 5
+INCLUDE-IF-DEFINED name <filename>
+Includes another test file if the named variable is defined. The first form
+includes a file relative to the current test file, while the second form
+includes a file from the \fIipptool\fR include directory.
+.TP 5
+INCLUDE-IF-NOT-DEFINED name "filename"
+.TP 5
+INCLUDE-IF-NOT-DEFINED name <filename>
+Includes another test file if the named variable is not defined. The first form
+includes a file relative to the current test file, while the second form
+includes a file from the \fIipptool\fR include directory.
+.TP 5
SKIP-IF-DEFINED variable-name
.TP 5
SKIP-IF-NOT-DEFINED variable-name
http://localhost:631/help
.SH COPYRIGHT
-Copyright 2007-2010 by Apple Inc.
+Copyright 2007-2011 by Apple Inc.
.\"
.\" End of "$Id$".
.\"
continue;
}
+ else if (!strcmp(token, "DEFINE-DEFAULT"))
+ {
+ /*
+ * DEFINE-DEFAULT name value
+ */
+
+ if (get_token(fp, attr, sizeof(attr), &linenum) &&
+ get_token(fp, temp, sizeof(temp), &linenum))
+ {
+ expand_variables(vars, token, temp, sizeof(token));
+ if (!get_variable(vars, attr))
+ set_variable(vars, attr, token);
+ }
+ else
+ {
+ print_fatal_error("Missing DEFINE-DEFAULT name and/or value on line "
+ "%d.", linenum);
+ pass = 0;
+ goto test_exit;
+ }
+
+ continue;
+ }
else if (!strcmp(token, "IGNORE-ERRORS"))
{
/*
show_header = 1;
continue;
}
+ else if (!strcmp(token, "INCLUDE-IF-DEFINED"))
+ {
+ /*
+ * INCLUDE-IF-DEFINED name "filename"
+ * INCLUDE-IF-DEFINED name <filename>
+ */
+
+ if (get_token(fp, attr, sizeof(attr), &linenum) &&
+ get_token(fp, temp, sizeof(temp), &linenum))
+ {
+ /*
+ * Map the filename to and then run the tests...
+ */
+
+ if (get_variable(vars, attr) &&
+ !do_tests(vars, get_filename(testfile, filename, temp,
+ sizeof(filename))))
+ {
+ pass = 0;
+
+ if (!IgnoreErrors)
+ goto test_exit;
+ }
+ }
+ else
+ {
+ print_fatal_error("Missing INCLUDE-IF-DEFINED name or filename on line "
+ "%d.", linenum);
+ pass = 0;
+ goto test_exit;
+ }
+
+ show_header = 1;
+ continue;
+ }
+ else if (!strcmp(token, "INCLUDE-IF-NOT-DEFINED"))
+ {
+ /*
+ * INCLUDE-IF-NOT-DEFINED name "filename"
+ * INCLUDE-IF-NOT-DEFINED name <filename>
+ */
+
+ if (get_token(fp, attr, sizeof(attr), &linenum) &&
+ get_token(fp, temp, sizeof(temp), &linenum))
+ {
+ /*
+ * Map the filename to and then run the tests...
+ */
+
+ if (!get_variable(vars, attr) &&
+ !do_tests(vars, get_filename(testfile, filename, temp,
+ sizeof(filename))))
+ {
+ pass = 0;
+
+ if (!IgnoreErrors)
+ goto test_exit;
+ }
+ }
+ else
+ {
+ print_fatal_error("Missing INCLUDE-IF-NOT-DEFINED name or filename on "
+ "line %d.", linenum);
+ pass = 0;
+ goto test_exit;
+ }
+
+ show_header = 1;
+ continue;
+ }
else if (!strcmp(token, "SKIP-IF-DEFINED"))
{
/*
}
else
{
- print_fatal_error("Missing SKIP-IF-DEFINED value on line %d.", linenum);
+ print_fatal_error("Missing SKIP-IF-DEFINED variable on line %d.",
+ linenum);
pass = 0;
goto test_exit;
}
}
else
{
- print_fatal_error("Missing SKIP-IF-NOT-DEFINED value on line %d.",
+ print_fatal_error("Missing SKIP-IF-NOT-DEFINED variable on line %d.",
linenum);
pass = 0;
goto test_exit;