Fossil SCM

Merge trunk. Eliminate need for special Makefile.Cygwin. Simplify handling of '\\?\' prefix: Only add it when necessary (calculated path>=260 chars).

jan.nijtmans 2013-12-16 10:57 win32-longpath merge
Commit 23b849cce52d18982c43e0d7ef2b865f2b0c03e1
D Makefile.Cygwin.in
-52
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1
-#!/usr/bin/make
2
-#
3
-# This is the top-level makefile for Fossil when the build is occurring
4
-# on the Cygwin platform.
5
-#
6
-#### The toplevel directory of the source tree. Fossil can be built
7
-# in a directory that is separate from the source tree. Just change
8
-# the following to point from the build directory to the src/ folder.
9
-#
10
-SRCDIR = @srcdir@/src
11
-
12
-#### The directory into which object code files should be written.
13
-# Having a "./" prefix in the value of this variable breaks our use of the
14
-# "makeheaders" tool when running make on the MinGW platform, apparently
15
-# due to some command line argument manipulation performed automatically
16
-# by the shell.
17
-#
18
-#
19
-OBJDIR = bld
20
-
21
-#### C Compiler and options for use in building executables that
22
-# will run on the platform that is doing the build. This is used
23
-# to compile code-generator programs as part of the build process.
24
-# See TCC below for the C compiler for building the finished binary.
25
-#
26
-BCC = @CC_FOR_BUILD@
27
-
28
-#### The suffix to add to final executable file. When cross-compiling
29
-# to windows, make this ".exe". Otherwise leave it blank.
30
-#
31
-E = @EXEEXT@
32
-
33
-TCC = @CC@
34
-
35
-#### Tcl shell for use in running the fossil testsuite. If you do not
36
-# care about testing the end result, this can be blank.
37
-#
38
-TCLSH = tclsh
39
-
40
-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41
-TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42
-INSTALLDIR =$(DESTDIR)@prefix@/bin
43
-USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44
-FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45
-FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46
-FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47
-SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48
-SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
-
50
-include $(SRCDIR)/main.mk
51
-
52
-dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1 #!/usr/bin/make
2 #
3 # This is the top-level makefile for Fossil when the build is occurring
4 # on the Cygwin platform.
5 #
6 #### The toplevel directory of the source tree. Fossil can be built
7 # in a directory that is separate from the source tree. Just change
8 # the following to point from the build directory to the src/ folder.
9 #
10 SRCDIR = @srcdir@/src
11
12 #### The directory into which object code files should be written.
13 # Having a "./" prefix in the value of this variable breaks our use of the
14 # "makeheaders" tool when running make on the MinGW platform, apparently
15 # due to some command line argument manipulation performed automatically
16 # by the shell.
17 #
18 #
19 OBJDIR = bld
20
21 #### C Compiler and options for use in building executables that
22 # will run on the platform that is doing the build. This is used
23 # to compile code-generator programs as part of the build process.
24 # See TCC below for the C compiler for building the finished binary.
25 #
26 BCC = @CC_FOR_BUILD@
27
28 #### The suffix to add to final executable file. When cross-compiling
29 # to windows, make this ".exe". Otherwise leave it blank.
30 #
31 E = @EXEEXT@
32
33 TCC = @CC@
34
35 #### Tcl shell for use in running the fossil testsuite. If you do not
36 # care about testing the end result, this can be blank.
37 #
38 TCLSH = tclsh
39
40 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41 TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42 INSTALLDIR =$(DESTDIR)@prefix@/bin
43 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44 FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45 FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46 FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47 SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48 SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
50 include $(SRCDIR)/main.mk
51
52 dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
D Makefile.Cygwin.in
-52
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1
-#!/usr/bin/make
2
-#
3
-# This is the top-level makefile for Fossil when the build is occurring
4
-# on the Cygwin platform.
5
-#
6
-#### The toplevel directory of the source tree. Fossil can be built
7
-# in a directory that is separate from the source tree. Just change
8
-# the following to point from the build directory to the src/ folder.
9
-#
10
-SRCDIR = @srcdir@/src
11
-
12
-#### The directory into which object code files should be written.
13
-# Having a "./" prefix in the value of this variable breaks our use of the
14
-# "makeheaders" tool when running make on the MinGW platform, apparently
15
-# due to some command line argument manipulation performed automatically
16
-# by the shell.
17
-#
18
-#
19
-OBJDIR = bld
20
-
21
-#### C Compiler and options for use in building executables that
22
-# will run on the platform that is doing the build. This is used
23
-# to compile code-generator programs as part of the build process.
24
-# See TCC below for the C compiler for building the finished binary.
25
-#
26
-BCC = @CC_FOR_BUILD@
27
-
28
-#### The suffix to add to final executable file. When cross-compiling
29
-# to windows, make this ".exe". Otherwise leave it blank.
30
-#
31
-E = @EXEEXT@
32
-
33
-TCC = @CC@
34
-
35
-#### Tcl shell for use in running the fossil testsuite. If you do not
36
-# care about testing the end result, this can be blank.
37
-#
38
-TCLSH = tclsh
39
-
40
-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41
-TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42
-INSTALLDIR =$(DESTDIR)@prefix@/bin
43
-USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44
-FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45
-FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46
-FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47
-SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48
-SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
-
50
-include $(SRCDIR)/main.mk
51
-
52
-dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
1 #!/usr/bin/make
2 #
3 # This is the top-level makefile for Fossil when the build is occurring
4 # on the Cygwin platform.
5 #
6 #### The toplevel directory of the source tree. Fossil can be built
7 # in a directory that is separate from the source tree. Just change
8 # the following to point from the build directory to the src/ folder.
9 #
10 SRCDIR = @srcdir@/src
11
12 #### The directory into which object code files should be written.
13 # Having a "./" prefix in the value of this variable breaks our use of the
14 # "makeheaders" tool when running make on the MinGW platform, apparently
15 # due to some command line argument manipulation performed automatically
16 # by the shell.
17 #
18 #
19 OBJDIR = bld
20
21 #### C Compiler and options for use in building executables that
22 # will run on the platform that is doing the build. This is used
23 # to compile code-generator programs as part of the build process.
24 # See TCC below for the C compiler for building the finished binary.
25 #
26 BCC = @CC_FOR_BUILD@
27
28 #### The suffix to add to final executable file. When cross-compiling
29 # to windows, make this ".exe". Otherwise leave it blank.
30 #
31 E = @EXEEXT@
32
33 TCC = @CC@
34
35 #### Tcl shell for use in running the fossil testsuite. If you do not
36 # care about testing the end result, this can be blank.
37 #
38 TCLSH = tclsh
39
40 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41 TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @
42 INSTALLDIR =$(DESTDIR)@prefix@/bin
43 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44 FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45 FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46 FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47 SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096
48 SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000
49
50 include $(SRCDIR)/main.mk
51
52 dis
--- a/Makefile.Cygwin.in
+++ b/Makefile.Cygwin.in
@@ -1,52 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-1
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257257
cc-check-function-in-lib getpass bsd
258258
}
259259
cc-check-function-in-lib dlopen dl
260260
261261
make-template Makefile.in
262
-make-template Makefile.Cygwin.in
263262
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264263
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
262 make-template Makefile.Cygwin.in
263 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
 
