Index: src/shell.c.in ================================================================== --- src/shell.c.in +++ src/shell.c.in @@ -2893,10 +2893,13 @@ /* ** Text of a help message */ static char zHelp[] = +#if defined(SQLITE_HAVE_ZLIB) && !defined(SQLITE_OMIT_VIRTUALTABLE) + ".archive ... Manage SQL archives: \".archive --help\" for details\n" +#endif #ifndef SQLITE_OMIT_AUTHORIZATION ".auth ON|OFF Show authorizer callbacks\n" #endif ".backup ?DB? FILE Backup DB (default \"main\") to FILE\n" ".bail on|off Stop after hitting an error. Default OFF\n" @@ -4294,10 +4297,14 @@ raw_printf(stderr, "Where sub-commands are:\n"); raw_printf(stderr, " fkey-indexes\n"); return SQLITE_ERROR; } +#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) +/********************************************************************************* +** The ".archive" or ".ar" command. +*/ static void shellPrepare( sqlite3 *db, int *pRc, const char *zSql, sqlite3_stmt **ppStmt @@ -4363,12 +4370,11 @@ raw_printf(stderr, "SQL error: %s\n", sqlite3_errmsg(db)); } *pRc = rc; } } - -/* +/* ** Structure representing a single ".ar" command. */ typedef struct ArCommand ArCommand; struct ArCommand { int eCmd; /* An AR_CMD_* value */ @@ -5032,10 +5038,13 @@ } } return rc; } +/* End of the ".archive" or ".ar" command logic +**********************************************************************************/ +#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) */ /* ** Implementation of ".expert" dot command. */ static int expertDotCommand( @@ -5154,12 +5163,12 @@ sqlite3_set_authorizer(p->db, 0, 0); } }else #endif -#ifndef SQLITE_OMIT_VIRTUALTABLE - if( c=='a' && strncmp(azArg[0], "ar", n)==0 ){ +#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) + if( c=='a' && strncmp(azArg[0], "archive", n)==0 ){ open_db(p, 0); rc = arDotCommand(p, azArg, nArg); }else #endif