253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
-
+
|
while(1){
int cnt = 0;
while( db_step(&q1)==SQLITE_ROW ){
int id = db_column_int(&q1, 0);
const char *zDate = db_column_text(&q1, 1);
const char *zFrom = db_column_text(&q1, 2);
const char *zRawMsg = db_column_text(&q1, 3);
int nByte = db_column_bytes(&q1, 4);
const int nByte = db_column_int(&q1, 4);
const char *zFName = db_column_text(&q1, 5);
const char *zFMime = db_column_text(&q1, 6);
char *zMsg;
cnt++;
blob_append(&json, zSep, -1);
zSep = ",\n";
blob_appendf(&json, "{\"msgid\":%d,\"mtime\":%!j,", id, zDate);
|