Removed the space between function names and the opening parenthesis.
[mmh] / sbr / mts.c
index 55c0f02..3313aef 100644 (file)
--- a/sbr/mts.c
+++ b/sbr/mts.c
 /*
 ** static prototypes
 */
 /*
 ** static prototypes
 */
-static char *tailor_value (unsigned char *);
-static void getuserinfo (void);
+static char *tailor_value(unsigned char *);
+static void getuserinfo(void);
 static const char *get_mtsconf_pathname(void);
 static const char *get_mtsuserconf_pathname(void);
 static const char *get_mtsconf_pathname(void);
 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
 
 /*
 ** *mmdfldir and *uucpldir are the maildrop directories.  If maildrops
@@ -109,25 +109,25 @@ static struct bind binds[] = {
 */
 
 void
 */
 
 void
-mts_init (char *name)
+mts_init(char *name)
 {
        const char *cp;
        FILE *fp;
        static int inited = 0;
 
 {
        const char *cp;
        FILE *fp;
        static int inited = 0;
 
-       if (inited++ || (fp = fopen (get_mtsconf_pathname(), "r")) == NULL)
+       if (inited++ || (fp = fopen(get_mtsconf_pathname(), "r")) == NULL)
                return;
        mts_read_conf_file(fp);
                return;
        mts_read_conf_file(fp);
-       fclose (fp);
+       fclose(fp);
 
        cp = get_mtsuserconf_pathname();
        if (cp != NULL &&
 
        cp = get_mtsuserconf_pathname();
        if (cp != NULL &&
-               ((fp = fopen (get_mtsuserconf_pathname(), "r")) != NULL)) {
+               ((fp = fopen(get_mtsuserconf_pathname(), "r")) != NULL)) {
                mts_read_conf_file(fp);
                mts_read_conf_file(fp);
-               fclose (fp);
+               fclose(fp);
        }
 
        }
 
-       Everyone = atoi (everyone);
+       Everyone = atoi(everyone);
 
        if (strstr(masquerade, "draft_from") != NULL)
                draft_from_masquerading = TRUE;
 
        if (strstr(masquerade, "draft_from") != NULL)
                draft_from_masquerading = TRUE;
@@ -148,7 +148,7 @@ mts_init (char *name)
 */
 
 static char *
 */
 
 static char *
-tailor_value (unsigned char *s)
+tailor_value(unsigned char *s)
 {
        int i, r;
        char *bp;
 {
        int i, r;
        char *bp;
@@ -171,24 +171,24 @@ tailor_value (unsigned char *s)
                                        break;
 
                                default:
                                        break;
 
                                default:
-                                       if (!isdigit (*s)) {
+                                       if (!isdigit(*s)) {
                                                *bp++ = QUOTE;
                                                *bp = *s;
                                        }
                                        r = *s != '0' ? 10 : 8;
                                                *bp++ = QUOTE;
                                                *bp = *s;
                                        }
                                        r = *s != '0' ? 10 : 8;
-                                       for (i = 0; isdigit (*s); s++)
+                                       for (i = 0; isdigit(*s); s++)
                                                i = i * r + *s - '0';
                                        s--;
                                                i = i * r + *s - '0';
                                        s--;
-                                       *bp = toascii (i);
+                                       *bp = toascii(i);
                                        break;
                        }
                }
        }
        *bp = 0;
 
                                        break;
                        }
                }
        }
        *bp = 0;
 
-       len = strlen (buffer) + 1;
-       bp = mh_xmalloc (len);
-       memcpy (bp, buffer, len);
+       len = strlen(buffer) + 1;
+       bp = mh_xmalloc(len);
+       memcpy(bp, buffer, len);
 
        return bp;
 }
 
        return bp;
 }
@@ -198,7 +198,7 @@ tailor_value (unsigned char *s)
 */
 
 char *
 */
 
 char *