262 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
263
-1
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257257
cc-check-function-in-lib getpass bsd
258258
}
259259
cc-check-function-in-lib dlopen dl
260260
261261
make-template Makefile.in
262
-make-template Makefile.Cygwin.in
263262
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264263
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
262 make-template Makefile.Cygwin.in
263 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
264
--- auto.def
+++ auto.def
@@ -257,7 +257,6 @@
257 cc-check-function-in-lib getpass bsd
258 }
259 cc-check-function-in-lib dlopen dl
260
261 make-template Makefile.in
 
262 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
263
+1 -2
--- src/clone.c
+++ src/clone.c
@@ -121,10 +121,11 @@
121121
int bPrivate = 0; /* Also clone private branches */
122122
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
123123
124124
if( find_option("private",0,0)!=0 ) bPrivate = SYNC_PRIVATE;
125125
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
126
+ zDefaultUser = find_option("admin-user","A",1);
126127
clone_ssh_find_options();
127128
url_proxy_options();
128129
if( g.argc < 4 ){
129130
usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
130131
}
@@ -131,12 +132,10 @@
131132
db_open_config(0);
132133
if( file_size(g.argv[3])>0 ){
133134
fossil_fatal("file already exists: %s", g.argv[3]);
134135
}
135136
136
- zDefaultUser = find_option("admin-user","A",1);
137
-
138137
url_parse(g.argv[2], urlFlags);
139138
if( zDefaultUser==0 && g.urlUser!=0 ) zDefaultUser = g.urlUser;
140139
if( g.urlIsFile ){
141140
file_copy(g.urlName, g.argv[3]);
142141
db_close(1);
143142
--- src/clone.c
+++ src/clone.c
@@ -121,10 +121,11 @@
121 int bPrivate = 0; /* Also clone private branches */
122 int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
123
124 if( find_option("private",0,0)!=0 ) bPrivate = SYNC_PRIVATE;
125 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
 
126 clone_ssh_find_options();
127 url_proxy_options();
128 if( g.argc < 4 ){
129 usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
130 }
@@ -131,12 +132,10 @@
131 db_open_config(0);
132 if( file_size(g.argv[3])>0 ){
133 fossil_fatal("file already exists: %s", g.argv[3]);
134 }
135
136 zDefaultUser = find_option("admin-user","A",1);
137
138 url_parse(g.argv[2], urlFlags);
139 if( zDefaultUser==0 && g.urlUser!=0 ) zDefaultUser = g.urlUser;
140 if( g.urlIsFile ){
141 file_copy(g.urlName, g.argv[3]);
142 db_close(1);
143
--- src/clone.c
+++ src/clone.c
@@ -121,10 +121,11 @@
121 int bPrivate = 0; /* Also clone private branches */
122 int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
123
124 if( find_option("private",0,0)!=0 ) bPrivate = SYNC_PRIVATE;
125 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
126 zDefaultUser = find_option("admin-user","A",1);
127 clone_ssh_find_options();
128 url_proxy_options();
129 if( g.argc < 4 ){
130 usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
131 }
@@ -131,12 +132,10 @@
132 db_open_config(0);
133 if( file_size(g.argv[3])>0 ){
134 fossil_fatal("file already exists: %s", g.argv[3]);
135 }
136
 
 
137 url_parse(g.argv[2], urlFlags);
138 if( zDefaultUser==0 && g.urlUser!=0 ) zDefaultUser = g.urlUser;
139 if( g.urlIsFile ){
140 file_copy(g.urlName, g.argv[3]);
141 db_close(1);
142
+12 -12
--- src/info.c
+++ src/info.c
@@ -1770,11 +1770,11 @@
17701770
if( modPending ){
17711771
@ <span class="modpending">*** Awaiting Moderator Approval ***</span>
17721772
}
17731773
@ <tr><th>Ticket:</th>
17741774
@ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a>
1775
- if(zTktTitle){
1775
+ if( zTktTitle ){
17761776
@<br>%h(zTktTitle)
17771777
}
17781778
@</td></tr>
17791779
@ <tr><th>Date:</th><td>
17801780
hyperlink_to_date(zDate, "</td></tr>");
@@ -2295,10 +2295,13 @@
22952295
@ <td valign="top">
22962296
@ <label><input type="checkbox" id="newtag" name="newtag"%s(zNewTagFlag) />
22972297
@ Add the following new tag name to this check-in:</label>
22982298
@ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)"
22992299
@ onkeyup="gebi('newtag').checked=!!this.value" />
2300
+ zBranchName = db_text(0, "SELECT value FROM tagxref, tag"
2301
+ " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
2302
+ " AND tagxref.tagid=%d", rid, TAG_BRANCH);
23002303
db_prepare(&q,
23012304
"SELECT tag.tagid, tagname, tagxref.value FROM tagxref, tag"
23022305
" WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
23032306
" ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"
23042307
" ELSE tagname END /*sort*/",
@@ -2305,22 +2308,19 @@
23052308
rid
23062309
);
23072310
while( db_step(&q)==SQLITE_ROW ){
23082311
int tagid = db_column_int(&q, 0);
23092312
const char *zTagName = db_column_text(&q, 1);
2310
- int isSpecialTag = strncmp(zTagName, "sym-", 4)!=0;
2313
+ int isSpecialTag = fossil_strncmp(zTagName, "sym-", 4)!=0;
23112314
char zLabel[30];
23122315
2313
- if (tagid == TAG_CLOSED){
2314
- fHasClosed = 1;
2315
- }else if (tagid == TAG_COMMENT){
2316
- continue;
2317
- }else if (tagid == TAG_BRANCH){
2318
- zBranchName = mprintf("%s", db_column_text(&q, 2));
2319
- continue;
2320
- }else if( !isSpecialTag && zBranchName &&
2321
- strcmp(&zTagName[4], zBranchName)==0){
2316
+ if( tagid == TAG_CLOSED ){
2317
+ fHasClosed = 1;
2318
+ }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){
2319
+ continue;
2320
+ }else if( !isSpecialTag && zTagName &&
2321
+ fossil_strcmp(&zTagName[4], zBranchName)==0){
23222322
continue;
23232323
}
23242324
sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid);
23252325
@ <br /><label>
23262326
if( P(zLabel) ){
@@ -2368,11 +2368,11 @@
23682368
@ as "closed" so that its leafs no longer appear on the "leaves" page
23692369
@ and are no longer labeled as a leaf "<b>Leaf</b>"</label>
23702370
@ </td></tr>
23712371
}
23722372
}
2373
- if(zBranchName) fossil_free(zBranchName);
2373
+ if( zBranchName ) fossil_free(zBranchName);
23742374
23752375
23762376
@ <tr><td colspan="2">
23772377
@ <input type="submit" name="preview" value="Preview" />
23782378
@ <input type="submit" name="apply" value="Apply Changes" />
23792379
--- src/info.c
+++ src/info.c
@@ -1770,11 +1770,11 @@
1770 if( modPending ){
1771 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
1772 }
1773 @ <tr><th>Ticket:</th>
1774 @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a>
1775 if(zTktTitle){
1776 @<br>%h(zTktTitle)
1777 }
1778 @</td></tr>
1779 @ <tr><th>Date:</th><td>
1780 hyperlink_to_date(zDate, "</td></tr>");
@@ -2295,10 +2295,13 @@
2295 @ <td valign="top">
2296 @ <label><input type="checkbox" id="newtag" name="newtag"%s(zNewTagFlag) />
2297 @ Add the following new tag name to this check-in:</label>
2298 @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)"
2299 @ onkeyup="gebi('newtag').checked=!!this.value" />
 
 
 
2300 db_prepare(&q,
2301 "SELECT tag.tagid, tagname, tagxref.value FROM tagxref, tag"
2302 " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
2303 " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"
2304 " ELSE tagname END /*sort*/",
@@ -2305,22 +2308,19 @@
2305 rid
2306 );
2307 while( db_step(&q)==SQLITE_ROW ){
2308 int tagid = db_column_int(&q, 0);
2309 const char *zTagName = db_column_text(&q, 1);
2310 int isSpecialTag = strncmp(zTagName, "sym-", 4)!=0;
2311 char zLabel[30];
2312
2313 if (tagid == TAG_CLOSED){
2314 fHasClosed = 1;
2315 }else if (tagid == TAG_COMMENT){
2316 continue;
2317 }else if (tagid == TAG_BRANCH){
2318 zBranchName = mprintf("%s", db_column_text(&q, 2));
2319 continue;
2320 }else if( !isSpecialTag && zBranchName &&
2321 strcmp(&zTagName[4], zBranchName)==0){
2322 continue;
2323 }
2324 sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid);
2325 @ <br /><label>
2326 if( P(zLabel) ){
@@ -2368,11 +2368,11 @@
2368 @ as "closed" so that its leafs no longer appear on the "leaves" page
2369 @ and are no longer labeled as a leaf "<b>Leaf</b>"</label>
2370 @ </td></tr>
2371 }
2372 }
2373 if(zBranchName) fossil_free(zBranchName);
2374
2375
2376 @ <tr><td colspan="2">
2377 @ <input type="submit" name="preview" value="Preview" />
2378 @ <input type="submit" name="apply" value="Apply Changes" />
2379
--- src/info.c
+++ src/info.c
@@ -1770,11 +1770,11 @@
1770 if( modPending ){
1771 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
1772 }
1773 @ <tr><th>Ticket:</th>
1774 @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a>
1775 if( zTktTitle ){
1776 @<br>%h(zTktTitle)
1777 }
1778 @</td></tr>
1779 @ <tr><th>Date:</th><td>
1780 hyperlink_to_date(zDate, "</td></tr>");
@@ -2295,10 +2295,13 @@
2295 @ <td valign="top">
2296 @ <label><input type="checkbox" id="newtag" name="newtag"%s(zNewTagFlag) />
2297 @ Add the following new tag name to this check-in:</label>
2298 @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)"
2299 @ onkeyup="gebi('newtag').checked=!!this.value" />
2300 zBranchName = db_text(0, "SELECT value FROM tagxref, tag"
2301 " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
2302 " AND tagxref.tagid=%d", rid, TAG_BRANCH);
2303 db_prepare(&q,
2304 "SELECT tag.tagid, tagname, tagxref.value FROM tagxref, tag"
2305 " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
2306 " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"
2307 " ELSE tagname END /*sort*/",
@@ -2305,22 +2308,19 @@
2308 rid
2309 );
2310 while( db_step(&q)==SQLITE_ROW ){
2311 int tagid = db_column_int(&q, 0);
2312 const char *zTagName = db_column_text(&q, 1);
2313 int isSpecialTag = fossil_strncmp(zTagName, "sym-", 4)!=0;
2314 char zLabel[30];
2315
2316 if( tagid == TAG_CLOSED ){
2317 fHasClosed = 1;
2318 }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){
2319 continue;
2320 }else if( !isSpecialTag && zTagName &&
2321 fossil_strcmp(&zTagName[4], zBranchName)==0){
 
 
 
2322 continue;
2323 }
2324 sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid);
2325 @ <br /><label>
2326 if( P(zLabel) ){
@@ -2368,11 +2368,11 @@
2368 @ as "closed" so that its leafs no longer appear on the "leaves" page
2369 @ and are no longer labeled as a leaf "<b>Leaf</b>"</label>
2370 @ </td></tr>
2371 }
2372 }
2373 if( zBranchName ) fossil_free(zBranchName);
2374
2375
2376 @ <tr><td colspan="2">
2377 @ <input type="submit" name="preview" value="Preview" />
2378 @ <input type="submit" name="apply" value="Apply Changes" />
2379
--- src/login.c
+++ src/login.c
@@ -398,10 +398,11 @@
398398
if( strncmp(zAgent, "Mozilla/", 8)==0 ){
399399
if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400400
if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401401
if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402402
if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1;
403
+ if( strglob("*Trident/[1-9]*;?rv:[1-9]*", zAgent) ) return 1; /* IE11+ */
403404
if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
404405
return 0;
405406
}
406407
if( strncmp(zAgent, "Opera/", 6)==0 ) return 1;
407408
if( strncmp(zAgent, "Safari/", 7)==0 ) return 1;
408409
--- src/login.c
+++ src/login.c
@@ -398,10 +398,11 @@
398 if( strncmp(zAgent, "Mozilla/", 8)==0 ){
399 if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400 if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401 if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402 if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1;
 
403 if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
404 return 0;
405 }
406 if( strncmp(zAgent, "Opera/", 6)==0 ) return 1;
407 if( strncmp(zAgent, "Safari/", 7)==0 ) return 1;
408
--- src/login.c
+++ src/login.c
@@ -398,10 +398,11 @@
398 if( strncmp(zAgent, "Mozilla/", 8)==0 ){
399 if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */
400 if( strglob("*Firefox/[1-9]*", zAgent) ) return 1;
401 if( strglob("*Chrome/[1-9]*", zAgent) ) return 1;
402 if( strglob("*(compatible;?MSIE?[1789]*", zAgent) ) return 1;
403 if( strglob("*Trident/[1-9]*;?rv:[1-9]*", zAgent) ) return 1; /* IE11+ */
404 if( strglob("*AppleWebKit/[1-9]*(KHTML*", zAgent) ) return 1;
405 return 0;
406 }
407 if( strncmp(zAgent, "Opera/", 6)==0 ) return 1;
408 if( strncmp(zAgent, "Safari/", 7)==0 ) return 1;
409
+44 -30
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
3080730807
#if SQLITE_OS_WIN /* This file is used for Windows only */
3080830808
3080930809
#ifdef __CYGWIN__
3081030810
# include <sys/cygwin.h>
3081130811
# include <errno.h> /* amalgamator: keep */
30812
+# include <limits.h> /* amalgamator: keep */
3081230813
#endif
3081330814
3081430815
/*
3081530816
** Include code that is common to all os_*.c files
3081630817
*/
@@ -31035,11 +31036,12 @@
3103531036
3103631037
/*
3103731038
** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
3103831039
** based on the sub-platform)?
3103931040
*/
31040
-#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI)
31041
+#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI) \
31042
+ && !defined(_WIN64) && !defined(__x86_64__) && !defined(__CYGWIN__)
3104131043
# define SQLITE_WIN32_HAS_ANSI
3104231044
#endif
3104331045
3104431046
/*
3104531047
** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
3111131113
/*
3111231114
** Maximum pathname length (in chars) for WinNT. This should normally be
3111331115
** UNICODE_STRING_MAX_CHARS.
3111431116
*/
3111531117
#ifndef SQLITE_WINNT_MAX_PATH_CHARS
31116
-# define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31118
+# ifdef __CYGWIN__
31119
+# define SQLITE_WINNT_MAX_PATH_CHARS (PATH_MAX)
31120
+# else
31121
+# define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31122
+# endif
3111731123
#endif
3111831124
3111931125
/*
3112031126
** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
3112131127
** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
3512535131
3512635132
/*
3512735133
** Convert a UTF-8 filename into whatever form the underlying
3512835134
** operating system wants filenames in. Space to hold the result
3512935135
** is obtained from malloc and must be freed by the calling
35130
-** function. When running on NT and zFilename is absolute, the
35131
-** resulting path is guaranteed to start with "\\?\".
35136
+** function. When running on NT,
35137
+** the resulting path >= 260 chars and zFilename is absolute,
35138
+** "\\?\" will be added in front the path: No Win32 API function
35139
+** accepts such long paths without this prefix.
3513235140
*/
3513335141
static void *winConvertFromUtf8Filename(const char *zFilename){
3513435142
void *zConverted = 0;
3513535143
if( osIsNT() ){
3513635144
int nChar;
@@ -35138,29 +35146,44 @@
3513835146
3513935147
nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
3514035148
if( nChar==0 ){
3514135149
return 0;
3514235150
}
35143
- zWideFilename = sqlite3MallocZero( (nChar*sizeof(zWideFilename[0]))+12 );
35151
+ if( nChar>=SQLITE_WIN32_MAX_PATH_CHARS ){
35152
+ /* No Win32 API functions can handle such long paths. Let's see if
35153
+ * we can do something about it. If not, just leave it as is. */
35154
+ if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35155
+ && zFilename[2]!='?' ){
35156
+ /* It's an UNC path, convert it to an extended UNC path. */
35157
+ zWideFilename = sqlite3MallocZero( (nChar+6)*sizeof(WCHAR) );
35158
+ if( !zWideFilename ){
35159
+ memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35160
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35161
+ zWideFilename+8, nChar);
35162
+ }
35163
+ return zWideFilename;
35164
+ }else if( winIsDriveLetterAndColon(zFilename)
35165
+ && winIsDirSep(zFilename[2]) ){
35166
+ /* It has a correct drive prefix, convert to extended form. */
35167
+ zWideFilename = sqlite3MallocZero( (nChar+4)*sizeof(WCHAR) );
35168
+ if( !zWideFilename ){
35169
+ memcpy(zWideFilename, L"\\\\?\\", 8);
35170
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35171
+ zWideFilename+4, nChar);
35172
+ zWideFilename[6] = '\\';
35173
+ }
35174
+ return zWideFilename;
35175
+ }
35176
+ /* Another form, e.g. relative path or maybe it already
35177
+ * has the '\\?\' prefix. Just leave it as-is. */
35178
+ }
35179
+ zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR) );
3514435180
if( zWideFilename==0 ){
3514535181
return 0;
3514635182
}
35147
- if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35148
- && zFilename[2]!='?' ){
35149
- memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35150
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35151
- zWideFilename+8, nChar);
35152
- }else if( winIsDriveLetterAndColon(zFilename)
35153
- && winIsDirSep(zFilename[2]) ){
35154
- memcpy(zWideFilename, L"\\\\?\\", 8);
35155
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35156
- zWideFilename+4, nChar);
35157
- zWideFilename[6] = '\\';
35158
- }else{
35159
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35160
- zWideFilename, nChar);
35161
- }
35183
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35184
+ zWideFilename, nChar);
3516235185
if( nChar==0 ){
3516335186
sqlite3_free(zWideFilename);
3516435187
zWideFilename = 0;
3516535188
}
3516635189
zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
3611836141
sqlite3_free(zTemp);
3611936142
return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
3612036143
"winFullPathname2", zRelative);
3612136144
}
3612236145
sqlite3_free(zConverted);
36123
- if( memcmp(zTemp, L"\\\\?\\", 8)==0 ){
36124
- if( memcmp(zTemp+4, L"UNC\\", 8) ){
36125
- zTemp[6] = '\\';
36126
- zOut = winUnicodeToUtf8(zTemp+6);
36127
- }else{
36128
- zOut = winUnicodeToUtf8(zTemp+4);
36129
- }
36130
- }else{
36131
- zOut = winUnicodeToUtf8(zTemp);
36132
- }
36146
+ zOut = winUnicodeToUtf8(zTemp);
3613336147
sqlite3_free(zTemp);
3613436148
}
3613536149
#ifdef SQLITE_WIN32_HAS_ANSI
3613636150
else{
3613736151
char *zTemp;
3613836152
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
30807 #if SQLITE_OS_WIN /* This file is used for Windows only */
30808
30809 #ifdef __CYGWIN__
30810 # include <sys/cygwin.h>
30811 # include <errno.h> /* amalgamator: keep */
 
30812 #endif
30813
30814 /*
30815 ** Include code that is common to all os_*.c files
30816 */
@@ -31035,11 +31036,12 @@
31035
31036 /*
31037 ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
31038 ** based on the sub-platform)?
31039 */
31040 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI)
 
