projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* configure.in, INSTALL: if --enable-masquerade is not
[mmh]
/
sbr
/
mts.c
diff --git
a/sbr/mts.c
b/sbr/mts.c
index
551fd1f
..
cc5ff8e
100644
(file)
--- a/
sbr/mts.c
+++ b/
sbr/mts.c
@@
-3,10
+3,15
@@
* mts.c -- definitions for the mail transport system
*
* $Id$
* mts.c -- definitions for the mail transport system
*
* $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
*/
#include <h/mh.h> /* for snprintf() */
#include <h/nmh.h>
*/
#include <h/mh.h> /* for snprintf() */
#include <h/nmh.h>
+#include <h/utils.h>
#define nmhetcdir(file) NMHETCDIR#file
#define nmhetcdir(file) NMHETCDIR#file
@@
-23,12
+28,10
@@
#define NOTOK (-1)
#define OK 0
#define NOTOK (-1)
#define OK 0
-extern int errno;
-
/*
* static prototypes
*/
/*
* static prototypes
*/
-static char *tailor_value (char *);
+static char *tailor_value (unsigned char *);
static void getuserinfo (void);
/*
static void getuserinfo (void);
/*
@@
-169,7
+172,8
@@
static struct bind binds[] = {
void
mts_init (char *name)
{
void
mts_init (char *name)
{
- char *bp, *cp, buffer[BUFSIZ];
+ unsigned char *bp;
+ char *cp, buffer[BUFSIZ];
struct bind *b;
FILE *fp;
static int inited = 0;
struct bind *b;
FILE *fp;
static int inited = 0;
@@
-230,7
+234,7
@@
mts_init (char *name)
*/
static char *
*/
static char *
-tailor_value (char *s)
+tailor_value (unsigned char *s)
{
int i, r;
char *bp;
{
int i, r;
char *bp;
@@
-269,8
+273,8
@@
tailor_value (char *s)
*bp = 0;
len = strlen (buffer) + 1;
*bp = 0;
len = strlen (buffer) + 1;
- if ((bp = malloc (len)))
- memcpy (bp, buffer, len);
+ bp = mh_xmalloc (len);
+ memcpy (bp, buffer, len);
return bp;
}
return bp;
}
@@
-403,7
+407,8
@@
getfullname (void)
static void
getuserinfo (void)
{
static void
getuserinfo (void)
{
- register char *cp, *np;
+ register unsigned char *cp;
+ register char *np;
register struct passwd *pw;
#ifdef KPOP
register struct passwd *pw;
#ifdef KPOP