Thread View: comp.bugs.sys5
1 messages
1 total messages
Started by gworek
Thu, 12 Nov 1987 21:59
mailx(1) unset bug
Author: gworek
Date: Thu, 12 Nov 1987 21:59
Date: Thu, 12 Nov 1987 21:59
56 lines
1943 bytes
1943 bytes
Description:
Remaining .mailrc commands are ignored if the user
attempts to "unset" a variable that has not
been previously set.
Versions Tested:
/usr/bin/mailx.sl 1.24 3.1 02/02/87 46435 AT&T-SF
/usr/bin/mailx.sl 1.13 3.0 02/19/86 63855 AT&T-SF
Repeat-by:
Add an "unset zot" command early in your ~/.mailrc.
A good location is before a list of aliases, or
before a list of "ignore" specifications.
Go into mail. At the "?" prompt type "alias" or
"ignore". All aliases, ignores, and other commands
after the "unset zot" command are not available and
have not been executed.
Discussion:
The bug was discovered when a .mailrc was moved to
a new system. The user's .mailrc contained an
"unset ignoreeof" command to override a "set ignoreeof"
command in /usr/lib/mailx/mailx.rc on another system.
The error is not serious, and the remainder of the
.mailrc should be read and executed.
Fix:
Change the "deassign()" function in the vars.c module
to return success when sourcing .mailrc and the variable
is not set.
*** vars.old Thu Nov 12 16:33:32 1987
--- vars.c Thu Nov 12 16:34:03 1987
***************
**** 56,61 ****
if ((vp2 = lookup(s)) == NOVAR) {
if (!sourcing) {
printf("\"%s\": undefined variable\n", s);
}
! return(1);
}
---- 56,62 ----
if ((vp2 = lookup(s)) == NOVAR) {
if (!sourcing) {
printf("\"%s\": undefined variable\n", s);
+ return(1);
}
! return(0);
}
--
Don Gworek
gworek@codas.att.com
AT&T: 305/869-2752
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads