Lines Matching defs:mode

64 ** the browser-mode build has much different user input requirements
65 ** and this build mode rewires the user input subsystem to account for
143 # define S_ISLNK(mode) (0)
249 /* On Windows, we normally run with output mode of TEXT so that \n characters
649 # define STAT_CHR_SRC(mode) ((mode & (_S_IFCHR|_S_IFIFO|_S_IFREG))!=0)
664 # define STAT_CHR_SRC(mode) (S_ISREG(mode)||S_ISFIFO(mode)||S_ISCHR(mode))
1110 #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
1114 #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
1118 #define S_ISLNK(mode) (0)
4652 ** be passed an integer value that corresponds to a POSIX mode
4657 ** regular files: (mode & 0170000)==0100000
4658 ** symbolic links: (mode & 0170000)==0120000
4659 ** directories: (mode & 0170000)==0040000
4665 ** set to (mode & 0777) before returning.
4694 ** mode: Value of stat.st_mode for directory entry (an integer).
4736 # define mkdir(path,mode) _mkdir(path)
4747 #define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
4749 #define FSDIR_COLUMN_MODE 1 /* Access mode */
4997 mode_t mode, /* MODE parameter passed to writefile() */
5002 if( S_ISLNK(mode) ){
5008 if( S_ISDIR(mode) ){
5009 if( mkdir(zFile, mode) ){
5018 || ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777))
5038 if( rc==0 && mode && chmod(zFile, mode & 0777) ){
5114 mode_t mode = 0;
5128 mode = (mode_t)sqlite3_value_int(argv[2]);
5134 res = writeFile(context, zFile, argv[1], mode, mtime);
5137 res = writeFile(context, zFile, argv[1], mode, mtime);
5142 if( S_ISLNK(mode) ){
5144 }else if( S_ISDIR(mode) ){
6919 ** Definitions for mode bitmasks S_IFDIR, S_IFREG and S_IFLNK.
6940 "mode," /* 1: POSIX mode for file */
7888 case 1: /* mode */
7938 ** it to be a directory either if the mode suggests so, or if
7940 u32 mode = pCDS->iExternalAttr >> 16;
7941 if( !(mode & S_IFDIR) && pCDS->zFile[pCDS->nFile-1]!='/' ){
8255 u32 mode = 0;
8257 mode = (bIsDir ? (S_IFDIR + 0755) : (S_IFREG + 0644));
8259 mode = (unsigned int)sqlite3_value_int(pVal);
8265 case '-': mode |= S_IFREG; break;
8266 case 'd': mode |= S_IFDIR; break;
8267 case 'l': mode |= S_IFLNK; break;
8271 if( z[i]==zTemplate[i] ) mode |= 1 << (9-i);
8275 if( ((mode & S_IFDIR)==0)==bIsDir ){
8276 /* The "mode" attribute is a directory, but data has been specified.
8277 ** Or vice-versa - no data but "mode" is a file or symlink. */
8278 *pzErr = sqlite3_mprintf("zipfile: mode does not match data");
8281 *pMode = mode;
8285 *pzErr = sqlite3_mprintf("zipfile: parse error in mode: %s", z);
8394 u32 mode = 0; /* Mode for new entry */
8480 rc = zipfileGetMode(apVal[3], bIsDir, &mode, &pTab->base.zErrMsg);
8546 pNew->cds.iExternalAttr = (mode<<16);
8786 ** SELECT zipfile(name,mode,mtime,data) ...
8787 ** SELECT zipfile(name,mode,mtime,data,method) ...
8800 u32 mode;
8885 /* Decode the "mode" argument. */
8886 rc = zipfileGetMode(pMode, bIsDir, &mode, &zErr);
8923 e.cds.iExternalAttr = (mode<<16);
13480 ** If this recover handle is not in SQL callback mode (i.e. was not created
13752 ** If the handle is in SQL callback mode, then callbacks are invoked
13827 ** If the recover handle is in SQL callback mode, then equivalent callbacks
13880 ** If the recover handle is in SQL callback mode, then the SQL statement
14931 ** + the wal-mode flags (16-bits at offset 18)
15514 /* Parameters affecting columnar mode result display (defaulting together) */
15517 u8 bQuote; /* Quote results for .mode box and table */
15530 u8 autoExplain; /* Automatically turn on .explain mode */
15532 u8 autoEQPtest; /* autoEQP is in test mode */
15533 u8 autoEQPtrace; /* autoEQP is in trace mode */
15541 ColModeOpts cmOpts; /* Option values affecting columnar mode output */
15553 int mode; /* An output mode setting */
15554 int modePrior; /* Saved mode */
15555 int cMode; /* temporary output mode for the current query */
15556 int normalMode; /* Output mode before ".explain on" */
15558 int showHeader; /* True to show column names in List or Column mode */
15594 char *zNonce; /* Nonce for temporary safe-mode excapes */
15620 #define SHELL_OPEN_UNSPEC 0 /* No open-mode specified */
15754 ** If in safe mode, print an error message described by the arguments
15918 ** Save or restore the current output mode
15921 p->modePrior = p->mode;
15927 p->mode = p->modePrior;
16262 ** This authorizer runs in safe mode.
16290 failIfSafeMode(p, "cannot run ATTACH in safe mode");
16298 failIfSafeMode(p, "cannot use the %s() function in safe mode",
17471 p->cMode = p->mode;
17478 p->cMode = p->mode;
17505 p->cMode = p->mode;
17692 ** z[] is a line of text that is to be displayed the .mode box or table or
18268 ** any result rows/columns depending on the current mode
18348 /* Also do an EXPLAIN for ".eqp full" mode */
18372 pArg->cMode = pArg->mode;
18382 /* If the shell is currently in ".explain" mode, gather the extra
18660 savedMode = p->mode;
18662 p->mode = p->cMode = MODE_Insert;
18671 p->mode = savedMode;
18800 ".explain ?on|off|auto? Change the EXPLAIN formatting mode. Default: auto",
18818 " * If neither --csv or --ascii are used, the input mode is derived",
18819 " from the \".mode\" output mode",
18842 ".mode MODE ?OPTIONS? Set output mode",
18859 " OPTIONS: (for columnar modes or insert mode):",
18865 " TABLE The name of SQL table used for \"insert\" mode",
18867 ".nonce STRING Suspend safe mode for one command if nonce matches",
21288 "lsmode(mode), sz, datetime(mtime, 'unixepoch'), name"
21370 " writefile(($dir || name), %s, mode, mtime) "
21471 ** "update" only overwrites if the size or mtime or mode has changed.
21481 " mode INT, -- access permissions\n"
21488 "REPLACE INTO %s(name,mode,mtime,sz,data)\n"
21491 " mode,\n"
21493 " CASE substr(lsmode(mode),1,1)\n"
21499 " WHERE lsmode(mode) NOT LIKE '?%%'%s;"
21501 "REPLACE INTO %s(name,mode,mtime,data)\n"
21504 " mode,\n"
21508 " WHERE lsmode(mode) NOT LIKE '?%%'%s;"
21552 " AND mem.mode=disk.mode)", zTab);
22061 failIfSafeMode(p, "cannot run .archive in safe mode");
22077 failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
22168 failIfSafeMode(p, "cannot run .cd in safe mode");
22226 failIfSafeMode(p, "cannot run .clone in safe mode");
22541 if( val==1 && p->mode!=MODE_Explain ){
22542 p->normalMode = p->mode;
22543 p->mode = MODE_Explain;
22546 if( p->mode==MODE_Explain ) p->mode = p->normalMode;
22549 if( p->mode==MODE_Explain ) p->mode = p->normalMode;
22558 "Cannot run experimental commands such as \"%s\" in safe mode\n",
22720 data.cMode = data.mode = MODE_Semi;
22722 data.cMode = data.mode = MODE_Pretty;
22753 data.cMode = data.mode = MODE_Insert;
22800 int useOutputMode = 1; /* Use output mode to determine separators */
22803 failIfSafeMode(p, "cannot run .import in safe mode");
22805 if( p->mode==MODE_Ascii ){
22856 ** the column and row separator characters from the output mode. */
22875 if( nSep==2 && p->mode==MODE_Csv
23032 ** columns in ASCII mode? If so, stop instead of NULL filling
23035 if( p->mode==MODE_Ascii && (z==0 || z[0]==0) && i==0 ) break;
23270 failIfSafeMode(p, "cannot run .load in safe mode");
23290 failIfSafeMode(p, "cannot run .log in safe mode");
23302 if( c=='m' && cli_strncmp(azArg[0], "mode", n)==0 ){
23321 /* Apply defaults for qbox pseudo-mode. If that
23348 if( p->mode==MODE_Column
23349 || (p->mode>=MODE_Markdown && p->mode<=MODE_Box)
23353 "current output mode: %s --wrap %d --wordwrap %s --%squote\n",
23354 modeDescr[p->mode], p->cmOpts.iWrap,
23358 raw_printf(p->out, "current output mode: %s\n", modeDescr[p->mode]);
23360 zMode = modeDescr[p->mode];
23364 p->mode = MODE_Line;
23367 p->mode = MODE_Column;
23374 p->mode = MODE_List;
23378 p->mode = MODE_Html;
23380 p->mode = MODE_Tcl;
23384 p->mode = MODE_Csv;
23388 p->mode = MODE_List;
23391 p->mode = MODE_Insert;
23394 p->mode = MODE_Quote;
23398 p->mode = MODE_Ascii;
23402 p->mode = MODE_Markdown;
23405 p->mode = MODE_Table;
23408 p->mode = MODE_Box;
23411 p->mode = MODE_Count;
23413 p->mode = MODE_Off;
23415 p->mode = MODE_Json;
23417 raw_printf(stderr, "Error: mode should be one of: "
23422 p->cMode = p->mode;
23436 return 0; /* Return immediately to bypass the safe mode reset
23518 failIfSafeMode(p, "cannot open disk-based database files in safe mode");
23521 /* WASM mode has its own sandboxed pseudo-filesystem. */
23559 failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
23615 /* spreadsheet mode. Output as CSV. */
23618 p->mode = MODE_Csv;
23622 /* text editor mode */
23842 failIfSafeMode(p, "cannot run .read in safe mode");
23883 failIfSafeMode(p, "cannot run .restore in safe mode");
23955 data.cMode = data.mode = MODE_Semi;
23959 data.cMode = data.mode = MODE_Pretty;
24141 failIfSafeMode(p, "cannot run \".session %s\" in safe mode", azCmd[0]);
24562 failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
24592 p->mode==MODE_Explain ? "on" : p->autoExplain ? "auto" : "off");
24594 if( p->mode==MODE_Column
24595 || (p->mode>=MODE_Markdown && p->mode<=MODE_Box)
24598 (p->out, "%12.12s: %s --wrap %d --wordwrap %s --%squote\n", "mode",
24599 modeDescr[p->mode], p->cmOpts.iWrap,
24603 utf8_printf(p->out, "%12.12s: %s\n","mode", modeDescr[p->mode]);
24778 int unSafe; /* Not valid for --safe mode */
24852 "line %d: \".testctrl %s\" may not be used in safe mode\n",
25445 ** Alternate one_input_line() impl for wasm mode. This is not in the primary impl
25711 " -ascii set output mode to 'ascii'\n"
25714 " -box set output mode to 'box'\n"
25715 " -column set output mode to 'column'\n"
25717 " -csv set output mode to 'csv'\n"
25728 " -html set output mode to HTML\n"
25730 " -json set output mode to 'json'\n"
25731 " -line set output mode to 'line'\n"
25732 " -list set output mode to 'list'\n"
25734 " -markdown set output mode to 'markdown'\n"
25745 " -nonce STRING set the safe-mode escape nonce\n"
25748 " -quote set output mode to 'quote'\n"
25750 " -safe enable safe-mode\n"
25756 " -table set output mode to 'table'\n"
25757 " -tabs set output mode to 'tabs'\n"
25796 data->normalMode = data->cMode = data->mode = MODE_List;
26012 /* Need to check for batch mode here to so we can avoid printing
26185 data.mode = MODE_Html;
26187 data.mode = MODE_List;
26189 data.mode = MODE_Quote;
26193 data.mode = MODE_Line;
26195 data.mode = MODE_Column;
26197 data.mode = MODE_Json;
26199 data.mode = MODE_Markdown;
26201 data.mode = MODE_Table;
26203 data.mode = MODE_Box;
26205 data.mode = MODE_Csv;
26224 data.mode = MODE_Ascii;
26228 data.mode = MODE_List;
26347 data.cMode = data.mode;
26423 /* In WASM mode we have to leave the db state in place so that