OLD | NEW |
1 /* | 1 /* |
2 ** 2006 January 09 | 2 ** 2006 January 09 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 " ID", 0); | 308 " ID", 0); |
309 return TCL_ERROR; | 309 return TCL_ERROR; |
310 } | 310 } |
311 i = parse_client_id(interp, argv[1]); | 311 i = parse_client_id(interp, argv[1]); |
312 if( i<0 ) return TCL_ERROR; | 312 if( i<0 ) return TCL_ERROR; |
313 if( !threadset[i].busy ){ | 313 if( !threadset[i].busy ){ |
314 Tcl_AppendResult(interp, "no such thread", 0); | 314 Tcl_AppendResult(interp, "no such thread", 0); |
315 return TCL_ERROR; | 315 return TCL_ERROR; |
316 } | 316 } |
317 client_wait(&threadset[i]); | 317 client_wait(&threadset[i]); |
318 sprintf(zBuf, "%d", threadset[i].argc); | 318 sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", threadset[i].argc); |
319 Tcl_AppendResult(interp, zBuf, 0); | 319 Tcl_AppendResult(interp, zBuf, 0); |
320 return TCL_OK; | 320 return TCL_OK; |
321 } | 321 } |
322 | 322 |
323 /* | 323 /* |
324 ** Usage: client_argv ID N | 324 ** Usage: client_argv ID N |
325 ** | 325 ** |
326 ** Wait on the most recent client_step to complete, then return the | 326 ** Wait on the most recent client_step to complete, then return the |
327 ** value of the N-th columns in the result set. | 327 ** value of the N-th columns in the result set. |
328 */ | 328 */ |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 int i; | 705 int i; |
706 | 706 |
707 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ | 707 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ |
708 Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); | 708 Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); |
709 } | 709 } |
710 return TCL_OK; | 710 return TCL_OK; |
711 } | 711 } |
712 #else | 712 #else |
713 int Sqlitetest7_Init(Tcl_Interp *interp){ return TCL_OK; } | 713 int Sqlitetest7_Init(Tcl_Interp *interp){ return TCL_OK; } |
714 #endif /* SQLITE_OS_UNIX */ | 714 #endif /* SQLITE_OS_UNIX */ |
OLD | NEW |