projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed -realsize from man page because mhshow doesn't support it.
[mmh]
/
uip
/
mhlsbr.c
diff --git
a/uip/mhlsbr.c
b/uip/mhlsbr.c
index
ae1fb5d
..
7abbf43
100644
(file)
--- a/
uip/mhlsbr.c
+++ b/
uip/mhlsbr.c
@@
-156,11
+156,13
@@
static struct mcomp *fmthd = NULL;
static struct mcomp *fmttl = NULL;
static struct mcomp global = {
static struct mcomp *fmttl = NULL;
static struct mcomp global = {
- NULL, NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL, NULL,
+ 0, NULL
};
static struct mcomp holder = {
};
static struct mcomp holder = {
- NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL, NULL,
+ 0, NULL
};
struct pair {
};
struct pair {
@@
-318,7
+320,8
@@
int
mhl (int argc, char **argv)
{
int length = 0, nomore = 0;
mhl (int argc, char **argv)
{
int length = 0, nomore = 0;
- int i, width = 0, vecp = 0;
+ unsigned int i, vecp = 0;;
+ int width = 0;
char *cp, *folder = NULL, *form = NULL;
char buf[BUFSIZ], *files[MAXARGS];
char **argp, **arguments;
char *cp, *folder = NULL, *form = NULL;
char buf[BUFSIZ], *files[MAXARGS];
char **argp, **arguments;
@@
-1905,7
+1908,7
@@
compileargs (struct mcomp *c1, char *nfs)
{
struct format *fmt;
struct arglist *args;
{
struct format *fmt;
struct arglist *args;
- int i;
+ unsigned int i;
i = fmt_compile(nfs, &fmt);
i = fmt_compile(nfs, &fmt);
@@
-2017,7
+2020,7
@@
static void
freecomps(void)
{
struct comp *c1, *c2;
freecomps(void)
{
struct comp *c1, *c2;
- int i;
+ unsigned int i;
for (i = 0; i < sizeof(mhlcomp)/sizeof(mhlcomp[0]); i++) {
if ((c1 = mhlcomp[i]))
for (i = 0; i < sizeof(mhlcomp)/sizeof(mhlcomp[0]); i++) {
if ((c1 = mhlcomp[i]))
@@
-2038,7
+2041,7
@@
static void
freecomptext(void)
{
struct comp *c1;
freecomptext(void)
{
struct comp *c1;
- int i;
+ unsigned int i;
for (i = 0; i < sizeof(mhlcomp)/sizeof(mhlcomp[0]); i++) {
if ((c1 = mhlcomp[i]))
for (i = 0; i < sizeof(mhlcomp)/sizeof(mhlcomp[0]); i++) {
if ((c1 = mhlcomp[i]))
@@
-2119,7
+2122,11
@@
filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp)
*/
close(fdinput[1]);
*/
close(fdinput[1]);
- exit(0);
+ /*
+ * Make sure we call _exit(), otherwise we may flush out the stdio
+ * buffers that we have duplicated from the parent.
+ */
+ _exit(0);
break;
case -1:
adios(NULL, "Unable to fork for filter writer process");
break;
case -1:
adios(NULL, "Unable to fork for filter writer process");