Unprotected underscores in mp.w
Toby Thurston <[email protected]> Thu, 2 May 2024 18:33:24 +0100
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_1F4DEB65-3BF8-42DC-A4F8-EF002A03EB93
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
I notice that a few unprotected underscores in comments have crept into =
`mp.w` and that there is one very long line that `cweave` complains =
about. =20
Here is a diff file that shows the changes I made to get `cweave mp.w && =
luatex mp.tex` to work.
Toby
--Apple-Mail=_1F4DEB65-3BF8-42DC-A4F8-EF002A03EB93
Content-Disposition: attachment;
filename=temp.diff
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="temp.diff"
Content-Transfer-Encoding: 7bit
diff --git a/source/texk/web2c/mplibdir/mp.w b/source/texk/web2c/mplibdir/mp.w
index df12979e..3392aa9f 100644
--- a/source/texk/web2c/mplibdir/mp.w
+++ b/source/texk/web2c/mplibdir/mp.w
@@ -128,7 +128,7 @@ typedef int integer;
#define MPOST_ABS abs
#else
/* See source/texk/web2c/w2c/config.h */
-#if INTEGER_MAX == LONG_MAX /* this should mean INTEGER_TYPE == long */
+#if INTEGER_MAX == LONG_MAX /* this should mean |INTEGER_TYPE| == long */
#ifdef HAVE_LABS
#define MPOST_ABS labs
#else
@@ -136,8 +136,8 @@ typedef int integer;
#endif
#else
#define MPOST_ABS abs
-#endif /* if INTEGER_TYPE == long */
-#endif /* ifndef INTEGER_TYPE */
+#endif /* if |INTEGER_TYPE| == long */
+#endif /* ifndef |INTEGER_TYPE| */
@<Declare helpers@>;
@@ -3757,9 +3757,9 @@ mp_envelope_of, /* operation code for \.{envelope} */
mp_boundingpath_of, /* operation code for \.{boundingpath} */
mp_glyph_infont, /* operation code for \.{glyph} */
mp_kern_flag, /* operation code for \.{kern} */
-mp_m_get_left_endpoint_op, /* math interval new primitives operation code for \.{interval_get_left_endpoint} */
-mp_m_get_right_endpoint_op, /* math interval new primitives operation code for \.{interval_get_right_endpoint} */
-mp_interval_set_op, /* math interval new primitives operation code for \.{interval_set} */
+mp_m_get_left_endpoint_op, /* math interval new primitives operation code for \.{interval\_get\_left\_endpoint} */
+mp_m_get_right_endpoint_op, /* math interval new primitives operation code for \.{interval\_get\_right\_endpoint} */
+mp_interval_set_op, /* math interval new primitives operation code for \.{interval\_set} */
@ @c
@@ -18222,7 +18222,7 @@ new level (having, initially, the same properties as the old).
mp->max_in_stack=mp->input_ptr;
if ( mp->input_ptr==mp->stack_size ) {
int l = (mp->stack_size+(mp->stack_size/4));
- /* The mp->stack_size < 1001 condition is necessary to prevent C stack overflow due infinite recursion. */
+ /* The mp->stack\_size < 1001 condition is necessary to prevent C stack overflow due infinite recursion. */
if (l>1000) {fprintf(stderr, "input stack overflow\n");exit(EXIT_FAILURE);}
XREALLOC(mp->input_stack, l, in_state_record);
mp->stack_size = l;
@@ -19359,7 +19359,8 @@ static mp_node mp_scan_toks (MP mp, mp_command_code terminator,
@
@c
void mp_print_sym (mp_sym sym) {
- printf("{type = %d, v = {type = %d, data = {indep = {scale = %d, serial = %d}, n = %d, str = %p, sym = %p, node = %p, p = %p}}, text = %p}\n", sym->type, sym->v.type, (int)sym->v.data.indep.scale, (int)sym->v.data.indep.serial,
+ printf("{type = %d, v = {type = %d, data = {indep = {scale = %d, serial = %d}, n = %d, str = %p, sym = %p, node = %p, p = %p}}, text = %p}\n",
+ sym->type, sym->v.type, (int)sym->v.data.indep.scale, (int)sym->v.data.indep.serial,
sym->v.data.n.type, sym->v.data.str, sym->v.data.sym, sym->v.data.node, sym->v.data.p, sym->text);
if (is_number(sym->v.data.n)) {
mp_number n = sym->v.data.n;
@@ -25424,11 +25425,11 @@ mp_primitive (mp, "boundingpath", mp_primary_binary, mp_boundingpath_of);
mp_primitive (mp, "glyph", mp_primary_binary, mp_glyph_infont);
@:glyph_infont_}{\&{glyph} primitive@>;
mp_primitive (mp, "interval_get_left_endpoint", mp_unary, mp_m_get_left_endpoint_op); /* math interval new primitives */
-@:m_get_left_endpoint_}{\&{mget_left_endpoint} primitive@>;
+@:m_get_left_endpoint_}{\&{mget\_left\_endpoint} primitive@>;
mp_primitive (mp, "interval_get_right_endpoint", mp_unary, mp_m_get_right_endpoint_op); /* math interval new primitives */
-@:m_get_right_endpoint_}{\&{mget_right_endpoint} primitive@>;
+@:m_get_right_endpoint_}{\&{mget\_right\_endpoint} primitive@>;
mp_primitive (mp, "interval_set", mp_unary, mp_interval_set_op); /* math interval new primitives */
-@:interval_set}{\&{interval_set} primitive@>;
+@:interval_set}{\&{interval\_set} primitive@>;
@ @<Cases of |print_cmd...@>=
--Apple-Mail=_1F4DEB65-3BF8-42DC-A4F8-EF002A03EB93
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
----------------------
diff --git a/source/texk/web2c/mplibdir/mp.w =
b/source/texk/web2c/mplibdir/mp.w
index df12979e..3392aa9f 100644
--- a/source/texk/web2c/mplibdir/mp.w
+++ b/source/texk/web2c/mplibdir/mp.w
@@ -128,7 +128,7 @@ typedef int integer;
#define MPOST_ABS abs
#else
/* See source/texk/web2c/w2c/config.h */
-#if INTEGER_MAX =3D=3D LONG_MAX /* this should mean INTEGER_TYPE =3D=3D =
long */
+#if INTEGER_MAX =3D=3D LONG_MAX /* this should mean |INTEGER_TYPE| =3D=3D=
long */
#ifdef HAVE_LABS
#define MPOST_ABS labs
#else
@@ -136,8 +136,8 @@ typedef int integer;
#endif
#else
#define MPOST_ABS abs
-#endif /* if INTEGER_TYPE =3D=3D long */
-#endif /* ifndef INTEGER_TYPE */
+#endif /* if |INTEGER_TYPE| =3D=3D long */
+#endif /* ifndef |INTEGER_TYPE| */
=20
=20
@<Declare helpers@>;
@@ -3757,9 +3757,9 @@ mp_envelope_of, /* operation code for \.{envelope} =
*/
mp_boundingpath_of, /* operation code for \.{boundingpath} */
mp_glyph_infont, /* operation code for \.{glyph} */
mp_kern_flag, /* operation code for \.{kern} */
-mp_m_get_left_endpoint_op, /* math interval new primitives operation =
code for \.{interval_get_left_endpoint} */
-mp_m_get_right_endpoint_op, /* math interval new primitives operation =
code for \.{interval_get_right_endpoint} */
-mp_interval_set_op, /* math interval new primitives operation code for =
\.{interval_set} */
+mp_m_get_left_endpoint_op, /* math interval new primitives operation =
code for \.{interval\_get\_left\_endpoint} */
+mp_m_get_right_endpoint_op, /* math interval new primitives operation =
code for \.{interval\_get\_right\_endpoint} */
+mp_interval_set_op, /* math interval new primitives operation code for =
\.{interval\_set} */
=20
=20
@ @c
@@ -18222,7 +18222,7 @@ new level (having, initially, the same =
properties as the old).
mp->max_in_stack=3Dmp->input_ptr;
if ( mp->input_ptr=3D=3Dmp->stack_size ) {
int l =3D (mp->stack_size+(mp->stack_size/4));
- /* The mp->stack_size < 1001 condition is necessary to prevent =
C stack overflow due infinite recursion. */
+ /* The mp->stack\_size < 1001 condition is necessary to prevent =
C stack overflow due infinite recursion. */
if (l>1000) {fprintf(stderr, "input stack =
overflow\n");exit(EXIT_FAILURE);}
XREALLOC(mp->input_stack, l, in_state_record);
mp->stack_size =3D l;
@@ -19359,7 +19359,8 @@ static mp_node mp_scan_toks (MP mp, =
mp_command_code terminator,
@
@c
void mp_print_sym (mp_sym sym) {
- printf("{type =3D %d, v =3D {type =3D %d, data =3D {indep =3D {scale =
=3D %d, serial =3D %d}, n =3D %d, str =3D %p, sym =3D %p, node =3D %p, p =
=3D %p}}, text =3D %p}\n", sym->type, sym->v.type, =
(int)sym->v.data.indep.scale, (int)sym->v.data.indep.serial,
+ printf("{type =3D %d, v =3D {type =3D %d, data =3D {indep =3D {scale =
=3D %d, serial =3D %d}, n =3D %d, str =3D %p, sym =3D %p, node =3D %p, p =
=3D %p}}, text =3D %p}\n",=20
+ sym->type, sym->v.type, (int)sym->v.data.indep.scale, =
(int)sym->v.data.indep.serial,
sym->v.data.n.type, sym->v.data.str, sym->v.data.sym, =
sym->v.data.node, sym->v.data.p, sym->text);
if (is_number(sym->v.data.n)) {
mp_number n =3D sym->v.data.n;
@@ -25424,11 +25425,11 @@ mp_primitive (mp, "boundingpath", =
mp_primary_binary, mp_boundingpath_of);
mp_primitive (mp, "glyph", mp_primary_binary, mp_glyph_infont);
@:glyph_infont_}{\&{glyph} primitive@>;
mp_primitive (mp, "interval_get_left_endpoint", mp_unary, =
mp_m_get_left_endpoint_op); /* math interval new primitives */
-@:m_get_left_endpoint_}{\&{mget_left_endpoint} primitive@>;
+@:m_get_left_endpoint_}{\&{mget\_left\_endpoint} primitive@>;
mp_primitive (mp, "interval_get_right_endpoint", mp_unary, =
mp_m_get_right_endpoint_op); /* math interval new primitives */
-@:m_get_right_endpoint_}{\&{mget_right_endpoint} primitive@>;
+@:m_get_right_endpoint_}{\&{mget\_right\_endpoint} primitive@>;
mp_primitive (mp, "interval_set", mp_unary, mp_interval_set_op); /* =
math interval new primitives */
-@:interval_set}{\&{interval_set} primitive@>;
+@:interval_set}{\&{interval\_set} primitive@>;
=20
=20
@ @<Cases of |print_cmd...@>=3D
--Apple-Mail=_1F4DEB65-3BF8-42DC-A4F8-EF002A03EB93
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
http://tug.org/metapost/
--Apple-Mail=_1F4DEB65-3BF8-42DC-A4F8-EF002A03EB93--