31041 # define SQLITE_WIN32_HAS_ANSI
31042 #endif
31043
31044 /*
31045 ** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
31111 /*
31112 ** Maximum pathname length (in chars) for WinNT. This should normally be
31113 ** UNICODE_STRING_MAX_CHARS.
31114 */
31115 #ifndef SQLITE_WINNT_MAX_PATH_CHARS
31116 # define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
 
 
 
 
31117 #endif
31118
31119 /*
31120 ** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
31121 ** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
35125
35126 /*
35127 ** Convert a UTF-8 filename into whatever form the underlying
35128 ** operating system wants filenames in. Space to hold the result
35129 ** is obtained from malloc and must be freed by the calling
35130 ** function. When running on NT and zFilename is absolute, the
35131 ** resulting path is guaranteed to start with "\\?\".
 
 
35132 */
35133 static void *winConvertFromUtf8Filename(const char *zFilename){
35134 void *zConverted = 0;
35135 if( osIsNT() ){
35136 int nChar;
@@ -35138,29 +35146,44 @@
35138
35139 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
35140 if( nChar==0 ){
35141 return 0;
35142 }
35143 zWideFilename = sqlite3MallocZero( (nChar*sizeof(zWideFilename[0]))+12 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35144 if( zWideFilename==0 ){
35145 return 0;
35146 }
35147 if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35148 && zFilename[2]!='?' ){
35149 memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35150 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35151 zWideFilename+8, nChar);
35152 }else if( winIsDriveLetterAndColon(zFilename)
35153 && winIsDirSep(zFilename[2]) ){
35154 memcpy(zWideFilename, L"\\\\?\\", 8);
35155 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35156 zWideFilename+4, nChar);
35157 zWideFilename[6] = '\\';
35158 }else{
35159 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35160 zWideFilename, nChar);
35161 }
35162 if( nChar==0 ){
35163 sqlite3_free(zWideFilename);
35164 zWideFilename = 0;
35165 }
35166 zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
36118 sqlite3_free(zTemp);
36119 return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
36120 "winFullPathname2", zRelative);
36121 }
36122 sqlite3_free(zConverted);
36123 if( memcmp(zTemp, L"\\\\?\\", 8)==0 ){
36124 if( memcmp(zTemp+4, L"UNC\\", 8) ){
36125 zTemp[6] = '\\';
36126 zOut = winUnicodeToUtf8(zTemp+6);
36127 }else{
36128 zOut = winUnicodeToUtf8(zTemp+4);
36129 }
36130 }else{
36131 zOut = winUnicodeToUtf8(zTemp);
36132 }
36133 sqlite3_free(zTemp);
36134 }
36135 #ifdef SQLITE_WIN32_HAS_ANSI
36136 else{
36137 char *zTemp;
36138
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
30807 #if SQLITE_OS_WIN /* This file is used for Windows only */
30808
30809 #ifdef __CYGWIN__
30810 # include <sys/cygwin.h>
30811 # include <errno.h> /* amalgamator: keep */
30812 # include <limits.h> /* amalgamator: keep */
30813 #endif
30814
30815 /*
30816 ** Include code that is common to all os_*.c files
30817 */
@@ -31035,11 +31036,12 @@
31036
31037 /*
31038 ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
31039 ** based on the sub-platform)?
31040 */
31041 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI) \
31042 && !defined(_WIN64) && !defined(__x86_64__) && !defined(__CYGWIN__)
31043 # define SQLITE_WIN32_HAS_ANSI
31044 #endif
31045
31046 /*
31047 ** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
31113 /*
31114 ** Maximum pathname length (in chars) for WinNT. This should normally be
31115 ** UNICODE_STRING_MAX_CHARS.
31116 */
31117 #ifndef SQLITE_WINNT_MAX_PATH_CHARS
31118 # ifdef __CYGWIN__
31119 # define SQLITE_WINNT_MAX_PATH_CHARS (PATH_MAX)
31120 # else
31121 # define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31122 # endif
31123 #endif
31124
31125 /*
31126 ** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
31127 ** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
35131
35132 /*
35133 ** Convert a UTF-8 filename into whatever form the underlying
35134 ** operating system wants filenames in. Space to hold the result
35135 ** is obtained from malloc and must be freed by the calling
35136 ** function. When running on NT,
35137 ** the resulting path >= 260 chars and zFilename is absolute,
35138 ** "\\?\" will be added in front the path: No Win32 API function
35139 ** accepts such long paths without this prefix.
35140 */
35141 static void *winConvertFromUtf8Filename(const char *zFilename){
35142 void *zConverted = 0;
35143 if( osIsNT() ){
35144 int nChar;
@@ -35138,29 +35146,44 @@
35146
35147 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
35148 if( nChar==0 ){
35149 return 0;
35150 }
35151 if( nChar>=SQLITE_WIN32_MAX_PATH_CHARS ){
35152 /* No Win32 API functions can handle such long paths. Let's see if
35153 * we can do something about it. If not, just leave it as is. */
35154 if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35155 && zFilename[2]!='?' ){
35156 /* It's an UNC path, convert it to an extended UNC path. */
35157 zWideFilename = sqlite3MallocZero( (nChar+6)*sizeof(WCHAR) );
35158 if( !zWideFilename ){
35159 memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35160 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35161 zWideFilename+8, nChar);
35162 }
35163 return zWideFilename;
35164 }else if( winIsDriveLetterAndColon(zFilename)
35165 && winIsDirSep(zFilename[2]) ){
35166 /* It has a correct drive prefix, convert to extended form. */
35167 zWideFilename = sqlite3MallocZero( (nChar+4)*sizeof(WCHAR) );
35168 if( !zWideFilename ){
35169 memcpy(zWideFilename, L"\\\\?\\", 8);
35170 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35171 zWideFilename+4, nChar);
35172 zWideFilename[6] = '\\';
35173 }
35174 return zWideFilename;
35175 }
35176 /* Another form, e.g. relative path or maybe it already
35177 * has the '\\?\' prefix. Just leave it as-is. */
35178 }
35179 zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR) );
35180 if( zWideFilename==0 ){
35181 return 0;
35182 }
35183 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35184 zWideFilename, nChar);
 
 
 
 
 
 
 
 
 
 
 
 
 
