Fossil SCM

Manifest parser supports various hash sizes.

drh 2017-02-27 18:26 fossil-2.0
Commit 80f9b68e6f0547b6d7300af49f37c589f22feb33
+1 -1
--- src/attach.c
+++ src/attach.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2010 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
1313
--- src/attach.c
+++ src/attach.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2010 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13
--- src/attach.c
+++ src/attach.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2010 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13
+4 -5
--- src/blob.c
+++ src/blob.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2006 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
@@ -647,15 +647,14 @@
647647
}
648648
pFrom->iCursor = i;
649649
}
650650
651651
/*
652
-** Return true if the blob contains a valid UUID_SIZE-digit base16 identifier.
652
+** Return true if the blob contains a valid base16 identifier artifact hash.
653653
*/
654
-int blob_is_uuid(Blob *pBlob){
655
- return blob_size(pBlob)==UUID_SIZE
656
- && validate16(blob_buffer(pBlob), UUID_SIZE);
654
+int blob_is_hname(Blob *pBlob){
655
+ return hname_validate(blob_buffer(pBlob), blob_size(pBlob))!=HNAME_NONE;
657656
}
658657
659658
/*
660659
** Return true if the blob contains a valid filename
661660
*/
662661
--- src/blob.c
+++ src/blob.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -647,15 +647,14 @@
647 }
648 pFrom->iCursor = i;
649 }
650
651 /*
652 ** Return true if the blob contains a valid UUID_SIZE-digit base16 identifier.
653 */
654 int blob_is_uuid(Blob *pBlob){
655 return blob_size(pBlob)==UUID_SIZE
656 && validate16(blob_buffer(pBlob), UUID_SIZE);
657 }
658
659 /*
660 ** Return true if the blob contains a valid filename
661 */
662
--- src/blob.c
+++ src/blob.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -647,15 +647,14 @@
647 }
648 pFrom->iCursor = i;
649 }
650
651 /*
652 ** Return true if the blob contains a valid base16 identifier artifact hash.
653 */
654 int blob_is_hname(Blob *pBlob){
655 return hname_validate(blob_buffer(pBlob), blob_size(pBlob))!=HNAME_NONE;
 
656 }
657
658 /*
659 ** Return true if the blob contains a valid filename
660 */
661
+5 -5
--- src/db.c
+++ src/db.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2006 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
@@ -2082,29 +2082,29 @@
20822082
sqlite3_result_value(context, argv[2-rc]);
20832083
}
20842084
}
20852085
20862086
/*
2087
-** Convert the input string into an SHA1. Make a notation in the
2087
+** Convert the input string into a artifact hash. Make a notation in the
20882088
** CONCEALED table so that the hash can be undo using the db_reveal()
20892089
** function at some later time.
20902090
**
20912091
** The value returned is stored in static space and will be overwritten
20922092
** on subsequent calls.
20932093
**
2094
-** If zContent is already a well-formed SHA1 hash, then return a copy
2094
+** If zContent is already a well-formed artifact hash, then return a copy
20952095
** of that hash, not a hash of the hash.
20962096
**
20972097
** The CONCEALED table is meant to obscure email addresses. Every valid
20982098
** email address will contain a "@" character and "@" is not valid within
20992099
** an SHA1 hash so there is no chance that a valid email address will go
21002100
** unconcealed.
21012101
*/
21022102
char *db_conceal(const char *zContent, int n){
2103
- static char zHash[42];
2103
+ static char zHash[HNAME_LEN_MAX+1];
21042104
Blob out;
2105
- if( n==40 && validate16(zContent, n) ){
2105
+ if( hname_validate(zContent, n)!=HNAME_NONE ){
21062106
memcpy(zHash, zContent, n);
21072107
zHash[n] = 0;
21082108
}else{
21092109
sha1sum_step_text(zContent, n);
21102110
sha1sum_finish(&out);
21112111
21122112
ADDED src/hname.c
--- src/db.c
+++ src/db.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -2082,29 +2082,29 @@
2082 sqlite3_result_value(context, argv[2-rc]);
2083 }
2084 }
2085
2086 /*
2087 ** Convert the input string into an SHA1. Make a notation in the
2088 ** CONCEALED table so that the hash can be undo using the db_reveal()
2089 ** function at some later time.
2090 **
2091 ** The value returned is stored in static space and will be overwritten
2092 ** on subsequent calls.
2093 **
2094 ** If zContent is already a well-formed SHA1 hash, then return a copy
2095 ** of that hash, not a hash of the hash.
2096 **
2097 ** The CONCEALED table is meant to obscure email addresses. Every valid
2098 ** email address will contain a "@" character and "@" is not valid within
2099 ** an SHA1 hash so there is no chance that a valid email address will go
2100 ** unconcealed.
2101 */
2102 char *db_conceal(const char *zContent, int n){
2103 static char zHash[42];
2104 Blob out;
2105 if( n==40 && validate16(zContent, n) ){
2106 memcpy(zHash, zContent, n);
2107 zHash[n] = 0;
2108 }else{
2109 sha1sum_step_text(zContent, n);
2110 sha1sum_finish(&out);
2111
2112 DDED src/hname.c
--- src/db.c
+++ src/db.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -2082,29 +2082,29 @@
2082 sqlite3_result_value(context, argv[2-rc]);
2083 }
2084 }
2085
2086 /*
2087 ** Convert the input string into a artifact hash. Make a notation in the
2088 ** CONCEALED table so that the hash can be undo using the db_reveal()
2089 ** function at some later time.
2090 **
2091 ** The value returned is stored in static space and will be overwritten
2092 ** on subsequent calls.
2093 **
2094 ** If zContent is already a well-formed artifact hash, then return a copy
2095 ** of that hash, not a hash of the hash.
2096 **
2097 ** The CONCEALED table is meant to obscure email addresses. Every valid
2098 ** email address will contain a "@" character and "@" is not valid within
2099 ** an SHA1 hash so there is no chance that a valid email address will go
2100 ** unconcealed.
2101 */
2102 char *db_conceal(const char *zContent, int n){
2103 static char zHash[HNAME_LEN_MAX+1];
2104 Blob out;
2105 if( hname_validate(zContent, n)!=HNAME_NONE ){
2106 memcpy(zHash, zContent, n);
2107 zHash[n] = 0;
2108 }else{
2109 sha1sum_step_text(zContent, n);
2110 sha1sum_finish(&out);
2111
2112 DDED src/hname.c
--- a/src/hname.c
+++ b/src/hname.c
@@ -0,0 +1,7 @@
1
+/*
2
+** Copyright (c) 2017 D. Richard Hipp
3
+**
4
+** This program is free sofNONE (-1)012LENLENif( aid==HN-1
5
+**-1NONENONENONE;
6
+ return id;
7
+}
--- a/src/hname.c
+++ b/src/hname.c
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
--- a/src/hname.c
+++ b/src/hname.c
@@ -0,0 +1,7 @@
1 /*
2 ** Copyright (c) 2017 D. Richard Hipp
3 **
4 ** This program is free sofNONE (-1)012LENLENif( aid==HN-1
5 **-1NONENONENONE;
6 return id;
7 }
+2 -1
--- src/info.c
+++ src/info.c
@@ -1385,10 +1385,11 @@
13851385
" ORDER BY mtime DESC /*sort*/",
13861386
rid
13871387
);
13881388
while( db_step(&q)==SQLITE_ROW ){
13891389
const char *zTarget = db_column_text(&q, 0);
1390
+ int nTarget = db_column_bytes(&q, 0);
13901391
const char *zFilename = db_column_text(&q, 1);
13911392
const char *zDate = db_column_text(&q, 2);
13921393
const char *zUser = db_column_text(&q, 3);
13931394
/* const char *zSrc = db_column_text(&q, 4); */
13941395
if( cnt>0 ){
@@ -1395,11 +1396,11 @@
13951396
@ Also attachment "%h(zFilename)" to
13961397
}else{
13971398
@ Attachment "%h(zFilename)" to
13981399
}
13991400
objType |= OBJTYPE_ATTACHMENT;
1400
- if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1401
+ if( nTarget==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
14011402
if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
14021403
zTarget)
14031404
){
14041405
if( g.perm.Hyperlink && g.anon.RdTkt ){
14051406
@ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
14061407
--- src/info.c
+++ src/info.c
@@ -1385,10 +1385,11 @@
1385 " ORDER BY mtime DESC /*sort*/",
1386 rid
1387 );
1388 while( db_step(&q)==SQLITE_ROW ){
1389 const char *zTarget = db_column_text(&q, 0);
 
1390 const char *zFilename = db_column_text(&q, 1);
1391 const char *zDate = db_column_text(&q, 2);
1392 const char *zUser = db_column_text(&q, 3);
1393 /* const char *zSrc = db_column_text(&q, 4); */
1394 if( cnt>0 ){
@@ -1395,11 +1396,11 @@
1395 @ Also attachment "%h(zFilename)" to
1396 }else{
1397 @ Attachment "%h(zFilename)" to
1398 }
1399 objType |= OBJTYPE_ATTACHMENT;
1400 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1401 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1402 zTarget)
1403 ){
1404 if( g.perm.Hyperlink && g.anon.RdTkt ){
1405 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
1406
--- src/info.c
+++ src/info.c
@@ -1385,10 +1385,11 @@
1385 " ORDER BY mtime DESC /*sort*/",
1386 rid
1387 );
1388 while( db_step(&q)==SQLITE_ROW ){
1389 const char *zTarget = db_column_text(&q, 0);
1390 int nTarget = db_column_bytes(&q, 0);
1391 const char *zFilename = db_column_text(&q, 1);
1392 const char *zDate = db_column_text(&q, 2);
1393 const char *zUser = db_column_text(&q, 3);
1394 /* const char *zSrc = db_column_text(&q, 4); */
1395 if( cnt>0 ){
@@ -1395,11 +1396,11 @@
1396 @ Also attachment "%h(zFilename)" to
1397 }else{
1398 @ Attachment "%h(zFilename)" to
1399 }
1400 objType |= OBJTYPE_ATTACHMENT;
1401 if( nTarget==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1402 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1403 zTarget)
1404 ){
1405 if( g.perm.Hyperlink && g.anon.RdTkt ){
1406 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
1407
+6 -1
--- src/main.c
+++ src/main.c
@@ -50,11 +50,16 @@
5050
# include "cson_amalgamation.h" /* JSON API. */
5151
# include "json_detail.h"
5252
#endif
5353
5454
/*
55
-** Size of a UUID in characters
55
+** Size of a UUID in characters. A UUID is a randomly generated
56
+** lower-case hexadecimal number used to identify tickets.
57
+**
58
+** In Fossil 1.x, UUID also referred to a SHA1 artifact hash. But that
59
+** usage is now obsolete. The term UUID should now mean only a very large
60
+** random number used as a unique identifier for tickets or other objects.
5661
*/
5762
#define UUID_SIZE 40
5863
5964
/*
6065
** Maximum number of auxiliary parameters on reports
6166
--- src/main.c
+++ src/main.c
@@ -50,11 +50,16 @@
50 # include "cson_amalgamation.h" /* JSON API. */
51 # include "json_detail.h"
52 #endif
53
54 /*
55 ** Size of a UUID in characters
 
 
 
 
 
56 */
57 #define UUID_SIZE 40
58
59 /*
60 ** Maximum number of auxiliary parameters on reports
61
--- src/main.c
+++ src/main.c
@@ -50,11 +50,16 @@
50 # include "cson_amalgamation.h" /* JSON API. */
51 # include "json_detail.h"
52 #endif
53
54 /*
55 ** Size of a UUID in characters. A UUID is a randomly generated
56 ** lower-case hexadecimal number used to identify tickets.
57 **
58 ** In Fossil 1.x, UUID also referred to a SHA1 artifact hash. But that
59 ** usage is now obsolete. The term UUID should now mean only a very large
60 ** random number used as a unique identifier for tickets or other objects.
61 */
62 #define UUID_SIZE 40
63
64 /*
65 ** Maximum number of auxiliary parameters on reports
66
+12
--- src/main.mk
+++ src/main.mk
@@ -52,10 +52,11 @@
5252
$(SRCDIR)/fshell.c \
5353
$(SRCDIR)/fusefs.c \
5454
$(SRCDIR)/glob.c \
5555
$(SRCDIR)/graph.c \
5656
$(SRCDIR)/gzip.c \
57
+ $(SRCDIR)/hname.c \
5758
$(SRCDIR)/http.c \
5859
$(SRCDIR)/http_socket.c \
5960
$(SRCDIR)/http_ssl.c \
6061
$(SRCDIR)/http_transport.c \
6162
$(SRCDIR)/import.c \
@@ -228,10 +229,11 @@
228229
$(OBJDIR)/fshell_.c \
229230
$(OBJDIR)/fusefs_.c \
230231
$(OBJDIR)/glob_.c \
231232
$(OBJDIR)/graph_.c \
232233
$(OBJDIR)/gzip_.c \
234
+ $(OBJDIR)/hname_.c \
233235
$(OBJDIR)/http_.c \
234236
$(OBJDIR)/http_socket_.c \
235237
$(OBJDIR)/http_ssl_.c \
236238
$(OBJDIR)/http_transport_.c \
237239
$(OBJDIR)/import_.c \
@@ -353,10 +355,11 @@
353355
$(OBJDIR)/fshell.o \
354356
$(OBJDIR)/fusefs.o \
355357
$(OBJDIR)/glob.o \
356358
$(OBJDIR)/graph.o \
357359
$(OBJDIR)/gzip.o \
360
+ $(OBJDIR)/hname.o \
358361
$(OBJDIR)/http.o \
359362
$(OBJDIR)/http_socket.o \
360363
$(OBJDIR)/http_ssl.o \
361364
$(OBJDIR)/http_transport.o \
362365
$(OBJDIR)/import.o \
@@ -639,10 +642,11 @@
639642
$(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
640643
$(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
641644
$(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
642645
$(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
643646
$(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
647
+ $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \
644648
$(OBJDIR)/http_.c:$(OBJDIR)/http.h \
645649
$(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
646650
$(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
647651
$(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
648652
$(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1041,10 +1045,18 @@
10411045
10421046
$(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
10431047
$(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
10441048
10451049
$(OBJDIR)/gzip.h: $(OBJDIR)/headers
1050
+
1051
+$(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(OBJDIR)/translate
1052
+ $(OBJDIR)/translate $(SRCDIR)/hname.c >$@
1053
+
1054
+$(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h
1055
+ $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c
1056
+
1057
+$(OBJDIR)/hname.h: $(OBJDIR)/headers
10461058
10471059
$(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate
10481060
$(OBJDIR)/translate $(SRCDIR)/http.c >$@
10491061
10501062
$(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
10511063
--- src/main.mk
+++ src/main.mk
@@ -52,10 +52,11 @@
52 $(SRCDIR)/fshell.c \
53 $(SRCDIR)/fusefs.c \
54 $(SRCDIR)/glob.c \
55 $(SRCDIR)/graph.c \
56 $(SRCDIR)/gzip.c \
 
57 $(SRCDIR)/http.c \
58 $(SRCDIR)/http_socket.c \
59 $(SRCDIR)/http_ssl.c \
60 $(SRCDIR)/http_transport.c \
61 $(SRCDIR)/import.c \
@@ -228,10 +229,11 @@
228 $(OBJDIR)/fshell_.c \
229 $(OBJDIR)/fusefs_.c \
230 $(OBJDIR)/glob_.c \
231 $(OBJDIR)/graph_.c \
232 $(OBJDIR)/gzip_.c \
 
233 $(OBJDIR)/http_.c \
234 $(OBJDIR)/http_socket_.c \
235 $(OBJDIR)/http_ssl_.c \
236 $(OBJDIR)/http_transport_.c \
237 $(OBJDIR)/import_.c \
@@ -353,10 +355,11 @@
353 $(OBJDIR)/fshell.o \
354 $(OBJDIR)/fusefs.o \
355 $(OBJDIR)/glob.o \
356 $(OBJDIR)/graph.o \
357 $(OBJDIR)/gzip.o \
 
358 $(OBJDIR)/http.o \
359 $(OBJDIR)/http_socket.o \
360 $(OBJDIR)/http_ssl.o \
361 $(OBJDIR)/http_transport.o \
362 $(OBJDIR)/import.o \
@@ -639,10 +642,11 @@
639 $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
640 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
641 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
642 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
643 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
 
644 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
645 $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
646 $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
647 $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
648 $(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1041,10 +1045,18 @@
1041
1042 $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
1043 $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
1044
1045 $(OBJDIR)/gzip.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1046
1047 $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate
1048 $(OBJDIR)/translate $(SRCDIR)/http.c >$@
1049
1050 $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
1051
--- src/main.mk
+++ src/main.mk
@@ -52,10 +52,11 @@
52 $(SRCDIR)/fshell.c \
53 $(SRCDIR)/fusefs.c \
54 $(SRCDIR)/glob.c \
55 $(SRCDIR)/graph.c \
56 $(SRCDIR)/gzip.c \
57 $(SRCDIR)/hname.c \
58 $(SRCDIR)/http.c \
59 $(SRCDIR)/http_socket.c \
60 $(SRCDIR)/http_ssl.c \
61 $(SRCDIR)/http_transport.c \
62 $(SRCDIR)/import.c \
@@ -228,10 +229,11 @@
229 $(OBJDIR)/fshell_.c \
230 $(OBJDIR)/fusefs_.c \
231 $(OBJDIR)/glob_.c \
232 $(OBJDIR)/graph_.c \
233 $(OBJDIR)/gzip_.c \
234 $(OBJDIR)/hname_.c \
235 $(OBJDIR)/http_.c \
236 $(OBJDIR)/http_socket_.c \
237 $(OBJDIR)/http_ssl_.c \
238 $(OBJDIR)/http_transport_.c \
239 $(OBJDIR)/import_.c \
@@ -353,10 +355,11 @@
355 $(OBJDIR)/fshell.o \
356 $(OBJDIR)/fusefs.o \
357 $(OBJDIR)/glob.o \
358 $(OBJDIR)/graph.o \
359 $(OBJDIR)/gzip.o \
360 $(OBJDIR)/hname.o \
361 $(OBJDIR)/http.o \
362 $(OBJDIR)/http_socket.o \
363 $(OBJDIR)/http_ssl.o \
364 $(OBJDIR)/http_transport.o \
365 $(OBJDIR)/import.o \
@@ -639,10 +642,11 @@
642 $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
643 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
644 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
645 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
646 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
647 $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \
648 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
649 $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
650 $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
651 $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
652 $(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1041,10 +1045,18 @@
1045
1046 $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
1047 $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
1048
1049 $(OBJDIR)/gzip.h: $(OBJDIR)/headers
1050
1051 $(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(OBJDIR)/translate
1052 $(OBJDIR)/translate $(SRCDIR)/hname.c >$@
1053
1054 $(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h
1055 $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c
1056
1057 $(OBJDIR)/hname.h: $(OBJDIR)/headers
1058
1059 $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate
1060 $(OBJDIR)/translate $(SRCDIR)/http.c >$@
1061
1062 $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
1063
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -58,10 +58,11 @@
5858
fshell
5959
fusefs
6060
glob
6161
graph
6262
gzip
63
+ hname
6364
http
6465
http_socket
6566
http_transport
6667
import
6768
info
6869
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -58,10 +58,11 @@
58 fshell
59 fusefs
60 glob
61 graph
62 gzip
 
63 http
64 http_socket
65 http_transport
66 import
67 info
68
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -58,10 +58,11 @@
58 fshell
59 fusefs
60 glob
61 graph
62 gzip
63 hname
64 http
65 http_socket
66 http_transport
67 import
68 info
69
+71 -68
--- src/manifest.c
+++ src/manifest.c
@@ -54,11 +54,11 @@
5454
/*
5555
** A single F-card within a manifest
5656
*/
5757
struct ManifestFile {
5858
char *zName; /* Name of a file */
59
- char *zUuid; /* UUID of the file */
59
+ char *zUuid; /* Artifact hash for the file */
6060
char *zPerm; /* File permissions */
6161
char *zPrior; /* Prior name if the name was changed */
6262
};
6363
6464
@@ -77,35 +77,35 @@
7777
char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
7878
char *zWiki; /* Text of the wiki page. W card. */
7979
char *zWikiTitle; /* Name of the wiki page. L card. */
8080
char *zMimetype; /* Mime type of wiki or comment text. N card. */
8181
double rEventDate; /* Date of an event. E card. */
82
- char *zEventId; /* UUID for an event. E card. */
82
+ char *zEventId; /* Artifact hash for an event. E card. */
8383
char *zTicketUuid; /* UUID for a ticket. K card. */
8484
char *zAttachName; /* Filename of an attachment. A card. */
85
- char *zAttachSrc; /* UUID of document being attached. A card. */
85
+ char *zAttachSrc; /* Artifact hash for document being attached. A card. */
8686
char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
8787
int nFile; /* Number of F cards */
8888
int nFileAlloc; /* Slots allocated in aFile[] */
8989
int iFile; /* Index of current file in iterator */
9090
ManifestFile *aFile; /* One entry for each F-card */
9191
int nParent; /* Number of parents. */
9292
int nParentAlloc; /* Slots allocated in azParent[] */
93
- char **azParent; /* UUIDs of parents. One for each P card argument */
93
+ char **azParent; /* Hashes of parents. One for each P card argument */
9494
int nCherrypick; /* Number of entries in aCherrypick[] */
9595
struct {
96
- char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */
97
- char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */
96
+ char *zCPTarget; /* Hash for cherry-picked version w/ +|- prefix */
97
+ char *zCPBase; /* Hash for cherry-pick baseline. NULL for singletons */
9898
} *aCherrypick;
9999
int nCChild; /* Number of cluster children */
100100
int nCChildAlloc; /* Number of closts allocated in azCChild[] */
101
- char **azCChild; /* UUIDs of referenced objects in a cluster. M cards */
101
+ char **azCChild; /* Hashes of referenced objects in a cluster. M cards */
102102
int nTag; /* Number of T Cards */
103103
int nTagAlloc; /* Slots allocated in aTag[] */
104104
struct TagType {
105105
char *zName; /* Name of the tag */
106
- char *zUuid; /* UUID that the tag is applied to */
106
+ char *zUuid; /* Hash of artifact that the tag is applied to */
107107
char *zValue; /* Value if the tag is really a property */
108108
} *aTag; /* One for each T card */
109109
int nField; /* Number of J cards */
110110
int nFieldAlloc; /* Slots allocated in aField[] */
111111
struct {
@@ -361,11 +361,11 @@
361361
char *z;
362362
int n;
363363
char *zUuid;
364364
int sz = 0;
365365
int isRepeat, hasSelfRefTag = 0;
366
- Blob bUuid = BLOB_INITIALIZER;
366
+ Blob bHname = BLOB_INITIALIZER;
367367
static Bag seen;
368368
const char *zErr = 0;
369369
370370
if( rid==0 ){
371371
isRepeat = 1;
@@ -406,14 +406,14 @@
406406
blob_reset(pContent);
407407
blob_appendf(pErr, "incorrect Z-card cksum");
408408
return 0;
409409
}
410410
411
- /* Store the UUID (before modifying the blob) only for error
411
+ /* Store the artifact hash (before modifying the blob) only for error
412412
** reporting purposes.
413413
*/
414
- sha1sum_blob(pContent, &bUuid);
414
+ sha1sum_blob(pContent, &bHname);
415415
416416
/* Allocate a Manifest object to hold the parsed control artifact.
417417
*/
418418
p = fossil_malloc( sizeof(*p) );
419419
memset(p, 0, sizeof(*p));
@@ -449,15 +449,15 @@
449449
defossilize(zName);
450450
if( !file_is_simple_pathname(zName, 0) ){
451451
SYNTAX("invalid filename on A-card");
452452
}
453453
defossilize(zTarget);
454
- if( (nTarget!=UUID_SIZE || !validate16(zTarget, UUID_SIZE))
454
+ if( hname_validate(zTarget,nTarget)==HNAME_NONE
455455
&& !wiki_name_is_wellformed((const unsigned char *)zTarget) ){
456456
SYNTAX("invalid target on A-card");
457457
}
458
- if( zSrc && (nSrc!=UUID_SIZE || !validate16(zSrc, UUID_SIZE)) ){
458
+ if( zSrc && hname_validate(zSrc,nSrc)==HNAME_NONE ){
459459
SYNTAX("invalid source on A-card");
460460
}
461461
p->zAttachName = (char*)file_tail(zName);
462462
p->zAttachSrc = zSrc;
463463
p->zAttachTarget = zTarget;
@@ -465,18 +465,18 @@
465465
}
466466
467467
/*
468468
** B <uuid>
469469
**
470
- ** A B-line gives the UUID for the baseline of a delta-manifest.
470
+ ** A B-line gives the artifact hash for the baseline of a delta-manifest.
471471
*/
472472
case 'B': {
473473
if( p->zBaseline ) SYNTAX("more than one B-card");
474474
p->zBaseline = next_token(&x, &sz);
475
- if( p->zBaseline==0 ) SYNTAX("missing UUID on B-card");
476
- if( sz!=UUID_SIZE || !validate16(p->zBaseline, UUID_SIZE) ){
477
- SYNTAX("invalid UUID on B-card");
475
+ if( p->zBaseline==0 ) SYNTAX("missing hash on B-card");
476
+ if( hname_validate(p->zBaseline,sz)==HNAME_NONE ){
477
+ SYNTAX("invalid hash on B-card");
478478
}
479479
break;
480480
}
481481
482482
@@ -522,12 +522,12 @@
522522
case 'E': {
523523
if( p->rEventDate>0.0 ) SYNTAX("more than one E-card");
524524
p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0));
525525
if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card");
526526
p->zEventId = next_token(&x, &sz);
527
- if( sz!=UUID_SIZE || !validate16(p->zEventId, UUID_SIZE) ){
528
- SYNTAX("malformed UUID on E-card");
527
+ if( hname_validate(p->zEventId, sz)==HNAME_NONE ){
528
+ SYNTAX("malformed hash on E-card");
529529
}
530530
break;
531531
}
532532
533533
/*
@@ -545,12 +545,13 @@
545545
if( !file_is_simple_pathname(zName, 0) ){
546546
SYNTAX("F-card filename is not a simple path");
547547
}
548548
zUuid = next_token(&x, &sz);
549549
if( p->zBaseline==0 || zUuid!=0 ){
550
- if( sz!=UUID_SIZE ) SYNTAX("F-card UUID is the wrong size");
551
- if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("F-card UUID invalid");
550
+ if( hname_validate(zUuid,sz)==HNAME_NONE ){
551
+ SYNTAX("F-card hash invalid");
552
+ }
552553
}
553554
zPerm = next_token(&x,0);
554555
zPriorName = next_token(&x,0);
555556
if( zPriorName ){
556557
defossilize(zPriorName);
@@ -636,20 +637,21 @@
636637
}
637638
break;
638639
}
639640
640641
/*
641
- ** M <uuid>
642
+ ** M <hash>
642643
**
643
- ** An M-line identifies another artifact by its UUID. M-lines
644
+ ** An M-line identifies another artifact by its hash. M-lines
644645
** occur in clusters only.
645646
*/
646647
case 'M': {
647648
zUuid = next_token(&x, &sz);
648
- if( zUuid==0 ) SYNTAX("missing UUID on M-card");
649
- if( sz!=UUID_SIZE ) SYNTAX("wrong size for UUID on M-card");
650
- if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("UUID invalid on M-card");
649
+ if( zUuid==0 ) SYNTAX("missing hash on M-card");
650
+ if( hname_validate(zUuid,sz)==HNAME_NONE ){
651
+ SYNTAX("Invalid hash on M-card");
652
+ }
651653
if( p->nCChild>=p->nCChildAlloc ){
652654
p->nCChildAlloc = p->nCChildAlloc*2 + 10;
653655
p->azCChild = fossil_realloc(p->azCChild
654656
, p->nCChildAlloc*sizeof(p->azCChild[0]) );
655657
}
@@ -683,12 +685,13 @@
683685
** check-in historically has an empty P-card, so empty P-cards
684686
** must be accepted.
685687
*/
686688
case 'P': {
687689
while( (zUuid = next_token(&x, &sz))!=0 ){
688
- if( sz!=UUID_SIZE ) SYNTAX("wrong size UUID on P-card");
689
- if( !validate16(zUuid, UUID_SIZE) )SYNTAX("invalid UUID on P-card");
690
+ if( hname_validate(zUuid, sz)==HNAME_NONE ){
691
+ SYNTAX("invalid hash on P-card");
692
+ }
690693
if( p->nParent>=p->nParentAlloc ){
691694
p->nParentAlloc = p->nParentAlloc*2 + 5;
692695
p->azParent = fossil_realloc(p->azParent,
693696
p->nParentAlloc*sizeof(char*));
694697
}
@@ -703,29 +706,25 @@
703706
**
704707
** Specify one or a range of check-ins that are cherrypicked into
705708
** this check-in ("+") or backed out of this check-in ("-").
706709
*/
707710
case 'Q': {
708
- if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing UUID on Q-card");
709
- if( sz!=UUID_SIZE+1 ) SYNTAX("wrong size UUID on Q-card");
711
+ if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing hash on Q-card");
710712
if( zUuid[0]!='+' && zUuid[0]!='-' ){
711713
SYNTAX("Q-card does not begin with '+' or '-'");
712714
}
713
- if( !validate16(&zUuid[1], UUID_SIZE) ){
714
- SYNTAX("invalid UUID on Q-card");
715
+ if( hname_validate(&zUuid[1], sz-1)==HNAME_NONE ){
716
+ SYNTAX("invalid hash on Q-card");
715717
}
716718
n = p->nCherrypick;
717719
p->nCherrypick++;
718720
p->aCherrypick = fossil_realloc(p->aCherrypick,
719721
p->nCherrypick*sizeof(p->aCherrypick[0]));
720722
p->aCherrypick[n].zCPTarget = zUuid;
721723
p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz);
722
- if( zUuid ){
723
- if( sz!=UUID_SIZE ) SYNTAX("wrong size second UUID in Q-card");
724
- if( !validate16(zUuid, UUID_SIZE) ){
725
- SYNTAX("invalid second UUID on Q-card");
726
- }
724
+ if( zUuid && hname_validate(zUuid,sz)==HNAME_NONE ){
725
+ SYNTAX("invalid second hash on Q-card");
727726
}
728727
break;
729728
}
730729
731730
/*
@@ -760,32 +759,32 @@
760759
case 'T': {
761760
char *zName, *zValue;
762761
zName = next_token(&x, 0);
763762
if( zName==0 ) SYNTAX("missing name on T-card");
764763
zUuid = next_token(&x, &sz);
765
- if( zUuid==0 ) SYNTAX("missing UUID on T-card");
764
+ if( zUuid==0 ) SYNTAX("missing artifact hash on T-card");
766765
zValue = next_token(&x, 0);
767766
if( zValue ) defossilize(zValue);
768
- if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
769
- /* A valid uuid */
767
+ if( hname_validate(zUuid, sz)!=HNAME_NONE ){
768
+ /* A valid artifact hash */
770769
if( p->zEventId ) SYNTAX("non-self-referential T-card in event");
771770
}else if( sz==1 && zUuid[0]=='*' ){
772771
zUuid = 0;
773772
hasSelfRefTag = 1;
774773
if( p->zEventId && zName[0]!='+' ){
775774
SYNTAX("propagating T-card in event");
776775
}
777776
}else{
778
- SYNTAX("malformed UUID on T-card");
777
+ SYNTAX("malformed artifact hash on T-card");
779778
}
780779
defossilize(zName);
781780
if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){
782781
SYNTAX("T-card name does not begin with '-', '+', or '*'");
783782
}
784783
if( validate16(&zName[1], strlen(&zName[1])) ){
785
- /* Do not allow tags whose names look like UUIDs */
786
- SYNTAX("T-card name looks like a UUID");
784
+ /* Do not allow tags whose names look like a hash */
785
+ SYNTAX("T-card name looks like a hexadecimal hash");
787786
}
788787
if( p->nTag>=p->nTagAlloc ){
789788
p->nTagAlloc = p->nTagAlloc*2 + 10;
790789
p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) );
791790
}
@@ -951,17 +950,17 @@
951950
if( !seenZ ) SYNTAX("missing Z-card on control");
952951
p->type = CFTYPE_CONTROL;
953952
}
954953
md5sum_init();
955954
if( !isRepeat ) g.parseCnt[p->type]++;
956
- blob_reset(&bUuid);
955
+ blob_reset(&bHname);
957956
return p;
958957
959958
manifest_syntax_error:
960
- if(bUuid.nUsed){
961
- blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid));
962
- blob_reset(&bUuid);
959
+ if(bHname.nUsed){
960
+ blob_appendf(pErr, "manifest [%s] ", blob_str(&bHname));
961
+ blob_reset(&bHname);
963962
}
964963
if( zErr ){
965964
blob_appendf(pErr, "line %d: %s", lineNo, zErr);
966965
}else{
967966
blob_appendf(pErr, "unknown error on line %d", lineNo);
@@ -1193,13 +1192,13 @@
11931192
** then the mlink entry is only created if there is already an mlink
11941193
** from primary parent for the same file.
11951194
*/
11961195
static void add_one_mlink(
11971196
int pmid, /* The parent manifest */
1198
- const char *zFromUuid, /* UUID for content in parent */
1197
+ const char *zFromUuid, /* Artifact hash for content in parent */
11991198
int mid, /* The record ID of the manifest */
1200
- const char *zToUuid, /* UUID for content in child */
1199
+ const char *zToUuid, /* artifact hash for content in child */
12011200
const char *zFilename, /* Filename */
12021201
const char *zPrior, /* Previous filename. NULL if unchanged */
12031202
int isPublic, /* True if mid is not a private manifest */
12041203
int isPrimary, /* pmid is the primary parent of mid */
12051204
int mperm /* 1: exec, 2: symlink */
@@ -1545,22 +1544,22 @@
15451544
}
15461545
}
15471546
15481547
/*
15491548
** For a check-in with RID "rid" that has nParent parent check-ins given
1550
-** by the UUIDs in azParent[], create all appropriate plink and mlink table
1549
+** by the hashes in azParent[], create all appropriate plink and mlink table
15511550
** entries.
15521551
**
1553
-** The primary parent is the first UUID on the azParent[] list.
1552
+** The primary parent is the first hash on the azParent[] list.
15541553
**
15551554
** Return the RID of the primary parent.
15561555
*/
15571556
static int manifest_add_checkin_linkages(
15581557
int rid, /* The RID of the check-in */
15591558
Manifest *p, /* Manifest for this check-in */
15601559
int nParent, /* Number of parents for this check-in */
1561
- char **azParent /* UUIDs for each parent */
1560
+ char **azParent /* hashes for each parent */
15621561
){
15631562
int i;
15641563
int parentid = 0;
15651564
char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */
15661565
Stmt q;
@@ -1611,33 +1610,36 @@
16111610
return parentid;
16121611
}
16131612
16141613
/*
16151614
** There exists a "parent" tag against checkin rid that has value zValue.
1616
-** If value is well-formed (meaning that it is a list of UUIDs), then use
1615
+** If value is well-formed (meaning that it is a list of hashes), then use
16171616
** zValue to reparent check-in rid.
16181617
*/
16191618
void manifest_reparent_checkin(int rid, const char *zValue){
1620
- int nParent;
1619
+ int nParent = 0;
16211620
char *zCopy = 0;
16221621
char **azParent = 0;
16231622
Manifest *p = 0;
1624
- int i;
1623
+ int i, j;
16251624
int n = (int)strlen(zValue);
1626
- nParent = (n+1)/(UUID_SIZE+1);
1627
- if( nParent*(UUID_SIZE+1) - 1 !=n ) return;
1628
- if( nParent<1 ) return;
1625
+ int mxParent = (n+1)/(HNAME_LEN_MIN+1);
1626
+
1627
+ if( mxParent<1 ) return;
16291628
zCopy = fossil_strdup(zValue);
1630
- azParent = fossil_malloc( sizeof(azParent[0])*nParent );
1631
- for(i=0; i<nParent; i++){
1632
- azParent[i] = &zCopy[i*(UUID_SIZE+1)];
1633
- if( i<nParent-1 && azParent[i][UUID_SIZE]!=' ' ) break;
1634
- azParent[i][UUID_SIZE] = 0;
1635
- if( !validate16(azParent[i],UUID_SIZE) ) break;
1636
- }
1637
- if( i==nParent
1638
- && !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d",
1629
+ azParent = fossil_malloc( sizeof(azParent[0])*mxParent );
1630
+ for(nParent=0, i=0; zCopy[i]; i++){
1631
+ char *z = &zCopy[i];
1632
+ azParent[nParent++] = z;
1633
+ if( nParent>mxParent ) goto reparent_abort;
1634
+ for(j=HNAME_LEN_MIN; z[j]>' '; j++){}
1635
+ if( hname_validate(z, j)==HNAME_NONE ) goto reparent_abort;
1636
+ if( z[j]==0 ) break;
1637
+ z[j] = 0;
1638
+ i += j;
1639
+ }
1640
+ if( !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d",
16391641
rid, uuid_to_rid(azParent[0],0))
16401642
){
16411643
p = manifest_get(rid, CFTYPE_MANIFEST, 0);
16421644
}
16431645
if( p!=0 ){
@@ -1647,10 +1649,11 @@
16471649
rid, rid
16481650
);
16491651
manifest_add_checkin_linkages(rid,p,nParent,azParent);
16501652
}
16511653
manifest_destroy(p);
1654
+reparent_abort:
16521655
fossil_free(azParent);
16531656
fossil_free(zCopy);
16541657
}
16551658
16561659
/*
@@ -2280,11 +2283,11 @@
22802283
int branchMove = 0;
22812284
blob_zero(&comment);
22822285
if( p->zComment ){
22832286
blob_appendf(&comment, " %s.", p->zComment);
22842287
}
2285
- /* Next loop expects tags to be sorted on UUID, so sort it. */
2288
+ /* Next loop expects tags to be sorted on hash, so sort it. */
22862289
qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare);
22872290
for(i=0; i<p->nTag; i++){
22882291
zTagUuid = p->aTag[i].zUuid;
22892292
if( !zTagUuid ) continue;
22902293
if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){
22912294
--- src/manifest.c
+++ src/manifest.c
@@ -54,11 +54,11 @@
54 /*
55 ** A single F-card within a manifest
56 */
57 struct ManifestFile {
58 char *zName; /* Name of a file */
59 char *zUuid; /* UUID of the file */
60 char *zPerm; /* File permissions */
61 char *zPrior; /* Prior name if the name was changed */
62 };
63
64
@@ -77,35 +77,35 @@
77 char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
78 char *zWiki; /* Text of the wiki page. W card. */
79 char *zWikiTitle; /* Name of the wiki page. L card. */
80 char *zMimetype; /* Mime type of wiki or comment text. N card. */
81 double rEventDate; /* Date of an event. E card. */
82 char *zEventId; /* UUID for an event. E card. */
83 char *zTicketUuid; /* UUID for a ticket. K card. */
84 char *zAttachName; /* Filename of an attachment. A card. */
85 char *zAttachSrc; /* UUID of document being attached. A card. */
86 char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
87 int nFile; /* Number of F cards */
88 int nFileAlloc; /* Slots allocated in aFile[] */
89 int iFile; /* Index of current file in iterator */
90 ManifestFile *aFile; /* One entry for each F-card */
91 int nParent; /* Number of parents. */
92 int nParentAlloc; /* Slots allocated in azParent[] */
93 char **azParent; /* UUIDs of parents. One for each P card argument */
94 int nCherrypick; /* Number of entries in aCherrypick[] */
95 struct {
96 char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */
97 char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */
98 } *aCherrypick;
99 int nCChild; /* Number of cluster children */
100 int nCChildAlloc; /* Number of closts allocated in azCChild[] */
101 char **azCChild; /* UUIDs of referenced objects in a cluster. M cards */
102 int nTag; /* Number of T Cards */
103 int nTagAlloc; /* Slots allocated in aTag[] */
104 struct TagType {
105 char *zName; /* Name of the tag */
106 char *zUuid; /* UUID that the tag is applied to */
107 char *zValue; /* Value if the tag is really a property */
108 } *aTag; /* One for each T card */
109 int nField; /* Number of J cards */
110 int nFieldAlloc; /* Slots allocated in aField[] */
111 struct {
@@ -361,11 +361,11 @@
361 char *z;
362 int n;
363 char *zUuid;
364 int sz = 0;
365 int isRepeat, hasSelfRefTag = 0;
366 Blob bUuid = BLOB_INITIALIZER;
367 static Bag seen;
368 const char *zErr = 0;
369
370 if( rid==0 ){
371 isRepeat = 1;
@@ -406,14 +406,14 @@
406 blob_reset(pContent);
407 blob_appendf(pErr, "incorrect Z-card cksum");
408 return 0;
409 }
410
411 /* Store the UUID (before modifying the blob) only for error
412 ** reporting purposes.
413 */
414 sha1sum_blob(pContent, &bUuid);
415
416 /* Allocate a Manifest object to hold the parsed control artifact.
417 */
418 p = fossil_malloc( sizeof(*p) );
419 memset(p, 0, sizeof(*p));
@@ -449,15 +449,15 @@
449 defossilize(zName);
450 if( !file_is_simple_pathname(zName, 0) ){
451 SYNTAX("invalid filename on A-card");
452 }
453 defossilize(zTarget);
454 if( (nTarget!=UUID_SIZE || !validate16(zTarget, UUID_SIZE))
455 && !wiki_name_is_wellformed((const unsigned char *)zTarget) ){
456 SYNTAX("invalid target on A-card");
457 }
458 if( zSrc && (nSrc!=UUID_SIZE || !validate16(zSrc, UUID_SIZE)) ){
459 SYNTAX("invalid source on A-card");
460 }
461 p->zAttachName = (char*)file_tail(zName);
462 p->zAttachSrc = zSrc;
463 p->zAttachTarget = zTarget;
@@ -465,18 +465,18 @@
465 }
466
467 /*
468 ** B <uuid>
469 **
470 ** A B-line gives the UUID for the baseline of a delta-manifest.
471 */
472 case 'B': {
473 if( p->zBaseline ) SYNTAX("more than one B-card");
474 p->zBaseline = next_token(&x, &sz);
475 if( p->zBaseline==0 ) SYNTAX("missing UUID on B-card");
476 if( sz!=UUID_SIZE || !validate16(p->zBaseline, UUID_SIZE) ){
477 SYNTAX("invalid UUID on B-card");
478 }
479 break;
480 }
481
482
@@ -522,12 +522,12 @@
522 case 'E': {
523 if( p->rEventDate>0.0 ) SYNTAX("more than one E-card");
524 p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0));
525 if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card");
526 p->zEventId = next_token(&x, &sz);
527 if( sz!=UUID_SIZE || !validate16(p->zEventId, UUID_SIZE) ){
528 SYNTAX("malformed UUID on E-card");
529 }
530 break;
531 }
532
533 /*
@@ -545,12 +545,13 @@
545 if( !file_is_simple_pathname(zName, 0) ){
546 SYNTAX("F-card filename is not a simple path");
547 }
548 zUuid = next_token(&x, &sz);
549 if( p->zBaseline==0 || zUuid!=0 ){
550 if( sz!=UUID_SIZE ) SYNTAX("F-card UUID is the wrong size");
551 if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("F-card UUID invalid");
 
552 }
553 zPerm = next_token(&x,0);
554 zPriorName = next_token(&x,0);
555 if( zPriorName ){
556 defossilize(zPriorName);
@@ -636,20 +637,21 @@
636 }
637 break;
638 }
639
640 /*
641 ** M <uuid>
642 **
643 ** An M-line identifies another artifact by its UUID. M-lines
644 ** occur in clusters only.
645 */
646 case 'M': {
647 zUuid = next_token(&x, &sz);
648 if( zUuid==0 ) SYNTAX("missing UUID on M-card");
649 if( sz!=UUID_SIZE ) SYNTAX("wrong size for UUID on M-card");
650 if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("UUID invalid on M-card");
 
651 if( p->nCChild>=p->nCChildAlloc ){
652 p->nCChildAlloc = p->nCChildAlloc*2 + 10;
653 p->azCChild = fossil_realloc(p->azCChild
654 , p->nCChildAlloc*sizeof(p->azCChild[0]) );
655 }
@@ -683,12 +685,13 @@
683 ** check-in historically has an empty P-card, so empty P-cards
684 ** must be accepted.
685 */
686 case 'P': {
687 while( (zUuid = next_token(&x, &sz))!=0 ){
688 if( sz!=UUID_SIZE ) SYNTAX("wrong size UUID on P-card");
689 if( !validate16(zUuid, UUID_SIZE) )SYNTAX("invalid UUID on P-card");
 
690 if( p->nParent>=p->nParentAlloc ){
691 p->nParentAlloc = p->nParentAlloc*2 + 5;
692 p->azParent = fossil_realloc(p->azParent,
693 p->nParentAlloc*sizeof(char*));
694 }
@@ -703,29 +706,25 @@
703 **
704 ** Specify one or a range of check-ins that are cherrypicked into
705 ** this check-in ("+") or backed out of this check-in ("-").
706 */
707 case 'Q': {
708 if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing UUID on Q-card");
709 if( sz!=UUID_SIZE+1 ) SYNTAX("wrong size UUID on Q-card");
710 if( zUuid[0]!='+' && zUuid[0]!='-' ){
711 SYNTAX("Q-card does not begin with '+' or '-'");
712 }
713 if( !validate16(&zUuid[1], UUID_SIZE) ){
714 SYNTAX("invalid UUID on Q-card");
715 }
716 n = p->nCherrypick;
717 p->nCherrypick++;
718 p->aCherrypick = fossil_realloc(p->aCherrypick,
719 p->nCherrypick*sizeof(p->aCherrypick[0]));
720 p->aCherrypick[n].zCPTarget = zUuid;
721 p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz);
722 if( zUuid ){
723 if( sz!=UUID_SIZE ) SYNTAX("wrong size second UUID in Q-card");
724 if( !validate16(zUuid, UUID_SIZE) ){
725 SYNTAX("invalid second UUID on Q-card");
726 }
727 }
728 break;
729 }
730
731 /*
@@ -760,32 +759,32 @@
760 case 'T': {
761 char *zName, *zValue;
762 zName = next_token(&x, 0);
763 if( zName==0 ) SYNTAX("missing name on T-card");
764 zUuid = next_token(&x, &sz);
765 if( zUuid==0 ) SYNTAX("missing UUID on T-card");
766 zValue = next_token(&x, 0);
767 if( zValue ) defossilize(zValue);
768 if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
769 /* A valid uuid */
770 if( p->zEventId ) SYNTAX("non-self-referential T-card in event");
771 }else if( sz==1 && zUuid[0]=='*' ){
772 zUuid = 0;
773 hasSelfRefTag = 1;
774 if( p->zEventId && zName[0]!='+' ){
775 SYNTAX("propagating T-card in event");
776 }
777 }else{
778 SYNTAX("malformed UUID on T-card");
779 }
780 defossilize(zName);
781 if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){
782 SYNTAX("T-card name does not begin with '-', '+', or '*'");
783 }
784 if( validate16(&zName[1], strlen(&zName[1])) ){
785 /* Do not allow tags whose names look like UUIDs */
786 SYNTAX("T-card name looks like a UUID");
787 }
788 if( p->nTag>=p->nTagAlloc ){
789 p->nTagAlloc = p->nTagAlloc*2 + 10;
790 p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) );
791 }
@@ -951,17 +950,17 @@
951 if( !seenZ ) SYNTAX("missing Z-card on control");
952 p->type = CFTYPE_CONTROL;
953 }
954 md5sum_init();
955 if( !isRepeat ) g.parseCnt[p->type]++;
956 blob_reset(&bUuid);
957 return p;
958
959 manifest_syntax_error:
960 if(bUuid.nUsed){
961 blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid));
962 blob_reset(&bUuid);
963 }
964 if( zErr ){
965 blob_appendf(pErr, "line %d: %s", lineNo, zErr);
966 }else{
967 blob_appendf(pErr, "unknown error on line %d", lineNo);
@@ -1193,13 +1192,13 @@
1193 ** then the mlink entry is only created if there is already an mlink
1194 ** from primary parent for the same file.
1195 */
1196 static void add_one_mlink(
1197 int pmid, /* The parent manifest */
1198 const char *zFromUuid, /* UUID for content in parent */
1199 int mid, /* The record ID of the manifest */
1200 const char *zToUuid, /* UUID for content in child */
1201 const char *zFilename, /* Filename */
1202 const char *zPrior, /* Previous filename. NULL if unchanged */
1203 int isPublic, /* True if mid is not a private manifest */
1204 int isPrimary, /* pmid is the primary parent of mid */
1205 int mperm /* 1: exec, 2: symlink */
@@ -1545,22 +1544,22 @@
1545 }
1546 }
1547
1548 /*
1549 ** For a check-in with RID "rid" that has nParent parent check-ins given
1550 ** by the UUIDs in azParent[], create all appropriate plink and mlink table
1551 ** entries.
1552 **
1553 ** The primary parent is the first UUID on the azParent[] list.
1554 **
1555 ** Return the RID of the primary parent.
1556 */
1557 static int manifest_add_checkin_linkages(
1558 int rid, /* The RID of the check-in */
1559 Manifest *p, /* Manifest for this check-in */
1560 int nParent, /* Number of parents for this check-in */
1561 char **azParent /* UUIDs for each parent */
1562 ){
1563 int i;
1564 int parentid = 0;
1565 char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */
1566 Stmt q;
@@ -1611,33 +1610,36 @@
1611 return parentid;
1612 }
1613
1614 /*
1615 ** There exists a "parent" tag against checkin rid that has value zValue.
1616 ** If value is well-formed (meaning that it is a list of UUIDs), then use
1617 ** zValue to reparent check-in rid.
1618 */
1619 void manifest_reparent_checkin(int rid, const char *zValue){
1620 int nParent;
1621 char *zCopy = 0;
1622 char **azParent = 0;
1623 Manifest *p = 0;
1624 int i;
1625 int n = (int)strlen(zValue);
1626 nParent = (n+1)/(UUID_SIZE+1);
1627 if( nParent*(UUID_SIZE+1) - 1 !=n ) return;
1628 if( nParent<1 ) return;
1629 zCopy = fossil_strdup(zValue);
1630 azParent = fossil_malloc( sizeof(azParent[0])*nParent );
1631 for(i=0; i<nParent; i++){
1632 azParent[i] = &zCopy[i*(UUID_SIZE+1)];
1633 if( i<nParent-1 && azParent[i][UUID_SIZE]!=' ' ) break;
1634 azParent[i][UUID_SIZE] = 0;
1635 if( !validate16(azParent[i],UUID_SIZE) ) break;
1636 }
1637 if( i==nParent
1638 && !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d",
 
 
 
1639 rid, uuid_to_rid(azParent[0],0))
1640 ){
1641 p = manifest_get(rid, CFTYPE_MANIFEST, 0);
1642 }
1643 if( p!=0 ){
@@ -1647,10 +1649,11 @@
1647 rid, rid
1648 );
1649 manifest_add_checkin_linkages(rid,p,nParent,azParent);
1650 }
1651 manifest_destroy(p);
 
