[metapost] Unprotected underscores in mp.w
Toby Thurston
thurston at eml.cc
Thu May 2 19:33:24 CEST 2024
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.
Here is a diff file that shows the changes I made to get `cweave mp.w && luatex mp.tex` to work.
Toby
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.diff
Type: application/octet-stream
Size: 3984 bytes
Desc: not available
URL: <https://tug.org/pipermail/metapost/attachments/20240502/61189f37/attachment.obj>
-------------- next part --------------
----------------------
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...@>=
More information about the metapost
mailing list.