Lines Matching defs:in
4 ** The author disclaims copyright to this source code. In place of
28 ** No support for loadable extensions in VxWorks.
147 ** to be disabled in some cases (ex: when generating CSV output and when
211 /* Return the difference of two time_structs in seconds */
257 /* GetProcessTimes() isn't supported in WIN95 and some other Windows
289 /* Return the difference of two FILETIME structs in seconds */
351 ** This is the name of our program. It is set in main(), used
352 ** in a number of other places, mostly for error messages.
357 ** Prompt strings. Initialized in main. Settable with
371 ** This routine works like printf in that its first argument is a
373 ** in place of % fields. The result of formatting this string
440 ** This routine reads a line of text from FILE in, stores
441 ** the text in memory obtained from malloc() and returns a pointer
448 static char *local_getline(char *zLine, FILE *in){
458 if( fgets(&zLine[n], nLine - n, in)==0 ){
480 ** If in==0 then read from standard input and prompt before each line.
487 ** The result is stored in space obtained from malloc() and must either
491 static char *one_input_line(FILE *in, char *zPrior, int isContinuation){
494 if( in!=0 ){
495 zResult = local_getline(zPrior, in);
517 int valid; /* Is there legit data in here? */
524 ** State information about the database connection is contained in an
534 int backslashOn; /* Resolve C-style \x escapes in SQL input text */
542 int showHeader; /* True to show column names in List or Column mode */
547 int colWidth[100]; /* Requested width of each column when in column mode*/
558 int *aiIndent; /* Array of indents used in MODE_Explain */
560 int iIndent; /* Index of current op in aiIndent[] */
574 #define MODE_Column 1 /* One record per line in neat columns */
611 ** Number of elements in an array
616 ** Compute a string length that is limited to what can be stored in
745 ** If a field contains any character identified by a 1 in the following
1063 ** the name of the table given. Escape any quote characters in the
1099 /* zIn is either a pointer to a NULL-terminated string in memory obtained
1101 ** added to zIn, and the result returned in memory obtained from malloc().
1384 ** is equal, according to strcmp(), to any of the strings in the array.
1406 ** * For each "Goto", if the jump destination is earlier in the program
1418 int iOp; /* Index of operation in p->aiIndent[] */
1440 ** instruction in the aiIndent[] array. p2 and p2op may be different if
1486 ** This is very similar to SQLite's built-in sqlite3_exec()
1551 /* If the shell is currently in ".explain" mode, gather the extra
1711 ** in case it is a keyword. Ex: INSERT INTO "table" ... */
1797 ".dump ?TABLE? ... Dump the database in an SQL text format\n"
1830 ".nullvalue STRING Use STRING in place of NULL values\n"
1837 ".read FILENAME Execute SQL in FILENAME\n"
1839 ".save FILE Write in-memory database into FILE\n"
1846 ".shell CMD ARGS... Run CMD ARGS... in a system shell\n"
1849 ".system CMD ARGS... Run CMD ARGS... in a system shell\n"
1862 static int process_input(ShellState *p, FILE *in);
1874 FILE *in;
1881 in = fopen(zName, "rb");
1882 if( in==0 ) return;
1883 fseek(in, 0, SEEK_END);
1884 nIn = ftell(in);
1885 rewind(in);
1887 if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
1892 fclose(in);
1985 ** \NNN -> ascii character NNN in octal
2167 FILE *in; /* Read the CSV text from this input stream */
2169 int n; /* Number of bytes in z */
2193 ** + Input comes from p->in.
2194 ** + Store results in p->z of length p->n. Space to hold p->z comes
2198 ** + Keep track of the line number in p->nLine.
2199 ** + Store the character that terminates the field in p->cTerm. Store
2208 c = fgetc(p->in);
2219 c = fgetc(p->in);
2253 c = fgetc(p->in);
2267 ** + Input comes from p->in.
2268 ** + Store results in p->z of length p->n. Space to hold p->z comes
2272 ** + Keep track of the row number in p->nLine.
2273 ** + Store the character that terminates the field in p->cTerm. Store
2282 c = fgetc(p->in);
2289 c = fgetc(p->in);
2815 /* When playing back a "dump", the content might appear in an order
2839 "WHERE sql NOT NULL AND type IN ('index','trigger','view')", 0
2852 " AND type IN ('index','trigger','view')"
2900 ** condition so that it does not execute if we are already in
2902 ** was to reset to explain mode in case the user previously
2993 int nCol; /* Number of columns in the table */
2994 int nByte; /* Number of bytes in an SQL string */
2997 int nSep; /* Number of bytes in p->colSeparator[] */
3044 fprintf(stderr, "Error: pipes are not supported in this OS\n");
3047 sCtx.in = popen(sCtx.zFile+1, "r");
3052 sCtx.in = fopen(sCtx.zFile, "rb");
3060 if( sCtx.in==0 ){
3069 xCloser(sCtx.in);
3086 xCloser(sCtx.in);
3097 xCloser(sCtx.in);
3106 xCloser(sCtx.in);
3116 xCloser(sCtx.in);
3132 xCloser(sCtx.in);
3148 ** columns in ASCII mode? If so, stop instead of NULL filling
3180 xCloser(sCtx.in);
3431 fprintf(stderr,"Error: pipes are not supported in this OS\n");
3553 fprintf(stderr, "Warning: .scanstats not available in this build.\n");
3756 /* Create an SQL statement to query for the list of tables in the
3761 " WHERE type IN ('table','view')"
3771 " WHERE type IN ('table','view')"
3778 " WHERE type IN ('table','view')"
3793 ** as an array of nul-terminated strings in azResult[]. */
4134 ** Return TRUE if a semicolon occurs anywhere in the first N characters
4168 ** Return TRUE if the line typed in is an SQL command terminator other
4186 ** ends in the middle of a string literal or C-style comment.
4199 ** Read input from *in and process it. If *in==0 then input
4207 static int process_input(ShellState *p, FILE *in){
4220 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4222 zLine = one_input_line(in, zLine, nSql>0);
4229 if( in!=0 ) break;
4282 if( in!=0 || !stdin_is_interactive ){
4395 FILE *in = NULL;
4408 in = fopen(sqliterc,"rb");
4409 if( in ){
4413 process_input(p,in);
4414 fclose(in);
4471 ** Initialize the state information in data
4488 ** Output text to the console in a font that attracts extra attention.
4555 ** this compile-time option to embed this shell program in larger
4599 ** we do the actual processing of arguments later in a second pass.
4697 ** settings in the initialization file.
4745 ** Causes C-style backslash escapes to be evaluated in SQL statements
4747 ** crazy bytes in the middle of SQL statements for testing and debugging.
4784 ** be better if all commands ran in the order that they appear. But
4845 printBold("transient in-memory database");