35185 if( nChar==0 ){
35186 sqlite3_free(zWideFilename);
35187 zWideFilename = 0;
35188 }
35189 zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
36141 sqlite3_free(zTemp);
36142 return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
36143 "winFullPathname2", zRelative);
36144 }
36145 sqlite3_free(zConverted);
36146 zOut = winUnicodeToUtf8(zTemp);
 
 
 
 
 
 
 
 
 
36147 sqlite3_free(zTemp);
36148 }
36149 #ifdef SQLITE_WIN32_HAS_ANSI
36150 else{
36151 char *zTemp;
36152
+44 -30
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
3080730807
#if SQLITE_OS_WIN /* This file is used for Windows only */
3080830808
3080930809
#ifdef __CYGWIN__
3081030810
# include <sys/cygwin.h>
3081130811
# include <errno.h> /* amalgamator: keep */
30812
+# include <limits.h> /* amalgamator: keep */
3081230813
#endif
3081330814
3081430815
/*
3081530816
** Include code that is common to all os_*.c files
3081630817
*/
@@ -31035,11 +31036,12 @@
3103531036
3103631037
/*
3103731038
** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
3103831039
** based on the sub-platform)?
3103931040
*/
31040
-#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI)
31041
+#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI) \
31042
+ && !defined(_WIN64) && !defined(__x86_64__) && !defined(__CYGWIN__)
3104131043
# define SQLITE_WIN32_HAS_ANSI
3104231044
#endif
3104331045
3104431046
/*
3104531047
** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
3111131113
/*
3111231114
** Maximum pathname length (in chars) for WinNT. This should normally be
3111331115
** UNICODE_STRING_MAX_CHARS.
3111431116
*/
3111531117
#ifndef SQLITE_WINNT_MAX_PATH_CHARS
31116
-# define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31118
+# ifdef __CYGWIN__
31119
+# define SQLITE_WINNT_MAX_PATH_CHARS (PATH_MAX)
31120
+# else
31121
+# define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31122
+# endif
3111731123
#endif
3111831124
3111931125
/*
3112031126
** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
3112131127
** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
3512535131
3512635132
/*
3512735133
** Convert a UTF-8 filename into whatever form the underlying
3512835134
** operating system wants filenames in. Space to hold the result
3512935135
** is obtained from malloc and must be freed by the calling
35130
-** function. When running on NT and zFilename is absolute, the
35131
-** resulting path is guaranteed to start with "\\?\".
35136
+** function. When running on NT,
35137
+** the resulting path >= 260 chars and zFilename is absolute,
35138
+** "\\?\" will be added in front the path: No Win32 API function
35139
+** accepts such long paths without this prefix.
3513235140
*/
3513335141
static void *winConvertFromUtf8Filename(const char *zFilename){
3513435142
void *zConverted = 0;
3513535143
if( osIsNT() ){
3513635144
int nChar;
@@ -35138,29 +35146,44 @@
3513835146
3513935147
nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
3514035148
if( nChar==0 ){
3514135149
return 0;
3514235150
}
35143
- zWideFilename = sqlite3MallocZero( (nChar*sizeof(zWideFilename[0]))+12 );
35151
+ if( nChar>=SQLITE_WIN32_MAX_PATH_CHARS ){
35152
+ /* No Win32 API functions can handle such long paths. Let's see if
35153
+ * we can do something about it. If not, just leave it as is. */
35154
+ if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35155
+ && zFilename[2]!='?' ){
35156
+ /* It's an UNC path, convert it to an extended UNC path. */
35157
+ zWideFilename = sqlite3MallocZero( (nChar+6)*sizeof(WCHAR) );
35158
+ if( !zWideFilename ){
35159
+ memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35160
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35161
+ zWideFilename+8, nChar);
35162
+ }
35163
+ return zWideFilename;
35164
+ }else if( winIsDriveLetterAndColon(zFilename)
35165
+ && winIsDirSep(zFilename[2]) ){
35166
+ /* It has a correct drive prefix, convert to extended form. */
35167
+ zWideFilename = sqlite3MallocZero( (nChar+4)*sizeof(WCHAR) );
35168
+ if( !zWideFilename ){
35169
+ memcpy(zWideFilename, L"\\\\?\\", 8);
35170
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35171
+ zWideFilename+4, nChar);
35172
+ zWideFilename[6] = '\\';
35173
+ }
35174
+ return zWideFilename;
35175
+ }
35176
+ /* Another form, e.g. relative path or maybe it already
35177
+ * has the '\\?\' prefix. Just leave it as-is. */
35178
+ }
35179
+ zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR) );
3514435180
if( zWideFilename==0 ){
3514535181
return 0;
3514635182
}
35147
- if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35148
- && zFilename[2]!='?' ){
35149
- memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35150
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35151
- zWideFilename+8, nChar);
35152
- }else if( winIsDriveLetterAndColon(zFilename)
35153
- && winIsDirSep(zFilename[2]) ){
35154
- memcpy(zWideFilename, L"\\\\?\\", 8);
35155
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35156
- zWideFilename+4, nChar);
35157
- zWideFilename[6] = '\\';
35158
- }else{
35159
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35160
- zWideFilename, nChar);
35161
- }
35183
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35184
+ zWideFilename, nChar);
3516235185
if( nChar==0 ){
3516335186
sqlite3_free(zWideFilename);
3516435187
zWideFilename = 0;
3516535188
}
3516635189
zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
3611836141
sqlite3_free(zTemp);
3611936142
return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
3612036143
"winFullPathname2", zRelative);
3612136144
}
3612236145
sqlite3_free(zConverted);
36123
- if( memcmp(zTemp, L"\\\\?\\", 8)==0 ){
36124
- if( memcmp(zTemp+4, L"UNC\\", 8) ){
36125
- zTemp[6] = '\\';
36126
- zOut = winUnicodeToUtf8(zTemp+6);
36127
- }else{
36128
- zOut = winUnicodeToUtf8(zTemp+4);
36129
- }
36130
- }else{
36131
- zOut = winUnicodeToUtf8(zTemp);
36132
- }
36146
+ zOut = winUnicodeToUtf8(zTemp);
3613336147
sqlite3_free(zTemp);
3613436148
}
3613536149
#ifdef SQLITE_WIN32_HAS_ANSI
3613636150
else{
3613736151
char *zTemp;
3613836152
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
30807 #if SQLITE_OS_WIN /* This file is used for Windows only */
30808
30809 #ifdef __CYGWIN__
30810 # include <sys/cygwin.h>
30811 # include <errno.h> /* amalgamator: keep */
 
30812 #endif
30813
30814 /*
30815 ** Include code that is common to all os_*.c files
30816 */
@@ -31035,11 +31036,12 @@
31035
31036 /*
31037 ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
31038 ** based on the sub-platform)?
31039 */
31040 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI)
 
