/ Check-in [d0f35739]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Export the deduceDatabaseType() function the shell.c source file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d0f35739af3b226c8eef39676407293650cde551acef06fe8628fdd5b59bd66a
User & Date: drh 2018-05-14 00:41:12
Context
2018-05-14
12:23
Fix typo in the shell.c source file. check-in: 389dc0a9 user: mistachkin tags: trunk
00:41
Export the deduceDatabaseType() function the shell.c source file. check-in: d0f35739 user: drh tags: trunk
00:23
Add the --append option to the ".backup" command in the CLI. check-in: 0dfdbdee user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  3537   3537   ** one of the SHELL_OPEN_* constants.
  3538   3538   **
  3539   3539   ** If the file does not exist or is empty but its name looks like a ZIP
  3540   3540   ** archive and the dfltZip flag is true, then assume it is a ZIP archive.
  3541   3541   ** Otherwise, assume an ordinary database regardless of the filename if
  3542   3542   ** the type cannot be determined from content.
  3543   3543   */
  3544         -static int deduceDatabaseType(const char *zName, int dfltZip){
         3544  +int deduceDatabaseType(const char *zName, int dfltZip){
  3545   3545     FILE *f = fopen(zName, "rb");
  3546   3546     size_t n;
  3547   3547     int rc = SHELL_OPEN_UNSPEC;
  3548   3548     char zBuf[100];
  3549   3549     if( f==0 ){
  3550   3550       if( dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ) return SHELL_OPEN_ZIPFILE;
  3551   3551       return SHELL_OPEN_NORMAL;