]> diplodocus.org Git - nmh/commitdiff
Move pidcheck() into mhshowsbr.c (the only consumer of it) and make
authorKen Hornstein <kenh@pobox.com>
Fri, 21 Mar 2014 22:53:26 +0000 (18:53 -0400)
committerKen Hornstein <kenh@pobox.com>
Fri, 21 Mar 2014 22:53:26 +0000 (18:53 -0400)
it static.

h/mhparse.h
uip/mhparse.c
uip/mhshowsbr.c

index f58175c..700c0cc 100644 (file)
@@ -298,7 +298,6 @@ extern struct str2init str2methods[];
 /*
  * prototypes
  */
-int pidcheck (int);
 CT parse_mime (char *);
 
 /*
index 688aba1..444bf7d 100644 (file)
@@ -181,19 +181,6 @@ struct str2init str2methods[] = {
 };
 
 
-int
-pidcheck (int status)
-{
-    if ((status & 0xff00) == 0xff00 || (status & 0x007f) != SIGQUIT)
-       return status;
-
-    fflush (stdout);
-    fflush (stderr);
-    done (1);
-    return 1;
-}
-
-
 /*
  * Main entry point for parsing a MIME message or file.
  * It returns the Content structure for the top level
index 207a8e5..c53f22f 100644 (file)
@@ -62,6 +62,7 @@ static int show_external (CT, int);
 static int parse_display_string (CT, char *, int *, int *, char *, char *,
                                 size_t, int multipart);
 static int convert_content_charset (CT, char **);
+static int pidcheck(int);
 
 
 /*
@@ -1110,3 +1111,20 @@ convert_content_charset (CT ct, char **file) {
 
     return OK;
 }
+
+/*
+ * Exit if the display process returned with a nonzero exit code, or terminated
+ * with a SIGQUIT signal.
+ */
+
+static int
+pidcheck (int status)
+{
+    if ((status & 0xff00) == 0xff00 || (status & 0x007f) != SIGQUIT)
+       return status;
+
+    fflush (stdout);
+    fflush (stderr);
+    done (1);
+    return 1;
+}