Lines Matching defs:in
4 ** The author disclaims copyright to this source code. In place of
138 /* Return the difference of two time_structs in seconds */
183 /* GetProcessTimes() isn't supported in WIN95 and some other Windows versions.
213 /* Return the difference of two FILETIME structs in seconds */
275 ** This is the name of our program. It is set in main(), used
276 ** in a number of other places, mostly for error messages.
281 ** Prompt strings. Initialized in main. Settable with
295 ** This routine works like printf in that its first argument is a
297 ** in place of % fields. The result of formatting this string
364 ** This routine reads a line of text from FILE in, stores
365 ** the text in memory obtained from malloc() and returns a pointer
372 static char *local_getline(char *zLine, FILE *in){
382 if( fgets(&zLine[n], nLine - n, in)==0 ){
404 ** If in==0 then read from standard input and prompt before each line.
411 ** The result is stored in space obtained from malloc() and must either
415 static char *one_input_line(FILE *in, char *zPrior, int isContinuation){
418 if( in!=0 ){
419 zResult = local_getline(zPrior, in);
436 int valid; /* Is there legit data in here? */
459 int showHeader; /* True to show column names in List or Column mode */
462 char newline[20]; /* Record separator in MODE_Csv */
463 int colWidth[100]; /* Requested width of each column when in column mode*/
476 int *aiIndent; /* Array of indents used in MODE_Explain */
478 int iIndent; /* Index of current op in aiIndent[] */
485 #define MODE_Column 1 /* One record per line in neat columns */
507 ** Number of elements in an array
512 ** Compute a string length that is limited to what can be stored in
639 ** If a field contains any character identified by a 1 in the following
927 ** the name of the table given. Escape any quote characters in the
963 /* zIn is either a pointer to a NULL-terminated string in memory obtained
965 ** added to zIn, and the result returned in memory obtained from malloc().
1177 ** is equal, according to strcmp(), to any of the strings in the array.
1199 ** * For each "Goto", if the jump destination is earlier in the program
1211 int iOp; /* Index of operation in p->aiIndent[] */
1232 ** instruction in the aiIndent[] array. p2 and p2op may be different if
1278 ** This is very similar to SQLite's built-in sqlite3_exec()
1351 /* If the shell is currently in ".explain" mode, gather the extra
1506 ** in case it is a keyword. Ex: INSERT INTO "table" ... */
1590 ".dump ?TABLE? ... Dump the database in an SQL text format\n"
1621 ".nullvalue STRING Use STRING in place of NULL values\n"
1628 ".read FILENAME Execute SQL in FILENAME\n"
1630 ".save FILE Write in-memory database into FILE\n"
1636 ".shell CMD ARGS... Run CMD ARGS... in a system shell\n"
1639 ".system CMD ARGS... Run CMD ARGS... in a system shell\n"
1652 static int process_input(struct callback_data *p, FILE *in);
1664 FILE *in;
1670 in = fopen(zName, "rb");
1671 if( in==0 ) return;
1672 fseek(in, 0, SEEK_END);
1673 nIn = ftell(in);
1674 rewind(in);
1676 if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
1681 fclose(in);
1750 ** \NNN -> ascii character NNN in octal
1917 FILE *in; /* Read the CSV text from this input stream */
1919 int n; /* Number of bytes in z */
1942 ** + Input comes from p->in.
1943 ** + Store results in p->z of length p->n. Space to hold p->z comes
1946 ** + Keep track of the line number in p->nLine.
1947 ** + Store the character that terminates the field in p->cTerm. Store
1955 c = fgetc(p->in);
1965 c = fgetc(p->in);
1999 c = fgetc(p->in);
2383 /* When playing back a "dump", the content might appear in an order
2407 "WHERE sql NOT NULL AND type IN ('index','trigger','view')", 0
2420 " AND type IN ('index','trigger','view')"
2468 ** condition so that it does not execute if we are already in
2470 ** was to reset to explain mode in case the user previously
2561 int nCol; /* Number of columns in the table */
2562 int nByte; /* Number of bytes in an SQL string */
2565 int nSep; /* Number of bytes in p->separator[] */
2592 sCsv.in = popen(sCsv.zFile+1, "r");
2596 sCsv.in = fopen(sCsv.zFile, "rb");
2599 if( sCsv.in==0 ){
2607 xCloser(sCsv.in);
2624 xCloser(sCsv.in);
2635 xCloser(sCsv.in);
2644 xCloser(sCsv.in);
2654 xCloser(sCsv.in);
2670 xCloser(sCsv.in);
2708 xCloser(sCsv.in);
3192 " WHERE type IN ('table','view')"
3202 " WHERE type IN ('table','view')"
3209 " WHERE type IN ('table','view')"
3470 ** Return TRUE if a semicolon occurs anywhere in the first N characters
3504 ** Return TRUE if the line typed in is an SQL command terminator other
3522 ** ends in the middle of a string literal or C-style comment.
3535 ** Read input from *in and process it. If *in==0 then input
3543 static int process_input(struct callback_data *p, FILE *in){
3556 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
3558 zLine = one_input_line(in, zLine, nSql>0);
3565 if( in!=0 ) break;
3617 if( in!=0 || !stdin_is_interactive ){
3728 FILE *in = NULL;
3743 in = fopen(sqliterc,"rb");
3744 if( in ){
3748 rc = process_input(p,in);
3749 fclose(in);
3803 ** Initialize the state information in data
3819 ** Output text to the console in a font that attracts extra attention.
3911 ** we do the actual processing of arguments later in a second pass.
3990 ** settings in the initialization file.
4108 printBold("transient in-memory database");