1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
|
if(argi>=argc-1) break;
if(vstack[vstackptr+argi].t==TY_CLASS && vstack[vstackptr+argi+1].t==TY_NUMBER) {
Class*c=classes[vstack[vstackptr+argi].u];
int n=vstack[vstackptr+argi+1].u&255;
if(n<c->nimages) sqlite3_str_appendf(s,"\x0E\x07:%d\\",c->images[n]&0x7FFF);
}
argi+=2;
break;
case 's':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
switch(v.t) {
case TY_STRING: case TY_LEVELSTRING:
sqlite3_str_appendf(s,"%s",value_string_ptr(v));
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++];
if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%u",(unsigned int)v.u);
break;
|
>
>
>
>
>
>
>
>
>
>
>
>
<
<
|
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
|
if(argi>=argc-1) break;
if(vstack[vstackptr+argi].t==TY_CLASS && vstack[vstackptr+argi+1].t==TY_NUMBER) {
Class*c=classes[vstack[vstackptr+argi].u];
int n=vstack[vstackptr+argi+1].u&255;
if(n<c->nimages) sqlite3_str_appendf(s,"\x0E\x07:%d\\",c->images[n]&0x7FFF);
}
argi+=2;
break;
case 'R':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) {
static const char*const r1000[10]={"","M","MM","MMM","MMMM","MMMMM","MMMMMM","MMMMMMM","MMMMMMMM","MMMMMMMMM"};
static const char*const r100[10]={"","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"};
static const char*const r10[10]={"","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"};
static const char*const r1[10]={"","I","II","III","IV","V","VI","VII","VIII","IX"};
if(v.u) sqlite3_str_appendf(s,"%s%s%s%s",r1000[(v.u/1000)%10],r100[(v.u/100)%10],r10[(v.u/10)%10],r1[v.u%10]);
else sqlite3_str_appendchar(s,1,'N');
}
break;
case 's':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
switch(v.t) {
case TY_STRING: case TY_LEVELSTRING:
sqlite3_str_appendf(s,"%s",value_string_ptr(v));
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;
}
break;
case 'u':
if(argi==argc) break;
v=vstack[vstackptr+argi++];
if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%u",(unsigned int)v.u);
break;
|