Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Basic check-in is working now. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9c655b6516e9c91511669b3f243da2bc |
User & Date: | drh 2014-03-13 17:49:45.350 |
Context
2014-03-13
| ||
23:58 | Store mode and mtime. Get extraction working. check-in: abdc055608 user: drh tags: trunk | |
17:49 | Basic check-in is working now. check-in: 9c655b6516 user: drh tags: trunk | |
17:40 | Initial code check-in. Untested. check-in: 168f7a4e17 user: drh tags: trunk | |
Changes
Changes to sar.c.
︙ | ︙ | |||
126 127 128 129 130 131 132 | "REPLACE INTO sar(filename,sz,data) VALUES(?1,?2,?3)", -1, &pIns, 0); if( rc ) errorMsg("%s\n", sqlite3_errmsg(db)); } sqlite3_bind_text(pIns, 1, zFilename, -1, SQLITE_STATIC); sqlite3_bind_int(pIns, 2, sz); nCompr = 13 + sz + (sz+999)/1000; | | | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | "REPLACE INTO sar(filename,sz,data) VALUES(?1,?2,?3)", -1, &pIns, 0); if( rc ) errorMsg("%s\n", sqlite3_errmsg(db)); } sqlite3_bind_text(pIns, 1, zFilename, -1, SQLITE_STATIC); sqlite3_bind_int(pIns, 2, sz); nCompr = 13 + sz + (sz+999)/1000; zCompr = sqlite3_malloc( nCompr+1 ); if( zCompr==0 ) errorMsg("out of memory\n"); rc = compress(zCompr, &nCompr, zIn, sz); if( rc!=Z_OK ) errorMsg("Cannot compress %s\n", zFilename); sqlite3_free(zIn); sqlite3_bind_blob(pIns, 3, zCompr, nCompr, sqlite3_free); rc = sqlite3_step(pIns); if( rc!=SQLITE_DONE ){ errorMsg("Insert failed for %s: %s\n", zFilename, sqlite3_errmsg(db)); } |
︙ | ︙ | |||
177 178 179 180 181 182 183 | if( zArchive==0 ) showHelp(argv[0]); if( listFlag ){ }else if( extractFlag ){ }else{ if( azFiles==0 ) showHelp(argv[0]); db_open(zArchive, 1); for(i=0; i<nFiles; i++){ | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 | if( zArchive==0 ) showHelp(argv[0]); if( listFlag ){ }else if( extractFlag ){ }else{ if( azFiles==0 ) showHelp(argv[0]); db_open(zArchive, 1); for(i=0; i<nFiles; i++){ add_file(azFiles[i]); } db_close(1); } return 0; } |