** Progress handler callback. */
| 22442 | ** Progress handler callback. |
| 22443 | */ |
| 22444 | static int progress_handler(void *pClientData) { |
| 22445 | ShellState *p = (ShellState*)pClientData; |
| 22446 | p->nProgress++; |
| 22447 | if( p->nProgress>=p->mxProgress && p->mxProgress>0 ){ |
| 22448 | sqlite3_fprintf(p->out, "Progress limit reached (%u)\n", p->nProgress); |
| 22449 | if( p->flgProgress & SHELL_PROGRESS_RESET ) p->nProgress = 0; |
| 22450 | if( p->flgProgress & SHELL_PROGRESS_ONCE ) p->mxProgress = 0; |
| 22451 | return 1; |
| 22452 | } |
| 22453 | if( (p->flgProgress & SHELL_PROGRESS_QUIET)==0 ){ |
| 22454 | sqlite3_fprintf(p->out, "Progress %u\n", p->nProgress); |
| 22455 | } |
| 22456 | return 0; |
| 22457 | } |
| 22458 | #endif /* SQLITE_OMIT_PROGRESS_CALLBACK */ |
| 22459 | |
| 22460 | /* |
nothing calls this directly
no test coverage detected