Home | History | Annotate | Download | only in orig

Lines Matching defs:in

4 ** The author disclaims copyright to this source code.  In place of
28 ** No support for loadable extensions in VxWorks.
141 ** to be disabled in some cases (ex: when generating CSV output and when
205 /* Return the difference of two time_structs in seconds */
251 /* GetProcessTimes() isn't supported in WIN95 and some other Windows
283 /* Return the difference of two FILETIME structs in seconds */
345 ** This is the name of our program. It is set in main(), used
346 ** in a number of other places, mostly for error messages.
351 ** Prompt strings. Initialized in main. Settable with
365 ** This routine works like printf in that its first argument is a
367 ** in place of % fields. The result of formatting this string
434 ** This routine reads a line of text from FILE in, stores
435 ** the text in memory obtained from malloc() and returns a pointer
442 static char *local_getline(char *zLine, FILE *in){
452 if( fgets(&zLine[n], nLine - n, in)==0 ){
474 ** If in==0 then read from standard input and prompt before each line.
481 ** The result is stored in space obtained from malloc() and must either
485 static char *one_input_line(FILE *in, char *zPrior, int isContinuation){
488 if( in!=0 ){
489 zResult = local_getline(zPrior, in);
511 int valid; /* Is there legit data in here? */
518 ** State information about the database connection is contained in an
528 int backslashOn; /* Resolve C-style \x escapes in SQL input text */
536 int showHeader; /* True to show column names in List or Column mode */
541 int colWidth[100]; /* Requested width of each column when in column mode*/
552 int *aiIndent; /* Array of indents used in MODE_Explain */
554 int iIndent; /* Index of current op in aiIndent[] */
568 #define MODE_Column 1 /* One record per line in neat columns */
605 ** Number of elements in an array
610 ** Compute a string length that is limited to what can be stored in
739 ** If a field contains any character identified by a 1 in the following
1057 ** the name of the table given. Escape any quote characters in the
1093 /* zIn is either a pointer to a NULL-terminated string in memory obtained
1095 ** added to zIn, and the result returned in memory obtained from malloc().
1378 ** is equal, according to strcmp(), to any of the strings in the array.
1400 ** * For each "Goto", if the jump destination is earlier in the program
1412 int iOp; /* Index of operation in p->aiIndent[] */
1434 ** instruction in the aiIndent[] array. p2 and p2op may be different if
1480 ** This is very similar to SQLite's built-in sqlite3_exec()
1545 /* If the shell is currently in ".explain" mode, gather the extra
1705 ** in case it is a keyword. Ex: INSERT INTO "table" ... */
1791 ".dump ?TABLE? ... Dump the database in an SQL text format\n"
1824 ".nullvalue STRING Use STRING in place of NULL values\n"
1831 ".read FILENAME Execute SQL in FILENAME\n"
1833 ".save FILE Write in-memory database into FILE\n"
1840 ".shell CMD ARGS... Run CMD ARGS... in a system shell\n"
1843 ".system CMD ARGS... Run CMD ARGS... in a system shell\n"
1856 static int process_input(ShellState *p, FILE *in);
1868 FILE *in;
1875 in = fopen(zName, "rb");
1876 if( in==0 ) return;
1877 fseek(in, 0, SEEK_END);
1878 nIn = ftell(in);
1879 rewind(in);
1881 if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
1886 fclose(in);
1963 ** \NNN -> ascii character NNN in octal
2145 FILE *in; /* Read the CSV text from this input stream */
2147 int n; /* Number of bytes in z */
2171 ** + Input comes from p->in.
2172 ** + Store results in p->z of length p->n. Space to hold p->z comes
2176 ** + Keep track of the line number in p->nLine.
2177 ** + Store the character that terminates the field in p->cTerm. Store
2186 c = fgetc(p->in);
2197 c = fgetc(p->in);
2231 c = fgetc(p->in);
2245 ** + Input comes from p->in.
2246 ** + Store results in p->z of length p->n. Space to hold p->z comes
2250 ** + Keep track of the row number in p->nLine.
2251 ** + Store the character that terminates the field in p->cTerm. Store
2260 c = fgetc(p->in);
2267 c = fgetc(p->in);
2793 /* When playing back a "dump", the content might appear in an order
2817 "WHERE sql NOT NULL AND type IN ('index','trigger','view')", 0
2830 " AND type IN ('index','trigger','view')"
2878 ** condition so that it does not execute if we are already in
2880 ** was to reset to explain mode in case the user previously
2971 int nCol; /* Number of columns in the table */
2972 int nByte; /* Number of bytes in an SQL string */
2975 int nSep; /* Number of bytes in p->colSeparator[] */
3022 fprintf(stderr, "Error: pipes are not supported in this OS\n");
3025 sCtx.in = popen(sCtx.zFile+1, "r");
3030 sCtx.in = fopen(sCtx.zFile, "rb");
3038 if( sCtx.in==0 ){
3047 xCloser(sCtx.in);
3064 xCloser(sCtx.in);
3075 xCloser(sCtx.in);
3084 xCloser(sCtx.in);
3094 xCloser(sCtx.in);
3110 xCloser(sCtx.in);
3126 ** columns in ASCII mode? If so, stop instead of NULL filling
3158 xCloser(sCtx.in);
3409 fprintf(stderr,"Error: pipes are not supported in this OS\n");
3531 fprintf(stderr, "Warning: .scanstats not available in this build.\n");
3734 /* Create an SQL statement to query for the list of tables in the
3739 " WHERE type IN ('table','view')"
3749 " WHERE type IN ('table','view')"
3756 " WHERE type IN ('table','view')"
3771 ** as an array of nul-terminated strings in azResult[]. */
4112 ** Return TRUE if a semicolon occurs anywhere in the first N characters
4146 ** Return TRUE if the line typed in is an SQL command terminator other
4164 ** ends in the middle of a string literal or C-style comment.
4177 ** Read input from *in and process it. If *in==0 then input
4185 static int process_input(ShellState *p, FILE *in){
4198 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
4200 zLine = one_input_line(in, zLine, nSql>0);
4207 if( in!=0 ) break;
4260 if( in!=0 || !stdin_is_interactive ){
4373 FILE *in = NULL;
4386 in = fopen(sqliterc,"rb");
4387 if( in ){
4391 process_input(p,in);
4392 fclose(in);
4449 ** Initialize the state information in data
4466 ** Output text to the console in a font that attracts extra attention.
4533 ** this compile-time option to embed this shell program in larger
4577 ** we do the actual processing of arguments later in a second pass.
4675 ** settings in the initialization file.
4723 ** Causes C-style backslash escapes to be evaluated in SQL statements
4725 ** crazy bytes in the middle of SQL statements for testing and debugging.
4762 ** be better if all commands ran in the order that they appear. But
4823 printBold("transient in-memory database");