Fossil SCM
merge trunk
Commit
bd7b8a485f969da0126db57f82305c679f412109
Parent
517a6f7a53b6e04…
9 files changed
+1
-1
+1
-1
+1
-1
+8
-8
+43
-11
+43
-11
+4
-4
+1
+19
-6
+1
-1
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -1121,12 +1121,12 @@ | ||
| 1121 | 1121 | blob_zero(pBlob); |
| 1122 | 1122 | blob_append(pBlob, zUtf8, -1); |
| 1123 | 1123 | fossil_mbcs_free(zUtf8); |
| 1124 | 1124 | }else if( blob_size(pBlob)>1 && (blob_size(pBlob)&1)==0 |
| 1125 | 1125 | && memcmp(blob_buffer(pBlob), &urbom, 2)==0 ) { |
| 1126 | - zUtf8 = blob_buffer(pBlob); | |
| 1127 | 1126 | unsigned int i = blob_size(pBlob); |
| 1127 | + zUtf8 = blob_buffer(pBlob); | |
| 1128 | 1128 | while( i > 0 ){ |
| 1129 | 1129 | /* swap bytes of unicode representation */ |
| 1130 | 1130 | char temp = zUtf8[--i]; |
| 1131 | 1131 | zUtf8[i] = zUtf8[i-1]; |
| 1132 | 1132 | zUtf8[--i] = temp; |
| 1133 | 1133 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1121,12 +1121,12 @@ | |
| 1121 | blob_zero(pBlob); |
| 1122 | blob_append(pBlob, zUtf8, -1); |
| 1123 | fossil_mbcs_free(zUtf8); |
| 1124 | }else if( blob_size(pBlob)>1 && (blob_size(pBlob)&1)==0 |
| 1125 | && memcmp(blob_buffer(pBlob), &urbom, 2)==0 ) { |
| 1126 | zUtf8 = blob_buffer(pBlob); |
| 1127 | unsigned int i = blob_size(pBlob); |
| 1128 | while( i > 0 ){ |
| 1129 | /* swap bytes of unicode representation */ |
| 1130 | char temp = zUtf8[--i]; |
| 1131 | zUtf8[i] = zUtf8[i-1]; |
| 1132 | zUtf8[--i] = temp; |
| 1133 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1121,12 +1121,12 @@ | |
| 1121 | blob_zero(pBlob); |
| 1122 | blob_append(pBlob, zUtf8, -1); |
| 1123 | fossil_mbcs_free(zUtf8); |
| 1124 | }else if( blob_size(pBlob)>1 && (blob_size(pBlob)&1)==0 |
| 1125 | && memcmp(blob_buffer(pBlob), &urbom, 2)==0 ) { |
| 1126 | unsigned int i = blob_size(pBlob); |
| 1127 | zUtf8 = blob_buffer(pBlob); |
| 1128 | while( i > 0 ){ |
| 1129 | /* swap bytes of unicode representation */ |
| 1130 | char temp = zUtf8[--i]; |
| 1131 | zUtf8[i] = zUtf8[i-1]; |
| 1132 | zUtf8[--i] = temp; |
| 1133 |
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -913,11 +913,11 @@ | ||
| 913 | 913 | char cReply; |
| 914 | 914 | |
| 915 | 915 | blob_zero(&ans); |
| 916 | 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | 917 | zMsg = mprintf( |
| 918 | - "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (a=all/y/N)? ", | |
| 918 | + "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (y/N)? ", | |
| 919 | 919 | blob_str(&fname)); |
| 920 | 920 | prompt_user(zMsg, &ans); |
| 921 | 921 | fossil_free(zMsg); |
| 922 | 922 | cReply = blob_str(&ans)[0]; |
| 923 | 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 | 924 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -913,11 +913,11 @@ | |
| 913 | char cReply; |
| 914 | |
| 915 | blob_zero(&ans); |
| 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | zMsg = mprintf( |
| 918 | "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (a=all/y/N)? ", |
| 919 | blob_str(&fname)); |
| 920 | prompt_user(zMsg, &ans); |
| 921 | fossil_free(zMsg); |
| 922 | cReply = blob_str(&ans)[0]; |
| 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -913,11 +913,11 @@ | |
| 913 | char cReply; |
| 914 | |
| 915 | blob_zero(&ans); |
| 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | zMsg = mprintf( |
| 918 | "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (y/N)? ", |
| 919 | blob_str(&fname)); |
| 920 | prompt_user(zMsg, &ans); |
| 921 | fossil_free(zMsg); |
| 922 | cReply = blob_str(&ans)[0]; |
| 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 |
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -913,11 +913,11 @@ | ||
| 913 | 913 | char cReply; |
| 914 | 914 | |
| 915 | 915 | blob_zero(&ans); |
| 916 | 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | 917 | zMsg = mprintf( |
| 918 | - "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (a=all/y/N)? ", | |
| 918 | + "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (y/N)? ", | |
| 919 | 919 | blob_str(&fname)); |
| 920 | 920 | prompt_user(zMsg, &ans); |
| 921 | 921 | fossil_free(zMsg); |
| 922 | 922 | cReply = blob_str(&ans)[0]; |
| 923 | 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 | 924 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -913,11 +913,11 @@ | |
| 913 | char cReply; |
| 914 | |
| 915 | blob_zero(&ans); |
| 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | zMsg = mprintf( |
| 918 | "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (a=all/y/N)? ", |
| 919 | blob_str(&fname)); |
| 920 | prompt_user(zMsg, &ans); |
| 921 | fossil_free(zMsg); |
| 922 | cReply = blob_str(&ans)[0]; |
| 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -913,11 +913,11 @@ | |
| 913 | char cReply; |
| 914 | |
| 915 | blob_zero(&ans); |
| 916 | file_relative_name(zFilename, &fname, 0); |
| 917 | zMsg = mprintf( |
| 918 | "%s appears to be text, but not UTF-8 or ASCII. commit anyhow (y/N)? ", |
| 919 | blob_str(&fname)); |
| 920 | prompt_user(zMsg, &ans); |
| 921 | fossil_free(zMsg); |
| 922 | cReply = blob_str(&ans)[0]; |
| 923 | if( cReply!='y' && cReply!='Y' ){ |
| 924 |
M
src/db.c
+8
-8
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2027,20 +2027,20 @@ | ||
| 2027 | 2027 | { "allow-symlinks",0, 0, 1, "off" }, |
| 2028 | 2028 | { "auto-captcha", "autocaptcha", 0, 0, "on" }, |
| 2029 | 2029 | { "auto-hyperlink",0, 0, 0, "on", }, |
| 2030 | 2030 | { "auto-shun", 0, 0, 0, "on" }, |
| 2031 | 2031 | { "autosync", 0, 0, 0, "on" }, |
| 2032 | - { "binary-glob", 0, 32, 1, "" }, | |
| 2032 | + { "binary-glob", 0, 40, 1, "" }, | |
| 2033 | 2033 | { "clearsign", 0, 0, 0, "off" }, |
| 2034 | 2034 | { "case-sensitive",0, 0, 0, "on" }, |
| 2035 | - { "crnl-glob", 0, 16, 1, "" }, | |
| 2035 | + { "crnl-glob", 0, 40, 1, "" }, | |
| 2036 | 2036 | { "default-perms", 0, 16, 0, "u" }, |
| 2037 | 2037 | { "diff-binary", 0, 0, 0, "on" }, |
| 2038 | - { "diff-command", 0, 16, 0, "" }, | |
| 2038 | + { "diff-command", 0, 40, 0, "" }, | |
| 2039 | 2039 | { "dont-push", 0, 0, 0, "off" }, |
| 2040 | - { "editor", 0, 16, 0, "" }, | |
| 2041 | - { "gdiff-command", 0, 16, 0, "gdiff" }, | |
| 2040 | + { "editor", 0, 32, 0, "" }, | |
| 2041 | + { "gdiff-command", 0, 40, 0, "gdiff" }, | |
| 2042 | 2042 | { "gmerge-command",0, 40, 0, "" }, |
| 2043 | 2043 | { "https-login", 0, 0, 0, "off" }, |
| 2044 | 2044 | { "ignore-glob", 0, 40, 1, "" }, |
| 2045 | 2045 | { "empty-dirs", 0, 40, 1, "" }, |
| 2046 | 2046 | { "http-port", 0, 16, 0, "8080" }, |
| @@ -2047,18 +2047,18 @@ | ||
| 2047 | 2047 | { "localauth", 0, 0, 0, "off" }, |
| 2048 | 2048 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2049 | 2049 | { "manifest", 0, 0, 1, "off" }, |
| 2050 | 2050 | { "max-upload", 0, 25, 0, "250000" }, |
| 2051 | 2051 | { "mtime-changes", 0, 0, 0, "on" }, |
| 2052 | - { "pgp-command", 0, 32, 0, "gpg --clearsign -o " }, | |
| 2052 | + { "pgp-command", 0, 40, 0, "gpg --clearsign -o " }, | |
| 2053 | 2053 | { "proxy", 0, 32, 0, "off" }, |
| 2054 | 2054 | { "relative-paths",0, 0, 0, "on" }, |
| 2055 | 2055 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2056 | 2056 | { "self-register", 0, 0, 0, "off" }, |
| 2057 | 2057 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2058 | 2058 | { "ssl-identity", 0, 40, 0, "" }, |
| 2059 | - { "ssh-command", 0, 32, 0, "" }, | |
| 2059 | + { "ssh-command", 0, 40, 0, "" }, | |
| 2060 | 2060 | #ifdef FOSSIL_ENABLE_TCL |
| 2061 | 2061 | { "tcl", 0, 0, 0, "off" }, |
| 2062 | 2062 | { "tcl-setup", 0, 40, 0, "" }, |
| 2063 | 2063 | #endif |
| 2064 | 2064 | { "web-browser", 0, 32, 0, "" }, |
| @@ -2108,11 +2108,11 @@ | ||
| 2108 | 2108 | ** then only pull operations occur automatically. |
| 2109 | 2109 | ** Default: on |
| 2110 | 2110 | ** |
| 2111 | 2111 | ** binary-glob The VALUE is a comma or newline-separated list of |
| 2112 | 2112 | ** (versionable) GLOB patterns that should be treated as binary files |
| 2113 | -** for merging purposes. Example: *.xml | |
| 2113 | +** for committing and merging purposes. Example: *.jpg | |
| 2114 | 2114 | ** |
| 2115 | 2115 | ** case-sensitive If TRUE, the files whose names differ only in case |
| 2116 | 2116 | ** care considered distinct. If FALSE files whose names |
| 2117 | 2117 | ** differ only in case are the same file. Defaults to |
| 2118 | 2118 | ** TRUE for unix and FALSE for windows and mac. |
| 2119 | 2119 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2027,20 +2027,20 @@ | |
| 2027 | { "allow-symlinks",0, 0, 1, "off" }, |
| 2028 | { "auto-captcha", "autocaptcha", 0, 0, "on" }, |
| 2029 | { "auto-hyperlink",0, 0, 0, "on", }, |
| 2030 | { "auto-shun", 0, 0, 0, "on" }, |
| 2031 | { "autosync", 0, 0, 0, "on" }, |
| 2032 | { "binary-glob", 0, 32, 1, "" }, |
| 2033 | { "clearsign", 0, 0, 0, "off" }, |
| 2034 | { "case-sensitive",0, 0, 0, "on" }, |
| 2035 | { "crnl-glob", 0, 16, 1, "" }, |
| 2036 | { "default-perms", 0, 16, 0, "u" }, |
| 2037 | { "diff-binary", 0, 0, 0, "on" }, |
| 2038 | { "diff-command", 0, 16, 0, "" }, |
| 2039 | { "dont-push", 0, 0, 0, "off" }, |
| 2040 | { "editor", 0, 16, 0, "" }, |
| 2041 | { "gdiff-command", 0, 16, 0, "gdiff" }, |
| 2042 | { "gmerge-command",0, 40, 0, "" }, |
| 2043 | { "https-login", 0, 0, 0, "off" }, |
| 2044 | { "ignore-glob", 0, 40, 1, "" }, |
| 2045 | { "empty-dirs", 0, 40, 1, "" }, |
| 2046 | { "http-port", 0, 16, 0, "8080" }, |
| @@ -2047,18 +2047,18 @@ | |
| 2047 | { "localauth", 0, 0, 0, "off" }, |
| 2048 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2049 | { "manifest", 0, 0, 1, "off" }, |
| 2050 | { "max-upload", 0, 25, 0, "250000" }, |
| 2051 | { "mtime-changes", 0, 0, 0, "on" }, |
| 2052 | { "pgp-command", 0, 32, 0, "gpg --clearsign -o " }, |
| 2053 | { "proxy", 0, 32, 0, "off" }, |
| 2054 | { "relative-paths",0, 0, 0, "on" }, |
| 2055 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2056 | { "self-register", 0, 0, 0, "off" }, |
| 2057 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2058 | { "ssl-identity", 0, 40, 0, "" }, |
| 2059 | { "ssh-command", 0, 32, 0, "" }, |
| 2060 | #ifdef FOSSIL_ENABLE_TCL |
| 2061 | { "tcl", 0, 0, 0, "off" }, |
| 2062 | { "tcl-setup", 0, 40, 0, "" }, |
| 2063 | #endif |
| 2064 | { "web-browser", 0, 32, 0, "" }, |
| @@ -2108,11 +2108,11 @@ | |
| 2108 | ** then only pull operations occur automatically. |
| 2109 | ** Default: on |
| 2110 | ** |
| 2111 | ** binary-glob The VALUE is a comma or newline-separated list of |
| 2112 | ** (versionable) GLOB patterns that should be treated as binary files |
| 2113 | ** for merging purposes. Example: *.xml |
| 2114 | ** |
| 2115 | ** case-sensitive If TRUE, the files whose names differ only in case |
| 2116 | ** care considered distinct. If FALSE files whose names |
| 2117 | ** differ only in case are the same file. Defaults to |
| 2118 | ** TRUE for unix and FALSE for windows and mac. |
| 2119 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2027,20 +2027,20 @@ | |
| 2027 | { "allow-symlinks",0, 0, 1, "off" }, |
| 2028 | { "auto-captcha", "autocaptcha", 0, 0, "on" }, |
| 2029 | { "auto-hyperlink",0, 0, 0, "on", }, |
| 2030 | { "auto-shun", 0, 0, 0, "on" }, |
| 2031 | { "autosync", 0, 0, 0, "on" }, |
| 2032 | { "binary-glob", 0, 40, 1, "" }, |
| 2033 | { "clearsign", 0, 0, 0, "off" }, |
| 2034 | { "case-sensitive",0, 0, 0, "on" }, |
| 2035 | { "crnl-glob", 0, 40, 1, "" }, |
| 2036 | { "default-perms", 0, 16, 0, "u" }, |
| 2037 | { "diff-binary", 0, 0, 0, "on" }, |
| 2038 | { "diff-command", 0, 40, 0, "" }, |
| 2039 | { "dont-push", 0, 0, 0, "off" }, |
| 2040 | { "editor", 0, 32, 0, "" }, |
| 2041 | { "gdiff-command", 0, 40, 0, "gdiff" }, |
| 2042 | { "gmerge-command",0, 40, 0, "" }, |
| 2043 | { "https-login", 0, 0, 0, "off" }, |
| 2044 | { "ignore-glob", 0, 40, 1, "" }, |
| 2045 | { "empty-dirs", 0, 40, 1, "" }, |
| 2046 | { "http-port", 0, 16, 0, "8080" }, |
| @@ -2047,18 +2047,18 @@ | |
| 2047 | { "localauth", 0, 0, 0, "off" }, |
| 2048 | { "main-branch", 0, 40, 0, "trunk" }, |
| 2049 | { "manifest", 0, 0, 1, "off" }, |
| 2050 | { "max-upload", 0, 25, 0, "250000" }, |
| 2051 | { "mtime-changes", 0, 0, 0, "on" }, |
| 2052 | { "pgp-command", 0, 40, 0, "gpg --clearsign -o " }, |
| 2053 | { "proxy", 0, 32, 0, "off" }, |
| 2054 | { "relative-paths",0, 0, 0, "on" }, |
| 2055 | { "repo-cksum", 0, 0, 0, "on" }, |
| 2056 | { "self-register", 0, 0, 0, "off" }, |
| 2057 | { "ssl-ca-location",0, 40, 0, "" }, |
| 2058 | { "ssl-identity", 0, 40, 0, "" }, |
| 2059 | { "ssh-command", 0, 40, 0, "" }, |
| 2060 | #ifdef FOSSIL_ENABLE_TCL |
| 2061 | { "tcl", 0, 0, 0, "off" }, |
| 2062 | { "tcl-setup", 0, 40, 0, "" }, |
| 2063 | #endif |
| 2064 | { "web-browser", 0, 32, 0, "" }, |
| @@ -2108,11 +2108,11 @@ | |
| 2108 | ** then only pull operations occur automatically. |
| 2109 | ** Default: on |
| 2110 | ** |
| 2111 | ** binary-glob The VALUE is a comma or newline-separated list of |
| 2112 | ** (versionable) GLOB patterns that should be treated as binary files |
| 2113 | ** for committing and merging purposes. Example: *.jpg |
| 2114 | ** |
| 2115 | ** case-sensitive If TRUE, the files whose names differ only in case |
| 2116 | ** care considered distinct. If FALSE files whose names |
| 2117 | ** differ only in case are the same file. Defaults to |
| 2118 | ** TRUE for unix and FALSE for windows and mac. |
| 2119 |
+43
-11
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -193,10 +193,21 @@ | ||
| 193 | 193 | ** |
| 194 | 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | 197 | ** |
| 198 | +************************************ WARNING ********************************** | |
| 199 | +** | |
| 200 | +** This function does not validate that the blob content is properly formed | |
| 201 | +** UTF-8. It assumes that all code points are the same size. It does not | |
| 202 | +** validate any code points. It makes no attempt to detect if any [invalid] | |
| 203 | +** switches between UTF-8 and other encodings occur. | |
| 204 | +** | |
| 205 | +** The only code points that this function cares about are the NUL character, | |
| 206 | +** carriage-return, and line-feed. | |
| 207 | +** | |
| 208 | +************************************ WARNING ********************************** | |
| 198 | 209 | */ |
| 199 | 210 | |
| 200 | 211 | int looks_like_utf8(const Blob *pContent){ |
| 201 | 212 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 202 | 213 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | ||
| 273 | 284 | } |
| 274 | 285 | return 1-result; /* No problems seen -> not binary */ |
| 275 | 286 | } |
| 276 | 287 | |
| 277 | 288 | /* |
| 278 | -** Maximum length of a line in a text file, in UTF-16 characters. (2731) | |
| 279 | -** The number of bytes represented by this value after conversion to | |
| 280 | -** UTF-8 (which can increase the size by 50%) cannot exceed LENGTH_MASK | |
| 289 | +** Define the type needed to represent a Unicode (UTF-16) character. | |
| 290 | +*/ | |
| 291 | +#ifndef WCHAR_T | |
| 292 | +# ifdef _WIN32 | |
| 293 | +# define WCHAR_T wchar_t | |
| 294 | +# else | |
| 295 | +# define WCHAR_T unsigned short | |
| 296 | +# endif | |
| 297 | +#endif | |
| 298 | + | |
| 299 | +/* | |
| 300 | +** Maximum length of a line in a text file, in UTF-16 characters. (4096) | |
| 301 | +** The number of bytes represented by this value cannot exceed LENGTH_MASK | |
| 281 | 302 | ** bytes, because that is the line buffer size used by the diff engine. |
| 282 | 303 | */ |
| 283 | -#define UTF16_LENGTH_MASK (LENGTH_MASK/3) | |
| 304 | +#define UTF16_LENGTH_MASK_SZ (LENGTH_MASK_SZ-(sizeof(WCHAR_T)-sizeof(char))) | |
| 305 | +#define UTF16_LENGTH_MASK ((1<<UTF16_LENGTH_MASK_SZ)-1) | |
| 284 | 306 | |
| 285 | 307 | /* |
| 286 | 308 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 287 | 309 | ** encodings. |
| 288 | 310 | */ |
| 289 | -#define UTF16BE_CR ((wchar_t)'\r') | |
| 290 | -#define UTF16BE_LF ((wchar_t)'\n') | |
| 291 | -#define UTF16LE_CR (((wchar_t)'\r')<<(sizeof(wchar_t)<<2)) | |
| 292 | -#define UTF16LE_LF (((wchar_t)'\n')<<(sizeof(wchar_t)<<2)) | |
| 293 | -#define UTF16_FFFF ((wchar_t)-1) | |
| 311 | +#define UTF16BE_CR ((WCHAR_T)'\r') | |
| 312 | +#define UTF16BE_LF ((WCHAR_T)'\n') | |
| 313 | +#define UTF16LE_CR (((WCHAR_T)'\r')<<(sizeof(char)<<3)) | |
| 314 | +#define UTF16LE_LF (((WCHAR_T)'\n')<<(sizeof(char)<<3)) | |
| 294 | 315 | |
| 295 | 316 | /* |
| 296 | 317 | ** This function attempts to scan each logical line within the blob to |
| 297 | 318 | ** determine the type of content it appears to contain. Possible return |
| 298 | 319 | ** values are: |
| @@ -308,13 +329,24 @@ | ||
| 308 | 329 | ** |
| 309 | 330 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 310 | 331 | ** delimited by carriage-return, line-feed pairs; however, the |
| 311 | 332 | ** encoding may not be UTF-16. |
| 312 | 333 | ** |
| 334 | +************************************ WARNING ********************************** | |
| 335 | +** | |
| 336 | +** This function does not validate that the blob content is properly formed | |
| 337 | +** UTF-16. It assumes that all code points are the same size. It does not | |
| 338 | +** validate any code points. It makes no attempt to detect if any [invalid] | |
| 339 | +** switches between the UTF-16be and UTF-16le encodings occur. | |
| 340 | +** | |
| 341 | +** The only code points that this function cares about are the NUL character, | |
| 342 | +** carriage-return, and line-feed. | |
| 343 | +** | |
| 344 | +************************************ WARNING ********************************** | |
| 313 | 345 | */ |
| 314 | 346 | int looks_like_utf16(const Blob *pContent){ |
| 315 | - const wchar_t *z = (wchar_t *)blob_buffer(pContent); | |
| 347 | + const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); | |
| 316 | 348 | unsigned int n = blob_size(pContent); |
| 317 | 349 | int j, c; |
| 318 | 350 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 319 | 351 | |
| 320 | 352 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | ||
| 324 | 356 | c = *z; |
| 325 | 357 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 326 | 358 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 327 | 359 | while( (n-=2)>0 ){ |
| 328 | 360 | c = *++z; ++j; |
| 329 | - if( c==0 || c==UTF16_FFFF ) return 0; /* NUL/FFFF character in a file -> binary */ | |
| 361 | + if( c==0 ) return 0; /* NUL character in a file -> binary */ | |
| 330 | 362 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 331 | 363 | int c2 = z[-1]; |
| 332 | 364 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 333 | 365 | result = -1; /* Contains CR/NL, continue */ |
| 334 | 366 | } |
| 335 | 367 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -193,10 +193,21 @@ | |
| 193 | ** |
| 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | ** |
| 198 | */ |
| 199 | |
| 200 | int looks_like_utf8(const Blob *pContent){ |
| 201 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 202 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | |
| 273 | } |
| 274 | return 1-result; /* No problems seen -> not binary */ |
| 275 | } |
| 276 | |
| 277 | /* |
| 278 | ** Maximum length of a line in a text file, in UTF-16 characters. (2731) |
| 279 | ** The number of bytes represented by this value after conversion to |
| 280 | ** UTF-8 (which can increase the size by 50%) cannot exceed LENGTH_MASK |
| 281 | ** bytes, because that is the line buffer size used by the diff engine. |
| 282 | */ |
| 283 | #define UTF16_LENGTH_MASK (LENGTH_MASK/3) |
| 284 | |
| 285 | /* |
| 286 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 287 | ** encodings. |
| 288 | */ |
| 289 | #define UTF16BE_CR ((wchar_t)'\r') |
| 290 | #define UTF16BE_LF ((wchar_t)'\n') |
| 291 | #define UTF16LE_CR (((wchar_t)'\r')<<(sizeof(wchar_t)<<2)) |
| 292 | #define UTF16LE_LF (((wchar_t)'\n')<<(sizeof(wchar_t)<<2)) |
| 293 | #define UTF16_FFFF ((wchar_t)-1) |
| 294 | |
| 295 | /* |
| 296 | ** This function attempts to scan each logical line within the blob to |
| 297 | ** determine the type of content it appears to contain. Possible return |
| 298 | ** values are: |
| @@ -308,13 +329,24 @@ | |
| 308 | ** |
| 309 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 310 | ** delimited by carriage-return, line-feed pairs; however, the |
| 311 | ** encoding may not be UTF-16. |
| 312 | ** |
| 313 | */ |
| 314 | int looks_like_utf16(const Blob *pContent){ |
| 315 | const wchar_t *z = (wchar_t *)blob_buffer(pContent); |
| 316 | unsigned int n = blob_size(pContent); |
| 317 | int j, c; |
| 318 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 319 | |
| 320 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | |
| 324 | c = *z; |
| 325 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 326 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 327 | while( (n-=2)>0 ){ |
| 328 | c = *++z; ++j; |
| 329 | if( c==0 || c==UTF16_FFFF ) return 0; /* NUL/FFFF character in a file -> binary */ |
| 330 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 331 | int c2 = z[-1]; |
| 332 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 333 | result = -1; /* Contains CR/NL, continue */ |
| 334 | } |
| 335 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -193,10 +193,21 @@ | |
| 193 | ** |
| 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | ** |
| 198 | ************************************ WARNING ********************************** |
| 199 | ** |
| 200 | ** This function does not validate that the blob content is properly formed |
| 201 | ** UTF-8. It assumes that all code points are the same size. It does not |
| 202 | ** validate any code points. It makes no attempt to detect if any [invalid] |
| 203 | ** switches between UTF-8 and other encodings occur. |
| 204 | ** |
| 205 | ** The only code points that this function cares about are the NUL character, |
| 206 | ** carriage-return, and line-feed. |
| 207 | ** |
| 208 | ************************************ WARNING ********************************** |
| 209 | */ |
| 210 | |
| 211 | int looks_like_utf8(const Blob *pContent){ |
| 212 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 213 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | |
| 284 | } |
| 285 | return 1-result; /* No problems seen -> not binary */ |
| 286 | } |
| 287 | |
| 288 | /* |
| 289 | ** Define the type needed to represent a Unicode (UTF-16) character. |
| 290 | */ |
| 291 | #ifndef WCHAR_T |
| 292 | # ifdef _WIN32 |
| 293 | # define WCHAR_T wchar_t |
| 294 | # else |
| 295 | # define WCHAR_T unsigned short |
| 296 | # endif |
| 297 | #endif |
| 298 | |
| 299 | /* |
| 300 | ** Maximum length of a line in a text file, in UTF-16 characters. (4096) |
| 301 | ** The number of bytes represented by this value cannot exceed LENGTH_MASK |
| 302 | ** bytes, because that is the line buffer size used by the diff engine. |
| 303 | */ |
| 304 | #define UTF16_LENGTH_MASK_SZ (LENGTH_MASK_SZ-(sizeof(WCHAR_T)-sizeof(char))) |
| 305 | #define UTF16_LENGTH_MASK ((1<<UTF16_LENGTH_MASK_SZ)-1) |
| 306 | |
| 307 | /* |
| 308 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 309 | ** encodings. |
| 310 | */ |
| 311 | #define UTF16BE_CR ((WCHAR_T)'\r') |
| 312 | #define UTF16BE_LF ((WCHAR_T)'\n') |
| 313 | #define UTF16LE_CR (((WCHAR_T)'\r')<<(sizeof(char)<<3)) |
| 314 | #define UTF16LE_LF (((WCHAR_T)'\n')<<(sizeof(char)<<3)) |
| 315 | |
| 316 | /* |
| 317 | ** This function attempts to scan each logical line within the blob to |
| 318 | ** determine the type of content it appears to contain. Possible return |
| 319 | ** values are: |
| @@ -308,13 +329,24 @@ | |
| 329 | ** |
| 330 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 331 | ** delimited by carriage-return, line-feed pairs; however, the |
| 332 | ** encoding may not be UTF-16. |
| 333 | ** |
| 334 | ************************************ WARNING ********************************** |
| 335 | ** |
| 336 | ** This function does not validate that the blob content is properly formed |
| 337 | ** UTF-16. It assumes that all code points are the same size. It does not |
| 338 | ** validate any code points. It makes no attempt to detect if any [invalid] |
| 339 | ** switches between the UTF-16be and UTF-16le encodings occur. |
| 340 | ** |
| 341 | ** The only code points that this function cares about are the NUL character, |
| 342 | ** carriage-return, and line-feed. |
| 343 | ** |
| 344 | ************************************ WARNING ********************************** |
| 345 | */ |
| 346 | int looks_like_utf16(const Blob *pContent){ |
| 347 | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); |
| 348 | unsigned int n = blob_size(pContent); |
| 349 | int j, c; |
| 350 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 351 | |
| 352 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | |
| 356 | c = *z; |
| 357 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 358 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 359 | while( (n-=2)>0 ){ |
| 360 | c = *++z; ++j; |
| 361 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 362 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 363 | int c2 = z[-1]; |
| 364 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 365 | result = -1; /* Contains CR/NL, continue */ |
| 366 | } |
| 367 |
+43
-11
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -193,10 +193,21 @@ | ||
| 193 | 193 | ** |
| 194 | 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | 197 | ** |
| 198 | +************************************ WARNING ********************************** | |
| 199 | +** | |
| 200 | +** This function does not validate that the blob content is properly formed | |
| 201 | +** UTF-8. It assumes that all code points are the same size. It does not | |
| 202 | +** validate any code points. It makes no attempt to detect if any [invalid] | |
| 203 | +** switches between UTF-8 and other encodings occur. | |
| 204 | +** | |
| 205 | +** The only code points that this function cares about are the NUL character, | |
| 206 | +** carriage-return, and line-feed. | |
| 207 | +** | |
| 208 | +************************************ WARNING ********************************** | |
| 198 | 209 | */ |
| 199 | 210 | |
| 200 | 211 | int looks_like_utf8(const Blob *pContent){ |
| 201 | 212 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 202 | 213 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | ||
| 273 | 284 | } |
| 274 | 285 | return 1-result; /* No problems seen -> not binary */ |
| 275 | 286 | } |
| 276 | 287 | |
| 277 | 288 | /* |
| 278 | -** Maximum length of a line in a text file, in UTF-16 characters. (2731) | |
| 279 | -** The number of bytes represented by this value after conversion to | |
| 280 | -** UTF-8 (which can increase the size by 50%) cannot exceed LENGTH_MASK | |
| 289 | +** Define the type needed to represent a Unicode (UTF-16) character. | |
| 290 | +*/ | |
| 291 | +#ifndef WCHAR_T | |
| 292 | +# ifdef _WIN32 | |
| 293 | +# define WCHAR_T wchar_t | |
| 294 | +# else | |
| 295 | +# define WCHAR_T unsigned short | |
| 296 | +# endif | |
| 297 | +#endif | |
| 298 | + | |
| 299 | +/* | |
| 300 | +** Maximum length of a line in a text file, in UTF-16 characters. (4096) | |
| 301 | +** The number of bytes represented by this value cannot exceed LENGTH_MASK | |
| 281 | 302 | ** bytes, because that is the line buffer size used by the diff engine. |
| 282 | 303 | */ |
| 283 | -#define UTF16_LENGTH_MASK (LENGTH_MASK/3) | |
| 304 | +#define UTF16_LENGTH_MASK_SZ (LENGTH_MASK_SZ-(sizeof(WCHAR_T)-sizeof(char))) | |
| 305 | +#define UTF16_LENGTH_MASK ((1<<UTF16_LENGTH_MASK_SZ)-1) | |
| 284 | 306 | |
| 285 | 307 | /* |
| 286 | 308 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 287 | 309 | ** encodings. |
| 288 | 310 | */ |
| 289 | -#define UTF16BE_CR ((wchar_t)'\r') | |
| 290 | -#define UTF16BE_LF ((wchar_t)'\n') | |
| 291 | -#define UTF16LE_CR (((wchar_t)'\r')<<(sizeof(wchar_t)<<2)) | |
| 292 | -#define UTF16LE_LF (((wchar_t)'\n')<<(sizeof(wchar_t)<<2)) | |
| 293 | -#define UTF16_FFFF ((wchar_t)-1) | |
| 311 | +#define UTF16BE_CR ((WCHAR_T)'\r') | |
| 312 | +#define UTF16BE_LF ((WCHAR_T)'\n') | |
| 313 | +#define UTF16LE_CR (((WCHAR_T)'\r')<<(sizeof(char)<<3)) | |
| 314 | +#define UTF16LE_LF (((WCHAR_T)'\n')<<(sizeof(char)<<3)) | |
| 294 | 315 | |
| 295 | 316 | /* |
| 296 | 317 | ** This function attempts to scan each logical line within the blob to |
| 297 | 318 | ** determine the type of content it appears to contain. Possible return |
| 298 | 319 | ** values are: |
| @@ -308,13 +329,24 @@ | ||
| 308 | 329 | ** |
| 309 | 330 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 310 | 331 | ** delimited by carriage-return, line-feed pairs; however, the |
| 311 | 332 | ** encoding may not be UTF-16. |
| 312 | 333 | ** |
| 334 | +************************************ WARNING ********************************** | |
| 335 | +** | |
| 336 | +** This function does not validate that the blob content is properly formed | |
| 337 | +** UTF-16. It assumes that all code points are the same size. It does not | |
| 338 | +** validate any code points. It makes no attempt to detect if any [invalid] | |
| 339 | +** switches between the UTF-16be and UTF-16le encodings occur. | |
| 340 | +** | |
| 341 | +** The only code points that this function cares about are the NUL character, | |
| 342 | +** carriage-return, and line-feed. | |
| 343 | +** | |
| 344 | +************************************ WARNING ********************************** | |
| 313 | 345 | */ |
| 314 | 346 | int looks_like_utf16(const Blob *pContent){ |
| 315 | - const wchar_t *z = (wchar_t *)blob_buffer(pContent); | |
| 347 | + const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); | |
| 316 | 348 | unsigned int n = blob_size(pContent); |
| 317 | 349 | int j, c; |
| 318 | 350 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 319 | 351 | |
| 320 | 352 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | ||
| 324 | 356 | c = *z; |
| 325 | 357 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 326 | 358 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 327 | 359 | while( (n-=2)>0 ){ |
| 328 | 360 | c = *++z; ++j; |
| 329 | - if( c==0 || c==UTF16_FFFF ) return 0; /* NUL/FFFF character in a file -> binary */ | |
| 361 | + if( c==0 ) return 0; /* NUL character in a file -> binary */ | |
| 330 | 362 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 331 | 363 | int c2 = z[-1]; |
| 332 | 364 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 333 | 365 | result = -1; /* Contains CR/NL, continue */ |
| 334 | 366 | } |
| 335 | 367 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -193,10 +193,21 @@ | |
| 193 | ** |
| 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | ** |
| 198 | */ |
| 199 | |
| 200 | int looks_like_utf8(const Blob *pContent){ |
| 201 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 202 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | |
| 273 | } |
| 274 | return 1-result; /* No problems seen -> not binary */ |
| 275 | } |
| 276 | |
| 277 | /* |
| 278 | ** Maximum length of a line in a text file, in UTF-16 characters. (2731) |
| 279 | ** The number of bytes represented by this value after conversion to |
| 280 | ** UTF-8 (which can increase the size by 50%) cannot exceed LENGTH_MASK |
| 281 | ** bytes, because that is the line buffer size used by the diff engine. |
| 282 | */ |
| 283 | #define UTF16_LENGTH_MASK (LENGTH_MASK/3) |
| 284 | |
| 285 | /* |
| 286 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 287 | ** encodings. |
| 288 | */ |
| 289 | #define UTF16BE_CR ((wchar_t)'\r') |
| 290 | #define UTF16BE_LF ((wchar_t)'\n') |
| 291 | #define UTF16LE_CR (((wchar_t)'\r')<<(sizeof(wchar_t)<<2)) |
| 292 | #define UTF16LE_LF (((wchar_t)'\n')<<(sizeof(wchar_t)<<2)) |
| 293 | #define UTF16_FFFF ((wchar_t)-1) |
| 294 | |
| 295 | /* |
| 296 | ** This function attempts to scan each logical line within the blob to |
| 297 | ** determine the type of content it appears to contain. Possible return |
| 298 | ** values are: |
| @@ -308,13 +329,24 @@ | |
| 308 | ** |
| 309 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 310 | ** delimited by carriage-return, line-feed pairs; however, the |
| 311 | ** encoding may not be UTF-16. |
| 312 | ** |
| 313 | */ |
| 314 | int looks_like_utf16(const Blob *pContent){ |
| 315 | const wchar_t *z = (wchar_t *)blob_buffer(pContent); |
| 316 | unsigned int n = blob_size(pContent); |
| 317 | int j, c; |
| 318 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 319 | |
| 320 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | |
| 324 | c = *z; |
| 325 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 326 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 327 | while( (n-=2)>0 ){ |
| 328 | c = *++z; ++j; |
| 329 | if( c==0 || c==UTF16_FFFF ) return 0; /* NUL/FFFF character in a file -> binary */ |
| 330 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 331 | int c2 = z[-1]; |
| 332 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 333 | result = -1; /* Contains CR/NL, continue */ |
| 334 | } |
| 335 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -193,10 +193,21 @@ | |
| 193 | ** |
| 194 | ** (-5) -- The content appears to consist entirely of text, with lines |
| 195 | ** delimited by carriage-return, line-feed pairs; however, the |
| 196 | ** encoding is not UTF-8 or ASCII. |
| 197 | ** |
| 198 | ************************************ WARNING ********************************** |
| 199 | ** |
| 200 | ** This function does not validate that the blob content is properly formed |
| 201 | ** UTF-8. It assumes that all code points are the same size. It does not |
| 202 | ** validate any code points. It makes no attempt to detect if any [invalid] |
| 203 | ** switches between UTF-8 and other encodings occur. |
| 204 | ** |
| 205 | ** The only code points that this function cares about are the NUL character, |
| 206 | ** carriage-return, and line-feed. |
| 207 | ** |
| 208 | ************************************ WARNING ********************************** |
| 209 | */ |
| 210 | |
| 211 | int looks_like_utf8(const Blob *pContent){ |
| 212 | unsigned char *z = (unsigned char *) blob_buffer(pContent); |
| 213 | unsigned int n = blob_size(pContent); |
| @@ -273,26 +284,36 @@ | |
| 284 | } |
| 285 | return 1-result; /* No problems seen -> not binary */ |
| 286 | } |
| 287 | |
| 288 | /* |
| 289 | ** Define the type needed to represent a Unicode (UTF-16) character. |
| 290 | */ |
| 291 | #ifndef WCHAR_T |
| 292 | # ifdef _WIN32 |
| 293 | # define WCHAR_T wchar_t |
| 294 | # else |
| 295 | # define WCHAR_T unsigned short |
| 296 | # endif |
| 297 | #endif |
| 298 | |
| 299 | /* |
| 300 | ** Maximum length of a line in a text file, in UTF-16 characters. (4096) |
| 301 | ** The number of bytes represented by this value cannot exceed LENGTH_MASK |
| 302 | ** bytes, because that is the line buffer size used by the diff engine. |
| 303 | */ |
| 304 | #define UTF16_LENGTH_MASK_SZ (LENGTH_MASK_SZ-(sizeof(WCHAR_T)-sizeof(char))) |
| 305 | #define UTF16_LENGTH_MASK ((1<<UTF16_LENGTH_MASK_SZ)-1) |
| 306 | |
| 307 | /* |
| 308 | ** The carriage-return / line-feed characters in the UTF-16be and UTF-16le |
| 309 | ** encodings. |
| 310 | */ |
| 311 | #define UTF16BE_CR ((WCHAR_T)'\r') |
| 312 | #define UTF16BE_LF ((WCHAR_T)'\n') |
| 313 | #define UTF16LE_CR (((WCHAR_T)'\r')<<(sizeof(char)<<3)) |
| 314 | #define UTF16LE_LF (((WCHAR_T)'\n')<<(sizeof(char)<<3)) |
| 315 | |
| 316 | /* |
| 317 | ** This function attempts to scan each logical line within the blob to |
| 318 | ** determine the type of content it appears to contain. Possible return |
| 319 | ** values are: |
| @@ -308,13 +329,24 @@ | |
| 329 | ** |
| 330 | ** (-1) -- The content appears to consist entirely of text, with lines |
| 331 | ** delimited by carriage-return, line-feed pairs; however, the |
| 332 | ** encoding may not be UTF-16. |
| 333 | ** |
| 334 | ************************************ WARNING ********************************** |
| 335 | ** |
| 336 | ** This function does not validate that the blob content is properly formed |
| 337 | ** UTF-16. It assumes that all code points are the same size. It does not |
| 338 | ** validate any code points. It makes no attempt to detect if any [invalid] |
| 339 | ** switches between the UTF-16be and UTF-16le encodings occur. |
| 340 | ** |
| 341 | ** The only code points that this function cares about are the NUL character, |
| 342 | ** carriage-return, and line-feed. |
| 343 | ** |
| 344 | ************************************ WARNING ********************************** |
| 345 | */ |
| 346 | int looks_like_utf16(const Blob *pContent){ |
| 347 | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); |
| 348 | unsigned int n = blob_size(pContent); |
| 349 | int j, c; |
| 350 | int result = 1; /* Assume UTF-16 text with no CR/NL */ |
| 351 | |
| 352 | /* Check individual lines. |
| @@ -324,11 +356,11 @@ | |
| 356 | c = *z; |
| 357 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 358 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 359 | while( (n-=2)>0 ){ |
| 360 | c = *++z; ++j; |
| 361 | if( c==0 ) return 0; /* NUL character in a file -> binary */ |
| 362 | if( c==UTF16BE_LF || c==UTF16LE_LF ){ |
| 363 | int c2 = z[-1]; |
| 364 | if( c2==UTF16BE_CR || c2==UTF16LE_CR ){ |
| 365 | result = -1; /* Contains CR/NL, continue */ |
| 366 | } |
| 367 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -341,11 +341,11 @@ | ||
| 341 | 341 | if(g.db){ |
| 342 | 342 | db_close(0); |
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | -#if defined(_WIN32) | |
| 346 | +#if defined(_WIN32) && !defined(__MINGW32__) | |
| 347 | 347 | /* |
| 348 | 348 | ** Parse the command-line arguments passed to windows. We do this |
| 349 | 349 | ** ourselves to work around bugs in the command-line parsing of MinGW. |
| 350 | 350 | ** It is possible (in theory) to only use this routine when compiling |
| 351 | 351 | ** with MinGW and to use built-in command-line parsing for MSVC and |
| @@ -454,11 +454,11 @@ | ||
| 454 | 454 | } |
| 455 | 455 | argv[argc] = NULL; |
| 456 | 456 | *argcPtr = argc; |
| 457 | 457 | *((WCHAR ***)argvPtr) = argv; |
| 458 | 458 | } |
| 459 | -#endif /* defined(_WIN32) */ | |
| 459 | +#endif /* defined(_WIN32) && !defined(__MINGW32__) */ | |
| 460 | 460 | |
| 461 | 461 | |
| 462 | 462 | /* |
| 463 | 463 | ** Convert all arguments from mbcs (or unicode) to UTF-8. Then |
| 464 | 464 | ** search g.argv for arguments "--args FILENAME". If found, then |
| @@ -478,17 +478,17 @@ | ||
| 478 | 478 | int n; /* Number of bytes in one line */ |
| 479 | 479 | char *z; /* General use string pointer */ |
| 480 | 480 | char **newArgv; /* New expanded g.argv under construction */ |
| 481 | 481 | char const * zFileName; /* input file name */ |
| 482 | 482 | FILE * zInFile; /* input FILE */ |
| 483 | -#ifdef _WIN32 | |
| 483 | +#if defined(_WIN32) && !defined(__MINGW32__) | |
| 484 | 484 | WCHAR buf[MAX_PATH]; |
| 485 | 485 | #endif |
| 486 | 486 | |
| 487 | 487 | g.argc = argc; |
| 488 | 488 | g.argv = argv; |
| 489 | -#ifdef _WIN32 | |
| 489 | +#if defined(_WIN32) && !defined(__MINGW32__) | |
| 490 | 490 | parse_windows_command_line(&g.argc, &g.argv); |
| 491 | 491 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 492 | 492 | g.nameOfExe = fossil_unicode_to_utf8(buf); |
| 493 | 493 | for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]); |
| 494 | 494 | #else |
| 495 | 495 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -341,11 +341,11 @@ | |
| 341 | if(g.db){ |
| 342 | db_close(0); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | #if defined(_WIN32) |
| 347 | /* |
| 348 | ** Parse the command-line arguments passed to windows. We do this |
| 349 | ** ourselves to work around bugs in the command-line parsing of MinGW. |
| 350 | ** It is possible (in theory) to only use this routine when compiling |
| 351 | ** with MinGW and to use built-in command-line parsing for MSVC and |
| @@ -454,11 +454,11 @@ | |
| 454 | } |
| 455 | argv[argc] = NULL; |
| 456 | *argcPtr = argc; |
| 457 | *((WCHAR ***)argvPtr) = argv; |
| 458 | } |
| 459 | #endif /* defined(_WIN32) */ |
| 460 | |
| 461 | |
| 462 | /* |
| 463 | ** Convert all arguments from mbcs (or unicode) to UTF-8. Then |
| 464 | ** search g.argv for arguments "--args FILENAME". If found, then |
| @@ -478,17 +478,17 @@ | |
| 478 | int n; /* Number of bytes in one line */ |
| 479 | char *z; /* General use string pointer */ |
| 480 | char **newArgv; /* New expanded g.argv under construction */ |
| 481 | char const * zFileName; /* input file name */ |
| 482 | FILE * zInFile; /* input FILE */ |
| 483 | #ifdef _WIN32 |
| 484 | WCHAR buf[MAX_PATH]; |
| 485 | #endif |
| 486 | |
| 487 | g.argc = argc; |
| 488 | g.argv = argv; |
| 489 | #ifdef _WIN32 |
| 490 | parse_windows_command_line(&g.argc, &g.argv); |
| 491 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 492 | g.nameOfExe = fossil_unicode_to_utf8(buf); |
| 493 | for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]); |
| 494 | #else |
| 495 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -341,11 +341,11 @@ | |
| 341 | if(g.db){ |
| 342 | db_close(0); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 347 | /* |
| 348 | ** Parse the command-line arguments passed to windows. We do this |
| 349 | ** ourselves to work around bugs in the command-line parsing of MinGW. |
| 350 | ** It is possible (in theory) to only use this routine when compiling |
| 351 | ** with MinGW and to use built-in command-line parsing for MSVC and |
| @@ -454,11 +454,11 @@ | |
| 454 | } |
| 455 | argv[argc] = NULL; |
| 456 | *argcPtr = argc; |
| 457 | *((WCHAR ***)argvPtr) = argv; |
| 458 | } |
| 459 | #endif /* defined(_WIN32) && !defined(__MINGW32__) */ |
| 460 | |
| 461 | |
| 462 | /* |
| 463 | ** Convert all arguments from mbcs (or unicode) to UTF-8. Then |
| 464 | ** search g.argv for arguments "--args FILENAME". If found, then |
| @@ -478,17 +478,17 @@ | |
| 478 | int n; /* Number of bytes in one line */ |
| 479 | char *z; /* General use string pointer */ |
| 480 | char **newArgv; /* New expanded g.argv under construction */ |
| 481 | char const * zFileName; /* input file name */ |
| 482 | FILE * zInFile; /* input FILE */ |
| 483 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 484 | WCHAR buf[MAX_PATH]; |
| 485 | #endif |
| 486 | |
| 487 | g.argc = argc; |
| 488 | g.argv = argv; |
| 489 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 490 | parse_windows_command_line(&g.argc, &g.argv); |
| 491 | GetModuleFileNameW(NULL, buf, MAX_PATH); |
| 492 | g.nameOfExe = fossil_unicode_to_utf8(buf); |
| 493 | for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]); |
| 494 | #else |
| 495 |
+1
| --- src/md5.c | ||
| +++ src/md5.c | ||
| @@ -433,10 +433,11 @@ | ||
| 433 | 433 | int i; |
| 434 | 434 | Blob in; |
| 435 | 435 | Blob cksum; |
| 436 | 436 | |
| 437 | 437 | for(i=2; i<g.argc; i++){ |
| 438 | + blob_init(&cksum, "********** not found ***********", -1); | |
| 438 | 439 | if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){ |
| 439 | 440 | blob_read_from_channel(&in, stdin, -1); |
| 440 | 441 | md5sum_blob(&in, &cksum); |
| 441 | 442 | }else{ |
| 442 | 443 | md5sum_file(g.argv[i], &cksum); |
| 443 | 444 |
| --- src/md5.c | |
| +++ src/md5.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | int i; |
| 434 | Blob in; |
| 435 | Blob cksum; |
| 436 | |
| 437 | for(i=2; i<g.argc; i++){ |
| 438 | if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){ |
| 439 | blob_read_from_channel(&in, stdin, -1); |
| 440 | md5sum_blob(&in, &cksum); |
| 441 | }else{ |
| 442 | md5sum_file(g.argv[i], &cksum); |
| 443 |
| --- src/md5.c | |
| +++ src/md5.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | int i; |
| 434 | Blob in; |
| 435 | Blob cksum; |
| 436 | |
| 437 | for(i=2; i<g.argc; i++){ |
| 438 | blob_init(&cksum, "********** not found ***********", -1); |
| 439 | if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){ |
| 440 | blob_read_from_channel(&in, stdin, -1); |
| 441 | md5sum_blob(&in, &cksum); |
| 442 | }else{ |
| 443 | md5sum_file(g.argv[i], &cksum); |
| 444 |
+19
-6
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -202,10 +202,11 @@ | ||
| 202 | 202 | GraphContext *pGraph = 0; |
| 203 | 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | 206 | static Stmt qbranch; |
| 207 | + int pendingEndTr = 0; /* True if a </td></tr> is needed */ | |
| 207 | 208 | |
| 208 | 209 | zPrevDate[0] = 0; |
| 209 | 210 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 210 | 211 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 211 | 212 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | ||
| 253 | 254 | } |
| 254 | 255 | } |
| 255 | 256 | } |
| 256 | 257 | prevTagid = tagid; |
| 257 | 258 | if( suppressCnt ){ |
| 258 | - @ <tr><td /><td /><td> | |
| 259 | 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | 261 | suppressCnt = 0; |
| 262 | + } | |
| 263 | + if( pendingEndTr ){ | |
| 264 | + @ </td></tr> | |
| 265 | + pendingEndTr = 0; | |
| 262 | 266 | } |
| 263 | 267 | if( fossil_strcmp(zType,"div")==0 ){ |
| 264 | 268 | if( !prevWasDivider ){ |
| 265 | 269 | @ <tr><td colspan="3"><hr /></td></tr> |
| 266 | 270 | } |
| @@ -461,17 +465,19 @@ | ||
| 461 | 465 | db_reset(&fchngQuery); |
| 462 | 466 | if( inUl ){ |
| 463 | 467 | @ </ul> |
| 464 | 468 | } |
| 465 | 469 | } |
| 466 | - @ </td></tr> | |
| 470 | + pendingEndTr = 1; | |
| 467 | 471 | } |
| 468 | 472 | if( suppressCnt ){ |
| 469 | - @ <tr><td /><td /><td> | |
| 470 | 473 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 471 | 474 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 472 | 475 | suppressCnt = 0; |
| 476 | + } | |
| 477 | + if( pendingEndTr ){ | |
| 478 | + @ </td></tr> | |
| 473 | 479 | } |
| 474 | 480 | if( pGraph ){ |
| 475 | 481 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 476 | 482 | if( pGraph->nErr ){ |
| 477 | 483 | graph_free(pGraph); |
| @@ -941,10 +947,11 @@ | ||
| 941 | 947 | login_check_credentials(); |
| 942 | 948 | if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){ |
| 943 | 949 | login_needed(); |
| 944 | 950 | return; |
| 945 | 951 | } |
| 952 | + url_initialize(&url, "timeline"); | |
| 946 | 953 | if( zTagName && g.perm.Read ){ |
| 947 | 954 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTagName); |
| 948 | 955 | zThisTag = zTagName; |
| 949 | 956 | }else if( zBrName && g.perm.Read ){ |
| 950 | 957 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",zBrName); |
| @@ -957,22 +964,28 @@ | ||
| 957 | 964 | }else{ |
| 958 | 965 | tmFlags = TIMELINE_GRAPH; |
| 959 | 966 | } |
| 960 | 967 | if( P("ng")!=0 || zSearch!=0 ){ |
| 961 | 968 | tmFlags &= ~TIMELINE_GRAPH; |
| 969 | + url_add_parameter(&url, "ng", 0); | |
| 970 | + } | |
| 971 | + if( P("brbg")!=0 ){ | |
| 972 | + tmFlags |= TIMELINE_BRCOLOR; | |
| 973 | + url_add_parameter(&url, "brbg", 0); | |
| 962 | 974 | } |
| 963 | - if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 964 | - if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 975 | + if( P("ubg")!=0 ){ | |
| 976 | + tmFlags |= TIMELINE_UCOLOR; | |
| 977 | + url_add_parameter(&url, "ubg", 0); | |
| 978 | + } | |
| 965 | 979 | |
| 966 | 980 | style_header("Timeline"); |
| 967 | 981 | login_anonymous_available(); |
| 968 | 982 | timeline_temp_table(); |
| 969 | 983 | blob_zero(&sql); |
| 970 | 984 | blob_zero(&desc); |
| 971 | 985 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 972 | 986 | blob_append(&sql, timeline_query_for_www(), -1); |
| 973 | - url_initialize(&url, "timeline"); | |
| 974 | 987 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 975 | 988 | tmFlags |= TIMELINE_FCHANGES; |
| 976 | 989 | url_add_parameter(&url, "fc", 0); |
| 977 | 990 | } |
| 978 | 991 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 979 | 992 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | GraphContext *pGraph = 0; |
| 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | static Stmt qbranch; |
| 207 | |
| 208 | zPrevDate[0] = 0; |
| 209 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 210 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 211 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | prevTagid = tagid; |
| 257 | if( suppressCnt ){ |
| 258 | @ <tr><td /><td /><td> |
| 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | suppressCnt = 0; |
| 262 | } |
| 263 | if( fossil_strcmp(zType,"div")==0 ){ |
| 264 | if( !prevWasDivider ){ |
| 265 | @ <tr><td colspan="3"><hr /></td></tr> |
| 266 | } |
| @@ -461,17 +465,19 @@ | |
| 461 | db_reset(&fchngQuery); |
| 462 | if( inUl ){ |
| 463 | @ </ul> |
| 464 | } |
| 465 | } |
| 466 | @ </td></tr> |
| 467 | } |
| 468 | if( suppressCnt ){ |
| 469 | @ <tr><td /><td /><td> |
| 470 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 471 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 472 | suppressCnt = 0; |
| 473 | } |
| 474 | if( pGraph ){ |
| 475 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 476 | if( pGraph->nErr ){ |
| 477 | graph_free(pGraph); |
| @@ -941,10 +947,11 @@ | |
| 941 | login_check_credentials(); |
| 942 | if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){ |
| 943 | login_needed(); |
| 944 | return; |
| 945 | } |
| 946 | if( zTagName && g.perm.Read ){ |
| 947 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTagName); |
| 948 | zThisTag = zTagName; |
| 949 | }else if( zBrName && g.perm.Read ){ |
| 950 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",zBrName); |
| @@ -957,22 +964,28 @@ | |
| 957 | }else{ |
| 958 | tmFlags = TIMELINE_GRAPH; |
| 959 | } |
| 960 | if( P("ng")!=0 || zSearch!=0 ){ |
| 961 | tmFlags &= ~TIMELINE_GRAPH; |
| 962 | } |
| 963 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 964 | if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 965 | |
| 966 | style_header("Timeline"); |
| 967 | login_anonymous_available(); |
| 968 | timeline_temp_table(); |
| 969 | blob_zero(&sql); |
| 970 | blob_zero(&desc); |
| 971 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 972 | blob_append(&sql, timeline_query_for_www(), -1); |
| 973 | url_initialize(&url, "timeline"); |
| 974 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 975 | tmFlags |= TIMELINE_FCHANGES; |
| 976 | url_add_parameter(&url, "fc", 0); |
| 977 | } |
| 978 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 979 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | GraphContext *pGraph = 0; |
| 203 | int prevWasDivider = 0; /* True if previous output row was <hr> */ |
| 204 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 205 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 206 | static Stmt qbranch; |
| 207 | int pendingEndTr = 0; /* True if a </td></tr> is needed */ |
| 208 | |
| 209 | zPrevDate[0] = 0; |
| 210 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 211 | if( db_get_boolean("timeline-block-markup", 0) ){ |
| 212 | wikiFlags = WIKI_INLINE; |
| @@ -253,14 +254,17 @@ | |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | prevTagid = tagid; |
| 258 | if( suppressCnt ){ |
| 259 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 260 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 261 | suppressCnt = 0; |
| 262 | } |
| 263 | if( pendingEndTr ){ |
| 264 | @ </td></tr> |
| 265 | pendingEndTr = 0; |
| 266 | } |
| 267 | if( fossil_strcmp(zType,"div")==0 ){ |
| 268 | if( !prevWasDivider ){ |
| 269 | @ <tr><td colspan="3"><hr /></td></tr> |
| 270 | } |
| @@ -461,17 +465,19 @@ | |
| 465 | db_reset(&fchngQuery); |
| 466 | if( inUl ){ |
| 467 | @ </ul> |
| 468 | } |
| 469 | } |
| 470 | pendingEndTr = 1; |
| 471 | } |
| 472 | if( suppressCnt ){ |
| 473 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 474 | @ event%s(suppressCnt>1?"s":"") omitted.</span></td></tr> |
| 475 | suppressCnt = 0; |
| 476 | } |
| 477 | if( pendingEndTr ){ |
| 478 | @ </td></tr> |
| 479 | } |
| 480 | if( pGraph ){ |
| 481 | graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0); |
| 482 | if( pGraph->nErr ){ |
| 483 | graph_free(pGraph); |
| @@ -941,10 +947,11 @@ | |
| 947 | login_check_credentials(); |
| 948 | if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){ |
| 949 | login_needed(); |
| 950 | return; |
| 951 | } |
| 952 | url_initialize(&url, "timeline"); |
| 953 | if( zTagName && g.perm.Read ){ |
| 954 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTagName); |
| 955 | zThisTag = zTagName; |
| 956 | }else if( zBrName && g.perm.Read ){ |
| 957 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'",zBrName); |
| @@ -957,22 +964,28 @@ | |
| 964 | }else{ |
| 965 | tmFlags = TIMELINE_GRAPH; |
| 966 | } |
| 967 | if( P("ng")!=0 || zSearch!=0 ){ |
| 968 | tmFlags &= ~TIMELINE_GRAPH; |
| 969 | url_add_parameter(&url, "ng", 0); |
| 970 | } |
| 971 | if( P("brbg")!=0 ){ |
| 972 | tmFlags |= TIMELINE_BRCOLOR; |
| 973 | url_add_parameter(&url, "brbg", 0); |
| 974 | } |
| 975 | if( P("ubg")!=0 ){ |
| 976 | tmFlags |= TIMELINE_UCOLOR; |
| 977 | url_add_parameter(&url, "ubg", 0); |
| 978 | } |
| 979 | |
| 980 | style_header("Timeline"); |
| 981 | login_anonymous_available(); |
| 982 | timeline_temp_table(); |
| 983 | blob_zero(&sql); |
| 984 | blob_zero(&desc); |
| 985 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 986 | blob_append(&sql, timeline_query_for_www(), -1); |
| 987 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 988 | tmFlags |= TIMELINE_FCHANGES; |
| 989 | url_add_parameter(&url, "fc", 0); |
| 990 | } |
| 991 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 992 |