Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch symlink-refactor Excluding Merge-Ins
This is equivalent to a diff from 563d481e6a to 244b84b809
|
2017-12-03
| ||
| 11:16 | Refactor the symlink processing logic so that most of the file access routines take a new parameter indicating the conditions under which symlinks should and should not be followed. ... (check-in: 1772357fc2 user: drh tags: trunk) | |
|
2017-12-02
| ||
| 13:00 | Update a comment due to changes in the purpose of Fossil 2.x. No changes to code. ... (Closed-Leaf check-in: 244b84b809 user: drh tags: symlink-refactor) | |
|
2017-11-30
| ||
| 19:42 | Fix an 'auto.def' issue that prevented using --with-tcl of a static Tcl with --static. ... (check-in: 28fd1c1bd4 user: mistachkin tags: trunk) | |
| 18:07 | Fix a bug in the "fossil add" command that prevented the adding of symbolic links. ... (check-in: b259473846 user: drh tags: symlink-refactor) | |
| 17:58 | Refactor the symlink processing logic so that most of the file access routines take a new parameter indicating the conditions under which symlinks should and should not be followed. This should fix a few bugs related to symlink processing. Lots of testing required before merging to trunk. ... (check-in: e7767de263 user: drh tags: symlink-refactor) | |
| 12:57 | Remove unused "#if 0...#endif" code from finfo.c. ... (check-in: 563d481e6a user: drh tags: trunk) | |
| 12:55 | Add the --allow-symlinks option to the test-file-environment command. ... (check-in: cf1960e913 user: drh tags: trunk) | |
Changes to src/add.c.
| ︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - + + - + | #include "config.h" #include "add.h" #include <assert.h> #include <dirent.h> #include "cygsup.h" /* |
| ︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - + - + |
if( db_exists("SELECT 1 FROM vfile"
" WHERE pathname=%Q %s", zPath, filename_collation()) ){
db_multi_exec("UPDATE vfile SET deleted=0"
" WHERE pathname=%Q %s AND deleted",
zPath, filename_collation());
}else{
char *zFullname = mprintf("%s%s", g.zLocalRoot, zPath);
|
| ︙ | |||
324 325 326 327 328 329 330 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + |
/* file_tree_name() throws a fatal error if g.argv[i] is outside of the
** checkout. */
file_tree_name(g.argv[i], &fullName, 0, 1);
blob_reset(&fullName);
file_canonical_name(g.argv[i], &fullName, 0);
zName = blob_str(&fullName);
|
| ︙ | |||
693 694 695 696 697 698 699 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 | - + |
);
while( db_step(&q)==SQLITE_ROW ){
const char *zFile;
const char *zPath;
zFile = db_column_text(&q, 0);
zPath = db_column_text(&q, 1);
|
| ︙ | |||
795 796 797 798 799 800 801 | 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | - + - + - + |
Stmt move;
if( db_table_exists("temp", "fmove") ){
db_prepare(&move, "SELECT x, y FROM fmove ORDER BY x;");
while( db_step(&move)==SQLITE_ROW ){
const char *zOldName = db_column_text(&move, 0);
const char *zNewName = db_column_text(&move, 1);
if( !dryRunFlag ){
|
| ︙ | |||
898 899 900 901 902 903 904 | 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 | - + |
file_tree_name(zDest, &dest, 0, 1);
db_multi_exec(
"UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
);
db_multi_exec(
"CREATE TEMP TABLE mv(f TEXT UNIQUE ON CONFLICT IGNORE, t TEXT);"
);
|
| ︙ |
Changes to src/allrepo.c.
| ︙ | |||
329 330 331 332 333 334 335 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + |
db_begin_transaction();
for(j=3; j<g.argc; j++, blob_reset(&fn), blob_reset(&sql)){
sqlite3 *db;
int rc;
const char *z;
file_canonical_name(g.argv[j], &fn, 0);
z = blob_str(&fn);
|
| ︙ | |||
395 396 397 398 399 400 401 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - + |
int rc;
const char *zFilename = db_column_text(&q, 0);
#if !USE_SEE
if( sqlite3_strglob("*.efossil", zFilename)==0 ) continue;
#endif
if( file_access(zFilename, F_OK)
|| !file_is_canonical(zFilename)
|
| ︙ |
Changes to src/attach.c.
| ︙ | |||
762 763 764 765 766 767 768 | 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | - + |
}
zTarget = db_text(0,
"SELECT substr(tagname,7) FROM tag WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
rid
);
zFile = g.argv[3];
}
|
| ︙ |
Changes to src/blob.c.
| ︙ | |||
781 782 783 784 785 786 787 788 789 790 791 792 793 | 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 | + + + + + + + + + + + - + + + + + + + + - + | } return blob_size(pBlob); } /* ** Initialize a blob to be the content of a file. If the filename ** is blank or "-" then read from standard input. ** ** If zFilename is a symbolic link, behavior depends on the eFType ** parameter: ** ** * If eFType is ExtFILE or allow-symlinks is OFF, then the ** pBlob is initialized to the *content* of the object to which ** the zFilename symlink points. ** ** * If eFType is RepoFILE and allow-symlinks is ON, then the ** pBlob is initialized to the *name* of the object to which ** the zFilename symlink points. ** ** Any prior content of the blob is discarded, not freed. ** ** Return the number of bytes read. Calls fossil_fatal() on error (i.e. ** it exit()s and does not return). */ |
| ︙ | |||
840 841 842 843 844 845 846 | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | - + + + + + | return len; #else blob_zero(pBlob); return 0; #endif } |
| ︙ | |||
866 867 868 869 870 871 872 | 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | - + |
#endif
nWrote = fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout);
#if defined(_WIN32)
fflush(stdout);
_setmode(_fileno(stdout), _O_TEXT);
#endif
}else{
|
| ︙ | |||
931 932 933 934 935 936 937 | 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | - + |
** Run compression on INPUTFILE and write the result into OUTPUTFILE.
**
** This is used to test and debug the blob_compress() routine.
*/
void compress_cmd(void){
Blob f;
if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
|
| ︙ | |||
990 991 992 993 994 995 996 | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | - - + + |
** content, then write results into OUT.
**
** This is used to test and debug the blob_compress2() routine.
*/
void compress2_cmd(void){
Blob f1, f2;
if( g.argc!=5 ) usage("INPUTFILE1 INPUTFILE2 OUTPUTFILE");
|
| ︙ | |||
1042 1043 1044 1045 1046 1047 1048 | 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | - + - + |
** Read the content of file IN, uncompress that content, and write the
** result into OUT. This command is intended for testing of the
** blob_compress() function.
*/
void uncompress_cmd(void){
Blob f;
if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
|
| ︙ |
Changes to src/bundle.c.
| ︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + |
const char *zFile, /* Name of the file that contains the bundle */
const char *zBName, /* Attachment name */
int doInit /* Initialize a new bundle, if true */
){
int rc;
char *zErrMsg = 0;
char *zSql;
|
| ︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + |
bundle_attach_file(g.argv[3], "b1", 1);
db_prepare(&q,
"INSERT INTO bblob(blobid, uuid, sz, delta, data, notes) "
"VALUES(NULL, $uuid, $sz, NULL, $data, $filename)");
db_begin_transaction();
for(i=4; i<g.argc; i++){
int sz;
|
| ︙ |
Changes to src/cache.c.
| ︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + |
sqlite3 *db = 0;
int rc;
i64 sz;
zDbName = cacheName();
if( zDbName==0 ) return 0;
if( bForce==0 ){
|
| ︙ | |||
315 316 317 318 319 320 321 | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + |
sqlite3_column_text(pStmt, 0));
nEntry++;
}
sqlite3_finalize(pStmt);
}
sqlite3_close(db);
fossil_print("Entries: %d Cache-file Size: %lld\n",
|
| ︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + |
@ hit-count: %d(sqlite3_column_int(pStmt,2))
@ last-access: %s(sqlite3_column_text(pStmt,3))</p></li>
}
sqlite3_finalize(pStmt);
@ </ol>
}
zDbName = cacheName();
|
| ︙ |
Changes to src/checkin.c.
| ︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + |
blob_init(&name, g.zLocalRoot, nRoot - 1);
vfile_scan(&name, blob_size(&name), scanFlags, pIgnore, 0);
blob_reset(&name);
}else{
for(i=0; i<argc; i++){
file_canonical_name(argv[i], &name, 0);
zName = blob_str(&name);
|
| ︙ | |||
207 208 209 210 211 212 213 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + |
const char *zMtime = db_column_text(&q, 1);
int size = db_column_int(&q, 2);
int isDeleted = db_column_int(&q, 3);
int isChnged = db_column_int(&q, 4);
int isNew = isManaged && !db_column_int(&q, 5);
int isRenamed = db_column_int(&q, 6);
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
|
| ︙ | |||
252 253 254 255 256 257 258 | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + |
zClass = "EXECUTABLE";
}else if( (flags & C_META) && isChnged==7 ){
zClass = "SYMLINK";
}else if( (flags & C_META) && isChnged==8 ){
zClass = "UNEXEC";
}else if( (flags & C_META) && isChnged==9 ){
zClass = "UNLINK";
|
| ︙ | |||
762 763 764 765 766 767 768 | 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | - + |
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
const char *type = "";
if( verboseFlag ){
if( isNew ){
type = "ADDED ";
}else if( isDeleted ){
type = "DELETED ";
|
| ︙ | |||
1219 1220 1221 1222 1223 1224 1225 | 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 | - + |
if( zEditor ){
zCmd = mprintf("%s \"%s\"", zEditor, zFile);
fossil_print("%s\n", zCmd);
if( fossil_system(zCmd) ){
fossil_fatal("editor aborted: \"%s\"", zCmd);
}
|
| ︙ | |||
1560 1561 1562 1563 1564 1565 1566 | 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 | - + |
** directly from the filesystem. On windows, permissions are
** unchanged from the original. However, only do this if the file
** itself is actually selected to be part of this check-in.
*/
if( isSelected ){
int mPerm;
|
| ︙ | |||
1906 1907 1908 1909 1910 1911 1912 | 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 | - - - - + - |
zFullname = db_column_text(&q, 0);
zName = db_column_text(&q, 1);
crlfOk = db_column_int(&q, 2);
binOk = db_column_int(&q, 3);
encodingOk = db_column_int(&q, 4);
blob_zero(&content);
|
| ︙ | |||
2301 2302 2303 2304 2305 2306 2307 | 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 | - + |
}
if( zComment ){
blob_zero(&comment);
blob_append(&comment, zComment, -1);
}else if( zComFile ){
blob_zero(&comment);
|
| ︙ | |||
2372 2373 2374 2375 2376 2377 2378 | 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 | - - - - - + - |
zFullname = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
crlfOk = db_column_int(&q, 3);
binOk = db_column_int(&q, 4);
encodingOk = db_column_int(&q, 5);
blob_zero(&content);
|
| ︙ | |||
2489 2490 2491 2492 2493 2494 2495 | 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 | - + |
if( dryRunFlag ){
blob_write_to_file(&manifest, "");
}
if( outputManifest & MFESTFLG_RAW ){
zManifestFile = mprintf("%smanifest", g.zLocalRoot);
blob_write_to_file(&manifest, zManifestFile);
blob_reset(&manifest);
|
| ︙ |
Changes to src/checkout.c.
| ︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + |
blob_appendf(&filename, "%s", g.zLocalRoot);
baseLen = blob_size(&filename);
manifest_file_rewind(pManifest);
while( (pFile = manifest_file_next(pManifest, 0))!=0 ){
int isExe;
blob_append(&filename, pFile->zName, -1);
isExe = pFile->zPerm && strstr(pFile->zPerm, "x");
|
| ︙ |
Changes to src/clearsign.c.
| ︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + |
rc = fossil_system(zCmd);
free(zCmd);
if( rc==0 ){
if( pOut==pIn ){
blob_reset(pIn);
}
blob_zero(pOut);
|
| ︙ |
Changes to src/clone.c.
| ︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + |
/* We should be done with options.. */
verify_all_options();
if( g.argc < 4 ){
usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
}
db_open_config(0, 0);
|
| ︙ |
Changes to src/comformat.c.
| ︙ | |||
482 483 484 485 486 487 488 | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + - + |
if( g.argc==5 ){
zOrigText = g.argv[4];
}else{
zOrigText = 0;
}
if( fromFile ){
Blob fileData;
|
| ︙ |
Changes to src/configure.c.
| ︙ | |||
727 728 729 730 731 732 733 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | - + |
export_config(mask, g.argv[3], iStart, g.argv[4]);
}else
if( strncmp(zMethod, "import", n)==0
|| strncmp(zMethod, "merge", n)==0 ){
Blob in;
int groupMask;
if( g.argc!=4 ) usage(mprintf("%s FILENAME",zMethod));
|
| ︙ | |||
981 982 983 984 985 986 987 | 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 | - + - + |
verify_all_options();
if( g.argc<3 || (zFile==0 && zBlob==0 && g.argc<4) ){
usage("VAR ?VALUE? ?--file FILE?");
}
zVar = g.argv[2];
if( zFile ){
if( zBlob ) fossil_fatal("cannot do both --file or --blob");
|
| ︙ |
Changes to src/content.c.
| ︙ | |||
703 704 705 706 707 708 709 | 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 | - + |
*/
void test_content_put_cmd(void){
int rid;
Blob content;
if( g.argc!=3 ) usage("FILENAME");
db_must_be_within_tree();
user_select();
|
| ︙ |
Changes to src/db.c.
| ︙ | |||
1272 1273 1274 1275 1276 1277 1278 | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 | - + - + |
}
if( zHome==0 ){
if( isOptional ) return 0;
fossil_fatal("cannot locate home directory - please set the "
"FOSSIL_HOME or HOME environment variables");
}
#endif
|
| ︙ | |||
1350 1351 1352 1353 1354 1355 1356 | 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 | - + |
** true. If it is not a valid local database file, return 0.
*/
static int isValidLocalDb(const char *zDbName){
i64 lsize;
char *zVFileDef;
if( file_access(zDbName, F_OK) ) return 0;
|
| ︙ | |||
1491 1492 1493 1494 1495 1496 1497 | 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | - + |
if( g.localOpen ){
zDbName = db_repository_filename();
}
if( zDbName==0 ){
db_err("unable to find the name of a repository database");
}
}
|
| ︙ | |||
1546 1547 1548 1549 1550 1551 1552 | 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 | - + |
** option to locate the repository. If no such option is available, then
** use the repository of the open checkout if there is one.
**
** Error out if the repository cannot be opened.
*/
void db_find_and_open_repository(int bFlags, int nArgUsed){
const char *zRep = find_repository_option();
|
| ︙ | |||
1981 1982 1983 1984 1985 1986 1987 | 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 | - + |
/* We should be done with options.. */
verify_all_options();
if( g.argc!=3 ){
usage("REPOSITORY-NAME");
}
|
| ︙ | |||
2278 2279 2280 2281 2282 2283 2284 | 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 | - + + - + - + |
blob_append(&versionedPathname, ".no-warn", -1);
blob_zero(&noWarnFile);
if( historical_blob(g.zOpenRevision, blob_str(&versionedPathname),
&noWarnFile, 0) ){
noWarn = 1;
}
blob_reset(&noWarnFile);
|
| ︙ | |||
2727 2728 2729 2730 2731 2732 2733 | 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 | - + |
}
if( pSetting->versionable && g.localOpen ){
/* Check to see if this is overridden by a versionable settings file */
Blob versionedPathname;
blob_zero(&versionedPathname);
blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
g.zLocalRoot, pSetting->name);
|
| ︙ |
Changes to src/deltacmd.c.
| ︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + |
** Store the result in DELTA.
*/
void delta_create_cmd(void){
Blob orig, target, delta;
if( g.argc!=5 ){
usage("ORIGIN TARGET DELTA");
}
|
| ︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + - + |
Blob orig, target, delta;
int nCopy = 0;
int nInsert = 0;
int sz1, sz2, sz3;
if( g.argc!=4 ){
usage("ORIGIN TARGET");
}
|
| ︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - + - + |
** Apply DELTA to FILE1 and output the result.
*/
void delta_apply_cmd(void){
Blob orig, target, delta;
if( g.argc!=5 ){
usage("ORIGIN DELTA TARGET");
}
|
| ︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - - + + |
** correctly recovered.
*/
void cmd_test_delta(void){
Blob f1, f2; /* Original file content */
Blob d12, d21; /* Deltas from f1->f2 and f2->f1 */
Blob a1, a2; /* Recovered file content */
if( g.argc!=4 ) usage("FILE1 FILE2");
|
Changes to src/diff.c.
| ︙ | |||
2013 2014 2015 2016 2017 2018 2019 | 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 | - + - + |
void test_rawdiff_cmd(void){
Blob a, b;
int r;
int i;
int *R;
u64 diffFlags = diff_options();
if( g.argc<4 ) usage("FILE1 FILE2 ...");
|
| ︙ | |||
2054 2055 2056 2057 2058 2059 2060 | 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 | - - + + |
const char *zErr = re_compile(&pRe, zRe, 0);
if( zErr ) fossil_fatal("regex error: %s", zErr);
}
diffFlag = diff_options();
verify_all_options();
if( g.argc!=4 ) usage("FILE1 FILE2");
diff_print_filenames(g.argv[2], g.argv[3], diffFlag);
|
| ︙ |
Changes to src/diffcmd.c.
| ︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | - + - - - - + - |
if( zDiffCmd==0 ){
Blob out; /* Diff output text */
Blob file2; /* Content of zFile2 */
const char *zName2; /* Name of zFile2 for display */
/* Read content of zFile2 into memory */
blob_zero(&file2);
|
| ︙ | |||
235 236 237 238 239 240 241 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | - + - - - - + - |
fossil_print("%s",DIFF_CANNOT_COMPUTE_BINARY);
glob_free(pBinary);
return;
}
glob_free(pBinary);
}
blob_zero(&file2);
|
| ︙ | |||
487 488 489 490 491 492 493 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | - + |
if( !isNumStat ){ fossil_print("ADDED_BY_INTEGRATE %s\n", zPathname); }
srcid = 0;
if( !asNewFile ){ showDiff = 0; }
}
if( showDiff ){
Blob content;
int isBin;
|
| ︙ | |||
963 964 965 966 967 968 969 | 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | - + |
diffFlags, pFileDir);
}
if( pFileDir ){
int i;
for(i=0; pFileDir[i].zName; i++){
if( pFileDir[i].nUsed==0
&& strcmp(pFileDir[0].zName,".")!=0
|
| ︙ |
Changes to src/doc.c.
| ︙ | |||
647 648 649 650 651 652 653 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | - - + + |
zDfltTitle = zName;
}
}else if( fossil_strcmp(zCheckin,"ckout")==0 ){
/* Read from the local checkout */
char *zFullpath;
db_must_be_within_tree();
zFullpath = mprintf("%s/%s", g.zLocalRoot, zName);
|
| ︙ |
Changes to src/file.c.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - - - - - | /* ** Copyright (c) 2006 D. Richard Hipp ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the Simplified BSD License (also ** known as the "2-Clause License" or "FreeBSD License".) |
| ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - - + + + + + + + + + + - + - + - + - + - - + + - - + + - - - + - + - - + + - + - - + + - - - - - - - - - + + - - - - - - - - - + + - - + + - - - - - + + - - - + + - - - + + + + + - - + + - - - - - - + - - - - + + - - - - + + + + |
# include <sys/utime.h>
#else
# include <sys/time.h>
#endif
#if INTERFACE
/* Many APIs take a eFType argument which must be one of ExtFILE, RepoFILE,
** or SymFILE.
**
** The difference is in the handling of symbolic links. RepoFILE should be
** used for files that are under management by a Fossil repository. ExtFILE
** should be used for files that are not under management. SymFILE is for
** a few special cases such as the "fossil test-tarball" command when we never
** want to follow symlinks.
**
** If RepoFILE is used and if the allow-symlinks setting is true and if
** the object is a symbolic link, then the object is treated like an ordinary
** file whose content is name of the object to which the symbolic link
** points.
**
** If ExtFILE is used or allow-symlinks is false, then operations on a
** symbolic link are the same as operations on the object to which the
** symbolic link points.
**
** SymFILE is like RepoFILE except that it always uses the target filename of
** a symbolic link as the content, instead of the content of the object
** that the symlink points to. SymFILE acts as if allow-symlinks is always ON.
*/
#define ExtFILE 0 /* Always follow symlinks */
#define RepoFILE 1 /* Follow symlinks iff allow-symlinks is OFF */
#define SymFILE 2 /* Never follow symlinks */
#include <dirent.h>
#if defined(_WIN32)
# define DIR _WDIR
# define dirent _wdirent
# define opendir _wopendir
# define readdir _wreaddir
# define closedir _wclosedir
#endif /* _WIN32 */
#if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER))
/*
** File status information for windows systems.
*/
struct fossilStat {
i64 st_size;
i64 st_mtime;
int st_mode;
};
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
# define fossil_isdirsep(a) (((a) == '/') || ((a) == '\\'))
#else
# define fossil_isdirsep(a) ((a) == '/')
#endif
#endif /* INTERFACE */
#if !defined(_WIN32) || !(defined(__MSVCRT__) || defined(_MSC_VER))
/*
** File status information for unix systems
*/
# define fossilStat stat
#endif
/*
** On Windows S_ISLNK always returns FALSE.
*/
#if !defined(S_ISLNK)
# define S_ISLNK(x) (0)
#endif
|
| ︙ | |||
267 268 269 270 271 272 273 274 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | + + + + + - + - - + + - + - - + + + + - - + + - + - - - - - - - - - - - - - - - - - - - - - + - + - - - - - | } /* ** Return file permissions (normal, executable, or symlink): ** - PERM_EXE on Unix if file is executable; ** - PERM_LNK on Unix if file is symlink and allow-symlinks option is on; ** - PERM_REG for all other cases (regular file, directory, fifo, etc). ** ** If eFType is ExtFile then symbolic links are followed and so this ** routine can only return PERM_EXE and PERM_REG. ** ** On windows, this routine returns only PERM_REG. */ |
| ︙ | |||
395 396 397 398 399 400 401 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | - + |
** Space to hold the new filename is obtained form mprintf() and should
** be freed by the caller.
*/
char *file_newname(const char *zBase, const char *zSuffix, int relFlag){
char *z = 0;
int cnt = 0;
z = mprintf("%s-%s", zBase, zSuffix);
|
| ︙ | |||
471 472 473 474 475 476 477 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + |
*/
void file_copy(const char *zFrom, const char *zTo){
FILE *in, *out;
int got;
char zBuf[8192];
in = fossil_fopen(zFrom, "rb");
if( in==0 ) fossil_fatal("cannot open \"%s\" for reading", zFrom);
|
| ︙ | |||
500 501 502 503 504 505 506 507 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | + + + + - + - + + + | } file_copy(g.argv[2], g.argv[3]); } /* ** Set or clear the execute bit on a file. Return true if a change ** occurred and false if this routine is a no-op. ** ** This routine assumes RepoFILE as the eFType. In other words, if ** zFilename is a symbolic link, it is the object that zFilename points ** to that is modified. */ |
| ︙ | |||
562 563 564 565 566 567 568 | 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | - + + + + - - + + - - + + |
if( g.argc!=4 ){
usage("FILENAME DATE/TIME");
}
db_open_or_attach(":memory:", "mem");
iMTime = db_int64(0, "SELECT strftime('%%s',%Q)", g.argv[3]);
zFile = g.argv[2];
file_set_mtime(zFile, iMTime);
|
| ︙ | |||
619 620 621 622 623 624 625 | 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + + + + + + - - + + - + + + - + | /* ** Create the tree of directories in which zFilename belongs, if that sequence ** of directories does not already exist. ** ** On success, return zero. On error, return errorReturn if positive, otherwise ** print an error message and abort. */ |
| ︙ | |||
992 993 994 995 996 997 998 | 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + |
fossil_print(" l_stat_size = %s\n", zBuf);
z = db_text(0, "SELECT datetime(%lld, 'unixepoch')", testFileStat.st_mtime);
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld (%s)", testFileStat.st_mtime, z);
fossil_free(z);
fossil_print(" l_stat_mtime = %s\n", zBuf);
fossil_print(" l_stat_mode = 0%o\n", testFileStat.st_mode);
if( reset ) resetStat();
|
| ︙ | |||
1076 1077 1078 1079 1080 1081 1082 | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | - - - - - - - - - + + + + + + + + + |
blob_zero(&x);
for(i=2; i<g.argc; i++){
char zBuf[100];
const char *zName = g.argv[i];
file_canonical_name(zName, &x, slashFlag);
fossil_print("[%s] -> [%s]\n", zName, blob_buffer(&x));
blob_reset(&x);
|
| ︙ | |||
1424 1425 1426 1427 1428 1429 1430 | 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 | - + - + |
azDirs[2] = fossil_getenv("TMP");
#else
azDirs[0] = fossil_getenv("TMPDIR");
#endif
for(i=0; i<count(azDirs); i++){
if( azDirs[i]==0 ) continue;
|
| ︙ | |||
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 | 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 | + + - + - - - - + - |
}
/*
** Return true if a file named zName exists and has identical content
** to the blob pContent. If zName does not exist or if the content is
** different in any way, then return false.
**
** This routine assumes RepoFILE
*/
int file_is_the_same(Blob *pContent, const char *zName){
i64 iSize;
int rc;
Blob onDisk;
|
| ︙ | |||
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 | 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 | + + + |
/* fossil_free(zString); */
#endif
return rc;
}
/*
** Like fopen() but always takes a UTF8 argument.
**
** This function assumes ExtFILE. In other words, symbolic links
** are always followed.
*/
FILE *fossil_fopen(const char *zName, const char *zMode){
#ifdef _WIN32
wchar_t *uMode = fossil_utf8_to_unicode(zMode);
wchar_t *uName = fossil_utf8_to_path(zName, 0);
FILE *f = _wfopen(uName, uMode);
fossil_path_free(uName);
|
| ︙ |
Changes to src/fusefs.c.
| ︙ | |||
321 322 323 324 325 326 327 | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + |
int doDebug = find_option("debug","d",0)!=0;
db_find_and_open_repository(0,0);
verify_all_options();
blob_init(&fusefs.content, 0, 0);
if( g.argc!=3 ) usage("DIRECTORY");
zMountPoint = g.argv[2];
|
| ︙ |
Changes to src/gzip.c.
| ︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + |
*/
void test_gzip_cmd(void){
Blob b;
char *zOut;
if( g.argc!=3 ) usage("FILENAME");
sqlite3_open(":memory:", &g.db);
gzip_begin(-1);
|
| ︙ |
Changes to src/hname.c.
| ︙ | |||
131 132 133 134 135 136 137 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + - + |
** if the hash does not match.
*/
int hname_verify_file_hash(const char *zFile, const char *zHash, int nHash){
int id = HNAME_ERROR;
switch( nHash ){
case HNAME_LEN_SHA1: {
Blob hash;
|
| ︙ |
Changes to src/http_ssl.c.
| ︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + |
/* Set up acceptable CA root certificates */
zCaSetting = db_get("ssl-ca-location", 0);
if( zCaSetting==0 || zCaSetting[0]=='\0' ){
/* CA location not specified, use platform's default certificate store */
X509_STORE_set_default_paths(SSL_CTX_get_cert_store(sslCtx));
}else{
/* User has specified a CA location, make sure it exists and use it */
|
| ︙ |
Changes to src/info.c.
| ︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | + - + + + |
void info_cmd(void){
i64 fsize;
int verboseFlag = find_option("verbose","v",0)!=0;
if( !verboseFlag ){
verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
}
if( g.argc==3
|
| ︙ | |||
3115 3116 3117 3118 3119 3120 3121 | 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 | - + |
cancel_color();
}
if( fEditComment ){
prepare_amend_comment(&comment, zComment, zUuid);
zNewComment = blob_str(&comment);
}else if( zComFile ){
blob_zero(&comment);
|
| ︙ |
Changes to src/json.c.
| ︙ | |||
1926 1927 1928 1929 1930 1931 1932 | 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 | - - + + + |
zTmp = db_get("project-name",NULL);
cson_object_set(jo, "projectName", json_new_string(zTmp));
free(zTmp);
zTmp = db_get("project-description",NULL);
cson_object_set(jo, "projectDescription", json_new_string(zTmp));
free(zTmp);
zTmp = NULL;
|
| ︙ |
Changes to src/json_status.c.
| ︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + |
if( isDeleted ){
zStatus = "deleted";
}else if( isNew ){
zStatus = "new" /* maintenance reminder: MUST come
BEFORE the isChnged checks. */;
}else if( isRenamed ){
zStatus = "renamed";
|
| ︙ |
Changes to src/login.c.
| ︙ | |||
1563 1564 1565 1566 1567 1568 1569 | 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 | - + |
" WHERE name GLOB 'peer-repo-*'"
" AND name <> 'peer-repo-%q'"
" ORDER BY +value",
zSelfCode
);
while( db_step(&q)==SQLITE_ROW ){
const char *zRepoName = db_column_text(&q, 1);
|
| ︙ | |||
1659 1660 1661 1662 1663 1664 1665 | 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 | - + |
/* Make sure we are not trying to join ourselves */
if( fossil_strcmp(zRepo, zSelfRepo)==0 ){
*pzErrMsg = mprintf("The \"other\" repository is the same as this one.");
return;
}
/* Make sure the other repository is a valid Fossil database */
|
| ︙ |
Changes to src/lookslike.c.
| ︙ | |||
420 421 422 423 424 425 426 | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - + |
const char *zCount = find_option("limit","n",1);
int nRepeat = 1;
if( g.argc!=3 ) usage("FILENAME");
if( zCount ){
nRepeat = atoi(zCount);
}
|
| ︙ |
Changes to src/main.c.
| ︙ | |||
1179 1180 1181 1182 1183 1184 1185 | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | - + |
if( g.db!=0 ){
db_close(1);
}
file_canonical_name(zRepo, &dir, 0);
zDir = blob_str(&dir);
if( !noJail ){
|
| ︙ | |||
1206 1207 1208 1209 1210 1211 1212 | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 | - + |
fossil_fatal("cannot stat() repository: %s", zRepo);
}
i = setgid(sStat.st_gid);
i = i || setuid(sStat.st_uid);
if(i){
fossil_fatal("setgid/uid() failed with errno %d", errno);
}
|
| ︙ | |||
1425 1426 1427 1428 1429 1430 1431 | 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 | - + - + - + - + |
** does not exist, szFile will become -1. If the file does exist,
** then szFile will become zero (for an empty file) or positive.
** Special case: Assume any file with a basename of ".fossil" does
** not exist.
*/
zCleanRepo = file_cleanup_fullpath(zRepo);
if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){
|
| ︙ | |||
1842 1843 1844 1845 1846 1847 1848 | 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 | - + |
zFile = g.argv[1];
}
g.httpOut = stdout;
g.httpIn = stdin;
fossil_binary_mode(g.httpOut);
fossil_binary_mode(g.httpIn);
g.cgiOutput = 1;
|
| ︙ | |||
2016 2017 2018 2019 2020 2021 2022 | 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 | - + |
** does not already exist. Always use "auto" hash-policy in this case.
*/
static void find_server_repository(int arg, int fCreate){
if( g.argc<=arg ){
db_must_be_within_tree();
}else{
const char *zRepo = g.argv[arg];
|
| ︙ |
Changes to src/manifest.c.
| ︙ | |||
1024 1025 1026 1027 1028 1029 1030 | 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | - + |
Blob b;
int i;
int n = 1;
sqlite3_open(":memory:", &g.db);
if( g.argc!=3 && g.argc!=4 ){
usage("FILENAME");
}
|
| ︙ |
Changes to src/merge.c.
| ︙ | |||
546 547 548 549 550 551 552 | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | - + |
while( db_step(&q)==SQLITE_ROW ){
int idv = db_column_int(&q, 0);
const char *zName = db_column_text(&q, 1);
int isExe = db_column_int(&q, 2);
fossil_print("%s %s\n", isExe ? "EXECUTABLE" : "UNEXEC", zName);
if( !dryRunFlag ){
char *zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
|
| ︙ | |||
626 627 628 629 630 631 632 | 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - + - + |
/* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */
if( verboseFlag ){
fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n",
zName, ridp, ridm, ridv);
}else{
fossil_print("MERGE %s\n", zName);
}
|
| ︙ | |||
734 735 736 737 738 739 740 | 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - + - + - + - + |
if( !dryRunFlag ){
char *zFullOldPath, *zFullNewPath;
zFullOldPath = db_text(0,"SELECT tmpfn FROM tmprn WHERE fn=%Q", zOldName);
if( !zFullOldPath ){
zFullOldPath = mprintf("%s%s", g.zLocalRoot, zOldName);
}
zFullNewPath = mprintf("%s%s", g.zLocalRoot, zNewName);
|
| ︙ | |||
787 788 789 790 791 792 793 | 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - + |
db_multi_exec(
"REPLACE INTO vfile(vid,chnged,deleted,rid,mrid,isexe,islink,pathname)"
" SELECT %d,%d,0,rid,mrid,isexe,islink,pathname FROM vfile WHERE id=%d",
vid, integrateFlag?5:3, idm
);
zName = db_column_text(&q, 1);
zFullName = mprintf("%s%s", g.zLocalRoot, zName);
|
| ︙ |
Changes to src/merge3.c.
| ︙ | |||
331 332 333 334 335 336 337 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - + |
/*
** Return true if the named file contains an unresolved merge marker line.
*/
int file_contains_merge_marker(const char *zFullpath){
Blob file;
int rc;
|
| ︙ | |||
374 375 376 377 378 379 380 | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + - + - + |
/* We should be done with options.. */
verify_all_options();
if( g.argc!=6 ){
usage("PIVOT V1 V2 MERGED");
}
|
| ︙ | |||
464 465 466 467 468 469 470 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - + |
Blob *pV2, /* Version merging from (yours) */
Blob *pOut, /* Output written here */
unsigned mergeFlags /* Flags that control operation */
){
Blob v1; /* Content of zV1 */
int rc; /* Return code of subroutines and this routine */
|
| ︙ | |||
494 495 496 497 498 499 500 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | - - + + |
azSubst[0] = "%baseline"; azSubst[1] = zPivot;
azSubst[2] = "%original"; azSubst[3] = zOrig;
azSubst[4] = "%merge"; azSubst[5] = zOther;
azSubst[6] = "%output"; azSubst[7] = zOut;
zCmd = string_subst(zGMerge, 8, azSubst);
printf("%s\n", zCmd); fflush(stdout);
fossil_system(zCmd);
|
| ︙ |
Changes to src/rebuild.c.
| ︙ | |||
941 942 943 944 945 946 947 | 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | - + - + - + |
continue;
}
zUtf8Name = fossil_path_to_utf8(pEntry->d_name);
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
fossil_path_free(zUtf8Name);
#ifdef _DIRENT_HAVE_D_TYPE
if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
|
| ︙ | |||
987 988 989 990 991 992 993 | 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | - + |
** See also: deconstruct, rebuild
*/
void reconstruct_cmd(void) {
char *zPassword;
if( g.argc!=4 ){
usage("FILENAME DIRECTORY");
}
|
| ︙ | |||
1069 1070 1071 1072 1073 1074 1075 | 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | - + |
verify_all_options();
/* check number of arguments */
if( g.argc!=3 ){
usage ("?OPTIONS? DESTINATION");
}
/* get and check argument destination directory */
zDestDir = g.argv[g.argc-1];
|
| ︙ |
Changes to src/search.c.
| ︙ | |||
349 350 351 352 353 354 355 | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | - + |
verify_all_options();
if( g.argc<4 ) usage("SEARCHSTRING FILE1...");
if( zBegin==0 ) zBegin = "[[";
if( zEnd==0 ) zEnd = "]]";
if( zGap==0 ) zGap = " ... ";
p = search_init(g.argv[2], zBegin, zEnd, zGap, flg);
for(i=3; i<g.argc; i++){
|
| ︙ | |||
1420 1421 1422 1423 1424 1425 1426 | 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 | - + |
** Read the content of FILE and convert it to stext according to MIMETYPE.
** Send the result to standard output.
*/
void test_convert_stext(void){
Blob in, out;
db_find_and_open_repository(0,0);
if( g.argc!=4 ) usage("FILENAME MIMETYPE");
|
| ︙ |
Changes to src/sha1.c.
| ︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + - + | /* ** Compute the SHA1 checksum of a file on disk. Store the resulting ** checksum in the blob pCksum. pCksum is assumed to be initialized. ** ** Return the number of errors. */ |
| ︙ | |||
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | + + + + + + + + + + - + |
/*
** COMMAND: sha1sum*
**
** Usage: %fossil sha1sum FILE...
**
** Compute an SHA1 checksum of all files named on the command-line.
** If a file is named "-" then take its content from standard input.
** Options:
**
** -h, --dereference If FILE is a symbolic link, compute the hash
** on the object that the link points to. Normally,
** the hash is over the name of the object that
** the link points to.
*/
void sha1sum_test(void){
int i;
Blob in;
Blob cksum;
int eFType = SymFILE;
if( find_option("dereference","h",0)!=0 ){
eFType = ExtFILE;
}
for(i=2; i<g.argc; i++){
blob_init(&cksum, "************** not found ***************", -1);
if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){
blob_read_from_channel(&in, stdin, -1);
sha1sum_blob(&in, &cksum);
}else{
|
Changes to src/sha3.c.
| ︙ | |||
543 544 545 546 547 548 549 | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | - + - + | /* ** Compute the SHA3 checksum of a file on disk. Store the resulting ** checksum in the blob pCksum. pCksum is assumed to be initialized. ** ** Return the number of errors. */ |
| ︙ | |||
627 628 629 630 631 632 633 | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | - - - - - - + + + + + + + + + + | ** If a file is named "-" then take its content from standard input. ** ** To be clear: The official NIST FIPS-202 implementation of SHA3 ** with the added 01 padding is used, not the original Keccak submission. ** ** Options: ** |
| ︙ | |||
662 663 664 665 666 667 668 | 666 667 668 669 670 671 672 673 674 675 676 677 678 | - + |
for(i=2; i<g.argc; i++){
blob_init(&cksum, "************** not found ***************", -1);
if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){
blob_read_from_channel(&in, stdin, -1);
sha3sum_blob(&in, iSize, &cksum);
}else{
|
Changes to src/skins.c.
| ︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + - + |
** that should be used for the current run.
*/
const char *skin_get(const char *zWhat){
const char *zOut;
char *z;
if( zAltSkinDir ){
char *z = mprintf("%s/%s.txt", zAltSkinDir, zWhat);
|
| ︙ |
Changes to src/stash.c.
| ︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - - - - - + - - - - - + - - + |
while( db_step(&q)==SQLITE_ROW ){
int deleted = db_column_int(&q, 0);
int rid = db_column_int(&q, 3);
const char *zName = db_column_text(&q, 4);
const char *zOrig = db_column_text(&q, 5);
char *zPath = mprintf("%s%s", g.zLocalRoot, zName);
Blob content;
|
| ︙ | |||
223 224 225 226 227 228 229 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - + - + - - - - + - - + - + |
Blob delta;
undo_save(zNew);
blob_zero(&delta);
if( rid==0 ){
db_multi_exec("INSERT OR IGNORE INTO sfile(pathname) VALUES(%Q)", zNew);
db_ephemeral_blob(&q, 6, &delta);
blob_write_to_file(&delta, zNPath);
|
| ︙ | |||
341 342 343 344 345 346 347 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + |
isBin1 = fIncludeBinary ? 0 : looks_like_binary(&a);
diff_file_mem(&a, &empty, isBin1, isBin2, zOrig, zDiffCmd,
zBinGlob, fIncludeBinary, diffFlags);
}else{
}
}else{
Blob delta;
|
| ︙ |
Changes to src/stat.c.
| ︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + |
style_submenu_element("Table Sizes", "repo-tabsize");
}
if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){
style_submenu_element("Environment", "test_env");
}
@ <table class="label-value">
@ <tr><th>Repository Size:</th><td>
|
| ︙ | |||
239 240 241 242 243 244 245 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - + |
verify_all_options();
if( (z = db_get("project-name",0))!=0
|| (z = db_get("short-project-name",0))!=0
){
fossil_print("%*s%s\n", colWidth, "project-name:", z);
}
|
| ︙ | |||
532 533 534 535 536 537 538 | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | - + |
nPageFree = db_int(0, "PRAGMA repository.freelist_count");
if( nPageFree>0 ){
db_multi_exec(
"INSERT INTO piechart(amt,label) VALUES(%d,'freelist')",
nPageFree
);
}
|
| ︙ | |||
558 559 560 561 562 563 564 | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | - + |
nPageFree = db_int(0, "PRAGMA localdb.freelist_count");
if( nPageFree>0 ){
db_multi_exec(
"INSERT INTO piechart(amt,label) VALUES(%d,'freelist')",
nPageFree
);
}
|
Changes to src/style.c.
| ︙ | |||
801 802 803 804 805 806 807 | 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 | - + |
** Determine if the CSS stylesheet FILENAME contains SELECTOR.
*/
void contains_selector_cmd(void){
int found;
char *zSelector;
Blob css;
if( g.argc!=4 ) usage("FILENAME SELECTOR");
|
| ︙ |
Changes to src/tar.c.
| ︙ | |||
422 423 424 425 426 427 428 429 430 431 432 433 | 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | + + + - + + + + - - + + |
/*
** COMMAND: test-tarball
**
** Generate a GZIP-compressed tarball in the file given by the first argument
** that contains files given in the second and subsequent arguments.
**
** -h, --dereference Follow symlinks; archive the files they point to.
*/
void test_tarball_cmd(void){
int i;
Blob zip;
int eFType = SymFILE;
if( g.argc<3 ){
|
| ︙ |
Changes to src/th_main.c.
| ︙ | |||
2517 2518 2519 2520 2521 2522 2523 | 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 | - + |
g.useLocalauth = 1;
}
verify_all_options();
if( g.argc<3 ){
usage("FILE");
}
blob_zero(&in);
|
| ︙ | |||
2620 2621 2622 2623 2624 2625 2626 | 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 | - + |
g.useLocalauth = 1;
}
verify_all_options();
if( g.argc!=3 ){
usage("file");
}
blob_zero(&in);
|
| ︙ |
Changes to src/th_tcl.c.
| ︙ | |||
844 845 846 847 848 849 850 | 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 | - + | ** When Tcl stubs support is enabled, attempts to dynamically load the Tcl ** shared library and fetch the function pointers necessary to create an ** interpreter and initialize the stubs mechanism; otherwise, simply setup ** the function pointers provided by the caller with the statically linked ** functions. */ char *fossil_getenv(const char *zName); /* file.h */ |
| ︙ | |||
873 874 875 876 877 878 879 | 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 | - + |
}
#if defined(USE_TCL_STUBS)
do {
char *zFileName;
void *hLibrary;
if( !zEnvPath ){
zFileName = aFileName; /* NOTE: Assume present in PATH. */
|
| ︙ |
Changes to src/undo.c.
| ︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - - + + - - - - + - - + |
int new_exe;
int new_link;
int old_link;
Blob current;
Blob new;
zFullname = mprintf("%s/%s", g.zLocalRoot, zPathname);
old_link = db_column_int(&q, 3);
|
| ︙ | |||
85 86 87 88 89 90 91 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + |
file_delete(zFullname);
}
if( old_link ){
symlink_create(blob_str(&new), zFullname);
}else{
blob_write_to_file(&new, zFullname);
}
|
| ︙ | |||
315 316 317 318 319 320 321 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + - + - + - - - - + - |
char *zFullname;
i64 size;
int result;
if( undoDisable ) return UNDO_DISABLED;
if( !undoActive ) return UNDO_INACTIVE;
zFullname = mprintf("%s%s", g.zLocalRoot, zPathname);
|
| ︙ |
Changes to src/unversioned.c.
| ︙ | |||
299 300 301 302 303 304 305 | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | - + |
}else if( contains_whitespace(zIn) ){
zError = "contain whitespace";
}
if( zError ){
fossil_fatal("unversioned filenames may not %s: %Q", zError, zIn);
}
blob_init(&file,0,0);
|
| ︙ | |||
348 349 350 351 352 353 354 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - + |
blob_write_to_file(&content, zTFile);
zCmd = mprintf("%s \"%s\"", zEditor, zTFile);
if( fossil_system(zCmd) ){
fossil_fatal("editor aborted: %Q", zCmd);
}
fossil_free(zCmd);
blob_reset(&content);
|
| ︙ |
Changes to src/update.c.
| ︙ | |||
351 352 353 354 355 356 357 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | - + |
const char *zSep; /* Term separator */
blob_zero(&sql);
blob_append(&sql, "DELETE FROM fv WHERE ", -1);
zSep = "";
for(i=3; i<g.argc; i++){
file_tree_name(g.argv[i], &treename, 0, 1);
|
| ︙ | |||
416 417 418 419 420 421 422 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + - + |
/* Conflict. This file has been added to the current checkout
** but also exists in the target checkout. Use the current version.
*/
fossil_print("CONFLICT %s\n", zName);
nConflict++;
}else if( idt>0 && idv==0 ){
/* File added in the target. */
|
| ︙ | |||
464 465 466 467 468 469 470 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | - + - + - + |
Blob r, t, v;
int rc;
if( nameChng ){
fossil_print("MERGE %s -> %s\n", zName, zNewName);
}else{
fossil_print("MERGE %s\n", zName);
}
|
| ︙ | |||
601 602 603 604 605 606 607 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | - + - + |
for(i=0; zEmptyDirs[i]; i++){
if( zEmptyDirs[i]==',' ) zEmptyDirs[i] = ' ';
}
blob_init(&dirsList, zEmptyDirs, -1);
while( blob_token(&dirsList, &dirName) ){
char *zDir = blob_str(&dirName);
char *zPath = mprintf("%s/%s", g.zLocalRoot, zDir);
|
| ︙ | |||
848 849 850 851 852 853 854 | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | + - + + - + - + |
|| fossil_strcmp(pRvFile->zUuid, pCoFile->zUuid)!=0;
}
/* Get contents of reverted-to file. */
content_get(fast_uuid_to_rid(pRvFile->zUuid), &record);
undo_save(zFile);
if( file_size(zFull, RepoFILE)>=0
|
| ︙ |
Changes to src/url.c.
| ︙ | |||
242 243 244 245 246 247 248 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + - + |
pUrlData->isFile = 1;
if( zUrl[5]=='/' && zUrl[6]=='/' ){
i = 7;
}else{
i = 5;
}
zFile = mprintf("%s", &zUrl[i]);
|
| ︙ |
Changes to src/vfile.c.
| ︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - - + + - + - + |
id = db_column_int(&q, 0);
zName = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
isDeleted = db_column_int(&q, 3);
oldChnged = chnged = db_column_int(&q, 4);
oldMtime = db_column_int64(&q, 7);
origSize = db_column_int64(&q, 6);
|
| ︙ | |||
245 246 247 248 249 250 251 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + |
if( !hname_verify_file_hash(zName, zUuid, nUuid) ) chnged = 1;
}
if( (cksigFlags & CKSIG_SETMTIME) && (chnged==0 || chnged==2 || chnged==4) ){
i64 desiredMtime;
if( mtime_of_manifest_file(vid,rid,&desiredMtime)==0 ){
if( currentMtime!=desiredMtime ){
file_set_mtime(zName, desiredMtime);
|
| ︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - + - + - + - + - + - + - + |
zName = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
isExe = db_column_int(&q, 3);
isLink = db_column_int(&q, 4);
content_get(rid, &content);
if( file_is_the_same(&content, zName) ){
blob_reset(&content);
|
| ︙ | |||
385 386 387 388 389 390 391 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | - + - + - + |
** "_FOSSIL_" or ".fslckout". Return true or false.
*/
int vfile_top_of_checkout(const char *zPath){
char *zFile;
int fileFound = 0;
zFile = mprintf("%s/_FOSSIL_", zPath);
|
| ︙ | |||
520 521 522 523 524 525 526 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + - + - + - + - + - + |
blob_appendf(pPath, "/%s", zUtf8);
zPath = blob_str(pPath);
if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
glob_match(pIgnore2, &zPath[nPrefix+1]) ){
/* do nothing */
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
|
| ︙ | |||
640 641 642 643 644 645 646 | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | - + - + - + - + |
blob_appendf(pPath, "/%s", zUtf8);
zPath = blob_str(pPath);
if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
glob_match(pIgnore2, &zPath[nPrefix+1]) ){
/* do nothing */
#ifdef _DIRENT_HAVE_D_TYPE
}else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
|
| ︙ | |||
724 725 726 727 728 729 730 | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | - + |
while( db_step(&q)==SQLITE_ROW ){
const char *zFullpath = db_column_text(&q, 0);
const char *zName = db_column_text(&q, 1);
int isSelected = db_column_int(&q, 3);
if( isSelected ){
md5sum_step_text(zName, -1);
|
| ︙ | |||
784 785 786 787 788 789 790 | 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | - + |
char *write_blob_to_temp_file(Blob *pBlob){
sqlite3_uint64 r;
char *zOut = 0;
do{
sqlite3_free(zOut);
sqlite3_randomness(8, &r);
zOut = sqlite3_mprintf("file-%08llx", r);
|
| ︙ | |||
813 814 815 816 817 818 819 | 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 | - - - - + - |
md5sum_init();
while( db_step(&q)==SQLITE_ROW ){
const char *zFullpath = db_column_text(&q, 0);
const char *zName = db_column_text(&q, 1);
int rid = db_column_int(&q, 2);
blob_zero(&disk);
|
| ︙ |
Changes to src/wiki.c.
| ︙ | |||
1249 1250 1251 1252 1253 1254 1255 | 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | - + |
" [--technote DATETIME] [--technote-tags TAGS]"
" [--technote-bgcolor COLOR]");
}
zPageName = g.argv[3];
if( g.argc==4 ){
blob_read_from_channel(&content, stdin, -1);
}else{
|
| ︙ | |||
1373 1374 1375 1376 1377 1378 1379 | 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + |
**
*/
void test_markdown_render(void){
Blob in, out;
verify_all_options();
if( g.argc!=3 ) usage("FILE");
blob_zero(&out);
|
Changes to src/wikiformat.c.
| ︙ | |||
1739 1740 1741 1742 1743 1744 1745 | 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 | - + |
if( find_option("linksonly",0,0)!=0 ) flags |= WIKI_LINKSONLY;
if( find_option("nobadlinks",0,0)!=0 ) flags |= WIKI_NOBADLINKS;
if( find_option("inline",0,0)!=0 ) flags |= WIKI_INLINE;
if( find_option("noblock",0,0)!=0 ) flags |= WIKI_NOBLOCK;
verify_all_options();
if( g.argc!=3 ) usage("FILE");
blob_zero(&out);
|
| ︙ | |||
2102 2103 2104 2105 2106 2107 2108 | 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 | - + |
** the command-line and write the results to standard output.
*/
void test_html_tidy(void){
Blob in, out;
int i;
for(i=2; i<g.argc; i++){
|
| ︙ | |||
2229 2230 2231 2232 2233 2234 2235 | 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 | - + |
** the html_to_plaintext() routine.
*/
void test_html_to_text(void){
Blob in, out;
int i;
for(i=2; i<g.argc; i++){
|
Changes to src/winfile.c.
| ︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - - + + + - + | #ifndef LABEL_SECURITY_INFORMATION # define LABEL_SECURITY_INFORMATION (0x00000010L) #endif /* ** Fill stat buf with information received from stat() or lstat(). |
| ︙ |
Changes to src/winhttp.c.
| ︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + |
1000, TRUE);
if( dwResult!=WAIT_IO_COMPLETION && dwResult!=WAIT_TIMEOUT ){
/* The event is either invalid, signaled, or abandoned. Bail
** out now because those conditions should indicate the parent
** thread is dead or dying. */
break;
}
|
| ︙ | |||
850 851 852 853 854 855 856 | 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | - + |
/* Process options for Fossil running as server. */
if( zPort && (atoi(zPort)<=0) ){
winhttp_fatal("create", zSvcName,
"port number must be in the range 1 - 65535.");
}
if( !zRepository ){
db_must_be_within_tree();
|
| ︙ |
Changes to src/xfer.c.
| ︙ | |||
1623 1624 1625 1626 1627 1628 1629 | 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 | - + |
*/
void cmd_test_xfer(void){
db_find_and_open_repository(0,0);
if( g.argc!=2 && g.argc!=3 ){
usage("?MESSAGEFILE?");
}
blob_zero(&g.cgiIn);
|
| ︙ |
Changes to src/zip.c.
| ︙ | |||
287 288 289 290 291 292 293 294 295 296 297 298 299 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | + + + + - - + + |
** Generate a ZIP archive specified by the first argument that
** contains files given in the second and subsequent arguments.
*/
void filezip_cmd(void){
int i;
Blob zip;
Blob file;
int eFType = SymFILE;
if( g.argc<3 ){
usage("ARCHIVE FILE....");
}
if( find_option("dereference","h",0)!=0 ){
eFType = ExtFILE;
}
zip_open();
for(i=3; i<g.argc; i++){
blob_zero(&file);
|
| ︙ |