taylor@hpldat.UUCP (Dave Taylor) (05/03/87)
This is Elm Patch Kit #8 of 8, the final of the set, and contains patches for:
utils/Makefile.mstr utils/listalias.c test/test.mail filter/filter.c
filter/rules.c filter/actions.c filter/parse.c filter/utils2.c
Overview Instructions Configure.sh Makefile.mstr
NOTICE
Please feed this directly to 'patch'.
Index: utils/Makefile.mstr
***************
*** 29,31
! ../bin/from: from.c ../src/opt_utils.o ../src/string2.o
${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
--- 29,31 -----
! ../bin/from: from.c ../src/opt_utils.o ../src/string2.o ../src/getopt.o
${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
***************
*** 31,33
${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
! ../src/string2.o -o ../bin/from
--- 31,33 -----
${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
! ../src/string2.o ../src/getopt.o -o ../bin/from
Index: utils/listalias.c
***************
*** 57,59
if ((datafile = fopen(fd_data, "r")) == NULL) {
! fprintf("Opened %s hash file, but couldn't open data file!\n",
count? "system" : "user");
--- 57,59 -----
if ((datafile = fopen(fd_data, "r")) == NULL) {
! printf("Opened %s hash file, but couldn't open data file!\n",
count? "system" : "user");
Index: test/test.mail
***************
*** 40,42
! I believe your introduction referred to the uucp network. usenet is the networXk news
software mechanism and isn't a "network".
--- 40,42 -----
! I believe your introduction referred to the uucp network. usenet is the network news
software mechanism and isn't a "network".
***************
*** 64,66
backing up directories:
! ./users/fh ./users/rmd ./users/vince ./users/roberts ./users/row ./users/dt ./Xlost+found ./users/lost+found ./users/scb ./users/kevin ./users/du
--- 64,66 -----
backing up directories:
! ./users/fh ./users/rmd ./users/vince ./users/roberts ./users/row ./users/dt ./lost+found ./users/lost+found ./users/scb ./users/kevin ./users/du
***************
*** 77,79
backing up directories:
! ./users/fh ./users/rmd ./users/vince ./users/roberts ./users/row ./users/dt ./Xlost+found ./users/lost+found ./users/scb ./users/kevin ./users/du
--- 77,79 -----
backing up directories:
! ./users/fh ./users/rmd ./users/vince ./users/roberts ./users/row ./users/dt ./lost+found ./users/lost+found ./users/scb ./users/kevin ./users/du
***************
*** 83,85
backing up directories:
! ./users/sbh ./users/ges ./users/cpb ./users/amy ./net ./users/root ./users/balXza ./dev ./users/remple ./users/jr ./users/mwr ./users/larryf
--- 83,85 -----
backing up directories:
! ./users/sbh ./users/ges ./users/cpb ./users/amy ./net ./users/root ./users/balza ./dev ./users/remple ./users/jr ./users/mwr ./users/larryf
***************
*** 120,122
Received: by HP-VENUS via CSNET; 7 Aug 1985 09:11:37-PDT (Wed)
! Received: from sumex-aim.arpa by csnet-relay.arpa id a015812; 6 Aug 85 12:14 EDXT
To: hpcnof!veeger!hpcnou!dat%hplabs.csnet@CSNET-RELAY
--- 120,122 -----
Received: by HP-VENUS via CSNET; 7 Aug 1985 09:11:37-PDT (Wed)
! Received: from sumex-aim.arpa by csnet-relay.arpa id a015812; 6 Aug 85 12:14 EDT
To: hpcnof!veeger!hpcnou!dat%hplabs.csnet@CSNET-RELAY
***************
*** 197,199
>From root Mon Oct 21 10:28:58 1985 remote from hpcnof
! >From DLS.MDC%office-X.arpa@CSNET-RELAY Mon Oct 21 01:57:05 1985 remote from hXplabs
Received: by HP-VENUS id AA17376; Mon, 21 Oct 85 01:57:05 pdt
--- 197,199 -----
>From root Mon Oct 21 10:28:58 1985 remote from hpcnof
! >From DLS.MDC%office-X.arpa@CSNET-RELAY Mon Oct 21 01:57:05 1985 remote from hplabs
Received: by HP-VENUS id AA17376; Mon, 21 Oct 85 01:57:05 pdt
***************
*** 200,202
Date: 21 Oct 85 01:02 EDT
! From: Duane Stone / McDonnell Douglas / CSC-ASD <hplabs!DLS.MDC%office-1.arpa@CXSNET-RELAY>
Received: by HP-VENUS via CSNET; 21 Oct 1985 01:57:01-PDT (Mon)
--- 200,202 -----
Date: 21 Oct 85 01:02 EDT
! From: Duane Stone / McDonnell Douglas / CSC-ASD <hplabs!DLS.MDC%office-1.arpa@CSNET-RELAY>
Received: by HP-VENUS via CSNET; 21 Oct 1985 01:57:01-PDT (Mon)
***************
*** 202,204
Received: by HP-VENUS via CSNET; 21 Oct 1985 01:57:01-PDT (Mon)
! Received: from office-1.arpa by CSNET-RELAY.ARPA id a019220; 21 Oct 85 1:18 EDTX
To: Dave Taylor <hpcnou!dat%hplabs.csnet@CSNET-RELAY>
--- 202,204 -----
Received: by HP-VENUS via CSNET; 21 Oct 1985 01:57:01-PDT (Mon)
! Received: from office-1.arpa by CSNET-RELAY.ARPA id a019220; 21 Oct 85 1:18 EDT
To: Dave Taylor <hpcnou!dat%hplabs.csnet@CSNET-RELAY>
***************
*** 207,209
Message-Id: <MDC-DLS-7W9CS@OFFICE-1>
! Comment: Dave -- this is the body of the message I previously 'sent' to you viaX
--- 207,209 -----
Message-Id: <MDC-DLS-7W9CS@OFFICE-1>
! Comment: Dave -- this is the body of the message I previously 'sent' to you via
***************
*** 211,213
! I might suggest re-wording the para on Author -- my associates might object to X
'strange' -- something like:
--- 211,213 -----
! I might suggest re-wording the para on Author -- my associates might object to
'strange' -- something like:
***************
*** 219,221
! Length: This is computed when the message is sent and gives the recipients X
an estimate of the number of pages in the document.
--- 219,221 -----
! Length: This is computed when the message is sent and gives the recipients
an estimate of the number of pages in the document.
***************
*** 228,230
! Used to declare whether a Journal item should be Public or Private (to thoseX
that are on the distribution list or Extended Access list)
--- 228,230 -----
! Used to declare whether a Journal item should be Public or Private (to those
that are on the distribution list or Extended Access list)
***************
*** 299,301
Used to submit the message to the Journal. The adressees receive a short
! citation with other header fields and a "Location:" field pointing to a fileX
in an electronic library.
--- 299,301 -----
Used to submit the message to the Journal. The adressees receive a short
! citation with other header fields and a "Location:" field pointing to a file
in an electronic library.
***************
*** 317,319
Used to send a message "in-turn" to addressees in the "To:" field -- as
! opposed to the broadcast method of delivery where everyone gets the message X
"simultaneously". Any addresses in the "Cc:" field receive a copy of the
--- 317,319 -----
Used to send a message "in-turn" to addressees in the "To:" field -- as
! opposed to the broadcast method of delivery where everyone gets the message
"simultaneously". Any addresses in the "Cc:" field receive a copy of the
***************
*** 328,331
! Created when the user employs the Sign command; used to electronically sign X
! a message. It affixes a signature-block to a message. A "Verify Signature"X
command is available to recipients that lets them find out if anyone has
--- 328,331 -----
! Created when the user employs the Sign command; used to electronically sign
! a message. It affixes a signature-block to a message. A "Verify Signature"
command is available to recipients that lets them find out if anyone has
Index: filter/filter.c
***************
*** 19,20
(C) Copyright 1986, Dave Taylor
--- 19,23 -----
+ Rev 2.0: knows about From: and Reply-To:
+ Fix: knows that mail lines are approx. ~5K or greater...
+
(C) Copyright 1986, Dave Taylor
***************
*** 22,24
-
#include <stdio.h>
--- 25,26 -----
#include <stdio.h>
***************
*** 26,32
#include <ctype.h>
! #ifdef BSD
! # include <sys/time.h>
! #else
! # include <time.h>
! #endif
#include <fcntl.h>
--- 28,30 -----
#include <ctype.h>
! #include <time.h>
#include <fcntl.h>
***************
*** 46,48
char filename[SLEN], /* name of the temp file */
! buffer[LONG_SLEN]; /* input buffer space */
int in_header = TRUE, /* for header parsing */
--- 44,46 -----
char filename[SLEN], /* name of the temp file */
! buffer[MAX_LINE_LEN]; /* input buffer space */
int in_header = TRUE, /* for header parsing */
***************
*** 58,59
strcpy(username, passwd_entry->pw_name);
--- 56,58 -----
strcpy(username, passwd_entry->pw_name);
+ to[0] = '\0'; /* nothing read in yet, right? */
***************
*** 68,70
case 'l' : log_actions_only = TRUE; break;
! case 'r' : if (get_filter_rules() == -1)
fprintf(stderr,"Couldn't get rules!\n");
--- 67,70 -----
case 'l' : log_actions_only = TRUE; break;
! case 'r' : printing_rules = TRUE;
! if (get_filter_rules() == -1)
fprintf(stderr,"Couldn't get rules!\n");
***************
*** 96,98
! while (gets(buffer) != NULL) {
if (in_header) {
--- 96,101 -----
! while (fgets(buffer, MAX_LINE_LEN, stdin) != NULL) {
!
! remove_return(buffer);
!
if (in_header) {
***************
*** 106,108
save_subject(buffer);
! else if (the_same(buffer, "To:")) {
in_to++;
--- 109,111 -----
save_subject(buffer);
! else if (the_same(buffer, "To:") || the_same(buffer, "Cc:")) {
in_to++;
***************
*** 112,113
already_been_forwarded++; /* could be a loop here! */
else if (strlen(buffer) < 2)
--- 115,122 -----
already_been_forwarded++; /* could be a loop here! */
+ #ifdef USE_EMBEDDED_ADDRESSES
+ else if (the_same(buffer, "From:"))
+ save_embedded_address(buffer, "From:");
+ else if (the_same(buffer, "Reply-To:"))
+ save_embedded_address(buffer, "Reply-To:");
+ #endif
else if (strlen(buffer) < 2)
***************
*** 196,198
{
! /** save all but the word "To:" for the to list **/
--- 205,207 -----
{
! /** save all but the word "To:" or "Cc:" for the to list **/
***************
*** 198,200
! register int skip = 3; /* skip "To:" initially */
--- 207,209 -----
! register int skip = 3; /* skip "To:" or "Cc:" initially */
***************
*** 202,204
! strcpy(to, (char *) buffer + skip);
}
--- 211,213 -----
! strcat(to, (char *) buffer + skip);
}
***************
*** 204,204
}
--- 213,262 -----
}
+
+ #ifdef USE_EMBEDDED_ADDRESSES
+
+ save_embedded_address(buffer, fieldname)
+ char *buffer, *fieldname;
+ {
+ /** this will replace the 'from' address with the one given,
+ unless the address is from a 'reply-to' field (which overrides
+ the From: field). The buffer given to this routine can have one
+ of three forms:
+ fieldname: username <address>
+ fieldname: address (username)
+ fieldname: address
+ **/
+
+ static int processed_a_reply_to = 0;
+ char address[SLEN];
+ register int i, j = 0;
+
+ /** first let's extract the address from this line.. **/
+
+ if (buffer[strlen(buffer)-1] == '>') { /* case #1 */
+ for (i=strlen(buffer)-1; buffer[i] != '<' && i > 0; i--)
+ /* nothing - just move backwards .. */ ;
+ i++; /* skip the leading '<' symbol */
+ while (buffer[i] != '>')
+ address[j++] = buffer[i++];
+ address[j] = '\0';
+ }
+ else { /* get past "from:" and copy until white space or paren hit */
+ for (i=strlen(fieldname); whitespace(buffer[i]); i++)
+ /* skip past that... */ ;
+ while (buffer[i] != '(' && ! whitespace(buffer[i]))
+ address[j++] = buffer[i++];
+ address[j] = '\0';
+ }
+
+ /** now let's see if we should overwrite the existing from address
+ with this one or not.. **/
+
+ if (processed_a_reply_to)
+ return; /* forget it! */
+
+ strcpy(from, address); /* replaced!! */
+
+ if (strcmp(fieldname, "Reply-To:") == 0)
+ processed_a_reply_to++;
+ }
+ #endif
Index: filter/rules.c
***************
*** 11,17
#include <ctype.h>
! #ifdef BSD
! # include <sys/time.h>
! #else
! # include <time.h>
! #endif
#include <fcntl.h>
--- 11,13 -----
#include <ctype.h>
! #include <time.h>
#include <fcntl.h>
***************
*** 21,22
int
--- 17,20 -----
+ char *listrule();
+
int
***************
*** 50,53
"%sfilter (%s): Error: rules based on 'contains' are not implemented!\n",
! BEEP, username);
! exit(0);
}
--- 48,53 -----
"%sfilter (%s): Error: rules based on 'contains' are not implemented!\n",
! BEEP, username);
! exit(0);
!
! case ALWAYS: not = FALSE; x = TRUE; break;
}
***************
*** 77,79
! expand_macros(word, buffer, line)
char *word, *buffer;
--- 77,79 -----
! expand_macros(word, buffer, line, display)
char *word, *buffer;
***************
*** 79,81
char *word, *buffer;
! int line;
{
--- 79,81 -----
char *word, *buffer;
! int line, display;
{
***************
*** 91,93
%y = year
! or simply copies word into buffer.
**/
--- 91,94 -----
%y = year
! or simply copies word into buffer. If "display" is set then
! instead it puts "<day-of-month>" etc. etc. in the output.
**/
***************
*** 104,106
case 'r' : buffer[j] = '\0';
! strcat(buffer, from);
j = strlen(buffer);
--- 105,110 -----
case 'r' : buffer[j] = '\0';
! if (display)
! strcat(buffer, "<return-address>");
! else
! strcat(buffer, from);
j = strlen(buffer);
***************
*** 109,111
case 's' : buffer[j] = '\0';
! strcat(buffer, subject);
j = strlen(buffer);
--- 113,121 -----
case 's' : buffer[j] = '\0';
! if (display)
! strcat(buffer, "<subject>");
! else {
! strcat(buffer, "\"");
! strcat(buffer, subject);
! strcat(buffer, "\"");
! }
j = strlen(buffer);
***************
*** 114,116
case 'S' : buffer[j] = '\0';
! if (! the_same(subject, "Re:"))
strcat(buffer, subject);
--- 124,130 -----
case 'S' : buffer[j] = '\0';
! if (display)
! strcat(buffer, "<Re: subject>");
! else {
! if (! the_same(subject, "Re:"))
! strcat(buffer, "\"Re: ");
strcat(buffer, subject);
***************
*** 116,118
strcat(buffer, subject);
! strcat(buffer, subject);
j = strlen(buffer);
--- 130,133 -----
strcat(buffer, subject);
! strcat(buffer, "\"");
! }
j = strlen(buffer);
***************
*** 121,123
case 'd' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_mday,FALSE));
j = strlen(buffer);
--- 136,141 -----
case 'd' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<day-of-month>");
! else
! strcat(buffer, itoa(timerec->tm_mday,FALSE));
j = strlen(buffer);
***************
*** 126,128
case 'D' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_wday,FALSE));
j = strlen(buffer);
--- 144,149 -----
case 'D' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<day-of-week>");
! else
! strcat(buffer, itoa(timerec->tm_wday,FALSE));
j = strlen(buffer);
***************
*** 131,133
case 'm' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_mon,FALSE));
j = strlen(buffer);
--- 152,157 -----
case 'm' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<month>");
! else
! strcat(buffer, itoa(timerec->tm_mon,FALSE));
j = strlen(buffer);
***************
*** 136,138
case 'y' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_year,FALSE));
j = strlen(buffer);
--- 160,165 -----
case 'y' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<year>");
! else
! strcat(buffer, itoa(timerec->tm_year,FALSE));
j = strlen(buffer);
***************
*** 141,143
case 'h' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_hour,FALSE));
j = strlen(buffer);
--- 168,173 -----
case 'h' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<hour>");
! else
! strcat(buffer, itoa(timerec->tm_hour,FALSE));
j = strlen(buffer);
***************
*** 146,150
case 't' : get_the_time(); buffer[j] = '\0';
! strcat(buffer, itoa(timerec->tm_hour,FALSE));
! strcat(buffer, ":");
! strcat(buffer, itoa(timerec->tm_min,TRUE));
j = strlen(buffer);
--- 176,184 -----
case 't' : get_the_time(); buffer[j] = '\0';
! if (display)
! strcat(buffer, "<time>");
! else {
! strcat(buffer, itoa(timerec->tm_hour,FALSE));
! strcat(buffer, ":");
! strcat(buffer, itoa(timerec->tm_min,TRUE));
! }
j = strlen(buffer);
***************
*** 161,163
else
! buffer[j++] = word[i];
}
--- 195,197 -----
else
! buffer[j++] = (word[i] == '_' ? ' ' : word[i]);
}
***************
*** 175,176
while (++i < total_rules) {
printf("\nRule %d: if (", i+1);
--- 209,216 -----
while (++i < total_rules) {
+ if (rules[i].condition->matchwhat == ALWAYS) {
+ printf("\nRule %d: ** always ** \n\t%s %s\n", i+1,
+ actionname(rules[i].action), listrule(rules[i].argument2));
+ continue;
+ }
+
printf("\nRule %d: if (", i+1);
***************
*** 202,204
actionname(rules[i].action),
! rules[i].argument2);
}
--- 242,244 -----
actionname(rules[i].action),
! listrule(rules[i].argument2));
}
***************
*** 259,260
return(-1);
}
--- 299,316 -----
return(-1);
+ }
+
+ char *listrule(rule)
+ char *rule;
+ {
+ /** simply translates all underscores into spaces again on the
+ way past... **/
+
+ static char buffer[SLEN];
+ register int i;
+
+ for (i=0; i < strlen(rule); i++)
+ buffer[i] = (rule[i] == '_' ? ' ' : rule[i]);
+ buffer[i] = '\0';
+
+ return( (char *) buffer);
}
Index: filter/actions.c
***************
*** 39,41
! if ((tempfd = fopen(tempfile, "r")) < 0) {
fprintf(stderr, "%sfilter (%s): Can't open temp file %s!!\n",
--- 39,41 -----
! if ((tempfd = fopen(tempfile, "r")) == NULL) {
fprintf(stderr, "%sfilter (%s): Can't open temp file %s!!\n",
***************
*** 134,135
while (fgets(buffer, sizeof(buffer), tempfd) != NULL) {
--- 134,136 -----
+
while (fgets(buffer, sizeof(buffer), tempfd) != NULL) {
***************
*** 141,142
}
--- 142,145 -----
}
+
+ fputs("\n", mailfd);
Index: filter/parse.c
***************
*** 130,132
! else if (the_same(word,"?") || the_same(word, "then")) {
--- 130,133 -----
! else if (the_same(word,"?") || the_same(word, "then") ||
! the_same(word, "always")) {
***************
*** 141,143
! cond->matchwhat = lasttype;
if (relop == NONE) relop = EQ; /* otherwise can't do -relop */
--- 142,148 -----
! if (the_same(word, "always"))
! cond->matchwhat = ALWAYS; /* so it's a hack... */
! else
! cond->matchwhat = lasttype;
!
if (relop == NONE) relop = EQ; /* otherwise can't do -relop */
***************
*** 286,288
rules[total_rules].action = action;
! expand_macros(action_argument, rules[total_rules].argument2,line);
total_rules++;
--- 291,294 -----
rules[total_rules].action = action;
! expand_macros(action_argument, rules[total_rules].argument2,line,
! printing_rules);
total_rules++;
Index: filter/utils2.c
***************
*** 9,10
#ifdef BSD
--- 9,12 -----
+ #include "defs.h"
+
#ifdef BSD
***************
*** 14,15
#ifdef NEED_GETHOSTNAME
# include <sys/utsname.h>
--- 16,18 -----
#ifdef NEED_GETHOSTNAME
+ # include <sys/types.h>
# include <sys/utsname.h>
***************
*** 33,36
(void) strncpy(hostname,name.nodename,size-1);
! hostname[size] = '\0';
!
}
--- 36,38 -----
(void) strncpy(hostname,name.nodename,size-1);
! hostname[size-1] = '\0';
}
Index: Overview
***************
*** 6,9
This file discusses the functionality of the Elm mail system
! and explains some of the motivation behind the creation and of various
! features.
--- 6,8 -----
This file discusses the functionality of the Elm mail system
! and explains some of the motivation behind the various features.
***************
*** 117,119
screens and commands, are legally copyrighted by the author, and while
! they can be used, and abused for public domain systems, will be in
violation of the law if used in systems or programs sold for profit.
--- 116,118 -----
screens and commands, are legally copyrighted by the author, and while
! they can be used, and abused, for public domain systems, it will be in
violation of the law if used in systems or programs sold for profit.
***************
*** 132,134
! hplabs!taylor
--- 131,133 -----
! taylor@hplabs.HP.COM
Index: Instructions
***************
*** 4,6
! Last Update: July 17th, 1986
--- 4,6 -----
! Last Update: January 19th, 1987
***************
*** 34,36
! When that's done, or even if it fails (don't worry too much about it)
--- 34,37 -----
! When that's done, or even if it fails (don't worry too much about it) AS
! ROOT, do the following:
***************
*** 50,52
"answer", "arepdaemon", "autoreply", "fastmail", "from",
! "elm", "newalias", "newmail", "printmail", and "readmsg".
--- 51,53 -----
"answer", "arepdaemon", "autoreply", "fastmail", "from",
! "elm", "newalias", "newmail", "printmail", "readmsg" and "listalias".
***************
*** 65,67
! should say "no mail" if nothing's in your incoming mailbox, and
--- 66,69 -----
! should say "no mail" if nothing's in your incoming mailbox or should
! start up the Elm program if there is, and
***************
*** 71,78
A)lias C)urrent message for each of the eight messages to confirm that
! the reply/address system is working okay. Now try to C)hange mailboxes
! to the file "test/test.note" and use the '%' key to see if the mailer is
! generating valid return addresses for the notes (If not, then you might
! need to install the pathalias database - see "sysdefs.h" for more info)
! Change back to "test/test.mail" and Q)uit without having marked anything
! for deletion...answer the questions accordingly.
--- 73,76 -----
A)lias C)urrent message for each of the eight messages to confirm that
! the reply/address system is working okay. Now Q)uit without having
! marked anything for deletion...answer the questions accordingly.
***************
*** 131,132
! (C) Copyright 1986, Dave Taylor
--- 129,130 -----
! (C) Copyright 1986, 1987 by Dave Taylor
Index: Configure.sh
***************
*** 47,49
! Elm Configuration Script, v4
--- 47,49 -----
! Elm Configuration Script, v5
***************
*** 88,89
exit 0
--- 88,94 -----
+ if [ -d /.attbin ]
+ then
+ echo "pyramid" > .osname
+ fi
+
exit 0
***************
*** 130,132
sun) NAME="BSD"; OS_FLAG=""; ;;
! pyramid) NAME="Pyramid BSD"; OS_FLAG="PYRAMID"; ;;
amdahl) NAME="UTS"; OS_FLAG="UTS"; ;;
--- 135,137 -----
sun) NAME="BSD"; OS_FLAG=""; ;;
! pyramid|osx*)NAME="Pyramid BSD"; OS_FLAG="PYRAMID"; ;;
amdahl) NAME="UTS"; OS_FLAG="UTS"; ;;
***************
*** 472,474
! $rm -f a.out .test.c .vfork .log
--- 477,479 -----
! $rm -f a.out .test.c .vfork .log .test.o
***************
*** 497,499
! $rm -f a.out .test.c .hostname .log
--- 502,504 -----
! $rm -f a.out .test.c .hostname .log .test.o
***************
*** 499,500
# next let's see if we have long variable names...
--- 504,530 -----
+ # how about the cuserid() routine?
+
+ cat << EOF > .test.c
+ main()
+ {
+ (void) cuserid();
+ }
+ EOF
+
+ cat << EOF > .cuserid
+ cc .test.c
+ EOF
+
+ sh .cuserid > .log 2>& 1
+
+ if [ "`cat .log | wc -l`" -eq "0" ]
+ then
+ echo "You have the 'cuserid()' system call..."
+ else
+ echo "s/\/\*\* #define NEED_CUSERID \*\*\//#define NEED_CUSERID/" \
+ >> $SED1
+ fi
+
+ $rm -f a.out .test.c .cuserid .log .test.o
+
# next let's see if we have long variable names...
***************
*** 527,529
! $rm -f a.out .test.c .varnames .log
--- 557,559 -----
! $rm -f a.out .test.c .varnames .log .test.o
***************
*** 607,608
case $OS_FLAG in
--- 637,651 -----
+ if [ ! -f /usr/lib/libtermcap.a -a ! -f /lib/libtermcap.a ]
+ then
+ if [ ! -f /usr/lib/libtermlib.a -a ! -f /lib/libtermlib.a ]
+ then
+ echo "You don't have termcap or termlib! Using terminfo but it might fail"
+ termlib=termlib
+ else
+ termlib=termlib
+ fi
+ else
+ termlib=termcap
+ fi
+
case $OS_FLAG in
***************
*** 612,614
then
! echo "s/>libs</-ltermcap -ldbm/" >> $SED2
else
--- 655,657 -----
then
! echo "s/>libs</-l$termlib -ldbm/" >> $SED2
else
***************
*** 614,616
else
! echo "s/>libs</-ltermcap/" >> $SED2
fi
--- 657,659 -----
else
! echo "s/>libs</-l$termlib/" >> $SED2
fi
***************
*** 622,624
then
! echo "s/>libs</-ltermcap -ldbm/" >> $SED2
else
--- 665,667 -----
then
! echo "s/>libs</-l$termlib -ldbm/" >> $SED2
else
***************
*** 624,626
else
! echo "s/>libs</-ltermcap/" >> $SED2
fi
--- 667,669 -----
else
! echo "s/>libs</-l$termlib/" >> $SED2
fi
***************
*** 642,644
then
! echo "s/>libs</-ltermcap -ldbm/" >> $SED2
else
--- 685,687 -----
then
! echo "s/>libs</-l$termlib -ldbm/" >> $SED2
else
***************
*** 644,646
else
! echo "s/>libs</-ltermcap/" >> $SED2
fi
--- 687,689 -----
else
! echo "s/>libs</-l$termlib/" >> $SED2
fi
***************
*** 749,751
then
! echo "s^/bin/rm^$answer^" >> $SED1
fi
--- 792,794 -----
then
! echo "s^/bin/cat^$answer^" >> $SED1
fi
***************
*** 753,755
! if [ ! -c /dev/rct ]
then
--- 796,798 -----
! if [ ! -f /dev/rct ]
then
***************
*** 755,757
then
! if [ ! -c /dev/rmt ]
then
--- 798,800 -----
then
! if [ ! -f /dev/rmt ]
then
Index: Makefile.mstr
***************
*** 23,26
LIB= /usr/local/lib
! MAN= /usr/man/man1
! CATMAN= /usr/man/cat1
SHAR= /usr/local/bin/shar -s 60000
--- 23,26 -----
LIB= /usr/local/lib
! MAN= /usr/local/man/man1
! CATMAN= /usr/local/man/cat1
SHAR= /usr/local/bin/shar -s 60000
***************
*** 90,92
doc/Filter.fmtd: doc/Filter.guide
! ${TBL} doc/Filter.guide | ${FORMATTER} -mm > doc/Filter.fmtd
--- 90,92 -----
doc/Filter.fmtd: doc/Filter.guide
! ${FORMATTER} -mm doc/Filter.guide > doc/Filter.fmtd
***************
*** 104,106
! bin/utils: ${UTILSRC} ${MISCHHDRS}
cd utils; make 'DEFINE=${DEFINE}' 'LIBS=${LIB2}' all
--- 104,106 -----
! bin/utils: ${UTILSRC} ${MISCHDRS}
cd utils; make 'DEFINE=${DEFINE}' 'LIBS=${LIB2}' all
Index: NOTICE
***************
*** 4,6
! (C) Copyright 1986, Dave Taylor
--- 4,6 -----
! (C) Copyright 1986, 1987, by Dave Taylor
***************
*** 13,15
! 1. You may without additional permission from the author, distribute
Elm or components of Elm, with or without additions developed by
--- 13,15 -----
! 1. You may, without additional permission from the author, distribute
Elm or components of Elm, with or without additions developed by
***************
*** 19,21
and provided that those interested only in Elm must be notified
! that it is product freely available from the author.
--- 19,21 -----
and provided that those interested only in Elm must be notified
! that it is a product freely available from the author.
***************
*** 23,25
or without additions developed by you or others, then you must
! either make available source of all portions of the Elm program
(exclusive of any additions made by you or by others) upon request,
--- 23,25 -----
or without additions developed by you or others, then you must
! either make available the source to all portions of the Elm system
(exclusive of any additions made by you or by others) upon request,
***************
*** 35,38
! 5. Lastly, any users of this software must be notified that it is any
! without warrantee, or guarantee of any nature, express or implied,
nor is there any fitness for use represented.
--- 35,38 -----
! 5. Lastly, any users of this software must be notified that it is
! without warrantee or guarantee of any nature, express or implied,
nor is there any fitness for use represented.
***************
*** 51,53
! NOTE that it is not permitted to copy, sublicense distribute or transfer any
of the Elm software except as expressly indicated herein. Any attempts to
--- 51,53 -----
! NOTE that it is not permitted to copy, sublicense, distribute or transfer any
of the Elm software except as expressly indicated herein. Any attempts to
End of 6,
u
u