-LocalName (void)
+LocalName(void)
 {
        static char buffer[BUFSIZ] = "";
        struct addrinfo hints, *res;
 {
        static char buffer[BUFSIZ] = "";
        struct addrinfo hints, *res;
@@ -210,16 +210,16 @@ LocalName (void)
        if (buffer[0])
                return buffer;
 
        if (buffer[0])
                return buffer;
 
-       mts_init ("mts");
+       mts_init("mts");
 
        memset(buffer, 0, sizeof(buffer));
 #ifdef HAVE_UNAME
        /* first get our local name */
 
        memset(buffer, 0, sizeof(buffer));
 #ifdef HAVE_UNAME
        /* first get our local name */
-       uname (&name);
-       strncpy (buffer, name.nodename, sizeof(buffer) - 1);
+       uname(&name);
+       strncpy(buffer, name.nodename, sizeof(buffer) - 1);
 #else
        /* first get our local name */
 #else
        /* first get our local name */
-       gethostname (buffer, sizeof(buffer) - 1);
+       gethostname(buffer, sizeof(buffer) - 1);
 #endif
        /* now fully qualify our name */
 
 #endif
        /* now fully qualify our name */
 
@@ -241,7 +241,7 @@ LocalName (void)
 */
 
 char *
 */
 
 char *
-SystemName (void)
+SystemName(void)
 {
        static char buffer[BUFSIZ] = "";
 
 {
        static char buffer[BUFSIZ] = "";
 
@@ -253,13 +253,13 @@ SystemName (void)
        if (buffer[0])
                return buffer;
 
        if (buffer[0])
                return buffer;
 
-       mts_init ("mts");
+       mts_init("mts");
 
 #ifdef HAVE_UNAME
 
 #ifdef HAVE_UNAME
-       uname (&name);
-       strncpy (buffer, name.nodename, sizeof(buffer));
+       uname(&name);
+       strncpy(buffer, name.nodename, sizeof(buffer));
 #else
 #else
-       gethostname (buffer, sizeof(buffer));
+       gethostname(buffer, sizeof(buffer));
 #endif
 
        return buffer;
 #endif
 
        return buffer;
@@ -271,7 +271,7 @@ SystemName (void)
 */
 
 char *
 */
 
 char *
-getusername (void)
+getusername(void)
 {
        if (username[0] == '\0')
                getuserinfo();
 {
        if (username[0] == '\0')
                getuserinfo();
@@ -286,7 +286,7 @@ getusername (void)
 */
 
 char *
 */
 
 char *
-getfullname (void)
+getfullname(void)
 {
        if (username[0] == '\0')
                getuserinfo();
 {
        if (username[0] == '\0')
                getuserinfo();
@@ -302,18 +302,18 @@ getfullname (void)
 */
 
 static void
 */
 
 static void
-getuserinfo (void)
+getuserinfo(void)
 {
        register unsigned char *cp;
        register char *np;
        register struct passwd *pw;
 
 {
        register unsigned char *cp;
        register char *np;
        register struct passwd *pw;
 
-       if ((pw = getpwuid (getuid ())) == NULL
+       if ((pw = getpwuid(getuid())) == NULL
                || pw->pw_name == NULL
                || *pw->pw_name == '\0') {
                || pw->pw_name == NULL
                || *pw->pw_name == '\0') {
-               strncpy (username, "unknown", sizeof(username));
-               snprintf (fullname, sizeof(fullname), "The Unknown User-ID (%d)",
-                       (int) getuid ());
+               strncpy(username, "unknown", sizeof(username));
+               snprintf(fullname, sizeof(fullname), "The Unknown User-ID (%d)",
+                       (int) getuid());
                return;
        }
 
                return;
        }
 
@@ -359,7 +359,7 @@ getuserinfo (void)
                for (cp = fullname;
                        *np != '\0' && *np != ',' && *np != '<';) {
                        if (*np == '&') {  /* blech! */
                for (cp = fullname;
                        *np != '\0' && *np != ',' && *np != '<';) {
                        if (*np == '&') {  /* blech! */
-                               strcpy (cp, pw->pw_name);
+                               strcpy(cp, pw->pw_name);
                                *cp = toupper(*cp);
                                while (*cp)
                                        cp++;
                                *cp = toupper(*cp);
                                while (*cp)
                                        cp++;
@@ -379,7 +379,7 @@ getuserinfo (void)
                */
                for (cp = fullname; *np != '\0' && *np != ',';) {
                        if (*np == '&') {  /* blech! */
                */
                for (cp = fullname; *np != '\0' && *np != ',';) {
                        if (*np == '&') {  /* blech! */
-                               strcpy (cp, pw->pw_name);
+                               strcpy(cp, pw->pw_name);
                                *cp = toupper(*cp);
                                while (*cp)
                                        cp++;
                                *cp = toupper(*cp);
                                while (*cp)
                                        cp++;
@@ -406,30 +406,30 @@ getuserinfo (void)
                *cp = '\0';
        }
        if (!mmailid_masquerading || *np == '\0')
                *cp = '\0';
        }
        if (!mmailid_masquerading || *np == '\0')
-               strncpy (username, pw->pw_name, sizeof(username));
+               strncpy(username, pw->pw_name, sizeof(username));
 
        /*
        ** The $SIGNATURE environment variable overrides the GECOS field's
        ** idea of your real name.
        */
 
        /*
        ** The $SIGNATURE environment variable overrides the GECOS field's
        ** idea of your real name.
        */
-       if ((cp = getenv ("SIGNATURE")) && *cp)
-               strncpy (fullname, cp, sizeof(fullname));
+       if ((cp = getenv("SIGNATURE")) && *cp)
+               strncpy(fullname, cp, sizeof(fullname));
 
        if (strchr(fullname, '.')) {  /*  quote any .'s */
                char tmp[BUFSIZ];
 
                /* should quote "'s too */
 
        if (strchr(fullname, '.')) {  /*  quote any .'s */
                char tmp[BUFSIZ];
 
                /* should quote "'s too */
-               snprintf (tmp, sizeof(tmp), "\"%s\"", fullname);
-               strncpy (fullname, tmp, sizeof(fullname));
+               snprintf(tmp, sizeof(tmp), "\"%s\"", fullname);
+               strncpy(fullname, tmp, sizeof(fullname));
        }
 
        return;
 }
 
 static const char*
        }
 
        return;
 }
 
 static const char*
-get_mtsconf_pathname (void)
+get_mtsconf_pathname(void)
 {
 {
-       const char *cp = getenv ( "MHMTSCONF ");
+       const char *cp = getenv( "MHMTSCONF ");
        if (cp != NULL && *cp != '\0') {
                return cp;
        }
        if (cp != NULL && *cp != '\0') {
                return cp;
        }
@@ -437,9 +437,9 @@ get_mtsconf_pathname (void)
 }
 
 static const char*
 }
 
 static const char*
-get_mtsuserconf_pathname (void)
+get_mtsuserconf_pathname(void)
 {
 {
-       const char *cp = getenv ( "MHMTSUSERCONF" );
+       const char *cp = getenv( "MHMTSUSERCONF" );
        if (cp != NULL && *cp != '\0') {
                return cp;
        }
        if (cp != NULL && *cp != '\0') {
                return cp;
        }
@@ -447,13 +447,13 @@ get_mtsuserconf_pathname (void)
 }
 
 static void
 }
 
 static void
-mts_read_conf_file (FILE *fp)
+mts_read_conf_file(FILE *fp)
 {
        unsigned char *bp;
        char *cp, buffer[BUFSIZ];
        struct bind *b;
 
 {
        unsigned char *bp;
        char *cp, buffer[BUFSIZ];
        struct bind *b;
 
-       while (fgets (buffer, sizeof(buffer), fp)) {
+       while (fgets(buffer, sizeof(buffer), fp)) {
                if (!(cp = strchr(buffer, '\n')))
                        break;
                *cp = 0;
                if (!(cp = strchr(buffer, '\n')))
                        break;
                *cp = 0;
@@ -462,13 +462,13 @@ mts_read_conf_file (FILE *fp)
                if (!(bp = strchr(buffer, ':')))
                        break;
                *bp++ = 0;
                if (!(bp = strchr(buffer, ':')))
                        break;
                *bp++ = 0;
-               while (isspace (*bp))
+               while (isspace(*bp))
                        *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))
                                break;
                                break;
-               if (b->keyword && (cp = tailor_value (bp)))
+               if (b->keyword && (cp = tailor_value(bp)))
                        *b->value = cp;
        }
 }
                        *b->value = cp;
        }
 }