1652 fossil_free(azParent);
1653 fossil_free(zCopy);
1654 }
1655
1656 /*
@@ -2280,11 +2283,11 @@
2280 int branchMove = 0;
2281 blob_zero(&comment);
2282 if( p->zComment ){
2283 blob_appendf(&comment, " %s.", p->zComment);
2284 }
2285 /* Next loop expects tags to be sorted on UUID, so sort it. */
2286 qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare);
2287 for(i=0; i<p->nTag; i++){
2288 zTagUuid = p->aTag[i].zUuid;
2289 if( !zTagUuid ) continue;
2290 if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){
2291
--- src/manifest.c
+++ src/manifest.c
@@ -54,11 +54,11 @@
54 /*
55 ** A single F-card within a manifest
56 */
57 struct ManifestFile {
58 char *zName; /* Name of a file */
59 char *zUuid; /* Artifact hash for the file */
60 char *zPerm; /* File permissions */
61 char *zPrior; /* Prior name if the name was changed */
62 };
63
64
@@ -77,35 +77,35 @@
77 char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
78 char *zWiki; /* Text of the wiki page. W card. */
79 char *zWikiTitle; /* Name of the wiki page. L card. */
80 char *zMimetype; /* Mime type of wiki or comment text. N card. */
81 double rEventDate; /* Date of an event. E card. */
82 char *zEventId; /* Artifact hash for an event. E card. */
83 char *zTicketUuid; /* UUID for a ticket. K card. */
84 char *zAttachName; /* Filename of an attachment. A card. */
85 char *zAttachSrc; /* Artifact hash for document being attached. A card. */
86 char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
87 int nFile; /* Number of F cards */
88 int nFileAlloc; /* Slots allocated in aFile[] */
89 int iFile; /* Index of current file in iterator */
90 ManifestFile *aFile; /* One entry for each F-card */
91 int nParent; /* Number of parents. */
92 int nParentAlloc; /* Slots allocated in azParent[] */
93 char **azParent; /* Hashes of parents. One for each P card argument */
94 int nCherrypick; /* Number of entries in aCherrypick[] */
95 struct {
96 char *zCPTarget; /* Hash for cherry-picked version w/ +|- prefix */
97 char *zCPBase; /* Hash for cherry-pick baseline. NULL for singletons */
98 } *aCherrypick;
99 int nCChild; /* Number of cluster children */
100 int nCChildAlloc; /* Number of closts allocated in azCChild[] */
101 char **azCChild; /* Hashes of referenced objects in a cluster. M cards */
102 int nTag; /* Number of T Cards */
103 int nTagAlloc; /* Slots allocated in aTag[] */
104 struct TagType {
105 char *zName; /* Name of the tag */
106 char *zUuid; /* Hash of artifact that the tag is applied to */
107 char *zValue; /* Value if the tag is really a property */
108 } *aTag; /* One for each T card */
109 int nField; /* Number of J cards */
110 int nFieldAlloc; /* Slots allocated in aField[] */
111 struct {
@@ -361,11 +361,11 @@
361 char *z;
362 int n;
363 char *zUuid;
364 int sz = 0;
365 int isRepeat, hasSelfRefTag = 0;
366 Blob bHname = BLOB_INITIALIZER;
367 static Bag seen;
368 const char *zErr = 0;
369
370 if( rid==0 ){
371 isRepeat = 1;
@@ -406,14 +406,14 @@
406 blob_reset(pContent);
407 blob_appendf(pErr, "incorrect Z-card cksum");
408 return 0;
409 }
410
411 /* Store the artifact hash (before modifying the blob) only for error
412 ** reporting purposes.
413 */
414 sha1sum_blob(pContent, &bHname);
415
416 /* Allocate a Manifest object to hold the parsed control artifact.
417 */
418 p = fossil_malloc( sizeof(*p) );
419 memset(p, 0, sizeof(*p));
@@ -449,15 +449,15 @@
449 defossilize(zName);
450 if( !file_is_simple_pathname(zName, 0) ){
451 SYNTAX("invalid filename on A-card");
452 }
453 defossilize(zTarget);
454 if( hname_validate(zTarget,nTarget)==HNAME_NONE
455 && !wiki_name_is_wellformed((const unsigned char *)zTarget) ){
456 SYNTAX("invalid target on A-card");
457 }
458 if( zSrc && hname_validate(zSrc,nSrc)==HNAME_NONE ){
459 SYNTAX("invalid source on A-card");
460 }
461 p->zAttachName = (char*)file_tail(zName);
462 p->zAttachSrc = zSrc;
463 p->zAttachTarget = zTarget;
@@ -465,18 +465,18 @@
465 }
466
467 /*
468 ** B <uuid>
469 **
470 ** A B-line gives the artifact hash for the baseline of a delta-manifest.
471 */
472 case 'B': {
473 if( p->zBaseline ) SYNTAX("more than one B-card");
474 p->zBaseline = next_token(&x, &sz);
475 if( p->zBaseline==0 ) SYNTAX("missing hash on B-card");
476 if( hname_validate(p->zBaseline,sz)==HNAME_NONE ){
477 SYNTAX("invalid hash on B-card");
478 }
479 break;
480 }
481
482
@@ -522,12 +522,12 @@
522 case 'E': {
523 if( p->rEventDate>0.0 ) SYNTAX("more than one E-card");
524 p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0));
525 if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card");
526 p->zEventId = next_token(&x, &sz);
527 if( hname_validate(p->zEventId, sz)==HNAME_NONE ){
528 SYNTAX("malformed hash on E-card");
529 }
530 break;
531 }
532
533 /*
@@ -545,12 +545,13 @@
545 if( !file_is_simple_pathname(zName, 0) ){
546 SYNTAX("F-card filename is not a simple path");
547 }
548 zUuid = next_token(&x, &sz);
549 if( p->zBaseline==0 || zUuid!=0 ){
550 if( hname_validate(zUuid,sz)==HNAME_NONE ){
551 SYNTAX("F-card hash invalid");
552 }
553 }
554 zPerm = next_token(&x,0);
555 zPriorName = next_token(&x,0);
556 if( zPriorName ){
557 defossilize(zPriorName);
@@ -636,20 +637,21 @@
637 }
638 break;
639 }
640
641 /*
642 ** M <hash>
643 **
644 ** An M-line identifies another artifact by its hash. M-lines
645 ** occur in clusters only.
646 */
647 case 'M': {
648 zUuid = next_token(&x, &sz);
649 if( zUuid==0 ) SYNTAX("missing hash on M-card");
650 if( hname_validate(zUuid,sz)==HNAME_NONE ){
651 SYNTAX("Invalid hash on M-card");
652 }
653 if( p->nCChild>=p->nCChildAlloc ){
654 p->nCChildAlloc = p->nCChildAlloc*2 + 10;
655 p->azCChild = fossil_realloc(p->azCChild
656 , p->nCChildAlloc*sizeof(p->azCChild[0]) );
657 }
@@ -683,12 +685,13 @@
685 ** check-in historically has an empty P-card, so empty P-cards
686 ** must be accepted.
687 */
688 case 'P': {
689 while( (zUuid = next_token(&x, &sz))!=0 ){
690 if( hname_validate(zUuid, sz)==HNAME_NONE ){
691 SYNTAX("invalid hash on P-card");
692 }
693 if( p->nParent>=p->nParentAlloc ){
694 p->nParentAlloc = p->nParentAlloc*2 + 5;
695 p->azParent = fossil_realloc(p->azParent,
696 p->nParentAlloc*sizeof(char*));
697 }
@@ -703,29 +706,25 @@
706 **
707 ** Specify one or a range of check-ins that are cherrypicked into
708 ** this check-in ("+") or backed out of this check-in ("-").
709 */
710 case 'Q': {
711 if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing hash on Q-card");
 
712 if( zUuid[0]!='+' && zUuid[0]!='-' ){
713 SYNTAX("Q-card does not begin with '+' or '-'");
714 }
715 if( hname_validate(&zUuid[1], sz-1)==HNAME_NONE ){
716 SYNTAX("invalid hash on Q-card");
717 }
718 n = p->nCherrypick;
719 p->nCherrypick++;
720 p->aCherrypick = fossil_realloc(p->aCherrypick,
721 p->nCherrypick*sizeof(p->aCherrypick[0]));
722 p->aCherrypick[n].zCPTarget = zUuid;
723 p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz);
724 if( zUuid && hname_validate(zUuid,sz)==HNAME_NONE ){
725 SYNTAX("invalid second hash on Q-card");
 
 
 
726 }
727 break;
728 }
729
730 /*
@@ -760,32 +759,32 @@
759 case 'T': {
760 char *zName, *zValue;
761 zName = next_token(&x, 0);
762 if( zName==0 ) SYNTAX("missing name on T-card");
763 zUuid = next_token(&x, &sz);
764 if( zUuid==0 ) SYNTAX("missing artifact hash on T-card");
765 zValue = next_token(&x, 0);
766 if( zValue ) defossilize(zValue);
767 if( hname_validate(zUuid, sz)!=HNAME_NONE ){
768 /* A valid artifact hash */
769 if( p->zEventId ) SYNTAX("non-self-referential T-card in event");
770 }else if( sz==1 && zUuid[0]=='*' ){
771 zUuid = 0;
772 hasSelfRefTag = 1;
773 if( p->zEventId && zName[0]!='+' ){
774 SYNTAX("propagating T-card in event");
775 }
776 }else{
777 SYNTAX("malformed artifact hash on T-card");
778 }
779 defossilize(zName);
780 if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){
781 SYNTAX("T-card name does not begin with '-', '+', or '*'");
782 }
783 if( validate16(&zName[1], strlen(&zName[1])) ){
784 /* Do not allow tags whose names look like a hash */
785 SYNTAX("T-card name looks like a hexadecimal hash");
786 }
787 if( p->nTag>=p->nTagAlloc ){
788 p->nTagAlloc = p->nTagAlloc*2 + 10;
789 p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) );
790 }
@@ -951,17 +950,17 @@
950 if( !seenZ ) SYNTAX("missing Z-card on control");
951 p->type = CFTYPE_CONTROL;
952 }
953 md5sum_init();
954 if( !isRepeat ) g.parseCnt[p->type]++;
955 blob_reset(&bHname);
956 return p;
957
958 manifest_syntax_error:
959 if(bHname.nUsed){
960 blob_appendf(pErr, "manifest [%s] ", blob_str(&bHname));
961 blob_reset(&bHname);
962 }
963 if( zErr ){
964 blob_appendf(pErr, "line %d: %s", lineNo, zErr);
965 }else{
966 blob_appendf(pErr, "unknown error on line %d", lineNo);
@@ -1193,13 +1192,13 @@
1192 ** then the mlink entry is only created if there is already an mlink
1193 ** from primary parent for the same file.
1194 */
1195 static void add_one_mlink(
1196 int pmid, /* The parent manifest */
1197 const char *zFromUuid, /* Artifact hash for content in parent */
1198 int mid, /* The record ID of the manifest */
1199 const char *zToUuid, /* artifact hash for content in child */
1200 const char *zFilename, /* Filename */
1201 const char *zPrior, /* Previous filename. NULL if unchanged */
1202 int isPublic, /* True if mid is not a private manifest */
1203 int isPrimary, /* pmid is the primary parent of mid */
1204 int mperm /* 1: exec, 2: symlink */
@@ -1545,22 +1544,22 @@
1544 }
1545 }
1546
1547 /*
1548 ** For a check-in with RID "rid" that has nParent parent check-ins given
1549 ** by the hashes in azParent[], create all appropriate plink and mlink table
1550 ** entries.
1551 **
1552 ** The primary parent is the first hash on the azParent[] list.
1553 **
1554 ** Return the RID of the primary parent.
1555 */
1556 static int manifest_add_checkin_linkages(
1557 int rid, /* The RID of the check-in */
1558 Manifest *p, /* Manifest for this check-in */
1559 int nParent, /* Number of parents for this check-in */
1560 char **azParent /* hashes for each parent */
1561 ){
1562 int i;
1563 int parentid = 0;
1564 char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */
1565 Stmt q;
@@ -1611,33 +1610,36 @@
1610 return parentid;
1611 }
1612
1613 /*
1614 ** There exists a "parent" tag against checkin rid that has value zValue.
1615 ** If value is well-formed (meaning that it is a list of hashes), then use
1616 ** zValue to reparent check-in rid.
1617 */
1618 void manifest_reparent_checkin(int rid, const char *zValue){
1619 int nParent = 0;
1620 char *zCopy = 0;
1621 char **azParent = 0;
1622 Manifest *p = 0;
1623 int i, j;
1624 int n = (int)strlen(zValue);
1625 int mxParent = (n+1)/(HNAME_LEN_MIN+1);
1626
1627 if( mxParent<1 ) return;
1628 zCopy = fossil_strdup(zValue);
1629 azParent = fossil_malloc( sizeof(azParent[0])*mxParent );
1630 for(nParent=0, i=0; zCopy[i]; i++){
1631 char *z = &zCopy[i];
1632 azParent[nParent++] = z;
1633 if( nParent>mxParent ) goto reparent_abort;
1634 for(j=HNAME_LEN_MIN; z[j]>' '; j++){}
1635 if( hname_validate(z, j)==HNAME_NONE ) goto reparent_abort;
1636 if( z[j]==0 ) break;
1637 z[j] = 0;
1638 i += j;
1639 }
1640 if( !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d",
1641 rid, uuid_to_rid(azParent[0],0))
1642 ){
1643 p = manifest_get(rid, CFTYPE_MANIFEST, 0);
1644 }
1645 if( p!=0 ){
@@ -1647,10 +1649,11 @@
1649 rid, rid
1650 );
1651 manifest_add_checkin_linkages(rid,p,nParent,azParent);
1652 }
1653 manifest_destroy(p);
1654 reparent_abort:
1655 fossil_free(azParent);
1656 fossil_free(zCopy);
1657 }
1658
1659 /*
@@ -2280,11 +2283,11 @@
2283 int branchMove = 0;
2284 blob_zero(&comment);
2285 if( p->zComment ){
2286 blob_appendf(&comment, " %s.", p->zComment);
2287 }
2288 /* Next loop expects tags to be sorted on hash, so sort it. */
2289 qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare);
2290 for(i=0; i<p->nTag; i++){
2291 zTagUuid = p->aTag[i].zUuid;
2292 if( !zTagUuid ) continue;
2293 if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){
2294
+17 -21
--- src/name.c
+++ src/name.c
@@ -2,11 +2,11 @@
22
** Copyright (c) 2006 D. Richard Hipp
33
**
44
** This program is free software; you can redistribute it and/or
55
** modify it under the terms of the Simplified BSD License (also
66
** known as the "2-Clause License" or "FreeBSD License".)
7
-
7
+**
88
** This program is distributed in the hope that it will be useful,
99
** but without any warranty; without even the implied warranty of
1010
** merchantability or fitness for a particular purpose.
1111
**
1212
** Author contact information:
@@ -13,15 +13,11 @@
1313
** [email protected]
1414
** http://www.hwaci.com/drh/
1515
**
1616
*******************************************************************************
1717
**
18
-** This file contains code used to convert user-supplied object names into
19
-** canonical UUIDs.
20
-**
21
-** A user-supplied object name is any unique prefix of a valid UUID but
22
-** not necessarily in canonical form.
18
+** This file contains code used to resolved user-supplied object names.
2319
*/
2420
#include "config.h"
2521
#include "name.h"
2622
#include <assert.h>
2723
@@ -80,12 +76,12 @@
8076
}
8177
8278
/*
8379
** Convert a symbolic name into a RID. Acceptable forms:
8480
**
85
-** * SHA1 hash
86
-** * SHA1 hash prefix of at least 4 characters
81
+** * artifact hash
82
+** * 4-character or larger prefix of a artifact
8783
** * Symbolic Name
8884
** * "tag:" + symbolic name
8985
** * Date or date-time
9086
** * "date:" + Date or date-time
9187
** * symbolic-name ":" date-time
@@ -232,14 +228,14 @@
232228
zTagBase, zDate, zType
233229
);
234230
return rid;
235231
}
236232
237
- /* SHA1 hash or prefix */
238
- if( nTag>=4 && nTag<=UUID_SIZE && validate16(zTag, nTag) ){
233
+ /* artifact hash or prefix */
234
+ if( nTag>=4 && nTag<=HNAME_LEN_MAX && validate16(zTag, nTag) ){
239235
Stmt q;
240
- char zUuid[UUID_SIZE+1];
236
+ char zUuid[HNAME_LEN_MAX+1];
241237
memcpy(zUuid, zTag, nTag+1);
242238
canonical16(zUuid, nTag);
243239
rid = 0;
244240
if( zType[0]=='*' ){
245241
db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid);
@@ -354,11 +350,11 @@
354350
*/
355351
int name_collisions(const char *zName){
356352
int c = 0; /* count of collisions for zName */
357353
int nLen; /* length of zName */
358354
nLen = strlen(zName);
359
- if( nLen>=4 && nLen<=UUID_SIZE && validate16(zName, nLen) ){
355
+ if( nLen>=4 && nLen<=HNAME_LEN_MAX && validate16(zName, nLen) ){
360356
c = db_int(0,
361357
"SELECT"
362358
" (SELECT count(*) FROM ticket"
363359
" WHERE tkt_uuid GLOB '%q*') +"
364360
" (SELECT count(*) FROM tag"
@@ -396,11 +392,11 @@
396392
397393
/*
398394
** Convert a name to a rid. If the name can be any of the various forms
399395
** accepted:
400396
**
401
-** * SHA1 hash or prefix thereof
397
+** * artifact hash or prefix thereof
402398
** * symbolic name
403399
** * date
404400
** * label:date
405401
** * prev, previous
406402
** * next
@@ -425,13 +421,13 @@
425421
return name_to_typed_rid(zName, "*");
426422
}
427423
428424
/*
429425
** WEBPAGE: ambiguous
430
-** URL: /ambiguous?name=UUID&src=WEBPAGE
426
+** URL: /ambiguous?name=NAME&src=WEBPAGE
431427
**
432
-** The UUID given by the name parameter is ambiguous. Display a page
428
+** The NAME given by the name parameter is ambiguous. Display a page
433429
** that shows all possible choices and let the user select between them.
434430
*/
435431
void ambiguous_page(void){
436432
Stmt q;
437433
const char *zName = P("name");
@@ -1154,26 +1150,26 @@
11541150
*/
11551151
static void collision_report(const char *zSql){
11561152
int i, j, kk;
11571153
int nHash = 0;
11581154
Stmt q;
1159
- char zPrev[UUID_SIZE+1];
1155
+ char zPrev[HNAME_LEN_MAX+1];
11601156
struct {
11611157
int cnt;
11621158
char *azHit[MAX_COLLIDE];
1163
- char z[UUID_SIZE+1];
1164
- } aCollide[UUID_SIZE+1];
1159
+ char z[HNAME_LEN_MAX+1];
1160
+ } aCollide[HNAME_LEN_MAX+1];
11651161
memset(aCollide, 0, sizeof(aCollide));
11661162
memset(zPrev, 0, sizeof(zPrev));
11671163
db_prepare(&q,"%s",zSql/*safe-for-%s*/);
11681164
while( db_step(&q)==SQLITE_ROW ){
11691165
const char *zUuid = db_column_text(&q,0);
11701166
int n = db_column_bytes(&q,0);
11711167
int i;
11721168
nHash++;
11731169
for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){}
1174
- if( i>0 && i<=UUID_SIZE ){
1170
+ if( i>0 && i<=HNAME_LEN_MAX ){
11751171
if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){
11761172
aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev);
11771173
}
11781174
aCollide[i].cnt++;
11791175
if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1);
@@ -1182,18 +1178,18 @@
11821178
}
11831179
db_finalize(&q);
11841180
@ <table border=1><thead>
11851181
@ <tr><th>Length<th>Instances<th>First Instance</tr>
11861182
@ </thead><tbody>
1187
- for(i=1; i<=UUID_SIZE; i++){
1183
+ for(i=1; i<=HNAME_LEN_MAX; i++){
11881184
if( aCollide[i].cnt==0 ) continue;
11891185
@ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr>
11901186
}
11911187
@ </tbody></table>
11921188
@ <p>Total number of hashes: %d(nHash)</p>
11931189
kk = 0;
1194
- for(i=UUID_SIZE; i>=4; i--){
1190
+ for(i=HNAME_LEN_MAX; i>=4; i--){
11951191
if( aCollide[i].cnt==0 ) continue;
11961192
if( aCollide[i].cnt>200 ) break;
11971193
kk += aCollide[i].cnt;
11981194
if( aCollide[i].cnt<25 ){
11991195
@ <p>Collisions of length %d(i):
12001196
--- src/name.c
+++ src/name.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -13,15 +13,11 @@
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains code used to convert user-supplied object names into
19 ** canonical UUIDs.
20 **
21 ** A user-supplied object name is any unique prefix of a valid UUID but
22 ** not necessarily in canonical form.
23 */
24 #include "config.h"
25 #include "name.h"
26 #include <assert.h>
27
@@ -80,12 +76,12 @@
80 }
81
82 /*
83 ** Convert a symbolic name into a RID. Acceptable forms:
84 **
85 ** * SHA1 hash
86 ** * SHA1 hash prefix of at least 4 characters
87 ** * Symbolic Name
88 ** * "tag:" + symbolic name
89 ** * Date or date-time
90 ** * "date:" + Date or date-time
91 ** * symbolic-name ":" date-time
@@ -232,14 +228,14 @@
232 zTagBase, zDate, zType
233 );
234 return rid;
235 }
236
237 /* SHA1 hash or prefix */
238 if( nTag>=4 && nTag<=UUID_SIZE && validate16(zTag, nTag) ){
239 Stmt q;
240 char zUuid[UUID_SIZE+1];
241 memcpy(zUuid, zTag, nTag+1);
242 canonical16(zUuid, nTag);
243 rid = 0;
244 if( zType[0]=='*' ){
245 db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid);
@@ -354,11 +350,11 @@
354 */
355 int name_collisions(const char *zName){
356 int c = 0; /* count of collisions for zName */
357 int nLen; /* length of zName */
358 nLen = strlen(zName);
359 if( nLen>=4 && nLen<=UUID_SIZE && validate16(zName, nLen) ){
360 c = db_int(0,
361 "SELECT"
362 " (SELECT count(*) FROM ticket"
363 " WHERE tkt_uuid GLOB '%q*') +"
364 " (SELECT count(*) FROM tag"
@@ -396,11 +392,11 @@
396
397 /*
398 ** Convert a name to a rid. If the name can be any of the various forms
399 ** accepted:
400 **
401 ** * SHA1 hash or prefix thereof
402 ** * symbolic name
403 ** * date
404 ** * label:date
405 ** * prev, previous
406 ** * next
@@ -425,13 +421,13 @@
425 return name_to_typed_rid(zName, "*");
426 }
427
428 /*
429 ** WEBPAGE: ambiguous
430 ** URL: /ambiguous?name=UUID&src=WEBPAGE
431 **
432 ** The UUID given by the name parameter is ambiguous. Display a page
433 ** that shows all possible choices and let the user select between them.
434 */
435 void ambiguous_page(void){
436 Stmt q;
437 const char *zName = P("name");
@@ -1154,26 +1150,26 @@
1154 */
1155 static void collision_report(const char *zSql){
1156 int i, j, kk;
1157 int nHash = 0;
1158 Stmt q;
1159 char zPrev[UUID_SIZE+1];
1160 struct {
1161 int cnt;
1162 char *azHit[MAX_COLLIDE];
1163 char z[UUID_SIZE+1];
1164 } aCollide[UUID_SIZE+1];
1165 memset(aCollide, 0, sizeof(aCollide));
1166 memset(zPrev, 0, sizeof(zPrev));
1167 db_prepare(&q,"%s",zSql/*safe-for-%s*/);
1168 while( db_step(&q)==SQLITE_ROW ){
1169 const char *zUuid = db_column_text(&q,0);
1170 int n = db_column_bytes(&q,0);
1171 int i;
1172 nHash++;
1173 for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){}
1174 if( i>0 && i<=UUID_SIZE ){
1175 if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){
1176 aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev);
1177 }
1178 aCollide[i].cnt++;
1179 if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1);
@@ -1182,18 +1178,18 @@
1182 }
1183 db_finalize(&q);
1184 @ <table border=1><thead>
1185 @ <tr><th>Length<th>Instances<th>First Instance</tr>
1186 @ </thead><tbody>
1187 for(i=1; i<=UUID_SIZE; i++){
1188 if( aCollide[i].cnt==0 ) continue;
1189 @ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr>
1190 }
1191 @ </tbody></table>
1192 @ <p>Total number of hashes: %d(nHash)</p>
1193 kk = 0;
1194 for(i=UUID_SIZE; i>=4; i--){
1195 if( aCollide[i].cnt==0 ) continue;
1196 if( aCollide[i].cnt>200 ) break;
1197 kk += aCollide[i].cnt;
1198 if( aCollide[i].cnt<25 ){
1199 @ <p>Collisions of length %d(i):
1200
--- src/name.c
+++ src/name.c
@@ -2,11 +2,11 @@
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
@@ -13,15 +13,11 @@
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains code used to resolved user-supplied object names.
 
 
 
 
19 */
20 #include "config.h"
21 #include "name.h"
22 #include <assert.h>
23
@@ -80,12 +76,12 @@
76 }
77
78 /*
79 ** Convert a symbolic name into a RID. Acceptable forms:
80 **
81 ** * artifact hash
82 ** * 4-character or larger prefix of a artifact
83 ** * Symbolic Name
84 ** * "tag:" + symbolic name
85 ** * Date or date-time
86 ** * "date:" + Date or date-time
87 ** * symbolic-name ":" date-time
@@ -232,14 +228,14 @@
228 zTagBase, zDate, zType
229 );
230 return rid;
231 }
232
233 /* artifact hash or prefix */
234 if( nTag>=4 && nTag<=HNAME_LEN_MAX && validate16(zTag, nTag) ){
235 Stmt q;
236 char zUuid[HNAME_LEN_MAX+1];
237 memcpy(zUuid, zTag, nTag+1);
238 canonical16(zUuid, nTag);
239 rid = 0;
240 if( zType[0]=='*' ){
241 db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid);
@@ -354,11 +350,11 @@
350 */
351 int name_collisions(const char *zName){
352 int c = 0; /* count of collisions for zName */
353 int nLen; /* length of zName */
354 nLen = strlen(zName);
355 if( nLen>=4 && nLen<=HNAME_LEN_MAX && validate16(zName, nLen) ){
356 c = db_int(0,
357 "SELECT"
358 " (SELECT count(*) FROM ticket"
359 " WHERE tkt_uuid GLOB '%q*') +"
360 " (SELECT count(*) FROM tag"
@@ -396,11 +392,11 @@
392
393 /*
394 ** Convert a name to a rid. If the name can be any of the various forms
395 ** accepted:
396 **
397 ** * artifact hash or prefix thereof
398 ** * symbolic name
399 ** * date
400 ** * label:date
401 ** * prev, previous
402 ** * next
@@ -425,13 +421,13 @@
421 return name_to_typed_rid(zName, "*");
422 }
423
424 /*
425 ** WEBPAGE: ambiguous
426 ** URL: /ambiguous?name=NAME&src=WEBPAGE
427 **
428 ** The NAME given by the name parameter is ambiguous. Display a page
429 ** that shows all possible choices and let the user select between them.
430 */
431 void ambiguous_page(void){
432 Stmt q;
433 const char *zName = P("name");
@@ -1154,26 +1150,26 @@
1150 */
1151 static void collision_report(const char *zSql){
1152 int i, j, kk;
1153 int nHash = 0;
1154 Stmt q;
1155 char zPrev[HNAME_LEN_MAX+1];
1156 struct {
1157 int cnt;
1158 char *azHit[MAX_COLLIDE];
1159 char z[HNAME_LEN_MAX+1];
1160 } aCollide[HNAME_LEN_MAX+1];
1161 memset(aCollide, 0, sizeof(aCollide));
1162 memset(zPrev, 0, sizeof(zPrev));
1163 db_prepare(&q,"%s",zSql/*safe-for-%s*/);
1164 while( db_step(&q)==SQLITE_ROW ){
1165 const char *zUuid = db_column_text(&q,0);
1166 int n = db_column_bytes(&q,0);
1167 int i;
1168 nHash++;
1169 for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){}
1170 if( i>0 && i<=HNAME_LEN_MAX ){
1171 if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){
1172 aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev);
1173 }
1174 aCollide[i].cnt++;
1175 if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1);
@@ -1182,18 +1178,18 @@
1178 }
1179 db_finalize(&q);
1180 @ <table border=1><thead>
1181 @ <tr><th>Length<th>Instances<th>First Instance</tr>
1182 @ </thead><tbody>
1183 for(i=1; i<=HNAME_LEN_MAX; i++){
1184 if( aCollide[i].cnt==0 ) continue;
1185 @ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr>
1186 }
1187 @ </tbody></table>
1188 @ <p>Total number of hashes: %d(nHash)</p>
1189 kk = 0;
1190 for(i=HNAME_LEN_MAX; i>=4; i--){
1191 if( aCollide[i].cnt==0 ) continue;
1192 if( aCollide[i].cnt>200 ) break;
1193 kk += aCollide[i].cnt;
1194 if( aCollide[i].cnt<25 ){
1195 @ <p>Collisions of length %d(i):
1196
+16
--- src/sha1.c
+++ src/sha1.c
@@ -1,6 +1,22 @@
11
/*
2
+** Copyright (c) 2006 D. Richard Hipp
3
+**
4
+** This program is free software; you can redistribute it and/or
5
+** modify it under the terms of the Simplified BSD License (also
6
+** known as the "2-Clause License" or "FreeBSD License".)
7
+**
8
+** This program is distributed in the hope that it will be useful,
9
+** but without any warranty; without even the implied warranty of
10
+** merchantability or fitness for a particular purpose.
11
+**
12
+** Author contact information:
13
+** [email protected]
14
+** http://www.hwaci.com/drh/
15
+**
16
+*******************************************************************************
17
+**
218
** This implementation of SHA1.
319
*/
420
#include "config.h"
521
#include <sys/types.h>
622
#include "sha1.h"
723
--- src/sha1.c
+++ src/sha1.c
@@ -1,6 +1,22 @@
1 /*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2 ** This implementation of SHA1.
3 */
4 #include "config.h"
5 #include <sys/types.h>
6 #include "sha1.h"
7
--- src/sha1.c
+++ src/sha1.c
@@ -1,6 +1,22 @@
1 /*
2 ** Copyright (c) 2006 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This implementation of SHA1.
19 */
20 #include "config.h"
21 #include <sys/types.h>
22 #include "sha1.h"
23
+16
--- src/sha3.c
+++ src/sha3.c
@@ -1,6 +1,22 @@
11
/*
2
+** Copyright (c) 2017 D. Richard Hipp
3
+**
4
+** This program is free software; you can redistribute it and/or
5
+** modify it under the terms of the Simplified BSD License (also
6
+** known as the "2-Clause License" or "FreeBSD License".)
7
+**
8
+** This program is distributed in the hope that it will be useful,
9
+** but without any warranty; without even the implied warranty of
10
+** merchantability or fitness for a particular purpose.
11
+**
12
+** Author contact information:
13
+** [email protected]
14
+** http://www.hwaci.com/drh/
15
+**
16
+*******************************************************************************
17
+**
218
** This file contains an implementation of SHA3 (Keccak) hashing.
319
*/
420
#include "config.h"
521
#include "sha3.h"
622
723
--- src/sha3.c
+++ src/sha3.c
@@ -1,6 +1,22 @@
1 /*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2 ** This file contains an implementation of SHA3 (Keccak) hashing.
3 */
4 #include "config.h"
5 #include "sha3.h"
6
7
--- src/sha3.c
+++ src/sha3.c
@@ -1,6 +1,22 @@
1 /*
2 ** Copyright (c) 2017 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains an implementation of SHA3 (Keccak) hashing.
19 */
20 #include "config.h"
21 #include "sha3.h"
22
23
+14 -14
--- src/xfer.c
+++ src/xfer.c
@@ -129,14 +129,14 @@
129129
130130
isPriv = pXfer->nextIsPrivate;
131131
pXfer->nextIsPrivate = 0;
132132
if( pXfer->nToken<3
133133
|| pXfer->nToken>4
134
- || !blob_is_uuid(&pXfer->aToken[1])
134
+ || !blob_is_hname(&pXfer->aToken[1])
135135
|| !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n)
136136
|| n<0
137
- || (pXfer->nToken==4 && !blob_is_uuid(&pXfer->aToken[2]))
137
+ || (pXfer->nToken==4 && !blob_is_hname(&pXfer->aToken[2]))
138138
){
139139
blob_appendf(&pXfer->err, "malformed file line");
140140
return;
141141
}
142142
blob_zero(&content);
@@ -248,15 +248,15 @@
248248
249249
isPriv = pXfer->nextIsPrivate;
250250
pXfer->nextIsPrivate = 0;
251251
if( pXfer->nToken<4
252252
|| pXfer->nToken>5
253
- || !blob_is_uuid(&pXfer->aToken[1])
253
+ || !blob_is_hname(&pXfer->aToken[1])
254254
|| !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU)
255255
|| !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC)
256256
|| szC<0 || szU<0
257
- || (pXfer->nToken==5 && !blob_is_uuid(&pXfer->aToken[2]))
257
+ || (pXfer->nToken==5 && !blob_is_hname(&pXfer->aToken[2]))
258258
){
259259
blob_appendf(&pXfer->err, "malformed cfile line");
260260
return;
261261
}
262262
if( isPriv && !g.perm.Private ){
@@ -321,11 +321,11 @@
321321
322322
pHash = &pXfer->aToken[3];
323323
if( pXfer->nToken==5
324324
|| !blob_is_filename(&pXfer->aToken[1])
325325
|| !blob_is_int64(&pXfer->aToken[2], &mtime)
326
- || (!blob_eq(pHash,"-") && !blob_is_uuid(pHash))
326
+ || (!blob_eq(pHash,"-") && !blob_is_hname(pHash))
327327
|| !blob_is_int(&pXfer->aToken[4], &sz)
328328
|| !blob_is_int(&pXfer->aToken[5], &flags)
329329
){
330330
blob_appendf(&pXfer->err, "malformed uvfile line");
331331
return;
@@ -1260,11 +1260,11 @@
12601260
**
12611261
** Client is requesting a file. Send it.
12621262
*/
12631263
if( blob_eq(&xfer.aToken[0], "gimme")
12641264
&& xfer.nToken==2
1265
- && blob_is_uuid(&xfer.aToken[1])
1265
+ && blob_is_hname(&xfer.aToken[1])
12661266
){
12671267
nGimme++;
12681268
if( isPull ){
12691269
int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
12701270
if( rid ){
@@ -1289,11 +1289,11 @@
12891289
** Client announces that it has a particular file. If the ISPRIVATE
12901290
** argument exists and is non-zero, then the file is a private file.
12911291
*/
12921292
if( xfer.nToken>=2
12931293
&& blob_eq(&xfer.aToken[0], "igot")
1294
- && blob_is_uuid(&xfer.aToken[1])
1294
+ && blob_is_hname(&xfer.aToken[1])
12951295
){
12961296
if( isPush ){
12971297
if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){
12981298
rid_from_uuid(&xfer.aToken[1], 1, 0);
12991299
}else if( g.perm.Private ){
@@ -1311,12 +1311,12 @@
13111311
** The client wants either send or receive. The server should
13121312
** verify that the project code matches.
13131313
*/
13141314
if( xfer.nToken==3
13151315
&& (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
1316
- && blob_is_uuid(&xfer.aToken[1])
1317
- && blob_is_uuid(&xfer.aToken[2])
1316
+ && blob_is_hname(&xfer.aToken[1])
1317
+ && blob_is_hname(&xfer.aToken[2])
13181318
){
13191319
const char *zPCode;
13201320
zPCode = db_get("project-code", 0);
13211321
if( zPCode==0 ){
13221322
fossil_panic("missing project code");
@@ -1542,11 +1542,11 @@
15421542
** The client wants to make sure that unversioned files are all synced.
15431543
** If the HASH does not match, send a complete catalog of
15441544
** "uvigot" cards.
15451545
*/
15461546
if( blob_eq(&xfer.aToken[1], "uv-hash")
1547
- && blob_is_uuid(&xfer.aToken[2])
1547
+ && blob_is_hname(&xfer.aToken[2])
15481548
){
15491549
if( !uvCatalogSent ){
15501550
if( g.perm.Read && g.perm.WrUnver ){
15511551
@ pragma uv-push-ok
15521552
send_unversioned_catalog(&xfer);
@@ -2070,11 +2070,11 @@
20702070
** that the server will also want to know all of the content files
20712071
** associated with the manifest and send those too.
20722072
*/
20732073
if( blob_eq(&xfer.aToken[0], "gimme")
20742074
&& xfer.nToken==2
2075
- && blob_is_uuid(&xfer.aToken[1])
2075
+ && blob_is_hname(&xfer.aToken[1])
20762076
){
20772077
if( syncFlags & SYNC_PUSH ){
20782078
int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
20792079
if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0);
20802080
}
@@ -2092,11 +2092,11 @@
20922092
** private. Pretend it does not exists if we are not pulling
20932093
** private files.
20942094
*/
20952095
if( xfer.nToken>=2
20962096
&& blob_eq(&xfer.aToken[0], "igot")
2097
- && blob_is_uuid(&xfer.aToken[1])
2097
+ && blob_is_hname(&xfer.aToken[1])
20982098
){
20992099
int rid;
21002100
int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1");
21012101
rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
21022102
if( rid>0 ){
@@ -2126,11 +2126,11 @@
21262126
if( xfer.nToken==5
21272127
&& blob_eq(&xfer.aToken[0], "uvigot")
21282128
&& blob_is_filename(&xfer.aToken[1])
21292129
&& blob_is_int64(&xfer.aToken[2], &mtime)
21302130
&& blob_is_int(&xfer.aToken[4], &size)
2131
- && (blob_eq(&xfer.aToken[3],"-") || blob_is_uuid(&xfer.aToken[3]))
2131
+ && (blob_eq(&xfer.aToken[3],"-") || blob_is_hname(&xfer.aToken[3]))
21322132
){
21332133
const char *zName = blob_str(&xfer.aToken[1]);
21342134
const char *zHash = blob_str(&xfer.aToken[3]);
21352135
int iStatus;
21362136
iStatus = unversioned_status(zName, mtime, zHash);
@@ -2188,11 +2188,11 @@
21882188
** the client what product to use for the new database.
21892189
*/
21902190
if( blob_eq(&xfer.aToken[0],"push")
21912191
&& xfer.nToken==3
21922192
&& (syncFlags & SYNC_CLONE)!=0
2193
- && blob_is_uuid(&xfer.aToken[2])
2193
+ && blob_is_hname(&xfer.aToken[2])
21942194
){
21952195
if( zPCode==0 ){
21962196
zPCode = mprintf("%b", &xfer.aToken[2]);
21972197
db_set("project-code", zPCode, 0);
21982198
}
21992199
--- src/xfer.c
+++ src/xfer.c
@@ -129,14 +129,14 @@
129
130 isPriv = pXfer->nextIsPrivate;
131 pXfer->nextIsPrivate = 0;
132 if( pXfer->nToken<3
133 || pXfer->nToken>4
134 || !blob_is_uuid(&pXfer->aToken[1])
135 || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n)
136 || n<0
137 || (pXfer->nToken==4 && !blob_is_uuid(&pXfer->aToken[2]))
138 ){
139 blob_appendf(&pXfer->err, "malformed file line");
140 return;
141 }
142 blob_zero(&content);
@@ -248,15 +248,15 @@
248
249 isPriv = pXfer->nextIsPrivate;
250 pXfer->nextIsPrivate = 0;
251 if( pXfer->nToken<4
252 || pXfer->nToken>5
253 || !blob_is_uuid(&pXfer->aToken[1])
254 || !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU)
255 || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC)
256 || szC<0 || szU<0
257 || (pXfer->nToken==5 && !blob_is_uuid(&pXfer->aToken[2]))
258 ){
259 blob_appendf(&pXfer->err, "malformed cfile line");
260 return;
261 }
262 if( isPriv && !g.perm.Private ){
@@ -321,11 +321,11 @@
321
322 pHash = &pXfer->aToken[3];
323 if( pXfer->nToken==5
324 || !blob_is_filename(&pXfer->aToken[1])
325 || !blob_is_int64(&pXfer->aToken[2], &mtime)
326 || (!blob_eq(pHash,"-") && !blob_is_uuid(pHash))
327 || !blob_is_int(&pXfer->aToken[4], &sz)
328 || !blob_is_int(&pXfer->aToken[5], &flags)
329 ){
330 blob_appendf(&pXfer->err, "malformed uvfile line");
331 return;
@@ -1260,11 +1260,11 @@
1260 **
1261 ** Client is requesting a file. Send it.
1262 */
1263 if( blob_eq(&xfer.aToken[0], "gimme")
1264 && xfer.nToken==2
1265 && blob_is_uuid(&xfer.aToken[1])
1266 ){
1267 nGimme++;
1268 if( isPull ){
1269 int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
1270 if( rid ){
@@ -1289,11 +1289,11 @@
1289 ** Client announces that it has a particular file. If the ISPRIVATE
1290 ** argument exists and is non-zero, then the file is a private file.
1291 */
1292 if( xfer.nToken>=2
1293 && blob_eq(&xfer.aToken[0], "igot")
1294 && blob_is_uuid(&xfer.aToken[1])
1295 ){
1296 if( isPush ){
1297 if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){
1298 rid_from_uuid(&xfer.aToken[1], 1, 0);
1299 }else if( g.perm.Private ){
@@ -1311,12 +1311,12 @@
1311 ** The client wants either send or receive. The server should
1312 ** verify that the project code matches.
1313 */
1314 if( xfer.nToken==3
1315 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
1316 && blob_is_uuid(&xfer.aToken[1])
1317 && blob_is_uuid(&xfer.aToken[2])
1318 ){
1319 const char *zPCode;
1320 zPCode = db_get("project-code", 0);
1321 if( zPCode==0 ){
1322 fossil_panic("missing project code");
@@ -1542,11 +1542,11 @@
1542 ** The client wants to make sure that unversioned files are all synced.
1543 ** If the HASH does not match, send a complete catalog of
1544 ** "uvigot" cards.
1545 */
1546 if( blob_eq(&xfer.aToken[1], "uv-hash")
1547 && blob_is_uuid(&xfer.aToken[2])
1548 ){
1549 if( !uvCatalogSent ){
1550 if( g.perm.Read && g.perm.WrUnver ){
1551 @ pragma uv-push-ok
1552 send_unversioned_catalog(&xfer);
@@ -2070,11 +2070,11 @@
2070 ** that the server will also want to know all of the content files
2071 ** associated with the manifest and send those too.
2072 */
2073 if( blob_eq(&xfer.aToken[0], "gimme")
2074 && xfer.nToken==2
2075 && blob_is_uuid(&xfer.aToken[1])
2076 ){
2077 if( syncFlags & SYNC_PUSH ){
2078 int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
2079 if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0);
2080 }
@@ -2092,11 +2092,11 @@
2092 ** private. Pretend it does not exists if we are not pulling
2093 ** private files.
2094 */
2095 if( xfer.nToken>=2
2096 && blob_eq(&xfer.aToken[0], "igot")
2097 && blob_is_uuid(&xfer.aToken[1])
2098 ){
2099 int rid;
2100 int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1");
2101 rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
2102 if( rid>0 ){
@@ -2126,11 +2126,11 @@
2126 if( xfer.nToken==5
2127 && blob_eq(&xfer.aToken[0], "uvigot")
2128 && blob_is_filename(&xfer.aToken[1])
2129 && blob_is_int64(&xfer.aToken[2], &mtime)
2130 && blob_is_int(&xfer.aToken[4], &size)
2131 && (blob_eq(&xfer.aToken[3],"-") || blob_is_uuid(&xfer.aToken[3]))
2132 ){
2133 const char *zName = blob_str(&xfer.aToken[1]);
2134 const char *zHash = blob_str(&xfer.aToken[3]);
2135 int iStatus;
2136 iStatus = unversioned_status(zName, mtime, zHash);
@@ -2188,11 +2188,11 @@
2188 ** the client what product to use for the new database.
2189 */
2190 if( blob_eq(&xfer.aToken[0],"push")
2191 && xfer.nToken==3
2192 && (syncFlags & SYNC_CLONE)!=0
2193 && blob_is_uuid(&xfer.aToken[2])
2194 ){
2195 if( zPCode==0 ){
2196 zPCode = mprintf("%b", &xfer.aToken[2]);
2197 db_set("project-code", zPCode, 0);
2198 }
2199
--- src/xfer.c
+++ src/xfer.c
@@ -129,14 +129,14 @@
129
130 isPriv = pXfer->nextIsPrivate;
131 pXfer->nextIsPrivate = 0;
132 if( pXfer->nToken<3
133 || pXfer->nToken>4
134 || !blob_is_hname(&pXfer->aToken[1])
135 || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n)
136 || n<0
137 || (pXfer->nToken==4 && !blob_is_hname(&pXfer->aToken[2]))
138 ){
139 blob_appendf(&pXfer->err, "malformed file line");
140 return;
141 }
142 blob_zero(&content);
@@ -248,15 +248,15 @@
248
249 isPriv = pXfer->nextIsPrivate;
250 pXfer->nextIsPrivate = 0;
251 if( pXfer->nToken<4
252 || pXfer->nToken>5
253 || !blob_is_hname(&pXfer->aToken[1])
254 || !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU)
255 || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC)
256 || szC<0 || szU<0
257 || (pXfer->nToken==5 && !blob_is_hname(&pXfer->aToken[2]))
258 ){
259 blob_appendf(&pXfer->err, "malformed cfile line");
260 return;
261 }
262 if( isPriv && !g.perm.Private ){
@@ -321,11 +321,11 @@
321
322 pHash = &pXfer->aToken[3];
323 if( pXfer->nToken==5
324 || !blob_is_filename(&pXfer->aToken[1])
325 || !blob_is_int64(&pXfer->aToken[2], &mtime)
326 || (!blob_eq(pHash,"-") && !blob_is_hname(pHash))
327 || !blob_is_int(&pXfer->aToken[4], &sz)
328 || !blob_is_int(&pXfer->aToken[5], &flags)
329 ){
330 blob_appendf(&pXfer->err, "malformed uvfile line");
331 return;
@@ -1260,11 +1260,11 @@
1260 **
1261 ** Client is requesting a file. Send it.
1262 */
1263 if( blob_eq(&xfer.aToken[0], "gimme")
1264 && xfer.nToken==2
1265 && blob_is_hname(&xfer.aToken[1])
1266 ){
1267 nGimme++;
1268 if( isPull ){
1269 int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
1270 if( rid ){
@@ -1289,11 +1289,11 @@
1289 ** Client announces that it has a particular file. If the ISPRIVATE
1290 ** argument exists and is non-zero, then the file is a private file.
1291 */
1292 if( xfer.nToken>=2
1293 && blob_eq(&xfer.aToken[0], "igot")
1294 && blob_is_hname(&xfer.aToken[1])
1295 ){
1296 if( isPush ){
1297 if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){
1298 rid_from_uuid(&xfer.aToken[1], 1, 0);
1299 }else if( g.perm.Private ){
@@ -1311,12 +1311,12 @@
1311 ** The client wants either send or receive. The server should
1312 ** verify that the project code matches.
1313 */
1314 if( xfer.nToken==3
1315 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
1316 && blob_is_hname(&xfer.aToken[1])
1317 && blob_is_hname(&xfer.aToken[2])
1318 ){
1319 const char *zPCode;
1320 zPCode = db_get("project-code", 0);
1321 if( zPCode==0 ){
1322 fossil_panic("missing project code");
@@ -1542,11 +1542,11 @@
1542 ** The client wants to make sure that unversioned files are all synced.
1543 ** If the HASH does not match, send a complete catalog of
1544 ** "uvigot" cards.
1545 */
1546 if( blob_eq(&xfer.aToken[1], "uv-hash")
1547 && blob_is_hname(&xfer.aToken[2])
1548 ){
1549 if( !uvCatalogSent ){
1550 if( g.perm.Read && g.perm.WrUnver ){
1551 @ pragma uv-push-ok
1552 send_unversioned_catalog(&xfer);
@@ -2070,11 +2070,11 @@
2070 ** that the server will also want to know all of the content files
2071 ** associated with the manifest and send those too.
2072 */
2073 if( blob_eq(&xfer.aToken[0], "gimme")
2074 && xfer.nToken==2
2075 && blob_is_hname(&xfer.aToken[1])
2076 ){
2077 if( syncFlags & SYNC_PUSH ){
2078 int rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
2079 if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0);
2080 }
@@ -2092,11 +2092,11 @@
2092 ** private. Pretend it does not exists if we are not pulling
2093 ** private files.
2094 */
2095 if( xfer.nToken>=2
2096 && blob_eq(&xfer.aToken[0], "igot")
2097 && blob_is_hname(&xfer.aToken[1])
2098 ){
2099 int rid;
2100 int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1");
2101 rid = rid_from_uuid(&xfer.aToken[1], 0, 0);
2102 if( rid>0 ){
@@ -2126,11 +2126,11 @@
2126 if( xfer.nToken==5
2127 && blob_eq(&xfer.aToken[0], "uvigot")
2128 && blob_is_filename(&xfer.aToken[1])
2129 && blob_is_int64(&xfer.aToken[2], &mtime)
2130 && blob_is_int(&xfer.aToken[4], &size)
2131 && (blob_eq(&xfer.aToken[3],"-") || blob_is_hname(&xfer.aToken[3]))
2132 ){
2133 const char *zName = blob_str(&xfer.aToken[1]);
2134 const char *zHash = blob_str(&xfer.aToken[3]);
2135 int iStatus;
2136 iStatus = unversioned_status(zName, mtime, zHash);
@@ -2188,11 +2188,11 @@
2188 ** the client what product to use for the new database.
2189 */
2190 if( blob_eq(&xfer.aToken[0],"push")
2191 && xfer.nToken==3
2192 && (syncFlags & SYNC_CLONE)!=0
2193 && blob_is_hname(&xfer.aToken[2])
2194 ){
2195 if( zPCode==0 ){
2196 zPCode = mprintf("%b", &xfer.aToken[2]);
2197 db_set("project-code", zPCode, 0);
2198 }
2199
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
2828
2929
SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
33
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
33
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c hname_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
35
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
35
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\hname$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3636
3737
3838
RC=$(DMDIR)\bin\rcc
3939
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
4040
@@ -49,11 +49,11 @@
4949
5050
$(OBJDIR)\fossil.res: $B\win\fossil.rc
5151
$(RC) $(RCFLAGS) -o$@ $**
5252
5353
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54
- +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
54
+ +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip hname http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5555
+echo fossil >> $@
5656
+echo fossil >> $@
5757
+echo $(LIBS) >> $@
5858
+echo. >> $@
5959
+echo fossil >> $@
@@ -356,10 +356,16 @@
356356
$(OBJDIR)\gzip$O : gzip_.c gzip.h
357357
$(TCC) -o$@ -c gzip_.c
358358
359359
gzip_.c : $(SRCDIR)\gzip.c
360360
+translate$E $** > $@
361
+
362
+$(OBJDIR)\hname$O : hname_.c hname.h
363
+ $(TCC) -o$@ -c hname_.c
364
+
365
+hname_.c : $(SRCDIR)\hname.c
366
+ +translate$E $** > $@
361367
362368
$(OBJDIR)\http$O : http_.c http.h
363369
$(TCC) -o$@ -c http_.c
364370
365371
http_.c : $(SRCDIR)\http.c
@@ -862,7 +868,7 @@
862868
863869
zip_.c : $(SRCDIR)\zip.c
864870
+translate$E $** > $@
865871
866872
headers: makeheaders$E page_index.h builtin_data.h VERSION.h
867
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
873
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h hname_.c:hname.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
868874
@copy /Y nul: headers
869875
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -356,10 +356,16 @@
356 $(OBJDIR)\gzip$O : gzip_.c gzip.h
357 $(TCC) -o$@ -c gzip_.c
358
359 gzip_.c : $(SRCDIR)\gzip.c
360 +translate$E $** > $@
 
 
 
 
 
 
361
362 $(OBJDIR)\http$O : http_.c http.h
363 $(TCC) -o$@ -c http_.c
364
365 http_.c : $(SRCDIR)\http.c
@@ -862,7 +868,7 @@
862
863 zip_.c : $(SRCDIR)\zip.c
864 +translate$E $** > $@
865
866 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
867 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
868 @copy /Y nul: headers
869
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c hname_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\hname$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip hname http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -356,10 +356,16 @@
356 $(OBJDIR)\gzip$O : gzip_.c gzip.h
357 $(TCC) -o$@ -c gzip_.c
358
359 gzip_.c : $(SRCDIR)\gzip.c
360 +translate$E $** > $@
361
362 $(OBJDIR)\hname$O : hname_.c hname.h
363 $(TCC) -o$@ -c hname_.c
364
365 hname_.c : $(SRCDIR)\hname.c
366 +translate$E $** > $@
367
368 $(OBJDIR)\http$O : http_.c http.h
369 $(TCC) -o$@ -c http_.c
370
371 http_.c : $(SRCDIR)\http.c
@@ -862,7 +868,7 @@
868
869 zip_.c : $(SRCDIR)\zip.c
870 +translate$E $** > $@
871
872 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
873 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h hname_.c:hname.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
874 @copy /Y nul: headers
875
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -461,10 +461,11 @@
461461
$(SRCDIR)/fshell.c \
462462
$(SRCDIR)/fusefs.c \
463463
$(SRCDIR)/glob.c \
464464
$(SRCDIR)/graph.c \
465465
$(SRCDIR)/gzip.c \
466
+ $(SRCDIR)/hname.c \
466467
$(SRCDIR)/http.c \
467468
$(SRCDIR)/http_socket.c \
468469
$(SRCDIR)/http_ssl.c \
469470
$(SRCDIR)/http_transport.c \
470471
$(SRCDIR)/import.c \
@@ -637,10 +638,11 @@
637638
$(OBJDIR)/fshell_.c \
638639
$(OBJDIR)/fusefs_.c \
639640
$(OBJDIR)/glob_.c \
640641
$(OBJDIR)/graph_.c \
641642
$(OBJDIR)/gzip_.c \
643
+ $(OBJDIR)/hname_.c \
642644
$(OBJDIR)/http_.c \
643645
$(OBJDIR)/http_socket_.c \
644646
$(OBJDIR)/http_ssl_.c \
645647
$(OBJDIR)/http_transport_.c \
646648
$(OBJDIR)/import_.c \
@@ -762,10 +764,11 @@
762764
$(OBJDIR)/fshell.o \
763765
$(OBJDIR)/fusefs.o \
764766
$(OBJDIR)/glob.o \
765767
$(OBJDIR)/graph.o \
766768
$(OBJDIR)/gzip.o \
769
+ $(OBJDIR)/hname.o \
767770
$(OBJDIR)/http.o \
768771
$(OBJDIR)/http_socket.o \
769772
$(OBJDIR)/http_ssl.o \
770773
$(OBJDIR)/http_transport.o \
771774
$(OBJDIR)/import.o \
@@ -1098,10 +1101,11 @@
10981101
$(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
10991102
$(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
11001103
$(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
11011104
$(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
11021105
$(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
1106
+ $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \
11031107
$(OBJDIR)/http_.c:$(OBJDIR)/http.h \
11041108
$(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
11051109
$(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
11061110
$(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
11071111
$(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1502,10 +1506,18 @@
15021506
15031507
$(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
15041508
$(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
15051509
15061510
$(OBJDIR)/gzip.h: $(OBJDIR)/headers
1511
+
1512
+$(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(TRANSLATE)
1513
+ $(TRANSLATE) $(SRCDIR)/hname.c >$@
1514
+
1515
+$(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h
1516
+ $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c
1517
+
1518
+$(OBJDIR)/hname.h: $(OBJDIR)/headers
15071519
15081520
$(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE)
15091521
$(TRANSLATE) $(SRCDIR)/http.c >$@
15101522
15111523
$(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
15121524
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -461,10 +461,11 @@
461 $(SRCDIR)/fshell.c \
462 $(SRCDIR)/fusefs.c \
463 $(SRCDIR)/glob.c \
464 $(SRCDIR)/graph.c \
465 $(SRCDIR)/gzip.c \
 
466 $(SRCDIR)/http.c \
467 $(SRCDIR)/http_socket.c \
468 $(SRCDIR)/http_ssl.c \
469 $(SRCDIR)/http_transport.c \
470 $(SRCDIR)/import.c \
@@ -637,10 +638,11 @@
637 $(OBJDIR)/fshell_.c \
638 $(OBJDIR)/fusefs_.c \
639 $(OBJDIR)/glob_.c \
640 $(OBJDIR)/graph_.c \
641 $(OBJDIR)/gzip_.c \
 
642 $(OBJDIR)/http_.c \
643 $(OBJDIR)/http_socket_.c \
644 $(OBJDIR)/http_ssl_.c \
645 $(OBJDIR)/http_transport_.c \
646 $(OBJDIR)/import_.c \
@@ -762,10 +764,11 @@
762 $(OBJDIR)/fshell.o \
763 $(OBJDIR)/fusefs.o \
764 $(OBJDIR)/glob.o \
765 $(OBJDIR)/graph.o \
766 $(OBJDIR)/gzip.o \
 
767 $(OBJDIR)/http.o \
768 $(OBJDIR)/http_socket.o \
769 $(OBJDIR)/http_ssl.o \
770 $(OBJDIR)/http_transport.o \
771 $(OBJDIR)/import.o \
@@ -1098,10 +1101,11 @@
1098 $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
1099 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
1100 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
1101 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
1102 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
 
1103 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
1104 $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
1105 $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
1106 $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
1107 $(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1502,10 +1506,18 @@
1502
1503 $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
1504 $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
1505
1506 $(OBJDIR)/gzip.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1507
1508 $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE)
1509 $(TRANSLATE) $(SRCDIR)/http.c >$@
1510
1511 $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
1512
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -461,10 +461,11 @@
461 $(SRCDIR)/fshell.c \
462 $(SRCDIR)/fusefs.c \
463 $(SRCDIR)/glob.c \
464 $(SRCDIR)/graph.c \
465 $(SRCDIR)/gzip.c \
466 $(SRCDIR)/hname.c \
467 $(SRCDIR)/http.c \
468 $(SRCDIR)/http_socket.c \
469 $(SRCDIR)/http_ssl.c \
470 $(SRCDIR)/http_transport.c \
471 $(SRCDIR)/import.c \
@@ -637,10 +638,11 @@
638 $(OBJDIR)/fshell_.c \
639 $(OBJDIR)/fusefs_.c \
640 $(OBJDIR)/glob_.c \
641 $(OBJDIR)/graph_.c \
642 $(OBJDIR)/gzip_.c \
643 $(OBJDIR)/hname_.c \
644 $(OBJDIR)/http_.c \
645 $(OBJDIR)/http_socket_.c \
646 $(OBJDIR)/http_ssl_.c \
647 $(OBJDIR)/http_transport_.c \
648 $(OBJDIR)/import_.c \
@@ -762,10 +764,11 @@
764 $(OBJDIR)/fshell.o \
765 $(OBJDIR)/fusefs.o \
766 $(OBJDIR)/glob.o \
767 $(OBJDIR)/graph.o \
768 $(OBJDIR)/gzip.o \
769 $(OBJDIR)/hname.o \
770 $(OBJDIR)/http.o \
771 $(OBJDIR)/http_socket.o \
772 $(OBJDIR)/http_ssl.o \
773 $(OBJDIR)/http_transport.o \
774 $(OBJDIR)/import.o \
@@ -1098,10 +1101,11 @@
1101 $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \
1102 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
1103 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
1104 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
1105 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
1106 $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \
1107 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
1108 $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \
1109 $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \
1110 $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \
1111 $(OBJDIR)/import_.c:$(OBJDIR)/import.h \
@@ -1502,10 +1506,18 @@
1506
1507 $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h
1508 $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c
1509
1510 $(OBJDIR)/gzip.h: $(OBJDIR)/headers
1511
1512 $(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(TRANSLATE)
1513 $(TRANSLATE) $(SRCDIR)/hname.c >$@
1514
1515 $(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h
1516 $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c
1517
1518 $(OBJDIR)/hname.h: $(OBJDIR)/headers
1519
1520 $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE)
1521 $(TRANSLATE) $(SRCDIR)/http.c >$@
1522
1523 $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h
1524
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -386,10 +386,11 @@
386386
fshell_.c \
387387
fusefs_.c \
388388
glob_.c \
389389
graph_.c \
390390
gzip_.c \
391
+ hname_.c \
391392
http_.c \
392393
http_socket_.c \
393394
http_ssl_.c \
394395
http_transport_.c \
395396
import_.c \
@@ -561,10 +562,11 @@
561562
$(OX)\fshell$O \
562563
$(OX)\fusefs$O \
563564
$(OX)\glob$O \
564565
$(OX)\graph$O \
565566
$(OX)\gzip$O \
567
+ $(OX)\hname$O \
566568
$(OX)\http$O \
567569
$(OX)\http_socket$O \
568570
$(OX)\http_ssl$O \
569571
$(OX)\http_transport$O \
570572
$(OX)\import$O \
@@ -745,10 +747,11 @@
745747
echo $(OX)\fshell.obj >> $@
746748
echo $(OX)\fusefs.obj >> $@
747749
echo $(OX)\glob.obj >> $@
748750
echo $(OX)\graph.obj >> $@
749751
echo $(OX)\gzip.obj >> $@
752
+ echo $(OX)\hname.obj >> $@
750753
echo $(OX)\http.obj >> $@
751754
echo $(OX)\http_socket.obj >> $@
752755
echo $(OX)\http_ssl.obj >> $@
753756
echo $(OX)\http_transport.obj >> $@
754757
echo $(OX)\import.obj >> $@
@@ -1178,10 +1181,16 @@
11781181
$(OX)\gzip$O : gzip_.c gzip.h
11791182
$(TCC) /Fo$@ -c gzip_.c
11801183
11811184
gzip_.c : $(SRCDIR)\gzip.c
11821185
translate$E $** > $@
1186
+
1187
+$(OX)\hname$O : hname_.c hname.h
1188
+ $(TCC) /Fo$@ -c hname_.c
1189
+
1190
+hname_.c : $(SRCDIR)\hname.c
1191
+ translate$E $** > $@
11831192
11841193
$(OX)\http$O : http_.c http.h
11851194
$(TCC) /Fo$@ -c http_.c
11861195
11871196
http_.c : $(SRCDIR)\http.c
@@ -1726,10 +1735,11 @@
17261735
fshell_.c:fshell.h \
17271736
fusefs_.c:fusefs.h \
17281737
glob_.c:glob.h \
17291738
graph_.c:graph.h \
17301739
gzip_.c:gzip.h \
1740
+ hname_.c:hname.h \
17311741
http_.c:http.h \
17321742
http_socket_.c:http_socket.h \
17331743
http_ssl_.c:http_ssl.h \
17341744
http_transport_.c:http_transport.h \
17351745
import_.c:import.h \
17361746
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -386,10 +386,11 @@
386 fshell_.c \
387 fusefs_.c \
388 glob_.c \
389 graph_.c \
390 gzip_.c \
 
391 http_.c \
392 http_socket_.c \
393 http_ssl_.c \
394 http_transport_.c \
395 import_.c \
@@ -561,10 +562,11 @@
561 $(OX)\fshell$O \
562 $(OX)\fusefs$O \
563 $(OX)\glob$O \
564 $(OX)\graph$O \
565 $(OX)\gzip$O \
 
566 $(OX)\http$O \
567 $(OX)\http_socket$O \
568 $(OX)\http_ssl$O \
569 $(OX)\http_transport$O \
570 $(OX)\import$O \
@@ -745,10 +747,11 @@
745 echo $(OX)\fshell.obj >> $@
746 echo $(OX)\fusefs.obj >> $@
747 echo $(OX)\glob.obj >> $@
748 echo $(OX)\graph.obj >> $@
749 echo $(OX)\gzip.obj >> $@
 
750 echo $(OX)\http.obj >> $@
751 echo $(OX)\http_socket.obj >> $@
752 echo $(OX)\http_ssl.obj >> $@
753 echo $(OX)\http_transport.obj >> $@
754 echo $(OX)\import.obj >> $@
@@ -1178,10 +1181,16 @@
1178 $(OX)\gzip$O : gzip_.c gzip.h
1179 $(TCC) /Fo$@ -c gzip_.c
1180
1181 gzip_.c : $(SRCDIR)\gzip.c
1182 translate$E $** > $@
 
 
 
 
 
 
1183
1184 $(OX)\http$O : http_.c http.h
1185 $(TCC) /Fo$@ -c http_.c
1186
1187 http_.c : $(SRCDIR)\http.c
@@ -1726,10 +1735,11 @@
1726 fshell_.c:fshell.h \
1727 fusefs_.c:fusefs.h \
1728 glob_.c:glob.h \
1729 graph_.c:graph.h \
1730 gzip_.c:gzip.h \
 
1731 http_.c:http.h \
1732 http_socket_.c:http_socket.h \
1733 http_ssl_.c:http_ssl.h \
1734 http_transport_.c:http_transport.h \
1735 import_.c:import.h \
1736
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -386,10 +386,11 @@
386 fshell_.c \
387 fusefs_.c \
388 glob_.c \
389 graph_.c \
390 gzip_.c \
391 hname_.c \
392 http_.c \
393 http_socket_.c \
394 http_ssl_.c \
395 http_transport_.c \
396 import_.c \
@@ -561,10 +562,11 @@
562 $(OX)\fshell$O \
563 $(OX)\fusefs$O \
564 $(OX)\glob$O \
565 $(OX)\graph$O \
566 $(OX)\gzip$O \
567 $(OX)\hname$O \
568 $(OX)\http$O \
569 $(OX)\http_socket$O \
570 $(OX)\http_ssl$O \
571 $(OX)\http_transport$O \
572 $(OX)\import$O \
@@ -745,10 +747,11 @@
747 echo $(OX)\fshell.obj >> $@
748 echo $(OX)\fusefs.obj >> $@
749 echo $(OX)\glob.obj >> $@
750 echo $(OX)\graph.obj >> $@
751 echo $(OX)\gzip.obj >> $@
752 echo $(OX)\hname.obj >> $@
753 echo $(OX)\http.obj >> $@
754 echo $(OX)\http_socket.obj >> $@
755 echo $(OX)\http_ssl.obj >> $@
756 echo $(OX)\http_transport.obj >> $@
757 echo $(OX)\import.obj >> $@
@@ -1178,10 +1181,16 @@
1181 $(OX)\gzip$O : gzip_.c gzip.h
1182 $(TCC) /Fo$@ -c gzip_.c
1183
1184 gzip_.c : $(SRCDIR)\gzip.c
1185 translate$E $** > $@
1186
1187 $(OX)\hname$O : hname_.c hname.h
1188 $(TCC) /Fo$@ -c hname_.c
1189
1190 hname_.c : $(SRCDIR)\hname.c
1191 translate$E $** > $@
1192
1193 $(OX)\http$O : http_.c http.h
1194 $(TCC) /Fo$@ -c http_.c
1195
1196 http_.c : $(SRCDIR)\http.c
@@ -1726,10 +1735,11 @@
1735 fshell_.c:fshell.h \
1736 fusefs_.c:fusefs.h \
1737 glob_.c:glob.h \
1738 graph_.c:graph.h \
1739 gzip_.c:gzip.h \
1740 hname_.c:hname.h \
1741 http_.c:http.h \
1742 http_socket_.c:http_socket.h \
1743 http_ssl_.c:http_ssl.h \
1744 http_transport_.c:http_transport.h \
1745 import_.c:import.h \
1746

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button