into mhfree.c, eliminating duplication.
#include <h/mime.h>
#include <h/mhparse.h>
+/* The list of top-level contents to display */
+CT *cts = NULL;
+
/*
* prototypes
*/
void free_header (CT);
void free_ctinfo (CT);
void free_encoding (CT, int);
+int freects_done (int);
/*
* static prototypes
ct->c_ceopenfnx = NULL;
}
}
+
+
+int
+freects_done (int status)
+{
+ CT *ctp;
+
+ if ((ctp = cts))
+ for (; *ctp; ctp++)
+ free_content (*ctp);
+
+ exit (status);
+ return 1; /* dead code to satisfy the compiler */
+}
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
#define quitser pipeser
/* mhparse.c */
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+int freects_done (int);
/*
* static prototypes
*/
static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
int
struct msgs *mp = NULL;
CT ct, *ctp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
/*
* variables for mhbuild (mhn -build)
*/
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+int freects_done (int);
/*
* static prototypes
*/
static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
#define quitser pipeser
/* mhparse.c */
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+int freects_done (int);
/*
* static prototypes
*/
static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
#define quitser pipeser
/* mhparse.c */
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+int freects_done (int);
/*
* static prototypes
*/
static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
#define quitser pipeser
/* mhparse.c */
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+int freects_done (int);
/*
* static prototypes
*/
static int write_content (CT *, char *);
static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
int
struct msgs *mp = NULL;
CT ct, *ctp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}