OLD | NEW |
1 /* | 1 /* |
2 ** 2003 December 18 | 2 ** 2003 December 18 |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 " ID", 0); | 263 " ID", 0); |
264 return TCL_ERROR; | 264 return TCL_ERROR; |
265 } | 265 } |
266 i = parse_thread_id(interp, argv[1]); | 266 i = parse_thread_id(interp, argv[1]); |
267 if( i<0 ) return TCL_ERROR; | 267 if( i<0 ) return TCL_ERROR; |
268 if( !threadset[i].busy ){ | 268 if( !threadset[i].busy ){ |
269 Tcl_AppendResult(interp, "no such thread", 0); | 269 Tcl_AppendResult(interp, "no such thread", 0); |
270 return TCL_ERROR; | 270 return TCL_ERROR; |
271 } | 271 } |
272 thread_wait(&threadset[i]); | 272 thread_wait(&threadset[i]); |
273 sprintf(zBuf, "%d", threadset[i].argc); | 273 sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", threadset[i].argc); |
274 Tcl_AppendResult(interp, zBuf, 0); | 274 Tcl_AppendResult(interp, zBuf, 0); |
275 return TCL_OK; | 275 return TCL_OK; |
276 } | 276 } |
277 | 277 |
278 /* | 278 /* |
279 ** Usage: thread_argv ID N | 279 ** Usage: thread_argv ID N |
280 ** | 280 ** |
281 ** Wait on the most recent thread_step to complete, then return the | 281 ** Wait on the most recent thread_step to complete, then return the |
282 ** value of the N-th columns in the result set. | 282 ** value of the N-th columns in the result set. |
283 */ | 283 */ |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 int i; | 713 int i; |
714 | 714 |
715 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ | 715 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ |
716 Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); | 716 Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); |
717 } | 717 } |
718 return TCL_OK; | 718 return TCL_OK; |
719 } | 719 } |
720 #else | 720 #else |
721 int Sqlitetest4_Init(Tcl_Interp *interp){ return TCL_OK; } | 721 int Sqlitetest4_Init(Tcl_Interp *interp){ return TCL_OK; } |
722 #endif /* SQLITE_OS_UNIX */ | 722 #endif /* SQLITE_OS_UNIX */ |
OLD | NEW |