/*
* PPD test program for CUPS.
*
- * Copyright 2007-2016 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * THIS PROGRAM IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION OF CUPS.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * missing or damaged, see the license at "http://www.cups.org/".
+ * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
- * PostScript is a trademark of Adobe Systems, Inc.
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more
+ * information.
*
- * This file is subject to the Apple OS-Developed Software exception.
+ * PostScript is a trademark of Adobe Systems, Inc.
*/
/*
#include <cups/ppd-private.h>
#include <cups/raster.h>
#include <math.h>
-#ifdef WIN32
+#ifdef _WIN32
# define X_OK 0
-#endif /* WIN32 */
+#endif /* _WIN32 */
/*
int warn);
static void show_conflicts(ppd_file_t *ppd, const char *prefix);
static int test_raster(ppd_file_t *ppd, int verbose);
-static void usage(void) __attribute__((noreturn));
+static void usage(void) _CUPS_NORETURN;
static int valid_path(const char *keyword, const char *path, int errors,
int verbose, int warn);
static int valid_utf8(const char *s);
ignore = WARN_NONE;
for (i = 1; i < argc; i ++)
- if (argv[i][0] == '-' && argv[i][1])
+ if (!strcmp(argv[i], "--help"))
+ usage();
+ else if (argv[i][0] == '-' && argv[i][1])
{
for (opt = argv[i] + 1; *opt; opt ++)
switch (*opt)
static void
usage(void)
{
- _cupsLangPuts(stdout, _("Usage: cupstestppd [options] filename1.ppd[.gz] "
- "[... filenameN.ppd[.gz]]"));
- _cupsLangPuts(stdout, _(" program | cupstestppd [options] -"));
- _cupsLangPuts(stdout, "");
+ _cupsLangPuts(stdout, _("Warning: This program will be removed in a future version of CUPS."));
+ _cupsLangPuts(stdout, _("Usage: cupstestppd [options] filename1.ppd[.gz] [... filenameN.ppd[.gz]]\n"
+ " program | cupstestppd [options] -"));
_cupsLangPuts(stdout, _("Options:"));
- _cupsLangPuts(stdout, "");
- _cupsLangPuts(stdout, _(" -I {filename,filters,none,profiles}"));
- _cupsLangPuts(stdout, _(" Ignore specific warnings."));
- _cupsLangPuts(stdout, _(" -R root-directory Set alternate root."));
- _cupsLangPuts(stdout, _(" -W {all,none,constraints,defaults,duplex,"
- "filters,profiles,sizes,translations}"));
- _cupsLangPuts(stdout, _(" Issue warnings instead of "
- "errors."));
- _cupsLangPuts(stdout, _(" -q Run silently."));
- _cupsLangPuts(stdout, _(" -r Use 'relaxed' open mode."));
- _cupsLangPuts(stdout, _(" -v Be verbose."));
- _cupsLangPuts(stdout, _(" -vv Be very verbose."));
+ _cupsLangPuts(stdout, _("-I {filename,filters,none,profiles}\n"
+ " Ignore specific warnings"));
+ _cupsLangPuts(stdout, _("-R root-directory Set alternate root"));
+ _cupsLangPuts(stdout, _("-W {all,none,constraints,defaults,duplex,filters,profiles,sizes,translations}\n"
+ " Issue warnings instead of errors"));
+ _cupsLangPuts(stdout, _("-q Run silently"));
+ _cupsLangPuts(stdout, _("-r Use 'relaxed' open mode"));
+ _cupsLangPuts(stdout, _("-v Be verbose"));
+ _cupsLangPuts(stdout, _("-vv Be very verbose"));
exit(ERROR_USAGE);
}