projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added my master's thesis, which explains mmh.
[mmh]
/
uip
/
mhbuild.c
diff --git
a/uip/mhbuild.c
b/uip/mhbuild.c
index
0fb5315
..
5ad0fc1
100644
(file)
--- a/
uip/mhbuild.c
+++ b/
uip/mhbuild.c
@@
-32,16
+32,12
@@
static struct swit switches[] = {
#define VERBSW 0
{ "verbose", 0 },
#define NVERBSW 1
#define VERBSW 0
{ "verbose", 0 },
#define NVERBSW 1
- { "noverbose", 0 },
-#define CONTENTIDSW 2
- { "contentid", 0 },
-#define NCONTENTIDSW 3
- { "nocontentid", 0 },
-#define VERSIONSW 4
- { "version", 0 },
-#define HELPSW 5
+ { "noverbose", 2 },
+#define VERSIONSW 2
+ { "Version", 0 },
+#define HELPSW 3
{ "help", 0 },
{ "help", 0 },
-#define DEBUGSW 6
+#define DEBUGSW 4
{ "debug", -5 },
{ NULL, 0 }
};
{ "debug", -5 },
{ NULL, 0 }
};
@@
-87,8
+83,6
@@
static CT build_mime(char *);
int debugsw = 0;
int verbosw = 0;
int debugsw = 0;
int verbosw = 0;
-int contentidsw = 1;
-
/*
** Temporary files
*/
/*
** Temporary files
*/
@@
-123,9
+117,7
@@
main(int argc, char **argv)
done = unlink_done;
done = unlink_done;
-#ifdef LOCALE
setlocale(LC_ALL, "");
setlocale(LC_ALL, "");
-#endif
invo_name = mhbasename(argv[0]);
/* read user profile/context */
invo_name = mhbasename(argv[0]);
/* read user profile/context */
@@
-159,13
+151,6
@@
main(int argc, char **argv)
print_version(invo_name);
done(1);
print_version(invo_name);
done(1);
- case CONTENTIDSW:
- contentidsw = 1;
- continue;
- case NCONTENTIDSW:
- contentidsw = 0;
- continue;
-
case VERBSW:
verbosw++;
continue;
case VERBSW:
verbosw++;
continue;
@@
-283,14
+268,14
@@
main(int argc, char **argv)
fclose(fp_out);
/* Rename composition draft */
fclose(fp_out);
/* Rename composition draft */
- snprintf(buffer, sizeof(buffer), "%s.orig", m_backup(compfile));
+ snprintf(buffer, sizeof(buffer), "%s.orig", compfile);
if (rename(compfile, buffer) == NOTOK) {
if (rename(compfile, buffer) == NOTOK) {
- adios(compfile, "unable to rename comp draft %s to", buffer);
+ adios(buffer, "unable to rename draft %s to", compfile);
}
/* Rename output file to take its place */
if (rename(outfile, compfile) == NOTOK) {
}
/* Rename output file to take its place */
if (rename(outfile, compfile) == NOTOK) {
- advise(outfile, "unable to rename output %s to", compfile);
+ advise(compfile, "unable to rename output %s to", outfile);
rename(buffer, compfile);
done(1);
}
rename(buffer, compfile);
done(1);
}
@@
-1553,9
+1538,9
@@
build_headers(CT ct)
add_header(ct, np, vp);
/*
add_header(ct, np, vp);
/*
- ** output the Content-ID, unless disabled by -nocontentid
+ ** output the Content-ID
*/
*/
- if (contentidsw && ct->c_id) {
+ if (ct->c_id) {
np = getcpy(ID_FIELD);
vp = concat(" ", ct->c_id, NULL);
add_header(ct, np, vp);
np = getcpy(ID_FIELD);
vp = concat(" ", ct->c_id, NULL);
add_header(ct, np, vp);