cmds.c (1fd731fa257b02d4f7d555c9f432dfe88a67dc96) cmds.c (d397408818fbfa179246fb327659e3fb29ffff31)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 92 unchanged lines hidden (view full) ---

101generic(void (*specificrtn)(struct printer *_pp),
102 void (*initrtn)(int _argc, char *_argv[]), int argc, char *argv[])
103{
104 int cmdstatus, more, targc;
105 struct printer myprinter, *pp;
106 char **targv;
107
108 if (argc == 1) {
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 92 unchanged lines hidden (view full) ---

101generic(void (*specificrtn)(struct printer *_pp),
102 void (*initrtn)(int _argc, char *_argv[]), int argc, char *argv[])
103{
104 int cmdstatus, more, targc;
105 struct printer myprinter, *pp;
106 char **targv;
107
108 if (argc == 1) {
109 printf("Usage: %s {all | printer ...}\n", argv[0]);
109 printf("usage: %s {all | printer ...}\n", argv[0]);
110 return;
111 }
112
113 /*
114 * The initialization routine for a command might set a generic
115 * "wrapup" routine, which should be called after processing all
116 * the printers in the command. This might print summary info.
117 *

--- 673 unchanged lines hidden (view full) ---

791 */
792void
793down(int argc, char *argv[])
794{
795 int cmdstatus, more;
796 struct printer myprinter, *pp = &myprinter;
797
798 if (argc == 1) {
110 return;
111 }
112
113 /*
114 * The initialization routine for a command might set a generic
115 * "wrapup" routine, which should be called after processing all
116 * the printers in the command. This might print summary info.
117 *

--- 673 unchanged lines hidden (view full) ---

791 */
792void
793down(int argc, char *argv[])
794{
795 int cmdstatus, more;
796 struct printer myprinter, *pp = &myprinter;
797
798 if (argc == 1) {
799 printf("Usage: down {all | printer} [message ...]\n");
799 printf("usage: down {all | printer} [message ...]\n");
800 return;
801 }
802 if (!strcmp(argv[1], "all")) {
803 more = firstprinter(pp, &cmdstatus);
804 if (cmdstatus)
805 goto looperr;
806 while (more) {
807 putmsg(pp, argc - 2, argv + 2);

--- 267 unchanged lines hidden (view full) ---

1075topq(int argc, char *argv[])
1076{
1077 register int i;
1078 struct stat stbuf;
1079 int cmdstatus, changed;
1080 struct printer myprinter, *pp = &myprinter;
1081
1082 if (argc < 3) {
800 return;
801 }
802 if (!strcmp(argv[1], "all")) {
803 more = firstprinter(pp, &cmdstatus);
804 if (cmdstatus)
805 goto looperr;
806 while (more) {
807 putmsg(pp, argc - 2, argv + 2);

--- 267 unchanged lines hidden (view full) ---

1075topq(int argc, char *argv[])
1076{
1077 register int i;
1078 struct stat stbuf;
1079 int cmdstatus, changed;
1080 struct printer myprinter, *pp = &myprinter;
1081
1082 if (argc < 3) {
1083 printf("Usage: topq printer [jobnum ...] [user ...]\n");
1083 printf("usage: topq printer [jobnum ...] [user ...]\n");
1084 return;
1085 }
1086
1087 --argc;
1088 ++argv;
1089 init_printer(pp);
1090 cmdstatus = getprintcap(*argv, pp);
1091 switch(cmdstatus) {

--- 148 unchanged lines hidden ---
1084 return;
1085 }
1086
1087 --argc;
1088 ++argv;
1089 init_printer(pp);
1090 cmdstatus = getprintcap(*argv, pp);
1091 switch(cmdstatus) {

--- 148 unchanged lines hidden ---