summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-04-25 07:33:49 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-04-25 07:33:49 +0000
commit75fac45c4606049a7abdc50b17d96a0f7e65c95c (patch)
tree806194b48608fecfa748e869cf7fcb8f1b02e38e
parentc32eacff7b0c13ce8bf872147d35570489feaba3 (diff)
if sending to urgent instance, make sure that recipients are specified.
change usage message accordingly
-rw-r--r--clients/zwrite/zwrite.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/clients/zwrite/zwrite.c b/clients/zwrite/zwrite.c
index 913152f..cd656ec 100644
--- a/clients/zwrite/zwrite.c
+++ b/clients/zwrite/zwrite.c
@@ -154,9 +154,12 @@ main(argc, argv)
}
if (!nrecips && !(strcmp(class, DEFAULT_CLASS) ||
- strcmp(inst, DEFAULT_INSTANCE))) {
+ (strcmp(inst, DEFAULT_INSTANCE) &&
+ strcmp(inst, URGENT_INSTANCE)))) {
+ /* must specify recipient if using default class and
+ (default instance or urgent instance) */
fprintf(stderr, "No recipients specified.\n");
- exit (1);
+ usage(whoami);
}
if (!signature) {
@@ -376,7 +379,10 @@ usage(s)
printf("Usage: %s [-a] [-o] [-d] [-v] [-q] [-n] [-t] [-u]\n\
\t[-c class] [-i inst] [-f fsname] [user ...] [-m message]\n", s);
printf("\t-f and -c are mutually exclusive\n\
-\t-f and -i are mutually exclusive\n");
+\t-f and -i are mutually exclusive\n\
+\trecipients must be specified unless -c or -f specifies a class\n\
+\tother than the default class or -i or -f specifies an instance\n\
+\tother than the default or urgent instance\n");
exit(1);
}