projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix: Removed -reverse switch from scan(1).
[mmh]
/
sbr
/
mts.c
diff --git
a/sbr/mts.c
b/sbr/mts.c
index
3313aef
..
ced0cf7
100644
(file)
--- a/
sbr/mts.c
+++ b/
sbr/mts.c
@@
-9,9
+9,6
@@
#include <h/mh.h> /* for snprintf() */
#include <h/nmh.h>
#include <h/utils.h>
#include <h/mh.h> /* for snprintf() */
#include <h/nmh.h>
#include <h/utils.h>
-
-#define nmhetcdir(file) NMHETCDIR#file
-
#include <ctype.h>
#include <stdio.h>
#include <h/mts.h>
#include <ctype.h>
#include <stdio.h>
#include <h/mts.h>
@@
-35,25
+32,10
@@
static const char *get_mtsuserconf_pathname(void);
static void mts_read_conf_file(FILE *fp);
/*
static void mts_read_conf_file(FILE *fp);
/*
-** *mmdfldir and *uucpldir are the maildrop directories. If maildrops
-** are kept in the user's home directory, then these should be empty
-** strings. In this case, the appropriate ...lfil array should contain
-** the name of the file in the user's home directory. Usually, this is
-** something like ".mail".
-*/
-
-/*
** nmh mail transport interface customization file
*/
** nmh mail transport interface customization file
*/
-static char *mtsconf = nmhetcdir(/mts.conf);
-
-char *mmdfldir = MAILSPOOL;
-char *mmdflfil = "";
-char *uucpldir = "/usr/spool/mail";
-char *uucplfil = "";
+static char *mtsconf = NMHETCDIR"/mts.conf";
-char *mmdlm1 = "\001\001\001\001\n";
-char *mmdlm2 = "\001\001\001\001\n";
/* Cache the username and fullname of the user */
static char username[BUFSIZ];
/* Cache the username and fullname of the user */
static char username[BUFSIZ];
@@
-68,15
+50,7
@@
static char* masquerade = "";
/*
** Global MailDelivery file
*/
/*
** Global MailDelivery file
*/
-char *maildelivery = nmhetcdir(/maildelivery);
-
-
-/*
-** Aliasing Facility (doesn't belong here)
-*/
-int Everyone = NOTOK;
-static char *everyone = "-1";
-char *NoShell = "";
+char *maildelivery = NMHETCDIR"/maildelivery";
/*
** Customize the MTS settings for nmh by adjusting
/*
** Customize the MTS settings for nmh by adjusting
@@
-89,16
+63,8
@@
struct bind {
};
static struct bind binds[] = {
};
static struct bind binds[] = {
- { "mmdfldir", &mmdfldir },
- { "mmdflfil", &mmdflfil },
- { "uucpldir", &uucpldir },
- { "uucplfil", &uucplfil },
- { "mmdelim1", &mmdlm1 },
- { "mmdelim2", &mmdlm2 },
{ "masquerade", &masquerade },
{ "maildelivery", &maildelivery },
{ "masquerade", &masquerade },
{ "maildelivery", &maildelivery },
- { "everyone", &everyone },
- { "noshell", &NoShell },
{ NULL, NULL }
};
{ NULL, NULL }
};
@@
-127,8
+93,6
@@
mts_init(char *name)
fclose(fp);
}
fclose(fp);
}
- Everyone = atoi(everyone);
-
if (strstr(masquerade, "draft_from") != NULL)
draft_from_masquerading = TRUE;
if (strstr(masquerade, "draft_from") != NULL)
draft_from_masquerading = TRUE;
@@
-160,27
+124,27
@@
tailor_value(unsigned char *s)
*bp = *s;
} else {
switch (*++s) {
*bp = *s;
} else {
switch (*++s) {
- case 'b': *bp = '\b'; break;
- case 'f': *bp = '\f'; break;
- case 'n': *bp = '\n'; break;
- case 't': *bp = '\t'; break;
-
- case 0: s--;
- case QUOTE:
- *bp = QUOTE;
- break;
-
- default:
- if (!isdigit(*s)) {
- *bp++ = QUOTE;
- *bp = *s;
- }
- r = *s != '0' ? 10 : 8;
- for (i = 0; isdigit(*s); s++)
- i = i * r + *s - '0';
- s--;
- *bp = toascii(i);
- break;
+ case 'b': *bp = '\b'; break;
+ case 'f': *bp = '\f'; break;
+ case 'n': *bp = '\n'; break;
+ case 't': *bp = '\t'; break;
+
+ case 0: s--;
+ case QUOTE:
+ *bp = QUOTE;
+ break;
+
+ default:
+ if (!isdigit(*s)) {
+ *bp++ = QUOTE;
+ *bp = *s;
+ }
+ r = *s != '0' ? 10 : 8;
+ for (i = 0; isdigit(*s); s++)
+ i = i * r + *s - '0';
+ s--;
+ *bp = toascii(i);
+ break;
}
}
}
}
}
}
@@
-466,7
+430,7
@@
mts_read_conf_file(FILE *fp)
*bp++ = 0;
for (b = binds; b->keyword; b++)
*bp++ = 0;
for (b = binds; b->keyword; b++)
- if (!strcmp(buffer, b->keyword))
+ if (strcmp(buffer, b->keyword)==0)
break;
if (b->keyword && (cp = tailor_value(bp)))
*b->value = cp;
break;
if (b->keyword && (cp = tailor_value(bp)))
*b->value = cp;