31041 # define SQLITE_WIN32_HAS_ANSI
31042 #endif
31043
31044 /*
31045 ** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
31111 /*
31112 ** Maximum pathname length (in chars) for WinNT. This should normally be
31113 ** UNICODE_STRING_MAX_CHARS.
31114 */
31115 #ifndef SQLITE_WINNT_MAX_PATH_CHARS
31116 # define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
 
 
 
 
31117 #endif
31118
31119 /*
31120 ** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
31121 ** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
35125
35126 /*
35127 ** Convert a UTF-8 filename into whatever form the underlying
35128 ** operating system wants filenames in. Space to hold the result
35129 ** is obtained from malloc and must be freed by the calling
35130 ** function. When running on NT and zFilename is absolute, the
35131 ** resulting path is guaranteed to start with "\\?\".
 
 
35132 */
35133 static void *winConvertFromUtf8Filename(const char *zFilename){
35134 void *zConverted = 0;
35135 if( osIsNT() ){
35136 int nChar;
@@ -35138,29 +35146,44 @@
35138
35139 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
35140 if( nChar==0 ){
35141 return 0;
35142 }
35143 zWideFilename = sqlite3MallocZero( (nChar*sizeof(zWideFilename[0]))+12 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35144 if( zWideFilename==0 ){
35145 return 0;
35146 }
35147 if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35148 && zFilename[2]!='?' ){
35149 memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35150 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35151 zWideFilename+8, nChar);
35152 }else if( winIsDriveLetterAndColon(zFilename)
35153 && winIsDirSep(zFilename[2]) ){
35154 memcpy(zWideFilename, L"\\\\?\\", 8);
35155 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35156 zWideFilename+4, nChar);
35157 zWideFilename[6] = '\\';
35158 }else{
35159 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35160 zWideFilename, nChar);
35161 }
35162 if( nChar==0 ){
35163 sqlite3_free(zWideFilename);
35164 zWideFilename = 0;
35165 }
35166 zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
36118 sqlite3_free(zTemp);
36119 return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
36120 "winFullPathname2", zRelative);
36121 }
36122 sqlite3_free(zConverted);
36123 if( memcmp(zTemp, L"\\\\?\\", 8)==0 ){
36124 if( memcmp(zTemp+4, L"UNC\\", 8) ){
36125 zTemp[6] = '\\';
36126 zOut = winUnicodeToUtf8(zTemp+6);
36127 }else{
36128 zOut = winUnicodeToUtf8(zTemp+4);
36129 }
36130 }else{
36131 zOut = winUnicodeToUtf8(zTemp);
36132 }
36133 sqlite3_free(zTemp);
36134 }
36135 #ifdef SQLITE_WIN32_HAS_ANSI
36136 else{
36137 char *zTemp;
36138
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -30807,10 +30807,11 @@
30807 #if SQLITE_OS_WIN /* This file is used for Windows only */
30808
30809 #ifdef __CYGWIN__
30810 # include <sys/cygwin.h>
30811 # include <errno.h> /* amalgamator: keep */
30812 # include <limits.h> /* amalgamator: keep */
30813 #endif
30814
30815 /*
30816 ** Include code that is common to all os_*.c files
30817 */
@@ -31035,11 +31036,12 @@
31036
31037 /*
31038 ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
31039 ** based on the sub-platform)?
31040 */
31041 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI) \
31042 && !defined(_WIN64) && !defined(__x86_64__) && !defined(__CYGWIN__)
31043 # define SQLITE_WIN32_HAS_ANSI
31044 #endif
31045
31046 /*
31047 ** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions
@@ -31111,11 +31113,15 @@
31113 /*
31114 ** Maximum pathname length (in chars) for WinNT. This should normally be
31115 ** UNICODE_STRING_MAX_CHARS.
31116 */
31117 #ifndef SQLITE_WINNT_MAX_PATH_CHARS
31118 # ifdef __CYGWIN__
31119 # define SQLITE_WINNT_MAX_PATH_CHARS (PATH_MAX)
31120 # else
31121 # define SQLITE_WINNT_MAX_PATH_CHARS (UNICODE_STRING_MAX_CHARS)
31122 # endif
31123 #endif
31124
31125 /*
31126 ** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
31127 ** characters, so we allocate 4 bytes per character assuming worst-case of
@@ -35125,12 +35131,14 @@
35131
35132 /*
35133 ** Convert a UTF-8 filename into whatever form the underlying
35134 ** operating system wants filenames in. Space to hold the result
35135 ** is obtained from malloc and must be freed by the calling
35136 ** function. When running on NT,
35137 ** the resulting path >= 260 chars and zFilename is absolute,
35138 ** "\\?\" will be added in front the path: No Win32 API function
35139 ** accepts such long paths without this prefix.
35140 */
35141 static void *winConvertFromUtf8Filename(const char *zFilename){
35142 void *zConverted = 0;
35143 if( osIsNT() ){
35144 int nChar;
@@ -35138,29 +35146,44 @@
35146
35147 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
35148 if( nChar==0 ){
35149 return 0;
35150 }
35151 if( nChar>=SQLITE_WIN32_MAX_PATH_CHARS ){
35152 /* No Win32 API functions can handle such long paths. Let's see if
35153 * we can do something about it. If not, just leave it as is. */
35154 if( winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
35155 && zFilename[2]!='?' ){
35156 /* It's an UNC path, convert it to an extended UNC path. */
35157 zWideFilename = sqlite3MallocZero( (nChar+6)*sizeof(WCHAR) );
35158 if( !zWideFilename ){
35159 memcpy(zWideFilename, L"\\\\?\\UNC\\", 16);
35160 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename+2, -1,
35161 zWideFilename+8, nChar);
35162 }
35163 return zWideFilename;
35164 }else if( winIsDriveLetterAndColon(zFilename)
35165 && winIsDirSep(zFilename[2]) ){
35166 /* It has a correct drive prefix, convert to extended form. */
35167 zWideFilename = sqlite3MallocZero( (nChar+4)*sizeof(WCHAR) );
35168 if( !zWideFilename ){
35169 memcpy(zWideFilename, L"\\\\?\\", 8);
35170 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35171 zWideFilename+4, nChar);
35172 zWideFilename[6] = '\\';
35173 }
35174 return zWideFilename;
35175 }
35176 /* Another form, e.g. relative path or maybe it already
35177 * has the '\\?\' prefix. Just leave it as-is. */
35178 }
35179 zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR) );
35180 if( zWideFilename==0 ){
35181 return 0;
35182 }
35183 nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
35184 zWideFilename, nChar);
 
 
 
 
 
 
 
 
 
 
 
 
 
