summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2019-01-28 15:33:48 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2019-01-28 15:33:48 +0000
commit25539f77aa9790ea19ad9b861876fd112294bbca (patch)
treeb3351a5ef349a4fb71ff1f2b77594d798afbbeed /Build
parent0cd315c8734d8e24efb3ec62def4fb3c840cbf6b (diff)
More typographic improvements for 'mpost.w'.
Format additional local types correctly. Try to improve the indentation of 'main'. git-svn-id: svn://tug.org/texlive/trunk@49847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog2
-rw-r--r--Build/source/texk/web2c/mplibdir/mpost.w35
2 files changed, 22 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index 57d3890ada0..f2fb620efc4 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,4 +1,4 @@
-2019-01-27 Andreas Scherer <https://ascherer.github.io>
+2019-01-28 Andreas Scherer <https://ascherer.github.io>
* mpost.w: TeXnical nitpicking.
diff --git a/Build/source/texk/web2c/mplibdir/mpost.w b/Build/source/texk/web2c/mplibdir/mpost.w
index 63907db9854..5e01a411506 100644
--- a/Build/source/texk/web2c/mplibdir/mpost.w
+++ b/Build/source/texk/web2c/mplibdir/mpost.w
@@ -14,18 +14,25 @@
\def\[#1]{#1.}
\pdfoutput=1
+@s line normal
+
+@s MP int
+@s MPX int
+@s MP_options int
@s boolean int
+@s const_string int
+@s mpx_options int
@s option int
@s string int
-@s line normal
+@s timeb int
+@s timeval int
@*\MP\ executable.
Now that all of \MP\ is a library, a separate program is needed to
have our customary command-line interface.
-@ First, here are the \CEE/ includes. \.{avl.h} is needed because of an
-|avl_allocator| that is defined in \.{mplib.h}.
+@ First, here are the \CEE/ includes.
@d true 1
@d false 0
@@ -60,8 +67,8 @@ static int ini_version_test = false;
string output_directory; /* Defaults to |NULL|. */
static boolean restricted_mode = false;
-@<getopt structures@>;
-@<Declarations@>;
+@<Structures for |getopt|@>@;
+@<Declarations@>@;
@ Allocating a bit of memory, with error detection:
@@ -810,9 +817,8 @@ static void *mpost_open_file(MP mp, const char *fname, const char *fmode, int ft
if (!nokpse)
options->open_file = mpost_open_file;
-@
-@<getopt structures@>=
-#define ARGUMENT_IS(a) STREQ (mpost_options[optionid].name, a)
+@ @d ARGUMENT_IS(a) STREQ (mpost_options[optionid].name, a)
+@<Structures for |getopt|@>=
/* SunOS cc can't initialize automatic structs, so make this static. */
static struct option mpost_options[]
@@ -957,9 +963,8 @@ static struct option mpost_options[]
options->ini_version = (int)ini_version_test;
}
-@
-@<getopt structures@>=
-#define option_is(a) STREQ (dvitomp_options[optionid].name, a)
+@ @d option_is(a) STREQ (dvitomp_options[optionid].name, a)
+@<Structures for |getopt|@>=
/* SunOS cc can't initialize automatic structs, so make this static. */
static struct option dvitomp_options[]
@@ -973,7 +978,7 @@ static struct option dvitomp_options[]
@
-@<Read and set dvitomp command line options@>=
+@<Read and set \.{dvitomp} command line options@>=
{
int g; /* `|getopt|' return code. */
int optionid;
@@ -1392,7 +1397,8 @@ DLLPROC (int argc, char **argv)
#else
main (int argc, char **argv)
#endif
-{ /* |start_here| */
+@;
+{ @t\1@> /* |start_here| */
int k; /* index into buffer */
int history; /* the exit status */
MP mp; /* a metapost instance */
@@ -1414,7 +1420,7 @@ main (int argc, char **argv)
dvitomp_only=1;
}
if (dvitomp_only) {
- @<Read and set dvitomp command line options@>;
+ @<Read and set \.{dvitomp} command line options@>;
} else {
@<Read and set command line options@>;
}
@@ -1479,6 +1485,7 @@ main (int argc, char **argv)
exit(history);
else
exit(0);
+@t\8@>
}
@* Index.