projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* bug #23163: various minor fixes for the benefit of older Unixes
[mmh]
/
uip
/
mhbuild.c
diff --git
a/uip/mhbuild.c
b/uip/mhbuild.c
index
1c5abdc
..
2776f7c
100644
(file)
--- a/
uip/mhbuild.c
+++ b/
uip/mhbuild.c
@@
-59,11
+59,15
@@
static struct swit switches[] = {
{ "rcache policy", 0 },
#define WCACHESW 15
{ "wcache policy", 0 },
{ "rcache policy", 0 },
#define WCACHESW 15
{ "wcache policy", 0 },
-#define VERSIONSW 16
+#define CONTENTIDSW 16
+ { "contentid", 0 },
+#define NCONTENTIDSW 17
+ { "nocontentid", 0 },
+#define VERSIONSW 18
{ "version", 0 },
{ "version", 0 },
-#define HELPSW 17
+#define HELPSW 19
{ "help", 0 },
{ "help", 0 },
-#define DEBUGSW 18
+#define DEBUGSW 20
{ "debug", -5 },
{ NULL, 0 }
};
{ "debug", -5 },
{ NULL, 0 }
};
@@
-85,6
+89,7
@@
int verbosw = 0;
int ebcdicsw = 0;
int listsw = 0;
int rfc934sw = 0;
int ebcdicsw = 0;
int listsw = 0;
int rfc934sw = 0;
+int contentidsw = 1;
/*
* Temporary files
/*
* Temporary files
@@
-95,6
+100,7
@@
static int unlink_infile = 0;
static char outfile[BUFSIZ];
static int unlink_outfile = 0;
static char outfile[BUFSIZ];
static int unlink_outfile = 0;
+static void unlink_done (int);
/* mhbuildsbr.c */
CT build_mime (char *);
/* mhbuildsbr.c */
CT build_mime (char *);
@@
-121,6
+127,8
@@
main (int argc, char **argv)
CT ct, cts[2];
FILE *fp;
CT ct, cts[2];
FILE *fp;
+ done=unlink_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
@@
-219,6
+227,13
@@
main (int argc, char **argv)
sizesw = 0;
continue;
sizesw = 0;
continue;
+ case CONTENTIDSW:
+ contentidsw = 1;
+ continue;
+ case NCONTENTIDSW:
+ contentidsw = 0;
+ continue;
+
case VERBSW:
verbosw++;
continue;
case VERBSW:
verbosw++;
continue;
@@
-366,12
+381,13
@@
main (int argc, char **argv)
unlink_outfile = 0;
free_content (ct);
unlink_outfile = 0;
free_content (ct);
- return done (0);
+ done (0);
+ return 1;
}
}
-int
-done (int status)
+static void
+unlink_done (int status)
{
/*
* Check if we need to remove stray
{
/*
* Check if we need to remove stray
@@
-383,5
+399,4
@@
done (int status)
unlink (outfile);
exit (status);
unlink (outfile);
exit (status);
- return 1; /* dead code to satisfy the compiler */
}
}