35185 if( nChar==0 ){
35186 sqlite3_free(zWideFilename);
35187 zWideFilename = 0;
35188 }
35189 zConverted = zWideFilename;
@@ -36118,20 +36141,11 @@
36141 sqlite3_free(zTemp);
36142 return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
36143 "winFullPathname2", zRelative);
36144 }
36145 sqlite3_free(zConverted);
36146 zOut = winUnicodeToUtf8(zTemp);
 
 
 
 
 
 
 
 
 
36147 sqlite3_free(zTemp);
36148 }
36149 #ifdef SQLITE_WIN32_HAS_ANSI
36150 else{
36151 char *zTemp;
36152
--- src/timeline.c
+++ src/timeline.c
@@ -1121,10 +1121,11 @@
11211121
tmFlags |= TIMELINE_BRCOLOR;
11221122
url_add_parameter(&url, "brbg", 0);
11231123
}
11241124
if( P("unhide")!=0 ){
11251125
tmFlags |= TIMELINE_UNHIDE;
1126
+ url_add_parameter(&url, "unhide", 0);
11261127
}
11271128
if( P("ubg")!=0 ){
11281129
tmFlags |= TIMELINE_UCOLOR;
11291130
url_add_parameter(&url, "ubg", 0);
11301131
}
@@ -1497,10 +1498,13 @@
14971498
if( tmFlags & TIMELINE_FCHANGES ){
14981499
timeline_submenu(&url, "Hide Files", "v", 0, 0);
14991500
}else{
15001501
timeline_submenu(&url, "Show Files", "v", "", 0);
15011502
}
1503
+ if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1504
+ timeline_submenu(&url, "Unhide", "unhide", "", 0);
1505
+ }
15021506
}
15031507
}
15041508
}
15051509
if( P("showsql") ){
15061510
@ <blockquote>%h(blob_str(&sql))</blockquote>
15071511
--- src/timeline.c
+++ src/timeline.c
@@ -1121,10 +1121,11 @@
1121 tmFlags |= TIMELINE_BRCOLOR;
1122 url_add_parameter(&url, "brbg", 0);
1123 }
1124 if( P("unhide")!=0 ){
1125 tmFlags |= TIMELINE_UNHIDE;
 
1126 }
1127 if( P("ubg")!=0 ){
1128 tmFlags |= TIMELINE_UCOLOR;
1129 url_add_parameter(&url, "ubg", 0);
1130 }
@@ -1497,10 +1498,13 @@
1497 if( tmFlags & TIMELINE_FCHANGES ){
1498 timeline_submenu(&url, "Hide Files", "v", 0, 0);
1499 }else{
1500 timeline_submenu(&url, "Show Files", "v", "", 0);
1501 }
 
 
 
1502 }
1503 }
1504 }
1505 if( P("showsql") ){
1506 @ <blockquote>%h(blob_str(&sql))</blockquote>
1507
--- src/timeline.c
+++ src/timeline.c
@@ -1121,10 +1121,11 @@
1121 tmFlags |= TIMELINE_BRCOLOR;
1122 url_add_parameter(&url, "brbg", 0);
1123 }
1124 if( P("unhide")!=0 ){
1125 tmFlags |= TIMELINE_UNHIDE;
1126 url_add_parameter(&url, "unhide", 0);
1127 }
1128 if( P("ubg")!=0 ){
1129 tmFlags |= TIMELINE_UCOLOR;
1130 url_add_parameter(&url, "ubg", 0);
1131 }
@@ -1497,10 +1498,13 @@
1498 if( tmFlags & TIMELINE_FCHANGES ){
1499 timeline_submenu(&url, "Hide Files", "v", 0, 0);
1500 }else{
1501 timeline_submenu(&url, "Show Files", "v", "", 0);
1502 }
1503 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1504 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1505 }
1506 }
1507 }
1508 }
1509 if( P("showsql") ){
1510 @ <blockquote>%h(blob_str(&sql))</blockquote>
1511

Keyboard Shortcuts

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