Lines Matching refs:sCtx

19392     ImportCtx sCtx;             /* Reader context */  in do_meta_command()  local
19399 memset(&sCtx, 0, sizeof(sCtx)); in do_meta_command()
19400 sCtx.z = sqlite3_malloc64(120); in do_meta_command()
19401 if( sCtx.z==0 ){ in do_meta_command()
19402 import_cleanup(&sCtx); in do_meta_command()
19429 sCtx.cColSep = SEP_Unit[0]; in do_meta_command()
19430 sCtx.cRowSep = SEP_Record[0]; in do_meta_command()
19434 sCtx.cColSep = ','; in do_meta_command()
19435 sCtx.cRowSep = '\n'; in do_meta_command()
19492 sCtx.cColSep = p->colSeparator[0]; in do_meta_command()
19493 sCtx.cRowSep = p->rowSeparator[0]; in do_meta_command()
19495 sCtx.zFile = zFile; in do_meta_command()
19496 sCtx.nLine = 1; in do_meta_command()
19497 if( sCtx.zFile[0]=='|' ){ in do_meta_command()
19503 sCtx.in = popen(sCtx.zFile+1, "r"); in do_meta_command()
19504 sCtx.zFile = "<pipe>"; in do_meta_command()
19505 sCtx.xCloser = pclose; in do_meta_command()
19508 sCtx.in = fopen(sCtx.zFile, "rb"); in do_meta_command()
19509 sCtx.xCloser = fclose; in do_meta_command()
19511 if( sCtx.in==0 ){ in do_meta_command()
19514 import_cleanup(&sCtx); in do_meta_command()
19520 zSep[0] = sCtx.cColSep; in do_meta_command()
19524 zSep[0] = sCtx.cRowSep; in do_meta_command()
19529 while( xRead(&sCtx) && sCtx.cTerm==sCtx.cColSep ){} in do_meta_command()
19533 import_cleanup(&sCtx); in do_meta_command()
19538 import_append_char(&sCtx, 0); /* To ensure sCtx.z is allocated */ in do_meta_command()
19542 while( xRead(&sCtx) ){ in do_meta_command()
19543 zCreate = sqlite3_mprintf("%z%c\n \"%w\" TEXT", zCreate, cSep, sCtx.z); in do_meta_command()
19545 if( sCtx.cTerm!=sCtx.cColSep ) break; in do_meta_command()
19549 import_cleanup(&sCtx); in do_meta_command()
19550 utf8_printf(stderr,"%s: empty file\n", sCtx.zFile); in do_meta_command()
19563 import_cleanup(&sCtx); in do_meta_command()
19573 import_cleanup(&sCtx); in do_meta_command()
19583 import_cleanup(&sCtx); in do_meta_command()
19602 import_cleanup(&sCtx); in do_meta_command()
19609 int startLine = sCtx.nLine; in do_meta_command()
19611 char *z = xRead(&sCtx); in do_meta_command()
19624 if( i<nCol-1 && sCtx.cTerm!=sCtx.cColSep ){ in do_meta_command()
19627 sCtx.zFile, startLine, nCol, i+1); in do_meta_command()
19632 if( sCtx.cTerm==sCtx.cColSep ){ in do_meta_command()
19634 xRead(&sCtx); in do_meta_command()
19636 }while( sCtx.cTerm==sCtx.cColSep ); in do_meta_command()
19639 sCtx.zFile, startLine, nCol, i); in do_meta_command()
19645 utf8_printf(stderr, "%s:%d: INSERT failed: %s\n", sCtx.zFile, in do_meta_command()
19647 sCtx.nErr++; in do_meta_command()
19649 sCtx.nRow++; in do_meta_command()
19652 }while( sCtx.cTerm!=EOF ); in do_meta_command()
19654 import_cleanup(&sCtx); in do_meta_command()
19660 sCtx.nRow, sCtx.nErr, sCtx.nLine-1); in do_meta_command()