]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
sizeof char is always 1, so don't bother to divide by it.
[nmh] / uip / mhlsbr.c
index 6dd1850db14a08ee3e862bec4f2c138d9ed325c9..a4402c567301d6eab9c44e7ec3f2b4efd1ad9b6c 100644 (file)
@@ -11,6 +11,7 @@
 #include <h/fmt_scan.h>
 #include <h/tws.h>
 #include <h/utils.h>
+#include "../sbr/m_popen.h"
 #include <setjmp.h>
 #include <sys/types.h>
 
@@ -302,7 +303,7 @@ static char delim3[] =              /* from forw.c */
     "\n----------------------------------------------------------------------\n\n";
 static char delim4[] = "\n------------------------------\n\n";
 
-static FILE *(*mhl_action) () = (FILE *(*) ()) 0;
+static FILE *(*mhl_action)(char *);
 
 /*
  * prototypes
@@ -521,7 +522,7 @@ mhl (int argc, char **argv)
        }
        else
            printf ("\n------- End of Forwarded Message%s\n",
-                   vecp > 1 ? "s" : "");
+                   PLURALS(vecp));
     }
 
     fflush(stdout);
@@ -946,7 +947,7 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec)
        else {
            printf ("\n-------");
            if (ofilen == 1)
-               printf (" Forwarded Message%s", ofilec > 1 ? "s" : "");
+               printf (" Forwarded Message%s", PLURALS(ofilec));
            else
                printf (" Message %d", ofilen);
            printf ("\n\n");
@@ -1019,13 +1020,13 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec)
                    continue;
 
                for (c2 = fmthd; c2; c2 = c2->c_next)
-                   if (!strcasecmp (c2->c_name ? c2->c_name : "", name))
+                   if (!strcasecmp (FENDNULL(c2->c_name), name))
                        break;
                c1 = NULL;
                if (!((c3 = c2 ? c2 : &global)->c_flags & SPLIT))
                    for (c1 = msghd; c1; c1 = c1->c_next)
-                       if (!strcasecmp (c1->c_name ? c1->c_name : "",
-                                        c3->c_name ? c3->c_name : "")) {
+                       if (!strcasecmp (FENDNULL(c1->c_name),
+                                        FENDNULL(c3->c_name))) {
                            c1->c_text =
                                mcomp_add (c1->c_flags, buf, c1->c_text);
                            break;
@@ -1085,8 +1086,8 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec)
                        continue;
                    }
                    for (c2 = msghd; c2; c2 = c2->c_next)
-                       if (!strcasecmp (c2->c_name ? c2->c_name : "",
-                                        c1->c_name ? c1->c_name : "")) {
+                       if (!strcasecmp (FENDNULL(c2->c_name),
+                                        FENDNULL(c1->c_name))) {
                            putcomp (c1, c2, ONECOMP);
                            if (!(c1->c_flags & SPLIT))
                                break;
@@ -1590,7 +1591,7 @@ putch (char ch, unsigned long flags)
        putch ('\n', flags);
        if (ovoff > 0)
            lm = ovoff;
-       putstr (ovtxt ? ovtxt : "", flags);
+       putstr (FENDNULL(ovtxt), flags);
        putch (ch, flags);
        return;
     }