25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
+
+
+
+
|
#if defined(FOSSIL_ENABLE_MINIZ)
# define MINIZ_HEADER_FILE_ONLY
# include "miniz.c"
#else
# include <zlib.h>
#endif
#ifndef _WIN32
# include "linenoise.h"
#endif
/*
** Implementation of the "content(X)" SQL function. Return the complete
** content of artifact identified by X as a blob.
*/
static void sqlcmd_content(
sqlite3_context *context,
int argc,
|
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
+
+
+
|
extern int sqlite3_shell(int, char**);
noRepository = find_option("no-repository", 0, 0)!=0;
if( !noRepository ){
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
}
fossil_close(1, noRepository);
sqlite3_shutdown();
#ifndef _WIN32
linenoiseSetMultiLine(1);
#endif
sqlite3_shell(g.argc-1, g.argv+1);
sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit);
fossil_close(0, noRepository);
}
/*
** This routine is called by the patched sqlite3 command-line shell in order
|