Fossil SCM
Merge in latest load average enhancement (very nice), and other cleanup.
Commit
75406df20739b152effdd507f88a5f08cce1f008
Parent
d6259b7582d57f4…
38 files changed
+2
-2
+12
-12
+1
-1
+18
-1
+2
-2
+1
-1
+1
-2
+3
-3
+8
+67
-92
+16
-17
+2
-2
+6
-7
+1
+14
+3
-3
+3
-3
+11
-1
+1
+13
-1
+6
-3
+81
-24
+1
-1
+7
-3
+1
-1
+1
+4
-4
+12
-12
+1
+1
+1
-1
+1
-1
+10
-4
+12
+12
+10
+3
-4
+67
~
BUILD.txt
~
COPYRIGHT-BSD2.txt
~
Makefile.Cygwin.in
~
src/allrepo.c
~
src/attach.c
~
src/branch.c
~
src/captcha.c
~
src/checkin.c
~
src/db.c
~
src/diff.c
~
src/diffcmd.c
~
src/event.c
~
src/info.c
~
src/loadctrl.c
~
src/login.c
~
src/main.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/setup.c
~
src/shell.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/style.c
~
src/tag.c
~
src/tar.c
~
src/tkt.c
~
src/wiki.c
~
src/zip.c
~
test/tester.tcl
~
test/utf16be.txt
~
test/utf16le.txt
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
www/changes.wiki
~
www/server.wiki
+2
-2
| --- BUILD.txt | ||
| +++ BUILD.txt | ||
| @@ -22,11 +22,11 @@ | ||
| 22 | 22 | |
| 23 | 23 | cd win; nmake /f Makefile.msc |
| 24 | 24 | |
| 25 | 25 | If you have trouble, or you want to do something fancy, just look at |
| 26 | 26 | Makefile.classic. There are 6 configuration options that are all well |
| 27 | -commented. Instead of editing the Makefile.classic, consider copying | |
| 27 | +commented. Instead of editing the Makefile.classic, consider copying | |
| 28 | 28 | Makefile.classic to an alternative name such as "GNUMakefile", |
| 29 | 29 | "BSDMakefile", or "makefile" and editing the copy. |
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | BUILDING OUTSIDE THE SOURCE TREE |
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | Do not edit src/main.mk directly. Update src/makemake.tcl and |
| 62 | 62 | then rerun it. |
| 63 | 63 | |
| 64 | 64 | * The *.h header files are automatically generated using a program |
| 65 | 65 | called "makeheaders". Source code to the makeheaders program is |
| 66 | - found in src/makeheaders.c. Documentation is found in | |
| 66 | + found in src/makeheaders.c. Documentation is found in | |
| 67 | 67 | src/makeheaders.html. |
| 68 | 68 | |
| 69 | 69 | * Most *.c source files are preprocessed using a program called |
| 70 | 70 | "translate". The sources to translate are found in src/translate.c. |
| 71 | 71 | A header comment in src/translate.c explains in detail what it does. |
| 72 | 72 |
| --- BUILD.txt | |
| +++ BUILD.txt | |
| @@ -22,11 +22,11 @@ | |
| 22 | |
| 23 | cd win; nmake /f Makefile.msc |
| 24 | |
| 25 | If you have trouble, or you want to do something fancy, just look at |
| 26 | Makefile.classic. There are 6 configuration options that are all well |
| 27 | commented. Instead of editing the Makefile.classic, consider copying |
| 28 | Makefile.classic to an alternative name such as "GNUMakefile", |
| 29 | "BSDMakefile", or "makefile" and editing the copy. |
| 30 | |
| 31 | |
| 32 | BUILDING OUTSIDE THE SOURCE TREE |
| @@ -61,11 +61,11 @@ | |
| 61 | Do not edit src/main.mk directly. Update src/makemake.tcl and |
| 62 | then rerun it. |
| 63 | |
| 64 | * The *.h header files are automatically generated using a program |
| 65 | called "makeheaders". Source code to the makeheaders program is |
| 66 | found in src/makeheaders.c. Documentation is found in |
| 67 | src/makeheaders.html. |
| 68 | |
| 69 | * Most *.c source files are preprocessed using a program called |
| 70 | "translate". The sources to translate are found in src/translate.c. |
| 71 | A header comment in src/translate.c explains in detail what it does. |
| 72 |
| --- BUILD.txt | |
| +++ BUILD.txt | |
| @@ -22,11 +22,11 @@ | |
| 22 | |
| 23 | cd win; nmake /f Makefile.msc |
| 24 | |
| 25 | If you have trouble, or you want to do something fancy, just look at |
| 26 | Makefile.classic. There are 6 configuration options that are all well |
| 27 | commented. Instead of editing the Makefile.classic, consider copying |
| 28 | Makefile.classic to an alternative name such as "GNUMakefile", |
| 29 | "BSDMakefile", or "makefile" and editing the copy. |
| 30 | |
| 31 | |
| 32 | BUILDING OUTSIDE THE SOURCE TREE |
| @@ -61,11 +61,11 @@ | |
| 61 | Do not edit src/main.mk directly. Update src/makemake.tcl and |
| 62 | then rerun it. |
| 63 | |
| 64 | * The *.h header files are automatically generated using a program |
| 65 | called "makeheaders". Source code to the makeheaders program is |
| 66 | found in src/makeheaders.c. Documentation is found in |
| 67 | src/makeheaders.html. |
| 68 | |
| 69 | * Most *.c source files are preprocessed using a program called |
| 70 | "translate". The sources to translate are found in src/translate.c. |
| 71 | A header comment in src/translate.c explains in detail what it does. |
| 72 |
+12
-12
| --- COPYRIGHT-BSD2.txt | ||
| +++ COPYRIGHT-BSD2.txt | ||
| @@ -1,31 +1,31 @@ | ||
| 1 | 1 | Copyright 2007 D. Richard Hipp. All rights reserved. |
| 2 | 2 | |
| 3 | -Redistribution and use in source and binary forms, with or | |
| 4 | -without modification, are permitted provided that the | |
| 3 | +Redistribution and use in source and binary forms, with or | |
| 4 | +without modification, are permitted provided that the | |
| 5 | 5 | following conditions are met: |
| 6 | 6 | |
| 7 | 7 | 1. Redistributions of source code must retain the above |
| 8 | - copyright notice, this list of conditions and the | |
| 8 | + copyright notice, this list of conditions and the | |
| 9 | 9 | following disclaimer. |
| 10 | 10 | |
| 11 | 11 | 2. Redistributions in binary form must reproduce the above |
| 12 | 12 | copyright notice, this list of conditions and the |
| 13 | 13 | following disclaimer in the documentation and/or other |
| 14 | 14 | materials provided with the distribution. |
| 15 | 15 | |
| 16 | -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS | |
| 17 | -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 16 | +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS | |
| 17 | +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 18 | 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE | |
| 19 | +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE | |
| 20 | 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 22 | -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
| 21 | +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 22 | +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
| 23 | 23 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
| 25 | -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |
| 24 | +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
| 25 | +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |
| 26 | 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 | |
| 28 | -The views and conclusions contained in the software and documentation | |
| 29 | -are those of the authors and contributors and should not be interpreted | |
| 28 | +The views and conclusions contained in the software and documentation | |
| 29 | +are those of the authors and contributors and should not be interpreted | |
| 30 | 30 | as representing official policies, either expressed or implied, of anybody |
| 31 | 31 | else. |
| 32 | 32 |
| --- COPYRIGHT-BSD2.txt | |
| +++ COPYRIGHT-BSD2.txt | |
| @@ -1,31 +1,31 @@ | |
| 1 | Copyright 2007 D. Richard Hipp. All rights reserved. |
| 2 | |
| 3 | Redistribution and use in source and binary forms, with or |
| 4 | without modification, are permitted provided that the |
| 5 | following conditions are met: |
| 6 | |
| 7 | 1. Redistributions of source code must retain the above |
| 8 | copyright notice, this list of conditions and the |
| 9 | following disclaimer. |
| 10 | |
| 11 | 2. Redistributions in binary form must reproduce the above |
| 12 | copyright notice, this list of conditions and the |
| 13 | following disclaimer in the documentation and/or other |
| 14 | materials provided with the distribution. |
| 15 | |
| 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS |
| 17 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE |
| 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | The views and conclusions contained in the software and documentation |
| 29 | are those of the authors and contributors and should not be interpreted |
| 30 | as representing official policies, either expressed or implied, of anybody |
| 31 | else. |
| 32 |
| --- COPYRIGHT-BSD2.txt | |
| +++ COPYRIGHT-BSD2.txt | |
| @@ -1,31 +1,31 @@ | |
| 1 | Copyright 2007 D. Richard Hipp. All rights reserved. |
| 2 | |
| 3 | Redistribution and use in source and binary forms, with or |
| 4 | without modification, are permitted provided that the |
| 5 | following conditions are met: |
| 6 | |
| 7 | 1. Redistributions of source code must retain the above |
| 8 | copyright notice, this list of conditions and the |
| 9 | following disclaimer. |
| 10 | |
| 11 | 2. Redistributions in binary form must reproduce the above |
| 12 | copyright notice, this list of conditions and the |
| 13 | following disclaimer in the documentation and/or other |
| 14 | materials provided with the distribution. |
| 15 | |
| 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS |
| 17 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE |
| 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | The views and conclusions contained in the software and documentation |
| 29 | are those of the authors and contributors and should not be interpreted |
| 30 | as representing official policies, either expressed or implied, of anybody |
| 31 | else. |
| 32 |
+1
-1
| --- Makefile.Cygwin.in | ||
| +++ Makefile.Cygwin.in | ||
| @@ -36,11 +36,11 @@ | ||
| 36 | 36 | # care about testing the end result, this can be blank. |
| 37 | 37 | # |
| 38 | 38 | TCLSH = tclsh |
| 39 | 39 | |
| 40 | 40 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 41 | -TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H | |
| 41 | +TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE | |
| 42 | 42 | INSTALLDIR =$(DESTDIR)@prefix@/bin |
| 43 | 43 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 44 | 44 | FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 45 | 45 | FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ |
| 46 | 46 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ |
| 47 | 47 |
| --- Makefile.Cygwin.in | |
| +++ Makefile.Cygwin.in | |
| @@ -36,11 +36,11 @@ | |
| 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@ @CFLAGS@ -DHAVE_AUTOCONFIG_H |
| 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 |
| --- Makefile.Cygwin.in | |
| +++ Makefile.Cygwin.in | |
| @@ -36,11 +36,11 @@ | |
| 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@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE |
| 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 |
+18
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -65,10 +65,16 @@ | ||
| 65 | 65 | }else{ |
| 66 | 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | +static void collect_argv(Blob *pExtra, int iStart){ | |
| 71 | + int i; | |
| 72 | + for(i=iStart; i<g.argc; i++){ | |
| 73 | + blob_appendf(pExtra, " %s", g.argv[i]); | |
| 74 | + } | |
| 75 | +} | |
| 70 | 76 | |
| 71 | 77 | |
| 72 | 78 | /* |
| 73 | 79 | ** COMMAND: all |
| 74 | 80 | ** |
| @@ -118,10 +124,15 @@ | ||
| 118 | 124 | ** present, are passed along verbatim. The --force and |
| 119 | 125 | ** --randomize options are not supported. |
| 120 | 126 | ** |
| 121 | 127 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 122 | 128 | ** option is supported. |
| 129 | +** | |
| 130 | +** setting Run the "setting", "set", or "unset" commands on all | |
| 131 | +** set repositories. These command are particularly useful in | |
| 132 | +** unset conjunection with the "max-loadavg" setting which cannot | |
| 133 | +** otherwise be set globally. | |
| 123 | 134 | ** |
| 124 | 135 | ** Repositories are automatically added to the set of known repositories |
| 125 | 136 | ** when one of the following commands are run against the repository: |
| 126 | 137 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 127 | 138 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | ||
| 155 | 166 | } |
| 156 | 167 | n = strlen(g.argv[2]); |
| 157 | 168 | db_open_config(1); |
| 158 | 169 | blob_zero(&extra); |
| 159 | 170 | zCmd = g.argv[2]; |
| 160 | - if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin); | |
| 171 | + if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin); | |
| 161 | 172 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 162 | 173 | zCmd = "list"; |
| 163 | 174 | useCheckouts = find_option("ckout","c",0)!=0; |
| 164 | 175 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 165 | 176 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | ||
| 201 | 212 | collect_argument(&extra, "vacuum",0); |
| 202 | 213 | collect_argument(&extra, "deanalyze",0); |
| 203 | 214 | collect_argument(&extra, "analyze",0); |
| 204 | 215 | collect_argument(&extra, "wal",0); |
| 205 | 216 | collect_argument(&extra, "stats",0); |
| 217 | + }else if( strncmp(zCmd, "setting", n)==0 ){ | |
| 218 | + zCmd = "setting -R"; | |
| 219 | + collect_argv(&extra, 3); | |
| 220 | + }else if( strncmp(zCmd, "unset", n)==0 ){ | |
| 221 | + zCmd = "unset -R"; | |
| 222 | + collect_argv(&extra, 3); | |
| 206 | 223 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 207 | 224 | zCmd = "sync -autourl -R"; |
| 208 | 225 | collect_argument(&extra, "verbose","v"); |
| 209 | 226 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 210 | 227 | collect_argument(&extra, "parse", 0); |
| 211 | 228 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -65,10 +65,16 @@ | |
| 65 | }else{ |
| 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | |
| 72 | /* |
| 73 | ** COMMAND: all |
| 74 | ** |
| @@ -118,10 +124,15 @@ | |
| 118 | ** present, are passed along verbatim. The --force and |
| 119 | ** --randomize options are not supported. |
| 120 | ** |
| 121 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 122 | ** option is supported. |
| 123 | ** |
| 124 | ** Repositories are automatically added to the set of known repositories |
| 125 | ** when one of the following commands are run against the repository: |
| 126 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 127 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | |
| 155 | } |
| 156 | n = strlen(g.argv[2]); |
| 157 | db_open_config(1); |
| 158 | blob_zero(&extra); |
| 159 | zCmd = g.argv[2]; |
| 160 | if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin); |
| 161 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 162 | zCmd = "list"; |
| 163 | useCheckouts = find_option("ckout","c",0)!=0; |
| 164 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 165 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | |
| 201 | collect_argument(&extra, "vacuum",0); |
| 202 | collect_argument(&extra, "deanalyze",0); |
| 203 | collect_argument(&extra, "analyze",0); |
| 204 | collect_argument(&extra, "wal",0); |
| 205 | collect_argument(&extra, "stats",0); |
| 206 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 207 | zCmd = "sync -autourl -R"; |
| 208 | collect_argument(&extra, "verbose","v"); |
| 209 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 210 | collect_argument(&extra, "parse", 0); |
| 211 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -65,10 +65,16 @@ | |
| 65 | }else{ |
| 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | static void collect_argv(Blob *pExtra, int iStart){ |
| 71 | int i; |
| 72 | for(i=iStart; i<g.argc; i++){ |
| 73 | blob_appendf(pExtra, " %s", g.argv[i]); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | |
| 78 | /* |
| 79 | ** COMMAND: all |
| 80 | ** |
| @@ -118,10 +124,15 @@ | |
| 124 | ** present, are passed along verbatim. The --force and |
| 125 | ** --randomize options are not supported. |
| 126 | ** |
| 127 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 128 | ** option is supported. |
| 129 | ** |
| 130 | ** setting Run the "setting", "set", or "unset" commands on all |
| 131 | ** set repositories. These command are particularly useful in |
| 132 | ** unset conjunection with the "max-loadavg" setting which cannot |
| 133 | ** otherwise be set globally. |
| 134 | ** |
| 135 | ** Repositories are automatically added to the set of known repositories |
| 136 | ** when one of the following commands are run against the repository: |
| 137 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 138 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | |
| 166 | } |
| 167 | n = strlen(g.argv[2]); |
| 168 | db_open_config(1); |
| 169 | blob_zero(&extra); |
| 170 | zCmd = g.argv[2]; |
| 171 | if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin); |
| 172 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 173 | zCmd = "list"; |
| 174 | useCheckouts = find_option("ckout","c",0)!=0; |
| 175 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 176 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | |
| 212 | collect_argument(&extra, "vacuum",0); |
| 213 | collect_argument(&extra, "deanalyze",0); |
| 214 | collect_argument(&extra, "analyze",0); |
| 215 | collect_argument(&extra, "wal",0); |
| 216 | collect_argument(&extra, "stats",0); |
| 217 | }else if( strncmp(zCmd, "setting", n)==0 ){ |
| 218 | zCmd = "setting -R"; |
| 219 | collect_argv(&extra, 3); |
| 220 | }else if( strncmp(zCmd, "unset", n)==0 ){ |
| 221 | zCmd = "unset -R"; |
| 222 | collect_argv(&extra, 3); |
| 223 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 224 | zCmd = "sync -autourl -R"; |
| 225 | collect_argument(&extra, "verbose","v"); |
| 226 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 227 | collect_argument(&extra, "parse", 0); |
| 228 |
+2
-2
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | if( n>0 ){ |
| 310 | 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | 311 | } |
| 312 | 312 | zDate = date_in_standard_format("now"); |
| 313 | 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | - blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); | |
| 314 | + blob_appendf(&manifest, "U %F\n", login_name()); | |
| 315 | 315 | md5sum_blob(&manifest, &cksum); |
| 316 | 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | 317 | attach_put(&manifest, rid, needModerator); |
| 318 | 318 | assert( blob_is_reset(&manifest) ); |
| 319 | 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | ||
| 427 | 427 | zFile += n; |
| 428 | 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | 430 | zDate = date_in_standard_format("now"); |
| 431 | 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | - blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); | |
| 432 | + blob_appendf(&manifest, "U %F\n", login_name()); | |
| 433 | 433 | md5sum_blob(&manifest, &cksum); |
| 434 | 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | 435 | rid = content_put(&manifest); |
| 436 | 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | 437 | db_end_transaction(0); |
| 438 | 438 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( n>0 ){ |
| 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | } |
| 312 | zDate = date_in_standard_format("now"); |
| 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 315 | md5sum_blob(&manifest, &cksum); |
| 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | attach_put(&manifest, rid, needModerator); |
| 318 | assert( blob_is_reset(&manifest) ); |
| 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | |
| 427 | zFile += n; |
| 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | zDate = date_in_standard_format("now"); |
| 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 433 | md5sum_blob(&manifest, &cksum); |
| 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | rid = content_put(&manifest); |
| 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | db_end_transaction(0); |
| 438 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( n>0 ){ |
| 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | } |
| 312 | zDate = date_in_standard_format("now"); |
| 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | blob_appendf(&manifest, "U %F\n", login_name()); |
| 315 | md5sum_blob(&manifest, &cksum); |
| 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | attach_put(&manifest, rid, needModerator); |
| 318 | assert( blob_is_reset(&manifest) ); |
| 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | |
| 427 | zFile += n; |
| 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | zDate = date_in_standard_format("now"); |
| 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | blob_appendf(&manifest, "U %F\n", login_name()); |
| 433 | md5sum_blob(&manifest, &cksum); |
| 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | rid = content_put(&manifest); |
| 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | db_end_transaction(0); |
| 438 |
+1
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -134,11 +134,11 @@ | ||
| 134 | 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | 136 | } |
| 137 | 137 | db_finalize(&q); |
| 138 | 138 | |
| 139 | - blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); | |
| 139 | + blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); | |
| 140 | 140 | md5sum_blob(&branch, &mcksum); |
| 141 | 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | 143 | Blob ans; |
| 144 | 144 | char cReply; |
| 145 | 145 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -134,11 +134,11 @@ | |
| 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | } |
| 137 | db_finalize(&q); |
| 138 | |
| 139 | blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 140 | md5sum_blob(&branch, &mcksum); |
| 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | Blob ans; |
| 144 | char cReply; |
| 145 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -134,11 +134,11 @@ | |
| 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | } |
| 137 | db_finalize(&q); |
| 138 | |
| 139 | blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); |
| 140 | md5sum_blob(&branch, &mcksum); |
| 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | Blob ans; |
| 144 | char cReply; |
| 145 |
+1
-2
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -482,12 +482,11 @@ | ||
| 482 | 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | 484 | ** defaults to true. |
| 485 | 485 | */ |
| 486 | 486 | int captcha_needed(void){ |
| 487 | - if( g.zLogin!=0 ) return 0; | |
| 488 | - return db_get_boolean("require-captcha", 1); | |
| 487 | + return login_is_nobody() && db_get_boolean("require-captcha", 1); | |
| 489 | 488 | } |
| 490 | 489 | |
| 491 | 490 | /* |
| 492 | 491 | ** If a captcha is required but the correct captcha code is not supplied |
| 493 | 492 | ** in the query parameters, then return false (0). |
| 494 | 493 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -482,12 +482,11 @@ | |
| 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | ** defaults to true. |
| 485 | */ |
| 486 | int captcha_needed(void){ |
| 487 | if( g.zLogin!=0 ) return 0; |
| 488 | return db_get_boolean("require-captcha", 1); |
| 489 | } |
| 490 | |
| 491 | /* |
| 492 | ** If a captcha is required but the correct captcha code is not supplied |
| 493 | ** in the query parameters, then return false (0). |
| 494 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -482,12 +482,11 @@ | |
| 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | ** defaults to true. |
| 485 | */ |
| 486 | int captcha_needed(void){ |
| 487 | return login_is_nobody() && db_get_boolean("require-captcha", 1); |
| 488 | } |
| 489 | |
| 490 | /* |
| 491 | ** If a captcha is required but the correct captcha code is not supplied |
| 492 | ** in the query parameters, then return false (0). |
| 493 |
+3
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -801,11 +801,11 @@ | ||
| 801 | 801 | blob_append(&prompt, |
| 802 | 802 | "\n" |
| 803 | 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | 804 | "#\n", -1 |
| 805 | 805 | ); |
| 806 | - blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); | |
| 806 | + blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 807 | 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | 809 | }else{ |
| 810 | 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | ||
| 963 | 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | - const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ | |
| 968 | + const char *zUserOvrd; /* User override. If 0 then use login_name() */ | |
| 969 | 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | 973 | }; |
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | 1191 | } |
| 1192 | 1192 | db_finalize(&q); |
| 1193 | 1193 | } |
| 1194 | - blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); | |
| 1194 | + blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 1195 | 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | 1198 | } |
| 1199 | 1199 | |
| 1200 | 1200 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -801,11 +801,11 @@ | |
| 801 | blob_append(&prompt, |
| 802 | "\n" |
| 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | "#\n", -1 |
| 805 | ); |
| 806 | blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); |
| 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | }else{ |
| 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | |
| 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ |
| 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | }; |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | } |
| 1192 | db_finalize(&q); |
| 1193 | } |
| 1194 | blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); |
| 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | } |
| 1199 | |
| 1200 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -801,11 +801,11 @@ | |
| 801 | blob_append(&prompt, |
| 802 | "\n" |
| 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | "#\n", -1 |
| 805 | ); |
| 806 | blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | }else{ |
| 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | |
| 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | const char *zUserOvrd; /* User override. If 0 then use login_name() */ |
| 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | }; |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | } |
| 1192 | db_finalize(&q); |
| 1193 | } |
| 1194 | blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | } |
| 1199 | |
| 1200 |
M
src/db.c
+8
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2147,10 +2147,11 @@ | ||
| 2147 | 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | + { "max-loadavg", 0, 25, 0, 0, "0.0" }, | |
| 2152 | 2153 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2153 | 2154 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2154 | 2155 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2155 | 2156 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2156 | 2157 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | ||
| 2296 | 2297 | ** main-branch The primary branch for the project. Default: trunk |
| 2297 | 2298 | ** |
| 2298 | 2299 | ** manifest If enabled, automatically create files "manifest" and |
| 2299 | 2300 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2300 | 2301 | ** Fossil repositories both require this. Default: off. |
| 2302 | +** | |
| 2303 | +** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame) | |
| 2304 | +** are disallowed if the system load average goes above this | |
| 2305 | +** value. "0.0" means no limit. This only works on unix. | |
| 2306 | +** Only local settings of this value make a difference since | |
| 2307 | +** when running as a web-server, Fossil does not open the | |
| 2308 | +** global configuration database. | |
| 2301 | 2309 | ** |
| 2302 | 2310 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2303 | 2311 | ** default is 250000 bytes. |
| 2304 | 2312 | ** |
| 2305 | 2313 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2306 | 2314 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2147,10 +2147,11 @@ | |
| 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2153 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2154 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2155 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2156 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | |
| 2296 | ** main-branch The primary branch for the project. Default: trunk |
| 2297 | ** |
| 2298 | ** manifest If enabled, automatically create files "manifest" and |
| 2299 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2300 | ** Fossil repositories both require this. Default: off. |
| 2301 | ** |
| 2302 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2303 | ** default is 250000 bytes. |
| 2304 | ** |
| 2305 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2306 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2147,10 +2147,11 @@ | |
| 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | { "max-loadavg", 0, 25, 0, 0, "0.0" }, |
| 2153 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2154 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2155 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2156 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2157 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | |
| 2297 | ** main-branch The primary branch for the project. Default: trunk |
| 2298 | ** |
| 2299 | ** manifest If enabled, automatically create files "manifest" and |
| 2300 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2301 | ** Fossil repositories both require this. Default: off. |
| 2302 | ** |
| 2303 | ** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame) |
| 2304 | ** are disallowed if the system load average goes above this |
| 2305 | ** value. "0.0" means no limit. This only works on unix. |
| 2306 | ** Only local settings of this value make a difference since |
| 2307 | ** when running as a web-server, Fossil does not open the |
| 2308 | ** global configuration database. |
| 2309 | ** |
| 2310 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2311 | ** default is 250000 bytes. |
| 2312 | ** |
| 2313 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2314 |
+67
-92
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -28,12 +28,12 @@ | ||
| 28 | 28 | ** Flag parameters to the text_diff() routine used to control the formatting |
| 29 | 29 | ** of the diff output. |
| 30 | 30 | */ |
| 31 | 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | -#define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */ | |
| 34 | -#define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */ | |
| 33 | +#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ | |
| 34 | +#define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */ | |
| 35 | 35 | #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */ |
| 36 | 36 | #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */ |
| 37 | 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | 38 | #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */ |
| 39 | 39 | #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */ |
| @@ -76,11 +76,12 @@ | ||
| 76 | 76 | */ |
| 77 | 77 | typedef struct DLine DLine; |
| 78 | 78 | struct DLine { |
| 79 | 79 | const char *z; /* The text of the line */ |
| 80 | 80 | unsigned int h; /* Hash of the line */ |
| 81 | - unsigned short indent; /* Indent of the line. Only !=0 with --ignore-space-at sol option */ | |
| 81 | + unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ | |
| 82 | + unsigned short n; /* number of bytes */ | |
| 82 | 83 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 83 | 84 | |
| 84 | 85 | /* an array of DLine elements serves two purposes. The fields |
| 85 | 86 | ** above are one per line of input text. But each entry is also |
| 86 | 87 | ** a bucket in a hash table, as follows: */ |
| @@ -130,11 +131,11 @@ | ||
| 130 | 131 | ** |
| 131 | 132 | ** Profiling show that in most cases this routine consumes the bulk of |
| 132 | 133 | ** the CPU time on a diff. |
| 133 | 134 | */ |
| 134 | 135 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 135 | - int nLine, i, j, k, s, indent, x; | |
| 136 | + int nLine, i, j, k, s, x; | |
| 136 | 137 | unsigned int h, h2; |
| 137 | 138 | DLine *a; |
| 138 | 139 | |
| 139 | 140 | /* Count the number of lines. Allocate space to hold |
| 140 | 141 | ** the returned array. |
| @@ -163,27 +164,19 @@ | ||
| 163 | 164 | } |
| 164 | 165 | |
| 165 | 166 | /* Fill in the array */ |
| 166 | 167 | for(i=0; i<nLine; i++){ |
| 167 | 168 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 168 | - k = j; | |
| 169 | + a[i].z = z; | |
| 170 | + a[i].n = k = j; | |
| 169 | 171 | s = 0; |
| 170 | - indent = 0; | |
| 171 | 172 | if( diffFlags & DIFF_IGNORE_EOLWS ){ |
| 172 | 173 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; } |
| 173 | 174 | } |
| 174 | - if( diffFlags & DIFF_IGNORE_SOLWS ){ | |
| 175 | - while( s<k && fossil_isspace(z[s]) ){ | |
| 176 | - if( z[s]=='\t' ){ | |
| 177 | - indent = ((indent+9)/8)*8; | |
| 178 | - }else if( z[s]==' ' ){ | |
| 179 | - indent++; | |
| 180 | - } | |
| 181 | - s++; | |
| 182 | - } | |
| 183 | - } | |
| 184 | - a[i].z = z+s; | |
| 175 | + if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ | |
| 176 | + while( s<k && fossil_isspace(z[s]) ){ s++; } | |
| 177 | + } | |
| 185 | 178 | a[i].indent = s; |
| 186 | 179 | for(h=0, x=s; x<k; x++){ |
| 187 | 180 | h = h ^ (h<<2) ^ z[x]; |
| 188 | 181 | } |
| 189 | 182 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); |
| @@ -200,11 +193,12 @@ | ||
| 200 | 193 | |
| 201 | 194 | /* |
| 202 | 195 | ** Return true if two DLine elements are identical. |
| 203 | 196 | */ |
| 204 | 197 | static int same_dline(DLine *pA, DLine *pB){ |
| 205 | - return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0; | |
| 198 | + return pA->h==pB->h && memcmp(pA->z+pA->indent,pB->z+pB->indent, | |
| 199 | + pA->h & LENGTH_MASK)==0; | |
| 206 | 200 | } |
| 207 | 201 | |
| 208 | 202 | /* |
| 209 | 203 | ** Return true if the regular expression *pRe matches any of the |
| 210 | 204 | ** N dlines |
| @@ -240,22 +234,16 @@ | ||
| 240 | 234 | }else if( cPrefix=='+' ){ |
| 241 | 235 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 242 | 236 | }else if( cPrefix=='-' ){ |
| 243 | 237 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 244 | 238 | } |
| 245 | - if( pLine->indent ){ | |
| 246 | - blob_appendf(pOut, "%*s", pLine->indent, " "); | |
| 247 | - } | |
| 248 | - htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); | |
| 239 | + htmlize_to_blob(pOut, pLine->z, pLine->n); | |
| 249 | 240 | if( cPrefix!=' ' ){ |
| 250 | 241 | blob_append(pOut, "</span>", -1); |
| 251 | 242 | } |
| 252 | 243 | }else{ |
| 253 | - if( pLine->indent ){ | |
| 254 | - blob_appendf(pOut, "%*s", pLine->indent, " "); | |
| 255 | - } | |
| 256 | - blob_append(pOut, pLine->z, pLine->h & LENGTH_MASK); | |
| 244 | + blob_append(pOut, pLine->z, pLine->n); | |
| 257 | 245 | } |
| 258 | 246 | blob_append(pOut, "\n", 1); |
| 259 | 247 | } |
| 260 | 248 | |
| 261 | 249 | /* |
| @@ -427,11 +415,11 @@ | ||
| 427 | 415 | b += m; |
| 428 | 416 | if( i<nr-1 ){ |
| 429 | 417 | m = R[r+i*3+3]; |
| 430 | 418 | for(j=0; j<m; j++){ |
| 431 | 419 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 432 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 420 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 433 | 421 | } |
| 434 | 422 | b += m; |
| 435 | 423 | a += m; |
| 436 | 424 | } |
| 437 | 425 | } |
| @@ -440,11 +428,11 @@ | ||
| 440 | 428 | assert( nr==i ); |
| 441 | 429 | m = R[r+nr*3]; |
| 442 | 430 | if( m>nContext ) m = nContext; |
| 443 | 431 | for(j=0; j<m; j++){ |
| 444 | 432 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 445 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 433 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 446 | 434 | } |
| 447 | 435 | } |
| 448 | 436 | } |
| 449 | 437 | |
| 450 | 438 | /* |
| @@ -501,11 +489,11 @@ | ||
| 501 | 489 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 502 | 490 | ** to test the ability of the diff code to handle such characters. |
| 503 | 491 | */ |
| 504 | 492 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 505 | 493 | Blob *pCol = p->apCols[col]; |
| 506 | - int n = pLine->h & LENGTH_MASK; | |
| 494 | + int n = pLine->n; | |
| 507 | 495 | int i; /* Number of input characters consumed */ |
| 508 | 496 | int k; /* Cursor position */ |
| 509 | 497 | int needEndSpan = 0; |
| 510 | 498 | const char *zIn = pLine->z; |
| 511 | 499 | int w = p->width; |
| @@ -532,13 +520,10 @@ | ||
| 532 | 520 | p->iEnd = p->iEnd2; |
| 533 | 521 | p->iEnd2 = 0; |
| 534 | 522 | } |
| 535 | 523 | } |
| 536 | 524 | } |
| 537 | - if( pLine->indent && i==0 ){ | |
| 538 | - blob_appendf(pCol, "%*s", pLine->indent, " "); | |
| 539 | - } | |
| 540 | 525 | if( c=='\t' && !p->escHtml ){ |
| 541 | 526 | blob_append(pCol, " ", 1); |
| 542 | 527 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 543 | 528 | blob_append(pCol, " ", 1); |
| 544 | 529 | k++; |
| @@ -562,11 +547,11 @@ | ||
| 562 | 547 | blob_append(pCol, "</span>", 7); |
| 563 | 548 | } |
| 564 | 549 | if( col==SBS_TXTB ){ |
| 565 | 550 | sbsWriteNewlines(p); |
| 566 | 551 | }else if( !p->escHtml ){ |
| 567 | - sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA); | |
| 552 | + sbsWriteSpace(p, w-k, SBS_TXTA); | |
| 568 | 553 | } |
| 569 | 554 | } |
| 570 | 555 | |
| 571 | 556 | /* |
| 572 | 557 | ** Append a column to the final output blob. |
| @@ -1789,11 +1774,11 @@ | ||
| 1789 | 1774 | if( diffFlags & DIFF_INVERT ){ |
| 1790 | 1775 | Blob *pTemp = pA_Blob; |
| 1791 | 1776 | pA_Blob = pB_Blob; |
| 1792 | 1777 | pB_Blob = pTemp; |
| 1793 | 1778 | } |
| 1794 | - ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0; | |
| 1779 | + ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0; | |
| 1795 | 1780 | blob_to_utf8_no_bom(pA_Blob, 0); |
| 1796 | 1781 | blob_to_utf8_no_bom(pB_Blob, 0); |
| 1797 | 1782 | |
| 1798 | 1783 | /* Prepare the input files */ |
| 1799 | 1784 | memset(&c, 0, sizeof(c)); |
| @@ -1859,22 +1844,21 @@ | ||
| 1859 | 1844 | |
| 1860 | 1845 | /* |
| 1861 | 1846 | ** Process diff-related command-line options and return an appropriate |
| 1862 | 1847 | ** "diffFlags" integer. |
| 1863 | 1848 | ** |
| 1864 | -** --brief Show filenames only DIFF_BRIEF | |
| 1865 | -** --context|-c N N lines of context. DIFF_CONTEXT_MASK | |
| 1866 | -** --html Format for HTML DIFF_HTML | |
| 1867 | -** --invert Invert the diff DIFF_INVERT | |
| 1868 | -** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS | |
| 1869 | -** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS | |
| 1870 | -** --linenum|-n Show line numbers DIFF_LINENO | |
| 1871 | -** --noopt Disable optimization DIFF_NOOPT | |
| 1872 | -** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE | |
| 1873 | -** --unified Unified diff. ~DIFF_SIDEBYSIDE | |
| 1874 | -** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS | |
| 1875 | -** --width|-W N N character lines. DIFF_WIDTH_MASK | |
| 1849 | +** --brief Show filenames only DIFF_BRIEF | |
| 1850 | +** -c|--context N N lines of context. DIFF_CONTEXT_MASK | |
| 1851 | +** --html Format for HTML DIFF_HTML | |
| 1852 | +** --invert Invert the diff DIFF_INVERT | |
| 1853 | +** -n|--linenum Show line numbers DIFF_LINENO | |
| 1854 | +** --noopt Disable optimization DIFF_NOOPT | |
| 1855 | +** --unified Unified diff. ~DIFF_SIDEBYSIDE | |
| 1856 | +** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS | |
| 1857 | +** --width|-W N N character lines. DIFF_WIDTH_MASK | |
| 1858 | +** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE | |
| 1859 | +** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS | |
| 1876 | 1860 | */ |
| 1877 | 1861 | u64 diff_options(void){ |
| 1878 | 1862 | u64 diffFlags = 0; |
| 1879 | 1863 | const char *z; |
| 1880 | 1864 | int f; |
| @@ -1888,13 +1872,12 @@ | ||
| 1888 | 1872 | f *= DIFF_CONTEXT_MASK+1; |
| 1889 | 1873 | if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK; |
| 1890 | 1874 | diffFlags |= f; |
| 1891 | 1875 | } |
| 1892 | 1876 | if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML; |
| 1893 | - if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS; | |
| 1894 | - if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; | |
| 1895 | - if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); | |
| 1877 | + if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; | |
| 1878 | + if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS; | |
| 1896 | 1879 | if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO; |
| 1897 | 1880 | if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT; |
| 1898 | 1881 | if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT; |
| 1899 | 1882 | if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF; |
| 1900 | 1883 | return diffFlags; |
| @@ -1971,14 +1954,11 @@ | ||
| 1971 | 1954 | typedef struct Annotator Annotator; |
| 1972 | 1955 | struct Annotator { |
| 1973 | 1956 | DContext c; /* The diff-engine context */ |
| 1974 | 1957 | struct AnnLine { /* Lines of the original files... */ |
| 1975 | 1958 | const char *z; /* The text of the line */ |
| 1976 | - short int n; /* Number of bytes. Whether this omits sol/eol spacing | |
| 1977 | - depends on the diffFlags) */ | |
| 1978 | - unsigned short indent; /* Indenting (number of initial spaces, only used | |
| 1979 | - if sol-spacing is ignored in the diffFlags) */ | |
| 1959 | + short int n; /* Number of bytes (omitting trailing space and \n) */ | |
| 1980 | 1960 | short int iVers; /* Level at which tag was set */ |
| 1981 | 1961 | } *aOrig; |
| 1982 | 1962 | int nOrig; /* Number of elements in aOrig[] */ |
| 1983 | 1963 | int nVers; /* Number of versions analyzed */ |
| 1984 | 1964 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2008,12 +1988,11 @@ | ||
| 2008 | 1988 | return 1; |
| 2009 | 1989 | } |
| 2010 | 1990 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2011 | 1991 | for(i=0; i<p->c.nTo; i++){ |
| 2012 | 1992 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2013 | - p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK; | |
| 2014 | - p->aOrig[i].indent = p->c.aTo[i].indent; | |
| 1993 | + p->aOrig[i].n = p->c.aTo[i].n; | |
| 2015 | 1994 | p->aOrig[i].iVers = -1; |
| 2016 | 1995 | } |
| 2017 | 1996 | p->nOrig = p->c.nTo; |
| 2018 | 1997 | return 0; |
| 2019 | 1998 | } |
| @@ -2066,13 +2045,13 @@ | ||
| 2066 | 2045 | /* Return no errors */ |
| 2067 | 2046 | return 0; |
| 2068 | 2047 | } |
| 2069 | 2048 | |
| 2070 | 2049 | |
| 2071 | -/* Annotation flags */ | |
| 2072 | -#define ANN_FILE_VERS 0x01 /* Show file vers rather than commit vers */ | |
| 2073 | -#define ANN_FILE_ANCEST 0x02 /* Prefer check-ins in the ANCESTOR table */ | |
| 2050 | +/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ | |
| 2051 | +#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ | |
| 2052 | +#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ | |
| 2074 | 2053 | |
| 2075 | 2054 | /* |
| 2076 | 2055 | ** Compute a complete annotation on a file. The file is identified |
| 2077 | 2056 | ** by its filename number (filename.fnid) and the baseline in which |
| 2078 | 2057 | ** it was checked in (mlink.mid). |
| @@ -2080,12 +2059,11 @@ | ||
| 2080 | 2059 | static void annotate_file( |
| 2081 | 2060 | Annotator *p, /* The annotator */ |
| 2082 | 2061 | int fnid, /* The name of the file to be annotated */ |
| 2083 | 2062 | int mid, /* Use the version of the file in this check-in */ |
| 2084 | 2063 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2085 | - int annFlags, /* Flags to alter the annotation */ | |
| 2086 | - u64 diffFlags /* Flags to alter the whitespace handling */ | |
| 2064 | + u64 annFlags /* Flags to alter the annotation */ | |
| 2087 | 2065 | ){ |
| 2088 | 2066 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2089 | 2067 | Blob step; /* Text of previous revision */ |
| 2090 | 2068 | int rid; /* Artifact ID of the file being annotated */ |
| 2091 | 2069 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2099,11 +2077,12 @@ | ||
| 2099 | 2077 | } |
| 2100 | 2078 | if( !content_get(rid, &toAnnotate) ){ |
| 2101 | 2079 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2102 | 2080 | } |
| 2103 | 2081 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2104 | - annotation_start(p, &toAnnotate, diffFlags); | |
| 2082 | + blob_to_utf8_no_bom(&toAnnotate, 0); | |
| 2083 | + annotation_start(p, &toAnnotate, annFlags); | |
| 2105 | 2084 | db_begin_transaction(); |
| 2106 | 2085 | db_multi_exec( |
| 2107 | 2086 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2108 | 2087 | "DELETE FROM vseen;" |
| 2109 | 2088 | ); |
| @@ -2133,11 +2112,12 @@ | ||
| 2133 | 2112 | p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1)); |
| 2134 | 2113 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2135 | 2114 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2136 | 2115 | if( p->nVers ){ |
| 2137 | 2116 | content_get(rid, &step); |
| 2138 | - annotation_step(p, &step, p->nVers-1, diffFlags); | |
| 2117 | + blob_to_utf8_no_bom(&step, 0); | |
| 2118 | + annotation_step(p, &step, p->nVers-1, annFlags); | |
| 2139 | 2119 | blob_reset(&step); |
| 2140 | 2120 | } |
| 2141 | 2121 | p->nVers++; |
| 2142 | 2122 | db_bind_int(&ins, ":rid", rid); |
| 2143 | 2123 | db_step(&ins); |
| @@ -2188,14 +2168,13 @@ | ||
| 2188 | 2168 | void annotation_page(void){ |
| 2189 | 2169 | int mid; |
| 2190 | 2170 | int fnid; |
| 2191 | 2171 | int i; |
| 2192 | 2172 | int iLimit; /* Depth limit */ |
| 2193 | - int annFlags = ANN_FILE_ANCEST; | |
| 2173 | + u64 annFlags = ANN_FILE_ANCEST; | |
| 2194 | 2174 | int showLog = 0; /* True to display the log */ |
| 2195 | 2175 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2196 | - u64 diffFlags = 0; /* diff flags for ignore whitespace */ | |
| 2197 | 2176 | const char *zFilename; /* Name of file to annotate */ |
| 2198 | 2177 | const char *zCI; /* The check-in containing zFilename */ |
| 2199 | 2178 | Annotator ann; |
| 2200 | 2179 | HQuery url; |
| 2201 | 2180 | struct AnnVers *p; |
| @@ -2205,25 +2184,26 @@ | ||
| 2205 | 2184 | /* Gather query parameters */ |
| 2206 | 2185 | showLog = atoi(PD("log","1")); |
| 2207 | 2186 | login_check_credentials(); |
| 2208 | 2187 | if( !g.perm.Read ){ login_needed(); return; } |
| 2209 | 2188 | if( exclude_spiders("annotate") ) return; |
| 2189 | + load_control(); | |
| 2210 | 2190 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2211 | 2191 | zFilename = P("filename"); |
| 2212 | 2192 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2213 | 2193 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2214 | 2194 | iLimit = atoi(PD("limit","20")); |
| 2215 | 2195 | if( P("filevers") ) annFlags |= ANN_FILE_VERS; |
| 2216 | 2196 | ignoreWs = P("w")!=0; |
| 2217 | - if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); | |
| 2197 | + if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; | |
| 2218 | 2198 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2219 | 2199 | fossil_redirect_home(); |
| 2220 | 2200 | } |
| 2221 | 2201 | |
| 2222 | 2202 | /* compute the annotation */ |
| 2223 | 2203 | compute_direct_ancestors(mid, 10000000); |
| 2224 | - annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags); | |
| 2204 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2225 | 2205 | zCI = ann.aVers[0].zMUuid; |
| 2226 | 2206 | |
| 2227 | 2207 | /* generate the web page */ |
| 2228 | 2208 | style_header("Annotation For %h", zFilename); |
| 2229 | 2209 | if( bBlame ){ |
| @@ -2316,11 +2296,10 @@ | ||
| 2316 | 2296 | @ <pre> |
| 2317 | 2297 | for(i=0; i<ann.nOrig; i++){ |
| 2318 | 2298 | int iVers = ann.aOrig[i].iVers; |
| 2319 | 2299 | char *z = (char*)ann.aOrig[i].z; |
| 2320 | 2300 | int n = ann.aOrig[i].n; |
| 2321 | - int indent = ann.aOrig[i].indent+1; | |
| 2322 | 2301 | char zPrefix[300]; |
| 2323 | 2302 | z[n] = 0; |
| 2324 | 2303 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2325 | 2304 | |
| 2326 | 2305 | if( bBlame ){ |
| @@ -2331,26 +2310,26 @@ | ||
| 2331 | 2310 | "<span style='background-color:%s'>" |
| 2332 | 2311 | "%s%.10s</a> %s</span> %13.13s:", |
| 2333 | 2312 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2334 | 2313 | fossil_free(zLink); |
| 2335 | 2314 | }else{ |
| 2336 | - sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s%*s", indent, " "); | |
| 2315 | + sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", ""); | |
| 2337 | 2316 | } |
| 2338 | 2317 | }else{ |
| 2339 | 2318 | if( iVers>=0 ){ |
| 2340 | 2319 | struct AnnVers *p = ann.aVers+iVers; |
| 2341 | 2320 | char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); |
| 2342 | 2321 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2343 | 2322 | "<span style='background-color:%s'>" |
| 2344 | - "%s%.10s</a> %s</span> %4d:%*s", | |
| 2345 | - p->zBgColor, zLink, p->zMUuid, p->zDate, i+1, indent, " "); | |
| 2323 | + "%s%.10s</a> %s</span> %4d:", | |
| 2324 | + p->zBgColor, zLink, p->zMUuid, p->zDate, i+1); | |
| 2346 | 2325 | fossil_free(zLink); |
| 2347 | 2326 | }else{ |
| 2348 | - sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:%*s", "", i+1, indent, " "); | |
| 2327 | + sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:", "", i+1); | |
| 2349 | 2328 | } |
| 2350 | 2329 | } |
| 2351 | - @ %s(zPrefix)%h(z) | |
| 2330 | + @ %s(zPrefix) %h(z) | |
| 2352 | 2331 | |
| 2353 | 2332 | } |
| 2354 | 2333 | @ </pre> |
| 2355 | 2334 | style_footer(); |
| 2356 | 2335 | } |
| @@ -2366,16 +2345,15 @@ | ||
| 2366 | 2345 | ** the file was last modified. The "annotate" command shows line numbers |
| 2367 | 2346 | ** and omits the username. The "blame" and "praise" commands show the user |
| 2368 | 2347 | ** who made each checkin and omits the line number. |
| 2369 | 2348 | ** |
| 2370 | 2349 | ** Options: |
| 2371 | -** --filevers Show file version numbers rather than check-in versions | |
| 2372 | -** -l|--log List all versions analyzed | |
| 2373 | -** -n|--limit N Only look backwards in time by N versions | |
| 2374 | -** --ignore-space-at-eol Ignore eol-whitespaces | |
| 2375 | -** --ignore-space-at-sol Ignore sol-whitespaces | |
| 2376 | -** -w Ignore all whitespaces | |
| 2350 | +** --filevers Show file version numbers rather than check-in versions | |
| 2351 | +** -l|--log List all versions analyzed | |
| 2352 | +** -n|--limit N Only look backwards in time by N versions | |
| 2353 | +** -Z|--ignore-trailing-space Ignore eol-whitespaces | |
| 2354 | +** -w|--ignore-all-space Ignore all whitespaces | |
| 2377 | 2355 | ** |
| 2378 | 2356 | ** See also: info, finfo, timeline |
| 2379 | 2357 | */ |
| 2380 | 2358 | void annotate_cmd(void){ |
| 2381 | 2359 | int fnid; /* Filename ID */ |
| @@ -2387,23 +2365,21 @@ | ||
| 2387 | 2365 | Annotator ann; /* The annotation of the file */ |
| 2388 | 2366 | int i; /* Loop counter */ |
| 2389 | 2367 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2390 | 2368 | int iLimit; /* How far back in time to look */ |
| 2391 | 2369 | int showLog; /* True to show the log */ |
| 2392 | - u64 diffFlags = 0;/* Flags to control whitespace handling */ | |
| 2393 | 2370 | int fileVers; /* Show file version instead of check-in versions */ |
| 2394 | - int annFlags = 0; /* Flags to control annotation properties */ | |
| 2371 | + u64 annFlags = 0; /* Flags to control annotation properties */ | |
| 2395 | 2372 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2396 | 2373 | |
| 2397 | 2374 | bBlame = g.argv[1][0]!='a'; |
| 2398 | 2375 | zLimit = find_option("limit","n",1); |
| 2399 | 2376 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2400 | 2377 | iLimit = atoi(zLimit); |
| 2401 | 2378 | showLog = find_option("log","l",0)!=0; |
| 2402 | - if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS; | |
| 2403 | - if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; | |
| 2404 | - if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); | |
| 2379 | + if( find_option("ignore-trailing-space","Z",0)!=0 ) annFlags |= DIFF_IGNORE_EOLWS; | |
| 2380 | + if( find_option("ignore-all-space","w",0)!=0 ) annFlags |= DIFF_IGNORE_ALLWS; | |
| 2405 | 2381 | fileVers = find_option("filevers",0,0)!=0; |
| 2406 | 2382 | db_must_be_within_tree(); |
| 2407 | 2383 | if( g.argc<3 ) { |
| 2408 | 2384 | usage("FILENAME"); |
| 2409 | 2385 | } |
| @@ -2429,11 +2405,11 @@ | ||
| 2429 | 2405 | fid, fnid); |
| 2430 | 2406 | if( mid==0 ){ |
| 2431 | 2407 | fossil_fatal("unable to find manifest"); |
| 2432 | 2408 | } |
| 2433 | 2409 | annFlags |= ANN_FILE_ANCEST; |
| 2434 | - annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags); | |
| 2410 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2435 | 2411 | if( showLog ){ |
| 2436 | 2412 | struct AnnVers *p; |
| 2437 | 2413 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2438 | 2414 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2439 | 2415 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| @@ -2441,28 +2417,27 @@ | ||
| 2441 | 2417 | fossil_print("---------------------------------------------------\n"); |
| 2442 | 2418 | } |
| 2443 | 2419 | for(i=0; i<ann.nOrig; i++){ |
| 2444 | 2420 | int iVers = ann.aOrig[i].iVers; |
| 2445 | 2421 | char *z = (char*)ann.aOrig[i].z; |
| 2446 | - int indent = ann.aOrig[i].indent + 1; | |
| 2447 | 2422 | int n = ann.aOrig[i].n; |
| 2448 | 2423 | struct AnnVers *p; |
| 2449 | 2424 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2450 | 2425 | p = ann.aVers + iVers; |
| 2451 | 2426 | if( bBlame ){ |
| 2452 | 2427 | if( iVers>=0 ){ |
| 2453 | - fossil_print("%.10s %s %13.13s:%*s%.*s\n", | |
| 2454 | - fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, indent, " ", n, z); | |
| 2428 | + fossil_print("%.10s %s %13.13s: %.*s\n", | |
| 2429 | + fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, n, z); | |
| 2455 | 2430 | }else{ |
| 2456 | - fossil_print("%35s %*s%.*s\n", "", indent, " ", n, z); | |
| 2431 | + fossil_print("%35s %.*s\n", "", n, z); | |
| 2457 | 2432 | } |
| 2458 | 2433 | }else{ |
| 2459 | 2434 | if( iVers>=0 ){ |
| 2460 | - fossil_print("%.10s %s %5d:%*s%.*s\n", | |
| 2461 | - fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, indent, " ", n, z); | |
| 2435 | + fossil_print("%.10s %s %5d: %.*s\n", | |
| 2436 | + fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, n, z); | |
| 2462 | 2437 | }else{ |
| 2463 | - fossil_print("%21s %5d:%*s%.*s\n", | |
| 2464 | - "", i+1, indent, " ", n, z); | |
| 2438 | + fossil_print("%21s %5d: %.*s\n", | |
| 2439 | + "", i+1, n, z); | |
| 2465 | 2440 | } |
| 2466 | 2441 | } |
| 2467 | 2442 | } |
| 2468 | 2443 | } |
| 2469 | 2444 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -28,12 +28,12 @@ | |
| 28 | ** Flag parameters to the text_diff() routine used to control the formatting |
| 29 | ** of the diff output. |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */ |
| 34 | #define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */ |
| 35 | #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */ |
| 36 | #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */ |
| 39 | #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */ |
| @@ -76,11 +76,12 @@ | |
| 76 | */ |
| 77 | typedef struct DLine DLine; |
| 78 | struct DLine { |
| 79 | const char *z; /* The text of the line */ |
| 80 | unsigned int h; /* Hash of the line */ |
| 81 | unsigned short indent; /* Indent of the line. Only !=0 with --ignore-space-at sol option */ |
| 82 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 83 | |
| 84 | /* an array of DLine elements serves two purposes. The fields |
| 85 | ** above are one per line of input text. But each entry is also |
| 86 | ** a bucket in a hash table, as follows: */ |
| @@ -130,11 +131,11 @@ | |
| 130 | ** |
| 131 | ** Profiling show that in most cases this routine consumes the bulk of |
| 132 | ** the CPU time on a diff. |
| 133 | */ |
| 134 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 135 | int nLine, i, j, k, s, indent, x; |
| 136 | unsigned int h, h2; |
| 137 | DLine *a; |
| 138 | |
| 139 | /* Count the number of lines. Allocate space to hold |
| 140 | ** the returned array. |
| @@ -163,27 +164,19 @@ | |
| 163 | } |
| 164 | |
| 165 | /* Fill in the array */ |
| 166 | for(i=0; i<nLine; i++){ |
| 167 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 168 | k = j; |
| 169 | s = 0; |
| 170 | indent = 0; |
| 171 | if( diffFlags & DIFF_IGNORE_EOLWS ){ |
| 172 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; } |
| 173 | } |
| 174 | if( diffFlags & DIFF_IGNORE_SOLWS ){ |
| 175 | while( s<k && fossil_isspace(z[s]) ){ |
| 176 | if( z[s]=='\t' ){ |
| 177 | indent = ((indent+9)/8)*8; |
| 178 | }else if( z[s]==' ' ){ |
| 179 | indent++; |
| 180 | } |
| 181 | s++; |
| 182 | } |
| 183 | } |
| 184 | a[i].z = z+s; |
| 185 | a[i].indent = s; |
| 186 | for(h=0, x=s; x<k; x++){ |
| 187 | h = h ^ (h<<2) ^ z[x]; |
| 188 | } |
| 189 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); |
| @@ -200,11 +193,12 @@ | |
| 200 | |
| 201 | /* |
| 202 | ** Return true if two DLine elements are identical. |
| 203 | */ |
| 204 | static int same_dline(DLine *pA, DLine *pB){ |
| 205 | return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0; |
| 206 | } |
| 207 | |
| 208 | /* |
| 209 | ** Return true if the regular expression *pRe matches any of the |
| 210 | ** N dlines |
| @@ -240,22 +234,16 @@ | |
| 240 | }else if( cPrefix=='+' ){ |
| 241 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 242 | }else if( cPrefix=='-' ){ |
| 243 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 244 | } |
| 245 | if( pLine->indent ){ |
| 246 | blob_appendf(pOut, "%*s", pLine->indent, " "); |
| 247 | } |
| 248 | htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); |
| 249 | if( cPrefix!=' ' ){ |
| 250 | blob_append(pOut, "</span>", -1); |
| 251 | } |
| 252 | }else{ |
| 253 | if( pLine->indent ){ |
| 254 | blob_appendf(pOut, "%*s", pLine->indent, " "); |
| 255 | } |
| 256 | blob_append(pOut, pLine->z, pLine->h & LENGTH_MASK); |
| 257 | } |
| 258 | blob_append(pOut, "\n", 1); |
| 259 | } |
| 260 | |
| 261 | /* |
| @@ -427,11 +415,11 @@ | |
| 427 | b += m; |
| 428 | if( i<nr-1 ){ |
| 429 | m = R[r+i*3+3]; |
| 430 | for(j=0; j<m; j++){ |
| 431 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 432 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 433 | } |
| 434 | b += m; |
| 435 | a += m; |
| 436 | } |
| 437 | } |
| @@ -440,11 +428,11 @@ | |
| 440 | assert( nr==i ); |
| 441 | m = R[r+nr*3]; |
| 442 | if( m>nContext ) m = nContext; |
| 443 | for(j=0; j<m; j++){ |
| 444 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 445 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | /* |
| @@ -501,11 +489,11 @@ | |
| 501 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 502 | ** to test the ability of the diff code to handle such characters. |
| 503 | */ |
| 504 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 505 | Blob *pCol = p->apCols[col]; |
| 506 | int n = pLine->h & LENGTH_MASK; |
| 507 | int i; /* Number of input characters consumed */ |
| 508 | int k; /* Cursor position */ |
| 509 | int needEndSpan = 0; |
| 510 | const char *zIn = pLine->z; |
| 511 | int w = p->width; |
| @@ -532,13 +520,10 @@ | |
| 532 | p->iEnd = p->iEnd2; |
| 533 | p->iEnd2 = 0; |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | if( pLine->indent && i==0 ){ |
| 538 | blob_appendf(pCol, "%*s", pLine->indent, " "); |
| 539 | } |
| 540 | if( c=='\t' && !p->escHtml ){ |
| 541 | blob_append(pCol, " ", 1); |
| 542 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 543 | blob_append(pCol, " ", 1); |
| 544 | k++; |
| @@ -562,11 +547,11 @@ | |
| 562 | blob_append(pCol, "</span>", 7); |
| 563 | } |
| 564 | if( col==SBS_TXTB ){ |
| 565 | sbsWriteNewlines(p); |
| 566 | }else if( !p->escHtml ){ |
| 567 | sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA); |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | /* |
| 572 | ** Append a column to the final output blob. |
| @@ -1789,11 +1774,11 @@ | |
| 1789 | if( diffFlags & DIFF_INVERT ){ |
| 1790 | Blob *pTemp = pA_Blob; |
| 1791 | pA_Blob = pB_Blob; |
| 1792 | pB_Blob = pTemp; |
| 1793 | } |
| 1794 | ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0; |
| 1795 | blob_to_utf8_no_bom(pA_Blob, 0); |
| 1796 | blob_to_utf8_no_bom(pB_Blob, 0); |
| 1797 | |
| 1798 | /* Prepare the input files */ |
| 1799 | memset(&c, 0, sizeof(c)); |
| @@ -1859,22 +1844,21 @@ | |
| 1859 | |
| 1860 | /* |
| 1861 | ** Process diff-related command-line options and return an appropriate |
| 1862 | ** "diffFlags" integer. |
| 1863 | ** |
| 1864 | ** --brief Show filenames only DIFF_BRIEF |
| 1865 | ** --context|-c N N lines of context. DIFF_CONTEXT_MASK |
| 1866 | ** --html Format for HTML DIFF_HTML |
| 1867 | ** --invert Invert the diff DIFF_INVERT |
| 1868 | ** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1869 | ** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS |
| 1870 | ** --linenum|-n Show line numbers DIFF_LINENO |
| 1871 | ** --noopt Disable optimization DIFF_NOOPT |
| 1872 | ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE |
| 1873 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1874 | ** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS |
| 1875 | ** --width|-W N N character lines. DIFF_WIDTH_MASK |
| 1876 | */ |
| 1877 | u64 diff_options(void){ |
| 1878 | u64 diffFlags = 0; |
| 1879 | const char *z; |
| 1880 | int f; |
| @@ -1888,13 +1872,12 @@ | |
| 1888 | f *= DIFF_CONTEXT_MASK+1; |
| 1889 | if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK; |
| 1890 | diffFlags |= f; |
| 1891 | } |
| 1892 | if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML; |
| 1893 | if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS; |
| 1894 | if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; |
| 1895 | if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); |
| 1896 | if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO; |
| 1897 | if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT; |
| 1898 | if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT; |
| 1899 | if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF; |
| 1900 | return diffFlags; |
| @@ -1971,14 +1954,11 @@ | |
| 1971 | typedef struct Annotator Annotator; |
| 1972 | struct Annotator { |
| 1973 | DContext c; /* The diff-engine context */ |
| 1974 | struct AnnLine { /* Lines of the original files... */ |
| 1975 | const char *z; /* The text of the line */ |
| 1976 | short int n; /* Number of bytes. Whether this omits sol/eol spacing |
| 1977 | depends on the diffFlags) */ |
| 1978 | unsigned short indent; /* Indenting (number of initial spaces, only used |
| 1979 | if sol-spacing is ignored in the diffFlags) */ |
| 1980 | short int iVers; /* Level at which tag was set */ |
| 1981 | } *aOrig; |
| 1982 | int nOrig; /* Number of elements in aOrig[] */ |
| 1983 | int nVers; /* Number of versions analyzed */ |
| 1984 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2008,12 +1988,11 @@ | |
| 2008 | return 1; |
| 2009 | } |
| 2010 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2011 | for(i=0; i<p->c.nTo; i++){ |
| 2012 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2013 | p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK; |
| 2014 | p->aOrig[i].indent = p->c.aTo[i].indent; |
| 2015 | p->aOrig[i].iVers = -1; |
| 2016 | } |
| 2017 | p->nOrig = p->c.nTo; |
| 2018 | return 0; |
| 2019 | } |
| @@ -2066,13 +2045,13 @@ | |
| 2066 | /* Return no errors */ |
| 2067 | return 0; |
| 2068 | } |
| 2069 | |
| 2070 | |
| 2071 | /* Annotation flags */ |
| 2072 | #define ANN_FILE_VERS 0x01 /* Show file vers rather than commit vers */ |
| 2073 | #define ANN_FILE_ANCEST 0x02 /* Prefer check-ins in the ANCESTOR table */ |
| 2074 | |
| 2075 | /* |
| 2076 | ** Compute a complete annotation on a file. The file is identified |
| 2077 | ** by its filename number (filename.fnid) and the baseline in which |
| 2078 | ** it was checked in (mlink.mid). |
| @@ -2080,12 +2059,11 @@ | |
| 2080 | static void annotate_file( |
| 2081 | Annotator *p, /* The annotator */ |
| 2082 | int fnid, /* The name of the file to be annotated */ |
| 2083 | int mid, /* Use the version of the file in this check-in */ |
| 2084 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2085 | int annFlags, /* Flags to alter the annotation */ |
| 2086 | u64 diffFlags /* Flags to alter the whitespace handling */ |
| 2087 | ){ |
| 2088 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2089 | Blob step; /* Text of previous revision */ |
| 2090 | int rid; /* Artifact ID of the file being annotated */ |
| 2091 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2099,11 +2077,12 @@ | |
| 2099 | } |
| 2100 | if( !content_get(rid, &toAnnotate) ){ |
| 2101 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2102 | } |
| 2103 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2104 | annotation_start(p, &toAnnotate, diffFlags); |
| 2105 | db_begin_transaction(); |
| 2106 | db_multi_exec( |
| 2107 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2108 | "DELETE FROM vseen;" |
| 2109 | ); |
| @@ -2133,11 +2112,12 @@ | |
| 2133 | p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1)); |
| 2134 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2135 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2136 | if( p->nVers ){ |
| 2137 | content_get(rid, &step); |
| 2138 | annotation_step(p, &step, p->nVers-1, diffFlags); |
| 2139 | blob_reset(&step); |
| 2140 | } |
| 2141 | p->nVers++; |
| 2142 | db_bind_int(&ins, ":rid", rid); |
| 2143 | db_step(&ins); |
| @@ -2188,14 +2168,13 @@ | |
| 2188 | void annotation_page(void){ |
| 2189 | int mid; |
| 2190 | int fnid; |
| 2191 | int i; |
| 2192 | int iLimit; /* Depth limit */ |
| 2193 | int annFlags = ANN_FILE_ANCEST; |
| 2194 | int showLog = 0; /* True to display the log */ |
| 2195 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2196 | u64 diffFlags = 0; /* diff flags for ignore whitespace */ |
| 2197 | const char *zFilename; /* Name of file to annotate */ |
| 2198 | const char *zCI; /* The check-in containing zFilename */ |
| 2199 | Annotator ann; |
| 2200 | HQuery url; |
| 2201 | struct AnnVers *p; |
| @@ -2205,25 +2184,26 @@ | |
| 2205 | /* Gather query parameters */ |
| 2206 | showLog = atoi(PD("log","1")); |
| 2207 | login_check_credentials(); |
| 2208 | if( !g.perm.Read ){ login_needed(); return; } |
| 2209 | if( exclude_spiders("annotate") ) return; |
| 2210 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2211 | zFilename = P("filename"); |
| 2212 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2213 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2214 | iLimit = atoi(PD("limit","20")); |
| 2215 | if( P("filevers") ) annFlags |= ANN_FILE_VERS; |
| 2216 | ignoreWs = P("w")!=0; |
| 2217 | if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); |
| 2218 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2219 | fossil_redirect_home(); |
| 2220 | } |
| 2221 | |
| 2222 | /* compute the annotation */ |
| 2223 | compute_direct_ancestors(mid, 10000000); |
| 2224 | annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags); |
| 2225 | zCI = ann.aVers[0].zMUuid; |
| 2226 | |
| 2227 | /* generate the web page */ |
| 2228 | style_header("Annotation For %h", zFilename); |
| 2229 | if( bBlame ){ |
| @@ -2316,11 +2296,10 @@ | |
| 2316 | @ <pre> |
| 2317 | for(i=0; i<ann.nOrig; i++){ |
| 2318 | int iVers = ann.aOrig[i].iVers; |
| 2319 | char *z = (char*)ann.aOrig[i].z; |
| 2320 | int n = ann.aOrig[i].n; |
| 2321 | int indent = ann.aOrig[i].indent+1; |
| 2322 | char zPrefix[300]; |
| 2323 | z[n] = 0; |
| 2324 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2325 | |
| 2326 | if( bBlame ){ |
| @@ -2331,26 +2310,26 @@ | |
| 2331 | "<span style='background-color:%s'>" |
| 2332 | "%s%.10s</a> %s</span> %13.13s:", |
| 2333 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2334 | fossil_free(zLink); |
| 2335 | }else{ |
| 2336 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s%*s", indent, " "); |
| 2337 | } |
| 2338 | }else{ |
| 2339 | if( iVers>=0 ){ |
| 2340 | struct AnnVers *p = ann.aVers+iVers; |
| 2341 | char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); |
| 2342 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2343 | "<span style='background-color:%s'>" |
| 2344 | "%s%.10s</a> %s</span> %4d:%*s", |
| 2345 | p->zBgColor, zLink, p->zMUuid, p->zDate, i+1, indent, " "); |
| 2346 | fossil_free(zLink); |
| 2347 | }else{ |
| 2348 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:%*s", "", i+1, indent, " "); |
| 2349 | } |
| 2350 | } |
| 2351 | @ %s(zPrefix)%h(z) |
| 2352 | |
| 2353 | } |
| 2354 | @ </pre> |
| 2355 | style_footer(); |
| 2356 | } |
| @@ -2366,16 +2345,15 @@ | |
| 2366 | ** the file was last modified. The "annotate" command shows line numbers |
| 2367 | ** and omits the username. The "blame" and "praise" commands show the user |
| 2368 | ** who made each checkin and omits the line number. |
| 2369 | ** |
| 2370 | ** Options: |
| 2371 | ** --filevers Show file version numbers rather than check-in versions |
| 2372 | ** -l|--log List all versions analyzed |
| 2373 | ** -n|--limit N Only look backwards in time by N versions |
| 2374 | ** --ignore-space-at-eol Ignore eol-whitespaces |
| 2375 | ** --ignore-space-at-sol Ignore sol-whitespaces |
| 2376 | ** -w Ignore all whitespaces |
| 2377 | ** |
| 2378 | ** See also: info, finfo, timeline |
| 2379 | */ |
| 2380 | void annotate_cmd(void){ |
| 2381 | int fnid; /* Filename ID */ |
| @@ -2387,23 +2365,21 @@ | |
| 2387 | Annotator ann; /* The annotation of the file */ |
| 2388 | int i; /* Loop counter */ |
| 2389 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2390 | int iLimit; /* How far back in time to look */ |
| 2391 | int showLog; /* True to show the log */ |
| 2392 | u64 diffFlags = 0;/* Flags to control whitespace handling */ |
| 2393 | int fileVers; /* Show file version instead of check-in versions */ |
| 2394 | int annFlags = 0; /* Flags to control annotation properties */ |
| 2395 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2396 | |
| 2397 | bBlame = g.argv[1][0]!='a'; |
| 2398 | zLimit = find_option("limit","n",1); |
| 2399 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2400 | iLimit = atoi(zLimit); |
| 2401 | showLog = find_option("log","l",0)!=0; |
| 2402 | if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS; |
| 2403 | if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; |
| 2404 | if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS); |
| 2405 | fileVers = find_option("filevers",0,0)!=0; |
| 2406 | db_must_be_within_tree(); |
| 2407 | if( g.argc<3 ) { |
| 2408 | usage("FILENAME"); |
| 2409 | } |
| @@ -2429,11 +2405,11 @@ | |
| 2429 | fid, fnid); |
| 2430 | if( mid==0 ){ |
| 2431 | fossil_fatal("unable to find manifest"); |
| 2432 | } |
| 2433 | annFlags |= ANN_FILE_ANCEST; |
| 2434 | annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags); |
| 2435 | if( showLog ){ |
| 2436 | struct AnnVers *p; |
| 2437 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2438 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2439 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| @@ -2441,28 +2417,27 @@ | |
| 2441 | fossil_print("---------------------------------------------------\n"); |
| 2442 | } |
| 2443 | for(i=0; i<ann.nOrig; i++){ |
| 2444 | int iVers = ann.aOrig[i].iVers; |
| 2445 | char *z = (char*)ann.aOrig[i].z; |
| 2446 | int indent = ann.aOrig[i].indent + 1; |
| 2447 | int n = ann.aOrig[i].n; |
| 2448 | struct AnnVers *p; |
| 2449 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2450 | p = ann.aVers + iVers; |
| 2451 | if( bBlame ){ |
| 2452 | if( iVers>=0 ){ |
| 2453 | fossil_print("%.10s %s %13.13s:%*s%.*s\n", |
| 2454 | fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, indent, " ", n, z); |
| 2455 | }else{ |
| 2456 | fossil_print("%35s %*s%.*s\n", "", indent, " ", n, z); |
| 2457 | } |
| 2458 | }else{ |
| 2459 | if( iVers>=0 ){ |
| 2460 | fossil_print("%.10s %s %5d:%*s%.*s\n", |
| 2461 | fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, indent, " ", n, z); |
| 2462 | }else{ |
| 2463 | fossil_print("%21s %5d:%*s%.*s\n", |
| 2464 | "", i+1, indent, " ", n, z); |
| 2465 | } |
| 2466 | } |
| 2467 | } |
| 2468 | } |
| 2469 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -28,12 +28,12 @@ | |
| 28 | ** Flag parameters to the text_diff() routine used to control the formatting |
| 29 | ** of the diff output. |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */ |
| 35 | #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */ |
| 36 | #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */ |
| 39 | #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */ |
| @@ -76,11 +76,12 @@ | |
| 76 | */ |
| 77 | typedef struct DLine DLine; |
| 78 | struct DLine { |
| 79 | const char *z; /* The text of the line */ |
| 80 | unsigned int h; /* Hash of the line */ |
| 81 | unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ |
| 82 | unsigned short n; /* number of bytes */ |
| 83 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 84 | |
| 85 | /* an array of DLine elements serves two purposes. The fields |
| 86 | ** above are one per line of input text. But each entry is also |
| 87 | ** a bucket in a hash table, as follows: */ |
| @@ -130,11 +131,11 @@ | |
| 131 | ** |
| 132 | ** Profiling show that in most cases this routine consumes the bulk of |
| 133 | ** the CPU time on a diff. |
| 134 | */ |
| 135 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 136 | int nLine, i, j, k, s, x; |
| 137 | unsigned int h, h2; |
| 138 | DLine *a; |
| 139 | |
| 140 | /* Count the number of lines. Allocate space to hold |
| 141 | ** the returned array. |
| @@ -163,27 +164,19 @@ | |
| 164 | } |
| 165 | |
| 166 | /* Fill in the array */ |
| 167 | for(i=0; i<nLine; i++){ |
| 168 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 169 | a[i].z = z; |
| 170 | a[i].n = k = j; |
| 171 | s = 0; |
| 172 | if( diffFlags & DIFF_IGNORE_EOLWS ){ |
| 173 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; } |
| 174 | } |
| 175 | if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ |
| 176 | while( s<k && fossil_isspace(z[s]) ){ s++; } |
| 177 | } |
| 178 | a[i].indent = s; |
| 179 | for(h=0, x=s; x<k; x++){ |
| 180 | h = h ^ (h<<2) ^ z[x]; |
| 181 | } |
| 182 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); |
| @@ -200,11 +193,12 @@ | |
| 193 | |
| 194 | /* |
| 195 | ** Return true if two DLine elements are identical. |
| 196 | */ |
| 197 | static int same_dline(DLine *pA, DLine *pB){ |
| 198 | return pA->h==pB->h && memcmp(pA->z+pA->indent,pB->z+pB->indent, |
| 199 | pA->h & LENGTH_MASK)==0; |
| 200 | } |
| 201 | |
| 202 | /* |
| 203 | ** Return true if the regular expression *pRe matches any of the |
| 204 | ** N dlines |
| @@ -240,22 +234,16 @@ | |
| 234 | }else if( cPrefix=='+' ){ |
| 235 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 236 | }else if( cPrefix=='-' ){ |
| 237 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 238 | } |
| 239 | htmlize_to_blob(pOut, pLine->z, pLine->n); |
| 240 | if( cPrefix!=' ' ){ |
| 241 | blob_append(pOut, "</span>", -1); |
| 242 | } |
| 243 | }else{ |
| 244 | blob_append(pOut, pLine->z, pLine->n); |
| 245 | } |
| 246 | blob_append(pOut, "\n", 1); |
| 247 | } |
| 248 | |
| 249 | /* |
| @@ -427,11 +415,11 @@ | |
| 415 | b += m; |
| 416 | if( i<nr-1 ){ |
| 417 | m = R[r+i*3+3]; |
| 418 | for(j=0; j<m; j++){ |
| 419 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 420 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 421 | } |
| 422 | b += m; |
| 423 | a += m; |
| 424 | } |
| 425 | } |
| @@ -440,11 +428,11 @@ | |
| 428 | assert( nr==i ); |
| 429 | m = R[r+nr*3]; |
| 430 | if( m>nContext ) m = nContext; |
| 431 | for(j=0; j<m; j++){ |
| 432 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 433 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | /* |
| @@ -501,11 +489,11 @@ | |
| 489 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 490 | ** to test the ability of the diff code to handle such characters. |
| 491 | */ |
| 492 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 493 | Blob *pCol = p->apCols[col]; |
| 494 | int n = pLine->n; |
| 495 | int i; /* Number of input characters consumed */ |
| 496 | int k; /* Cursor position */ |
| 497 | int needEndSpan = 0; |
| 498 | const char *zIn = pLine->z; |
| 499 | int w = p->width; |
| @@ -532,13 +520,10 @@ | |
| 520 | p->iEnd = p->iEnd2; |
| 521 | p->iEnd2 = 0; |
| 522 | } |
| 523 | } |
| 524 | } |
| 525 | if( c=='\t' && !p->escHtml ){ |
| 526 | blob_append(pCol, " ", 1); |
| 527 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 528 | blob_append(pCol, " ", 1); |
| 529 | k++; |
| @@ -562,11 +547,11 @@ | |
| 547 | blob_append(pCol, "</span>", 7); |
| 548 | } |
| 549 | if( col==SBS_TXTB ){ |
| 550 | sbsWriteNewlines(p); |
| 551 | }else if( !p->escHtml ){ |
| 552 | sbsWriteSpace(p, w-k, SBS_TXTA); |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | /* |
| 557 | ** Append a column to the final output blob. |
| @@ -1789,11 +1774,11 @@ | |
| 1774 | if( diffFlags & DIFF_INVERT ){ |
| 1775 | Blob *pTemp = pA_Blob; |
| 1776 | pA_Blob = pB_Blob; |
| 1777 | pB_Blob = pTemp; |
| 1778 | } |
| 1779 | ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0; |
| 1780 | blob_to_utf8_no_bom(pA_Blob, 0); |
| 1781 | blob_to_utf8_no_bom(pB_Blob, 0); |
| 1782 | |
| 1783 | /* Prepare the input files */ |
| 1784 | memset(&c, 0, sizeof(c)); |
| @@ -1859,22 +1844,21 @@ | |
| 1844 | |
| 1845 | /* |
| 1846 | ** Process diff-related command-line options and return an appropriate |
| 1847 | ** "diffFlags" integer. |
| 1848 | ** |
| 1849 | ** --brief Show filenames only DIFF_BRIEF |
| 1850 | ** -c|--context N N lines of context. DIFF_CONTEXT_MASK |
| 1851 | ** --html Format for HTML DIFF_HTML |
| 1852 | ** --invert Invert the diff DIFF_INVERT |
| 1853 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1854 | ** --noopt Disable optimization DIFF_NOOPT |
| 1855 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1856 | ** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS |
| 1857 | ** --width|-W N N character lines. DIFF_WIDTH_MASK |
| 1858 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1859 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1860 | */ |
| 1861 | u64 diff_options(void){ |
| 1862 | u64 diffFlags = 0; |
| 1863 | const char *z; |
| 1864 | int f; |
| @@ -1888,13 +1872,12 @@ | |
| 1872 | f *= DIFF_CONTEXT_MASK+1; |
| 1873 | if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK; |
| 1874 | diffFlags |= f; |
| 1875 | } |
| 1876 | if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML; |
| 1877 | if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS; |
| 1878 | if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS; |
| 1879 | if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO; |
| 1880 | if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT; |
| 1881 | if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT; |
| 1882 | if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF; |
| 1883 | return diffFlags; |
| @@ -1971,14 +1954,11 @@ | |
| 1954 | typedef struct Annotator Annotator; |
| 1955 | struct Annotator { |
| 1956 | DContext c; /* The diff-engine context */ |
| 1957 | struct AnnLine { /* Lines of the original files... */ |
| 1958 | const char *z; /* The text of the line */ |
| 1959 | short int n; /* Number of bytes (omitting trailing space and \n) */ |
| 1960 | short int iVers; /* Level at which tag was set */ |
| 1961 | } *aOrig; |
| 1962 | int nOrig; /* Number of elements in aOrig[] */ |
| 1963 | int nVers; /* Number of versions analyzed */ |
| 1964 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2008,12 +1988,11 @@ | |
| 1988 | return 1; |
| 1989 | } |
| 1990 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 1991 | for(i=0; i<p->c.nTo; i++){ |
| 1992 | p->aOrig[i].z = p->c.aTo[i].z; |
| 1993 | p->aOrig[i].n = p->c.aTo[i].n; |
| 1994 | p->aOrig[i].iVers = -1; |
| 1995 | } |
| 1996 | p->nOrig = p->c.nTo; |
| 1997 | return 0; |
| 1998 | } |
| @@ -2066,13 +2045,13 @@ | |
| 2045 | /* Return no errors */ |
| 2046 | return 0; |
| 2047 | } |
| 2048 | |
| 2049 | |
| 2050 | /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ |
| 2051 | #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ |
| 2052 | #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ |
| 2053 | |
| 2054 | /* |
| 2055 | ** Compute a complete annotation on a file. The file is identified |
| 2056 | ** by its filename number (filename.fnid) and the baseline in which |
| 2057 | ** it was checked in (mlink.mid). |
| @@ -2080,12 +2059,11 @@ | |
| 2059 | static void annotate_file( |
| 2060 | Annotator *p, /* The annotator */ |
| 2061 | int fnid, /* The name of the file to be annotated */ |
| 2062 | int mid, /* Use the version of the file in this check-in */ |
| 2063 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2064 | u64 annFlags /* Flags to alter the annotation */ |
| 2065 | ){ |
| 2066 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2067 | Blob step; /* Text of previous revision */ |
| 2068 | int rid; /* Artifact ID of the file being annotated */ |
| 2069 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2099,11 +2077,12 @@ | |
| 2077 | } |
| 2078 | if( !content_get(rid, &toAnnotate) ){ |
| 2079 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2080 | } |
| 2081 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2082 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2083 | annotation_start(p, &toAnnotate, annFlags); |
| 2084 | db_begin_transaction(); |
| 2085 | db_multi_exec( |
| 2086 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2087 | "DELETE FROM vseen;" |
| 2088 | ); |
| @@ -2133,11 +2112,12 @@ | |
| 2112 | p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1)); |
| 2113 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2114 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2115 | if( p->nVers ){ |
| 2116 | content_get(rid, &step); |
| 2117 | blob_to_utf8_no_bom(&step, 0); |
| 2118 | annotation_step(p, &step, p->nVers-1, annFlags); |
| 2119 | blob_reset(&step); |
| 2120 | } |
| 2121 | p->nVers++; |
| 2122 | db_bind_int(&ins, ":rid", rid); |
| 2123 | db_step(&ins); |
| @@ -2188,14 +2168,13 @@ | |
| 2168 | void annotation_page(void){ |
| 2169 | int mid; |
| 2170 | int fnid; |
| 2171 | int i; |
| 2172 | int iLimit; /* Depth limit */ |
| 2173 | u64 annFlags = ANN_FILE_ANCEST; |
| 2174 | int showLog = 0; /* True to display the log */ |
| 2175 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2176 | const char *zFilename; /* Name of file to annotate */ |
| 2177 | const char *zCI; /* The check-in containing zFilename */ |
| 2178 | Annotator ann; |
| 2179 | HQuery url; |
| 2180 | struct AnnVers *p; |
| @@ -2205,25 +2184,26 @@ | |
| 2184 | /* Gather query parameters */ |
| 2185 | showLog = atoi(PD("log","1")); |
| 2186 | login_check_credentials(); |
| 2187 | if( !g.perm.Read ){ login_needed(); return; } |
| 2188 | if( exclude_spiders("annotate") ) return; |
| 2189 | load_control(); |
| 2190 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2191 | zFilename = P("filename"); |
| 2192 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2193 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2194 | iLimit = atoi(PD("limit","20")); |
| 2195 | if( P("filevers") ) annFlags |= ANN_FILE_VERS; |
| 2196 | ignoreWs = P("w")!=0; |
| 2197 | if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; |
| 2198 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2199 | fossil_redirect_home(); |
| 2200 | } |
| 2201 | |
| 2202 | /* compute the annotation */ |
| 2203 | compute_direct_ancestors(mid, 10000000); |
| 2204 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2205 | zCI = ann.aVers[0].zMUuid; |
| 2206 | |
| 2207 | /* generate the web page */ |
| 2208 | style_header("Annotation For %h", zFilename); |
| 2209 | if( bBlame ){ |
| @@ -2316,11 +2296,10 @@ | |
| 2296 | @ <pre> |
| 2297 | for(i=0; i<ann.nOrig; i++){ |
| 2298 | int iVers = ann.aOrig[i].iVers; |
| 2299 | char *z = (char*)ann.aOrig[i].z; |
| 2300 | int n = ann.aOrig[i].n; |
| 2301 | char zPrefix[300]; |
| 2302 | z[n] = 0; |
| 2303 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2304 | |
| 2305 | if( bBlame ){ |
| @@ -2331,26 +2310,26 @@ | |
| 2310 | "<span style='background-color:%s'>" |
| 2311 | "%s%.10s</a> %s</span> %13.13s:", |
| 2312 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2313 | fossil_free(zLink); |
| 2314 | }else{ |
| 2315 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", ""); |
| 2316 | } |
| 2317 | }else{ |
| 2318 | if( iVers>=0 ){ |
| 2319 | struct AnnVers *p = ann.aVers+iVers; |
| 2320 | char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); |
| 2321 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2322 | "<span style='background-color:%s'>" |
| 2323 | "%s%.10s</a> %s</span> %4d:", |
| 2324 | p->zBgColor, zLink, p->zMUuid, p->zDate, i+1); |
| 2325 | fossil_free(zLink); |
| 2326 | }else{ |
| 2327 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:", "", i+1); |
| 2328 | } |
| 2329 | } |
| 2330 | @ %s(zPrefix) %h(z) |
| 2331 | |
| 2332 | } |
| 2333 | @ </pre> |
| 2334 | style_footer(); |
| 2335 | } |
| @@ -2366,16 +2345,15 @@ | |
| 2345 | ** the file was last modified. The "annotate" command shows line numbers |
| 2346 | ** and omits the username. The "blame" and "praise" commands show the user |
| 2347 | ** who made each checkin and omits the line number. |
| 2348 | ** |
| 2349 | ** Options: |
| 2350 | ** --filevers Show file version numbers rather than check-in versions |
| 2351 | ** -l|--log List all versions analyzed |
| 2352 | ** -n|--limit N Only look backwards in time by N versions |
| 2353 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces |
| 2354 | ** -w|--ignore-all-space Ignore all whitespaces |
| 2355 | ** |
| 2356 | ** See also: info, finfo, timeline |
| 2357 | */ |
| 2358 | void annotate_cmd(void){ |
| 2359 | int fnid; /* Filename ID */ |
| @@ -2387,23 +2365,21 @@ | |
| 2365 | Annotator ann; /* The annotation of the file */ |
| 2366 | int i; /* Loop counter */ |
| 2367 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2368 | int iLimit; /* How far back in time to look */ |
| 2369 | int showLog; /* True to show the log */ |
| 2370 | int fileVers; /* Show file version instead of check-in versions */ |
| 2371 | u64 annFlags = 0; /* Flags to control annotation properties */ |
| 2372 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2373 | |
| 2374 | bBlame = g.argv[1][0]!='a'; |
| 2375 | zLimit = find_option("limit","n",1); |
| 2376 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2377 | iLimit = atoi(zLimit); |
| 2378 | showLog = find_option("log","l",0)!=0; |
| 2379 | if( find_option("ignore-trailing-space","Z",0)!=0 ) annFlags |= DIFF_IGNORE_EOLWS; |
| 2380 | if( find_option("ignore-all-space","w",0)!=0 ) annFlags |= DIFF_IGNORE_ALLWS; |
| 2381 | fileVers = find_option("filevers",0,0)!=0; |
| 2382 | db_must_be_within_tree(); |
| 2383 | if( g.argc<3 ) { |
| 2384 | usage("FILENAME"); |
| 2385 | } |
| @@ -2429,11 +2405,11 @@ | |
| 2405 | fid, fnid); |
| 2406 | if( mid==0 ){ |
| 2407 | fossil_fatal("unable to find manifest"); |
| 2408 | } |
| 2409 | annFlags |= ANN_FILE_ANCEST; |
| 2410 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2411 | if( showLog ){ |
| 2412 | struct AnnVers *p; |
| 2413 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2414 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2415 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| @@ -2441,28 +2417,27 @@ | |
| 2417 | fossil_print("---------------------------------------------------\n"); |
| 2418 | } |
| 2419 | for(i=0; i<ann.nOrig; i++){ |
| 2420 | int iVers = ann.aOrig[i].iVers; |
| 2421 | char *z = (char*)ann.aOrig[i].z; |
| 2422 | int n = ann.aOrig[i].n; |
| 2423 | struct AnnVers *p; |
| 2424 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2425 | p = ann.aVers + iVers; |
| 2426 | if( bBlame ){ |
| 2427 | if( iVers>=0 ){ |
| 2428 | fossil_print("%.10s %s %13.13s: %.*s\n", |
| 2429 | fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, n, z); |
| 2430 | }else{ |
| 2431 | fossil_print("%35s %.*s\n", "", n, z); |
| 2432 | } |
| 2433 | }else{ |
| 2434 | if( iVers>=0 ){ |
| 2435 | fossil_print("%.10s %s %5d: %.*s\n", |
| 2436 | fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, n, z); |
| 2437 | }else{ |
| 2438 | fossil_print("%21s %5d: %.*s\n", |
| 2439 | "", i+1, n, z); |
| 2440 | } |
| 2441 | } |
| 2442 | } |
| 2443 | } |
| 2444 |
+16
-17
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1089,27 +1089,26 @@ | ||
| 1089 | 1089 | ** The "--binary" option causes files matching the glob PATTERN to be treated |
| 1090 | 1090 | ** as binary when considering if they should be used with external diff program. |
| 1091 | 1091 | ** This option overrides the "binary-glob" setting. |
| 1092 | 1092 | ** |
| 1093 | 1093 | ** Options: |
| 1094 | -** --binary PATTERN Treat files that match the glob PATTERN as binary | |
| 1095 | -** --branch BRANCH Show diff of all changes on BRANCH | |
| 1096 | -** --brief Show filenames only | |
| 1097 | -** --context|-c N Use N lines of context | |
| 1098 | -** --diff-binary BOOL Include binary files when using external commands | |
| 1099 | -** --from|-r VERSION select VERSION as source for the diff | |
| 1100 | -** --ignore-space-at-eol Ignore changes to end-of-line whitespace | |
| 1101 | -** --ignore-space-at-sol Ignore changes to start-of-line whitespace | |
| 1102 | -** --internal|-i use internal diff logic | |
| 1103 | -** --side-by-side|-y side-by-side diff | |
| 1104 | -** --tk Launch a Tcl/Tk GUI for display | |
| 1105 | -** --to VERSION select VERSION as target for the diff | |
| 1106 | -** --unified unified diff | |
| 1107 | -** -v|--verbose output complete text of added or deleted files | |
| 1108 | -** -w Ignore changes to start-of-line and end-of-line | |
| 1109 | -** whitespace | |
| 1110 | -** -W|--width Width of lines in side-by-side diff | |
| 1094 | +** --binary PATTERN Treat files that match the glob PATTERN as binary | |
| 1095 | +** --branch BRANCH Show diff of all changes on BRANCH | |
| 1096 | +** --brief Show filenames only | |
| 1097 | +** --context|-c N Use N lines of context | |
| 1098 | +** --diff-binary BOOL Include binary files when using external commands | |
| 1099 | +** --from|-r VERSION select VERSION as source for the diff | |
| 1100 | +** --internal|-i use internal diff logic | |
| 1101 | +** --side-by-side|-y side-by-side diff | |
| 1102 | +** --tk Launch a Tcl/Tk GUI for display | |
| 1103 | +** --to VERSION select VERSION as target for the diff | |
| 1104 | +** --unified unified diff | |
| 1105 | +** -v|--verbose output complete text of added or deleted files | |
| 1106 | +** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line | |
| 1107 | +** whitespace | |
| 1108 | +** -W|--width Width of lines in side-by-side diff | |
| 1109 | +** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace | |
| 1111 | 1110 | */ |
| 1112 | 1111 | void diff_cmd(void){ |
| 1113 | 1112 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | 1113 | int isInternDiff; /* True for internal diff */ |
| 1115 | 1114 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 | 1115 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1089,27 +1089,26 @@ | |
| 1089 | ** The "--binary" option causes files matching the glob PATTERN to be treated |
| 1090 | ** as binary when considering if they should be used with external diff program. |
| 1091 | ** This option overrides the "binary-glob" setting. |
| 1092 | ** |
| 1093 | ** Options: |
| 1094 | ** --binary PATTERN Treat files that match the glob PATTERN as binary |
| 1095 | ** --branch BRANCH Show diff of all changes on BRANCH |
| 1096 | ** --brief Show filenames only |
| 1097 | ** --context|-c N Use N lines of context |
| 1098 | ** --diff-binary BOOL Include binary files when using external commands |
| 1099 | ** --from|-r VERSION select VERSION as source for the diff |
| 1100 | ** --ignore-space-at-eol Ignore changes to end-of-line whitespace |
| 1101 | ** --ignore-space-at-sol Ignore changes to start-of-line whitespace |
| 1102 | ** --internal|-i use internal diff logic |
| 1103 | ** --side-by-side|-y side-by-side diff |
| 1104 | ** --tk Launch a Tcl/Tk GUI for display |
| 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | ** --unified unified diff |
| 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | ** -w Ignore changes to start-of-line and end-of-line |
| 1109 | ** whitespace |
| 1110 | ** -W|--width Width of lines in side-by-side diff |
| 1111 | */ |
| 1112 | void diff_cmd(void){ |
| 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1089,27 +1089,26 @@ | |
| 1089 | ** The "--binary" option causes files matching the glob PATTERN to be treated |
| 1090 | ** as binary when considering if they should be used with external diff program. |
| 1091 | ** This option overrides the "binary-glob" setting. |
| 1092 | ** |
| 1093 | ** Options: |
| 1094 | ** --binary PATTERN Treat files that match the glob PATTERN as binary |
| 1095 | ** --branch BRANCH Show diff of all changes on BRANCH |
| 1096 | ** --brief Show filenames only |
| 1097 | ** --context|-c N Use N lines of context |
| 1098 | ** --diff-binary BOOL Include binary files when using external commands |
| 1099 | ** --from|-r VERSION select VERSION as source for the diff |
| 1100 | ** --internal|-i use internal diff logic |
| 1101 | ** --side-by-side|-y side-by-side diff |
| 1102 | ** --tk Launch a Tcl/Tk GUI for display |
| 1103 | ** --to VERSION select VERSION as target for the diff |
| 1104 | ** --unified unified diff |
| 1105 | ** -v|--verbose output complete text of added or deleted files |
| 1106 | ** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line |
| 1107 | ** whitespace |
| 1108 | ** -W|--width Width of lines in side-by-side diff |
| 1109 | ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace |
| 1110 | */ |
| 1111 | void diff_cmd(void){ |
| 1112 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1113 | int isInternDiff; /* True for internal diff */ |
| 1114 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1115 |
+2
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -342,12 +342,12 @@ | ||
| 342 | 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | 344 | } |
| 345 | 345 | db_finalize(&q); |
| 346 | 346 | } |
| 347 | - if( g.zLogin ){ | |
| 348 | - blob_appendf(&event, "U %F\n", g.zLogin); | |
| 347 | + if( !login_is_nobody() ){ | |
| 348 | + blob_appendf(&event, "U %F\n", login_name()); | |
| 349 | 349 | } |
| 350 | 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | 351 | md5sum_blob(&event, &cksum); |
| 352 | 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | 353 | blob_reset(&cksum); |
| 354 | 354 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -342,12 +342,12 @@ | |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( g.zLogin ){ |
| 348 | blob_appendf(&event, "U %F\n", g.zLogin); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | blob_reset(&cksum); |
| 354 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -342,12 +342,12 @@ | |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( !login_is_nobody() ){ |
| 348 | blob_appendf(&event, "U %F\n", login_name()); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | blob_reset(&cksum); |
| 354 |
+6
-7
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -460,11 +460,11 @@ | ||
| 460 | 460 | }else{ |
| 461 | 461 | diffFlags = DIFF_INLINE; |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | if( P("w") ){ |
| 465 | - diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS); | |
| 465 | + diffFlags |= DIFF_IGNORE_ALLWS; | |
| 466 | 466 | } |
| 467 | 467 | /* "dc" query parameter determines lines of context */ |
| 468 | 468 | x = atoi(PD("dc","7")); |
| 469 | 469 | if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK; |
| 470 | 470 | diffFlags += x; |
| @@ -678,11 +678,11 @@ | ||
| 678 | 678 | verboseFlag = !verboseFlag; |
| 679 | 679 | zPage = "ci"; |
| 680 | 680 | zPageHide = "vinfo"; |
| 681 | 681 | } |
| 682 | 682 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 683 | - zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; | |
| 683 | + zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; | |
| 684 | 684 | if( verboseFlag ){ |
| 685 | 685 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 686 | 686 | @ Hide Diffs</a> |
| 687 | 687 | if( sideBySide ){ |
| 688 | 688 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) |
| @@ -988,11 +988,11 @@ | ||
| 988 | 988 | zTo = P("to"); |
| 989 | 989 | if(zGlob && !*zGlob){ |
| 990 | 990 | zGlob = NULL; |
| 991 | 991 | } |
| 992 | 992 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 993 | - zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; | |
| 993 | + zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; | |
| 994 | 994 | if( sideBySide || verboseFlag ){ |
| 995 | 995 | style_submenu_element("Hide Diff", "hidediff", |
| 996 | 996 | "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", |
| 997 | 997 | zFrom, zTo, |
| 998 | 998 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| @@ -1382,13 +1382,12 @@ | ||
| 1382 | 1382 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1383 | 1383 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1384 | 1384 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1385 | 1385 | |
| 1386 | 1386 | style_header("Diff"); |
| 1387 | - zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; | |
| 1387 | + zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; | |
| 1388 | 1388 | if( *zW ){ |
| 1389 | - diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS); | |
| 1390 | 1389 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1391 | 1390 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1392 | 1391 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1393 | 1392 | }else{ |
| 1394 | 1393 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1443,11 @@ | ||
| 1444 | 1443 | rid = name_to_rid_www("name"); |
| 1445 | 1444 | login_check_credentials(); |
| 1446 | 1445 | if( !g.perm.Read ){ login_needed(); return; } |
| 1447 | 1446 | if( rid==0 ) fossil_redirect_home(); |
| 1448 | 1447 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1449 | - if( fossil_strcmp(P("name"), zUuid)==0 ){ | |
| 1448 | + if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){ | |
| 1450 | 1449 | g.isConst = 1; |
| 1451 | 1450 | } |
| 1452 | 1451 | free(zUuid); |
| 1453 | 1452 | zMime = P("m"); |
| 1454 | 1453 | if( zMime==0 ){ |
| @@ -2263,11 +2262,11 @@ | ||
| 2263 | 2262 | } |
| 2264 | 2263 | db_finalize(&q); |
| 2265 | 2264 | if( nChng>0 ){ |
| 2266 | 2265 | int nrid; |
| 2267 | 2266 | Blob cksum; |
| 2268 | - blob_appendf(&ctrl, "U %F\n", g.zLogin); | |
| 2267 | + blob_appendf(&ctrl, "U %F\n", login_name()); | |
| 2269 | 2268 | md5sum_blob(&ctrl, &cksum); |
| 2270 | 2269 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2271 | 2270 | db_begin_transaction(); |
| 2272 | 2271 | g.markPrivate = content_is_private(rid); |
| 2273 | 2272 | nrid = content_put(&ctrl); |
| 2274 | 2273 | |
| 2275 | 2274 | ADDED src/loadctrl.c |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -460,11 +460,11 @@ | |
| 460 | }else{ |
| 461 | diffFlags = DIFF_INLINE; |
| 462 | } |
| 463 | |
| 464 | if( P("w") ){ |
| 465 | diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS); |
| 466 | } |
| 467 | /* "dc" query parameter determines lines of context */ |
| 468 | x = atoi(PD("dc","7")); |
| 469 | if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK; |
| 470 | diffFlags += x; |
| @@ -678,11 +678,11 @@ | |
| 678 | verboseFlag = !verboseFlag; |
| 679 | zPage = "ci"; |
| 680 | zPageHide = "vinfo"; |
| 681 | } |
| 682 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 683 | zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; |
| 684 | if( verboseFlag ){ |
| 685 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 686 | @ Hide Diffs</a> |
| 687 | if( sideBySide ){ |
| 688 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) |
| @@ -988,11 +988,11 @@ | |
| 988 | zTo = P("to"); |
| 989 | if(zGlob && !*zGlob){ |
| 990 | zGlob = NULL; |
| 991 | } |
| 992 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 993 | zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; |
| 994 | if( sideBySide || verboseFlag ){ |
| 995 | style_submenu_element("Hide Diff", "hidediff", |
| 996 | "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", |
| 997 | zFrom, zTo, |
| 998 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| @@ -1382,13 +1382,12 @@ | |
| 1382 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1383 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1384 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1385 | |
| 1386 | style_header("Diff"); |
| 1387 | zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":""; |
| 1388 | if( *zW ){ |
| 1389 | diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS); |
| 1390 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1391 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1392 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1393 | }else{ |
| 1394 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1443,11 @@ | |
| 1444 | rid = name_to_rid_www("name"); |
| 1445 | login_check_credentials(); |
| 1446 | if( !g.perm.Read ){ login_needed(); return; } |
| 1447 | if( rid==0 ) fossil_redirect_home(); |
| 1448 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1449 | if( fossil_strcmp(P("name"), zUuid)==0 ){ |
| 1450 | g.isConst = 1; |
| 1451 | } |
| 1452 | free(zUuid); |
| 1453 | zMime = P("m"); |
| 1454 | if( zMime==0 ){ |
| @@ -2263,11 +2262,11 @@ | |
| 2263 | } |
| 2264 | db_finalize(&q); |
| 2265 | if( nChng>0 ){ |
| 2266 | int nrid; |
| 2267 | Blob cksum; |
| 2268 | blob_appendf(&ctrl, "U %F\n", g.zLogin); |
| 2269 | md5sum_blob(&ctrl, &cksum); |
| 2270 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2271 | db_begin_transaction(); |
| 2272 | g.markPrivate = content_is_private(rid); |
| 2273 | nrid = content_put(&ctrl); |
| 2274 | |
| 2275 | DDED src/loadctrl.c |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -460,11 +460,11 @@ | |
| 460 | }else{ |
| 461 | diffFlags = DIFF_INLINE; |
| 462 | } |
| 463 | |
| 464 | if( P("w") ){ |
| 465 | diffFlags |= DIFF_IGNORE_ALLWS; |
| 466 | } |
| 467 | /* "dc" query parameter determines lines of context */ |
| 468 | x = atoi(PD("dc","7")); |
| 469 | if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK; |
| 470 | diffFlags += x; |
| @@ -678,11 +678,11 @@ | |
| 678 | verboseFlag = !verboseFlag; |
| 679 | zPage = "ci"; |
| 680 | zPageHide = "vinfo"; |
| 681 | } |
| 682 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 683 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 684 | if( verboseFlag ){ |
| 685 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 686 | @ Hide Diffs</a> |
| 687 | if( sideBySide ){ |
| 688 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) |
| @@ -988,11 +988,11 @@ | |
| 988 | zTo = P("to"); |
| 989 | if(zGlob && !*zGlob){ |
| 990 | zGlob = NULL; |
| 991 | } |
| 992 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 993 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 994 | if( sideBySide || verboseFlag ){ |
| 995 | style_submenu_element("Hide Diff", "hidediff", |
| 996 | "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", |
| 997 | zFrom, zTo, |
| 998 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| @@ -1382,13 +1382,12 @@ | |
| 1382 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1383 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1384 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1385 | |
| 1386 | style_header("Diff"); |
| 1387 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1388 | if( *zW ){ |
| 1389 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1390 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1391 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1392 | }else{ |
| 1393 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1443,11 @@ | |
| 1443 | rid = name_to_rid_www("name"); |
| 1444 | login_check_credentials(); |
| 1445 | if( !g.perm.Read ){ login_needed(); return; } |
| 1446 | if( rid==0 ) fossil_redirect_home(); |
| 1447 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1448 | if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){ |
| 1449 | g.isConst = 1; |
| 1450 | } |
| 1451 | free(zUuid); |
| 1452 | zMime = P("m"); |
| 1453 | if( zMime==0 ){ |
| @@ -2263,11 +2262,11 @@ | |
| 2262 | } |
| 2263 | db_finalize(&q); |
| 2264 | if( nChng>0 ){ |
| 2265 | int nrid; |
| 2266 | Blob cksum; |
| 2267 | blob_appendf(&ctrl, "U %F\n", login_name()); |
| 2268 | md5sum_blob(&ctrl, &cksum); |
| 2269 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2270 | db_begin_transaction(); |
| 2271 | g.markPrivate = content_is_private(rid); |
| 2272 | nrid = content_put(&ctrl); |
| 2273 | |
| 2274 | DDED src/loadctrl.c |
+1
| --- a/src/loadctrl.c | ||
| +++ b/src/loadctrl.c | ||
| @@ -0,0 +1 @@ | ||
| 1 | +header(test_loadavgooter(loadavg_test"0" |
| --- a/src/loadctrl.c | |
| +++ b/src/loadctrl.c | |
| @@ -0,0 +1 @@ | |
| --- a/src/loadctrl.c | |
| +++ b/src/loadctrl.c | |
| @@ -0,0 +1 @@ | |
| 1 | header(test_loadavgooter(loadavg_test"0" |
+14
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1142,10 +1142,24 @@ | ||
| 1142 | 1142 | /* Set the capabilities */ |
| 1143 | 1143 | login_set_capabilities(zCap, 0); |
| 1144 | 1144 | login_anon_once = 1; |
| 1145 | 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | 1146 | } |
| 1147 | + | |
| 1148 | +/* | |
| 1149 | +** Return true if the user is "nobody" | |
| 1150 | +*/ | |
| 1151 | +int login_is_nobody(void){ | |
| 1152 | + return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0; | |
| 1153 | +} | |
| 1154 | + | |
| 1155 | +/* | |
| 1156 | +** Return the login name. If no login name is specified, return "nobody". | |
| 1157 | +*/ | |
| 1158 | +const char *login_name(void){ | |
| 1159 | + return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody"; | |
| 1160 | +} | |
| 1147 | 1161 | |
| 1148 | 1162 | /* |
| 1149 | 1163 | ** Call this routine when the credential check fails. It causes |
| 1150 | 1164 | ** a redirect to the "login" page. |
| 1151 | 1165 | */ |
| 1152 | 1166 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1142,10 +1142,24 @@ | |
| 1142 | /* Set the capabilities */ |
| 1143 | login_set_capabilities(zCap, 0); |
| 1144 | login_anon_once = 1; |
| 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | } |
| 1147 | |
| 1148 | /* |
| 1149 | ** Call this routine when the credential check fails. It causes |
| 1150 | ** a redirect to the "login" page. |
| 1151 | */ |
| 1152 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1142,10 +1142,24 @@ | |
| 1142 | /* Set the capabilities */ |
| 1143 | login_set_capabilities(zCap, 0); |
| 1144 | login_anon_once = 1; |
| 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | } |
| 1147 | |
| 1148 | /* |
| 1149 | ** Return true if the user is "nobody" |
| 1150 | */ |
| 1151 | int login_is_nobody(void){ |
| 1152 | return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0; |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 | ** Return the login name. If no login name is specified, return "nobody". |
| 1157 | */ |
| 1158 | const char *login_name(void){ |
| 1159 | return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody"; |
| 1160 | } |
| 1161 | |
| 1162 | /* |
| 1163 | ** Call this routine when the credential check fails. It causes |
| 1164 | ** a redirect to the "login" page. |
| 1165 | */ |
| 1166 |
+3
-3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | |
| 122 | 122 | struct Global { |
| 123 | 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | - int isConst; /* True if the output is unchanging */ | |
| 126 | + int isConst; /* True if the output is unchanging & cacheable */ | |
| 127 | 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | ||
| 194 | 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | 197 | char *proxyUrlPath; |
| 198 | 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | - const char *zLogin; /* Login name. "" if not logged in. */ | |
| 199 | + const char *zLogin; /* Login name. NULL or "" if not logged in. */ | |
| 200 | 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | 201 | ** SSL client identity */ |
| 202 | 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | ||
| 1459 | 1459 | zAltRepo[jj] = 0; |
| 1460 | 1460 | zAltRepo += jj+1; |
| 1461 | 1461 | }else{ |
| 1462 | 1462 | zUser = "nobody"; |
| 1463 | 1463 | } |
| 1464 | - if( g.zLogin==0 ) zUser = "nobody"; | |
| 1464 | + if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; | |
| 1465 | 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | 1468 | } |
| 1469 | 1469 | db_close(1); |
| 1470 | 1470 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | |
| 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | char *proxyUrlPath; |
| 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | const char *zLogin; /* Login name. "" if not logged in. */ |
| 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | ** SSL client identity */ |
| 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | |
| 1459 | zAltRepo[jj] = 0; |
| 1460 | zAltRepo += jj+1; |
| 1461 | }else{ |
| 1462 | zUser = "nobody"; |
| 1463 | } |
| 1464 | if( g.zLogin==0 ) zUser = "nobody"; |
| 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | } |
| 1469 | db_close(1); |
| 1470 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging & cacheable */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | |
| 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | char *proxyUrlPath; |
| 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | ** SSL client identity */ |
| 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | |
| 1459 | zAltRepo[jj] = 0; |
| 1460 | zAltRepo += jj+1; |
| 1461 | }else{ |
| 1462 | zUser = "nobody"; |
| 1463 | } |
| 1464 | if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; |
| 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | } |
| 1469 | db_close(1); |
| 1470 |
+3
-3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | |
| 122 | 122 | struct Global { |
| 123 | 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | - int isConst; /* True if the output is unchanging */ | |
| 126 | + int isConst; /* True if the output is unchanging & cacheable */ | |
| 127 | 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | ||
| 194 | 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | 197 | char *proxyUrlPath; |
| 198 | 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | - const char *zLogin; /* Login name. "" if not logged in. */ | |
| 199 | + const char *zLogin; /* Login name. NULL or "" if not logged in. */ | |
| 200 | 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | 201 | ** SSL client identity */ |
| 202 | 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | ||
| 1459 | 1459 | zAltRepo[jj] = 0; |
| 1460 | 1460 | zAltRepo += jj+1; |
| 1461 | 1461 | }else{ |
| 1462 | 1462 | zUser = "nobody"; |
| 1463 | 1463 | } |
| 1464 | - if( g.zLogin==0 ) zUser = "nobody"; | |
| 1464 | + if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; | |
| 1465 | 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | 1468 | } |
| 1469 | 1469 | db_close(1); |
| 1470 | 1470 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | |
| 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | char *proxyUrlPath; |
| 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | const char *zLogin; /* Login name. "" if not logged in. */ |
| 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | ** SSL client identity */ |
| 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | |
| 1459 | zAltRepo[jj] = 0; |
| 1460 | zAltRepo += jj+1; |
| 1461 | }else{ |
| 1462 | zUser = "nobody"; |
| 1463 | } |
| 1464 | if( g.zLogin==0 ) zUser = "nobody"; |
| 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | } |
| 1469 | db_close(1); |
| 1470 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging & cacheable */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -194,11 +194,11 @@ | |
| 194 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 195 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 196 | int useProxy; /* Used to remember that a proxy is in use */ |
| 197 | char *proxyUrlPath; |
| 198 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 199 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 200 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 201 | ** SSL client identity */ |
| 202 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 203 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 204 | int userUid; /* Integer user id */ |
| @@ -1459,11 +1459,11 @@ | |
| 1459 | zAltRepo[jj] = 0; |
| 1460 | zAltRepo += jj+1; |
| 1461 | }else{ |
| 1462 | zUser = "nobody"; |
| 1463 | } |
| 1464 | if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; |
| 1465 | if( zAltRepo[0]!='/' ){ |
| 1466 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1467 | file_simplify_name(zAltRepo, -1, 0); |
| 1468 | } |
| 1469 | db_close(1); |
| 1470 |
+11
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -66,10 +66,11 @@ | ||
| 66 | 66 | $(SRCDIR)/json_tag.c \ |
| 67 | 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | 68 | $(SRCDIR)/json_user.c \ |
| 69 | 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | 70 | $(SRCDIR)/leaf.c \ |
| 71 | + $(SRCDIR)/loadctrl.c \ | |
| 71 | 72 | $(SRCDIR)/login.c \ |
| 72 | 73 | $(SRCDIR)/lookslike.c \ |
| 73 | 74 | $(SRCDIR)/main.c \ |
| 74 | 75 | $(SRCDIR)/manifest.c \ |
| 75 | 76 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | ||
| 176 | 177 | $(OBJDIR)/json_tag_.c \ |
| 177 | 178 | $(OBJDIR)/json_timeline_.c \ |
| 178 | 179 | $(OBJDIR)/json_user_.c \ |
| 179 | 180 | $(OBJDIR)/json_wiki_.c \ |
| 180 | 181 | $(OBJDIR)/leaf_.c \ |
| 182 | + $(OBJDIR)/loadctrl_.c \ | |
| 181 | 183 | $(OBJDIR)/login_.c \ |
| 182 | 184 | $(OBJDIR)/lookslike_.c \ |
| 183 | 185 | $(OBJDIR)/main_.c \ |
| 184 | 186 | $(OBJDIR)/manifest_.c \ |
| 185 | 187 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | ||
| 286 | 288 | $(OBJDIR)/json_tag.o \ |
| 287 | 289 | $(OBJDIR)/json_timeline.o \ |
| 288 | 290 | $(OBJDIR)/json_user.o \ |
| 289 | 291 | $(OBJDIR)/json_wiki.o \ |
| 290 | 292 | $(OBJDIR)/leaf.o \ |
| 293 | + $(OBJDIR)/loadctrl.o \ | |
| 291 | 294 | $(OBJDIR)/login.o \ |
| 292 | 295 | $(OBJDIR)/lookslike.o \ |
| 293 | 296 | $(OBJDIR)/main.o \ |
| 294 | 297 | $(OBJDIR)/manifest.o \ |
| 295 | 298 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | ||
| 422 | 425 | |
| 423 | 426 | |
| 424 | 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 425 | 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 426 | 429 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 427 | - $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 430 | + $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 428 | 431 | touch $(OBJDIR)/headers |
| 429 | 432 | $(OBJDIR)/headers: Makefile |
| 430 | 433 | $(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 : $(SRCDIR)/json_detail.h |
| 431 | 434 | Makefile: |
| 432 | 435 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | ||
| 805 | 808 | |
| 806 | 809 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 807 | 810 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 808 | 811 | |
| 809 | 812 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 813 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 814 | + $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 815 | + | |
| 816 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 817 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 818 | + | |
| 819 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 810 | 820 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 811 | 821 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 812 | 822 | |
| 813 | 823 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 814 | 824 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 815 | 825 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -66,10 +66,11 @@ | |
| 66 | $(SRCDIR)/json_tag.c \ |
| 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | $(SRCDIR)/json_user.c \ |
| 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | $(SRCDIR)/leaf.c \ |
| 71 | $(SRCDIR)/login.c \ |
| 72 | $(SRCDIR)/lookslike.c \ |
| 73 | $(SRCDIR)/main.c \ |
| 74 | $(SRCDIR)/manifest.c \ |
| 75 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | |
| 176 | $(OBJDIR)/json_tag_.c \ |
| 177 | $(OBJDIR)/json_timeline_.c \ |
| 178 | $(OBJDIR)/json_user_.c \ |
| 179 | $(OBJDIR)/json_wiki_.c \ |
| 180 | $(OBJDIR)/leaf_.c \ |
| 181 | $(OBJDIR)/login_.c \ |
| 182 | $(OBJDIR)/lookslike_.c \ |
| 183 | $(OBJDIR)/main_.c \ |
| 184 | $(OBJDIR)/manifest_.c \ |
| 185 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | |
| 286 | $(OBJDIR)/json_tag.o \ |
| 287 | $(OBJDIR)/json_timeline.o \ |
| 288 | $(OBJDIR)/json_user.o \ |
| 289 | $(OBJDIR)/json_wiki.o \ |
| 290 | $(OBJDIR)/leaf.o \ |
| 291 | $(OBJDIR)/login.o \ |
| 292 | $(OBJDIR)/lookslike.o \ |
| 293 | $(OBJDIR)/main.o \ |
| 294 | $(OBJDIR)/manifest.o \ |
| 295 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | |
| 422 | |
| 423 | |
| 424 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 425 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 426 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 427 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 428 | touch $(OBJDIR)/headers |
| 429 | $(OBJDIR)/headers: Makefile |
| 430 | $(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 : $(SRCDIR)/json_detail.h |
| 431 | Makefile: |
| 432 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | |
| 805 | |
| 806 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 807 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 808 | |
| 809 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 810 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 811 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 812 | |
| 813 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 814 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 815 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -66,10 +66,11 @@ | |
| 66 | $(SRCDIR)/json_tag.c \ |
| 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | $(SRCDIR)/json_user.c \ |
| 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | $(SRCDIR)/leaf.c \ |
| 71 | $(SRCDIR)/loadctrl.c \ |
| 72 | $(SRCDIR)/login.c \ |
| 73 | $(SRCDIR)/lookslike.c \ |
| 74 | $(SRCDIR)/main.c \ |
| 75 | $(SRCDIR)/manifest.c \ |
| 76 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | |
| 177 | $(OBJDIR)/json_tag_.c \ |
| 178 | $(OBJDIR)/json_timeline_.c \ |
| 179 | $(OBJDIR)/json_user_.c \ |
| 180 | $(OBJDIR)/json_wiki_.c \ |
| 181 | $(OBJDIR)/leaf_.c \ |
| 182 | $(OBJDIR)/loadctrl_.c \ |
| 183 | $(OBJDIR)/login_.c \ |
| 184 | $(OBJDIR)/lookslike_.c \ |
| 185 | $(OBJDIR)/main_.c \ |
| 186 | $(OBJDIR)/manifest_.c \ |
| 187 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | |
| 288 | $(OBJDIR)/json_tag.o \ |
| 289 | $(OBJDIR)/json_timeline.o \ |
| 290 | $(OBJDIR)/json_user.o \ |
| 291 | $(OBJDIR)/json_wiki.o \ |
| 292 | $(OBJDIR)/leaf.o \ |
| 293 | $(OBJDIR)/loadctrl.o \ |
| 294 | $(OBJDIR)/login.o \ |
| 295 | $(OBJDIR)/lookslike.o \ |
| 296 | $(OBJDIR)/main.o \ |
| 297 | $(OBJDIR)/manifest.o \ |
| 298 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | |
| 425 | |
| 426 | |
| 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 429 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 430 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 431 | touch $(OBJDIR)/headers |
| 432 | $(OBJDIR)/headers: Makefile |
| 433 | $(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 : $(SRCDIR)/json_detail.h |
| 434 | Makefile: |
| 435 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | |
| 808 | |
| 809 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 810 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 811 | |
| 812 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 813 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 814 | $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 815 | |
| 816 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 817 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 818 | |
| 819 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 820 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 821 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 822 | |
| 823 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 824 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 825 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -69,10 +69,11 @@ | ||
| 69 | 69 | json_tag |
| 70 | 70 | json_timeline |
| 71 | 71 | json_user |
| 72 | 72 | json_wiki |
| 73 | 73 | leaf |
| 74 | + loadctrl | |
| 74 | 75 | login |
| 75 | 76 | lookslike |
| 76 | 77 | main |
| 77 | 78 | manifest |
| 78 | 79 | markdown |
| 79 | 80 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -69,10 +69,11 @@ | |
| 69 | json_tag |
| 70 | json_timeline |
| 71 | json_user |
| 72 | json_wiki |
| 73 | leaf |
| 74 | login |
| 75 | lookslike |
| 76 | main |
| 77 | manifest |
| 78 | markdown |
| 79 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -69,10 +69,11 @@ | |
| 69 | json_tag |
| 70 | json_timeline |
| 71 | json_user |
| 72 | json_wiki |
| 73 | leaf |
| 74 | loadctrl |
| 75 | login |
| 76 | lookslike |
| 77 | main |
| 78 | manifest |
| 79 | markdown |
| 80 |
+13
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -962,10 +962,21 @@ | ||
| 962 | 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | 966 | |
| 967 | + @ <hr /> | |
| 968 | + entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg", | |
| 969 | + "0.0", 0); | |
| 970 | + @ <p>Some expensive operations (such as computing tarballs, zip archives, | |
| 971 | + @ or annotation/blame pages) are prohibited if the load average on the host | |
| 972 | + @ computer is too large. Set the threshold for disallowing expensive | |
| 973 | + @ computations here. Set this to 0.0 to disable the load average limit. | |
| 974 | + @ This limit is only enforced on Unix servers. On Linux systems, | |
| 975 | + @ access to the /proc virtual filesystem is required, which means this limit | |
| 976 | + @ might not work inside a chroot() jail.</p> | |
| 977 | + | |
| 967 | 978 | @ <hr /> |
| 968 | 979 | onoff_attribute( |
| 969 | 980 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 970 | 981 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 971 | 982 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | ||
| 973 | 984 | @ HTTP header indicates that the request is coming from an actual human |
| 974 | 985 | @ being and not a a robot or spider and (2) the user agent is able to |
| 975 | 986 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 976 | 987 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 977 | 988 | @ normal browser and they can run javascript just like browsers. But most |
| 978 | - @ bots do not go to that much trouble so this is normally an effective defense.</p> | |
| 989 | + @ bots do not go to that much trouble so this is normally an effective | |
| 990 | + @ defense.</p> | |
| 979 | 991 | @ |
| 980 | 992 | @ <p>You do not normally want a bot to walk your entire repository because |
| 981 | 993 | @ if it does, your server will end up computing diffs and annotations for |
| 982 | 994 | @ every historical version of every file and creating ZIPs and tarballs of |
| 983 | 995 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 984 | 996 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,10 +962,21 @@ | |
| 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | |
| 967 | @ <hr /> |
| 968 | onoff_attribute( |
| 969 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 970 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 971 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | |
| 973 | @ HTTP header indicates that the request is coming from an actual human |
| 974 | @ being and not a a robot or spider and (2) the user agent is able to |
| 975 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 976 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 977 | @ normal browser and they can run javascript just like browsers. But most |
| 978 | @ bots do not go to that much trouble so this is normally an effective defense.</p> |
| 979 | @ |
| 980 | @ <p>You do not normally want a bot to walk your entire repository because |
| 981 | @ if it does, your server will end up computing diffs and annotations for |
| 982 | @ every historical version of every file and creating ZIPs and tarballs of |
| 983 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 984 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,10 +962,21 @@ | |
| 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | |
| 967 | @ <hr /> |
| 968 | entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg", |
| 969 | "0.0", 0); |
| 970 | @ <p>Some expensive operations (such as computing tarballs, zip archives, |
| 971 | @ or annotation/blame pages) are prohibited if the load average on the host |
| 972 | @ computer is too large. Set the threshold for disallowing expensive |
| 973 | @ computations here. Set this to 0.0 to disable the load average limit. |
| 974 | @ This limit is only enforced on Unix servers. On Linux systems, |
| 975 | @ access to the /proc virtual filesystem is required, which means this limit |
| 976 | @ might not work inside a chroot() jail.</p> |
| 977 | |
| 978 | @ <hr /> |
| 979 | onoff_attribute( |
| 980 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 981 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 982 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | |
| 984 | @ HTTP header indicates that the request is coming from an actual human |
| 985 | @ being and not a a robot or spider and (2) the user agent is able to |
| 986 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 987 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 988 | @ normal browser and they can run javascript just like browsers. But most |
| 989 | @ bots do not go to that much trouble so this is normally an effective |
| 990 | @ defense.</p> |
| 991 | @ |
| 992 | @ <p>You do not normally want a bot to walk your entire repository because |
| 993 | @ if it does, your server will end up computing diffs and annotations for |
| 994 | @ every historical version of every file and creating ZIPs and tarballs of |
| 995 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 996 |
+6
-3
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1182,10 +1182,11 @@ | ||
| 1182 | 1182 | ** itself by 2 spaces. |
| 1183 | 1183 | ** |
| 1184 | 1184 | ** * For each "Goto", if the jump destination is earlier in the program |
| 1185 | 1185 | ** and ends on one of: |
| 1186 | 1186 | ** Yield SeekGt SeekLt RowSetRead Rewind |
| 1187 | +** or if the P1 parameter is one instead of zero, | |
| 1187 | 1188 | ** then indent all opcodes between the earlier instruction |
| 1188 | 1189 | ** and "Goto" by 2 spaces. |
| 1189 | 1190 | */ |
| 1190 | 1191 | static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){ |
| 1191 | 1192 | const char *zSql; /* The text of the SQL statement */ |
| @@ -1229,11 +1230,13 @@ | ||
| 1229 | 1230 | p->nIndent = iOp+1; |
| 1230 | 1231 | |
| 1231 | 1232 | if( str_in_array(zOp, azNext) ){ |
| 1232 | 1233 | for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2; |
| 1233 | 1234 | } |
| 1234 | - if( str_in_array(zOp, azGoto) && p2op<p->nIndent && abYield[p2op] ){ | |
| 1235 | + if( str_in_array(zOp, azGoto) && p2op<p->nIndent | |
| 1236 | + && (abYield[p2op] || sqlite3_column_int(pSql, 2)) | |
| 1237 | + ){ | |
| 1235 | 1238 | for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2; |
| 1236 | 1239 | } |
| 1237 | 1240 | } |
| 1238 | 1241 | |
| 1239 | 1242 | p->iIndent = 0; |
| @@ -3815,12 +3818,12 @@ | ||
| 3815 | 3818 | "Enter \".help\" for usage hints.\n", |
| 3816 | 3819 | sqlite3_libversion(), sqlite3_sourceid() |
| 3817 | 3820 | ); |
| 3818 | 3821 | if( warnInmemoryDb ){ |
| 3819 | 3822 | printf("Connected to a "); |
| 3820 | - printBold("transient in-memory database."); | |
| 3821 | - printf("\nUse \".open FILENAME\" to reopen on a " | |
| 3823 | + printBold("transient in-memory database"); | |
| 3824 | + printf(".\nUse \".open FILENAME\" to reopen on a " | |
| 3822 | 3825 | "persistent database.\n"); |
| 3823 | 3826 | } |
| 3824 | 3827 | zHome = find_home_dir(); |
| 3825 | 3828 | if( zHome ){ |
| 3826 | 3829 | nHistory = strlen30(zHome) + 20; |
| 3827 | 3830 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1182,10 +1182,11 @@ | |
| 1182 | ** itself by 2 spaces. |
| 1183 | ** |
| 1184 | ** * For each "Goto", if the jump destination is earlier in the program |
| 1185 | ** and ends on one of: |
| 1186 | ** Yield SeekGt SeekLt RowSetRead Rewind |
| 1187 | ** then indent all opcodes between the earlier instruction |
| 1188 | ** and "Goto" by 2 spaces. |
| 1189 | */ |
| 1190 | static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){ |
| 1191 | const char *zSql; /* The text of the SQL statement */ |
| @@ -1229,11 +1230,13 @@ | |
| 1229 | p->nIndent = iOp+1; |
| 1230 | |
| 1231 | if( str_in_array(zOp, azNext) ){ |
| 1232 | for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2; |
| 1233 | } |
| 1234 | if( str_in_array(zOp, azGoto) && p2op<p->nIndent && abYield[p2op] ){ |
| 1235 | for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2; |
| 1236 | } |
| 1237 | } |
| 1238 | |
| 1239 | p->iIndent = 0; |
| @@ -3815,12 +3818,12 @@ | |
| 3815 | "Enter \".help\" for usage hints.\n", |
| 3816 | sqlite3_libversion(), sqlite3_sourceid() |
| 3817 | ); |
| 3818 | if( warnInmemoryDb ){ |
| 3819 | printf("Connected to a "); |
| 3820 | printBold("transient in-memory database."); |
| 3821 | printf("\nUse \".open FILENAME\" to reopen on a " |
| 3822 | "persistent database.\n"); |
| 3823 | } |
| 3824 | zHome = find_home_dir(); |
| 3825 | if( zHome ){ |
| 3826 | nHistory = strlen30(zHome) + 20; |
| 3827 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1182,10 +1182,11 @@ | |
| 1182 | ** itself by 2 spaces. |
| 1183 | ** |
| 1184 | ** * For each "Goto", if the jump destination is earlier in the program |
| 1185 | ** and ends on one of: |
| 1186 | ** Yield SeekGt SeekLt RowSetRead Rewind |
| 1187 | ** or if the P1 parameter is one instead of zero, |
| 1188 | ** then indent all opcodes between the earlier instruction |
| 1189 | ** and "Goto" by 2 spaces. |
| 1190 | */ |
| 1191 | static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){ |
| 1192 | const char *zSql; /* The text of the SQL statement */ |
| @@ -1229,11 +1230,13 @@ | |
| 1230 | p->nIndent = iOp+1; |
| 1231 | |
| 1232 | if( str_in_array(zOp, azNext) ){ |
| 1233 | for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2; |
| 1234 | } |
| 1235 | if( str_in_array(zOp, azGoto) && p2op<p->nIndent |
| 1236 | && (abYield[p2op] || sqlite3_column_int(pSql, 2)) |
| 1237 | ){ |
| 1238 | for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2; |
| 1239 | } |
| 1240 | } |
| 1241 | |
| 1242 | p->iIndent = 0; |
| @@ -3815,12 +3818,12 @@ | |
| 3818 | "Enter \".help\" for usage hints.\n", |
| 3819 | sqlite3_libversion(), sqlite3_sourceid() |
| 3820 | ); |
| 3821 | if( warnInmemoryDb ){ |
| 3822 | printf("Connected to a "); |
| 3823 | printBold("transient in-memory database"); |
| 3824 | printf(".\nUse \".open FILENAME\" to reopen on a " |
| 3825 | "persistent database.\n"); |
| 3826 | } |
| 3827 | zHome = find_home_dir(); |
| 3828 | if( zHome ){ |
| 3829 | nHistory = strlen30(zHome) + 20; |
| 3830 |
+81
-24
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -222,11 +222,11 @@ | ||
| 222 | 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | 224 | */ |
| 225 | 225 | #define SQLITE_VERSION "3.8.4" |
| 226 | 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | -#define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042" | |
| 227 | +#define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5" | |
| 228 | 228 | |
| 229 | 229 | /* |
| 230 | 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | 232 | ** |
| @@ -36484,12 +36484,29 @@ | ||
| 36484 | 36484 | ** Interfaces for opening a shared library, finding entry points |
| 36485 | 36485 | ** within the shared library, and closing the shared library. |
| 36486 | 36486 | */ |
| 36487 | 36487 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 36488 | 36488 | HANDLE h; |
| 36489 | +#if defined(__CYGWIN__) | |
| 36490 | + int nFull = pVfs->mxPathname+1; | |
| 36491 | + char *zFull = sqlite3MallocZero( nFull ); | |
| 36492 | + void *zConverted = 0; | |
| 36493 | + if( zFull==0 ){ | |
| 36494 | + OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); | |
| 36495 | + return 0; | |
| 36496 | + } | |
| 36497 | + if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){ | |
| 36498 | + sqlite3_free(zFull); | |
| 36499 | + OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); | |
| 36500 | + return 0; | |
| 36501 | + } | |
| 36502 | + zConverted = winConvertFromUtf8Filename(zFull); | |
| 36503 | + sqlite3_free(zFull); | |
| 36504 | +#else | |
| 36489 | 36505 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 36490 | 36506 | UNUSED_PARAMETER(pVfs); |
| 36507 | +#endif | |
| 36491 | 36508 | if( zConverted==0 ){ |
| 36492 | 36509 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36493 | 36510 | return 0; |
| 36494 | 36511 | } |
| 36495 | 36512 | if( osIsNT() ){ |
| @@ -44405,19 +44422,21 @@ | ||
| 44405 | 44422 | */ |
| 44406 | 44423 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44407 | 44424 | if( rc==SQLITE_OK && !locked ){ |
| 44408 | 44425 | Pgno nPage; /* Number of pages in database file */ |
| 44409 | 44426 | |
| 44410 | - /* Check the size of the database file. If it consists of 0 pages, | |
| 44411 | - ** then delete the journal file. See the header comment above for | |
| 44412 | - ** the reasoning here. Delete the obsolete journal file under | |
| 44413 | - ** a RESERVED lock to avoid race conditions and to avoid violating | |
| 44414 | - ** [H33020]. | |
| 44415 | - */ | |
| 44416 | 44427 | rc = pagerPagecount(pPager, &nPage); |
| 44417 | 44428 | if( rc==SQLITE_OK ){ |
| 44418 | - if( nPage==0 ){ | |
| 44429 | + /* If the database is zero pages in size, that means that either (1) the | |
| 44430 | + ** journal is a remnant from a prior database with the same name where | |
| 44431 | + ** the database file but not the journal was deleted, or (2) the initial | |
| 44432 | + ** transaction that populates a new database is being rolled back. | |
| 44433 | + ** In either case, the journal file can be deleted. However, take care | |
| 44434 | + ** not to delete the journal file if it is already open due to | |
| 44435 | + ** journal_mode=PERSIST. | |
| 44436 | + */ | |
| 44437 | + if( nPage==0 && !jrnlOpen ){ | |
| 44419 | 44438 | sqlite3BeginBenignMalloc(); |
| 44420 | 44439 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44421 | 44440 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44422 | 44441 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44423 | 44442 | } |
| @@ -55371,11 +55390,11 @@ | ||
| 55371 | 55390 | assert( pIdxKey->default_rc==1 |
| 55372 | 55391 | || pIdxKey->default_rc==0 |
| 55373 | 55392 | || pIdxKey->default_rc==-1 |
| 55374 | 55393 | ); |
| 55375 | 55394 | }else{ |
| 55376 | - xRecordCompare = 0; /* Not actually used. Avoids a compiler warning. */ | |
| 55395 | + xRecordCompare = 0; /* All keys are integers */ | |
| 55377 | 55396 | } |
| 55378 | 55397 | |
| 55379 | 55398 | rc = moveToRoot(pCur); |
| 55380 | 55399 | if( rc ){ |
| 55381 | 55400 | return rc; |
| @@ -62561,10 +62580,14 @@ | ||
| 62561 | 62580 | ** sqlite3MemRelease() were called from here. With -O2, this jumps |
| 62562 | 62581 | ** to 6.6 percent. The test case is inserting 1000 rows into a table |
| 62563 | 62582 | ** with no indexes using a single prepared INSERT statement, bind() |
| 62564 | 62583 | ** and reset(). Inserts are grouped into a transaction. |
| 62565 | 62584 | */ |
| 62585 | + testcase( p->flags & MEM_Agg ); | |
| 62586 | + testcase( p->flags & MEM_Dyn ); | |
| 62587 | + testcase( p->flags & MEM_Frame ); | |
| 62588 | + testcase( p->flags & MEM_RowSet ); | |
| 62566 | 62589 | if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){ |
| 62567 | 62590 | sqlite3VdbeMemRelease(p); |
| 62568 | 62591 | }else if( p->zMalloc ){ |
| 62569 | 62592 | sqlite3DbFree(db, p->zMalloc); |
| 62570 | 62593 | p->zMalloc = 0; |
| @@ -64289,31 +64312,36 @@ | ||
| 64289 | 64312 | break; |
| 64290 | 64313 | } |
| 64291 | 64314 | case 1: { /* 1-byte signed integer */ |
| 64292 | 64315 | pMem->u.i = ONE_BYTE_INT(buf); |
| 64293 | 64316 | pMem->flags = MEM_Int; |
| 64317 | + testcase( pMem->u.i<0 ); | |
| 64294 | 64318 | return 1; |
| 64295 | 64319 | } |
| 64296 | 64320 | case 2: { /* 2-byte signed integer */ |
| 64297 | 64321 | pMem->u.i = TWO_BYTE_INT(buf); |
| 64298 | 64322 | pMem->flags = MEM_Int; |
| 64323 | + testcase( pMem->u.i<0 ); | |
| 64299 | 64324 | return 2; |
| 64300 | 64325 | } |
| 64301 | 64326 | case 3: { /* 3-byte signed integer */ |
| 64302 | 64327 | pMem->u.i = THREE_BYTE_INT(buf); |
| 64303 | 64328 | pMem->flags = MEM_Int; |
| 64329 | + testcase( pMem->u.i<0 ); | |
| 64304 | 64330 | return 3; |
| 64305 | 64331 | } |
| 64306 | 64332 | case 4: { /* 4-byte signed integer */ |
| 64307 | 64333 | y = FOUR_BYTE_UINT(buf); |
| 64308 | 64334 | pMem->u.i = (i64)*(int*)&y; |
| 64309 | 64335 | pMem->flags = MEM_Int; |
| 64336 | + testcase( pMem->u.i<0 ); | |
| 64310 | 64337 | return 4; |
| 64311 | 64338 | } |
| 64312 | 64339 | case 5: { /* 6-byte signed integer */ |
| 64313 | 64340 | pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf); |
| 64314 | 64341 | pMem->flags = MEM_Int; |
| 64342 | + testcase( pMem->u.i<0 ); | |
| 64315 | 64343 | return 6; |
| 64316 | 64344 | } |
| 64317 | 64345 | case 6: /* 8-byte signed integer */ |
| 64318 | 64346 | case 7: { /* IEEE floating point */ |
| 64319 | 64347 | #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT) |
| @@ -64332,10 +64360,11 @@ | ||
| 64332 | 64360 | y = FOUR_BYTE_UINT(buf+4); |
| 64333 | 64361 | x = (x<<32) | y; |
| 64334 | 64362 | if( serial_type==6 ){ |
| 64335 | 64363 | pMem->u.i = *(i64*)&x; |
| 64336 | 64364 | pMem->flags = MEM_Int; |
| 64365 | + testcase( pMem->u.i<0 ); | |
| 64337 | 64366 | }else{ |
| 64338 | 64367 | assert( sizeof(x)==8 && sizeof(pMem->r)==8 ); |
| 64339 | 64368 | swapMixedEndianFloat(x); |
| 64340 | 64369 | memcpy(&pMem->r, &x, sizeof(x)); |
| 64341 | 64370 | pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real; |
| @@ -64677,24 +64706,30 @@ | ||
| 64677 | 64706 | u32 y; |
| 64678 | 64707 | assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) ); |
| 64679 | 64708 | switch( serial_type ){ |
| 64680 | 64709 | case 0: |
| 64681 | 64710 | case 1: |
| 64711 | + testcase( aKey[0]&0x80 ); | |
| 64682 | 64712 | return ONE_BYTE_INT(aKey); |
| 64683 | 64713 | case 2: |
| 64714 | + testcase( aKey[0]&0x80 ); | |
| 64684 | 64715 | return TWO_BYTE_INT(aKey); |
| 64685 | 64716 | case 3: |
| 64717 | + testcase( aKey[0]&0x80 ); | |
| 64686 | 64718 | return THREE_BYTE_INT(aKey); |
| 64687 | 64719 | case 4: { |
| 64720 | + testcase( aKey[0]&0x80 ); | |
| 64688 | 64721 | y = FOUR_BYTE_UINT(aKey); |
| 64689 | 64722 | return (i64)*(int*)&y; |
| 64690 | 64723 | } |
| 64691 | 64724 | case 5: { |
| 64725 | + testcase( aKey[0]&0x80 ); | |
| 64692 | 64726 | return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64693 | 64727 | } |
| 64694 | 64728 | case 6: { |
| 64695 | 64729 | u64 x = FOUR_BYTE_UINT(aKey); |
| 64730 | + testcase( aKey[0]&0x80 ); | |
| 64696 | 64731 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64697 | 64732 | return (i64)*(i64*)&x; |
| 64698 | 64733 | } |
| 64699 | 64734 | } |
| 64700 | 64735 | |
| @@ -64758,10 +64793,11 @@ | ||
| 64758 | 64793 | u32 serial_type; |
| 64759 | 64794 | |
| 64760 | 64795 | /* RHS is an integer */ |
| 64761 | 64796 | if( pRhs->flags & MEM_Int ){ |
| 64762 | 64797 | serial_type = aKey1[idx1]; |
| 64798 | + testcase( serial_type==12 ); | |
| 64763 | 64799 | if( serial_type>=12 ){ |
| 64764 | 64800 | rc = +1; |
| 64765 | 64801 | }else if( serial_type==0 ){ |
| 64766 | 64802 | rc = -1; |
| 64767 | 64803 | }else if( serial_type==7 ){ |
| @@ -64808,16 +64844,19 @@ | ||
| 64808 | 64844 | } |
| 64809 | 64845 | |
| 64810 | 64846 | /* RHS is a string */ |
| 64811 | 64847 | else if( pRhs->flags & MEM_Str ){ |
| 64812 | 64848 | getVarint32(&aKey1[idx1], serial_type); |
| 64849 | + testcase( serial_type==12 ); | |
| 64813 | 64850 | if( serial_type<12 ){ |
| 64814 | 64851 | rc = -1; |
| 64815 | 64852 | }else if( !(serial_type & 0x01) ){ |
| 64816 | 64853 | rc = +1; |
| 64817 | 64854 | }else{ |
| 64818 | 64855 | mem1.n = (serial_type - 12) / 2; |
| 64856 | + testcase( (d1+mem1.n)==(unsigned)nKey1 ); | |
| 64857 | + testcase( (d1+mem1.n+1)==(unsigned)nKey1 ); | |
| 64819 | 64858 | if( (d1+mem1.n) > (unsigned)nKey1 ){ |
| 64820 | 64859 | rc = 1; /* Corruption */ |
| 64821 | 64860 | }else if( pKeyInfo->aColl[i] ){ |
| 64822 | 64861 | mem1.enc = pKeyInfo->enc; |
| 64823 | 64862 | mem1.db = pKeyInfo->db; |
| @@ -64833,14 +64872,17 @@ | ||
| 64833 | 64872 | } |
| 64834 | 64873 | |
| 64835 | 64874 | /* RHS is a blob */ |
| 64836 | 64875 | else if( pRhs->flags & MEM_Blob ){ |
| 64837 | 64876 | getVarint32(&aKey1[idx1], serial_type); |
| 64877 | + testcase( serial_type==12 ); | |
| 64838 | 64878 | if( serial_type<12 || (serial_type & 0x01) ){ |
| 64839 | 64879 | rc = -1; |
| 64840 | 64880 | }else{ |
| 64841 | 64881 | int nStr = (serial_type - 12) / 2; |
| 64882 | + testcase( (d1+nStr)==(unsigned)nKey1 ); | |
| 64883 | + testcase( (d1+nStr+1)==(unsigned)nKey1 ); | |
| 64842 | 64884 | if( (d1+nStr) > (unsigned)nKey1 ){ |
| 64843 | 64885 | rc = 1; /* Corruption */ |
| 64844 | 64886 | }else{ |
| 64845 | 64887 | int nCmp = MIN(nStr, pRhs->n); |
| 64846 | 64888 | rc = memcmp(&aKey1[d1], pRhs->z, nCmp); |
| @@ -64910,33 +64952,39 @@ | ||
| 64910 | 64952 | |
| 64911 | 64953 | assert( bSkip==0 ); |
| 64912 | 64954 | switch( serial_type ){ |
| 64913 | 64955 | case 1: { /* 1-byte signed integer */ |
| 64914 | 64956 | lhs = ONE_BYTE_INT(aKey); |
| 64957 | + testcase( lhs<0 ); | |
| 64915 | 64958 | break; |
| 64916 | 64959 | } |
| 64917 | 64960 | case 2: { /* 2-byte signed integer */ |
| 64918 | 64961 | lhs = TWO_BYTE_INT(aKey); |
| 64962 | + testcase( lhs<0 ); | |
| 64919 | 64963 | break; |
| 64920 | 64964 | } |
| 64921 | 64965 | case 3: { /* 3-byte signed integer */ |
| 64922 | 64966 | lhs = THREE_BYTE_INT(aKey); |
| 64967 | + testcase( lhs<0 ); | |
| 64923 | 64968 | break; |
| 64924 | 64969 | } |
| 64925 | 64970 | case 4: { /* 4-byte signed integer */ |
| 64926 | 64971 | y = FOUR_BYTE_UINT(aKey); |
| 64927 | 64972 | lhs = (i64)*(int*)&y; |
| 64973 | + testcase( lhs<0 ); | |
| 64928 | 64974 | break; |
| 64929 | 64975 | } |
| 64930 | 64976 | case 5: { /* 6-byte signed integer */ |
| 64931 | 64977 | lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64978 | + testcase( lhs<0 ); | |
| 64932 | 64979 | break; |
| 64933 | 64980 | } |
| 64934 | 64981 | case 6: { /* 8-byte signed integer */ |
| 64935 | 64982 | x = FOUR_BYTE_UINT(aKey); |
| 64936 | 64983 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64937 | 64984 | lhs = *(i64*)&x; |
| 64985 | + testcase( lhs<0 ); | |
| 64938 | 64986 | break; |
| 64939 | 64987 | } |
| 64940 | 64988 | case 8: |
| 64941 | 64989 | lhs = 0; |
| 64942 | 64990 | break; |
| @@ -65069,13 +65117,15 @@ | ||
| 65069 | 65117 | p->r2 = 1; |
| 65070 | 65118 | } |
| 65071 | 65119 | if( (flags & MEM_Int) ){ |
| 65072 | 65120 | return vdbeRecordCompareInt; |
| 65073 | 65121 | } |
| 65074 | - if( (flags & (MEM_Int|MEM_Real|MEM_Null|MEM_Blob))==0 | |
| 65075 | - && p->pKeyInfo->aColl[0]==0 | |
| 65076 | - ){ | |
| 65122 | + testcase( flags & MEM_Real ); | |
| 65123 | + testcase( flags & MEM_Null ); | |
| 65124 | + testcase( flags & MEM_Blob ); | |
| 65125 | + if( (flags & (MEM_Real|MEM_Null|MEM_Blob))==0 && p->pKeyInfo->aColl[0]==0 ){ | |
| 65126 | + assert( flags & MEM_Str ); | |
| 65077 | 65127 | return vdbeRecordCompareString; |
| 65078 | 65128 | } |
| 65079 | 65129 | } |
| 65080 | 65130 | |
| 65081 | 65131 | return sqlite3VdbeRecordCompare; |
| @@ -66978,11 +67028,11 @@ | ||
| 66978 | 67028 | ** value of the cell. This macro verifies that shallow copies are |
| 66979 | 67029 | ** not misused. A shallow copy of a string or blob just copies a |
| 66980 | 67030 | ** pointer to the string or blob, not the content. If the original |
| 66981 | 67031 | ** is changed while the copy is still in use, the string or blob might |
| 66982 | 67032 | ** be changed out from under the copy. This macro verifies that nothing |
| 66983 | -** like that every happens. | |
| 67033 | +** like that ever happens. | |
| 66984 | 67034 | */ |
| 66985 | 67035 | #ifdef SQLITE_DEBUG |
| 66986 | 67036 | # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M) |
| 66987 | 67037 | #else |
| 66988 | 67038 | # define memAboutToChange(P,M) |
| @@ -67710,10 +67760,15 @@ | ||
| 67710 | 67760 | ** |
| 67711 | 67761 | ** An unconditional jump to address P2. |
| 67712 | 67762 | ** The next instruction executed will be |
| 67713 | 67763 | ** the one at index P2 from the beginning of |
| 67714 | 67764 | ** the program. |
| 67765 | +** | |
| 67766 | +** The P1 parameter is not actually used by this opcode. However, it | |
| 67767 | +** is sometimes set to 1 instead of 0 as a hint to the command-line shell | |
| 67768 | +** that this Goto is the bottom of a loop and that the lines from P2 down | |
| 67769 | +** to the current line should be indented for EXPLAIN output. | |
| 67715 | 67770 | */ |
| 67716 | 67771 | case OP_Goto: { /* jump */ |
| 67717 | 67772 | pc = pOp->p2 - 1; |
| 67718 | 67773 | |
| 67719 | 67774 | /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, |
| @@ -69205,12 +69260,12 @@ | ||
| 69205 | 69260 | |
| 69206 | 69261 | /* Opcode: Once P1 P2 * * * |
| 69207 | 69262 | ** |
| 69208 | 69263 | ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise, |
| 69209 | 69264 | ** set the flag and fall through to the next instruction. In other words, |
| 69210 | -** this opcode causes all following up codes up through P2 (but not including | |
| 69211 | -** P2) to run just once and skipped on subsequent times through the loop. | |
| 69265 | +** this opcode causes all following opcodes up through P2 (but not including | |
| 69266 | +** P2) to run just once and to be skipped on subsequent times through the loop. | |
| 69212 | 69267 | */ |
| 69213 | 69268 | case OP_Once: { /* jump */ |
| 69214 | 69269 | assert( pOp->p1<p->nOnceFlag ); |
| 69215 | 69270 | VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2); |
| 69216 | 69271 | if( p->aOnceFlag[pOp->p1] ){ |
| @@ -83299,11 +83354,14 @@ | ||
| 83299 | 83354 | VdbeCoverage(v); |
| 83300 | 83355 | callStatGet(v, regStat4, STAT_GET_NEQ, regEq); |
| 83301 | 83356 | callStatGet(v, regStat4, STAT_GET_NLT, regLt); |
| 83302 | 83357 | callStatGet(v, regStat4, STAT_GET_NDLT, regDLt); |
| 83303 | 83358 | sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0); |
| 83304 | - VdbeCoverage(v); | |
| 83359 | + /* We know that the regSampleRowid row exists because it was read by | |
| 83360 | + ** the previous loop. Thus the not-found jump of seekOp will never | |
| 83361 | + ** be taken */ | |
| 83362 | + VdbeCoverageNeverTaken(v); | |
| 83305 | 83363 | #ifdef SQLITE_ENABLE_STAT3 |
| 83306 | 83364 | sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, |
| 83307 | 83365 | pIdx->aiColumn[0], regSample); |
| 83308 | 83366 | #else |
| 83309 | 83367 | for(i=0; i<nCol; i++){ |
| @@ -83313,11 +83371,11 @@ | ||
| 83313 | 83371 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample); |
| 83314 | 83372 | #endif |
| 83315 | 83373 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp); |
| 83316 | 83374 | sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid); |
| 83317 | 83375 | sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid); |
| 83318 | - sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext); | |
| 83376 | + sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */ | |
| 83319 | 83377 | sqlite3VdbeJumpHere(v, addrIsNull); |
| 83320 | 83378 | } |
| 83321 | 83379 | #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */ |
| 83322 | 83380 | |
| 83323 | 83381 | /* End of analysis */ |
| @@ -91278,11 +91336,11 @@ | ||
| 91278 | 91336 | int argc, |
| 91279 | 91337 | sqlite3_value **argv |
| 91280 | 91338 | ){ |
| 91281 | 91339 | unsigned char *z, *zOut; |
| 91282 | 91340 | int i; |
| 91283 | - zOut = z = sqlite3_malloc( argc*4 ); | |
| 91341 | + zOut = z = sqlite3_malloc( argc*4+1 ); | |
| 91284 | 91342 | if( z==0 ){ |
| 91285 | 91343 | sqlite3_result_error_nomem(context); |
| 91286 | 91344 | return; |
| 91287 | 91345 | } |
| 91288 | 91346 | for(i=0; i<argc; i++){ |
| @@ -93479,17 +93537,17 @@ | ||
| 93479 | 93537 | |
| 93480 | 93538 | /* |
| 93481 | 93539 | ** Compute the affinity string for table pTab, if it has not already been |
| 93482 | 93540 | ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities. |
| 93483 | 93541 | ** |
| 93484 | -** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values and | |
| 93542 | +** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and | |
| 93485 | 93543 | ** if iReg>0 then code an OP_Affinity opcode that will set the affinities |
| 93486 | 93544 | ** for register iReg and following. Or if affinities exists and iReg==0, |
| 93487 | 93545 | ** then just set the P4 operand of the previous opcode (which should be |
| 93488 | 93546 | ** an OP_MakeRecord) to the affinity string. |
| 93489 | 93547 | ** |
| 93490 | -** A column affinity string has one character column: | |
| 93548 | +** A column affinity string has one character per column: | |
| 93491 | 93549 | ** |
| 93492 | 93550 | ** Character Column affinity |
| 93493 | 93551 | ** ------------------------------ |
| 93494 | 93552 | ** 'a' TEXT |
| 93495 | 93553 | ** 'b' NONE |
| @@ -93526,14 +93584,13 @@ | ||
| 93526 | 93584 | } |
| 93527 | 93585 | } |
| 93528 | 93586 | |
| 93529 | 93587 | /* |
| 93530 | 93588 | ** Return non-zero if the table pTab in database iDb or any of its indices |
| 93531 | -** have been opened at any point in the VDBE program beginning at location | |
| 93532 | -** iStartAddr throught the end of the program. This is used to see if | |
| 93589 | +** have been opened at any point in the VDBE program. This is used to see if | |
| 93533 | 93590 | ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can |
| 93534 | -** run without using temporary table for the results of the SELECT. | |
| 93591 | +** run without using a temporary table for the results of the SELECT. | |
| 93535 | 93592 | */ |
| 93536 | 93593 | static int readsTable(Parse *p, int iDb, Table *pTab){ |
| 93537 | 93594 | Vdbe *v = sqlite3GetVdbe(p); |
| 93538 | 93595 | int i; |
| 93539 | 93596 | int iEnd = sqlite3VdbeCurrentAddr(v); |
| @@ -112384,17 +112441,17 @@ | ||
| 112384 | 112441 | } |
| 112385 | 112442 | if( pLoop->wsFlags & WHERE_TOP_LIMIT ){ |
| 112386 | 112443 | pRangeEnd = pLoop->aLTerm[j++]; |
| 112387 | 112444 | nExtraReg = 1; |
| 112388 | 112445 | if( pRangeStart==0 |
| 112389 | - && (pRangeEnd->wtFlags & TERM_VNULL)==0 | |
| 112390 | 112446 | && (j = pIdx->aiColumn[nEq])>=0 |
| 112391 | 112447 | && pIdx->pTable->aCol[j].notNull==0 |
| 112392 | 112448 | ){ |
| 112393 | 112449 | bSeekPastNull = 1; |
| 112394 | 112450 | } |
| 112395 | 112451 | } |
| 112452 | + assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 ); | |
| 112396 | 112453 | |
| 112397 | 112454 | /* Generate code to evaluate all constraint terms using == or IN |
| 112398 | 112455 | ** and store the values of those terms in an array of registers |
| 112399 | 112456 | ** starting at regBase. |
| 112400 | 112457 | */ |
| 112401 | 112458 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -222,11 +222,11 @@ | |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.4" |
| 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | #define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -36484,12 +36484,29 @@ | |
| 36484 | ** Interfaces for opening a shared library, finding entry points |
| 36485 | ** within the shared library, and closing the shared library. |
| 36486 | */ |
| 36487 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 36488 | HANDLE h; |
| 36489 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 36490 | UNUSED_PARAMETER(pVfs); |
| 36491 | if( zConverted==0 ){ |
| 36492 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36493 | return 0; |
| 36494 | } |
| 36495 | if( osIsNT() ){ |
| @@ -44405,19 +44422,21 @@ | |
| 44405 | */ |
| 44406 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44407 | if( rc==SQLITE_OK && !locked ){ |
| 44408 | Pgno nPage; /* Number of pages in database file */ |
| 44409 | |
| 44410 | /* Check the size of the database file. If it consists of 0 pages, |
| 44411 | ** then delete the journal file. See the header comment above for |
| 44412 | ** the reasoning here. Delete the obsolete journal file under |
| 44413 | ** a RESERVED lock to avoid race conditions and to avoid violating |
| 44414 | ** [H33020]. |
| 44415 | */ |
| 44416 | rc = pagerPagecount(pPager, &nPage); |
| 44417 | if( rc==SQLITE_OK ){ |
| 44418 | if( nPage==0 ){ |
| 44419 | sqlite3BeginBenignMalloc(); |
| 44420 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44421 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44422 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44423 | } |
| @@ -55371,11 +55390,11 @@ | |
| 55371 | assert( pIdxKey->default_rc==1 |
| 55372 | || pIdxKey->default_rc==0 |
| 55373 | || pIdxKey->default_rc==-1 |
| 55374 | ); |
| 55375 | }else{ |
| 55376 | xRecordCompare = 0; /* Not actually used. Avoids a compiler warning. */ |
| 55377 | } |
| 55378 | |
| 55379 | rc = moveToRoot(pCur); |
| 55380 | if( rc ){ |
| 55381 | return rc; |
| @@ -62561,10 +62580,14 @@ | |
| 62561 | ** sqlite3MemRelease() were called from here. With -O2, this jumps |
| 62562 | ** to 6.6 percent. The test case is inserting 1000 rows into a table |
| 62563 | ** with no indexes using a single prepared INSERT statement, bind() |
| 62564 | ** and reset(). Inserts are grouped into a transaction. |
| 62565 | */ |
| 62566 | if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){ |
| 62567 | sqlite3VdbeMemRelease(p); |
| 62568 | }else if( p->zMalloc ){ |
| 62569 | sqlite3DbFree(db, p->zMalloc); |
| 62570 | p->zMalloc = 0; |
| @@ -64289,31 +64312,36 @@ | |
| 64289 | break; |
| 64290 | } |
| 64291 | case 1: { /* 1-byte signed integer */ |
| 64292 | pMem->u.i = ONE_BYTE_INT(buf); |
| 64293 | pMem->flags = MEM_Int; |
| 64294 | return 1; |
| 64295 | } |
| 64296 | case 2: { /* 2-byte signed integer */ |
| 64297 | pMem->u.i = TWO_BYTE_INT(buf); |
| 64298 | pMem->flags = MEM_Int; |
| 64299 | return 2; |
| 64300 | } |
| 64301 | case 3: { /* 3-byte signed integer */ |
| 64302 | pMem->u.i = THREE_BYTE_INT(buf); |
| 64303 | pMem->flags = MEM_Int; |
| 64304 | return 3; |
| 64305 | } |
| 64306 | case 4: { /* 4-byte signed integer */ |
| 64307 | y = FOUR_BYTE_UINT(buf); |
| 64308 | pMem->u.i = (i64)*(int*)&y; |
| 64309 | pMem->flags = MEM_Int; |
| 64310 | return 4; |
| 64311 | } |
| 64312 | case 5: { /* 6-byte signed integer */ |
| 64313 | pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf); |
| 64314 | pMem->flags = MEM_Int; |
| 64315 | return 6; |
| 64316 | } |
| 64317 | case 6: /* 8-byte signed integer */ |
| 64318 | case 7: { /* IEEE floating point */ |
| 64319 | #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT) |
| @@ -64332,10 +64360,11 @@ | |
| 64332 | y = FOUR_BYTE_UINT(buf+4); |
| 64333 | x = (x<<32) | y; |
| 64334 | if( serial_type==6 ){ |
| 64335 | pMem->u.i = *(i64*)&x; |
| 64336 | pMem->flags = MEM_Int; |
| 64337 | }else{ |
| 64338 | assert( sizeof(x)==8 && sizeof(pMem->r)==8 ); |
| 64339 | swapMixedEndianFloat(x); |
| 64340 | memcpy(&pMem->r, &x, sizeof(x)); |
| 64341 | pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real; |
| @@ -64677,24 +64706,30 @@ | |
| 64677 | u32 y; |
| 64678 | assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) ); |
| 64679 | switch( serial_type ){ |
| 64680 | case 0: |
| 64681 | case 1: |
| 64682 | return ONE_BYTE_INT(aKey); |
| 64683 | case 2: |
| 64684 | return TWO_BYTE_INT(aKey); |
| 64685 | case 3: |
| 64686 | return THREE_BYTE_INT(aKey); |
| 64687 | case 4: { |
| 64688 | y = FOUR_BYTE_UINT(aKey); |
| 64689 | return (i64)*(int*)&y; |
| 64690 | } |
| 64691 | case 5: { |
| 64692 | return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64693 | } |
| 64694 | case 6: { |
| 64695 | u64 x = FOUR_BYTE_UINT(aKey); |
| 64696 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64697 | return (i64)*(i64*)&x; |
| 64698 | } |
| 64699 | } |
| 64700 | |
| @@ -64758,10 +64793,11 @@ | |
| 64758 | u32 serial_type; |
| 64759 | |
| 64760 | /* RHS is an integer */ |
| 64761 | if( pRhs->flags & MEM_Int ){ |
| 64762 | serial_type = aKey1[idx1]; |
| 64763 | if( serial_type>=12 ){ |
| 64764 | rc = +1; |
| 64765 | }else if( serial_type==0 ){ |
| 64766 | rc = -1; |
| 64767 | }else if( serial_type==7 ){ |
| @@ -64808,16 +64844,19 @@ | |
| 64808 | } |
| 64809 | |
| 64810 | /* RHS is a string */ |
| 64811 | else if( pRhs->flags & MEM_Str ){ |
| 64812 | getVarint32(&aKey1[idx1], serial_type); |
| 64813 | if( serial_type<12 ){ |
| 64814 | rc = -1; |
| 64815 | }else if( !(serial_type & 0x01) ){ |
| 64816 | rc = +1; |
| 64817 | }else{ |
| 64818 | mem1.n = (serial_type - 12) / 2; |
| 64819 | if( (d1+mem1.n) > (unsigned)nKey1 ){ |
| 64820 | rc = 1; /* Corruption */ |
| 64821 | }else if( pKeyInfo->aColl[i] ){ |
| 64822 | mem1.enc = pKeyInfo->enc; |
| 64823 | mem1.db = pKeyInfo->db; |
| @@ -64833,14 +64872,17 @@ | |
| 64833 | } |
| 64834 | |
| 64835 | /* RHS is a blob */ |
| 64836 | else if( pRhs->flags & MEM_Blob ){ |
| 64837 | getVarint32(&aKey1[idx1], serial_type); |
| 64838 | if( serial_type<12 || (serial_type & 0x01) ){ |
| 64839 | rc = -1; |
| 64840 | }else{ |
| 64841 | int nStr = (serial_type - 12) / 2; |
| 64842 | if( (d1+nStr) > (unsigned)nKey1 ){ |
| 64843 | rc = 1; /* Corruption */ |
| 64844 | }else{ |
| 64845 | int nCmp = MIN(nStr, pRhs->n); |
| 64846 | rc = memcmp(&aKey1[d1], pRhs->z, nCmp); |
| @@ -64910,33 +64952,39 @@ | |
| 64910 | |
| 64911 | assert( bSkip==0 ); |
| 64912 | switch( serial_type ){ |
| 64913 | case 1: { /* 1-byte signed integer */ |
| 64914 | lhs = ONE_BYTE_INT(aKey); |
| 64915 | break; |
| 64916 | } |
| 64917 | case 2: { /* 2-byte signed integer */ |
| 64918 | lhs = TWO_BYTE_INT(aKey); |
| 64919 | break; |
| 64920 | } |
| 64921 | case 3: { /* 3-byte signed integer */ |
| 64922 | lhs = THREE_BYTE_INT(aKey); |
| 64923 | break; |
| 64924 | } |
| 64925 | case 4: { /* 4-byte signed integer */ |
| 64926 | y = FOUR_BYTE_UINT(aKey); |
| 64927 | lhs = (i64)*(int*)&y; |
| 64928 | break; |
| 64929 | } |
| 64930 | case 5: { /* 6-byte signed integer */ |
| 64931 | lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64932 | break; |
| 64933 | } |
| 64934 | case 6: { /* 8-byte signed integer */ |
| 64935 | x = FOUR_BYTE_UINT(aKey); |
| 64936 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64937 | lhs = *(i64*)&x; |
| 64938 | break; |
| 64939 | } |
| 64940 | case 8: |
| 64941 | lhs = 0; |
| 64942 | break; |
| @@ -65069,13 +65117,15 @@ | |
| 65069 | p->r2 = 1; |
| 65070 | } |
| 65071 | if( (flags & MEM_Int) ){ |
| 65072 | return vdbeRecordCompareInt; |
| 65073 | } |
| 65074 | if( (flags & (MEM_Int|MEM_Real|MEM_Null|MEM_Blob))==0 |
| 65075 | && p->pKeyInfo->aColl[0]==0 |
| 65076 | ){ |
| 65077 | return vdbeRecordCompareString; |
| 65078 | } |
| 65079 | } |
| 65080 | |
| 65081 | return sqlite3VdbeRecordCompare; |
| @@ -66978,11 +67028,11 @@ | |
| 66978 | ** value of the cell. This macro verifies that shallow copies are |
| 66979 | ** not misused. A shallow copy of a string or blob just copies a |
| 66980 | ** pointer to the string or blob, not the content. If the original |
| 66981 | ** is changed while the copy is still in use, the string or blob might |
| 66982 | ** be changed out from under the copy. This macro verifies that nothing |
| 66983 | ** like that every happens. |
| 66984 | */ |
| 66985 | #ifdef SQLITE_DEBUG |
| 66986 | # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M) |
| 66987 | #else |
| 66988 | # define memAboutToChange(P,M) |
| @@ -67710,10 +67760,15 @@ | |
| 67710 | ** |
| 67711 | ** An unconditional jump to address P2. |
| 67712 | ** The next instruction executed will be |
| 67713 | ** the one at index P2 from the beginning of |
| 67714 | ** the program. |
| 67715 | */ |
| 67716 | case OP_Goto: { /* jump */ |
| 67717 | pc = pOp->p2 - 1; |
| 67718 | |
| 67719 | /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, |
| @@ -69205,12 +69260,12 @@ | |
| 69205 | |
| 69206 | /* Opcode: Once P1 P2 * * * |
| 69207 | ** |
| 69208 | ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise, |
| 69209 | ** set the flag and fall through to the next instruction. In other words, |
| 69210 | ** this opcode causes all following up codes up through P2 (but not including |
| 69211 | ** P2) to run just once and skipped on subsequent times through the loop. |
| 69212 | */ |
| 69213 | case OP_Once: { /* jump */ |
| 69214 | assert( pOp->p1<p->nOnceFlag ); |
| 69215 | VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2); |
| 69216 | if( p->aOnceFlag[pOp->p1] ){ |
| @@ -83299,11 +83354,14 @@ | |
| 83299 | VdbeCoverage(v); |
| 83300 | callStatGet(v, regStat4, STAT_GET_NEQ, regEq); |
| 83301 | callStatGet(v, regStat4, STAT_GET_NLT, regLt); |
| 83302 | callStatGet(v, regStat4, STAT_GET_NDLT, regDLt); |
| 83303 | sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0); |
| 83304 | VdbeCoverage(v); |
| 83305 | #ifdef SQLITE_ENABLE_STAT3 |
| 83306 | sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, |
| 83307 | pIdx->aiColumn[0], regSample); |
| 83308 | #else |
| 83309 | for(i=0; i<nCol; i++){ |
| @@ -83313,11 +83371,11 @@ | |
| 83313 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample); |
| 83314 | #endif |
| 83315 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp); |
| 83316 | sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid); |
| 83317 | sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid); |
| 83318 | sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext); |
| 83319 | sqlite3VdbeJumpHere(v, addrIsNull); |
| 83320 | } |
| 83321 | #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */ |
| 83322 | |
| 83323 | /* End of analysis */ |
| @@ -91278,11 +91336,11 @@ | |
| 91278 | int argc, |
| 91279 | sqlite3_value **argv |
| 91280 | ){ |
| 91281 | unsigned char *z, *zOut; |
| 91282 | int i; |
| 91283 | zOut = z = sqlite3_malloc( argc*4 ); |
| 91284 | if( z==0 ){ |
| 91285 | sqlite3_result_error_nomem(context); |
| 91286 | return; |
| 91287 | } |
| 91288 | for(i=0; i<argc; i++){ |
| @@ -93479,17 +93537,17 @@ | |
| 93479 | |
| 93480 | /* |
| 93481 | ** Compute the affinity string for table pTab, if it has not already been |
| 93482 | ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities. |
| 93483 | ** |
| 93484 | ** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values and |
| 93485 | ** if iReg>0 then code an OP_Affinity opcode that will set the affinities |
| 93486 | ** for register iReg and following. Or if affinities exists and iReg==0, |
| 93487 | ** then just set the P4 operand of the previous opcode (which should be |
| 93488 | ** an OP_MakeRecord) to the affinity string. |
| 93489 | ** |
| 93490 | ** A column affinity string has one character column: |
| 93491 | ** |
| 93492 | ** Character Column affinity |
| 93493 | ** ------------------------------ |
| 93494 | ** 'a' TEXT |
| 93495 | ** 'b' NONE |
| @@ -93526,14 +93584,13 @@ | |
| 93526 | } |
| 93527 | } |
| 93528 | |
| 93529 | /* |
| 93530 | ** Return non-zero if the table pTab in database iDb or any of its indices |
| 93531 | ** have been opened at any point in the VDBE program beginning at location |
| 93532 | ** iStartAddr throught the end of the program. This is used to see if |
| 93533 | ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can |
| 93534 | ** run without using temporary table for the results of the SELECT. |
| 93535 | */ |
| 93536 | static int readsTable(Parse *p, int iDb, Table *pTab){ |
| 93537 | Vdbe *v = sqlite3GetVdbe(p); |
| 93538 | int i; |
| 93539 | int iEnd = sqlite3VdbeCurrentAddr(v); |
| @@ -112384,17 +112441,17 @@ | |
| 112384 | } |
| 112385 | if( pLoop->wsFlags & WHERE_TOP_LIMIT ){ |
| 112386 | pRangeEnd = pLoop->aLTerm[j++]; |
| 112387 | nExtraReg = 1; |
| 112388 | if( pRangeStart==0 |
| 112389 | && (pRangeEnd->wtFlags & TERM_VNULL)==0 |
| 112390 | && (j = pIdx->aiColumn[nEq])>=0 |
| 112391 | && pIdx->pTable->aCol[j].notNull==0 |
| 112392 | ){ |
| 112393 | bSeekPastNull = 1; |
| 112394 | } |
| 112395 | } |
| 112396 | |
| 112397 | /* Generate code to evaluate all constraint terms using == or IN |
| 112398 | ** and store the values of those terms in an array of registers |
| 112399 | ** starting at regBase. |
| 112400 | */ |
| 112401 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -222,11 +222,11 @@ | |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.4" |
| 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | #define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -36484,12 +36484,29 @@ | |
| 36484 | ** Interfaces for opening a shared library, finding entry points |
| 36485 | ** within the shared library, and closing the shared library. |
| 36486 | */ |
| 36487 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 36488 | HANDLE h; |
| 36489 | #if defined(__CYGWIN__) |
| 36490 | int nFull = pVfs->mxPathname+1; |
| 36491 | char *zFull = sqlite3MallocZero( nFull ); |
| 36492 | void *zConverted = 0; |
| 36493 | if( zFull==0 ){ |
| 36494 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36495 | return 0; |
| 36496 | } |
| 36497 | if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){ |
| 36498 | sqlite3_free(zFull); |
| 36499 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36500 | return 0; |
| 36501 | } |
| 36502 | zConverted = winConvertFromUtf8Filename(zFull); |
| 36503 | sqlite3_free(zFull); |
| 36504 | #else |
| 36505 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 36506 | UNUSED_PARAMETER(pVfs); |
| 36507 | #endif |
| 36508 | if( zConverted==0 ){ |
| 36509 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 36510 | return 0; |
| 36511 | } |
| 36512 | if( osIsNT() ){ |
| @@ -44405,19 +44422,21 @@ | |
| 44422 | */ |
| 44423 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44424 | if( rc==SQLITE_OK && !locked ){ |
| 44425 | Pgno nPage; /* Number of pages in database file */ |
| 44426 | |
| 44427 | rc = pagerPagecount(pPager, &nPage); |
| 44428 | if( rc==SQLITE_OK ){ |
| 44429 | /* If the database is zero pages in size, that means that either (1) the |
| 44430 | ** journal is a remnant from a prior database with the same name where |
| 44431 | ** the database file but not the journal was deleted, or (2) the initial |
| 44432 | ** transaction that populates a new database is being rolled back. |
| 44433 | ** In either case, the journal file can be deleted. However, take care |
| 44434 | ** not to delete the journal file if it is already open due to |
| 44435 | ** journal_mode=PERSIST. |
| 44436 | */ |
| 44437 | if( nPage==0 && !jrnlOpen ){ |
| 44438 | sqlite3BeginBenignMalloc(); |
| 44439 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44440 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44441 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44442 | } |
| @@ -55371,11 +55390,11 @@ | |
| 55390 | assert( pIdxKey->default_rc==1 |
| 55391 | || pIdxKey->default_rc==0 |
| 55392 | || pIdxKey->default_rc==-1 |
| 55393 | ); |
| 55394 | }else{ |
| 55395 | xRecordCompare = 0; /* All keys are integers */ |
| 55396 | } |
| 55397 | |
| 55398 | rc = moveToRoot(pCur); |
| 55399 | if( rc ){ |
| 55400 | return rc; |
| @@ -62561,10 +62580,14 @@ | |
| 62580 | ** sqlite3MemRelease() were called from here. With -O2, this jumps |
| 62581 | ** to 6.6 percent. The test case is inserting 1000 rows into a table |
| 62582 | ** with no indexes using a single prepared INSERT statement, bind() |
| 62583 | ** and reset(). Inserts are grouped into a transaction. |
| 62584 | */ |
| 62585 | testcase( p->flags & MEM_Agg ); |
| 62586 | testcase( p->flags & MEM_Dyn ); |
| 62587 | testcase( p->flags & MEM_Frame ); |
| 62588 | testcase( p->flags & MEM_RowSet ); |
| 62589 | if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){ |
| 62590 | sqlite3VdbeMemRelease(p); |
| 62591 | }else if( p->zMalloc ){ |
| 62592 | sqlite3DbFree(db, p->zMalloc); |
| 62593 | p->zMalloc = 0; |
| @@ -64289,31 +64312,36 @@ | |
| 64312 | break; |
| 64313 | } |
| 64314 | case 1: { /* 1-byte signed integer */ |
| 64315 | pMem->u.i = ONE_BYTE_INT(buf); |
| 64316 | pMem->flags = MEM_Int; |
| 64317 | testcase( pMem->u.i<0 ); |
| 64318 | return 1; |
| 64319 | } |
| 64320 | case 2: { /* 2-byte signed integer */ |
| 64321 | pMem->u.i = TWO_BYTE_INT(buf); |
| 64322 | pMem->flags = MEM_Int; |
| 64323 | testcase( pMem->u.i<0 ); |
| 64324 | return 2; |
| 64325 | } |
| 64326 | case 3: { /* 3-byte signed integer */ |
| 64327 | pMem->u.i = THREE_BYTE_INT(buf); |
| 64328 | pMem->flags = MEM_Int; |
| 64329 | testcase( pMem->u.i<0 ); |
| 64330 | return 3; |
| 64331 | } |
| 64332 | case 4: { /* 4-byte signed integer */ |
| 64333 | y = FOUR_BYTE_UINT(buf); |
| 64334 | pMem->u.i = (i64)*(int*)&y; |
| 64335 | pMem->flags = MEM_Int; |
| 64336 | testcase( pMem->u.i<0 ); |
| 64337 | return 4; |
| 64338 | } |
| 64339 | case 5: { /* 6-byte signed integer */ |
| 64340 | pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf); |
| 64341 | pMem->flags = MEM_Int; |
| 64342 | testcase( pMem->u.i<0 ); |
| 64343 | return 6; |
| 64344 | } |
| 64345 | case 6: /* 8-byte signed integer */ |
| 64346 | case 7: { /* IEEE floating point */ |
| 64347 | #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT) |
| @@ -64332,10 +64360,11 @@ | |
| 64360 | y = FOUR_BYTE_UINT(buf+4); |
| 64361 | x = (x<<32) | y; |
| 64362 | if( serial_type==6 ){ |
| 64363 | pMem->u.i = *(i64*)&x; |
| 64364 | pMem->flags = MEM_Int; |
| 64365 | testcase( pMem->u.i<0 ); |
| 64366 | }else{ |
| 64367 | assert( sizeof(x)==8 && sizeof(pMem->r)==8 ); |
| 64368 | swapMixedEndianFloat(x); |
| 64369 | memcpy(&pMem->r, &x, sizeof(x)); |
| 64370 | pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real; |
| @@ -64677,24 +64706,30 @@ | |
| 64706 | u32 y; |
| 64707 | assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) ); |
| 64708 | switch( serial_type ){ |
| 64709 | case 0: |
| 64710 | case 1: |
| 64711 | testcase( aKey[0]&0x80 ); |
| 64712 | return ONE_BYTE_INT(aKey); |
| 64713 | case 2: |
| 64714 | testcase( aKey[0]&0x80 ); |
| 64715 | return TWO_BYTE_INT(aKey); |
| 64716 | case 3: |
| 64717 | testcase( aKey[0]&0x80 ); |
| 64718 | return THREE_BYTE_INT(aKey); |
| 64719 | case 4: { |
| 64720 | testcase( aKey[0]&0x80 ); |
| 64721 | y = FOUR_BYTE_UINT(aKey); |
| 64722 | return (i64)*(int*)&y; |
| 64723 | } |
| 64724 | case 5: { |
| 64725 | testcase( aKey[0]&0x80 ); |
| 64726 | return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64727 | } |
| 64728 | case 6: { |
| 64729 | u64 x = FOUR_BYTE_UINT(aKey); |
| 64730 | testcase( aKey[0]&0x80 ); |
| 64731 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64732 | return (i64)*(i64*)&x; |
| 64733 | } |
| 64734 | } |
| 64735 | |
| @@ -64758,10 +64793,11 @@ | |
| 64793 | u32 serial_type; |
| 64794 | |
| 64795 | /* RHS is an integer */ |
| 64796 | if( pRhs->flags & MEM_Int ){ |
| 64797 | serial_type = aKey1[idx1]; |
| 64798 | testcase( serial_type==12 ); |
| 64799 | if( serial_type>=12 ){ |
| 64800 | rc = +1; |
| 64801 | }else if( serial_type==0 ){ |
| 64802 | rc = -1; |
| 64803 | }else if( serial_type==7 ){ |
| @@ -64808,16 +64844,19 @@ | |
| 64844 | } |
| 64845 | |
| 64846 | /* RHS is a string */ |
| 64847 | else if( pRhs->flags & MEM_Str ){ |
| 64848 | getVarint32(&aKey1[idx1], serial_type); |
| 64849 | testcase( serial_type==12 ); |
| 64850 | if( serial_type<12 ){ |
| 64851 | rc = -1; |
| 64852 | }else if( !(serial_type & 0x01) ){ |
| 64853 | rc = +1; |
| 64854 | }else{ |
| 64855 | mem1.n = (serial_type - 12) / 2; |
| 64856 | testcase( (d1+mem1.n)==(unsigned)nKey1 ); |
| 64857 | testcase( (d1+mem1.n+1)==(unsigned)nKey1 ); |
| 64858 | if( (d1+mem1.n) > (unsigned)nKey1 ){ |
| 64859 | rc = 1; /* Corruption */ |
| 64860 | }else if( pKeyInfo->aColl[i] ){ |
| 64861 | mem1.enc = pKeyInfo->enc; |
| 64862 | mem1.db = pKeyInfo->db; |
| @@ -64833,14 +64872,17 @@ | |
| 64872 | } |
| 64873 | |
| 64874 | /* RHS is a blob */ |
| 64875 | else if( pRhs->flags & MEM_Blob ){ |
| 64876 | getVarint32(&aKey1[idx1], serial_type); |
| 64877 | testcase( serial_type==12 ); |
| 64878 | if( serial_type<12 || (serial_type & 0x01) ){ |
| 64879 | rc = -1; |
| 64880 | }else{ |
| 64881 | int nStr = (serial_type - 12) / 2; |
| 64882 | testcase( (d1+nStr)==(unsigned)nKey1 ); |
| 64883 | testcase( (d1+nStr+1)==(unsigned)nKey1 ); |
| 64884 | if( (d1+nStr) > (unsigned)nKey1 ){ |
| 64885 | rc = 1; /* Corruption */ |
| 64886 | }else{ |
| 64887 | int nCmp = MIN(nStr, pRhs->n); |
| 64888 | rc = memcmp(&aKey1[d1], pRhs->z, nCmp); |
| @@ -64910,33 +64952,39 @@ | |
| 64952 | |
| 64953 | assert( bSkip==0 ); |
| 64954 | switch( serial_type ){ |
| 64955 | case 1: { /* 1-byte signed integer */ |
| 64956 | lhs = ONE_BYTE_INT(aKey); |
| 64957 | testcase( lhs<0 ); |
| 64958 | break; |
| 64959 | } |
| 64960 | case 2: { /* 2-byte signed integer */ |
| 64961 | lhs = TWO_BYTE_INT(aKey); |
| 64962 | testcase( lhs<0 ); |
| 64963 | break; |
| 64964 | } |
| 64965 | case 3: { /* 3-byte signed integer */ |
| 64966 | lhs = THREE_BYTE_INT(aKey); |
| 64967 | testcase( lhs<0 ); |
| 64968 | break; |
| 64969 | } |
| 64970 | case 4: { /* 4-byte signed integer */ |
| 64971 | y = FOUR_BYTE_UINT(aKey); |
| 64972 | lhs = (i64)*(int*)&y; |
| 64973 | testcase( lhs<0 ); |
| 64974 | break; |
| 64975 | } |
| 64976 | case 5: { /* 6-byte signed integer */ |
| 64977 | lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey); |
| 64978 | testcase( lhs<0 ); |
| 64979 | break; |
| 64980 | } |
| 64981 | case 6: { /* 8-byte signed integer */ |
| 64982 | x = FOUR_BYTE_UINT(aKey); |
| 64983 | x = (x<<32) | FOUR_BYTE_UINT(aKey+4); |
| 64984 | lhs = *(i64*)&x; |
| 64985 | testcase( lhs<0 ); |
| 64986 | break; |
| 64987 | } |
| 64988 | case 8: |
| 64989 | lhs = 0; |
| 64990 | break; |
| @@ -65069,13 +65117,15 @@ | |
| 65117 | p->r2 = 1; |
| 65118 | } |
| 65119 | if( (flags & MEM_Int) ){ |
| 65120 | return vdbeRecordCompareInt; |
| 65121 | } |
| 65122 | testcase( flags & MEM_Real ); |
| 65123 | testcase( flags & MEM_Null ); |
| 65124 | testcase( flags & MEM_Blob ); |
| 65125 | if( (flags & (MEM_Real|MEM_Null|MEM_Blob))==0 && p->pKeyInfo->aColl[0]==0 ){ |
| 65126 | assert( flags & MEM_Str ); |
| 65127 | return vdbeRecordCompareString; |
| 65128 | } |
| 65129 | } |
| 65130 | |
| 65131 | return sqlite3VdbeRecordCompare; |
| @@ -66978,11 +67028,11 @@ | |
| 67028 | ** value of the cell. This macro verifies that shallow copies are |
| 67029 | ** not misused. A shallow copy of a string or blob just copies a |
| 67030 | ** pointer to the string or blob, not the content. If the original |
| 67031 | ** is changed while the copy is still in use, the string or blob might |
| 67032 | ** be changed out from under the copy. This macro verifies that nothing |
| 67033 | ** like that ever happens. |
| 67034 | */ |
| 67035 | #ifdef SQLITE_DEBUG |
| 67036 | # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M) |
| 67037 | #else |
| 67038 | # define memAboutToChange(P,M) |
| @@ -67710,10 +67760,15 @@ | |
| 67760 | ** |
| 67761 | ** An unconditional jump to address P2. |
| 67762 | ** The next instruction executed will be |
| 67763 | ** the one at index P2 from the beginning of |
| 67764 | ** the program. |
| 67765 | ** |
| 67766 | ** The P1 parameter is not actually used by this opcode. However, it |
| 67767 | ** is sometimes set to 1 instead of 0 as a hint to the command-line shell |
| 67768 | ** that this Goto is the bottom of a loop and that the lines from P2 down |
| 67769 | ** to the current line should be indented for EXPLAIN output. |
| 67770 | */ |
| 67771 | case OP_Goto: { /* jump */ |
| 67772 | pc = pOp->p2 - 1; |
| 67773 | |
| 67774 | /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, |
| @@ -69205,12 +69260,12 @@ | |
| 69260 | |
| 69261 | /* Opcode: Once P1 P2 * * * |
| 69262 | ** |
| 69263 | ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise, |
| 69264 | ** set the flag and fall through to the next instruction. In other words, |
| 69265 | ** this opcode causes all following opcodes up through P2 (but not including |
| 69266 | ** P2) to run just once and to be skipped on subsequent times through the loop. |
| 69267 | */ |
| 69268 | case OP_Once: { /* jump */ |
| 69269 | assert( pOp->p1<p->nOnceFlag ); |
| 69270 | VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2); |
| 69271 | if( p->aOnceFlag[pOp->p1] ){ |
| @@ -83299,11 +83354,14 @@ | |
| 83354 | VdbeCoverage(v); |
| 83355 | callStatGet(v, regStat4, STAT_GET_NEQ, regEq); |
| 83356 | callStatGet(v, regStat4, STAT_GET_NLT, regLt); |
| 83357 | callStatGet(v, regStat4, STAT_GET_NDLT, regDLt); |
| 83358 | sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0); |
| 83359 | /* We know that the regSampleRowid row exists because it was read by |
| 83360 | ** the previous loop. Thus the not-found jump of seekOp will never |
| 83361 | ** be taken */ |
| 83362 | VdbeCoverageNeverTaken(v); |
| 83363 | #ifdef SQLITE_ENABLE_STAT3 |
| 83364 | sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, |
| 83365 | pIdx->aiColumn[0], regSample); |
| 83366 | #else |
| 83367 | for(i=0; i<nCol; i++){ |
| @@ -83313,11 +83371,11 @@ | |
| 83371 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample); |
| 83372 | #endif |
| 83373 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp); |
| 83374 | sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid); |
| 83375 | sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid); |
| 83376 | sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */ |
| 83377 | sqlite3VdbeJumpHere(v, addrIsNull); |
| 83378 | } |
| 83379 | #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */ |
| 83380 | |
| 83381 | /* End of analysis */ |
| @@ -91278,11 +91336,11 @@ | |
| 91336 | int argc, |
| 91337 | sqlite3_value **argv |
| 91338 | ){ |
| 91339 | unsigned char *z, *zOut; |
| 91340 | int i; |
| 91341 | zOut = z = sqlite3_malloc( argc*4+1 ); |
| 91342 | if( z==0 ){ |
| 91343 | sqlite3_result_error_nomem(context); |
| 91344 | return; |
| 91345 | } |
| 91346 | for(i=0; i<argc; i++){ |
| @@ -93479,17 +93537,17 @@ | |
| 93537 | |
| 93538 | /* |
| 93539 | ** Compute the affinity string for table pTab, if it has not already been |
| 93540 | ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities. |
| 93541 | ** |
| 93542 | ** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and |
| 93543 | ** if iReg>0 then code an OP_Affinity opcode that will set the affinities |
| 93544 | ** for register iReg and following. Or if affinities exists and iReg==0, |
| 93545 | ** then just set the P4 operand of the previous opcode (which should be |
| 93546 | ** an OP_MakeRecord) to the affinity string. |
| 93547 | ** |
| 93548 | ** A column affinity string has one character per column: |
| 93549 | ** |
| 93550 | ** Character Column affinity |
| 93551 | ** ------------------------------ |
| 93552 | ** 'a' TEXT |
| 93553 | ** 'b' NONE |
| @@ -93526,14 +93584,13 @@ | |
| 93584 | } |
| 93585 | } |
| 93586 | |
| 93587 | /* |
| 93588 | ** Return non-zero if the table pTab in database iDb or any of its indices |
| 93589 | ** have been opened at any point in the VDBE program. This is used to see if |
| 93590 | ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can |
| 93591 | ** run without using a temporary table for the results of the SELECT. |
| 93592 | */ |
| 93593 | static int readsTable(Parse *p, int iDb, Table *pTab){ |
| 93594 | Vdbe *v = sqlite3GetVdbe(p); |
| 93595 | int i; |
| 93596 | int iEnd = sqlite3VdbeCurrentAddr(v); |
| @@ -112384,17 +112441,17 @@ | |
| 112441 | } |
| 112442 | if( pLoop->wsFlags & WHERE_TOP_LIMIT ){ |
| 112443 | pRangeEnd = pLoop->aLTerm[j++]; |
| 112444 | nExtraReg = 1; |
| 112445 | if( pRangeStart==0 |
| 112446 | && (j = pIdx->aiColumn[nEq])>=0 |
| 112447 | && pIdx->pTable->aCol[j].notNull==0 |
| 112448 | ){ |
| 112449 | bSeekPastNull = 1; |
| 112450 | } |
| 112451 | } |
| 112452 | assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 ); |
| 112453 | |
| 112454 | /* Generate code to evaluate all constraint terms using == or IN |
| 112455 | ** and store the values of those terms in an array of registers |
| 112456 | ** starting at regBase. |
| 112457 | */ |
| 112458 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -107,11 +107,11 @@ | ||
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | 110 | #define SQLITE_VERSION "3.8.4" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | -#define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042" | |
| 112 | +#define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.4" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.4" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
+7
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -308,11 +308,11 @@ | ||
| 308 | 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | 311 | image_url_var("logo"); |
| 312 | 312 | image_url_var("background"); |
| 313 | - if( g.zLogin ){ | |
| 313 | + if( !login_is_nobody() ){ | |
| 314 | 314 | Th_Store("login", g.zLogin); |
| 315 | 315 | } |
| 316 | 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | 317 | Th_Render(zHeader); |
| 318 | 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | ||
| 346 | 346 | static void style_ad_unit(void){ |
| 347 | 347 | const char *zAd; |
| 348 | 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | 349 | return; |
| 350 | 350 | } |
| 351 | - if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0 | |
| 352 | - && db_get_boolean("adunit-omit-if-user",0) ){ | |
| 351 | + if( !login_is_nobody() | |
| 352 | + && fossil_strcmp(g.zLogin,"anonymous")!=0 | |
| 353 | + && db_get_boolean("adunit-omit-if-user",0) | |
| 354 | + ){ | |
| 353 | 355 | return; |
| 354 | 356 | } |
| 355 | 357 | zAd = db_get("adunit", 0); |
| 356 | 358 | if( zAd ) cgi_append_content(zAd, -1); |
| 357 | 359 | } |
| @@ -1298,10 +1300,12 @@ | ||
| 1298 | 1300 | zCap[i] = 0; |
| 1299 | 1301 | @ g.userUid = %d(g.userUid)<br /> |
| 1300 | 1302 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1301 | 1303 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1302 | 1304 | @ capabilities = %s(zCap)<br /> |
| 1305 | + @ g.zRepositoryName = %h(g.zRepositoryName)<br /> | |
| 1306 | + @ load_average() = %f(load_average())<br /> | |
| 1303 | 1307 | @ <hr> |
| 1304 | 1308 | P("HTTP_USER_AGENT"); |
| 1305 | 1309 | cgi_print_all(showAll); |
| 1306 | 1310 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1307 | 1311 | @ <hr> |
| 1308 | 1312 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -308,11 +308,11 @@ | |
| 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | image_url_var("logo"); |
| 312 | image_url_var("background"); |
| 313 | if( g.zLogin ){ |
| 314 | Th_Store("login", g.zLogin); |
| 315 | } |
| 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | Th_Render(zHeader); |
| 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | |
| 346 | static void style_ad_unit(void){ |
| 347 | const char *zAd; |
| 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | return; |
| 350 | } |
| 351 | if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0 |
| 352 | && db_get_boolean("adunit-omit-if-user",0) ){ |
| 353 | return; |
| 354 | } |
| 355 | zAd = db_get("adunit", 0); |
| 356 | if( zAd ) cgi_append_content(zAd, -1); |
| 357 | } |
| @@ -1298,10 +1300,12 @@ | |
| 1298 | zCap[i] = 0; |
| 1299 | @ g.userUid = %d(g.userUid)<br /> |
| 1300 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1301 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1302 | @ capabilities = %s(zCap)<br /> |
| 1303 | @ <hr> |
| 1304 | P("HTTP_USER_AGENT"); |
| 1305 | cgi_print_all(showAll); |
| 1306 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1307 | @ <hr> |
| 1308 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -308,11 +308,11 @@ | |
| 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | image_url_var("logo"); |
| 312 | image_url_var("background"); |
| 313 | if( !login_is_nobody() ){ |
| 314 | Th_Store("login", g.zLogin); |
| 315 | } |
| 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | Th_Render(zHeader); |
| 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | |
| 346 | static void style_ad_unit(void){ |
| 347 | const char *zAd; |
| 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | return; |
| 350 | } |
| 351 | if( !login_is_nobody() |
| 352 | && fossil_strcmp(g.zLogin,"anonymous")!=0 |
| 353 | && db_get_boolean("adunit-omit-if-user",0) |
| 354 | ){ |
| 355 | return; |
| 356 | } |
| 357 | zAd = db_get("adunit", 0); |
| 358 | if( zAd ) cgi_append_content(zAd, -1); |
| 359 | } |
| @@ -1298,10 +1300,12 @@ | |
| 1300 | zCap[i] = 0; |
| 1301 | @ g.userUid = %d(g.userUid)<br /> |
| 1302 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1303 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1304 | @ capabilities = %s(zCap)<br /> |
| 1305 | @ g.zRepositoryName = %h(g.zRepositoryName)<br /> |
| 1306 | @ load_average() = %f(load_average())<br /> |
| 1307 | @ <hr> |
| 1308 | P("HTTP_USER_AGENT"); |
| 1309 | cgi_print_all(showAll); |
| 1310 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1311 | @ <hr> |
| 1312 |
+1
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -322,11 +322,11 @@ | ||
| 322 | 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | 324 | }else{ |
| 325 | 325 | blob_appendf(&ctrl, "\n"); |
| 326 | 326 | } |
| 327 | - blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); | |
| 327 | + blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); | |
| 328 | 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | 330 | nrid = content_put(&ctrl); |
| 331 | 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | 332 | assert( blob_is_reset(&ctrl) ); |
| 333 | 333 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -322,11 +322,11 @@ | |
| 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | }else{ |
| 325 | blob_appendf(&ctrl, "\n"); |
| 326 | } |
| 327 | blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | nrid = content_put(&ctrl); |
| 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | assert( blob_is_reset(&ctrl) ); |
| 333 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -322,11 +322,11 @@ | |
| 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | }else{ |
| 325 | blob_appendf(&ctrl, "\n"); |
| 326 | } |
| 327 | blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); |
| 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | nrid = content_put(&ctrl); |
| 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | assert( blob_is_reset(&ctrl) ); |
| 333 |
+1
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -580,10 +580,11 @@ | ||
| 580 | 580 | int nName, nRid; |
| 581 | 581 | Blob tarball; |
| 582 | 582 | |
| 583 | 583 | login_check_credentials(); |
| 584 | 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | + load_control(); | |
| 585 | 586 | zName = mprintf("%s", PD("name","")); |
| 586 | 587 | nName = strlen(zName); |
| 587 | 588 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 588 | 589 | nRid = strlen(zRid); |
| 589 | 590 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 590 | 591 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -580,10 +580,11 @@ | |
| 580 | int nName, nRid; |
| 581 | Blob tarball; |
| 582 | |
| 583 | login_check_credentials(); |
| 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | zName = mprintf("%s", PD("name","")); |
| 586 | nName = strlen(zName); |
| 587 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 588 | nRid = strlen(zRid); |
| 589 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 590 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -580,10 +580,11 @@ | |
| 580 | int nName, nRid; |
| 581 | Blob tarball; |
| 582 | |
| 583 | login_check_credentials(); |
| 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | load_control(); |
| 586 | zName = mprintf("%s", PD("name","")); |
| 587 | nName = strlen(zName); |
| 588 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 589 | nRid = strlen(zRid); |
| 590 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 591 |
+4
-4
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -614,11 +614,11 @@ | ||
| 614 | 614 | }else{ |
| 615 | 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | 616 | } |
| 617 | 617 | *(const char**)pUuid = zUuid; |
| 618 | 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | - blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); | |
| 619 | + blob_appendf(&tktchng, "U %F\n", login_name()); | |
| 620 | 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | 622 | if( nJ==0 ){ |
| 623 | 623 | blob_reset(&tktchng); |
| 624 | 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | ||
| 675 | 675 | login_insert_csrf_secret(); |
| 676 | 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | 678 | } |
| 679 | 679 | zScript = ticket_newpage_code(); |
| 680 | - Th_Store("login", g.zLogin ? g.zLogin : "nobody"); | |
| 680 | + Th_Store("login", login_name()); | |
| 681 | 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | 683 | (void*)&zNewUuid, 0); |
| 684 | 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | ||
| 743 | 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | 746 | login_insert_csrf_secret(); |
| 747 | 747 | zScript = ticket_editpage_code(); |
| 748 | - Th_Store("login", g.zLogin ? g.zLogin : "nobody"); | |
| 748 | + Th_Store("login", login_name()); | |
| 749 | 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | ||
| 1102 | 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | 1103 | db_find_and_open_repository(0, 0); |
| 1104 | 1104 | user_select(); |
| 1105 | 1105 | |
| 1106 | 1106 | zUser = find_option("user-override",0,1); |
| 1107 | - if( zUser==0 ) zUser = g.zLogin; | |
| 1107 | + if( zUser==0 ) zUser = login_name(); | |
| 1108 | 1108 | zDate = find_option("date-override",0,1); |
| 1109 | 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 | 1113 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -614,11 +614,11 @@ | |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| 617 | *(const char**)pUuid = zUuid; |
| 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | if( nJ==0 ){ |
| 623 | blob_reset(&tktchng); |
| 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | |
| 675 | login_insert_csrf_secret(); |
| 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | } |
| 679 | zScript = ticket_newpage_code(); |
| 680 | Th_Store("login", g.zLogin ? g.zLogin : "nobody"); |
| 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | (void*)&zNewUuid, 0); |
| 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | |
| 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | login_insert_csrf_secret(); |
| 747 | zScript = ticket_editpage_code(); |
| 748 | Th_Store("login", g.zLogin ? g.zLogin : "nobody"); |
| 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | db_find_and_open_repository(0, 0); |
| 1104 | user_select(); |
| 1105 | |
| 1106 | zUser = find_option("user-override",0,1); |
| 1107 | if( zUser==0 ) zUser = g.zLogin; |
| 1108 | zDate = find_option("date-override",0,1); |
| 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -614,11 +614,11 @@ | |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| 617 | *(const char**)pUuid = zUuid; |
| 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | blob_appendf(&tktchng, "U %F\n", login_name()); |
| 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | if( nJ==0 ){ |
| 623 | blob_reset(&tktchng); |
| 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | |
| 675 | login_insert_csrf_secret(); |
| 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | } |
| 679 | zScript = ticket_newpage_code(); |
| 680 | Th_Store("login", login_name()); |
| 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | (void*)&zNewUuid, 0); |
| 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | |
| 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | login_insert_csrf_secret(); |
| 747 | zScript = ticket_editpage_code(); |
| 748 | Th_Store("login", login_name()); |
| 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | db_find_and_open_repository(0, 0); |
| 1104 | user_select(); |
| 1105 | |
| 1106 | zUser = find_option("user-override",0,1); |
| 1107 | if( zUser==0 ) zUser = login_name(); |
| 1108 | zDate = find_option("date-override",0,1); |
| 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 |
+12
-12
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -420,12 +420,12 @@ | ||
| 420 | 420 | if( rid ){ |
| 421 | 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | 423 | free(zUuid); |
| 424 | 424 | } |
| 425 | - if( g.zLogin ){ | |
| 426 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 425 | + if( !login_is_nobody() ){ | |
| 426 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 427 | 427 | } |
| 428 | 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | 429 | md5sum_blob(&wiki, &cksum); |
| 430 | 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | ||
| 558 | 558 | zRemark = PD("r",""); |
| 559 | 559 | zUser = PD("u",g.zLogin); |
| 560 | 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | - zId, zDate, g.zLogin); | |
| 564 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 563 | + zId, zDate, login_name()); | |
| 564 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 565 | 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | 566 | } |
| 567 | 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | - blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin); | |
| 570 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 569 | + blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name()); | |
| 570 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 571 | 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | 572 | } |
| 573 | 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | 574 | }else{ |
| 575 | 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | - "On %s UTC %s", zDate, g.zLogin); | |
| 577 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 576 | + "On %s UTC %s", zDate, login_name()); | |
| 577 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 578 | 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | 579 | } |
| 580 | 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | 581 | } |
| 582 | 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | ||
| 650 | 650 | if( rid ){ |
| 651 | 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | 653 | free(zUuid); |
| 654 | 654 | } |
| 655 | - if( g.zLogin ){ | |
| 656 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 655 | + if( !login_is_nobody() ){ | |
| 656 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 657 | 657 | } |
| 658 | 658 | appendRemark(&body, zMimetype); |
| 659 | 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | 660 | md5sum_blob(&wiki, &cksum); |
| 661 | 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | ||
| 993 | 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | 995 | free(zUuid); |
| 996 | 996 | } |
| 997 | 997 | user_select(); |
| 998 | - if( g.zLogin ){ | |
| 999 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 998 | + if( !login_is_nobody() ){ | |
| 999 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 1000 | 1000 | } |
| 1001 | 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | 1002 | blob_str(pContent) ); |
| 1003 | 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 | 1005 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | if( rid ){ |
| 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | free(zUuid); |
| 424 | } |
| 425 | if( g.zLogin ){ |
| 426 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 427 | } |
| 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | md5sum_blob(&wiki, &cksum); |
| 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | |
| 558 | zRemark = PD("r",""); |
| 559 | zUser = PD("u",g.zLogin); |
| 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | zId, zDate, g.zLogin); |
| 564 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | } |
| 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin); |
| 570 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | } |
| 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | }else{ |
| 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | "On %s UTC %s", zDate, g.zLogin); |
| 577 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | } |
| 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | } |
| 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | |
| 650 | if( rid ){ |
| 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | free(zUuid); |
| 654 | } |
| 655 | if( g.zLogin ){ |
| 656 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 657 | } |
| 658 | appendRemark(&body, zMimetype); |
| 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | md5sum_blob(&wiki, &cksum); |
| 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | |
| 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | free(zUuid); |
| 996 | } |
| 997 | user_select(); |
| 998 | if( g.zLogin ){ |
| 999 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 1000 | } |
| 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | blob_str(pContent) ); |
| 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | if( rid ){ |
| 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | free(zUuid); |
| 424 | } |
| 425 | if( !login_is_nobody() ){ |
| 426 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 427 | } |
| 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | md5sum_blob(&wiki, &cksum); |
| 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | |
| 558 | zRemark = PD("r",""); |
| 559 | zUser = PD("u",g.zLogin); |
| 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | zId, zDate, login_name()); |
| 564 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | } |
| 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name()); |
| 570 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | } |
| 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | }else{ |
| 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | "On %s UTC %s", zDate, login_name()); |
| 577 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | } |
| 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | } |
| 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | |
| 650 | if( rid ){ |
| 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | free(zUuid); |
| 654 | } |
| 655 | if( !login_is_nobody() ){ |
| 656 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 657 | } |
| 658 | appendRemark(&body, zMimetype); |
| 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | md5sum_blob(&wiki, &cksum); |
| 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | |
| 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | free(zUuid); |
| 996 | } |
| 997 | user_select(); |
| 998 | if( !login_is_nobody() ){ |
| 999 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 1000 | } |
| 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | blob_str(pContent) ); |
| 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 |
+1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -427,10 +427,11 @@ | ||
| 427 | 427 | int nName, nRid; |
| 428 | 428 | Blob zip; |
| 429 | 429 | |
| 430 | 430 | login_check_credentials(); |
| 431 | 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | + load_control(); | |
| 432 | 433 | zName = mprintf("%s", PD("name","")); |
| 433 | 434 | nName = strlen(zName); |
| 434 | 435 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 435 | 436 | nRid = strlen(zRid); |
| 436 | 437 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 437 | 438 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -427,10 +427,11 @@ | |
| 427 | int nName, nRid; |
| 428 | Blob zip; |
| 429 | |
| 430 | login_check_credentials(); |
| 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | zName = mprintf("%s", PD("name","")); |
| 433 | nName = strlen(zName); |
| 434 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 435 | nRid = strlen(zRid); |
| 436 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 437 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -427,10 +427,11 @@ | |
| 427 | int nName, nRid; |
| 428 | Blob zip; |
| 429 | |
| 430 | login_check_credentials(); |
| 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | load_control(); |
| 433 | zName = mprintf("%s", PD("name","")); |
| 434 | nName = strlen(zName); |
| 435 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 436 | nRid = strlen(zRid); |
| 437 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 438 |
+1
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -139,10 +139,11 @@ | ||
| 139 | 139 | catch {exec $::fossilexe close -f} |
| 140 | 140 | file delete $filename |
| 141 | 141 | exec $::fossilexe new $filename |
| 142 | 142 | exec $::fossilexe open $filename |
| 143 | 143 | exec $::fossilexe clean -f |
| 144 | + exec $::fossilexe set mtime-changes off | |
| 144 | 145 | } |
| 145 | 146 | |
| 146 | 147 | # Normalize file status lists (like those returned by 'fossil changes') |
| 147 | 148 | # so they can be compared using simple string comparison |
| 148 | 149 | # |
| 149 | 150 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -139,10 +139,11 @@ | |
| 139 | catch {exec $::fossilexe close -f} |
| 140 | file delete $filename |
| 141 | exec $::fossilexe new $filename |
| 142 | exec $::fossilexe open $filename |
| 143 | exec $::fossilexe clean -f |
| 144 | } |
| 145 | |
| 146 | # Normalize file status lists (like those returned by 'fossil changes') |
| 147 | # so they can be compared using simple string comparison |
| 148 | # |
| 149 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -139,10 +139,11 @@ | |
| 139 | catch {exec $::fossilexe close -f} |
| 140 | file delete $filename |
| 141 | exec $::fossilexe new $filename |
| 142 | exec $::fossilexe open $filename |
| 143 | exec $::fossilexe clean -f |
| 144 | exec $::fossilexe set mtime-changes off |
| 145 | } |
| 146 | |
| 147 | # Normalize file status lists (like those returned by 'fossil changes') |
| 148 | # so they can be compared using simple string comparison |
| 149 | # |
| 150 |
+1
-1
| --- test/utf16be.txt | ||
| +++ test/utf16be.txt | ||
| @@ -12,11 +12,11 @@ | ||
| 12 | 12 | |
| 13 | 13 | Test procedures: |
| 14 | 14 | |
| 15 | 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | 16 | webpage. |
| 17 | - | |
| 17 | + | |
| 18 | 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | 19 | |
| 20 | 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | 21 | |
| 22 | 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 | 23 |
| --- test/utf16be.txt | |
| +++ test/utf16be.txt | |
| @@ -12,11 +12,11 @@ | |
| 12 | |
| 13 | Test procedures: |
| 14 | |
| 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | webpage. |
| 17 | |
| 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | |
| 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | |
| 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 |
| --- test/utf16be.txt | |
| +++ test/utf16be.txt | |
| @@ -12,11 +12,11 @@ | |
| 12 | |
| 13 | Test procedures: |
| 14 | |
| 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | webpage. |
| 17 | |
| 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | |
| 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | |
| 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 |
+1
-1
| --- test/utf16le.txt | ||
| +++ test/utf16le.txt | ||
| @@ -12,11 +12,11 @@ | ||
| 12 | 12 | |
| 13 | 13 | Test procedures: |
| 14 | 14 | |
| 15 | 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | 16 | webpage. |
| 17 | - | |
| 17 | + | |
| 18 | 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | 19 | |
| 20 | 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | 21 | |
| 22 | 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 | 23 |
| --- test/utf16le.txt | |
| +++ test/utf16le.txt | |
| @@ -12,11 +12,11 @@ | |
| 12 | |
| 13 | Test procedures: |
| 14 | |
| 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | webpage. |
| 17 | |
| 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | |
| 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | |
| 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 |
| --- test/utf16le.txt | |
| +++ test/utf16le.txt | |
| @@ -12,11 +12,11 @@ | |
| 12 | |
| 13 | Test procedures: |
| 14 | |
| 15 | 1. Verify that this file is correctly display using the /artifact |
| 16 | webpage. |
| 17 | |
| 18 | 2. Verify that this file is correctly displayed by the /doc webpage. |
| 19 | |
| 20 | 3. Verify that changes to are correctly displayed by the /fdiff webpage. |
| 21 | |
| 22 | 4. Verify that the "fossil diff" command correctly displays changes |
| 23 |
+10
-4
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -28,13 +28,13 @@ | ||
| 28 | 28 | |
| 29 | 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | 30 | |
| 31 | 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | 32 | |
| 33 | -SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.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 doc_.c encode_.c event_.c export_.c file_.c finfo_.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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.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 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 doc_.c encode_.c event_.c export_.c file_.c finfo_.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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.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 | 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)\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)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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)\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)\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)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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)\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 | 36 | |
| 37 | 37 | |
| 38 | 38 | RC=$(DMDIR)\bin\rcc |
| 39 | 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | 40 | |
| @@ -48,11 +48,11 @@ | ||
| 48 | 48 | |
| 49 | 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | 51 | |
| 52 | 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | - +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 53 | + +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 54 | 54 | +echo fossil >> $@ |
| 55 | 55 | +echo fossil >> $@ |
| 56 | 56 | +echo $(LIBS) >> $@ |
| 57 | 57 | +echo. >> $@ |
| 58 | 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | ||
| 436 | 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | 438 | |
| 439 | 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | 440 | +translate$E $** > $@ |
| 441 | + | |
| 442 | +$(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h | |
| 443 | + $(TCC) -o$@ -c loadctrl_.c | |
| 444 | + | |
| 445 | +loadctrl_.c : $(SRCDIR)\loadctrl.c | |
| 446 | + +translate$E $** > $@ | |
| 441 | 447 | |
| 442 | 448 | $(OBJDIR)\login$O : login_.c login.h |
| 443 | 449 | $(TCC) -o$@ -c login_.c |
| 444 | 450 | |
| 445 | 451 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | ||
| 762 | 768 | |
| 763 | 769 | zip_.c : $(SRCDIR)\zip.c |
| 764 | 770 | +translate$E $** > $@ |
| 765 | 771 | |
| 766 | 772 | headers: makeheaders$E page_index.h VERSION.h |
| 767 | - +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 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 doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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 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 | |
| 773 | + +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 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 doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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 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 | |
| 768 | 774 | @copy /Y nul: headers |
| 769 | 775 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -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 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 doc_.c encode_.c event_.c export_.c file_.c finfo_.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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.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)\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)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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)\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 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | |
| 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | |
| 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | +translate$E $** > $@ |
| 441 | |
| 442 | $(OBJDIR)\login$O : login_.c login.h |
| 443 | $(TCC) -o$@ -c login_.c |
| 444 | |
| 445 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | |
| 762 | |
| 763 | zip_.c : $(SRCDIR)\zip.c |
| 764 | +translate$E $** > $@ |
| 765 | |
| 766 | headers: makeheaders$E page_index.h VERSION.h |
| 767 | +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 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 doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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 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 |
| 768 | @copy /Y nul: headers |
| 769 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -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 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 doc_.c encode_.c event_.c export_.c file_.c finfo_.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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.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)\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)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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)\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 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | |
| 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | |
| 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | +translate$E $** > $@ |
| 441 | |
| 442 | $(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h |
| 443 | $(TCC) -o$@ -c loadctrl_.c |
| 444 | |
| 445 | loadctrl_.c : $(SRCDIR)\loadctrl.c |
| 446 | +translate$E $** > $@ |
| 447 | |
| 448 | $(OBJDIR)\login$O : login_.c login.h |
| 449 | $(TCC) -o$@ -c login_.c |
| 450 | |
| 451 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | |
| 768 | |
| 769 | zip_.c : $(SRCDIR)\zip.c |
| 770 | +translate$E $** > $@ |
| 771 | |
| 772 | headers: makeheaders$E page_index.h VERSION.h |
| 773 | +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 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 doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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 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 |
| 774 | @copy /Y nul: headers |
| 775 |
+12
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -309,10 +309,11 @@ | ||
| 309 | 309 | $(SRCDIR)/json_tag.c \ |
| 310 | 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | 311 | $(SRCDIR)/json_user.c \ |
| 312 | 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | 313 | $(SRCDIR)/leaf.c \ |
| 314 | + $(SRCDIR)/loadctrl.c \ | |
| 314 | 315 | $(SRCDIR)/login.c \ |
| 315 | 316 | $(SRCDIR)/lookslike.c \ |
| 316 | 317 | $(SRCDIR)/main.c \ |
| 317 | 318 | $(SRCDIR)/manifest.c \ |
| 318 | 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | ||
| 419 | 420 | $(OBJDIR)/json_tag_.c \ |
| 420 | 421 | $(OBJDIR)/json_timeline_.c \ |
| 421 | 422 | $(OBJDIR)/json_user_.c \ |
| 422 | 423 | $(OBJDIR)/json_wiki_.c \ |
| 423 | 424 | $(OBJDIR)/leaf_.c \ |
| 425 | + $(OBJDIR)/loadctrl_.c \ | |
| 424 | 426 | $(OBJDIR)/login_.c \ |
| 425 | 427 | $(OBJDIR)/lookslike_.c \ |
| 426 | 428 | $(OBJDIR)/main_.c \ |
| 427 | 429 | $(OBJDIR)/manifest_.c \ |
| 428 | 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | ||
| 529 | 531 | $(OBJDIR)/json_tag.o \ |
| 530 | 532 | $(OBJDIR)/json_timeline.o \ |
| 531 | 533 | $(OBJDIR)/json_user.o \ |
| 532 | 534 | $(OBJDIR)/json_wiki.o \ |
| 533 | 535 | $(OBJDIR)/leaf.o \ |
| 536 | + $(OBJDIR)/loadctrl.o \ | |
| 534 | 537 | $(OBJDIR)/login.o \ |
| 535 | 538 | $(OBJDIR)/lookslike.o \ |
| 536 | 539 | $(OBJDIR)/main.o \ |
| 537 | 540 | $(OBJDIR)/manifest.o \ |
| 538 | 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | ||
| 771 | 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | + $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ | |
| 776 | 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | ||
| 1265 | 1269 | |
| 1266 | 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | 1272 | |
| 1269 | 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | + | |
| 1275 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 1276 | + $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 1277 | + | |
| 1278 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 1279 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 1280 | + | |
| 1281 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 1270 | 1282 | |
| 1271 | 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | 1285 | |
| 1274 | 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 | 1287 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/login.c \ |
| 315 | $(SRCDIR)/lookslike.c \ |
| 316 | $(SRCDIR)/main.c \ |
| 317 | $(SRCDIR)/manifest.c \ |
| 318 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 419 | $(OBJDIR)/json_tag_.c \ |
| 420 | $(OBJDIR)/json_timeline_.c \ |
| 421 | $(OBJDIR)/json_user_.c \ |
| 422 | $(OBJDIR)/json_wiki_.c \ |
| 423 | $(OBJDIR)/leaf_.c \ |
| 424 | $(OBJDIR)/login_.c \ |
| 425 | $(OBJDIR)/lookslike_.c \ |
| 426 | $(OBJDIR)/main_.c \ |
| 427 | $(OBJDIR)/manifest_.c \ |
| 428 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 529 | $(OBJDIR)/json_tag.o \ |
| 530 | $(OBJDIR)/json_timeline.o \ |
| 531 | $(OBJDIR)/json_user.o \ |
| 532 | $(OBJDIR)/json_wiki.o \ |
| 533 | $(OBJDIR)/leaf.o \ |
| 534 | $(OBJDIR)/login.o \ |
| 535 | $(OBJDIR)/lookslike.o \ |
| 536 | $(OBJDIR)/main.o \ |
| 537 | $(OBJDIR)/manifest.o \ |
| 538 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 771 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 776 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1265 | |
| 1266 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | |
| 1269 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1270 | |
| 1271 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | |
| 1274 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/loadctrl.c \ |
| 315 | $(SRCDIR)/login.c \ |
| 316 | $(SRCDIR)/lookslike.c \ |
| 317 | $(SRCDIR)/main.c \ |
| 318 | $(SRCDIR)/manifest.c \ |
| 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 420 | $(OBJDIR)/json_tag_.c \ |
| 421 | $(OBJDIR)/json_timeline_.c \ |
| 422 | $(OBJDIR)/json_user_.c \ |
| 423 | $(OBJDIR)/json_wiki_.c \ |
| 424 | $(OBJDIR)/leaf_.c \ |
| 425 | $(OBJDIR)/loadctrl_.c \ |
| 426 | $(OBJDIR)/login_.c \ |
| 427 | $(OBJDIR)/lookslike_.c \ |
| 428 | $(OBJDIR)/main_.c \ |
| 429 | $(OBJDIR)/manifest_.c \ |
| 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 531 | $(OBJDIR)/json_tag.o \ |
| 532 | $(OBJDIR)/json_timeline.o \ |
| 533 | $(OBJDIR)/json_user.o \ |
| 534 | $(OBJDIR)/json_wiki.o \ |
| 535 | $(OBJDIR)/leaf.o \ |
| 536 | $(OBJDIR)/loadctrl.o \ |
| 537 | $(OBJDIR)/login.o \ |
| 538 | $(OBJDIR)/lookslike.o \ |
| 539 | $(OBJDIR)/main.o \ |
| 540 | $(OBJDIR)/manifest.o \ |
| 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ |
| 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1269 | |
| 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1272 | |
| 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | |
| 1275 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 1276 | $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 1277 | |
| 1278 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 1279 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 1280 | |
| 1281 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 1282 | |
| 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1285 | |
| 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1287 |
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -309,10 +309,11 @@ | ||
| 309 | 309 | $(SRCDIR)/json_tag.c \ |
| 310 | 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | 311 | $(SRCDIR)/json_user.c \ |
| 312 | 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | 313 | $(SRCDIR)/leaf.c \ |
| 314 | + $(SRCDIR)/loadctrl.c \ | |
| 314 | 315 | $(SRCDIR)/login.c \ |
| 315 | 316 | $(SRCDIR)/lookslike.c \ |
| 316 | 317 | $(SRCDIR)/main.c \ |
| 317 | 318 | $(SRCDIR)/manifest.c \ |
| 318 | 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | ||
| 419 | 420 | $(OBJDIR)/json_tag_.c \ |
| 420 | 421 | $(OBJDIR)/json_timeline_.c \ |
| 421 | 422 | $(OBJDIR)/json_user_.c \ |
| 422 | 423 | $(OBJDIR)/json_wiki_.c \ |
| 423 | 424 | $(OBJDIR)/leaf_.c \ |
| 425 | + $(OBJDIR)/loadctrl_.c \ | |
| 424 | 426 | $(OBJDIR)/login_.c \ |
| 425 | 427 | $(OBJDIR)/lookslike_.c \ |
| 426 | 428 | $(OBJDIR)/main_.c \ |
| 427 | 429 | $(OBJDIR)/manifest_.c \ |
| 428 | 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | ||
| 529 | 531 | $(OBJDIR)/json_tag.o \ |
| 530 | 532 | $(OBJDIR)/json_timeline.o \ |
| 531 | 533 | $(OBJDIR)/json_user.o \ |
| 532 | 534 | $(OBJDIR)/json_wiki.o \ |
| 533 | 535 | $(OBJDIR)/leaf.o \ |
| 536 | + $(OBJDIR)/loadctrl.o \ | |
| 534 | 537 | $(OBJDIR)/login.o \ |
| 535 | 538 | $(OBJDIR)/lookslike.o \ |
| 536 | 539 | $(OBJDIR)/main.o \ |
| 537 | 540 | $(OBJDIR)/manifest.o \ |
| 538 | 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | ||
| 771 | 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | + $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ | |
| 776 | 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | ||
| 1265 | 1269 | |
| 1266 | 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | 1272 | |
| 1269 | 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | + | |
| 1275 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 1276 | + $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 1277 | + | |
| 1278 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 1279 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 1280 | + | |
| 1281 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 1270 | 1282 | |
| 1271 | 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | 1285 | |
| 1274 | 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 | 1287 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/login.c \ |
| 315 | $(SRCDIR)/lookslike.c \ |
| 316 | $(SRCDIR)/main.c \ |
| 317 | $(SRCDIR)/manifest.c \ |
| 318 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 419 | $(OBJDIR)/json_tag_.c \ |
| 420 | $(OBJDIR)/json_timeline_.c \ |
| 421 | $(OBJDIR)/json_user_.c \ |
| 422 | $(OBJDIR)/json_wiki_.c \ |
| 423 | $(OBJDIR)/leaf_.c \ |
| 424 | $(OBJDIR)/login_.c \ |
| 425 | $(OBJDIR)/lookslike_.c \ |
| 426 | $(OBJDIR)/main_.c \ |
| 427 | $(OBJDIR)/manifest_.c \ |
| 428 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 529 | $(OBJDIR)/json_tag.o \ |
| 530 | $(OBJDIR)/json_timeline.o \ |
| 531 | $(OBJDIR)/json_user.o \ |
| 532 | $(OBJDIR)/json_wiki.o \ |
| 533 | $(OBJDIR)/leaf.o \ |
| 534 | $(OBJDIR)/login.o \ |
| 535 | $(OBJDIR)/lookslike.o \ |
| 536 | $(OBJDIR)/main.o \ |
| 537 | $(OBJDIR)/manifest.o \ |
| 538 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 771 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 776 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1265 | |
| 1266 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | |
| 1269 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1270 | |
| 1271 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | |
| 1274 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/loadctrl.c \ |
| 315 | $(SRCDIR)/login.c \ |
| 316 | $(SRCDIR)/lookslike.c \ |
| 317 | $(SRCDIR)/main.c \ |
| 318 | $(SRCDIR)/manifest.c \ |
| 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 420 | $(OBJDIR)/json_tag_.c \ |
| 421 | $(OBJDIR)/json_timeline_.c \ |
| 422 | $(OBJDIR)/json_user_.c \ |
| 423 | $(OBJDIR)/json_wiki_.c \ |
| 424 | $(OBJDIR)/leaf_.c \ |
| 425 | $(OBJDIR)/loadctrl_.c \ |
| 426 | $(OBJDIR)/login_.c \ |
| 427 | $(OBJDIR)/lookslike_.c \ |
| 428 | $(OBJDIR)/main_.c \ |
| 429 | $(OBJDIR)/manifest_.c \ |
| 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 531 | $(OBJDIR)/json_tag.o \ |
| 532 | $(OBJDIR)/json_timeline.o \ |
| 533 | $(OBJDIR)/json_user.o \ |
| 534 | $(OBJDIR)/json_wiki.o \ |
| 535 | $(OBJDIR)/leaf.o \ |
| 536 | $(OBJDIR)/loadctrl.o \ |
| 537 | $(OBJDIR)/login.o \ |
| 538 | $(OBJDIR)/lookslike.o \ |
| 539 | $(OBJDIR)/main.o \ |
| 540 | $(OBJDIR)/manifest.o \ |
| 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ |
| 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1269 | |
| 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1272 | |
| 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | |
| 1275 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 1276 | $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 1277 | |
| 1278 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 1279 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 1280 | |
| 1281 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 1282 | |
| 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1285 | |
| 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1287 |
+10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -160,10 +160,11 @@ | ||
| 160 | 160 | json_tag_.c \ |
| 161 | 161 | json_timeline_.c \ |
| 162 | 162 | json_user_.c \ |
| 163 | 163 | json_wiki_.c \ |
| 164 | 164 | leaf_.c \ |
| 165 | + loadctrl_.c \ | |
| 165 | 166 | login_.c \ |
| 166 | 167 | lookslike_.c \ |
| 167 | 168 | main_.c \ |
| 168 | 169 | manifest_.c \ |
| 169 | 170 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | ||
| 270 | 271 | $(OX)\json_tag$O \ |
| 271 | 272 | $(OX)\json_timeline$O \ |
| 272 | 273 | $(OX)\json_user$O \ |
| 273 | 274 | $(OX)\json_wiki$O \ |
| 274 | 275 | $(OX)\leaf$O \ |
| 276 | + $(OX)\loadctrl$O \ | |
| 275 | 277 | $(OX)\login$O \ |
| 276 | 278 | $(OX)\lookslike$O \ |
| 277 | 279 | $(OX)\main$O \ |
| 278 | 280 | $(OX)\manifest$O \ |
| 279 | 281 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | ||
| 403 | 405 | echo $(OX)\json_tag.obj >> $@ |
| 404 | 406 | echo $(OX)\json_timeline.obj >> $@ |
| 405 | 407 | echo $(OX)\json_user.obj >> $@ |
| 406 | 408 | echo $(OX)\json_wiki.obj >> $@ |
| 407 | 409 | echo $(OX)\leaf.obj >> $@ |
| 410 | + echo $(OX)\loadctrl.obj >> $@ | |
| 408 | 411 | echo $(OX)\login.obj >> $@ |
| 409 | 412 | echo $(OX)\lookslike.obj >> $@ |
| 410 | 413 | echo $(OX)\main.obj >> $@ |
| 411 | 414 | echo $(OX)\manifest.obj >> $@ |
| 412 | 415 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | ||
| 864 | 867 | $(OX)\leaf$O : leaf_.c leaf.h |
| 865 | 868 | $(TCC) /Fo$@ -c leaf_.c |
| 866 | 869 | |
| 867 | 870 | leaf_.c : $(SRCDIR)\leaf.c |
| 868 | 871 | translate$E $** > $@ |
| 872 | + | |
| 873 | +$(OX)\loadctrl$O : loadctrl_.c loadctrl.h | |
| 874 | + $(TCC) /Fo$@ -c loadctrl_.c | |
| 875 | + | |
| 876 | +loadctrl_.c : $(SRCDIR)\loadctrl.c | |
| 877 | + translate$E $** > $@ | |
| 869 | 878 | |
| 870 | 879 | $(OX)\login$O : login_.c login.h |
| 871 | 880 | $(TCC) /Fo$@ -c login_.c |
| 872 | 881 | |
| 873 | 882 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | ||
| 1247 | 1256 | json_tag_.c:json_tag.h \ |
| 1248 | 1257 | json_timeline_.c:json_timeline.h \ |
| 1249 | 1258 | json_user_.c:json_user.h \ |
| 1250 | 1259 | json_wiki_.c:json_wiki.h \ |
| 1251 | 1260 | leaf_.c:leaf.h \ |
| 1261 | + loadctrl_.c:loadctrl.h \ | |
| 1252 | 1262 | login_.c:login.h \ |
| 1253 | 1263 | lookslike_.c:lookslike.h \ |
| 1254 | 1264 | main_.c:main.h \ |
| 1255 | 1265 | manifest_.c:manifest.h \ |
| 1256 | 1266 | markdown_.c:markdown.h \ |
| 1257 | 1267 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -160,10 +160,11 @@ | |
| 160 | json_tag_.c \ |
| 161 | json_timeline_.c \ |
| 162 | json_user_.c \ |
| 163 | json_wiki_.c \ |
| 164 | leaf_.c \ |
| 165 | login_.c \ |
| 166 | lookslike_.c \ |
| 167 | main_.c \ |
| 168 | manifest_.c \ |
| 169 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | |
| 270 | $(OX)\json_tag$O \ |
| 271 | $(OX)\json_timeline$O \ |
| 272 | $(OX)\json_user$O \ |
| 273 | $(OX)\json_wiki$O \ |
| 274 | $(OX)\leaf$O \ |
| 275 | $(OX)\login$O \ |
| 276 | $(OX)\lookslike$O \ |
| 277 | $(OX)\main$O \ |
| 278 | $(OX)\manifest$O \ |
| 279 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | |
| 403 | echo $(OX)\json_tag.obj >> $@ |
| 404 | echo $(OX)\json_timeline.obj >> $@ |
| 405 | echo $(OX)\json_user.obj >> $@ |
| 406 | echo $(OX)\json_wiki.obj >> $@ |
| 407 | echo $(OX)\leaf.obj >> $@ |
| 408 | echo $(OX)\login.obj >> $@ |
| 409 | echo $(OX)\lookslike.obj >> $@ |
| 410 | echo $(OX)\main.obj >> $@ |
| 411 | echo $(OX)\manifest.obj >> $@ |
| 412 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | |
| 864 | $(OX)\leaf$O : leaf_.c leaf.h |
| 865 | $(TCC) /Fo$@ -c leaf_.c |
| 866 | |
| 867 | leaf_.c : $(SRCDIR)\leaf.c |
| 868 | translate$E $** > $@ |
| 869 | |
| 870 | $(OX)\login$O : login_.c login.h |
| 871 | $(TCC) /Fo$@ -c login_.c |
| 872 | |
| 873 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | |
| 1247 | json_tag_.c:json_tag.h \ |
| 1248 | json_timeline_.c:json_timeline.h \ |
| 1249 | json_user_.c:json_user.h \ |
| 1250 | json_wiki_.c:json_wiki.h \ |
| 1251 | leaf_.c:leaf.h \ |
| 1252 | login_.c:login.h \ |
| 1253 | lookslike_.c:lookslike.h \ |
| 1254 | main_.c:main.h \ |
| 1255 | manifest_.c:manifest.h \ |
| 1256 | markdown_.c:markdown.h \ |
| 1257 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -160,10 +160,11 @@ | |
| 160 | json_tag_.c \ |
| 161 | json_timeline_.c \ |
| 162 | json_user_.c \ |
| 163 | json_wiki_.c \ |
| 164 | leaf_.c \ |
| 165 | loadctrl_.c \ |
| 166 | login_.c \ |
| 167 | lookslike_.c \ |
| 168 | main_.c \ |
| 169 | manifest_.c \ |
| 170 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | |
| 271 | $(OX)\json_tag$O \ |
| 272 | $(OX)\json_timeline$O \ |
| 273 | $(OX)\json_user$O \ |
| 274 | $(OX)\json_wiki$O \ |
| 275 | $(OX)\leaf$O \ |
| 276 | $(OX)\loadctrl$O \ |
| 277 | $(OX)\login$O \ |
| 278 | $(OX)\lookslike$O \ |
| 279 | $(OX)\main$O \ |
| 280 | $(OX)\manifest$O \ |
| 281 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | |
| 405 | echo $(OX)\json_tag.obj >> $@ |
| 406 | echo $(OX)\json_timeline.obj >> $@ |
| 407 | echo $(OX)\json_user.obj >> $@ |
| 408 | echo $(OX)\json_wiki.obj >> $@ |
| 409 | echo $(OX)\leaf.obj >> $@ |
| 410 | echo $(OX)\loadctrl.obj >> $@ |
| 411 | echo $(OX)\login.obj >> $@ |
| 412 | echo $(OX)\lookslike.obj >> $@ |
| 413 | echo $(OX)\main.obj >> $@ |
| 414 | echo $(OX)\manifest.obj >> $@ |
| 415 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | |
| 867 | $(OX)\leaf$O : leaf_.c leaf.h |
| 868 | $(TCC) /Fo$@ -c leaf_.c |
| 869 | |
| 870 | leaf_.c : $(SRCDIR)\leaf.c |
| 871 | translate$E $** > $@ |
| 872 | |
| 873 | $(OX)\loadctrl$O : loadctrl_.c loadctrl.h |
| 874 | $(TCC) /Fo$@ -c loadctrl_.c |
| 875 | |
| 876 | loadctrl_.c : $(SRCDIR)\loadctrl.c |
| 877 | translate$E $** > $@ |
| 878 | |
| 879 | $(OX)\login$O : login_.c login.h |
| 880 | $(TCC) /Fo$@ -c login_.c |
| 881 | |
| 882 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | |
| 1256 | json_tag_.c:json_tag.h \ |
| 1257 | json_timeline_.c:json_timeline.h \ |
| 1258 | json_user_.c:json_user.h \ |
| 1259 | json_wiki_.c:json_wiki.h \ |
| 1260 | leaf_.c:leaf.h \ |
| 1261 | loadctrl_.c:loadctrl.h \ |
| 1262 | login_.c:login.h \ |
| 1263 | lookslike_.c:lookslike.h \ |
| 1264 | main_.c:main.h \ |
| 1265 | manifest_.c:manifest.h \ |
| 1266 | markdown_.c:markdown.h \ |
| 1267 |
+3
-4
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | - * Add the ability to display content and diffs for UTF16 text files | |
| 5 | - in the web interface. | |
| 4 | + * Add the ability to display content, diffs and annotations for UTF16 | |
| 5 | + text files in the web interface. | |
| 6 | 6 | * Add the "SaveAs..." button to the graphical diff display that results |
| 7 | 7 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 8 | 8 | * Honor timezones in imports from git. |
| 9 | 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 10 | 10 | report now properly propagates the selected year through the event type |
| @@ -11,14 +11,13 @@ | ||
| 11 | 11 | filter links. |
| 12 | 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 13 | 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 14 | 14 | * Add option --empty to the "[/help?cmd=open | fossil open]" command. |
| 15 | 15 | * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter. |
| 16 | - * Add --ignore-space-at-sol and --ignore-space-at-eol options to | |
| 16 | + * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to | |
| 17 | 17 | [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame], |
| 18 | 18 | [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff]. |
| 19 | - The option -w activates both of them. | |
| 20 | 19 | * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff |
| 21 | 20 | and /vdiff UI pages. |
| 22 | 21 | |
| 23 | 22 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 24 | 23 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 25 | 24 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,10 +1,10 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | * Add the ability to display content and diffs for UTF16 text files |
| 5 | in the web interface. |
| 6 | * Add the "SaveAs..." button to the graphical diff display that results |
| 7 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 8 | * Honor timezones in imports from git. |
| 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 10 | report now properly propagates the selected year through the event type |
| @@ -11,14 +11,13 @@ | |
| 11 | filter links. |
| 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 14 | * Add option --empty to the "[/help?cmd=open | fossil open]" command. |
| 15 | * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter. |
| 16 | * Add --ignore-space-at-sol and --ignore-space-at-eol options to |
| 17 | [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame], |
| 18 | [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff]. |
| 19 | The option -w activates both of them. |
| 20 | * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff |
| 21 | and /vdiff UI pages. |
| 22 | |
| 23 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 24 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 25 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,10 +1,10 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes For Version 1.29 (as yet unreleased)</h2> |
| 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | text files in the web interface. |
| 6 | * Add the "SaveAs..." button to the graphical diff display that results |
| 7 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 8 | * Honor timezones in imports from git. |
| 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 10 | report now properly propagates the selected year through the event type |
| @@ -11,14 +11,13 @@ | |
| 11 | filter links. |
| 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 14 | * Add option --empty to the "[/help?cmd=open | fossil open]" command. |
| 15 | * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter. |
| 16 | * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to |
| 17 | [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame], |
| 18 | [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff]. |
| 19 | * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff |
| 20 | and /vdiff UI pages. |
| 21 | |
| 22 | <h2>Changes For Version 1.28 (2014-01-27)</h2> |
| 23 | * Enhance [/help?cmd=/reports | /reports] to support event type filtering. |
| 24 |
+67
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -241,6 +241,73 @@ | ||
| 241 | 241 | <p> |
| 242 | 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | 243 | </p> |
| 244 | 244 | </blockquote> |
| 245 | 245 | |
| 246 | +<a name="loadmgmt"></a> | |
| 247 | +<h2>Managing Server Load</h2><blockquote> | |
| 248 | +<p> | |
| 249 | +A Fossil server is very efficient and normally presents a very light | |
| 250 | +load on the server. | |
| 251 | +The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at | |
| 252 | +[http://www.linode.com | Linode.com] hosting 65 other repositories in | |
| 253 | +addition to Fossil (and including some very high-traffic sites such | |
| 254 | +as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and | |
| 255 | +it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil | |
| 256 | +normally takes less than 10 milliseconds of CPU time to complete. So | |
| 257 | +requests can be arriving at a continuous rate of 20 or more per second | |
| 258 | +and the CPU can still be mostly idle. | |
| 259 | +<p> | |
| 260 | +However, there are some Fossil web pages that can consume large | |
| 261 | +amounts of CPU time, expecially on repositories with a large number | |
| 262 | +of files or with long revision histories. High CPU usage pages include | |
| 263 | +[/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball], | |
| 264 | +[/help?cmd=/annotate | /annotate] and others. On very large repositories, | |
| 265 | +these commands can take 15 seconds or more of CPU time. | |
| 266 | +If these kinds of requests arrive too quickly, the load average on the | |
| 267 | +server can grow dramatically, making the server unresponsive. | |
| 268 | +<p> | |
| 269 | +To help avoid problems, Fossil has the ability to fail CPU-intensive | |
| 270 | +web page requests with a | |
| 271 | +[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 272 | +HTTP error if an expensive request is received while the host load | |
| 273 | +average is too high. To activate this | |
| 274 | +feature, visit the /Admin/Access setup page in the administrative web | |
| 275 | +interface and in the "<b>Server Load Average Limit</b>" box | |
| 276 | +enter the load average threshold above which "503 Server | |
| 277 | +Overload" replies will be issued for expensive requests. On the | |
| 278 | +self-host Fossil server, that value is set to 1.5. But you could easily | |
| 279 | +set it higher on a multi-core server. | |
| 280 | +<p> | |
| 281 | +The maximum load average can also be set on the command line using | |
| 282 | +commands like this: | |
| 283 | +<blockquote><pre> | |
| 284 | +fossil set max-loadavg 1.5 | |
| 285 | +fossil all set max-loadavg 1.5 | |
| 286 | +</pre></blockquote> | |
| 287 | +The second form is especially useful for changing the maximum load average | |
| 288 | +simultaneously on a large number of repositories. | |
| 289 | +<p> | |
| 290 | +Note that this load-average limiting feature is only available on operating | |
| 291 | +systems that support the "getloadavg()" API. Most modern unix systems have | |
| 292 | +this interface, but Windows does not, so the feature will not work on Windows. | |
| 293 | +Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg" | |
| 294 | +file in the "proc" virtual filesystem. If you are running a Fossil instance | |
| 295 | +inside a chroot() jail on Linux, you will need to make the "/proc" file | |
| 296 | +system available inside that jail in order for this feature to work. On | |
| 297 | +the self-hosting Fossil repository, this was accomplished by adding a line | |
| 298 | +to the "/etc/mtab" file that looks like: | |
| 299 | +<blockquote><pre> | |
| 300 | +chroot_jail_proc /home/www/proc proc r 0 0 | |
| 301 | +</pre></blockquote> | |
| 302 | +Pathnames should be adjusted for individual systems, of course. | |
| 303 | +<p> | |
| 304 | +To see if the load-average limiter is functional, visit the [/test_env] page | |
| 305 | +of the server to view the current load average. If the value for the load | |
| 306 | +average is greater than zero, that means that it is possible to activate | |
| 307 | +the load-average limiter on that repository. If the load average shows | |
| 308 | +exactly "0.0", then that means that Fossil is unable to find the load average | |
| 309 | +(either because it is in a chroot() jail without /proc access, or because | |
| 310 | +it is running on a system that does not support "getloadavg()") and so the | |
| 311 | +load-average limiter will not function. | |
| 312 | + | |
| 246 | 313 | </blockquote> |
| 247 | 314 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -241,6 +241,73 @@ | |
| 241 | <p> |
| 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | </p> |
| 244 | </blockquote> |
| 245 | |
| 246 | </blockquote> |
| 247 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -241,6 +241,73 @@ | |
| 241 | <p> |
| 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | </p> |
| 244 | </blockquote> |
| 245 | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| 257 | requests can be arriving at a continuous rate of 20 or more per second |
| 258 | and the CPU can still be mostly idle. |
| 259 | <p> |
| 260 | However, there are some Fossil web pages that can consume large |
| 261 | amounts of CPU time, expecially on repositories with a large number |
| 262 | of files or with long revision histories. High CPU usage pages include |
| 263 | [/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball], |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | To help avoid problems, Fossil has the ability to fail CPU-intensive |
| 270 | web page requests with a |
| 271 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 272 | HTTP error if an expensive request is received while the host load |
| 273 | average is too high. To activate this |
| 274 | feature, visit the /Admin/Access setup page in the administrative web |
| 275 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | enter the load average threshold above which "503 Server |
| 277 | Overload" replies will be issued for expensive requests. On the |
| 278 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | set it higher on a multi-core server. |
| 280 | <p> |
| 281 | The maximum load average can also be set on the command line using |
| 282 | commands like this: |
| 283 | <blockquote><pre> |
| 284 | fossil set max-loadavg 1.5 |
| 285 | fossil all set max-loadavg 1.5 |
| 286 | </pre></blockquote> |
| 287 | The second form is especially useful for changing the maximum load average |
| 288 | simultaneously on a large number of repositories. |
| 289 | <p> |
| 290 | Note that this load-average limiting feature is only available on operating |
| 291 | systems that support the "getloadavg()" API. Most modern unix systems have |
| 292 | this interface, but Windows does not, so the feature will not work on Windows. |
| 293 | Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg" |
| 294 | file in the "proc" virtual filesystem. If you are running a Fossil instance |
| 295 | inside a chroot() jail on Linux, you will need to make the "/proc" file |
| 296 | system available inside that jail in order for this feature to work. On |
| 297 | the self-hosting Fossil repository, this was accomplished by adding a line |
| 298 | to the "/etc/mtab" file that looks like: |
| 299 | <blockquote><pre> |
| 300 | chroot_jail_proc /home/www/proc proc r 0 0 |
| 301 | </pre></blockquote> |
| 302 | Pathnames should be adjusted for individual systems, of course. |
| 303 | <p> |
| 304 | To see if the load-average limiter is functional, visit the [/test_env] page |
| 305 | of the server to view the current load average. If the value for the load |
| 306 | average is greater than zero, that means that it is possible to activate |
| 307 | the load-average limiter on that repository. If the load average shows |
| 308 | exactly "0.0", then that means that Fossil is unable to find the load average |
| 309 | (either because it is in a chroot() jail without /proc access, or because |
| 310 | it is running on a system that does not support "getloadavg()") and so the |
| 311 | load-average limiter will not function. |
| 312 | |
| 313 | </blockquote> |
| 314 |