diff options
Diffstat (limited to 'systemv')
-rw-r--r-- | systemv/Dependencies | 206 | ||||
-rw-r--r-- | systemv/Makefile | 8 | ||||
-rw-r--r-- | systemv/cupsaddsmb.c | 20 | ||||
-rw-r--r-- | systemv/cupsctl.c | 18 | ||||
-rw-r--r-- | systemv/cupstestdsc.c | 6 | ||||
-rw-r--r-- | systemv/cupstestppd.c | 112 | ||||
-rw-r--r-- | systemv/lp.c | 4 | ||||
-rw-r--r-- | systemv/lpadmin.c | 15 | ||||
-rw-r--r-- | systemv/lpoptions.c | 6 | ||||
-rw-r--r-- | systemv/lppasswd.c | 12 | ||||
-rw-r--r-- | systemv/lpstat.c | 4 |
11 files changed, 197 insertions, 214 deletions
diff --git a/systemv/Dependencies b/systemv/Dependencies index f40f77b8..84fc07b4 100644 --- a/systemv/Dependencies +++ b/systemv/Dependencies @@ -1,113 +1,93 @@ -# DO NOT DELETE THIS LINE -- make depend depends on it. - -cancel.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cancel.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -cancel.o: ../cups/language.h ../cups/string-private.h ../config.h -cancel.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -cancel.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -cancel.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -cancel.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -cancel.o: ../cups/transcode.h ../cups/thread-private.h -cupsaccept.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cupsaccept.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h -cupsaccept.o: ../cups/array.h ../cups/language.h ../cups/string-private.h -cupsaccept.o: ../config.h ../cups/debug-private.h ../cups/versioning.h -cupsaccept.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -cupsaccept.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -cupsaccept.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -cupsaccept.o: ../cups/language-private.h ../cups/transcode.h -cupsaccept.o: ../cups/thread-private.h -cupsaddsmb.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cupsaddsmb.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h -cupsaddsmb.o: ../cups/array.h ../cups/language.h ../cups/string-private.h -cupsaddsmb.o: ../config.h ../cups/debug-private.h ../cups/versioning.h -cupsaddsmb.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -cupsaddsmb.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -cupsaddsmb.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -cupsaddsmb.o: ../cups/language-private.h ../cups/transcode.h -cupsaddsmb.o: ../cups/thread-private.h ../cups/adminutil.h -cupsctl.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cupsctl.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -cupsctl.o: ../cups/language.h ../cups/string-private.h ../config.h -cupsctl.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -cupsctl.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -cupsctl.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -cupsctl.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -cupsctl.o: ../cups/transcode.h ../cups/thread-private.h ../cups/adminutil.h -cupstestdsc.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cupstestdsc.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h -cupstestdsc.o: ../cups/array.h ../cups/language.h ../cups/string-private.h -cupstestdsc.o: ../config.h ../cups/debug-private.h ../cups/versioning.h -cupstestdsc.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -cupstestdsc.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -cupstestdsc.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -cupstestdsc.o: ../cups/language-private.h ../cups/transcode.h -cupstestdsc.o: ../cups/thread-private.h -cupstestppd.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -cupstestppd.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h -cupstestppd.o: ../cups/array.h ../cups/language.h ../cups/string-private.h -cupstestppd.o: ../config.h ../cups/debug-private.h ../cups/versioning.h -cupstestppd.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -cupstestppd.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -cupstestppd.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -cupstestppd.o: ../cups/language-private.h ../cups/transcode.h -cupstestppd.o: ../cups/thread-private.h ../cups/dir.h ../cups/ppd-private.h -cupstestppd.o: ../cups/raster.h ../cups/ppd.h -lp.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lp.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lp.o: ../cups/language.h ../cups/string-private.h ../config.h -lp.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -lp.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -lp.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -lp.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -lp.o: ../cups/transcode.h ../cups/thread-private.h -lpadmin.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lpadmin.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lpadmin.o: ../cups/language.h ../cups/string-private.h ../config.h -lpadmin.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -lpadmin.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -lpadmin.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -lpadmin.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -lpadmin.o: ../cups/transcode.h ../cups/thread-private.h -lpinfo.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lpinfo.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lpinfo.o: ../cups/language.h ../cups/string-private.h ../config.h -lpinfo.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -lpinfo.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -lpinfo.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -lpinfo.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -lpinfo.o: ../cups/transcode.h ../cups/thread-private.h -lpmove.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lpmove.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lpmove.o: ../cups/language.h ../cups/string-private.h ../config.h -lpmove.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -lpmove.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -lpmove.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -lpmove.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -lpmove.o: ../cups/transcode.h ../cups/thread-private.h -lpoptions.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lpoptions.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h -lpoptions.o: ../cups/array.h ../cups/language.h ../cups/string-private.h -lpoptions.o: ../config.h ../cups/debug-private.h ../cups/versioning.h -lpoptions.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -lpoptions.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -lpoptions.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -lpoptions.o: ../cups/language-private.h ../cups/transcode.h -lpoptions.o: ../cups/thread-private.h -lppasswd.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lppasswd.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lppasswd.o: ../cups/language.h ../cups/string-private.h ../config.h -lppasswd.o: ../cups/debug-private.h ../cups/versioning.h -lppasswd.o: ../cups/ppd-private.h ../cups/ppd.h ../cups/cups.h -lppasswd.o: ../cups/pwg-private.h ../cups/http-private.h ../cups/http.h -lppasswd.o: ../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h -lppasswd.o: ../cups/language-private.h ../cups/transcode.h -lppasswd.o: ../cups/thread-private.h ../cups/md5-private.h -lpstat.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h -lpstat.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h -lpstat.o: ../cups/language.h ../cups/string-private.h ../config.h -lpstat.o: ../cups/debug-private.h ../cups/versioning.h ../cups/ppd-private.h -lpstat.o: ../cups/ppd.h ../cups/cups.h ../cups/pwg-private.h -lpstat.o: ../cups/http-private.h ../cups/http.h ../cups/md5-private.h -lpstat.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/language-private.h -lpstat.o: ../cups/transcode.h ../cups/thread-private.h +cancel.o: cancel.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +cupsaccept.o: cupsaccept.c ../cups/cups-private.h \ + ../cups/string-private.h ../config.h ../cups/debug-private.h \ + ../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \ + ../cups/http.h ../cups/array.h ../cups/http-private.h \ + ../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \ + ../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +cupsaddsmb.o: cupsaddsmb.c ../cups/cups-private.h \ + ../cups/string-private.h ../config.h ../cups/debug-private.h \ + ../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \ + ../cups/http.h ../cups/array.h ../cups/http-private.h \ + ../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \ + ../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \ + ../cups/adminutil.h +cupsctl.o: cupsctl.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \ + ../cups/adminutil.h +cupstestdsc.o: cupstestdsc.c ../cups/cups-private.h \ + ../cups/string-private.h ../config.h ../cups/debug-private.h \ + ../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \ + ../cups/http.h ../cups/array.h ../cups/http-private.h \ + ../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \ + ../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +cupstestppd.o: cupstestppd.c ../cups/cups-private.h \ + ../cups/string-private.h ../config.h ../cups/debug-private.h \ + ../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \ + ../cups/http.h ../cups/array.h ../cups/http-private.h \ + ../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \ + ../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \ + ../cups/dir.h ../cups/raster.h +lp.o: lp.c ../cups/cups-private.h ../cups/string-private.h ../config.h \ + ../cups/debug-private.h ../cups/versioning.h ../cups/ipp-private.h \ + ../cups/ipp.h ../cups/http.h ../cups/array.h ../cups/http-private.h \ + ../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \ + ../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lpadmin.o: lpadmin.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lpinfo.o: lpinfo.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lpmove.o: lpmove.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lpoptions.o: lpoptions.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lppasswd.o: lppasswd.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h +lpstat.o: lpstat.c ../cups/cups-private.h ../cups/string-private.h \ + ../config.h ../cups/debug-private.h ../cups/versioning.h \ + ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \ + ../cups/http-private.h ../cups/md5-private.h \ + ../cups/language-private.h ../cups/transcode.h ../cups/language.h \ + ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \ + ../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h diff --git a/systemv/Makefile b/systemv/Makefile index f218d03f..de6273f0 100644 --- a/systemv/Makefile +++ b/systemv/Makefile @@ -1,9 +1,9 @@ # -# "$Id: Makefile 8983 2010-02-13 02:20:23Z mike $" +# "$Id: Makefile 10191 2012-01-20 19:00:32Z mike $" # # System V commands makefile for CUPS. # -# Copyright 2007-2010 by Apple Inc. +# Copyright 2007-2012 by Apple Inc. # Copyright 1997-2006 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -57,7 +57,7 @@ clean: # depend: - makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 + $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies # @@ -289,5 +289,5 @@ include Dependencies # -# End of "$Id: Makefile 8983 2010-02-13 02:20:23Z mike $". +# End of "$Id: Makefile 10191 2012-01-20 19:00:32Z mike $". # diff --git a/systemv/cupsaddsmb.c b/systemv/cupsaddsmb.c index 959e8ac3..c307eb2c 100644 --- a/systemv/cupsaddsmb.c +++ b/systemv/cupsaddsmb.c @@ -1,9 +1,9 @@ /* - * "$Id: cupsaddsmb.c 9636 2011-03-21 22:02:00Z mike $" + * "$Id: cupsaddsmb.c 10431 2012-04-23 19:19:19Z mike $" * * "cupsaddsmb" command for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 2001-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -45,7 +45,7 @@ const char *SAMBAUser, */ int export_dest(http_t *http, const char *dest); -void usage(void); +void usage(void) __attribute__((noreturn)); /* @@ -282,22 +282,18 @@ usage(void) _cupsLangPuts(stdout, _(" cupsaddsmb [options] -a")); _cupsLangPuts(stdout, ""); _cupsLangPuts(stdout, _("Options:")); - _cupsLangPuts(stdout, _(" -E Encrypt the connection to " - "the server.")); + _cupsLangPuts(stdout, _(" -E Encrypt the connection.")); _cupsLangPuts(stdout, _(" -H samba-server Use the named SAMBA " "server.")); - _cupsLangPuts(stdout, _(" -U samba-user Authenticate using the " - "named SAMBA user.")); + _cupsLangPuts(stdout, _(" -U username Specify username.")); _cupsLangPuts(stdout, _(" -a Export all printers.")); - _cupsLangPuts(stdout, _(" -h cups-server Use the named CUPS " - "server.")); - _cupsLangPuts(stdout, _(" -v Be verbose (show " - "commands).")); + _cupsLangPuts(stdout, _(" -h server[:port] Specify server address.")); + _cupsLangPuts(stdout, _(" -v Be verbose.")); exit(1); } /* - * End of "$Id: cupsaddsmb.c 9636 2011-03-21 22:02:00Z mike $". + * End of "$Id: cupsaddsmb.c 10431 2012-04-23 19:19:19Z mike $". */ diff --git a/systemv/cupsctl.c b/systemv/cupsctl.c index 2f28bc43..ef1e2565 100644 --- a/systemv/cupsctl.c +++ b/systemv/cupsctl.c @@ -1,9 +1,9 @@ /* - * "$Id: cupsctl.c 9636 2011-03-21 22:02:00Z mike $" + * "$Id: cupsctl.c 10431 2012-04-23 19:19:19Z mike $" * * Scheduler control program for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 2006-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -32,7 +32,7 @@ * Local functions... */ -static void usage(const char *opt); +static void usage(const char *opt) __attribute__((noreturn)); /* @@ -83,12 +83,6 @@ main(int argc, /* I - Number of command-line args */ else if (!strcmp(argv[i], "--no-remote-any")) num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY, "0", num_settings, &settings); - else if (!strcmp(argv[i], "--remote-printers")) - num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS, "1", - num_settings, &settings); - else if (!strcmp(argv[i], "--no-remote-printers")) - num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS, "0", - num_settings, &settings); else if (!strcmp(argv[i], "--share-printers")) num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS, "1", num_settings, &settings); @@ -208,7 +202,7 @@ usage(const char *opt) /* I - Option character/string */ _cupsLangPuts(stdout, ""); _cupsLangPuts(stdout, _("Options:")); _cupsLangPuts(stdout, ""); - _cupsLangPuts(stdout, _(" -E Enable encryption.")); + _cupsLangPuts(stdout, _(" -E Encrypt the connection.")); _cupsLangPuts(stdout, _(" -U username Specify username.")); _cupsLangPuts(stdout, _(" -h server[:port] Specify server " "address.")); @@ -219,8 +213,6 @@ usage(const char *opt) /* I - Option character/string */ "administration on/off.")); _cupsLangPuts(stdout, _(" --[no-]remote-any Allow/prevent access " "from the Internet.")); - _cupsLangPuts(stdout, _(" --[no-]remote-printers Show/hide remote " - "printers.")); _cupsLangPuts(stdout, _(" --[no-]share-printers Turn printer sharing " "on/off.")); _cupsLangPuts(stdout, _(" --[no-]user-cancel-any Allow/prevent users to " @@ -231,5 +223,5 @@ usage(const char *opt) /* I - Option character/string */ /* - * End of "$Id: cupsctl.c 9636 2011-03-21 22:02:00Z mike $". + * End of "$Id: cupsctl.c 10431 2012-04-23 19:19:19Z mike $". */ diff --git a/systemv/cupstestdsc.c b/systemv/cupstestdsc.c index f773f1f6..748cc924 100644 --- a/systemv/cupstestdsc.c +++ b/systemv/cupstestdsc.c @@ -1,5 +1,5 @@ /* - * "$Id: cupstestdsc.c 9384 2010-11-22 07:06:39Z mike $" + * "$Id: cupstestdsc.c 9950 2011-09-01 23:02:24Z mike $" * * DSC test program for CUPS. * @@ -35,7 +35,7 @@ */ static int check_file(const char *filename); -static void usage(void); +static void usage(void) __attribute__((noreturn)); /* @@ -438,5 +438,5 @@ usage(void) /* - * End of "$Id: cupstestdsc.c 9384 2010-11-22 07:06:39Z mike $". + * End of "$Id: cupstestdsc.c 9950 2011-09-01 23:02:24Z mike $". */ diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index 10555c81..141790f5 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -1,5 +1,5 @@ /* - * "$Id: cupstestppd.c 10362 2012-03-19 15:31:53Z mike $" + * "$Id: cupstestppd.c 10431 2012-04-23 19:19:19Z mike $" * * PPD test program for CUPS. * @@ -129,7 +129,7 @@ static int check_translations(ppd_file_t *ppd, int errors, int verbose, 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); +static void usage(void) __attribute__((noreturn)); static int valid_path(const char *keyword, const char *path, int errors, int verbose, int warn); static int valid_utf8(const char *s); @@ -147,6 +147,7 @@ main(int argc, /* I - Number of command-line args */ int len; /* Length of option name */ char *opt; /* Option character */ const char *ptr; /* Pointer into string */ + cups_file_t *fp; /* PPD file */ int files; /* Number of files */ int verbose; /* Want verbose output? */ int warn; /* Which errors to just warn about */ @@ -303,7 +304,7 @@ main(int argc, /* I - Number of command-line args */ * Read from stdin... */ - ppd = ppdOpen(stdin); + ppd = _ppdOpen(cupsFileStdin(), _PPD_LOCALIZATION_ALL); if (verbose >= 0) printf("%s:", (ppd && ppd->pcfilename) ? ppd->pcfilename : "(stdin)"); @@ -317,7 +318,24 @@ main(int argc, /* I - Number of command-line args */ if (verbose >= 0) printf("%s:", argv[i]); - ppd = ppdOpenFile(argv[i]); + if ((fp = cupsFileOpen(argv[i], "r")) != NULL) + { + ppd = _ppdOpen(fp, _PPD_LOCALIZATION_ALL); + cupsFileClose(fp); + } + else + { + status = ERROR_FILE_OPEN; + + if (verbose >= 0) + { + _cupsLangPuts(stdout, _(" FAIL")); + _cupsLangPrintf(stdout, + _(" **FAIL** Unable to open PPD file - %s on " + "line %d."), strerror(errno), 0); + continue; + } + } } if (ppd == NULL) @@ -332,8 +350,8 @@ main(int argc, /* I - Number of command-line args */ { _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** Unable to open PPD file - %s"), - strerror(errno)); + _(" **FAIL** Unable to open PPD file - %s on " + "line %d."), strerror(errno), 0); } } else @@ -493,7 +511,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** BAD DefaultImageableArea %s\n" + _(" **FAIL** Bad DefaultImageableArea %s\n" " REF: Page 102, section 5.15."), attr->value); } @@ -529,7 +547,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** BAD DefaultPaperDimension %s\n" + _(" **FAIL** Bad DefaultPaperDimension %s\n" " REF: Page 103, section 5.15."), attr->value); } @@ -559,7 +577,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** BAD Default%s %s\n" + _(" **FAIL** Bad Default%s %s\n" " REF: Page 40, section 4.5."), option->keyword, option->defchoice); } @@ -721,10 +739,11 @@ main(int argc, /* I - Number of command-line args */ if (!errors && !verbose) _cupsLangPuts(stdout, _(" FAIL")); - _cupsLangPuts(stdout, - _(" **FAIL** BAD Manufacturer (should be " - "\"HP\")\n" - " REF: Page 211, table D.1.")); + _cupsLangPrintf(stdout, + _(" **FAIL** Bad Manufacturer (should be " + "\"%s\")\n" + " REF: Page 211, table D.1."), + "HP"); } errors ++; @@ -737,10 +756,11 @@ main(int argc, /* I - Number of command-line args */ if (!errors && !verbose) _cupsLangPuts(stdout, _(" FAIL")); - _cupsLangPuts(stdout, - _(" **FAIL** BAD Manufacturer (should be " - "\"Oki\")\n" - " REF: Page 211, table D.1.")); + _cupsLangPrintf(stdout, + _(" **FAIL** Bad Manufacturer (should be " + "\"%s\")\n" + " REF: Page 211, table D.1."), + "Oki"); } errors ++; @@ -777,7 +797,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** BAD ModelName - \"%c\" not " + _(" **FAIL** Bad ModelName - \"%c\" not " "allowed in string.\n" " REF: Pages 59-60, section 5.3."), *ptr); @@ -894,7 +914,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPuts(stdout, - _(" **FAIL** BAD Product - not \"(string)\".\n" + _(" **FAIL** Bad Product - not \"(string)\".\n" " REF: Page 62, section 5.3.")); } @@ -933,7 +953,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPuts(stdout, - _(" **FAIL** BAD PSVersion - not \"(string) " + _(" **FAIL** Bad PSVersion - not \"(string) " "int\".\n" " REF: Pages 62-64, section 5.3.")); } @@ -968,7 +988,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPuts(stdout, - _(" **FAIL** BAD ShortNickName - longer " + _(" **FAIL** Bad ShortNickName - longer " "than 31 chars.\n" " REF: Pages 64-65, section 5.3.")); } @@ -1002,7 +1022,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPuts(stdout, - _(" **FAIL** BAD JobPatchFile attribute in file\n" + _(" **FAIL** Bad JobPatchFile attribute in file\n" " REF: Page 24, section 3.4.")); } @@ -1126,7 +1146,7 @@ main(int argc, /* I - Number of command-line args */ _cupsLangPuts(stdout, _(" FAIL")); _cupsLangPrintf(stdout, - _(" **FAIL** Bad %s choice %s\n" + _(" **FAIL** Bad option %s choice %s\n" " REF: Page 84, section 5.9"), option->keyword, choice->choice); } @@ -2123,8 +2143,8 @@ check_case(ppd_file_t *ppd, /* I - PPD file */ if (verbose >= 0) _cupsLangPrintf(stdout, - _(" **FAIL** Multiple occurrences of %s " - "choice name %s."), + _(" **FAIL** Multiple occurrences of " + "option %s choice name %s."), optiona->keyword, choicea->choice); errors ++; @@ -2140,8 +2160,8 @@ check_case(ppd_file_t *ppd, /* I - PPD file */ if (verbose >= 0) _cupsLangPrintf(stdout, - _(" **FAIL** %s choice names %s and %s " - "differ only by case."), + _(" **FAIL** Option %s choice names %s and " + "%s differ only by case."), optiona->keyword, choicea->choice, choiceb->choice); errors ++; @@ -3197,17 +3217,27 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ _PWG_FROMPTS(size->width); pwg_media = _pwgMediaForSize(width_2540ths, length_2540ths); - if (pwg_media && pwg_media->ppd) + if (pwg_media && pwg_media->ppd && (pwg_media->ppd[0] < 'a' || pwg_media->ppd[0] > 'z')) { size_t ppdlen = strlen(pwg_media->ppd); /* Length of standard PPD name */ strlcpy(buf, pwg_media->ppd, sizeof(buf)); + if (strcmp(size->name, buf) && size->width > size->length) + { + if (!strcmp(pwg_media->ppd, "DoublePostcardRotated")) + strlcpy(buf, "DoublePostcard", sizeof(buf)); + else if (strstr(size->name, ".Transverse")) + snprintf(buf, sizeof(buf), "%s.Transverse", pwg_media->ppd); + else + snprintf(buf, sizeof(buf), "%sRotated", pwg_media->ppd); + } + if (size->left == 0 && size->bottom == 0 && size->right == size->width && size->top == size->length) { - snprintf(buf, sizeof(buf), "%s.Fullbleed", pwg_media->ppd); + strlcat(buf, ".Fullbleed", sizeof(buf) - strlen(buf)); if (_cups_strcasecmp(size->name, buf)) { /* @@ -3221,20 +3251,6 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ is_ok = 0; } } - else if (strcmp(size->name, buf) && size->width > size->length) - { - if (!strcmp(pwg_media->ppd, "DoublePostcardRotated")) - strlcpy(buf, "DoublePostcard", sizeof(buf)); - else - snprintf(buf, sizeof(buf), "%sRotated", pwg_media->ppd); - - if (strcmp(size->name, buf)) - { - snprintf(buf, sizeof(buf), "%s.Transverse", pwg_media->ppd); - if (strcmp(size->name, buf)) - is_ok = 0; - } - } else if (!strncmp(size->name, pwg_media->ppd, ppdlen)) { /* @@ -3263,7 +3279,8 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ * Check for EnvSizeName as well... */ - if (strncmp(pwg_media->ppd, "Env", 3)) + if (strncmp(pwg_media->ppd, "Env", 3) && + !strncmp(size->name, "Env", 3)) snprintf(buf, sizeof(buf), "Env%s", pwg_media->ppd); if (strcmp(size->name, buf)) @@ -3309,7 +3326,8 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */ size_t buflen = strlen(buf); /* Length of proposed name */ if (_cups_strncasecmp(size->name, buf, buflen) || - strcmp(size->name + buflen, "in")) + (strcmp(size->name + buflen, "in") && + size->name[buflen] != '.')) _cupsLangPrintf(stdout, _(" %s Size \"%s\" should be \"%s\"."), prefix, size->name, buf); @@ -3787,7 +3805,7 @@ usage(void) "errors.")); _cupsLangPuts(stdout, _(" -q Run silently.")); _cupsLangPuts(stdout, _(" -r Use 'relaxed' open mode.")); - _cupsLangPuts(stdout, _(" -v Be slightly verbose.")); + _cupsLangPuts(stdout, _(" -v Be verbose.")); _cupsLangPuts(stdout, _(" -vv Be very verbose.")); exit(ERROR_USAGE); @@ -3954,5 +3972,5 @@ valid_utf8(const char *s) /* I - String to check */ /* - * End of "$Id: cupstestppd.c 10362 2012-03-19 15:31:53Z mike $". + * End of "$Id: cupstestppd.c 10431 2012-04-23 19:19:19Z mike $". */ diff --git a/systemv/lp.c b/systemv/lp.c index 5f48d5d2..3ef59bab 100644 --- a/systemv/lp.c +++ b/systemv/lp.c @@ -1,5 +1,5 @@ /* - * "$Id: lp.c 10495 2012-05-21 22:40:33Z mike $" + * "$Id: lp.c 10494 2012-05-21 22:39:01Z mike $" * * "lp" command for CUPS. * @@ -724,5 +724,5 @@ set_job_attrs(const char *command, /* I - Command name */ /* - * End of "$Id: lp.c 10495 2012-05-21 22:40:33Z mike $". + * End of "$Id: lp.c 10494 2012-05-21 22:39:01Z mike $". */ diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index f51ec1e3..19664206 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -1,5 +1,5 @@ /* - * "$Id: lpadmin.c 9793 2011-05-20 03:49:49Z mike $" + * "$Id: lpadmin.c 10104 2011-11-04 06:37:03Z mike $" * * "lpadmin" command for CUPS. * @@ -1090,8 +1090,7 @@ delete_printer_option(http_t *http, /* I - Server connection */ * option with deleteAttr tag */ - if (get_printer_type(http, printer, uri, sizeof(uri)) & - (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) + if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS) request = ippNewRequest(CUPS_ADD_MODIFY_CLASS); else request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER); @@ -1145,8 +1144,7 @@ enable_printer(http_t *http, /* I - Server connection */ * printer-is-accepting-jobs */ - if (get_printer_type(http, printer, uri, sizeof(uri)) & - (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) + if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS) request = ippNewRequest(CUPS_ADD_MODIFY_CLASS); else request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER); @@ -1224,7 +1222,7 @@ get_printer_type(http_t *http, /* I - Server connection */ { type = (cups_ptype_t)attr->values[0].integer; - if (type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) + if (type & CUPS_PRINTER_CLASS) httpAssembleURIf(HTTP_URI_CODING_ALL, uri, urisize, "ipp", NULL, "localhost", ippPort(), "/classes/%s", printer); } @@ -1283,8 +1281,7 @@ set_printer_options( * other options */ - if (get_printer_type(http, printer, uri, sizeof(uri)) & - (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) + if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS) request = ippNewRequest(CUPS_ADD_MODIFY_CLASS); else request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER); @@ -1517,5 +1514,5 @@ validate_name(const char *name) /* I - Name to check */ /* - * End of "$Id: lpadmin.c 9793 2011-05-20 03:49:49Z mike $". + * End of "$Id: lpadmin.c 10104 2011-11-04 06:37:03Z mike $". */ diff --git a/systemv/lpoptions.c b/systemv/lpoptions.c index 438fcf2a..6b938245 100644 --- a/systemv/lpoptions.c +++ b/systemv/lpoptions.c @@ -1,5 +1,5 @@ /* - * "$Id: lpoptions.c 9793 2011-05-20 03:49:49Z mike $" + * "$Id: lpoptions.c 9950 2011-09-01 23:02:24Z mike $" * * Printer option program for CUPS. * @@ -33,7 +33,7 @@ static void list_group(ppd_file_t *ppd, ppd_group_t *group); static void list_options(cups_dest_t *dest); -static void usage(void); +static void usage(void) __attribute__((noreturn)); /* @@ -561,5 +561,5 @@ usage(void) /* - * End of "$Id: lpoptions.c 9793 2011-05-20 03:49:49Z mike $". + * End of "$Id: lpoptions.c 9950 2011-09-01 23:02:24Z mike $". */ diff --git a/systemv/lppasswd.c b/systemv/lppasswd.c index 32dc950a..efea0212 100644 --- a/systemv/lppasswd.c +++ b/systemv/lppasswd.c @@ -1,9 +1,9 @@ /* - * "$Id: lppasswd.c 9384 2010-11-22 07:06:39Z mike $" + * "$Id: lppasswd.c 9950 2011-09-01 23:02:24Z mike $" * * MD5 password program for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2011 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -48,7 +48,7 @@ * Local functions... */ -static void usage(FILE *fp); +static void usage(FILE *fp) __attribute__((noreturn)); /* @@ -429,7 +429,7 @@ main(int argc, /* I - Number of command-line arguments */ if (error) { _cupsLangPuts(stderr, _("lppasswd: Password file not updated.")); - + unlink(passwdnew); return (1); @@ -475,7 +475,7 @@ usage(FILE *fp) /* I - File to send usage to */ if (getuid()) _cupsLangPuts(fp, _("Usage: lppasswd [-g groupname]")); else - _cupsLangPuts(fp, + _cupsLangPuts(fp, _("Usage: lppasswd [-g groupname] [username]\n" " lppasswd [-g groupname] -a [username]\n" " lppasswd [-g groupname] -x [username]")); @@ -485,5 +485,5 @@ usage(FILE *fp) /* I - File to send usage to */ /* - * End of "$Id: lppasswd.c 9384 2010-11-22 07:06:39Z mike $". + * End of "$Id: lppasswd.c 9950 2011-09-01 23:02:24Z mike $". */ diff --git a/systemv/lpstat.c b/systemv/lpstat.c index 534be069..1513e70f 100644 --- a/systemv/lpstat.c +++ b/systemv/lpstat.c @@ -1,5 +1,5 @@ /* - * "$Id: lpstat.c 10064 2011-10-07 21:41:07Z mike $" + * "$Id: lpstat.c 10062 2011-10-07 21:05:19Z mike $" * * "lpstat" command for CUPS. * @@ -2050,5 +2050,5 @@ show_scheduler(void) /* - * End of "$Id: lpstat.c 10064 2011-10-07 21:41:07Z mike $". + * End of "$Id: lpstat.c 10062 2011-10-07 21:05:19Z mike $". */ |