@@ -998,7 +998,7 @@ TxGetInputEvent(
998
998
/*
999
999
* ----------------------------------------------------------------------------
1000
1000
*
1001
- * TxParseString --
1001
+ * TxParseString_internal --
1002
1002
*
1003
1003
* Parse a string into commands, and add them to the rear of a queue.
1004
1004
* The commands in the queue should eventually be freed by the caller
@@ -1010,11 +1010,13 @@ TxGetInputEvent(
1010
1010
* Side Effects:
1011
1011
* None.
1012
1012
*
1013
+ * Module internal API. See TxParseString() for public version.
1014
+ *
1013
1015
* ----------------------------------------------------------------------------
1014
1016
*/
1015
1017
1016
- void
1017
- TxParseString (
1018
+ static void
1019
+ TxParseString_internal (
1018
1020
const char * str , /* The string to be parsed. */
1019
1021
DQueue * q , /* Add to the tail of this queue. */
1020
1022
TxInputEvent * event ) /* An event to supply the point, window ID,
@@ -1053,6 +1055,53 @@ TxParseString(
1053
1055
}
1054
1056
}
1055
1057
1058
+ /*
1059
+ * ----------------------------------------------------------------------------
1060
+ *
1061
+ * TxParseString --
1062
+ *
1063
+ * Parse a string into commands, and add them to the rear of a queue.
1064
+ * The commands in the queue should eventually be freed by the caller
1065
+ * via TxFreeCommand().
1066
+ *
1067
+ * Results:
1068
+ * None.
1069
+ *
1070
+ * Side Effects:
1071
+ * None.
1072
+ *
1073
+ * Public API. See also TxParseString_internal().
1074
+ *
1075
+ * ----------------------------------------------------------------------------
1076
+ */
1077
+ void
1078
+ TxParseString (
1079
+ const char * str ) /* The string to be parsed. */
1080
+ {
1081
+ TxParseString_internal (str , NULL , NULL );
1082
+ }
1083
+
1084
+ #else
1085
+
1086
+ /* tclmagic.c defines TxParseString() so we need a shim to other way
1087
+ *
1088
+ * FIXME it feels like there is some design error here, only this
1089
+ * file cares about DQueue/TxInputEvent arguments but they are
1090
+ * passed but not used by tclmagic.c TxParseString()
1091
+ *
1092
+ * It must be that !MAGIC_WRAPPER needs the DQueue/TxInputEvent for
1093
+ * the other builds, such as WASM.
1094
+ *
1095
+ */
1096
+ static void
1097
+ TxParseString_internal (
1098
+ const char * str , /* The string to be parsed. */
1099
+ DQueue * q ,
1100
+ TxInputEvent * event )
1101
+ {
1102
+ TxParseString (str );
1103
+ }
1104
+
1056
1105
#endif /* !MAGIC_WRAPPER */
1057
1106
1058
1107
/*
@@ -1149,7 +1198,7 @@ txGetInteractiveCommand(
1149
1198
(void ) TxGetLinePrompt (inputLine , TX_MAX_CMDLEN , TX_CMD_PROMPT );
1150
1199
if (inputLine [0 ] != '\0' ) MacroDefine (DBWclientID , (int )'.' ,
1151
1200
inputLine , NULL , FALSE);
1152
- TxParseString (inputLine , queue , (TxInputEvent * ) NULL );
1201
+ TxParseString_internal (inputLine , queue , (TxInputEvent * ) NULL );
1153
1202
}
1154
1203
else
1155
1204
{
@@ -1182,11 +1231,11 @@ txGetInteractiveCommand(
1182
1231
TX_MAX_CMDLEN , TX_CMD_PROMPT , macroDef );
1183
1232
if (inputLine [0 ] != '\0' ) MacroDefine (DBWclientID , (int )'.' ,
1184
1233
inputLine , NULL , FALSE);
1185
- TxParseString (inputLine , queue , (TxInputEvent * ) NULL );
1234
+ TxParseString_internal (inputLine , queue , (TxInputEvent * ) NULL );
1186
1235
}
1187
1236
else
1188
1237
{
1189
- TxParseString (macroDef , queue , (TxInputEvent * ) NULL );
1238
+ TxParseString_internal (macroDef , queue , (TxInputEvent * ) NULL );
1190
1239
}
1191
1240
freeMagic (macroDef );
1192
1241
}
@@ -1291,7 +1340,7 @@ txGetFileCommand(
1291
1340
if ((inputLine [0 ] == ':' ) || (inputLine [1 ] == ';' )) linep ++ ;
1292
1341
#endif
1293
1342
1294
- TxParseString (linep , queue , (TxInputEvent * ) NULL );
1343
+ TxParseString_internal (linep , queue , (TxInputEvent * ) NULL );
1295
1344
}
1296
1345
1297
1346
/*
0 commit comments