Home | History | Annotate | Download | only in dist

Lines Matching defs:in

4 ** The author disclaims copyright to this source code.  In place of
143 /* Return the difference of two time_structs in seconds */
188 /* GetProcessTimes() isn't supported in WIN95 and some other Windows versions.
218 /* Return the difference of two FILETIME structs in seconds */
280 ** This is the name of our program. It is set in main(), used
281 ** in a number of other places, mostly for error messages.
286 ** Prompt strings. Initialized in main. Settable with
300 ** This routine works like printf in that its first argument is a
302 ** in place of % fields. The result of formatting this string
369 ** This routine reads a line of text from FILE in, stores
370 ** the text in memory obtained from malloc() and returns a pointer
377 static char *local_getline(char *zLine, FILE *in){
387 if( fgets(&zLine[n], nLine - n, in)==0 ){
409 ** If in==0 then read from standard input and prompt before each line.
416 ** The result is stored in space obtained from malloc() and must either
420 static char *one_input_line(FILE *in, char *zPrior, int isContinuation){
423 if( in!=0 ){
424 zResult = local_getline(zPrior, in);
441 int valid; /* Is there legit data in here? */
464 int showHeader; /* True to show column names in List or Column mode */
467 char newline[20]; /* Record separator in MODE_Csv */
468 int colWidth[100]; /* Requested width of each column when in column mode*/
481 int *aiIndent; /* Array of indents used in MODE_Explain */
483 int iIndent; /* Index of current op in aiIndent[] */
490 #define MODE_Column 1 /* One record per line in neat columns */
512 ** Number of elements in an array
517 ** Compute a string length that is limited to what can be stored in
644 ** If a field contains any character identified by a 1 in the following
932 ** the name of the table given. Escape any quote characters in the
968 /* zIn is either a pointer to a NULL-terminated string in memory obtained
970 ** added to zIn, and the result returned in memory obtained from malloc().
1182 ** is equal, according to strcmp(), to any of the strings in the array.
1204 ** * For each "Goto", if the jump destination is earlier in the program
1216 int iOp; /* Index of operation in p->aiIndent[] */
1237 ** instruction in the aiIndent[] array. p2 and p2op may be different if
1283 ** This is very similar to SQLite's built-in sqlite3_exec()
1356 /* If the shell is currently in ".explain" mode, gather the extra
1511 ** in case it is a keyword. Ex: INSERT INTO "table" ... */
1595 ".dump ?TABLE? ... Dump the database in an SQL text format\n"
1626 ".nullvalue STRING Use STRING in place of NULL values\n"
1633 ".read FILENAME Execute SQL in FILENAME\n"
1635 ".save FILE Write in-memory database into FILE\n"
1641 ".shell CMD ARGS... Run CMD ARGS... in a system shell\n"
1644 ".system CMD ARGS... Run CMD ARGS... in a system shell\n"
1657 static int process_input(struct callback_data *p, FILE *in);
1669 FILE *in;
1675 in = fopen(zName, "rb");
1676 if( in==0 ) return;
1677 fseek(in, 0, SEEK_END);
1678 nIn = ftell(in);
1679 rewind(in);
1681 if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
1686 fclose(in);
1770 ** \NNN -> ascii character NNN in octal
1937 FILE *in; /* Read the CSV text from this input stream */
1939 int n; /* Number of bytes in z */
1962 ** + Input comes from p->in.
1963 ** + Store results in p->z of length p->n. Space to hold p->z comes
1966 ** + Keep track of the line number in p->nLine.
1967 ** + Store the character that terminates the field in p->cTerm. Store
1975 c = fgetc(p->in);
1985 c = fgetc(p->in);
2019 c = fgetc(p->in);
2403 /* When playing back a "dump", the content might appear in an order
2427 "WHERE sql NOT NULL AND type IN ('index','trigger','view')", 0
2440 " AND type IN ('index','trigger','view')"
2488 ** condition so that it does not execute if we are already in
2490 ** was to reset to explain mode in case the user previously
2581 int nCol; /* Number of columns in the table */
2582 int nByte; /* Number of bytes in an SQL string */
2585 int nSep; /* Number of bytes in p->separator[] */
2612 sCsv.in = popen(sCsv.zFile+1, "r");
2616 sCsv.in = fopen(sCsv.zFile, "rb");
2619 if( sCsv.in==0 ){
2627 xCloser(sCsv.in);
2644 xCloser(sCsv.in);
2655 xCloser(sCsv.in);
2664 xCloser(sCsv.in);
2674 xCloser(sCsv.in);
2690 xCloser(sCsv.in);
2728 xCloser(sCsv.in);
3212 " WHERE type IN ('table','view')"
3222 " WHERE type IN ('table','view')"
3229 " WHERE type IN ('table','view')"
3490 ** Return TRUE if a semicolon occurs anywhere in the first N characters
3524 ** Return TRUE if the line typed in is an SQL command terminator other
3542 ** ends in the middle of a string literal or C-style comment.
3555 ** Read input from *in and process it. If *in==0 then input
3563 static int process_input(struct callback_data *p, FILE *in){
3576 while( errCnt==0 || !bail_on_error || (in==0 && stdin_is_interactive) ){
3578 zLine = one_input_line(in, zLine, nSql>0);
3585 if( in!=0 ) break;
3637 if( in!=0 || !stdin_is_interactive ){
3748 FILE *in = NULL;
3763 in = fopen(sqliterc,"rb");
3764 if( in ){
3768 rc = process_input(p,in);
3769 fclose(in);
3823 ** Initialize the state information in data
3839 ** Output text to the console in a font that attracts extra attention.
3931 ** we do the actual processing of arguments later in a second pass.
4010 ** settings in the initialization file.
4128 printBold("transient in-memory database");