Lines Matching refs:sCtx

29624     ImportCtx sCtx;             /* Reader context */  in do_meta_command()  local
29632 memset(&sCtx, 0, sizeof(sCtx)); in do_meta_command()
29659 sCtx.cColSep = SEP_Unit[0]; in do_meta_command()
29660 sCtx.cRowSep = SEP_Record[0]; in do_meta_command()
29664 sCtx.cColSep = ','; in do_meta_command()
29665 sCtx.cRowSep = '\n'; in do_meta_command()
29715 sCtx.cColSep = (u8)p->colSeparator[0]; in do_meta_command()
29716 sCtx.cRowSep = (u8)p->rowSeparator[0]; in do_meta_command()
29718 sCtx.zFile = zFile; in do_meta_command()
29719 sCtx.nLine = 1; in do_meta_command()
29720 if( sCtx.zFile[0]=='|' ){ in do_meta_command()
29725 sCtx.in = sqlite3_popen(sCtx.zFile+1, "r"); in do_meta_command()
29726 sCtx.zFile = "<pipe>"; in do_meta_command()
29727 sCtx.xCloser = pclose; in do_meta_command()
29730 sCtx.in = sqlite3_fopen(sCtx.zFile, "rb"); in do_meta_command()
29731 sCtx.xCloser = fclose; in do_meta_command()
29733 if( sCtx.in==0 ){ in do_meta_command()
29740 zSep[0] = sCtx.cColSep; in do_meta_command()
29744 zSep[0] = sCtx.cRowSep; in do_meta_command()
29748 sCtx.z = sqlite3_malloc64(120); in do_meta_command()
29749 if( sCtx.z==0 ){ in do_meta_command()
29750 import_cleanup(&sCtx); in do_meta_command()
29755 while( xRead(&sCtx) && sCtx.cTerm==sCtx.cColSep ){} in do_meta_command()
29757 import_append_char(&sCtx, 0); /* To ensure sCtx.z is allocated */ in do_meta_command()
29769 while( xRead(&sCtx) ){ in do_meta_command()
29770 zAutoColumn(sCtx.z, &dbCols, 0); in do_meta_command()
29771 if( sCtx.cTerm!=sCtx.cColSep ) break; in do_meta_command()
29777 "%s\n", sCtx.zFile, zRenames); in do_meta_command()
29782 sqlite3_fprintf(stderr,"%s: empty file\n", sCtx.zFile); in do_meta_command()
29783 import_cleanup(&sCtx); in do_meta_command()
29790 import_cleanup(&sCtx); in do_meta_command()
29804 import_cleanup(&sCtx); in do_meta_command()
29812 import_cleanup(&sCtx); in do_meta_command()
29821 import_cleanup(&sCtx); in do_meta_command()
29840 import_cleanup(&sCtx); in do_meta_command()
29866 import_cleanup(&sCtx); in do_meta_command()
29873 int startLine = sCtx.nLine; in do_meta_command()
29875 char *z = xRead(&sCtx); in do_meta_command()
29896 if( i<nCol-1 && sCtx.cTerm!=sCtx.cColSep ){ in do_meta_command()
29899 sCtx.zFile, startLine, nCol, i+1); in do_meta_command()
29904 if( sCtx.cTerm==sCtx.cColSep ){ in do_meta_command()
29906 xRead(&sCtx); in do_meta_command()
29908 }while( sCtx.cTerm==sCtx.cColSep ); in do_meta_command()
29911 sCtx.zFile, startLine, nCol, i); in do_meta_command()
29918 sCtx.zFile, startLine, sqlite3_errmsg(p->db)); in do_meta_command()
29919 sCtx.nErr++; in do_meta_command()
29921 sCtx.nRow++; in do_meta_command()
29924 }while( sCtx.cTerm!=EOF ); in do_meta_command()
29926 import_cleanup(&sCtx); in do_meta_command()
29932 sCtx.nRow, sCtx.nErr, sCtx.nLine-1); in do_meta_command()