mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Minor formatting changes in zipfile.c. No logical code differences.
FossilOrigin-Name: 4f68bed3b9a63a349a2a2d7f26609491577e9717034ad86af404cf9eed9d6aaf
This commit is contained in:
@@ -10,6 +10,19 @@
|
||||
**
|
||||
******************************************************************************
|
||||
**
|
||||
** This file implements a virtual table for reading and writing ZIP archive
|
||||
** files.
|
||||
**
|
||||
** Usage example:
|
||||
**
|
||||
** SELECT name, sz, datetime(mtime,'unixepoch') FROM zipfile($filename);
|
||||
**
|
||||
** Current limitations:
|
||||
**
|
||||
** * No support for encryption
|
||||
** * No support for ZIP archives spanning multiple files
|
||||
** * No support for zip64 extensions
|
||||
** * Only the "inflate/deflate" (zlib) compression method is supported
|
||||
*/
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
@@ -42,18 +55,19 @@ typedef unsigned long u32;
|
||||
#define MIN(a,b) ((a)<(b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define ZIPFILE_SCHEMA "CREATE TABLE y(" \
|
||||
"name, /* 0: Name of file in zip archive */" \
|
||||
"mode, /* 1: POSIX mode for file */" \
|
||||
"mtime, /* 2: Last modification time in seconds since epoch */" \
|
||||
"sz, /* 3: Size of object */" \
|
||||
"rawdata, /* 4: Raw data */" \
|
||||
"data, /* 5: Uncompressed data */" \
|
||||
"method, /* 6: Compression method (integer) */" \
|
||||
"file HIDDEN /* Name of zip file */" \
|
||||
");"
|
||||
static const char ZIPFILE_SCHEMA[] =
|
||||
"CREATE TABLE y("
|
||||
"name," /* 0: Name of file in zip archive */
|
||||
"mode," /* 1: POSIX mode for file */
|
||||
"mtime," /* 2: Last modification time (secs since 1970)*/
|
||||
"sz," /* 3: Size of object */
|
||||
"rawdata," /* 4: Raw data */
|
||||
"data," /* 5: Uncompressed data */
|
||||
"method," /* 6: Compression method (integer) */
|
||||
"file HIDDEN" /* 7: Name of zip file */
|
||||
");";
|
||||
|
||||
#define ZIPFILE_F_COLUMN_IDX 7 /* Index of column "f" in the above */
|
||||
#define ZIPFILE_F_COLUMN_IDX 7 /* Index of column "file" in the above */
|
||||
#define ZIPFILE_BUFFER_SIZE (64*1024)
|
||||
|
||||
|
||||
|
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Fix\stypo\sin\scomment.\s\sNo\scode\schanges.
|
||||
D 2018-01-11T13:43:04.788
|
||||
C Minor\sformatting\schanges\sin\szipfile.c.\s\sNo\slogical\scode\sdifferences.
|
||||
D 2018-01-11T14:50:40.176
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F Makefile.in 38f84f301cbef443b2d269f67a74b8cc536469831f70df7c3e912acc04932cc2
|
||||
@@ -303,7 +303,7 @@ F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
||||
F ext/misc/vtablog.c 31d0d8f4406795679dcd3a67917c213d3a2a5fb3ea5de35f6e773491ed7e13c9
|
||||
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
|
||||
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
||||
F ext/misc/zipfile.c 0d12ad852af1732c9a4bd0be9f28886b049e0591a871e3246a5347d2cea15430
|
||||
F ext/misc/zipfile.c cbf9dfaf94c25dfd835e79c1474fdc75517a45a37916dec66623b0937af10e51
|
||||
F ext/rbu/rbu.c ea7d1b7eb44c123a2a619332e19fe5313500705c4a58aaa1887905c0d83ffc2e
|
||||
F ext/rbu/rbu1.test 43836fac8c7179a358eaf38a8a1ef3d6e6285842
|
||||
F ext/rbu/rbu10.test 1846519a438697f45e9dcb246908af81b551c29e1078d0304fae83f1fed7e9ee
|
||||
@@ -1697,7 +1697,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P b8d92d8dc239597c6f01a6e572b047f98ce374a8f48257683fa839dde3ec993f
|
||||
R 7aa5de08d44a1e2c05aadb2e5fa21a20
|
||||
P 2c55571baaae58d6f5b6210cf85d0fa325a9977682bd449e3802191f7a4142de
|
||||
R 33de751c900466ee2a12d260dcb2a3de
|
||||
U drh
|
||||
Z af4c8b3a64ae000c2affb5a4b97dbea6
|
||||
Z 324651d5684ea52cfa823d4ea5809b01
|
||||
|
@@ -1 +1 @@
|
||||
2c55571baaae58d6f5b6210cf85d0fa325a9977682bd449e3802191f7a4142de
|
||||
4f68bed3b9a63a349a2a2d7f26609491577e9717034ad86af404cf9eed9d6aaf
|
Reference in New Issue
Block a user