summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2019-01-27 19:13:41 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2019-01-27 19:13:41 +0000
commit29bfc12a67a01a3f18a5c6f729dde5634b48fade (patch)
tree076515664c19478f9393fcb585aed5d3d5c52eb4 /Build/source
parent26018324f721b0c1e8dabef2253c941a26574f6a (diff)
Minor TeXnical corrections in non-code of mpost.w.
git-svn-id: svn://tug.org/texlive/trunk@49833 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/mplibdir/mpost.w48
2 files changed, 32 insertions, 20 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index 73cebd69225..57d3890ada0 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-27 Andreas Scherer <https://ascherer.github.io>
+ * mpost.w: TeXnical nitpicking.
+
+
2019-01-26 Luigi Scarso <luigi.scarso@gmail.com>
* Fixed bisection algorithm (overflow of number of bisections in decimal mode with low precision)
* Added 2 levels to the bisection algorithm for cubic intersection. Need testing.
diff --git a/Build/source/texk/web2c/mplibdir/mpost.w b/Build/source/texk/web2c/mplibdir/mpost.w
index 3a99f6db4de..63907db9854 100644
--- a/Build/source/texk/web2c/mplibdir/mpost.w
+++ b/Build/source/texk/web2c/mplibdir/mpost.w
@@ -14,13 +14,18 @@
\def\[#1]{#1.}
\pdfoutput=1
+@s boolean int
+@s option int
+@s string int
+@s line normal
+
@*\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 C includes. |avl.h| is needed because of an
-|avl_allocator| that is defined in |mplib.h|
+@ First, here are the \CEE/ includes. \.{avl.h} is needed because of an
+|avl_allocator| that is defined in \.{mplib.h}.
@d true 1
@d false 0
@@ -35,7 +40,7 @@ have our customary command-line interface.
#elif defined (HAVE_SYS_TIMEB_H)
#include <sys/timeb.h>
#endif
-#include <time.h> /* For `struct tm'. Moved here for Visual Studio 2005. */
+#include <time.h> /* For `|struct tm|'. Moved here for Visual Studio 2005. */
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
@@ -43,7 +48,7 @@ have our customary command-line interface.
#include <mpxout.h>
#include <kpathsea/kpathsea.h>
@= /*@@null@@*/ @> static char *mpost_tex_program = NULL;
-static int debug = 0; /* debugging for makempx */
+static int debug = 0; /* debugging for \.{makempx} */
static int nokpse = 0;
static boolean recorder_enabled = false;
static string recorder_name = NULL;
@@ -52,7 +57,7 @@ static char *job_name = NULL;
static char *job_area = NULL;
static int dvitomp_only = 0;
static int ini_version_test = false;
-string output_directory; /* Defaults to NULL. */
+string output_directory; /* Defaults to |NULL|. */
static boolean restricted_mode = false;
@<getopt structures@>;
@@ -175,7 +180,7 @@ static void mpost_run_editor (MP mp, char *fname, int fline) {
break;
case '\0':
*temp++ = '%';
- /* Back up to the null to force termination. */
+ /* Back up to the |NULL| to force termination. */
edit_value--;
break;
default:
@@ -243,7 +248,7 @@ options->run_editor = mpost_run_editor;
static string normalize_quotes (const char *name, const char *mesg) {
boolean quoted = false;
boolean must_quote = (strchr(name, ' ') != NULL);
- /* Leave room for quotes and NUL. */
+ /* Leave room for quotes and |NULL|. */
string ret = (string)mpost_xmalloc(strlen(name)+3);
string p;
const_string q;
@@ -326,8 +331,8 @@ void recorder_start(char *jobname) {
return kpse_find_file (nam, fmt, req);
}
-@ Invoke {\tt makempx} (or {\tt troffmpx}) to make sure there is an
- up-to-date {\tt .mpx} file for a given {\tt .mp} file. (Original
+@ Invoke \.{makempx} (or \.{troffmpx}) to make sure there is an
+ up-to-date \.{.mpx} file for a given \.{.mp} file. (Original
from John Hobby 3/14/90)
@d default_args " --parse-first-line --interaction=nonstopmode"
@@ -683,7 +688,7 @@ if (!nokpse)
options->find_file = mpost_find_file;
@ The |mpost| program supports setting of internal values
-via a |-s| commandline switch. Since this switch is repeatable,
+via a \.{-s} commandline switch. Since this switch is repeatable,
a structure is needed to store the found values in, which is a
simple linked list.
@@ -695,7 +700,7 @@ typedef struct set_list_item {
struct set_list_item *next;
} set_list_item ;
-@ Here is the global value that is the head of the list of |-s| options.
+@ Here is the global value that is the head of the list of \.{-s} options.
@c
struct set_list_item *set_list = NULL;
@@ -847,7 +852,7 @@ static struct option mpost_options[]
@<Read and set command line options@>=
{
- int g; /* `getopt' return code. */
+ int g; /* `|getopt|' return code. */
int optionid;
for (;;) {
g = getopt_long_only (argc, argv, "+", mpost_options, &optionid);
@@ -970,7 +975,7 @@ static struct option dvitomp_options[]
@
@<Read and set dvitomp command line options@>=
{
- int g; /* `getopt' return code. */
+ int g; /* `|getopt|' return code. */
int optionid;
for (;;) {
g = getopt_long_only (argc, argv, "+", dvitomp_options, &optionid);
@@ -1113,9 +1118,9 @@ input.
int optind_aux = optind;
size_t buflen = 0;
for(;optind_aux<argc;optind_aux++) {
- buflen +=(strlen(argv[optind_aux])+1); /* reserve space for ' ' as separator */
+ buflen +=(strlen(argv[optind_aux])+1); /* reserve space for |' '| as separator */
}
- /* Last char is ' ', no need to reserve space for final '\0' */
+ /* Last char is |' '|, no need to reserve space for final |'\0'| */
if (buflen > max_command_line_size) {
fprintf(stderr,"length of command line too long!\n");
exit(EXIT_FAILURE);
@@ -1141,7 +1146,7 @@ input.
}
}
-@ A simple function to get numerical |texmf.cnf| values
+@ A simple function to get numerical \.{texmf.cnf} values
@c
static int setup_var (int def, const char *var_name, boolean nokpse) {
if (!nokpse) {
@@ -1348,15 +1353,16 @@ if (options->job_name != NULL) {
}
} else {
job_name = tmp_job;
- /* |job_area| stays NULL */
+ /* |job_area| stays |NULL| */
}
}
}
}
options->job_name = job_name;
-@ We |#define DLLPROC dllmpostmain| in order to build \MP\ as DLL for
-W32\TeX.
+@ We |
+#define DLLPROC dllmpostmain
+| in order to build \MP\ as DLL for W32\TeX.
@<Declarations@>=
#define DLLPROC dllmpostmain
@@ -1391,7 +1397,7 @@ main (int argc, char **argv)
int history; /* the exit status */
MP mp; /* a metapost instance */
struct MP_options * options; /* instance options */
- char *user_progname = NULL; /* If the user overrides |argv[0]| with {\tt -progname}. */
+ char *user_progname = NULL; /* If the user overrides |argv[0]| with \.{-progname}. */
options = mp_options();
options->ini_version = (int)false;
options->print_found_names = (int)true;
@@ -1474,3 +1480,5 @@ main (int argc, char **argv)
else
exit(0);
}
+
+@* Index.