1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
|
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
static const Th_SubCommand aSub[] = {
{ "exists", array_exists_command },
{ "names", array_names_command },
{ 0, 0 }
};
return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub);
}
/*
** TH Syntax:
**
** ::tcl::pkgconfig get KEY (TODO: replace this with real KEY)
*/
static int pkgconfig_get_command(
Th_Interp *interp,
void *ctx,
int argc,
const char **argv,
int *argl
){
if( strcmp(argv[2], "KEY") ){
Th_ErrorMessage(interp, "key not known", argv[2], argl[2]);
return TH_ERROR;
}
Th_SetResult(interp, "TH1" , -1);
return TH_OK;
}
/*
** TH Syntax:
**
** ::tcl::pkgconfig get
*/
static int pkgconfig_command(
Th_Interp *interp,
void *ctx,
int argc,
const char **argv,
int *argl
){
static const Th_SubCommand aSub[] = {
{ "get", pkgconfig_get_command },
{ 0, 0 }
};
return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub);
}
/*
** Convert the script level frame specification (used by the commands
** [uplevel] and [upvar]) in (zFrame, nFrame) to an integer frame as
** used by Th_LinkVar() and Th_Eval(). If successful, write the integer
** frame level to *piFrame and return TH_OK. Otherwise, return TH_ERROR
** and leave an error message in the interpreter result.
|
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
|
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
|
+
+
|
{"breakpoint", breakpoint_command, 0},
{"return", return_command, 0},
{"break", simple_command, (void *)TH_BREAK},
{"continue", simple_command, (void *)TH_CONTINUE},
{"error", simple_command, (void *)TH_ERROR},
{"::tcl::pkgconfig", pkgconfig_command, 0},
{0, 0, 0}
};
size_t i;
/* Add the language commands. */
for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
|