taylor@hpldat.UUCP (Dave Taylor) (05/03/87)
This is Elm Patch kit #1 of 8 and contains patches for: doc/elm-help.1 doc/Alias.guide doc/Ref.guide doc/elm-help.2 doc/elmrc-info doc/Filter.guide src/alias.c src/curses.c src/date.c Please feed this file directly to the 'patch' program. Index: doc/elm-help.1 *************** *** 1,3 ! Commands available from the Options Menu --- 1,3 ----- ! Commands available from the Alias Menu *************** *** 5,8 ---- ------- - c Change `calendar' file to the file specified. See '<' at top level - menu for more information on this. --- 5,6 ----- ---- ------- *************** *** 8,11 ! d Display pager. `builtin' will use the built-in pager, or you ! can put anything else you'd like, including "/bin/more" --- 6,8 ----- ! ? help on a specific key, or this summary of commands. *************** *** 11,13 ! e Editor to use when composing messages --- 8,10 ----- ! a Add return address of current message to alias database *************** *** 13,15 ! f Folder directory. This is what '=', '+', or '%' expands to. --- 10,12 ----- ! m Make new user alias, adding to alias database when done *************** *** 15,17 ! s Sorting criteria. Step through with space, <return> selects. --- 12,18 ----- ! r,x return from the alias menu ! ! p check for a person in the alias database ! ! s check for a system in the host routing/domain database *************** *** 17,26 - o Outbound mail file. Where to save copies of outbound mail. - - p How to print messages. '%s' can be used as a filename holder - - y Your fullname for outbound mail. - - a arrow cursor. Changes from "->" to inverse bar and back - - m display mini-menus or not. Expert users usually don't. --- 18,18 ----- Index: doc/Alias.guide *************** *** 126,128 Note that the alias for Walter Underwood has two \fIaliasnames\fR associated ! with it, \fIwunder\fR and \fIwalterf\R. Also notice that the first four aliases use the Internet style naming convention (\fIuser@machine\fR) but the last two --- 126,128 ----- Note that the alias for Walter Underwood has two \fIaliasnames\fR associated ! with it, \fIwunder\fR and \fIwalter\fR. Also notice that the first four aliases use the Internet style naming convention (\fIuser@machine\fR) but the last two Index: doc/Ref.guide *************** *** 143,145 .LI "prefix" ! When you \fIreply\fR to a message or \fIforward\fR a message to another person,X you can optionally include the original message. Defining the --- 143,145 ----- .LI "prefix" ! When you \fIreply\fR to a message or \fIforward\fR a message to another person, you can optionally include the original message. Defining the *************** *** 357,359 .nf ! Message #\fIN\fR from \fIusername\fR Mailed \fIdate\fR at \fItimXe\fR .fi --- 357,359 ----- .nf ! Message #\fIN\fR from \fIusername\fR Mailed \fIdate\fR at \fItime\fR .fi *************** *** 441,443 ! # should we always leave messages as pending (change the default answer to yeXs) alwaysleave = ON --- 441,443 ----- ! # should we always leave messages as pending (change the default answer to yes) alwaysleave = ON *************** *** 466,468 ! # when using the page commands (+ - <NEXT> <PREV>) change the current messageX pointer... movepage = ON --- 466,468 ----- ! # when using the page commands (+ - <NEXT> <PREV>) change the current message pointer... movepage = ON *************** *** 478,480 ! # emulate the Berkeley Mail message increment mode (only increment after someXthing # has been 'done' to a message, either saved or deleted) --- 478,480 ----- ! # emulate the Berkeley Mail message increment mode (only increment after something # has been 'done' to a message, either saved or deleted) *************** *** 504,509 # what headers I DON'T want to see, ever. ! weedout = "Path:" "Via:" "Sent:" "Date" "Status:" "Original" "Phase" "SubjectX:" "Fruit" "Sun" "Lat" ! "Buzzword" "Return" "Posted" "Telephone" "Postal-Address" "Origin" "X-Sent-By-XNmail-V" "Resent" ! "X-Location" "Source" "Mood" "Neuron" "Libido" "To:" "X-Mailer:" "Full-Name:" X"X-HPMAIL" "Cc:" ! "cc:" "Mmdf" "Network-" "Really-" "Sender:" "Post" "Message-" "Relay-" "ArticlXe-" "Lines:" "Approved:" "Xref:" "Organization:" --- 504,509 ----- # what headers I DON'T want to see, ever. ! weedout = "Path:" "Via:" "Sent:" "Date" "Status:" "Original" "Phase" "Subject:" "Fruit" "Sun" "Lat" ! "Buzzword" "Return" "Posted" "Telephone" "Postal-Address" "Origin" "X-Sent-By-Nmail-V" "Resent" ! "X-Location" "Source" "Mood" "Neuron" "Libido" "To:" "X-Mailer:" "Full-Name:" "X-HPMAIL" "Cc:" ! "cc:" "Mmdf" "Network-" "Really-" "Sender:" "Post" "Message-" "Relay-" "Article-" "Lines:" "Approved:" "Xref:" "Organization:" *************** *** 819,820 (see \fIbounce\fR above, too) .LI "j, k" --- 819,825 ----- (see \fIbounce\fR above, too) + .LI "g" + Group reply. Identical to \fIreply\fR below, except that the + response is mailed to \fIall recipients\fR of the original + message (except yourself - see the \fIalternatives\fR + option for your \fI.elmrc\fR file above). .LI "j, k" *************** *** 1083,1085 .ce ! \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\X-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .sp --- 1088,1090 ----- .ce ! \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .sp *************** *** 1093,1095 .ce ! \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\X-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .sp --- 1098,1100 ----- .ce ! \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .sp Index: doc/elm-help.2 *************** *** 1,3 ! Commands available from the Alias Menu --- 1,3 ----- ! Commands available from the Options Menu *************** *** 5,6 ---- ------- --- 5,8 ----- ---- ------- + c Change `calendar' file to the file specified. See '<' at top level + menu for more information on this. *************** *** 6,8 ! ? help on a specific key, or this summary of commands. --- 8,11 ----- ! d Display pager. `builtin' will use the built-in pager, or you ! can put anything else you'd like, including "/bin/more" *************** *** 8,10 ! a Add return address of current message to alias database --- 11,13 ----- ! e Editor to use when composing messages *************** *** 10,12 ! m Make new user alias, adding to alias database when done --- 13,15 ----- ! f Folder directory. This is what '=', '+', or '%' expands to. *************** *** 12,18 ! r,x return from the alias menu ! ! p check for a person in the alias database ! ! s check for a system in the host routing/domain database --- 15,17 ----- ! s Sorting criteria. Step through with space, <return> selects. *************** *** 18,18 --- 17,26 ----- + o Outbound mail file. Where to save copies of outbound mail. + + p How to print messages. '%s' can be used as a filename holder + + y Your fullname for outbound mail. + + a arrow cursor. Changes from "->" to inverse bar and back + + m display mini-menus or not. Expert users usually don't. Index: doc/elmrc-info *************** *** 119,120 menu ! # should we display the three-line menus? --- 119,124 ----- menu ! # should we display the three-line 'mini' menu? ! ! ask ! # Should the questions as we leave be displayed or auto-answered? ! Index: doc/Filter.guide *************** *** 44,46 \fBElm Filter Guide\fR ! .PH "'Filter Guide''version 1.5' .PF "''Page \\\\nP''" --- 44,46 ----- \fBElm Filter Guide\fR ! .PH "'Filter Guide''version 1.5b' .PF "''Page \\\\nP''" *************** *** 49,51 .ps 10 ! (version 1.5) .sp 2 --- 49,51 ----- .ps 10 ! (version 1.5b) .sp 2 *************** *** 95,96 individual conditions of the form ``\fIfield\fR \fIrelation\fR \fIvalue\fR''. The \fIfield\fR value can be; --- 95,99 ----- individual conditions of the form ``\fIfield\fR \fIrelation\fR \fIvalue\fR''. + (an optional further type of rule is of the form ``always \fIaction\fR'' + but should only be used as the last rule in the ruleset, for obvious + reasons). The \fIfield\fR value can be; *************** *** 244,246 Rule 2: if (to = "postmaster") then ! Save /tmp/postmaster-mail.2 --- 247,249 ----- Rule 2: if (to = "postmaster") then ! Save /tmp/postmaster-mail.<day-of-week> Index: src/alias.c *************** *** 29,33 if ((hash = open(system_hash_file, O_RDONLY)) == -1) { ! dprint1(1, ! "Warning: Can't read system hash file %s (read_alias_files)\n", ! system_hash_file); goto user; --- 29,32 ----- if ((hash = open(system_hash_file, O_RDONLY)) == -1) { ! dprint(1, (debugfile, ! "Warning: Can't read system hash file %s\n", system_hash_file)); goto user; *************** *** 41,45 if ((system_data = open(system_data_file, O_RDONLY)) == -1) { ! dprint1(1, ! "Warning: Can't read system data file %s (read_alias_files)\n", ! system_data_file); goto user; --- 40,43 ----- if ((system_data = open(system_data_file, O_RDONLY)) == -1) { ! dprint(1, (debugfile, ! "Warning: Can't read system data file %s\n", system_data_file)); goto user; *************** *** 52,55 if ((hash = open(fname, O_RDONLY)) == -1) { ! dprint1(1,"Warning: Can't read user hash file %s (read_alias_files)\n", ! fname); return; --- 50,53 ----- if ((hash = open(fname, O_RDONLY)) == -1) { ! dprint(1,(debugfile, "Warning: Can't read user hash file %s\n", ! fname)); return; *************** *** 63,67 if ((user_data = open(fname, O_RDONLY)) == -1) { ! dprint1(1, ! "Warning: can't read user data file %s (read_alias_files)\n", ! fname); return; --- 61,64 ----- if ((user_data = open(fname, O_RDONLY)) == -1) { ! dprint(1, (debugfile, ! "Warning: can't read user data file %s\n", fname)); return; *************** *** 90,93 if ((address = get_alias_address(name, 0, 0)) != NULL) { ! dprint1(2, "Attempt to add a duplicate alias [%s] (add_alias)\n", ! address); if (address[0] == '!') { --- 87,91 ----- if ((address = get_alias_address(name, 0, 0)) != NULL) { ! dprint(2, (debugfile, ! "Attempt to add a duplicate alias [%s] in add_alias\n", ! address)); if (address[0] == '!') { *************** *** 131,133 if (current == 0) { ! dprint0(3,"Add current alias called without any current message!\n"); error("No message to alias to!"); --- 129,132 ----- if (current == 0) { ! dprint(3, (debugfile, ! "Add current alias called without any current message!\n")); error("No message to alias to!"); *************** *** 144,148 if ((address = get_alias_address(name, 0, 0)) != NULL) { ! dprint1(3, ! "Attempt to add a duplicate alias [%s] (add_current_alias)\n", ! address); if (address[1] == '!') { --- 143,147 ----- if ((address = get_alias_address(name, 0, 0)) != NULL) { ! dprint(3, (debugfile, ! "Attempt to add a duplicate alias [%s] in add_current_alias\n", ! address)); if (address[1] == '!') { *************** *** 183,188 if ((file = fopen(fname, "a")) == NULL) { ! dprint2(2, "FILE Failure attempting to add alias to file %s (%s)", ! fname, "add_to_alias_text"); ! dprint2(2, "** %s - %s **\n", error_name(errno), ! error_description(errno)); error1("couldn't open %s to add new alias!", fname); --- 182,188 ----- if ((file = fopen(fname, "a")) == NULL) { ! dprint(2, (debugfile, ! "Failure attempting to add alias to file %s within %s", ! fname, "add_to_alias_text")); ! dprint(2, (debugfile, "** %s - %s **\n", error_name(errno), ! error_description(errno))); error1("couldn't open %s to add new alias!", fname); *************** *** 246,248 ! dprint1(2,"\n-- Alias command: %c\n\n", ch); --- 246,248 ----- ! dprint(2, (debugfile, "\n-- Alias command: %c\n\n", ch)); *************** *** 298,301 sprintf(buffer, "(user)@%s", name); ! #ifdef DONT_TOUCH_ADDRESS ! strcpy(address, buffer); #else --- 298,301 ----- sprintf(buffer, "(user)@%s", name); ! #ifdef DONT_TOUCH_ADDRESSES ! address = buffer; #else Index: src/curses.c *************** *** 21,22 #include "headers.h" --- 21,26 ----- + /** NOTE THE ADDITION OF: the #ifndef ELM stuff around routines that + we don't use. This is for code size and compile time speed... + **/ + #include "headers.h" *************** *** 47,49 #ifdef SHORTNAMES - # define CleartoEOS ClrtoEOS # define _clearinverse _clrinv --- 51,52 ----- #ifdef SHORTNAMES # define _clearinverse _clrinv *************** *** 73,80 - #ifdef UTS - static int _clear_screen = 0; /* Next i/o clear screen? */ - static char _null_string[SLEN]; /* a string of nulls... */ - #endif - - #define DEFAULT_LINES_ON_TERMINAL 24 --- 76,77 ----- #define DEFAULT_LINES_ON_TERMINAL 24 *************** *** 115,117 int tgetent(), /* get termcap entry */ ! error; char termname[40]; --- 112,114 ----- int tgetent(), /* get termcap entry */ ! err; char termname[40]; *************** *** 119,121 ! dprint0(8,"InitScreen()\n"); --- 116,118 ----- ! dprint(8, (debugfile, "InitScreen()\n")); *************** *** 123,132 - #ifdef UTS - - /* use _line for lack of a better variable, what the heck! */ - - for (_line = 0; _line < SLEN; _line++) - _null_string[_line] = '\0'; - #endif - if (strcpy(termname, getenv("TERM")) == NULL) --- 120,121 ----- if (strcpy(termname, getenv("TERM")) == NULL) *************** *** 134,137 ! if ((error = tgetent(_terminal, termname)) != 1) ! return(error-2); --- 123,126 ----- ! if ((err = tgetent(_terminal, termname)) != 1) ! return(err-2); *************** *** 191,194 - dprint1(9,"return_value_of(%s)\n", termcap_label); - if (strlen(termcap_label) < 2) --- 180,181 ----- if (strlen(termcap_label) < 2) *************** *** 226,229 - dprint1(9,"transmit_functions(%s)\n", onoff(newstate)); - if (newstate != _intransmit) { --- 213,214 ----- if (newstate != _intransmit) { *************** *** 248,251 - dprint2(9,"ScreenSize(_,_) returning %d, %d\n", _lines-1, _columns); - *lines = _lines - 1; /* assume index from zero */ --- 233,234 ----- *lines = _lines - 1; /* assume index from zero */ *************** *** 270,278 - #ifdef UTS - if (isatube) { - _clear_screen++; /* queue up for clearing... */ - return(0); - } - #endif - if (!_clearscreen) --- 253,254 ----- if (!_clearscreen) *************** *** 298,307 - #ifdef UTS - if (isatube) { - at row+1, col+1; - _line = row; - _col = col; - return(0); - } - #endif if (!_moveto) --- 274,275 ----- if (!_moveto) *************** *** 355,362 - #ifdef UTS - if (isatube) { - at _line+1, _col+1; - return(0); - } - #endif if (!_up) --- 323,324 ----- if (!_up) *************** *** 379,387 - #ifdef UTS - if (isatube) { - at _line+1, _col+1 ; - return(0); - } - #endif - if (!_down) --- 341,342 ----- if (!_down) *************** *** 404,412 - #ifdef UTS - if (isatube) { - at _line+1, _col+1; - return(0); - } - #endif - if (!_left) --- 359,360 ----- if (!_left) *************** *** 429,437 - #ifdef UTS - if (isatube) { - at _line+1, _col+1; - return(0); - } - #endif - if (!_right) --- 377,378 ----- if (!_right) *************** *** 472,473 --- 413,415 ----- + #ifndef ELM *************** *** 604,605 --- 546,548 ----- + #endif ndef ELM *************** *** 610,613 ! #ifdef UTS ! char buffer[2]; /* can't output characters! */ --- 553,555 ----- ! putchar(ch); *************** *** 613,627 - if (isatube) { - buffer[0] = ch; - buffer[1] = '\0'; - - at _line+1, _col+1; - panel (noerase, noinit, noread) { - #ON, buffer, 1# - } - } - else - #endif - putchar(ch); - if (ch == BACKSPACE) /* moved BACK one! */ --- 555,556 ----- if (ch == BACKSPACE) /* moved BACK one! */ *************** *** 664,666 ! register int i; --- 593,595 ----- ! char *p, *pend; *************** *** 666,692 - #ifdef UTS - if (isatube) { - at x+1, y+1; - panel (init=_clear_screen, noread, erase=_clear_screen) { - #ON, line, strlen(line)-1# - } - _clear_screen = 0; - _col += printable_chars(line); - - /* line wrapped around?? */ - while (_col > COLUMNS) { - _col -= COLUMNS; - _line += 1; - } - - /* now let's figure out if we're supposed to do a "<return>" */ - - for (i=0; i < strlen(line); i++) - if (line[i] == '\n') { - _line++; - _col = 0; /* on new line! */ - } - return(0); - } - #endif MoveCursor(x,y); --- 595,596 ----- MoveCursor(x,y); *************** *** 703,706 ! for (i=0; i < strlen(line); i++) ! if (line[i] == '\n') { _line++; --- 607,611 ----- ! pend = line + strlen(line); ! for (p = line; p < pend; ) ! if (*p++ == '\n') { _line++; *************** *** 758,762 /** clear to end of line **/ - #ifdef UTS - char buffer[SLEN]; - register int cols, i = 0; --- 663,664 ----- /** clear to end of line **/ *************** *** 762,779 - if (isatube) { - - for (cols = _col; cols < COLUMNS; cols++) - buffer[i++] = ' '; - - buffer[i] = '\0'; - - at _line+1, _col+1; - panel (noerase, noinit, noread) { - #ON, buffer, strlen(buffer)-1# - } - - return(0); - } - #endif - if (!_cleartoeoln) --- 664,665 ----- if (!_cleartoeoln) *************** *** 790,805 - #ifdef UTS - register int line_at; - - if (isatube) { - for (line_at = _line; line_at < LINES-1; line_at++) { - panel (noread, noinit, noread) { - #@ line_at, 1# #ON, _null_string, COLUMNS# - } - } - - return(0); - } - - #endif if (!_cleartoeos) --- 676,677 ----- if (!_cleartoeos) *************** *** 813,814 #ifdef RAWMODE --- 685,695 ----- #ifdef RAWMODE + + #ifdef BSD + RawState() + { + /** returns either 1 or 0, for ON or OFF **/ + + return( _inraw ); + } + #endif Index: src/date.c *************** *** 104,106 # else ! timezone(time_zone.tz_minuteswest, the_time->tm_isdst)); # endif --- 104,106 ----- # else ! timezone(time_zone.tz_minuteswest, time_zone.tz_dsttime); # endif *************** *** 135,138 ! dprint1(2, "Warning: Couldn't expand monthname %s (full_month)\n", ! month); --- 135,139 ----- ! dprint(2, (debugfile, ! "Warning: Couldn't expand monthname %s (full_month)\n", ! month)); *************** *** 206,209 if (daynum < 1 || daynum > 31) { ! dprint1(3, "Error: day %d is obviously wrong! (valid_date)\n", ! daynum); return(0); --- 207,211 ----- if (daynum < 1 || daynum > 31) { ! dprint(3, (debugfile, ! "Error: day %d is obviously wrong! (valid_date)\n", ! daynum)); return(0); *************** *** 213,216 yearnum > 2000) { ! dprint1(3, "Error: year %d is obviously wrong! (valid_date)\n", ! yearnum); return(0); --- 215,219 ----- yearnum > 2000) { ! dprint(3, (debugfile, ! "Error: year %d is obviously wrong! (valid_date)\n", ! yearnum)); return(0); *************** *** 245,247 if (hour < 1 || hour == 24) ! sprintf(timestring, "12:%2.2d (midnight)", minute); else if (hour < 12) --- 248,250 ----- if (hour < 1 || hour == 24) ! sprintf(timestring, "12:%02d (midnight)", minute); else if (hour < 12) *************** *** 247,249 else if (hour < 12) ! sprintf(timestring, "%d:%2.2d am", hour, minute); else if (hour == 12) --- 250,252 ----- else if (hour < 12) ! sprintf(timestring, "%d:%02d am", hour, minute); else if (hour == 12) *************** *** 249,251 else if (hour == 12) ! sprintf(timestring, "%d:%2.2d (noon)", hour, minute); else if (hour < 24) --- 252,254 ----- else if (hour == 12) ! sprintf(timestring, "%d:%02d (noon)", hour, minute); else if (hour < 24) *************** *** 251,253 else if (hour < 24) ! sprintf(timestring, "%d:%2.2d pm", hour-12, minute); } --- 254,256 ----- else if (hour < 24) ! sprintf(timestring, "%d:%02d pm", hour-12, minute); } *************** *** 278,280 if (month1 == -1) ! dprint1(2,"month_number failed on month '%s'\n", rec1->month); --- 281,284 ----- if (month1 == -1) ! dprint(2, (debugfile, ! "month_number failed on month '%s'\n", rec1->month)); *************** *** 281,283 if (month2 == -1) ! dprint1(2,"month_number failed on month '%s'\n", rec2->month); --- 285,288 ----- if (month2 == -1) ! dprint(2, (debugfile, ! "month_number failed on month '%s'\n", rec2->month)); End of patch kit #1