summaryrefslogtreecommitdiff
path: root/clients/zwrite
diff options
context:
space:
mode:
authorGravatar Kenneth G Raeburn <raeburn@mit.edu>1990-11-09 13:36:14 +0000
committerGravatar Kenneth G Raeburn <raeburn@mit.edu>1990-11-09 13:36:14 +0000
commit26c658aabcb9e23e61ae2f432adf5ed8319e642d (patch)
tree0d86b84fe6dbf600bb1fcf531714b4886d17057e /clients/zwrite
parent364720ec0bdcf5f5ebe0c2c11727c1efba7eb6cd (diff)
Added "From: " before signature in default formats.
Also made character arrays in main static (and therefore automatically cleared).
Diffstat (limited to 'clients/zwrite')
-rw-r--r--clients/zwrite/zwrite.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/clients/zwrite/zwrite.c b/clients/zwrite/zwrite.c
index 19e9537..382ef2b 100644
--- a/clients/zwrite/zwrite.c
+++ b/clients/zwrite/zwrite.c
@@ -43,23 +43,22 @@ main(argc, argv)
int argc;
char *argv[];
{
- ZNotice_t notice;
int retval, arg, nocheck, nchars, msgsize, filsys, tabexpand;
- char bfr[BUFSIZ], *message, *signature = NULL;
- char classbfr[BUFSIZ], instbfr[BUFSIZ], sigbfr[BUFSIZ], opbfr[BUFSIZ];
-
+ char *message, *signature = NULL;
+ static char bfr[BUFSIZ], classbfr[BUFSIZ], instbfr[BUFSIZ], sigbfr[BUFSIZ];
+ static char opbfr[BUFSIZ];
+ static ZNotice_t notice;
+
whoami = argv[0];
if ((retval = ZInitialize()) != ZERR_NONE) {
com_err(whoami, retval, "while initializing");
exit(1);
- }
+ }
if (argc < 2)
usage(whoami);
- bzero((char *) &notice, sizeof(notice));
-
auth = ZAUTH;
verbose = quiet = msgarg = nrecips = nocheck = filsys = nodot = 0;
tabexpand = 1;
@@ -214,12 +213,12 @@ main(argc, argv)
notice.z_default_format = "@bold(Filesystem Operation Message for $instance:)\nFrom: @bold($sender) at $time $date\n$message";
else if (auth == ZAUTH) {
if (signature)
- notice.z_default_format = "Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\n@bold($1) <$sender>\n\n$2";
+ notice.z_default_format = "Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold($1) <$sender>\n\n$2";
else
notice.z_default_format = "Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\n$message";
} else {
if (signature)
- notice.z_default_format = "@bold(UNAUTHENTIC) Class $class, Instance $instance at $time $date:\n@bold($1) <$sender>\n\n$2";
+ notice.z_default_format = "@bold(UNAUTHENTIC) Class $class, Instance $instance at $time $date:\nFrom: @bold($1) <$sender>\n\n$2";
else
notice.z_default_format = "@bold(UNAUTHENTIC) Class $class, Instance $instance at $time $date:\n$message";
}