1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
|
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) {
sqlite3_str_appendchar(s,1,31);
sqlite3_str_appendchar(s,1,v.u&255?:255);
}
break;
case 'd':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%d",(signed int)v.s);
break;
case 'i':
if(argi>=argc-1) break;
|
>
>
>
>
>
|
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
|
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) {
sqlite3_str_appendchar(s,1,31);
sqlite3_str_appendchar(s,1,v.u&255?:255);
}
break;
case 'C':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) sqlite3_str_appendchar(s,1,(v.u&7)+1);
break;
case 'd':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%d",(signed int)v.s);
break;
case 'i':
if(argi>=argc-1) break;
|
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
|
break;
case TY_NUMBER:
sqlite3_str_appendf(s,"%llu",(sqlite3_int64)v.u);
break;
case TY_CLASS:
sqlite3_str_appendf(s,"%s",classes[v.u]->name);
break;
default:
Throw("Type mismatch");
}
break;
case 'u':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
|
>
>
>
|
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
|
break;
case TY_NUMBER:
sqlite3_str_appendf(s,"%llu",(sqlite3_int64)v.u);
break;
case TY_CLASS:
sqlite3_str_appendf(s,"%s",classes[v.u]->name);
break;
case TY_MESSAGE:
sqlite3_str_appendf(s,"%s",v.u<256?standard_message_names[v.u]:messages[v.u-256]);
break;
default:
Throw("Type mismatch");
}
break;
case 'u':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
|
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
|
break;
case TY_NUMBER:
quiz_text=sqlite3_mprintf("%llu",(sqlite3_int64)v.u);
break;
case TY_CLASS:
quiz_text=sqlite3_mprintf("%s",classes[v.u]->name);
break;
default:
Throw("Type mismatch");
}
}
if(!quiz_text) fatal("Allocation failed\n");
t=quiz_text;
while(*t) {
|
>
>
>
|
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
|
break;
case TY_NUMBER:
quiz_text=sqlite3_mprintf("%llu",(sqlite3_int64)v.u);
break;
case TY_CLASS:
quiz_text=sqlite3_mprintf("%s",classes[v.u]->name);
break;
case TY_MESSAGE:
quiz_text=sqlite3_mprintf("%s",v.u<256?standard_message_names[v.u]:messages[v.u-256]);
break;
default:
Throw("Type mismatch");
}
}
if(!quiz_text) fatal("Allocation failed\n");
t=quiz_text;
while(*t) {
|