Fossil SCM
Fix compilation for latest MinGW.org (4.0.2, NOT Mingw-W64 which works fine), which lacks some symbols and has some other symbol conflicts. Merge trunk.
Commit
55f1c036f048d582e49e6e21179e2cd5ac349c52
Parent
2932f753cbe14a7…
17 files changed
+1
-1
+9
-9
+10
-10
+66
-66
+27
-27
+3
-3
+9
-9
+20
-8
+1
-1
+3
-3
+7
-7
+9
-5
+9
-5
+2
-2
+2
-2
+1
-1
+1
-1
+1
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -131,11 +131,11 @@ | ||
| 131 | 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | 132 | ** option is supported. |
| 133 | 133 | ** |
| 134 | 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | 135 | ** set repositories. These command are particularly useful in |
| 136 | -** unset conjunection with the "max-loadavg" setting which cannot | |
| 136 | +** unset conjunction with the "max-loadavg" setting which cannot | |
| 137 | 137 | ** otherwise be set globally. |
| 138 | 138 | ** |
| 139 | 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | 140 | ** when one of the following commands are run against the repository: |
| 141 | 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 | 142 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | ** option is supported. |
| 133 | ** |
| 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | ** set repositories. These command are particularly useful in |
| 136 | ** unset conjunection with the "max-loadavg" setting which cannot |
| 137 | ** otherwise be set globally. |
| 138 | ** |
| 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | ** when one of the following commands are run against the repository: |
| 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | ** option is supported. |
| 133 | ** |
| 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | ** set repositories. These command are particularly useful in |
| 136 | ** unset conjunction with the "max-loadavg" setting which cannot |
| 137 | ** otherwise be set globally. |
| 138 | ** |
| 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | ** when one of the following commands are run against the repository: |
| 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 |
+9
-9
| --- src/cache.c | ||
| +++ src/cache.c | ||
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | fossil_free(zDbName); |
| 62 | 62 | if( rc ){ |
| 63 | 63 | sqlite3_close(db); |
| 64 | 64 | return 0; |
| 65 | 65 | } |
| 66 | - rc = sqlite3_exec(db, | |
| 66 | + rc = sqlite3_exec(db, | |
| 67 | 67 | "PRAGMA page_size=8192;" |
| 68 | 68 | "CREATE TABLE IF NOT EXISTS blob(id INTEGER PRIMARY KEY, data BLOB);" |
| 69 | 69 | "CREATE TABLE IF NOT EXISTS cache(" |
| 70 | 70 | "key TEXT PRIMARY KEY," /* Key used to access the cache */ |
| 71 | 71 | "id INT REFERENCES blob," /* The cache content */ |
| @@ -94,11 +94,11 @@ | ||
| 94 | 94 | rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); |
| 95 | 95 | if( rc ){ |
| 96 | 96 | sqlite3_finalize(pStmt); |
| 97 | 97 | pStmt = 0; |
| 98 | 98 | } |
| 99 | - return pStmt; | |
| 99 | + return pStmt; | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /* |
| 103 | 103 | ** This routine implements an SQL function that renders a large integer |
| 104 | 104 | ** compactly: ex: 12.3MB |
| @@ -153,11 +153,11 @@ | ||
| 153 | 153 | if( pStmt==0 ) goto cache_write_end; |
| 154 | 154 | sqlite3_bind_blob(pStmt, 1, blob_buffer(pContent), blob_size(pContent), |
| 155 | 155 | SQLITE_STATIC); |
| 156 | 156 | if( sqlite3_step(pStmt)!=SQLITE_DONE ) goto cache_write_end; |
| 157 | 157 | sqlite3_finalize(pStmt); |
| 158 | - pStmt = cacheStmt(db, | |
| 158 | + pStmt = cacheStmt(db, | |
| 159 | 159 | "INSERT OR IGNORE INTO cache(key,sz,tm,nref,id)" |
| 160 | 160 | "VALUES(?1,?2,strftime('%s','now'),1,?3)" |
| 161 | 161 | ); |
| 162 | 162 | if( pStmt==0 ) goto cache_write_end; |
| 163 | 163 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| @@ -202,27 +202,27 @@ | ||
| 202 | 202 | |
| 203 | 203 | db = cacheOpen(0); |
| 204 | 204 | if( db==0 ) return 0; |
| 205 | 205 | sqlite3_busy_timeout(db, 10000); |
| 206 | 206 | sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, 0); |
| 207 | - pStmt = cacheStmt(db, | |
| 207 | + pStmt = cacheStmt(db, | |
| 208 | 208 | "SELECT blob.data FROM cache, blob" |
| 209 | 209 | " WHERE cache.key=?1 AND cache.id=blob.id"); |
| 210 | 210 | if( pStmt==0 ) goto cache_read_done; |
| 211 | 211 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 212 | 212 | if( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 213 | 213 | blob_append(pContent, sqlite3_column_blob(pStmt, 0), |
| 214 | 214 | sqlite3_column_bytes(pStmt, 0)); |
| 215 | 215 | rc = 1; |
| 216 | 216 | sqlite3_reset(pStmt); |
| 217 | - pStmt = cacheStmt(db, | |
| 217 | + pStmt = cacheStmt(db, | |
| 218 | 218 | "UPDATE cache SET nref=nref+1, tm=strftime('%s','now')" |
| 219 | 219 | " WHERE key=?1"); |
| 220 | 220 | if( pStmt ){ |
| 221 | 221 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 222 | 222 | sqlite3_step(pStmt); |
| 223 | - } | |
| 223 | + } | |
| 224 | 224 | } |
| 225 | 225 | sqlite3_finalize(pStmt); |
| 226 | 226 | cache_read_done: |
| 227 | 227 | sqlite3_exec(db, "COMMIT", 0, 0, 0); |
| 228 | 228 | sqlite3_close(db); |
| @@ -256,11 +256,11 @@ | ||
| 256 | 256 | sqlite3_stmt *pStmt; |
| 257 | 257 | |
| 258 | 258 | db_find_and_open_repository(0,0); |
| 259 | 259 | zCmd = g.argc>=3 ? g.argv[2] : ""; |
| 260 | 260 | nCmd = (int)strlen(zCmd); |
| 261 | - if( nCmd<=1 ){ | |
| 261 | + if( nCmd<=1 ){ | |
| 262 | 262 | fossil_fatal("Usage: %s cache SUBCOMMAND", g.argv[0]); |
| 263 | 263 | } |
| 264 | 264 | if( strncmp(zCmd, "init", nCmd)==0 ){ |
| 265 | 265 | db = cacheOpen(0); |
| 266 | 266 | sqlite3_close(db); |
| @@ -290,11 +290,11 @@ | ||
| 290 | 290 | fossil_print("cache does not exist\n"); |
| 291 | 291 | }else{ |
| 292 | 292 | int nEntry = 0; |
| 293 | 293 | char *zDbName = cacheName(); |
| 294 | 294 | cache_register_sizename(db); |
| 295 | - pStmt = cacheStmt(db, | |
| 295 | + pStmt = cacheStmt(db, | |
| 296 | 296 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 297 | 297 | " FROM cache" |
| 298 | 298 | " ORDER BY tm DESC" |
| 299 | 299 | ); |
| 300 | 300 | if( pStmt ){ |
| @@ -338,11 +338,11 @@ | ||
| 338 | 338 | if( db==0 ){ |
| 339 | 339 | @ The web-page cache is disabled for this repository |
| 340 | 340 | }else{ |
| 341 | 341 | char *zDbName = cacheName(); |
| 342 | 342 | cache_register_sizename(db); |
| 343 | - pStmt = cacheStmt(db, | |
| 343 | + pStmt = cacheStmt(db, | |
| 344 | 344 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 345 | 345 | " FROM cache" |
| 346 | 346 | " ORDER BY tm DESC" |
| 347 | 347 | ); |
| 348 | 348 | if( pStmt ){ |
| 349 | 349 |
| --- src/cache.c | |
| +++ src/cache.c | |
| @@ -61,11 +61,11 @@ | |
| 61 | fossil_free(zDbName); |
| 62 | if( rc ){ |
| 63 | sqlite3_close(db); |
| 64 | return 0; |
| 65 | } |
| 66 | rc = sqlite3_exec(db, |
| 67 | "PRAGMA page_size=8192;" |
| 68 | "CREATE TABLE IF NOT EXISTS blob(id INTEGER PRIMARY KEY, data BLOB);" |
| 69 | "CREATE TABLE IF NOT EXISTS cache(" |
| 70 | "key TEXT PRIMARY KEY," /* Key used to access the cache */ |
| 71 | "id INT REFERENCES blob," /* The cache content */ |
| @@ -94,11 +94,11 @@ | |
| 94 | rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); |
| 95 | if( rc ){ |
| 96 | sqlite3_finalize(pStmt); |
| 97 | pStmt = 0; |
| 98 | } |
| 99 | return pStmt; |
| 100 | } |
| 101 | |
| 102 | /* |
| 103 | ** This routine implements an SQL function that renders a large integer |
| 104 | ** compactly: ex: 12.3MB |
| @@ -153,11 +153,11 @@ | |
| 153 | if( pStmt==0 ) goto cache_write_end; |
| 154 | sqlite3_bind_blob(pStmt, 1, blob_buffer(pContent), blob_size(pContent), |
| 155 | SQLITE_STATIC); |
| 156 | if( sqlite3_step(pStmt)!=SQLITE_DONE ) goto cache_write_end; |
| 157 | sqlite3_finalize(pStmt); |
| 158 | pStmt = cacheStmt(db, |
| 159 | "INSERT OR IGNORE INTO cache(key,sz,tm,nref,id)" |
| 160 | "VALUES(?1,?2,strftime('%s','now'),1,?3)" |
| 161 | ); |
| 162 | if( pStmt==0 ) goto cache_write_end; |
| 163 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| @@ -202,27 +202,27 @@ | |
| 202 | |
| 203 | db = cacheOpen(0); |
| 204 | if( db==0 ) return 0; |
| 205 | sqlite3_busy_timeout(db, 10000); |
| 206 | sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, 0); |
| 207 | pStmt = cacheStmt(db, |
| 208 | "SELECT blob.data FROM cache, blob" |
| 209 | " WHERE cache.key=?1 AND cache.id=blob.id"); |
| 210 | if( pStmt==0 ) goto cache_read_done; |
| 211 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 212 | if( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 213 | blob_append(pContent, sqlite3_column_blob(pStmt, 0), |
| 214 | sqlite3_column_bytes(pStmt, 0)); |
| 215 | rc = 1; |
| 216 | sqlite3_reset(pStmt); |
| 217 | pStmt = cacheStmt(db, |
| 218 | "UPDATE cache SET nref=nref+1, tm=strftime('%s','now')" |
| 219 | " WHERE key=?1"); |
| 220 | if( pStmt ){ |
| 221 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 222 | sqlite3_step(pStmt); |
| 223 | } |
| 224 | } |
| 225 | sqlite3_finalize(pStmt); |
| 226 | cache_read_done: |
| 227 | sqlite3_exec(db, "COMMIT", 0, 0, 0); |
| 228 | sqlite3_close(db); |
| @@ -256,11 +256,11 @@ | |
| 256 | sqlite3_stmt *pStmt; |
| 257 | |
| 258 | db_find_and_open_repository(0,0); |
| 259 | zCmd = g.argc>=3 ? g.argv[2] : ""; |
| 260 | nCmd = (int)strlen(zCmd); |
| 261 | if( nCmd<=1 ){ |
| 262 | fossil_fatal("Usage: %s cache SUBCOMMAND", g.argv[0]); |
| 263 | } |
| 264 | if( strncmp(zCmd, "init", nCmd)==0 ){ |
| 265 | db = cacheOpen(0); |
| 266 | sqlite3_close(db); |
| @@ -290,11 +290,11 @@ | |
| 290 | fossil_print("cache does not exist\n"); |
| 291 | }else{ |
| 292 | int nEntry = 0; |
| 293 | char *zDbName = cacheName(); |
| 294 | cache_register_sizename(db); |
| 295 | pStmt = cacheStmt(db, |
| 296 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 297 | " FROM cache" |
| 298 | " ORDER BY tm DESC" |
| 299 | ); |
| 300 | if( pStmt ){ |
| @@ -338,11 +338,11 @@ | |
| 338 | if( db==0 ){ |
| 339 | @ The web-page cache is disabled for this repository |
| 340 | }else{ |
| 341 | char *zDbName = cacheName(); |
| 342 | cache_register_sizename(db); |
| 343 | pStmt = cacheStmt(db, |
| 344 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 345 | " FROM cache" |
| 346 | " ORDER BY tm DESC" |
| 347 | ); |
| 348 | if( pStmt ){ |
| 349 |
| --- src/cache.c | |
| +++ src/cache.c | |
| @@ -61,11 +61,11 @@ | |
| 61 | fossil_free(zDbName); |
| 62 | if( rc ){ |
| 63 | sqlite3_close(db); |
| 64 | return 0; |
| 65 | } |
| 66 | rc = sqlite3_exec(db, |
| 67 | "PRAGMA page_size=8192;" |
| 68 | "CREATE TABLE IF NOT EXISTS blob(id INTEGER PRIMARY KEY, data BLOB);" |
| 69 | "CREATE TABLE IF NOT EXISTS cache(" |
| 70 | "key TEXT PRIMARY KEY," /* Key used to access the cache */ |
| 71 | "id INT REFERENCES blob," /* The cache content */ |
| @@ -94,11 +94,11 @@ | |
| 94 | rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); |
| 95 | if( rc ){ |
| 96 | sqlite3_finalize(pStmt); |
| 97 | pStmt = 0; |
| 98 | } |
| 99 | return pStmt; |
| 100 | } |
| 101 | |
| 102 | /* |
| 103 | ** This routine implements an SQL function that renders a large integer |
| 104 | ** compactly: ex: 12.3MB |
| @@ -153,11 +153,11 @@ | |
| 153 | if( pStmt==0 ) goto cache_write_end; |
| 154 | sqlite3_bind_blob(pStmt, 1, blob_buffer(pContent), blob_size(pContent), |
| 155 | SQLITE_STATIC); |
| 156 | if( sqlite3_step(pStmt)!=SQLITE_DONE ) goto cache_write_end; |
| 157 | sqlite3_finalize(pStmt); |
| 158 | pStmt = cacheStmt(db, |
| 159 | "INSERT OR IGNORE INTO cache(key,sz,tm,nref,id)" |
| 160 | "VALUES(?1,?2,strftime('%s','now'),1,?3)" |
| 161 | ); |
| 162 | if( pStmt==0 ) goto cache_write_end; |
| 163 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| @@ -202,27 +202,27 @@ | |
| 202 | |
| 203 | db = cacheOpen(0); |
| 204 | if( db==0 ) return 0; |
| 205 | sqlite3_busy_timeout(db, 10000); |
| 206 | sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, 0); |
| 207 | pStmt = cacheStmt(db, |
| 208 | "SELECT blob.data FROM cache, blob" |
| 209 | " WHERE cache.key=?1 AND cache.id=blob.id"); |
| 210 | if( pStmt==0 ) goto cache_read_done; |
| 211 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 212 | if( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 213 | blob_append(pContent, sqlite3_column_blob(pStmt, 0), |
| 214 | sqlite3_column_bytes(pStmt, 0)); |
| 215 | rc = 1; |
| 216 | sqlite3_reset(pStmt); |
| 217 | pStmt = cacheStmt(db, |
| 218 | "UPDATE cache SET nref=nref+1, tm=strftime('%s','now')" |
| 219 | " WHERE key=?1"); |
| 220 | if( pStmt ){ |
| 221 | sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC); |
| 222 | sqlite3_step(pStmt); |
| 223 | } |
| 224 | } |
| 225 | sqlite3_finalize(pStmt); |
| 226 | cache_read_done: |
| 227 | sqlite3_exec(db, "COMMIT", 0, 0, 0); |
| 228 | sqlite3_close(db); |
| @@ -256,11 +256,11 @@ | |
| 256 | sqlite3_stmt *pStmt; |
| 257 | |
| 258 | db_find_and_open_repository(0,0); |
| 259 | zCmd = g.argc>=3 ? g.argv[2] : ""; |
| 260 | nCmd = (int)strlen(zCmd); |
| 261 | if( nCmd<=1 ){ |
| 262 | fossil_fatal("Usage: %s cache SUBCOMMAND", g.argv[0]); |
| 263 | } |
| 264 | if( strncmp(zCmd, "init", nCmd)==0 ){ |
| 265 | db = cacheOpen(0); |
| 266 | sqlite3_close(db); |
| @@ -290,11 +290,11 @@ | |
| 290 | fossil_print("cache does not exist\n"); |
| 291 | }else{ |
| 292 | int nEntry = 0; |
| 293 | char *zDbName = cacheName(); |
| 294 | cache_register_sizename(db); |
| 295 | pStmt = cacheStmt(db, |
| 296 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 297 | " FROM cache" |
| 298 | " ORDER BY tm DESC" |
| 299 | ); |
| 300 | if( pStmt ){ |
| @@ -338,11 +338,11 @@ | |
| 338 | if( db==0 ){ |
| 339 | @ The web-page cache is disabled for this repository |
| 340 | }else{ |
| 341 | char *zDbName = cacheName(); |
| 342 | cache_register_sizename(db); |
| 343 | pStmt = cacheStmt(db, |
| 344 | "SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')" |
| 345 | " FROM cache" |
| 346 | " ORDER BY tm DESC" |
| 347 | ); |
| 348 | if( pStmt ){ |
| 349 |
+10
-10
| --- src/delta.c | ||
| +++ src/delta.c | ||
| @@ -65,11 +65,11 @@ | ||
| 65 | 65 | ** The "u32" type must be an unsigned 32-bit integer. Adjust this |
| 66 | 66 | */ |
| 67 | 67 | typedef unsigned int u32; |
| 68 | 68 | |
| 69 | 69 | /* |
| 70 | -** Must be a 16-bit value | |
| 70 | +** Must be a 16-bit value | |
| 71 | 71 | */ |
| 72 | 72 | typedef short int s16; |
| 73 | 73 | typedef unsigned short int u16; |
| 74 | 74 | |
| 75 | 75 | #endif /* INTERFACE */ |
| @@ -82,11 +82,11 @@ | ||
| 82 | 82 | |
| 83 | 83 | /* |
| 84 | 84 | ** The current state of the rolling hash. |
| 85 | 85 | ** |
| 86 | 86 | ** z[] holds the values that have been hashed. z[] is a circular buffer. |
| 87 | -** z[i] is the first entry and z[(i+NHASH-1)%NHASH] is the last entry of | |
| 87 | +** z[i] is the first entry and z[(i+NHASH-1)%NHASH] is the last entry of | |
| 88 | 88 | ** the window. |
| 89 | 89 | ** |
| 90 | 90 | ** Hash.a is the sum of all elements of hash.z[]. Hash.b is a weighted |
| 91 | 91 | ** sum. Hash.b is z[i]*NHASH + z[i+1]*(NHASH-1) + ... + z[i+NHASH-1]*1. |
| 92 | 92 | ** (Each index for z[] should be module NHASH, of course. The %NHASH operator |
| @@ -135,11 +135,11 @@ | ||
| 135 | 135 | |
| 136 | 136 | /* |
| 137 | 137 | ** Write an base-64 integer into the given buffer. |
| 138 | 138 | */ |
| 139 | 139 | static void putInt(unsigned int v, char **pz){ |
| 140 | - static const char zDigits[] = | |
| 140 | + static const char zDigits[] = | |
| 141 | 141 | "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"; |
| 142 | 142 | /* 123456789 123456789 123456789 123456789 123456789 123456789 123 */ |
| 143 | 143 | int i, j; |
| 144 | 144 | char zBuf[20]; |
| 145 | 145 | if( v==0 ){ |
| @@ -229,11 +229,11 @@ | ||
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /* |
| 232 | 232 | ** Create a new delta. |
| 233 | 233 | ** |
| 234 | -** The delta is written into a preallocated buffer, zDelta, which | |
| 234 | +** The delta is written into a preallocated buffer, zDelta, which | |
| 235 | 235 | ** should be at least 60 bytes longer than the target file, zOut. |
| 236 | 236 | ** The delta string will be NUL-terminated, but it might also contain |
| 237 | 237 | ** embedded NUL characters if either the zSrc or zOut files are |
| 238 | 238 | ** binary. This function returns the length of the delta string |
| 239 | 239 | ** in bytes, excluding the final NUL terminator character. |
| @@ -245,11 +245,11 @@ | ||
| 245 | 245 | ** delta file z, a program can compute the size of the output file |
| 246 | 246 | ** simply by reading the first line and decoding the base-64 number |
| 247 | 247 | ** found there. The delta_output_size() routine does exactly this. |
| 248 | 248 | ** |
| 249 | 249 | ** After the initial size number, the delta consists of a series of |
| 250 | -** literal text segments and commands to copy from the SOURCE file. | |
| 250 | +** literal text segments and commands to copy from the SOURCE file. | |
| 251 | 251 | ** A copy command looks like this: |
| 252 | 252 | ** |
| 253 | 253 | ** NNN@MMM, |
| 254 | 254 | ** |
| 255 | 255 | ** where NNN is the number of bytes to be copied and MMM is the offset |
| @@ -283,11 +283,11 @@ | ||
| 283 | 283 | ** search for a matching section in the source file. When a match |
| 284 | 284 | ** is found, a copy command is added to the delta. An effort is |
| 285 | 285 | ** made to extend the matching section to regions that come before |
| 286 | 286 | ** and after the 16-byte hash window. A copy command is only issued |
| 287 | 287 | ** if the result would use less space that just quoting the text |
| 288 | -** literally. Literal text is added to the delta for sections that | |
| 288 | +** literally. Literal text is added to the delta for sections that | |
| 289 | 289 | ** do not match or which can not be encoded efficiently using copy |
| 290 | 290 | ** commands. |
| 291 | 291 | */ |
| 292 | 292 | int delta_create( |
| 293 | 293 | const char *zSrc, /* The source or pattern file */ |
| @@ -356,13 +356,13 @@ | ||
| 356 | 356 | hv = hash_32bit(&h) % nHash; |
| 357 | 357 | DEBUG2( printf("LOOKING: %4d [%s]\n", base+i, print16(&zOut[base+i])); ) |
| 358 | 358 | iBlock = landmark[hv]; |
| 359 | 359 | while( iBlock>=0 && (limit--)>0 ){ |
| 360 | 360 | /* |
| 361 | - ** The hash window has identified a potential match against | |
| 361 | + ** The hash window has identified a potential match against | |
| 362 | 362 | ** landmark block iBlock. But we need to investigate further. |
| 363 | - ** | |
| 363 | + ** | |
| 364 | 364 | ** Look for a region in zOut that matches zSrc. Anchor the search |
| 365 | 365 | ** at zSrc[iSrc] and zOut[base+i]. Do not include anything prior to |
| 366 | 366 | ** zOut[base] or after zOut[outLen] nor anything after zSrc[srcLen]. |
| 367 | 367 | ** |
| 368 | 368 | ** Set cnt equal to the length of the match and set ofst so that |
| @@ -468,16 +468,16 @@ | ||
| 468 | 468 | } |
| 469 | 469 | /* Output the final checksum record. */ |
| 470 | 470 | putInt(checksum(zOut, lenOut), &zDelta); |
| 471 | 471 | *(zDelta++) = ';'; |
| 472 | 472 | fossil_free(collide); |
| 473 | - return zDelta - zOrigDelta; | |
| 473 | + return zDelta - zOrigDelta; | |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | /* |
| 477 | 477 | ** Return the size (in bytes) of the output from applying |
| 478 | -** a delta. | |
| 478 | +** a delta. | |
| 479 | 479 | ** |
| 480 | 480 | ** This routine is provided so that an procedure that is able |
| 481 | 481 | ** to call delta_apply() can learn how much space is required |
| 482 | 482 | ** for the output and hence allocate nor more space that is really |
| 483 | 483 | ** needed. |
| 484 | 484 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -65,11 +65,11 @@ | |
| 65 | ** The "u32" type must be an unsigned 32-bit integer. Adjust this |
| 66 | */ |
| 67 | typedef unsigned int u32; |
| 68 | |
| 69 | /* |
| 70 | ** Must be a 16-bit value |
| 71 | */ |
| 72 | typedef short int s16; |
| 73 | typedef unsigned short int u16; |
| 74 | |
| 75 | #endif /* INTERFACE */ |
| @@ -82,11 +82,11 @@ | |
| 82 | |
| 83 | /* |
| 84 | ** The current state of the rolling hash. |
| 85 | ** |
| 86 | ** z[] holds the values that have been hashed. z[] is a circular buffer. |
| 87 | ** z[i] is the first entry and z[(i+NHASH-1)%NHASH] is the last entry of |
| 88 | ** the window. |
| 89 | ** |
| 90 | ** Hash.a is the sum of all elements of hash.z[]. Hash.b is a weighted |
| 91 | ** sum. Hash.b is z[i]*NHASH + z[i+1]*(NHASH-1) + ... + z[i+NHASH-1]*1. |
| 92 | ** (Each index for z[] should be module NHASH, of course. The %NHASH operator |
| @@ -135,11 +135,11 @@ | |
| 135 | |
| 136 | /* |
| 137 | ** Write an base-64 integer into the given buffer. |
| 138 | */ |
| 139 | static void putInt(unsigned int v, char **pz){ |
| 140 | static const char zDigits[] = |
| 141 | "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"; |
| 142 | /* 123456789 123456789 123456789 123456789 123456789 123456789 123 */ |
| 143 | int i, j; |
| 144 | char zBuf[20]; |
| 145 | if( v==0 ){ |
| @@ -229,11 +229,11 @@ | |
| 229 | } |
| 230 | |
| 231 | /* |
| 232 | ** Create a new delta. |
| 233 | ** |
| 234 | ** The delta is written into a preallocated buffer, zDelta, which |
| 235 | ** should be at least 60 bytes longer than the target file, zOut. |
| 236 | ** The delta string will be NUL-terminated, but it might also contain |
| 237 | ** embedded NUL characters if either the zSrc or zOut files are |
| 238 | ** binary. This function returns the length of the delta string |
| 239 | ** in bytes, excluding the final NUL terminator character. |
| @@ -245,11 +245,11 @@ | |
| 245 | ** delta file z, a program can compute the size of the output file |
| 246 | ** simply by reading the first line and decoding the base-64 number |
| 247 | ** found there. The delta_output_size() routine does exactly this. |
| 248 | ** |
| 249 | ** After the initial size number, the delta consists of a series of |
| 250 | ** literal text segments and commands to copy from the SOURCE file. |
| 251 | ** A copy command looks like this: |
| 252 | ** |
| 253 | ** NNN@MMM, |
| 254 | ** |
| 255 | ** where NNN is the number of bytes to be copied and MMM is the offset |
| @@ -283,11 +283,11 @@ | |
| 283 | ** search for a matching section in the source file. When a match |
| 284 | ** is found, a copy command is added to the delta. An effort is |
| 285 | ** made to extend the matching section to regions that come before |
| 286 | ** and after the 16-byte hash window. A copy command is only issued |
| 287 | ** if the result would use less space that just quoting the text |
| 288 | ** literally. Literal text is added to the delta for sections that |
| 289 | ** do not match or which can not be encoded efficiently using copy |
| 290 | ** commands. |
| 291 | */ |
| 292 | int delta_create( |
| 293 | const char *zSrc, /* The source or pattern file */ |
| @@ -356,13 +356,13 @@ | |
| 356 | hv = hash_32bit(&h) % nHash; |
| 357 | DEBUG2( printf("LOOKING: %4d [%s]\n", base+i, print16(&zOut[base+i])); ) |
| 358 | iBlock = landmark[hv]; |
| 359 | while( iBlock>=0 && (limit--)>0 ){ |
| 360 | /* |
| 361 | ** The hash window has identified a potential match against |
| 362 | ** landmark block iBlock. But we need to investigate further. |
| 363 | ** |
| 364 | ** Look for a region in zOut that matches zSrc. Anchor the search |
| 365 | ** at zSrc[iSrc] and zOut[base+i]. Do not include anything prior to |
| 366 | ** zOut[base] or after zOut[outLen] nor anything after zSrc[srcLen]. |
| 367 | ** |
| 368 | ** Set cnt equal to the length of the match and set ofst so that |
| @@ -468,16 +468,16 @@ | |
| 468 | } |
| 469 | /* Output the final checksum record. */ |
| 470 | putInt(checksum(zOut, lenOut), &zDelta); |
| 471 | *(zDelta++) = ';'; |
| 472 | fossil_free(collide); |
| 473 | return zDelta - zOrigDelta; |
| 474 | } |
| 475 | |
| 476 | /* |
| 477 | ** Return the size (in bytes) of the output from applying |
| 478 | ** a delta. |
| 479 | ** |
| 480 | ** This routine is provided so that an procedure that is able |
| 481 | ** to call delta_apply() can learn how much space is required |
| 482 | ** for the output and hence allocate nor more space that is really |
| 483 | ** needed. |
| 484 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -65,11 +65,11 @@ | |
| 65 | ** The "u32" type must be an unsigned 32-bit integer. Adjust this |
| 66 | */ |
| 67 | typedef unsigned int u32; |
| 68 | |
| 69 | /* |
| 70 | ** Must be a 16-bit value |
| 71 | */ |
| 72 | typedef short int s16; |
| 73 | typedef unsigned short int u16; |
| 74 | |
| 75 | #endif /* INTERFACE */ |
| @@ -82,11 +82,11 @@ | |
| 82 | |
| 83 | /* |
| 84 | ** The current state of the rolling hash. |
| 85 | ** |
| 86 | ** z[] holds the values that have been hashed. z[] is a circular buffer. |
| 87 | ** z[i] is the first entry and z[(i+NHASH-1)%NHASH] is the last entry of |
| 88 | ** the window. |
| 89 | ** |
| 90 | ** Hash.a is the sum of all elements of hash.z[]. Hash.b is a weighted |
| 91 | ** sum. Hash.b is z[i]*NHASH + z[i+1]*(NHASH-1) + ... + z[i+NHASH-1]*1. |
| 92 | ** (Each index for z[] should be module NHASH, of course. The %NHASH operator |
| @@ -135,11 +135,11 @@ | |
| 135 | |
| 136 | /* |
| 137 | ** Write an base-64 integer into the given buffer. |
| 138 | */ |
| 139 | static void putInt(unsigned int v, char **pz){ |
| 140 | static const char zDigits[] = |
| 141 | "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"; |
| 142 | /* 123456789 123456789 123456789 123456789 123456789 123456789 123 */ |
| 143 | int i, j; |
| 144 | char zBuf[20]; |
| 145 | if( v==0 ){ |
| @@ -229,11 +229,11 @@ | |
| 229 | } |
| 230 | |
| 231 | /* |
| 232 | ** Create a new delta. |
| 233 | ** |
| 234 | ** The delta is written into a preallocated buffer, zDelta, which |
| 235 | ** should be at least 60 bytes longer than the target file, zOut. |
| 236 | ** The delta string will be NUL-terminated, but it might also contain |
| 237 | ** embedded NUL characters if either the zSrc or zOut files are |
| 238 | ** binary. This function returns the length of the delta string |
| 239 | ** in bytes, excluding the final NUL terminator character. |
| @@ -245,11 +245,11 @@ | |
| 245 | ** delta file z, a program can compute the size of the output file |
| 246 | ** simply by reading the first line and decoding the base-64 number |
| 247 | ** found there. The delta_output_size() routine does exactly this. |
| 248 | ** |
| 249 | ** After the initial size number, the delta consists of a series of |
| 250 | ** literal text segments and commands to copy from the SOURCE file. |
| 251 | ** A copy command looks like this: |
| 252 | ** |
| 253 | ** NNN@MMM, |
| 254 | ** |
| 255 | ** where NNN is the number of bytes to be copied and MMM is the offset |
| @@ -283,11 +283,11 @@ | |
| 283 | ** search for a matching section in the source file. When a match |
| 284 | ** is found, a copy command is added to the delta. An effort is |
| 285 | ** made to extend the matching section to regions that come before |
| 286 | ** and after the 16-byte hash window. A copy command is only issued |
| 287 | ** if the result would use less space that just quoting the text |
| 288 | ** literally. Literal text is added to the delta for sections that |
| 289 | ** do not match or which can not be encoded efficiently using copy |
| 290 | ** commands. |
| 291 | */ |
| 292 | int delta_create( |
| 293 | const char *zSrc, /* The source or pattern file */ |
| @@ -356,13 +356,13 @@ | |
| 356 | hv = hash_32bit(&h) % nHash; |
| 357 | DEBUG2( printf("LOOKING: %4d [%s]\n", base+i, print16(&zOut[base+i])); ) |
| 358 | iBlock = landmark[hv]; |
| 359 | while( iBlock>=0 && (limit--)>0 ){ |
| 360 | /* |
| 361 | ** The hash window has identified a potential match against |
| 362 | ** landmark block iBlock. But we need to investigate further. |
| 363 | ** |
| 364 | ** Look for a region in zOut that matches zSrc. Anchor the search |
| 365 | ** at zSrc[iSrc] and zOut[base+i]. Do not include anything prior to |
| 366 | ** zOut[base] or after zOut[outLen] nor anything after zSrc[srcLen]. |
| 367 | ** |
| 368 | ** Set cnt equal to the length of the match and set ofst so that |
| @@ -468,16 +468,16 @@ | |
| 468 | } |
| 469 | /* Output the final checksum record. */ |
| 470 | putInt(checksum(zOut, lenOut), &zDelta); |
| 471 | *(zDelta++) = ';'; |
| 472 | fossil_free(collide); |
| 473 | return zDelta - zOrigDelta; |
| 474 | } |
| 475 | |
| 476 | /* |
| 477 | ** Return the size (in bytes) of the output from applying |
| 478 | ** a delta. |
| 479 | ** |
| 480 | ** This routine is provided so that an procedure that is able |
| 481 | ** to call delta_apply() can learn how much space is required |
| 482 | ** for the output and hence allocate nor more space that is really |
| 483 | ** needed. |
| 484 |
+66
-66
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -26,11 +26,11 @@ | ||
| 26 | 26 | ** Try to guess the mimetype from content. |
| 27 | 27 | ** |
| 28 | 28 | ** If the content is pure text, return NULL. |
| 29 | 29 | ** |
| 30 | 30 | ** For image types, attempt to return an appropriate mimetype |
| 31 | -** name like "image/gif" or "image/jpeg". | |
| 31 | +** name like "image/gif" or "image/jpeg". | |
| 32 | 32 | ** |
| 33 | 33 | ** For any other binary type, return "unknown/unknown". |
| 34 | 34 | */ |
| 35 | 35 | const char *mimetype_from_content(Blob *pBlob){ |
| 36 | 36 | int i; |
| @@ -83,11 +83,11 @@ | ||
| 83 | 83 | int i; |
| 84 | 84 | int first, last; |
| 85 | 85 | int len; |
| 86 | 86 | char zSuffix[20]; |
| 87 | 87 | |
| 88 | - /* A table of mimetypes based on file suffixes. | |
| 88 | + /* A table of mimetypes based on file suffixes. | |
| 89 | 89 | ** Suffixes must be in sorted order so that we can do a binary |
| 90 | 90 | ** search to find the mime-type |
| 91 | 91 | */ |
| 92 | 92 | static const struct { |
| 93 | 93 | const char *zSuffix; /* The file suffix */ |
| @@ -487,11 +487,11 @@ | ||
| 487 | 487 | db_end_transaction(0); |
| 488 | 488 | } |
| 489 | 489 | blob_to_utf8_no_bom(&filebody, 0); |
| 490 | 490 | |
| 491 | 491 | /* The file is now contained in the filebody blob. Deliver the |
| 492 | - ** file to the user | |
| 492 | + ** file to the user | |
| 493 | 493 | */ |
| 494 | 494 | zMime = P("mimetype"); |
| 495 | 495 | if( zMime==0 ){ |
| 496 | 496 | zMime = mimetype_from_name(zName); |
| 497 | 497 | } |
| @@ -546,79 +546,79 @@ | ||
| 546 | 546 | /* Jump here when unable to locate the document */ |
| 547 | 547 | db_end_transaction(0); |
| 548 | 548 | style_header("Document Not Found"); |
| 549 | 549 | @ <p>No such document: %h(zName)</p> |
| 550 | 550 | style_footer(); |
| 551 | - return; | |
| 551 | + return; | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /* |
| 555 | 555 | ** The default logo. |
| 556 | 556 | */ |
| 557 | 557 | static const unsigned char aLogo[] = { |
| 558 | - 71, 73, 70, 56, 55, 97, 62, 0, 71, 0, 244, 0, 0, 85, | |
| 559 | - 129, 149, 95, 136, 155, 99, 139, 157, 106, 144, 162, 113, 150, 166, | |
| 560 | - 116, 152, 168, 127, 160, 175, 138, 168, 182, 148, 176, 188, 159, 184, | |
| 561 | - 195, 170, 192, 202, 180, 199, 208, 184, 202, 210, 191, 207, 215, 201, | |
| 562 | - 215, 221, 212, 223, 228, 223, 231, 235, 226, 227, 226, 226, 234, 237, | |
| 563 | - 233, 239, 241, 240, 244, 246, 244, 247, 248, 255, 255, 255, 0, 0, | |
| 564 | - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 565 | - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, | |
| 566 | - 0, 0, 62, 0, 71, 0, 0, 5, 255, 96, 100, 141, 100, 105, | |
| 567 | - 158, 168, 37, 41, 132, 192, 164, 112, 44, 207, 102, 99, 0, 56, | |
| 568 | - 16, 84, 116, 239, 199, 141, 65, 110, 232, 248, 25, 141, 193, 161, | |
| 569 | - 82, 113, 108, 202, 32, 55, 229, 210, 73, 61, 41, 164, 88, 102, | |
| 570 | - 181, 10, 41, 96, 179, 91, 106, 35, 240, 5, 135, 143, 137, 242, | |
| 571 | - 87, 123, 246, 33, 190, 81, 108, 163, 237, 198, 14, 30, 113, 233, | |
| 572 | - 131, 78, 115, 72, 11, 115, 87, 101, 19, 124, 51, 66, 74, 8, | |
| 573 | - 19, 16, 67, 100, 74, 133, 50, 15, 101, 135, 56, 11, 74, 6, | |
| 574 | - 143, 49, 126, 106, 56, 8, 145, 67, 9, 152, 48, 139, 155, 5, | |
| 575 | - 22, 13, 74, 115, 161, 41, 147, 101, 13, 130, 57, 132, 170, 40, | |
| 576 | - 167, 155, 0, 94, 57, 3, 178, 48, 183, 181, 57, 160, 186, 40, | |
| 577 | - 19, 141, 189, 0, 69, 192, 40, 16, 195, 155, 185, 199, 41, 201, | |
| 578 | - 189, 191, 205, 193, 188, 131, 210, 49, 175, 88, 209, 214, 38, 19, | |
| 579 | - 3, 11, 19, 111, 127, 60, 219, 39, 55, 204, 19, 11, 6, 100, | |
| 580 | - 5, 10, 227, 228, 37, 163, 0, 239, 117, 56, 238, 243, 49, 195, | |
| 581 | - 177, 247, 48, 158, 56, 251, 50, 216, 254, 197, 56, 128, 107, 158, | |
| 582 | - 2, 125, 171, 114, 92, 218, 246, 96, 66, 3, 4, 50, 134, 176, | |
| 583 | - 145, 6, 97, 64, 144, 24, 19, 136, 108, 91, 177, 160, 0, 194, | |
| 584 | - 19, 253, 0, 216, 107, 214, 224, 192, 129, 5, 16, 83, 255, 244, | |
| 585 | - 43, 213, 195, 24, 159, 27, 169, 64, 230, 88, 208, 227, 129, 182, | |
| 586 | - 54, 4, 89, 158, 24, 181, 163, 199, 1, 155, 52, 233, 8, 130, | |
| 587 | - 176, 83, 24, 128, 137, 50, 18, 32, 48, 48, 114, 11, 173, 137, | |
| 588 | - 19, 110, 4, 64, 105, 1, 194, 30, 140, 68, 15, 24, 24, 224, | |
| 589 | - 50, 76, 70, 0, 11, 171, 54, 26, 160, 181, 194, 149, 148, 40, | |
| 590 | - 174, 148, 122, 64, 180, 208, 161, 17, 207, 112, 164, 1, 128, 96, | |
| 591 | - 148, 78, 18, 21, 194, 33, 229, 51, 247, 65, 133, 97, 5, 250, | |
| 592 | - 69, 229, 100, 34, 220, 128, 166, 116, 190, 62, 8, 167, 195, 170, | |
| 593 | - 47, 163, 0, 130, 90, 152, 11, 160, 173, 170, 27, 154, 26, 91, | |
| 594 | - 232, 151, 171, 18, 14, 162, 253, 98, 170, 18, 70, 171, 64, 219, | |
| 595 | - 10, 67, 136, 134, 187, 116, 75, 180, 46, 179, 174, 135, 4, 189, | |
| 596 | - 229, 231, 78, 40, 10, 62, 226, 164, 172, 64, 240, 167, 170, 10, | |
| 597 | - 18, 124, 188, 10, 107, 65, 193, 94, 11, 93, 171, 28, 248, 17, | |
| 598 | - 239, 46, 140, 78, 97, 34, 25, 153, 36, 99, 65, 130, 7, 203, | |
| 599 | - 183, 168, 51, 34, 136, 25, 140, 10, 6, 16, 28, 255, 145, 241, | |
| 600 | - 230, 140, 10, 66, 178, 167, 112, 48, 192, 128, 129, 9, 31, 141, | |
| 601 | - 84, 138, 63, 163, 162, 2, 203, 206, 240, 56, 55, 98, 192, 188, | |
| 602 | - 15, 185, 50, 160, 6, 0, 125, 62, 33, 214, 195, 33, 5, 24, | |
| 603 | - 184, 25, 231, 14, 201, 245, 144, 23, 126, 104, 228, 0, 145, 2, | |
| 604 | - 13, 140, 244, 212, 17, 21, 20, 176, 159, 17, 95, 225, 160, 128, | |
| 605 | - 16, 1, 32, 224, 142, 32, 227, 125, 87, 64, 0, 16, 54, 129, | |
| 606 | - 205, 2, 141, 76, 53, 130, 103, 37, 166, 64, 144, 107, 78, 196, | |
| 607 | - 5, 192, 0, 54, 50, 229, 9, 141, 49, 84, 194, 35, 12, 196, | |
| 608 | - 153, 48, 192, 137, 57, 84, 24, 7, 87, 159, 249, 240, 215, 143, | |
| 609 | - 105, 241, 118, 149, 9, 139, 4, 64, 203, 141, 35, 140, 129, 131, | |
| 610 | - 16, 222, 125, 231, 128, 2, 238, 17, 152, 66, 3, 5, 56, 224, | |
| 611 | - 159, 103, 16, 76, 25, 75, 5, 11, 164, 215, 96, 9, 14, 16, | |
| 612 | - 36, 225, 15, 11, 40, 144, 192, 156, 41, 10, 178, 199, 3, 66, | |
| 613 | - 64, 80, 193, 3, 124, 90, 48, 129, 129, 102, 177, 18, 192, 154, | |
| 614 | - 49, 84, 240, 208, 92, 22, 149, 96, 39, 9, 31, 74, 17, 94, | |
| 615 | - 3, 8, 177, 199, 72, 59, 85, 76, 25, 216, 8, 139, 194, 197, | |
| 616 | - 138, 163, 69, 96, 115, 0, 147, 72, 72, 84, 28, 14, 79, 86, | |
| 617 | - 233, 230, 23, 113, 26, 160, 128, 3, 10, 58, 129, 103, 14, 159, | |
| 618 | - 214, 163, 146, 117, 238, 213, 154, 128, 151, 109, 84, 64, 217, 13, | |
| 619 | - 27, 10, 228, 39, 2, 235, 164, 168, 74, 8, 0, 59, | |
| 558 | + 71, 73, 70, 56, 55, 97, 62, 0, 71, 0, 244, 0, 0, 85, | |
| 559 | + 129, 149, 95, 136, 155, 99, 139, 157, 106, 144, 162, 113, 150, 166, | |
| 560 | + 116, 152, 168, 127, 160, 175, 138, 168, 182, 148, 176, 188, 159, 184, | |
| 561 | + 195, 170, 192, 202, 180, 199, 208, 184, 202, 210, 191, 207, 215, 201, | |
| 562 | + 215, 221, 212, 223, 228, 223, 231, 235, 226, 227, 226, 226, 234, 237, | |
| 563 | + 233, 239, 241, 240, 244, 246, 244, 247, 248, 255, 255, 255, 0, 0, | |
| 564 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 565 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, | |
| 566 | + 0, 0, 62, 0, 71, 0, 0, 5, 255, 96, 100, 141, 100, 105, | |
| 567 | + 158, 168, 37, 41, 132, 192, 164, 112, 44, 207, 102, 99, 0, 56, | |
| 568 | + 16, 84, 116, 239, 199, 141, 65, 110, 232, 248, 25, 141, 193, 161, | |
| 569 | + 82, 113, 108, 202, 32, 55, 229, 210, 73, 61, 41, 164, 88, 102, | |
| 570 | + 181, 10, 41, 96, 179, 91, 106, 35, 240, 5, 135, 143, 137, 242, | |
| 571 | + 87, 123, 246, 33, 190, 81, 108, 163, 237, 198, 14, 30, 113, 233, | |
| 572 | + 131, 78, 115, 72, 11, 115, 87, 101, 19, 124, 51, 66, 74, 8, | |
| 573 | + 19, 16, 67, 100, 74, 133, 50, 15, 101, 135, 56, 11, 74, 6, | |
| 574 | + 143, 49, 126, 106, 56, 8, 145, 67, 9, 152, 48, 139, 155, 5, | |
| 575 | + 22, 13, 74, 115, 161, 41, 147, 101, 13, 130, 57, 132, 170, 40, | |
| 576 | + 167, 155, 0, 94, 57, 3, 178, 48, 183, 181, 57, 160, 186, 40, | |
| 577 | + 19, 141, 189, 0, 69, 192, 40, 16, 195, 155, 185, 199, 41, 201, | |
| 578 | + 189, 191, 205, 193, 188, 131, 210, 49, 175, 88, 209, 214, 38, 19, | |
| 579 | + 3, 11, 19, 111, 127, 60, 219, 39, 55, 204, 19, 11, 6, 100, | |
| 580 | + 5, 10, 227, 228, 37, 163, 0, 239, 117, 56, 238, 243, 49, 195, | |
| 581 | + 177, 247, 48, 158, 56, 251, 50, 216, 254, 197, 56, 128, 107, 158, | |
| 582 | + 2, 125, 171, 114, 92, 218, 246, 96, 66, 3, 4, 50, 134, 176, | |
| 583 | + 145, 6, 97, 64, 144, 24, 19, 136, 108, 91, 177, 160, 0, 194, | |
| 584 | + 19, 253, 0, 216, 107, 214, 224, 192, 129, 5, 16, 83, 255, 244, | |
| 585 | + 43, 213, 195, 24, 159, 27, 169, 64, 230, 88, 208, 227, 129, 182, | |
| 586 | + 54, 4, 89, 158, 24, 181, 163, 199, 1, 155, 52, 233, 8, 130, | |
| 587 | + 176, 83, 24, 128, 137, 50, 18, 32, 48, 48, 114, 11, 173, 137, | |
| 588 | + 19, 110, 4, 64, 105, 1, 194, 30, 140, 68, 15, 24, 24, 224, | |
| 589 | + 50, 76, 70, 0, 11, 171, 54, 26, 160, 181, 194, 149, 148, 40, | |
| 590 | + 174, 148, 122, 64, 180, 208, 161, 17, 207, 112, 164, 1, 128, 96, | |
| 591 | + 148, 78, 18, 21, 194, 33, 229, 51, 247, 65, 133, 97, 5, 250, | |
| 592 | + 69, 229, 100, 34, 220, 128, 166, 116, 190, 62, 8, 167, 195, 170, | |
| 593 | + 47, 163, 0, 130, 90, 152, 11, 160, 173, 170, 27, 154, 26, 91, | |
| 594 | + 232, 151, 171, 18, 14, 162, 253, 98, 170, 18, 70, 171, 64, 219, | |
| 595 | + 10, 67, 136, 134, 187, 116, 75, 180, 46, 179, 174, 135, 4, 189, | |
| 596 | + 229, 231, 78, 40, 10, 62, 226, 164, 172, 64, 240, 167, 170, 10, | |
| 597 | + 18, 124, 188, 10, 107, 65, 193, 94, 11, 93, 171, 28, 248, 17, | |
| 598 | + 239, 46, 140, 78, 97, 34, 25, 153, 36, 99, 65, 130, 7, 203, | |
| 599 | + 183, 168, 51, 34, 136, 25, 140, 10, 6, 16, 28, 255, 145, 241, | |
| 600 | + 230, 140, 10, 66, 178, 167, 112, 48, 192, 128, 129, 9, 31, 141, | |
| 601 | + 84, 138, 63, 163, 162, 2, 203, 206, 240, 56, 55, 98, 192, 188, | |
| 602 | + 15, 185, 50, 160, 6, 0, 125, 62, 33, 214, 195, 33, 5, 24, | |
| 603 | + 184, 25, 231, 14, 201, 245, 144, 23, 126, 104, 228, 0, 145, 2, | |
| 604 | + 13, 140, 244, 212, 17, 21, 20, 176, 159, 17, 95, 225, 160, 128, | |
| 605 | + 16, 1, 32, 224, 142, 32, 227, 125, 87, 64, 0, 16, 54, 129, | |
| 606 | + 205, 2, 141, 76, 53, 130, 103, 37, 166, 64, 144, 107, 78, 196, | |
| 607 | + 5, 192, 0, 54, 50, 229, 9, 141, 49, 84, 194, 35, 12, 196, | |
| 608 | + 153, 48, 192, 137, 57, 84, 24, 7, 87, 159, 249, 240, 215, 143, | |
| 609 | + 105, 241, 118, 149, 9, 139, 4, 64, 203, 141, 35, 140, 129, 131, | |
| 610 | + 16, 222, 125, 231, 128, 2, 238, 17, 152, 66, 3, 5, 56, 224, | |
| 611 | + 159, 103, 16, 76, 25, 75, 5, 11, 164, 215, 96, 9, 14, 16, | |
| 612 | + 36, 225, 15, 11, 40, 144, 192, 156, 41, 10, 178, 199, 3, 66, | |
| 613 | + 64, 80, 193, 3, 124, 90, 48, 129, 129, 102, 177, 18, 192, 154, | |
| 614 | + 49, 84, 240, 208, 92, 22, 149, 96, 39, 9, 31, 74, 17, 94, | |
| 615 | + 3, 8, 177, 199, 72, 59, 85, 76, 25, 216, 8, 139, 194, 197, | |
| 616 | + 138, 163, 69, 96, 115, 0, 147, 72, 72, 84, 28, 14, 79, 86, | |
| 617 | + 233, 230, 23, 113, 26, 160, 128, 3, 10, 58, 129, 103, 14, 159, | |
| 618 | + 214, 163, 146, 117, 238, 213, 154, 128, 151, 109, 84, 64, 217, 13, | |
| 619 | + 27, 10, 228, 39, 2, 235, 164, 168, 74, 8, 0, 59, | |
| 620 | 620 | }; |
| 621 | 621 | |
| 622 | 622 | /* |
| 623 | 623 | ** WEBPAGE: logo |
| 624 | 624 | ** |
| 625 | 625 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -26,11 +26,11 @@ | |
| 26 | ** Try to guess the mimetype from content. |
| 27 | ** |
| 28 | ** If the content is pure text, return NULL. |
| 29 | ** |
| 30 | ** For image types, attempt to return an appropriate mimetype |
| 31 | ** name like "image/gif" or "image/jpeg". |
| 32 | ** |
| 33 | ** For any other binary type, return "unknown/unknown". |
| 34 | */ |
| 35 | const char *mimetype_from_content(Blob *pBlob){ |
| 36 | int i; |
| @@ -83,11 +83,11 @@ | |
| 83 | int i; |
| 84 | int first, last; |
| 85 | int len; |
| 86 | char zSuffix[20]; |
| 87 | |
| 88 | /* A table of mimetypes based on file suffixes. |
| 89 | ** Suffixes must be in sorted order so that we can do a binary |
| 90 | ** search to find the mime-type |
| 91 | */ |
| 92 | static const struct { |
| 93 | const char *zSuffix; /* The file suffix */ |
| @@ -487,11 +487,11 @@ | |
| 487 | db_end_transaction(0); |
| 488 | } |
| 489 | blob_to_utf8_no_bom(&filebody, 0); |
| 490 | |
| 491 | /* The file is now contained in the filebody blob. Deliver the |
| 492 | ** file to the user |
| 493 | */ |
| 494 | zMime = P("mimetype"); |
| 495 | if( zMime==0 ){ |
| 496 | zMime = mimetype_from_name(zName); |
| 497 | } |
| @@ -546,79 +546,79 @@ | |
| 546 | /* Jump here when unable to locate the document */ |
| 547 | db_end_transaction(0); |
| 548 | style_header("Document Not Found"); |
| 549 | @ <p>No such document: %h(zName)</p> |
| 550 | style_footer(); |
| 551 | return; |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | ** The default logo. |
| 556 | */ |
| 557 | static const unsigned char aLogo[] = { |
| 558 | 71, 73, 70, 56, 55, 97, 62, 0, 71, 0, 244, 0, 0, 85, |
| 559 | 129, 149, 95, 136, 155, 99, 139, 157, 106, 144, 162, 113, 150, 166, |
| 560 | 116, 152, 168, 127, 160, 175, 138, 168, 182, 148, 176, 188, 159, 184, |
| 561 | 195, 170, 192, 202, 180, 199, 208, 184, 202, 210, 191, 207, 215, 201, |
| 562 | 215, 221, 212, 223, 228, 223, 231, 235, 226, 227, 226, 226, 234, 237, |
| 563 | 233, 239, 241, 240, 244, 246, 244, 247, 248, 255, 255, 255, 0, 0, |
| 564 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 565 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, |
| 566 | 0, 0, 62, 0, 71, 0, 0, 5, 255, 96, 100, 141, 100, 105, |
| 567 | 158, 168, 37, 41, 132, 192, 164, 112, 44, 207, 102, 99, 0, 56, |
| 568 | 16, 84, 116, 239, 199, 141, 65, 110, 232, 248, 25, 141, 193, 161, |
| 569 | 82, 113, 108, 202, 32, 55, 229, 210, 73, 61, 41, 164, 88, 102, |
| 570 | 181, 10, 41, 96, 179, 91, 106, 35, 240, 5, 135, 143, 137, 242, |
| 571 | 87, 123, 246, 33, 190, 81, 108, 163, 237, 198, 14, 30, 113, 233, |
| 572 | 131, 78, 115, 72, 11, 115, 87, 101, 19, 124, 51, 66, 74, 8, |
| 573 | 19, 16, 67, 100, 74, 133, 50, 15, 101, 135, 56, 11, 74, 6, |
| 574 | 143, 49, 126, 106, 56, 8, 145, 67, 9, 152, 48, 139, 155, 5, |
| 575 | 22, 13, 74, 115, 161, 41, 147, 101, 13, 130, 57, 132, 170, 40, |
| 576 | 167, 155, 0, 94, 57, 3, 178, 48, 183, 181, 57, 160, 186, 40, |
| 577 | 19, 141, 189, 0, 69, 192, 40, 16, 195, 155, 185, 199, 41, 201, |
| 578 | 189, 191, 205, 193, 188, 131, 210, 49, 175, 88, 209, 214, 38, 19, |
| 579 | 3, 11, 19, 111, 127, 60, 219, 39, 55, 204, 19, 11, 6, 100, |
| 580 | 5, 10, 227, 228, 37, 163, 0, 239, 117, 56, 238, 243, 49, 195, |
| 581 | 177, 247, 48, 158, 56, 251, 50, 216, 254, 197, 56, 128, 107, 158, |
| 582 | 2, 125, 171, 114, 92, 218, 246, 96, 66, 3, 4, 50, 134, 176, |
| 583 | 145, 6, 97, 64, 144, 24, 19, 136, 108, 91, 177, 160, 0, 194, |
| 584 | 19, 253, 0, 216, 107, 214, 224, 192, 129, 5, 16, 83, 255, 244, |
| 585 | 43, 213, 195, 24, 159, 27, 169, 64, 230, 88, 208, 227, 129, 182, |
| 586 | 54, 4, 89, 158, 24, 181, 163, 199, 1, 155, 52, 233, 8, 130, |
| 587 | 176, 83, 24, 128, 137, 50, 18, 32, 48, 48, 114, 11, 173, 137, |
| 588 | 19, 110, 4, 64, 105, 1, 194, 30, 140, 68, 15, 24, 24, 224, |
| 589 | 50, 76, 70, 0, 11, 171, 54, 26, 160, 181, 194, 149, 148, 40, |
| 590 | 174, 148, 122, 64, 180, 208, 161, 17, 207, 112, 164, 1, 128, 96, |
| 591 | 148, 78, 18, 21, 194, 33, 229, 51, 247, 65, 133, 97, 5, 250, |
| 592 | 69, 229, 100, 34, 220, 128, 166, 116, 190, 62, 8, 167, 195, 170, |
| 593 | 47, 163, 0, 130, 90, 152, 11, 160, 173, 170, 27, 154, 26, 91, |
| 594 | 232, 151, 171, 18, 14, 162, 253, 98, 170, 18, 70, 171, 64, 219, |
| 595 | 10, 67, 136, 134, 187, 116, 75, 180, 46, 179, 174, 135, 4, 189, |
| 596 | 229, 231, 78, 40, 10, 62, 226, 164, 172, 64, 240, 167, 170, 10, |
| 597 | 18, 124, 188, 10, 107, 65, 193, 94, 11, 93, 171, 28, 248, 17, |
| 598 | 239, 46, 140, 78, 97, 34, 25, 153, 36, 99, 65, 130, 7, 203, |
| 599 | 183, 168, 51, 34, 136, 25, 140, 10, 6, 16, 28, 255, 145, 241, |
| 600 | 230, 140, 10, 66, 178, 167, 112, 48, 192, 128, 129, 9, 31, 141, |
| 601 | 84, 138, 63, 163, 162, 2, 203, 206, 240, 56, 55, 98, 192, 188, |
| 602 | 15, 185, 50, 160, 6, 0, 125, 62, 33, 214, 195, 33, 5, 24, |
| 603 | 184, 25, 231, 14, 201, 245, 144, 23, 126, 104, 228, 0, 145, 2, |
| 604 | 13, 140, 244, 212, 17, 21, 20, 176, 159, 17, 95, 225, 160, 128, |
| 605 | 16, 1, 32, 224, 142, 32, 227, 125, 87, 64, 0, 16, 54, 129, |
| 606 | 205, 2, 141, 76, 53, 130, 103, 37, 166, 64, 144, 107, 78, 196, |
| 607 | 5, 192, 0, 54, 50, 229, 9, 141, 49, 84, 194, 35, 12, 196, |
| 608 | 153, 48, 192, 137, 57, 84, 24, 7, 87, 159, 249, 240, 215, 143, |
| 609 | 105, 241, 118, 149, 9, 139, 4, 64, 203, 141, 35, 140, 129, 131, |
| 610 | 16, 222, 125, 231, 128, 2, 238, 17, 152, 66, 3, 5, 56, 224, |
| 611 | 159, 103, 16, 76, 25, 75, 5, 11, 164, 215, 96, 9, 14, 16, |
| 612 | 36, 225, 15, 11, 40, 144, 192, 156, 41, 10, 178, 199, 3, 66, |
| 613 | 64, 80, 193, 3, 124, 90, 48, 129, 129, 102, 177, 18, 192, 154, |
| 614 | 49, 84, 240, 208, 92, 22, 149, 96, 39, 9, 31, 74, 17, 94, |
| 615 | 3, 8, 177, 199, 72, 59, 85, 76, 25, 216, 8, 139, 194, 197, |
| 616 | 138, 163, 69, 96, 115, 0, 147, 72, 72, 84, 28, 14, 79, 86, |
| 617 | 233, 230, 23, 113, 26, 160, 128, 3, 10, 58, 129, 103, 14, 159, |
| 618 | 214, 163, 146, 117, 238, 213, 154, 128, 151, 109, 84, 64, 217, 13, |
| 619 | 27, 10, 228, 39, 2, 235, 164, 168, 74, 8, 0, 59, |
| 620 | }; |
| 621 | |
| 622 | /* |
| 623 | ** WEBPAGE: logo |
| 624 | ** |
| 625 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -26,11 +26,11 @@ | |
| 26 | ** Try to guess the mimetype from content. |
| 27 | ** |
| 28 | ** If the content is pure text, return NULL. |
| 29 | ** |
| 30 | ** For image types, attempt to return an appropriate mimetype |
| 31 | ** name like "image/gif" or "image/jpeg". |
| 32 | ** |
| 33 | ** For any other binary type, return "unknown/unknown". |
| 34 | */ |
| 35 | const char *mimetype_from_content(Blob *pBlob){ |
| 36 | int i; |
| @@ -83,11 +83,11 @@ | |
| 83 | int i; |
| 84 | int first, last; |
| 85 | int len; |
| 86 | char zSuffix[20]; |
| 87 | |
| 88 | /* A table of mimetypes based on file suffixes. |
| 89 | ** Suffixes must be in sorted order so that we can do a binary |
| 90 | ** search to find the mime-type |
| 91 | */ |
| 92 | static const struct { |
| 93 | const char *zSuffix; /* The file suffix */ |
| @@ -487,11 +487,11 @@ | |
| 487 | db_end_transaction(0); |
| 488 | } |
| 489 | blob_to_utf8_no_bom(&filebody, 0); |
| 490 | |
| 491 | /* The file is now contained in the filebody blob. Deliver the |
| 492 | ** file to the user |
| 493 | */ |
| 494 | zMime = P("mimetype"); |
| 495 | if( zMime==0 ){ |
| 496 | zMime = mimetype_from_name(zName); |
| 497 | } |
| @@ -546,79 +546,79 @@ | |
| 546 | /* Jump here when unable to locate the document */ |
| 547 | db_end_transaction(0); |
| 548 | style_header("Document Not Found"); |
| 549 | @ <p>No such document: %h(zName)</p> |
| 550 | style_footer(); |
| 551 | return; |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | ** The default logo. |
| 556 | */ |
| 557 | static const unsigned char aLogo[] = { |
| 558 | 71, 73, 70, 56, 55, 97, 62, 0, 71, 0, 244, 0, 0, 85, |
| 559 | 129, 149, 95, 136, 155, 99, 139, 157, 106, 144, 162, 113, 150, 166, |
| 560 | 116, 152, 168, 127, 160, 175, 138, 168, 182, 148, 176, 188, 159, 184, |
| 561 | 195, 170, 192, 202, 180, 199, 208, 184, 202, 210, 191, 207, 215, 201, |
| 562 | 215, 221, 212, 223, 228, 223, 231, 235, 226, 227, 226, 226, 234, 237, |
| 563 | 233, 239, 241, 240, 244, 246, 244, 247, 248, 255, 255, 255, 0, 0, |
| 564 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 565 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, |
| 566 | 0, 0, 62, 0, 71, 0, 0, 5, 255, 96, 100, 141, 100, 105, |
| 567 | 158, 168, 37, 41, 132, 192, 164, 112, 44, 207, 102, 99, 0, 56, |
| 568 | 16, 84, 116, 239, 199, 141, 65, 110, 232, 248, 25, 141, 193, 161, |
| 569 | 82, 113, 108, 202, 32, 55, 229, 210, 73, 61, 41, 164, 88, 102, |
| 570 | 181, 10, 41, 96, 179, 91, 106, 35, 240, 5, 135, 143, 137, 242, |
| 571 | 87, 123, 246, 33, 190, 81, 108, 163, 237, 198, 14, 30, 113, 233, |
| 572 | 131, 78, 115, 72, 11, 115, 87, 101, 19, 124, 51, 66, 74, 8, |
| 573 | 19, 16, 67, 100, 74, 133, 50, 15, 101, 135, 56, 11, 74, 6, |
| 574 | 143, 49, 126, 106, 56, 8, 145, 67, 9, 152, 48, 139, 155, 5, |
| 575 | 22, 13, 74, 115, 161, 41, 147, 101, 13, 130, 57, 132, 170, 40, |
| 576 | 167, 155, 0, 94, 57, 3, 178, 48, 183, 181, 57, 160, 186, 40, |
| 577 | 19, 141, 189, 0, 69, 192, 40, 16, 195, 155, 185, 199, 41, 201, |
| 578 | 189, 191, 205, 193, 188, 131, 210, 49, 175, 88, 209, 214, 38, 19, |
| 579 | 3, 11, 19, 111, 127, 60, 219, 39, 55, 204, 19, 11, 6, 100, |
| 580 | 5, 10, 227, 228, 37, 163, 0, 239, 117, 56, 238, 243, 49, 195, |
| 581 | 177, 247, 48, 158, 56, 251, 50, 216, 254, 197, 56, 128, 107, 158, |
| 582 | 2, 125, 171, 114, 92, 218, 246, 96, 66, 3, 4, 50, 134, 176, |
| 583 | 145, 6, 97, 64, 144, 24, 19, 136, 108, 91, 177, 160, 0, 194, |
| 584 | 19, 253, 0, 216, 107, 214, 224, 192, 129, 5, 16, 83, 255, 244, |
| 585 | 43, 213, 195, 24, 159, 27, 169, 64, 230, 88, 208, 227, 129, 182, |
| 586 | 54, 4, 89, 158, 24, 181, 163, 199, 1, 155, 52, 233, 8, 130, |
| 587 | 176, 83, 24, 128, 137, 50, 18, 32, 48, 48, 114, 11, 173, 137, |
| 588 | 19, 110, 4, 64, 105, 1, 194, 30, 140, 68, 15, 24, 24, 224, |
| 589 | 50, 76, 70, 0, 11, 171, 54, 26, 160, 181, 194, 149, 148, 40, |
| 590 | 174, 148, 122, 64, 180, 208, 161, 17, 207, 112, 164, 1, 128, 96, |
| 591 | 148, 78, 18, 21, 194, 33, 229, 51, 247, 65, 133, 97, 5, 250, |
| 592 | 69, 229, 100, 34, 220, 128, 166, 116, 190, 62, 8, 167, 195, 170, |
| 593 | 47, 163, 0, 130, 90, 152, 11, 160, 173, 170, 27, 154, 26, 91, |
| 594 | 232, 151, 171, 18, 14, 162, 253, 98, 170, 18, 70, 171, 64, 219, |
| 595 | 10, 67, 136, 134, 187, 116, 75, 180, 46, 179, 174, 135, 4, 189, |
| 596 | 229, 231, 78, 40, 10, 62, 226, 164, 172, 64, 240, 167, 170, 10, |
| 597 | 18, 124, 188, 10, 107, 65, 193, 94, 11, 93, 171, 28, 248, 17, |
| 598 | 239, 46, 140, 78, 97, 34, 25, 153, 36, 99, 65, 130, 7, 203, |
| 599 | 183, 168, 51, 34, 136, 25, 140, 10, 6, 16, 28, 255, 145, 241, |
| 600 | 230, 140, 10, 66, 178, 167, 112, 48, 192, 128, 129, 9, 31, 141, |
| 601 | 84, 138, 63, 163, 162, 2, 203, 206, 240, 56, 55, 98, 192, 188, |
| 602 | 15, 185, 50, 160, 6, 0, 125, 62, 33, 214, 195, 33, 5, 24, |
| 603 | 184, 25, 231, 14, 201, 245, 144, 23, 126, 104, 228, 0, 145, 2, |
| 604 | 13, 140, 244, 212, 17, 21, 20, 176, 159, 17, 95, 225, 160, 128, |
| 605 | 16, 1, 32, 224, 142, 32, 227, 125, 87, 64, 0, 16, 54, 129, |
| 606 | 205, 2, 141, 76, 53, 130, 103, 37, 166, 64, 144, 107, 78, 196, |
| 607 | 5, 192, 0, 54, 50, 229, 9, 141, 49, 84, 194, 35, 12, 196, |
| 608 | 153, 48, 192, 137, 57, 84, 24, 7, 87, 159, 249, 240, 215, 143, |
| 609 | 105, 241, 118, 149, 9, 139, 4, 64, 203, 141, 35, 140, 129, 131, |
| 610 | 16, 222, 125, 231, 128, 2, 238, 17, 152, 66, 3, 5, 56, 224, |
| 611 | 159, 103, 16, 76, 25, 75, 5, 11, 164, 215, 96, 9, 14, 16, |
| 612 | 36, 225, 15, 11, 40, 144, 192, 156, 41, 10, 178, 199, 3, 66, |
| 613 | 64, 80, 193, 3, 124, 90, 48, 129, 129, 102, 177, 18, 192, 154, |
| 614 | 49, 84, 240, 208, 92, 22, 149, 96, 39, 9, 31, 74, 17, 94, |
| 615 | 3, 8, 177, 199, 72, 59, 85, 76, 25, 216, 8, 139, 194, 197, |
| 616 | 138, 163, 69, 96, 115, 0, 147, 72, 72, 84, 28, 14, 79, 86, |
| 617 | 233, 230, 23, 113, 26, 160, 128, 3, 10, 58, 129, 103, 14, 159, |
| 618 | 214, 163, 146, 117, 238, 213, 154, 128, 151, 109, 84, 64, 217, 13, |
| 619 | 27, 10, 228, 39, 2, 235, 164, 168, 74, 8, 0, 59, |
| 620 | }; |
| 621 | |
| 622 | /* |
| 623 | ** WEBPAGE: logo |
| 624 | ** |
| 625 |
+27
-27
| --- src/encode.c | ||
| +++ src/encode.c | ||
| @@ -47,30 +47,30 @@ | ||
| 47 | 47 | } |
| 48 | 48 | i = 0; |
| 49 | 49 | zOut = fossil_malloc( count+1 ); |
| 50 | 50 | while( n-->0 && (c = *zIn)!=0 ){ |
| 51 | 51 | switch( c ){ |
| 52 | - case '<': | |
| 52 | + case '<': | |
| 53 | 53 | zOut[i++] = '&'; |
| 54 | 54 | zOut[i++] = 'l'; |
| 55 | 55 | zOut[i++] = 't'; |
| 56 | 56 | zOut[i++] = ';'; |
| 57 | 57 | break; |
| 58 | - case '>': | |
| 58 | + case '>': | |
| 59 | 59 | zOut[i++] = '&'; |
| 60 | 60 | zOut[i++] = 'g'; |
| 61 | 61 | zOut[i++] = 't'; |
| 62 | 62 | zOut[i++] = ';'; |
| 63 | 63 | break; |
| 64 | - case '&': | |
| 64 | + case '&': | |
| 65 | 65 | zOut[i++] = '&'; |
| 66 | 66 | zOut[i++] = 'a'; |
| 67 | 67 | zOut[i++] = 'm'; |
| 68 | 68 | zOut[i++] = 'p'; |
| 69 | 69 | zOut[i++] = ';'; |
| 70 | 70 | break; |
| 71 | - case '"': | |
| 71 | + case '"': | |
| 72 | 72 | zOut[i++] = '&'; |
| 73 | 73 | zOut[i++] = 'q'; |
| 74 | 74 | zOut[i++] = 'u'; |
| 75 | 75 | zOut[i++] = 'o'; |
| 76 | 76 | zOut[i++] = 't'; |
| @@ -181,11 +181,11 @@ | ||
| 181 | 181 | /* |
| 182 | 182 | ** Convert the input string into a form that is suitable for use as |
| 183 | 183 | ** a token in the HTTP protocol. Spaces are encoded as '+' and special |
| 184 | 184 | ** characters are encoded as "%HH" where HH is a two-digit hexidecimal |
| 185 | 185 | ** representation of the character. The "/" character is not encoded |
| 186 | -** by this routine. | |
| 186 | +** by this routine. | |
| 187 | 187 | */ |
| 188 | 188 | char *urlize(const char *z, int n){ |
| 189 | 189 | return EncodeHttp(z, n, 0); |
| 190 | 190 | } |
| 191 | 191 | |
| @@ -327,11 +327,11 @@ | ||
| 327 | 327 | |
| 328 | 328 | |
| 329 | 329 | /* |
| 330 | 330 | ** The characters used for HTTP base64 encoding. |
| 331 | 331 | */ |
| 332 | -static unsigned char zBase[] = | |
| 332 | +static unsigned char zBase[] = | |
| 333 | 333 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 334 | 334 | |
| 335 | 335 | /* |
| 336 | 336 | ** Encode a string using a base-64 encoding. |
| 337 | 337 | ** The encoding can be reversed using the <b>decode64</b> function. |
| @@ -366,11 +366,11 @@ | ||
| 366 | 366 | z64[n] = 0; |
| 367 | 367 | return z64; |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | /* |
| 371 | -** COMMAND: test-encode64 | |
| 371 | +** COMMAND: test-encode64 | |
| 372 | 372 | ** Usage: %fossil test-encode64 STRING |
| 373 | 373 | */ |
| 374 | 374 | void test_encode64_cmd(void){ |
| 375 | 375 | char *z; |
| 376 | 376 | int i; |
| @@ -431,11 +431,11 @@ | ||
| 431 | 431 | *pnByte = j; |
| 432 | 432 | return zData; |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | /* |
| 436 | -** COMMAND: test-decode64 | |
| 436 | +** COMMAND: test-decode64 | |
| 437 | 437 | ** Usage: %fossil test-decode64 STRING |
| 438 | 438 | */ |
| 439 | 439 | void test_decode64_cmd(void){ |
| 440 | 440 | char *z; |
| 441 | 441 | int i, n; |
| @@ -454,11 +454,11 @@ | ||
| 454 | 454 | */ |
| 455 | 455 | |
| 456 | 456 | /* |
| 457 | 457 | ** The array used for encoding |
| 458 | 458 | */ /* 123456789 12345 */ |
| 459 | -static const char zEncode[] = "0123456789abcdef"; | |
| 459 | +static const char zEncode[] = "0123456789abcdef"; | |
| 460 | 460 | |
| 461 | 461 | /* |
| 462 | 462 | ** Encode a N-digit base-256 in base-16. Return zero on success |
| 463 | 463 | ** and non-zero if there is an error. |
| 464 | 464 | */ |
| @@ -473,33 +473,33 @@ | ||
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | /* |
| 476 | 476 | ** An array for translating single base-16 characters into a value. |
| 477 | 477 | ** Disallowed input characters have a value of 64. Upper and lower |
| 478 | -** case is the same. | |
| 478 | +** case is the same. | |
| 479 | 479 | */ |
| 480 | 480 | static const char zDecode[] = { |
| 481 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 482 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 483 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 484 | - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64, | |
| 481 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 482 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 483 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 484 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64, | |
| 485 | 485 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 486 | 486 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 487 | 487 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 488 | 488 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 489 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 490 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 491 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 492 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 493 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 494 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 495 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 496 | - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 489 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 490 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 491 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 492 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 493 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 494 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 495 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 496 | + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
| 497 | 497 | }; |
| 498 | 498 | |
| 499 | 499 | /* |
| 500 | -** Decode a N-character base-16 number into base-256. N must be a | |
| 500 | +** Decode a N-character base-16 number into base-256. N must be a | |
| 501 | 501 | ** multiple of 2. The output buffer must be at least N/2 characters |
| 502 | 502 | ** in length |
| 503 | 503 | */ |
| 504 | 504 | int decode16(const unsigned char *zIn, unsigned char *pOut, int N){ |
| 505 | 505 | int i, j; |
| @@ -545,11 +545,11 @@ | ||
| 545 | 545 | /* Randomness used for XOR-ing by the obscure() and unobscure() routines */ |
| 546 | 546 | static const unsigned char aObscurer[16] = { |
| 547 | 547 | 0xa7, 0x21, 0x31, 0xe3, 0x2a, 0x50, 0x2c, 0x86, |
| 548 | 548 | 0x4c, 0xa4, 0x52, 0x25, 0xff, 0x49, 0x35, 0x85 |
| 549 | 549 | }; |
| 550 | - | |
| 550 | + | |
| 551 | 551 | |
| 552 | 552 | /* |
| 553 | 553 | ** Obscure plain text so that it is not easily readable. |
| 554 | 554 | ** |
| 555 | 555 | ** This is used for storing sensitive information (such as passwords) in a |
| @@ -562,11 +562,11 @@ | ||
| 562 | 562 | */ |
| 563 | 563 | char *obscure(const char *zIn){ |
| 564 | 564 | int n, i; |
| 565 | 565 | unsigned char salt; |
| 566 | 566 | char *zOut; |
| 567 | - | |
| 567 | + | |
| 568 | 568 | if( zIn==0 ) return 0; |
| 569 | 569 | n = strlen(zIn); |
| 570 | 570 | zOut = fossil_malloc( n*2+3 ); |
| 571 | 571 | sqlite3_randomness(1, &salt); |
| 572 | 572 | zOut[n+1] = (char)salt; |
| @@ -578,17 +578,17 @@ | ||
| 578 | 578 | /* |
| 579 | 579 | ** Undo the obscuring of text performed by obscure(). Or, if the input is |
| 580 | 580 | ** not hexadecimal (meaning the input is not the output of obscure()) then |
| 581 | 581 | ** do the equivalent of strdup(). |
| 582 | 582 | ** |
| 583 | -** The result is memory obtained from malloc that should be freed by the caller. | |
| 583 | +** The result is memory obtained from malloc that should be freed by the caller. | |
| 584 | 584 | */ |
| 585 | 585 | char *unobscure(const char *zIn){ |
| 586 | 586 | int n, i; |
| 587 | 587 | unsigned char salt; |
| 588 | 588 | char *zOut; |
| 589 | - | |
| 589 | + | |
| 590 | 590 | if( zIn==0 ) return 0; |
| 591 | 591 | n = strlen(zIn); |
| 592 | 592 | zOut = fossil_malloc( n + 1 ); |
| 593 | 593 | if( n<2 |
| 594 | 594 | || decode16((unsigned char*)zIn, &salt, 2) |
| 595 | 595 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -47,30 +47,30 @@ | |
| 47 | } |
| 48 | i = 0; |
| 49 | zOut = fossil_malloc( count+1 ); |
| 50 | while( n-->0 && (c = *zIn)!=0 ){ |
| 51 | switch( c ){ |
| 52 | case '<': |
| 53 | zOut[i++] = '&'; |
| 54 | zOut[i++] = 'l'; |
| 55 | zOut[i++] = 't'; |
| 56 | zOut[i++] = ';'; |
| 57 | break; |
| 58 | case '>': |
| 59 | zOut[i++] = '&'; |
| 60 | zOut[i++] = 'g'; |
| 61 | zOut[i++] = 't'; |
| 62 | zOut[i++] = ';'; |
| 63 | break; |
| 64 | case '&': |
| 65 | zOut[i++] = '&'; |
| 66 | zOut[i++] = 'a'; |
| 67 | zOut[i++] = 'm'; |
| 68 | zOut[i++] = 'p'; |
| 69 | zOut[i++] = ';'; |
| 70 | break; |
| 71 | case '"': |
| 72 | zOut[i++] = '&'; |
| 73 | zOut[i++] = 'q'; |
| 74 | zOut[i++] = 'u'; |
| 75 | zOut[i++] = 'o'; |
| 76 | zOut[i++] = 't'; |
| @@ -181,11 +181,11 @@ | |
| 181 | /* |
| 182 | ** Convert the input string into a form that is suitable for use as |
| 183 | ** a token in the HTTP protocol. Spaces are encoded as '+' and special |
| 184 | ** characters are encoded as "%HH" where HH is a two-digit hexidecimal |
| 185 | ** representation of the character. The "/" character is not encoded |
| 186 | ** by this routine. |
| 187 | */ |
| 188 | char *urlize(const char *z, int n){ |
| 189 | return EncodeHttp(z, n, 0); |
| 190 | } |
| 191 | |
| @@ -327,11 +327,11 @@ | |
| 327 | |
| 328 | |
| 329 | /* |
| 330 | ** The characters used for HTTP base64 encoding. |
| 331 | */ |
| 332 | static unsigned char zBase[] = |
| 333 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 334 | |
| 335 | /* |
| 336 | ** Encode a string using a base-64 encoding. |
| 337 | ** The encoding can be reversed using the <b>decode64</b> function. |
| @@ -366,11 +366,11 @@ | |
| 366 | z64[n] = 0; |
| 367 | return z64; |
| 368 | } |
| 369 | |
| 370 | /* |
| 371 | ** COMMAND: test-encode64 |
| 372 | ** Usage: %fossil test-encode64 STRING |
| 373 | */ |
| 374 | void test_encode64_cmd(void){ |
| 375 | char *z; |
| 376 | int i; |
| @@ -431,11 +431,11 @@ | |
| 431 | *pnByte = j; |
| 432 | return zData; |
| 433 | } |
| 434 | |
| 435 | /* |
| 436 | ** COMMAND: test-decode64 |
| 437 | ** Usage: %fossil test-decode64 STRING |
| 438 | */ |
| 439 | void test_decode64_cmd(void){ |
| 440 | char *z; |
| 441 | int i, n; |
| @@ -454,11 +454,11 @@ | |
| 454 | */ |
| 455 | |
| 456 | /* |
| 457 | ** The array used for encoding |
| 458 | */ /* 123456789 12345 */ |
| 459 | static const char zEncode[] = "0123456789abcdef"; |
| 460 | |
| 461 | /* |
| 462 | ** Encode a N-digit base-256 in base-16. Return zero on success |
| 463 | ** and non-zero if there is an error. |
| 464 | */ |
| @@ -473,33 +473,33 @@ | |
| 473 | } |
| 474 | |
| 475 | /* |
| 476 | ** An array for translating single base-16 characters into a value. |
| 477 | ** Disallowed input characters have a value of 64. Upper and lower |
| 478 | ** case is the same. |
| 479 | */ |
| 480 | static const char zDecode[] = { |
| 481 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 482 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 483 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 484 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64, |
| 485 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 486 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 487 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 488 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 489 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 490 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 491 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 492 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 493 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 494 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 495 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 496 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 497 | }; |
| 498 | |
| 499 | /* |
| 500 | ** Decode a N-character base-16 number into base-256. N must be a |
| 501 | ** multiple of 2. The output buffer must be at least N/2 characters |
| 502 | ** in length |
| 503 | */ |
| 504 | int decode16(const unsigned char *zIn, unsigned char *pOut, int N){ |
| 505 | int i, j; |
| @@ -545,11 +545,11 @@ | |
| 545 | /* Randomness used for XOR-ing by the obscure() and unobscure() routines */ |
| 546 | static const unsigned char aObscurer[16] = { |
| 547 | 0xa7, 0x21, 0x31, 0xe3, 0x2a, 0x50, 0x2c, 0x86, |
| 548 | 0x4c, 0xa4, 0x52, 0x25, 0xff, 0x49, 0x35, 0x85 |
| 549 | }; |
| 550 | |
| 551 | |
| 552 | /* |
| 553 | ** Obscure plain text so that it is not easily readable. |
| 554 | ** |
| 555 | ** This is used for storing sensitive information (such as passwords) in a |
| @@ -562,11 +562,11 @@ | |
| 562 | */ |
| 563 | char *obscure(const char *zIn){ |
| 564 | int n, i; |
| 565 | unsigned char salt; |
| 566 | char *zOut; |
| 567 | |
| 568 | if( zIn==0 ) return 0; |
| 569 | n = strlen(zIn); |
| 570 | zOut = fossil_malloc( n*2+3 ); |
| 571 | sqlite3_randomness(1, &salt); |
| 572 | zOut[n+1] = (char)salt; |
| @@ -578,17 +578,17 @@ | |
| 578 | /* |
| 579 | ** Undo the obscuring of text performed by obscure(). Or, if the input is |
| 580 | ** not hexadecimal (meaning the input is not the output of obscure()) then |
| 581 | ** do the equivalent of strdup(). |
| 582 | ** |
| 583 | ** The result is memory obtained from malloc that should be freed by the caller. |
| 584 | */ |
| 585 | char *unobscure(const char *zIn){ |
| 586 | int n, i; |
| 587 | unsigned char salt; |
| 588 | char *zOut; |
| 589 | |
| 590 | if( zIn==0 ) return 0; |
| 591 | n = strlen(zIn); |
| 592 | zOut = fossil_malloc( n + 1 ); |
| 593 | if( n<2 |
| 594 | || decode16((unsigned char*)zIn, &salt, 2) |
| 595 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -47,30 +47,30 @@ | |
| 47 | } |
| 48 | i = 0; |
| 49 | zOut = fossil_malloc( count+1 ); |
| 50 | while( n-->0 && (c = *zIn)!=0 ){ |
| 51 | switch( c ){ |
| 52 | case '<': |
| 53 | zOut[i++] = '&'; |
| 54 | zOut[i++] = 'l'; |
| 55 | zOut[i++] = 't'; |
| 56 | zOut[i++] = ';'; |
| 57 | break; |
| 58 | case '>': |
| 59 | zOut[i++] = '&'; |
| 60 | zOut[i++] = 'g'; |
| 61 | zOut[i++] = 't'; |
| 62 | zOut[i++] = ';'; |
| 63 | break; |
| 64 | case '&': |
| 65 | zOut[i++] = '&'; |
| 66 | zOut[i++] = 'a'; |
| 67 | zOut[i++] = 'm'; |
| 68 | zOut[i++] = 'p'; |
| 69 | zOut[i++] = ';'; |
| 70 | break; |
| 71 | case '"': |
| 72 | zOut[i++] = '&'; |
| 73 | zOut[i++] = 'q'; |
| 74 | zOut[i++] = 'u'; |
| 75 | zOut[i++] = 'o'; |
| 76 | zOut[i++] = 't'; |
| @@ -181,11 +181,11 @@ | |
| 181 | /* |
| 182 | ** Convert the input string into a form that is suitable for use as |
| 183 | ** a token in the HTTP protocol. Spaces are encoded as '+' and special |
| 184 | ** characters are encoded as "%HH" where HH is a two-digit hexidecimal |
| 185 | ** representation of the character. The "/" character is not encoded |
| 186 | ** by this routine. |
| 187 | */ |
| 188 | char *urlize(const char *z, int n){ |
| 189 | return EncodeHttp(z, n, 0); |
| 190 | } |
| 191 | |
| @@ -327,11 +327,11 @@ | |
| 327 | |
| 328 | |
| 329 | /* |
| 330 | ** The characters used for HTTP base64 encoding. |
| 331 | */ |
| 332 | static unsigned char zBase[] = |
| 333 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 334 | |
| 335 | /* |
| 336 | ** Encode a string using a base-64 encoding. |
| 337 | ** The encoding can be reversed using the <b>decode64</b> function. |
| @@ -366,11 +366,11 @@ | |
| 366 | z64[n] = 0; |
| 367 | return z64; |
| 368 | } |
| 369 | |
| 370 | /* |
| 371 | ** COMMAND: test-encode64 |
| 372 | ** Usage: %fossil test-encode64 STRING |
| 373 | */ |
| 374 | void test_encode64_cmd(void){ |
| 375 | char *z; |
| 376 | int i; |
| @@ -431,11 +431,11 @@ | |
| 431 | *pnByte = j; |
| 432 | return zData; |
| 433 | } |
| 434 | |
| 435 | /* |
| 436 | ** COMMAND: test-decode64 |
| 437 | ** Usage: %fossil test-decode64 STRING |
| 438 | */ |
| 439 | void test_decode64_cmd(void){ |
| 440 | char *z; |
| 441 | int i, n; |
| @@ -454,11 +454,11 @@ | |
| 454 | */ |
| 455 | |
| 456 | /* |
| 457 | ** The array used for encoding |
| 458 | */ /* 123456789 12345 */ |
| 459 | static const char zEncode[] = "0123456789abcdef"; |
| 460 | |
| 461 | /* |
| 462 | ** Encode a N-digit base-256 in base-16. Return zero on success |
| 463 | ** and non-zero if there is an error. |
| 464 | */ |
| @@ -473,33 +473,33 @@ | |
| 473 | } |
| 474 | |
| 475 | /* |
| 476 | ** An array for translating single base-16 characters into a value. |
| 477 | ** Disallowed input characters have a value of 64. Upper and lower |
| 478 | ** case is the same. |
| 479 | */ |
| 480 | static const char zDecode[] = { |
| 481 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 482 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 483 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 484 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64, |
| 485 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 486 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 487 | 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 488 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 489 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 490 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 491 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 492 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 493 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 494 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 495 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 496 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |
| 497 | }; |
| 498 | |
| 499 | /* |
| 500 | ** Decode a N-character base-16 number into base-256. N must be a |
| 501 | ** multiple of 2. The output buffer must be at least N/2 characters |
| 502 | ** in length |
| 503 | */ |
| 504 | int decode16(const unsigned char *zIn, unsigned char *pOut, int N){ |
| 505 | int i, j; |
| @@ -545,11 +545,11 @@ | |
| 545 | /* Randomness used for XOR-ing by the obscure() and unobscure() routines */ |
| 546 | static const unsigned char aObscurer[16] = { |
| 547 | 0xa7, 0x21, 0x31, 0xe3, 0x2a, 0x50, 0x2c, 0x86, |
| 548 | 0x4c, 0xa4, 0x52, 0x25, 0xff, 0x49, 0x35, 0x85 |
| 549 | }; |
| 550 | |
| 551 | |
| 552 | /* |
| 553 | ** Obscure plain text so that it is not easily readable. |
| 554 | ** |
| 555 | ** This is used for storing sensitive information (such as passwords) in a |
| @@ -562,11 +562,11 @@ | |
| 562 | */ |
| 563 | char *obscure(const char *zIn){ |
| 564 | int n, i; |
| 565 | unsigned char salt; |
| 566 | char *zOut; |
| 567 | |
| 568 | if( zIn==0 ) return 0; |
| 569 | n = strlen(zIn); |
| 570 | zOut = fossil_malloc( n*2+3 ); |
| 571 | sqlite3_randomness(1, &salt); |
| 572 | zOut[n+1] = (char)salt; |
| @@ -578,17 +578,17 @@ | |
| 578 | /* |
| 579 | ** Undo the obscuring of text performed by obscure(). Or, if the input is |
| 580 | ** not hexadecimal (meaning the input is not the output of obscure()) then |
| 581 | ** do the equivalent of strdup(). |
| 582 | ** |
| 583 | ** The result is memory obtained from malloc that should be freed by the caller. |
| 584 | */ |
| 585 | char *unobscure(const char *zIn){ |
| 586 | int n, i; |
| 587 | unsigned char salt; |
| 588 | char *zOut; |
| 589 | |
| 590 | if( zIn==0 ) return 0; |
| 591 | n = strlen(zIn); |
| 592 | zOut = fossil_malloc( n + 1 ); |
| 593 | if( n<2 |
| 594 | || decode16((unsigned char*)zIn, &salt, 2) |
| 595 |
+3
-3
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -505,12 +505,12 @@ | ||
| 505 | 505 | #### The directories where the OpenSSL include and library files are located. |
| 506 | 506 | # The recommended usage here is to use the Sysinternals junction tool |
| 507 | 507 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 508 | 508 | # Fossil source code directory and the target OpenSSL source directory. |
| 509 | 509 | # |
| 510 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include | |
| 511 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i | |
| 510 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include | |
| 511 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j | |
| 512 | 512 | |
| 513 | 513 | #### Either the directory where the Tcl library is installed or the Tcl |
| 514 | 514 | # source code directory resides (depending on the value of the macro |
| 515 | 515 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 516 | 516 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1200,11 +1200,11 @@ | ||
| 1200 | 1200 | |
| 1201 | 1201 | # Uncomment to enable Tcl support |
| 1202 | 1202 | # FOSSIL_ENABLE_TCL = 1 |
| 1203 | 1203 | |
| 1204 | 1204 | !ifdef FOSSIL_ENABLE_SSL |
| 1205 | -SSLDIR = $(B)\compat\openssl-1.0.1i | |
| 1205 | +SSLDIR = $(B)\compat\openssl-1.0.1j | |
| 1206 | 1206 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1207 | 1207 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1208 | 1208 | SSLLFLAGS = /nologo /opt:ref /debug |
| 1209 | 1209 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1210 | 1210 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1211 | 1211 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -505,12 +505,12 @@ | |
| 505 | #### The directories where the OpenSSL include and library files are located. |
| 506 | # The recommended usage here is to use the Sysinternals junction tool |
| 507 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 508 | # Fossil source code directory and the target OpenSSL source directory. |
| 509 | # |
| 510 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include |
| 511 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i |
| 512 | |
| 513 | #### Either the directory where the Tcl library is installed or the Tcl |
| 514 | # source code directory resides (depending on the value of the macro |
| 515 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 516 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1200,11 +1200,11 @@ | |
| 1200 | |
| 1201 | # Uncomment to enable Tcl support |
| 1202 | # FOSSIL_ENABLE_TCL = 1 |
| 1203 | |
| 1204 | !ifdef FOSSIL_ENABLE_SSL |
| 1205 | SSLDIR = $(B)\compat\openssl-1.0.1i |
| 1206 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1207 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1208 | SSLLFLAGS = /nologo /opt:ref /debug |
| 1209 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1210 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1211 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -505,12 +505,12 @@ | |
| 505 | #### The directories where the OpenSSL include and library files are located. |
| 506 | # The recommended usage here is to use the Sysinternals junction tool |
| 507 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 508 | # Fossil source code directory and the target OpenSSL source directory. |
| 509 | # |
| 510 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include |
| 511 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j |
| 512 | |
| 513 | #### Either the directory where the Tcl library is installed or the Tcl |
| 514 | # source code directory resides (depending on the value of the macro |
| 515 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 516 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1200,11 +1200,11 @@ | |
| 1200 | |
| 1201 | # Uncomment to enable Tcl support |
| 1202 | # FOSSIL_ENABLE_TCL = 1 |
| 1203 | |
| 1204 | !ifdef FOSSIL_ENABLE_SSL |
| 1205 | SSLDIR = $(B)\compat\openssl-1.0.1j |
| 1206 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1207 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1208 | SSLLFLAGS = /nologo /opt:ref /debug |
| 1209 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1210 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1211 |
+9
-9
| --- src/path.c | ||
| +++ src/path.c | ||
| @@ -112,11 +112,11 @@ | ||
| 112 | 112 | ** Compute the shortest path from iFrom to iTo |
| 113 | 113 | ** |
| 114 | 114 | ** If directOnly is true, then use only the "primary" links from parent to |
| 115 | 115 | ** child. In other words, ignore merges. |
| 116 | 116 | ** |
| 117 | -** Return a pointer to the beginning of the path (the iFrom node). | |
| 117 | +** Return a pointer to the beginning of the path (the iFrom node). | |
| 118 | 118 | ** Elements of the path can be traversed by following the PathNode.u.pTo |
| 119 | 119 | ** pointer chain. |
| 120 | 120 | ** |
| 121 | 121 | ** Return NULL if no path is found. |
| 122 | 122 | */ |
| @@ -135,25 +135,25 @@ | ||
| 135 | 135 | if( iTo==iFrom ){ |
| 136 | 136 | path.pEnd = path.pStart; |
| 137 | 137 | return path.pStart; |
| 138 | 138 | } |
| 139 | 139 | if( oneWayOnly && directOnly ){ |
| 140 | - db_prepare(&s, | |
| 140 | + db_prepare(&s, | |
| 141 | 141 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim" |
| 142 | 142 | ); |
| 143 | 143 | }else if( oneWayOnly ){ |
| 144 | - db_prepare(&s, | |
| 144 | + db_prepare(&s, | |
| 145 | 145 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 146 | 146 | ); |
| 147 | 147 | }else if( directOnly ){ |
| 148 | - db_prepare(&s, | |
| 148 | + db_prepare(&s, | |
| 149 | 149 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim " |
| 150 | 150 | "UNION ALL " |
| 151 | 151 | "SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim" |
| 152 | 152 | ); |
| 153 | 153 | }else{ |
| 154 | - db_prepare(&s, | |
| 154 | + db_prepare(&s, | |
| 155 | 155 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 156 | 156 | "UNION ALL " |
| 157 | 157 | "SELECT pid, 0 FROM plink WHERE cid=:pid" |
| 158 | 158 | ); |
| 159 | 159 | } |
| @@ -230,11 +230,11 @@ | ||
| 230 | 230 | " WHERE blob.rid=%d AND event.objid=%d AND event.type='ci'", |
| 231 | 231 | p->rid, p->rid); |
| 232 | 232 | fossil_print("%4d: %5d %s", n, p->rid, z); |
| 233 | 233 | fossil_free(z); |
| 234 | 234 | if( p->u.pTo ){ |
| 235 | - fossil_print(" is a %s of\n", | |
| 235 | + fossil_print(" is a %s of\n", | |
| 236 | 236 | p->u.pTo->fromIsParent ? "parent" : "child"); |
| 237 | 237 | }else{ |
| 238 | 238 | fossil_print("\n"); |
| 239 | 239 | } |
| 240 | 240 | } |
| @@ -353,11 +353,11 @@ | ||
| 353 | 353 | /* |
| 354 | 354 | ** Compute all file name changes that occur going from checkin iFrom |
| 355 | 355 | ** to checkin iTo. |
| 356 | 356 | ** |
| 357 | 357 | ** The number of name changes is written into *pnChng. For each name |
| 358 | -** change, two integers are allocated for *piChng. The first is the | |
| 358 | +** change, two integers are allocated for *piChng. The first is the | |
| 359 | 359 | ** filename.fnid for the original name as seen in check-in iFrom and |
| 360 | 360 | ** the second is for new name as it is used in check-in iTo. |
| 361 | 361 | ** |
| 362 | 362 | ** Space to hold *piChng is obtained from fossil_malloc() and should |
| 363 | 363 | ** be released by the caller. |
| @@ -516,11 +516,11 @@ | ||
| 516 | 516 | g.argc -= 2; |
| 517 | 517 | } |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | /* Query to extract all rename operations */ |
| 521 | -static const char zRenameQuery[] = | |
| 521 | +static const char zRenameQuery[] = | |
| 522 | 522 | @ SELECT |
| 523 | 523 | @ datetime(event.mtime), |
| 524 | 524 | @ F.name AS old_name, |
| 525 | 525 | @ T.name AS new_name, |
| 526 | 526 | @ blob.uuid |
| @@ -531,11 +531,11 @@ | ||
| 531 | 531 | @ AND event.objid=mlink.mid |
| 532 | 532 | @ AND event.type='ci' |
| 533 | 533 | @ AND blob.rid=mlink.mid |
| 534 | 534 | @ ORDER BY 1 DESC, 2; |
| 535 | 535 | ; |
| 536 | - | |
| 536 | + | |
| 537 | 537 | /* |
| 538 | 538 | ** WEBPAGE: test-rename-list |
| 539 | 539 | ** |
| 540 | 540 | ** Print a list of all file rename operations throughout history. |
| 541 | 541 | ** This page is intended for for testing purposes only and may change |
| 542 | 542 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -112,11 +112,11 @@ | |
| 112 | ** Compute the shortest path from iFrom to iTo |
| 113 | ** |
| 114 | ** If directOnly is true, then use only the "primary" links from parent to |
| 115 | ** child. In other words, ignore merges. |
| 116 | ** |
| 117 | ** Return a pointer to the beginning of the path (the iFrom node). |
| 118 | ** Elements of the path can be traversed by following the PathNode.u.pTo |
| 119 | ** pointer chain. |
| 120 | ** |
| 121 | ** Return NULL if no path is found. |
| 122 | */ |
| @@ -135,25 +135,25 @@ | |
| 135 | if( iTo==iFrom ){ |
| 136 | path.pEnd = path.pStart; |
| 137 | return path.pStart; |
| 138 | } |
| 139 | if( oneWayOnly && directOnly ){ |
| 140 | db_prepare(&s, |
| 141 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim" |
| 142 | ); |
| 143 | }else if( oneWayOnly ){ |
| 144 | db_prepare(&s, |
| 145 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 146 | ); |
| 147 | }else if( directOnly ){ |
| 148 | db_prepare(&s, |
| 149 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim " |
| 150 | "UNION ALL " |
| 151 | "SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim" |
| 152 | ); |
| 153 | }else{ |
| 154 | db_prepare(&s, |
| 155 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 156 | "UNION ALL " |
| 157 | "SELECT pid, 0 FROM plink WHERE cid=:pid" |
| 158 | ); |
| 159 | } |
| @@ -230,11 +230,11 @@ | |
| 230 | " WHERE blob.rid=%d AND event.objid=%d AND event.type='ci'", |
| 231 | p->rid, p->rid); |
| 232 | fossil_print("%4d: %5d %s", n, p->rid, z); |
| 233 | fossil_free(z); |
| 234 | if( p->u.pTo ){ |
| 235 | fossil_print(" is a %s of\n", |
| 236 | p->u.pTo->fromIsParent ? "parent" : "child"); |
| 237 | }else{ |
| 238 | fossil_print("\n"); |
| 239 | } |
| 240 | } |
| @@ -353,11 +353,11 @@ | |
| 353 | /* |
| 354 | ** Compute all file name changes that occur going from checkin iFrom |
| 355 | ** to checkin iTo. |
| 356 | ** |
| 357 | ** The number of name changes is written into *pnChng. For each name |
| 358 | ** change, two integers are allocated for *piChng. The first is the |
| 359 | ** filename.fnid for the original name as seen in check-in iFrom and |
| 360 | ** the second is for new name as it is used in check-in iTo. |
| 361 | ** |
| 362 | ** Space to hold *piChng is obtained from fossil_malloc() and should |
| 363 | ** be released by the caller. |
| @@ -516,11 +516,11 @@ | |
| 516 | g.argc -= 2; |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /* Query to extract all rename operations */ |
| 521 | static const char zRenameQuery[] = |
| 522 | @ SELECT |
| 523 | @ datetime(event.mtime), |
| 524 | @ F.name AS old_name, |
| 525 | @ T.name AS new_name, |
| 526 | @ blob.uuid |
| @@ -531,11 +531,11 @@ | |
| 531 | @ AND event.objid=mlink.mid |
| 532 | @ AND event.type='ci' |
| 533 | @ AND blob.rid=mlink.mid |
| 534 | @ ORDER BY 1 DESC, 2; |
| 535 | ; |
| 536 | |
| 537 | /* |
| 538 | ** WEBPAGE: test-rename-list |
| 539 | ** |
| 540 | ** Print a list of all file rename operations throughout history. |
| 541 | ** This page is intended for for testing purposes only and may change |
| 542 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -112,11 +112,11 @@ | |
| 112 | ** Compute the shortest path from iFrom to iTo |
| 113 | ** |
| 114 | ** If directOnly is true, then use only the "primary" links from parent to |
| 115 | ** child. In other words, ignore merges. |
| 116 | ** |
| 117 | ** Return a pointer to the beginning of the path (the iFrom node). |
| 118 | ** Elements of the path can be traversed by following the PathNode.u.pTo |
| 119 | ** pointer chain. |
| 120 | ** |
| 121 | ** Return NULL if no path is found. |
| 122 | */ |
| @@ -135,25 +135,25 @@ | |
| 135 | if( iTo==iFrom ){ |
| 136 | path.pEnd = path.pStart; |
| 137 | return path.pStart; |
| 138 | } |
| 139 | if( oneWayOnly && directOnly ){ |
| 140 | db_prepare(&s, |
| 141 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim" |
| 142 | ); |
| 143 | }else if( oneWayOnly ){ |
| 144 | db_prepare(&s, |
| 145 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 146 | ); |
| 147 | }else if( directOnly ){ |
| 148 | db_prepare(&s, |
| 149 | "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim " |
| 150 | "UNION ALL " |
| 151 | "SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim" |
| 152 | ); |
| 153 | }else{ |
| 154 | db_prepare(&s, |
| 155 | "SELECT cid, 1 FROM plink WHERE pid=:pid " |
| 156 | "UNION ALL " |
| 157 | "SELECT pid, 0 FROM plink WHERE cid=:pid" |
| 158 | ); |
| 159 | } |
| @@ -230,11 +230,11 @@ | |
| 230 | " WHERE blob.rid=%d AND event.objid=%d AND event.type='ci'", |
| 231 | p->rid, p->rid); |
| 232 | fossil_print("%4d: %5d %s", n, p->rid, z); |
| 233 | fossil_free(z); |
| 234 | if( p->u.pTo ){ |
| 235 | fossil_print(" is a %s of\n", |
| 236 | p->u.pTo->fromIsParent ? "parent" : "child"); |
| 237 | }else{ |
| 238 | fossil_print("\n"); |
| 239 | } |
| 240 | } |
| @@ -353,11 +353,11 @@ | |
| 353 | /* |
| 354 | ** Compute all file name changes that occur going from checkin iFrom |
| 355 | ** to checkin iTo. |
| 356 | ** |
| 357 | ** The number of name changes is written into *pnChng. For each name |
| 358 | ** change, two integers are allocated for *piChng. The first is the |
| 359 | ** filename.fnid for the original name as seen in check-in iFrom and |
| 360 | ** the second is for new name as it is used in check-in iTo. |
| 361 | ** |
| 362 | ** Space to hold *piChng is obtained from fossil_malloc() and should |
| 363 | ** be released by the caller. |
| @@ -516,11 +516,11 @@ | |
| 516 | g.argc -= 2; |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /* Query to extract all rename operations */ |
| 521 | static const char zRenameQuery[] = |
| 522 | @ SELECT |
| 523 | @ datetime(event.mtime), |
| 524 | @ F.name AS old_name, |
| 525 | @ T.name AS new_name, |
| 526 | @ blob.uuid |
| @@ -531,11 +531,11 @@ | |
| 531 | @ AND event.objid=mlink.mid |
| 532 | @ AND event.type='ci' |
| 533 | @ AND blob.rid=mlink.mid |
| 534 | @ ORDER BY 1 DESC, 2; |
| 535 | ; |
| 536 | |
| 537 | /* |
| 538 | ** WEBPAGE: test-rename-list |
| 539 | ** |
| 540 | ** Print a list of all file rename operations throughout history. |
| 541 | ** This page is intended for for testing purposes only and may change |
| 542 |
+20
-8
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -231,11 +231,11 @@ | ||
| 231 | 231 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 232 | 232 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 233 | 233 | */ |
| 234 | 234 | #define SQLITE_VERSION "3.8.7" |
| 235 | 235 | #define SQLITE_VERSION_NUMBER 3008007 |
| 236 | -#define SQLITE_SOURCE_ID "2014-10-14 20:25:43 eab82330631187dcc3e5d2dddd23dbda5752904b" | |
| 236 | +#define SQLITE_SOURCE_ID "2014-10-15 15:28:27 3c1e70f4d55bc009ed9ed4cf6d756d7061985851" | |
| 237 | 237 | |
| 238 | 238 | /* |
| 239 | 239 | ** CAPI3REF: Run-Time Library Version Numbers |
| 240 | 240 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 241 | 241 | ** |
| @@ -51651,11 +51651,11 @@ | ||
| 51651 | 51651 | int nRef; /* Number of references to this structure */ |
| 51652 | 51652 | BtShared *pNext; /* Next on a list of sharable BtShared structs */ |
| 51653 | 51653 | BtLock *pLock; /* List of locks held on this shared-btree struct */ |
| 51654 | 51654 | Btree *pWriter; /* Btree with currently open write transaction */ |
| 51655 | 51655 | #endif |
| 51656 | - u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */ | |
| 51656 | + u8 *pTmpSpace; /* Temp space sufficient to hold a single cell */ | |
| 51657 | 51657 | }; |
| 51658 | 51658 | |
| 51659 | 51659 | /* |
| 51660 | 51660 | ** Allowed values for BtShared.btsFlags |
| 51661 | 51661 | */ |
| @@ -54281,11 +54281,12 @@ | ||
| 54281 | 54281 | #endif |
| 54282 | 54282 | } |
| 54283 | 54283 | |
| 54284 | 54284 | /* |
| 54285 | 54285 | ** Make sure pBt->pTmpSpace points to an allocation of |
| 54286 | -** MX_CELL_SIZE(pBt) bytes. | |
| 54286 | +** MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child | |
| 54287 | +** pointer. | |
| 54287 | 54288 | */ |
| 54288 | 54289 | static void allocateTempSpace(BtShared *pBt){ |
| 54289 | 54290 | if( !pBt->pTmpSpace ){ |
| 54290 | 54291 | pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize ); |
| 54291 | 54292 | |
| @@ -54296,21 +54297,32 @@ | ||
| 54296 | 54297 | ** can mean that fillInCell() only initializes the first 2 or 3 |
| 54297 | 54298 | ** bytes of pTmpSpace, but that the first 4 bytes are copied from |
| 54298 | 54299 | ** it into a database page. This is not actually a problem, but it |
| 54299 | 54300 | ** does cause a valgrind error when the 1 or 2 bytes of unitialized |
| 54300 | 54301 | ** data is passed to system call write(). So to avoid this error, |
| 54301 | - ** zero the first 4 bytes of temp space here. */ | |
| 54302 | - if( pBt->pTmpSpace ) memset(pBt->pTmpSpace, 0, 4); | |
| 54302 | + ** zero the first 4 bytes of temp space here. | |
| 54303 | + ** | |
| 54304 | + ** Also: Provide four bytes of initialized space before the | |
| 54305 | + ** beginning of pTmpSpace as an area available to prepend the | |
| 54306 | + ** left-child pointer to the beginning of a cell. | |
| 54307 | + */ | |
| 54308 | + if( pBt->pTmpSpace ){ | |
| 54309 | + memset(pBt->pTmpSpace, 0, 8); | |
| 54310 | + pBt->pTmpSpace += 4; | |
| 54311 | + } | |
| 54303 | 54312 | } |
| 54304 | 54313 | } |
| 54305 | 54314 | |
| 54306 | 54315 | /* |
| 54307 | 54316 | ** Free the pBt->pTmpSpace allocation |
| 54308 | 54317 | */ |
| 54309 | 54318 | static void freeTempSpace(BtShared *pBt){ |
| 54310 | - sqlite3PageFree( pBt->pTmpSpace); | |
| 54311 | - pBt->pTmpSpace = 0; | |
| 54319 | + if( pBt->pTmpSpace ){ | |
| 54320 | + pBt->pTmpSpace -= 4; | |
| 54321 | + sqlite3PageFree(pBt->pTmpSpace); | |
| 54322 | + pBt->pTmpSpace = 0; | |
| 54323 | + } | |
| 54312 | 54324 | } |
| 54313 | 54325 | |
| 54314 | 54326 | /* |
| 54315 | 54327 | ** Close an open database and invalidate all cursors. |
| 54316 | 54328 | */ |
| @@ -61738,11 +61750,11 @@ | ||
| 61738 | 61750 | }else{ |
| 61739 | 61751 | pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc); |
| 61740 | 61752 | } |
| 61741 | 61753 | } |
| 61742 | 61754 | |
| 61743 | - if( pMem->z && bPreserve && pMem->z!=pMem->zMalloc ){ | |
| 61755 | + if( bPreserve && pMem->z && pMem->z!=pMem->zMalloc ){ | |
| 61744 | 61756 | memcpy(pMem->zMalloc, pMem->z, pMem->n); |
| 61745 | 61757 | } |
| 61746 | 61758 | if( (pMem->flags&MEM_Dyn)!=0 ){ |
| 61747 | 61759 | assert( pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC ); |
| 61748 | 61760 | pMem->xDel((void *)(pMem->z)); |
| 61749 | 61761 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -231,11 +231,11 @@ | |
| 231 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 232 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 233 | */ |
| 234 | #define SQLITE_VERSION "3.8.7" |
| 235 | #define SQLITE_VERSION_NUMBER 3008007 |
| 236 | #define SQLITE_SOURCE_ID "2014-10-14 20:25:43 eab82330631187dcc3e5d2dddd23dbda5752904b" |
| 237 | |
| 238 | /* |
| 239 | ** CAPI3REF: Run-Time Library Version Numbers |
| 240 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 241 | ** |
| @@ -51651,11 +51651,11 @@ | |
| 51651 | int nRef; /* Number of references to this structure */ |
| 51652 | BtShared *pNext; /* Next on a list of sharable BtShared structs */ |
| 51653 | BtLock *pLock; /* List of locks held on this shared-btree struct */ |
| 51654 | Btree *pWriter; /* Btree with currently open write transaction */ |
| 51655 | #endif |
| 51656 | u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */ |
| 51657 | }; |
| 51658 | |
| 51659 | /* |
| 51660 | ** Allowed values for BtShared.btsFlags |
| 51661 | */ |
| @@ -54281,11 +54281,12 @@ | |
| 54281 | #endif |
| 54282 | } |
| 54283 | |
| 54284 | /* |
| 54285 | ** Make sure pBt->pTmpSpace points to an allocation of |
| 54286 | ** MX_CELL_SIZE(pBt) bytes. |
| 54287 | */ |
| 54288 | static void allocateTempSpace(BtShared *pBt){ |
| 54289 | if( !pBt->pTmpSpace ){ |
| 54290 | pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize ); |
| 54291 | |
| @@ -54296,21 +54297,32 @@ | |
| 54296 | ** can mean that fillInCell() only initializes the first 2 or 3 |
| 54297 | ** bytes of pTmpSpace, but that the first 4 bytes are copied from |
| 54298 | ** it into a database page. This is not actually a problem, but it |
| 54299 | ** does cause a valgrind error when the 1 or 2 bytes of unitialized |
| 54300 | ** data is passed to system call write(). So to avoid this error, |
| 54301 | ** zero the first 4 bytes of temp space here. */ |
| 54302 | if( pBt->pTmpSpace ) memset(pBt->pTmpSpace, 0, 4); |
| 54303 | } |
| 54304 | } |
| 54305 | |
| 54306 | /* |
| 54307 | ** Free the pBt->pTmpSpace allocation |
| 54308 | */ |
| 54309 | static void freeTempSpace(BtShared *pBt){ |
| 54310 | sqlite3PageFree( pBt->pTmpSpace); |
| 54311 | pBt->pTmpSpace = 0; |
| 54312 | } |
| 54313 | |
| 54314 | /* |
| 54315 | ** Close an open database and invalidate all cursors. |
| 54316 | */ |
| @@ -61738,11 +61750,11 @@ | |
| 61738 | }else{ |
| 61739 | pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc); |
| 61740 | } |
| 61741 | } |
| 61742 | |
| 61743 | if( pMem->z && bPreserve && pMem->z!=pMem->zMalloc ){ |
| 61744 | memcpy(pMem->zMalloc, pMem->z, pMem->n); |
| 61745 | } |
| 61746 | if( (pMem->flags&MEM_Dyn)!=0 ){ |
| 61747 | assert( pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC ); |
| 61748 | pMem->xDel((void *)(pMem->z)); |
| 61749 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -231,11 +231,11 @@ | |
| 231 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 232 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 233 | */ |
| 234 | #define SQLITE_VERSION "3.8.7" |
| 235 | #define SQLITE_VERSION_NUMBER 3008007 |
| 236 | #define SQLITE_SOURCE_ID "2014-10-15 15:28:27 3c1e70f4d55bc009ed9ed4cf6d756d7061985851" |
| 237 | |
| 238 | /* |
| 239 | ** CAPI3REF: Run-Time Library Version Numbers |
| 240 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 241 | ** |
| @@ -51651,11 +51651,11 @@ | |
| 51651 | int nRef; /* Number of references to this structure */ |
| 51652 | BtShared *pNext; /* Next on a list of sharable BtShared structs */ |
| 51653 | BtLock *pLock; /* List of locks held on this shared-btree struct */ |
| 51654 | Btree *pWriter; /* Btree with currently open write transaction */ |
| 51655 | #endif |
| 51656 | u8 *pTmpSpace; /* Temp space sufficient to hold a single cell */ |
| 51657 | }; |
| 51658 | |
| 51659 | /* |
| 51660 | ** Allowed values for BtShared.btsFlags |
| 51661 | */ |
| @@ -54281,11 +54281,12 @@ | |
| 54281 | #endif |
| 54282 | } |
| 54283 | |
| 54284 | /* |
| 54285 | ** Make sure pBt->pTmpSpace points to an allocation of |
| 54286 | ** MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child |
| 54287 | ** pointer. |
| 54288 | */ |
| 54289 | static void allocateTempSpace(BtShared *pBt){ |
| 54290 | if( !pBt->pTmpSpace ){ |
| 54291 | pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize ); |
| 54292 | |
| @@ -54296,21 +54297,32 @@ | |
| 54297 | ** can mean that fillInCell() only initializes the first 2 or 3 |
| 54298 | ** bytes of pTmpSpace, but that the first 4 bytes are copied from |
| 54299 | ** it into a database page. This is not actually a problem, but it |
| 54300 | ** does cause a valgrind error when the 1 or 2 bytes of unitialized |
| 54301 | ** data is passed to system call write(). So to avoid this error, |
| 54302 | ** zero the first 4 bytes of temp space here. |
| 54303 | ** |
| 54304 | ** Also: Provide four bytes of initialized space before the |
| 54305 | ** beginning of pTmpSpace as an area available to prepend the |
| 54306 | ** left-child pointer to the beginning of a cell. |
| 54307 | */ |
| 54308 | if( pBt->pTmpSpace ){ |
| 54309 | memset(pBt->pTmpSpace, 0, 8); |
| 54310 | pBt->pTmpSpace += 4; |
| 54311 | } |
| 54312 | } |
| 54313 | } |
| 54314 | |
| 54315 | /* |
| 54316 | ** Free the pBt->pTmpSpace allocation |
| 54317 | */ |
| 54318 | static void freeTempSpace(BtShared *pBt){ |
| 54319 | if( pBt->pTmpSpace ){ |
| 54320 | pBt->pTmpSpace -= 4; |
| 54321 | sqlite3PageFree(pBt->pTmpSpace); |
| 54322 | pBt->pTmpSpace = 0; |
| 54323 | } |
| 54324 | } |
| 54325 | |
| 54326 | /* |
| 54327 | ** Close an open database and invalidate all cursors. |
| 54328 | */ |
| @@ -61738,11 +61750,11 @@ | |
| 61750 | }else{ |
| 61751 | pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc); |
| 61752 | } |
| 61753 | } |
| 61754 | |
| 61755 | if( bPreserve && pMem->z && pMem->z!=pMem->zMalloc ){ |
| 61756 | memcpy(pMem->zMalloc, pMem->z, pMem->n); |
| 61757 | } |
| 61758 | if( (pMem->flags&MEM_Dyn)!=0 ){ |
| 61759 | assert( pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC ); |
| 61760 | pMem->xDel((void *)(pMem->z)); |
| 61761 |
+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.7" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008007 |
| 112 | -#define SQLITE_SOURCE_ID "2014-10-14 20:25:43 eab82330631187dcc3e5d2dddd23dbda5752904b" | |
| 112 | +#define SQLITE_SOURCE_ID "2014-10-15 15:28:27 3c1e70f4d55bc009ed9ed4cf6d756d7061985851" | |
| 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.7" |
| 111 | #define SQLITE_VERSION_NUMBER 3008007 |
| 112 | #define SQLITE_SOURCE_ID "2014-10-14 20:25:43 eab82330631187dcc3e5d2dddd23dbda5752904b" |
| 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.7" |
| 111 | #define SQLITE_VERSION_NUMBER 3008007 |
| 112 | #define SQLITE_SOURCE_ID "2014-10-15 15:28:27 3c1e70f4d55bc009ed9ed4cf6d756d7061985851" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
+3
-3
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -235,13 +235,13 @@ | ||
| 235 | 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | - z = db_text(0, "SELECT datetime(mtime) ||" | |
| 241 | - " printf(' - about %%d days ago ',julianday('now') - mtime)" | |
| 242 | - " FROM event " | |
| 240 | + z = db_text(0, "SELECT datetime(mtime) || ' - about ' ||" | |
| 241 | + " CAST(julianday('now') - mtime AS INTEGER)" | |
| 242 | + " || ' days ago' FROM event " | |
| 243 | 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | 245 | } |
| 246 | 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | 247 | " + 0.99"); |
| 248 | 248 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -235,13 +235,13 @@ | |
| 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | z = db_text(0, "SELECT datetime(mtime) ||" |
| 241 | " printf(' - about %%d days ago ',julianday('now') - mtime)" |
| 242 | " FROM event " |
| 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | } |
| 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | " + 0.99"); |
| 248 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -235,13 +235,13 @@ | |
| 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | z = db_text(0, "SELECT datetime(mtime) || ' - about ' ||" |
| 241 | " CAST(julianday('now') - mtime AS INTEGER)" |
| 242 | " || ' days ago' FROM event " |
| 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | } |
| 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | " + 0.99"); |
| 248 |
+7
-7
| --- src/translate.c | ||
| +++ src/translate.c | ||
| @@ -13,11 +13,11 @@ | ||
| 13 | 13 | ** [email protected] |
| 14 | 14 | ** http://www.hwaci.com/drh/ |
| 15 | 15 | ** |
| 16 | 16 | ******************************************************************************* |
| 17 | 17 | ** |
| 18 | -** SYNOPSIS: | |
| 18 | +** SYNOPSIS: | |
| 19 | 19 | ** |
| 20 | 20 | ** Input lines that begin with the "@" character are translated into |
| 21 | 21 | ** either cgi_printf() statements or string literals and the |
| 22 | 22 | ** translated code is written on standard output. |
| 23 | 23 | ** |
| @@ -34,22 +34,22 @@ | ||
| 34 | 34 | ** punctuation. |
| 35 | 35 | ** |
| 36 | 36 | ** Enhancement #1: |
| 37 | 37 | ** |
| 38 | 38 | ** If the last non-whitespace character prior to the first "@" of a |
| 39 | -** @-block is "=" or "," then the @-block is a string literal initializer | |
| 39 | +** @-block is "=" or "," then the @-block is a string literal initializer | |
| 40 | 40 | ** rather than text that is to be output via cgi_printf(). Render it |
| 41 | 41 | ** as such. |
| 42 | 42 | ** |
| 43 | 43 | ** Enhancement #2: |
| 44 | 44 | ** |
| 45 | -** Comments of the form: "/* @-comment: CC" cause CC to become a | |
| 45 | +** Comments of the form: "/* @-comment: CC" cause CC to become a | |
| 46 | 46 | ** comment character for the @-substitution. Typical values for CC are |
| 47 | 47 | ** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code). |
| 48 | 48 | ** Lines of subsequent @-blocks that begin with CC are omitted from the |
| 49 | 49 | ** output. |
| 50 | -** | |
| 50 | +** | |
| 51 | 51 | */ |
| 52 | 52 | #include <stdio.h> |
| 53 | 53 | #include <ctype.h> |
| 54 | 54 | #include <stdlib.h> |
| 55 | 55 | #include <string.h> |
| @@ -122,11 +122,11 @@ | ||
| 122 | 122 | indent = i - 2; |
| 123 | 123 | if( indent<0 ) indent = 0; |
| 124 | 124 | omitline = 0; |
| 125 | 125 | for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){ |
| 126 | 126 | if( zLine[i]==c1 && (c2==' ' || zLine[i+1]==c2) ){ |
| 127 | - omitline = 1; break; | |
| 127 | + omitline = 1; break; | |
| 128 | 128 | } |
| 129 | 129 | if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; } |
| 130 | 130 | zOut[j++] = zLine[i]; |
| 131 | 131 | } |
| 132 | 132 | while( j>0 && isspace(zOut[j-1]) ){ j--; } |
| @@ -137,11 +137,11 @@ | ||
| 137 | 137 | fprintf(out,"%*s\"%s\\n\"\n",indent, "", zOut); |
| 138 | 138 | } |
| 139 | 139 | }else{ |
| 140 | 140 | /* Otherwise (if the last non-whitespace was not '=') then generate |
| 141 | 141 | ** a cgi_printf() statement whose format is the text following the '@'. |
| 142 | - ** Substrings of the form "%C(...)" (where C is any sequence of | |
| 142 | + ** Substrings of the form "%C(...)" (where C is any sequence of | |
| 143 | 143 | ** characters other than \000 and '(') will put "%C" in the |
| 144 | 144 | ** format and add the "(...)" as an argument to the cgi_printf call. |
| 145 | 145 | */ |
| 146 | 146 | int indent; |
| 147 | 147 | int nC; |
| @@ -174,11 +174,11 @@ | ||
| 174 | 174 | fprintf(out,"%*scgi_printf(\"%s\\n\"",indent-2,"", zOut); |
| 175 | 175 | inPrint = 1; |
| 176 | 176 | }else{ |
| 177 | 177 | fprintf(out,"\n%*s\"%s\\n\"",indent+5, "", zOut); |
| 178 | 178 | } |
| 179 | - } | |
| 179 | + } | |
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | int main(int argc, char **argv){ |
| 184 | 184 | if( argc==2 ){ |
| 185 | 185 |
| --- src/translate.c | |
| +++ src/translate.c | |
| @@ -13,11 +13,11 @@ | |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** SYNOPSIS: |
| 19 | ** |
| 20 | ** Input lines that begin with the "@" character are translated into |
| 21 | ** either cgi_printf() statements or string literals and the |
| 22 | ** translated code is written on standard output. |
| 23 | ** |
| @@ -34,22 +34,22 @@ | |
| 34 | ** punctuation. |
| 35 | ** |
| 36 | ** Enhancement #1: |
| 37 | ** |
| 38 | ** If the last non-whitespace character prior to the first "@" of a |
| 39 | ** @-block is "=" or "," then the @-block is a string literal initializer |
| 40 | ** rather than text that is to be output via cgi_printf(). Render it |
| 41 | ** as such. |
| 42 | ** |
| 43 | ** Enhancement #2: |
| 44 | ** |
| 45 | ** Comments of the form: "/* @-comment: CC" cause CC to become a |
| 46 | ** comment character for the @-substitution. Typical values for CC are |
| 47 | ** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code). |
| 48 | ** Lines of subsequent @-blocks that begin with CC are omitted from the |
| 49 | ** output. |
| 50 | ** |
| 51 | */ |
| 52 | #include <stdio.h> |
| 53 | #include <ctype.h> |
| 54 | #include <stdlib.h> |
| 55 | #include <string.h> |
| @@ -122,11 +122,11 @@ | |
| 122 | indent = i - 2; |
| 123 | if( indent<0 ) indent = 0; |
| 124 | omitline = 0; |
| 125 | for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){ |
| 126 | if( zLine[i]==c1 && (c2==' ' || zLine[i+1]==c2) ){ |
| 127 | omitline = 1; break; |
| 128 | } |
| 129 | if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; } |
| 130 | zOut[j++] = zLine[i]; |
| 131 | } |
| 132 | while( j>0 && isspace(zOut[j-1]) ){ j--; } |
| @@ -137,11 +137,11 @@ | |
| 137 | fprintf(out,"%*s\"%s\\n\"\n",indent, "", zOut); |
| 138 | } |
| 139 | }else{ |
| 140 | /* Otherwise (if the last non-whitespace was not '=') then generate |
| 141 | ** a cgi_printf() statement whose format is the text following the '@'. |
| 142 | ** Substrings of the form "%C(...)" (where C is any sequence of |
| 143 | ** characters other than \000 and '(') will put "%C" in the |
| 144 | ** format and add the "(...)" as an argument to the cgi_printf call. |
| 145 | */ |
| 146 | int indent; |
| 147 | int nC; |
| @@ -174,11 +174,11 @@ | |
| 174 | fprintf(out,"%*scgi_printf(\"%s\\n\"",indent-2,"", zOut); |
| 175 | inPrint = 1; |
| 176 | }else{ |
| 177 | fprintf(out,"\n%*s\"%s\\n\"",indent+5, "", zOut); |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | int main(int argc, char **argv){ |
| 184 | if( argc==2 ){ |
| 185 |
| --- src/translate.c | |
| +++ src/translate.c | |
| @@ -13,11 +13,11 @@ | |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** SYNOPSIS: |
| 19 | ** |
| 20 | ** Input lines that begin with the "@" character are translated into |
| 21 | ** either cgi_printf() statements or string literals and the |
| 22 | ** translated code is written on standard output. |
| 23 | ** |
| @@ -34,22 +34,22 @@ | |
| 34 | ** punctuation. |
| 35 | ** |
| 36 | ** Enhancement #1: |
| 37 | ** |
| 38 | ** If the last non-whitespace character prior to the first "@" of a |
| 39 | ** @-block is "=" or "," then the @-block is a string literal initializer |
| 40 | ** rather than text that is to be output via cgi_printf(). Render it |
| 41 | ** as such. |
| 42 | ** |
| 43 | ** Enhancement #2: |
| 44 | ** |
| 45 | ** Comments of the form: "/* @-comment: CC" cause CC to become a |
| 46 | ** comment character for the @-substitution. Typical values for CC are |
| 47 | ** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code). |
| 48 | ** Lines of subsequent @-blocks that begin with CC are omitted from the |
| 49 | ** output. |
| 50 | ** |
| 51 | */ |
| 52 | #include <stdio.h> |
| 53 | #include <ctype.h> |
| 54 | #include <stdlib.h> |
| 55 | #include <string.h> |
| @@ -122,11 +122,11 @@ | |
| 122 | indent = i - 2; |
| 123 | if( indent<0 ) indent = 0; |
| 124 | omitline = 0; |
| 125 | for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){ |
| 126 | if( zLine[i]==c1 && (c2==' ' || zLine[i+1]==c2) ){ |
| 127 | omitline = 1; break; |
| 128 | } |
| 129 | if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; } |
| 130 | zOut[j++] = zLine[i]; |
| 131 | } |
| 132 | while( j>0 && isspace(zOut[j-1]) ){ j--; } |
| @@ -137,11 +137,11 @@ | |
| 137 | fprintf(out,"%*s\"%s\\n\"\n",indent, "", zOut); |
| 138 | } |
| 139 | }else{ |
| 140 | /* Otherwise (if the last non-whitespace was not '=') then generate |
| 141 | ** a cgi_printf() statement whose format is the text following the '@'. |
| 142 | ** Substrings of the form "%C(...)" (where C is any sequence of |
| 143 | ** characters other than \000 and '(') will put "%C" in the |
| 144 | ** format and add the "(...)" as an argument to the cgi_printf call. |
| 145 | */ |
| 146 | int indent; |
| 147 | int nC; |
| @@ -174,11 +174,11 @@ | |
| 174 | fprintf(out,"%*scgi_printf(\"%s\\n\"",indent-2,"", zOut); |
| 175 | inPrint = 1; |
| 176 | }else{ |
| 177 | fprintf(out,"\n%*s\"%s\\n\"",indent+5, "", zOut); |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | int main(int argc, char **argv){ |
| 184 | if( argc==2 ){ |
| 185 |
+9
-5
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -31,11 +31,15 @@ | ||
| 31 | 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | 33 | #endif |
| 34 | 34 | |
| 35 | 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | -# define LABEL_SECURITY_INFORMATION (0x00000010L) | |
| 36 | +# define LABEL_SECURITY_INFORMATION (0x00000010L) | |
| 37 | +#endif | |
| 38 | + | |
| 39 | +#ifndef FSCTL_GET_REPARSE_POINT | |
| 40 | +# define FSCTL_GET_REPARSE_POINT (((0x00000009) << 16) | ((0x00000000) << 14) | ((42) << 2) | (0)) | |
| 37 | 41 | #endif |
| 38 | 42 | |
| 39 | 43 | #if defined(__MSVCRT__) |
| 40 | 44 | static HANDLE dllhandle = NULL; |
| 41 | 45 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | ||
| 52 | 56 | ** this structure copied on 20 Sept 2014 from |
| 53 | 57 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 54 | 58 | ** which is a public domain file from the ReactOS DDK package. |
| 55 | 59 | */ |
| 56 | 60 | |
| 57 | -typedef struct _REPARSE_DATA_BUFFER { | |
| 61 | +typedef struct { | |
| 58 | 62 | ULONG ReparseTag; |
| 59 | 63 | USHORT ReparseDataLength; |
| 60 | 64 | USHORT Reserved; |
| 61 | 65 | _ANONYMOUS_UNION union { |
| 62 | 66 | struct { |
| @@ -76,11 +80,11 @@ | ||
| 76 | 80 | } MountPointReparseBuffer; |
| 77 | 81 | struct { |
| 78 | 82 | UCHAR DataBuffer[1]; |
| 79 | 83 | } GenericReparseBuffer; |
| 80 | 84 | } DUMMYUNIONNAME; |
| 81 | -} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; | |
| 85 | +} FOSSIL_REPARSE_DATA_BUFFER; | |
| 82 | 86 | |
| 83 | 87 | #define LINK_BUFFER_SIZE 1024 |
| 84 | 88 | |
| 85 | 89 | static int isVistaOrLater(){ |
| 86 | 90 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | ||
| 205 | 209 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 206 | 210 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 207 | 211 | |
| 208 | 212 | /* use DeviceIoControl to get the reparse point data */ |
| 209 | 213 | |
| 210 | - int data_size = sizeof(REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); | |
| 211 | - REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); | |
| 214 | + int data_size = sizeof(FOSSIL_REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); | |
| 215 | + FOSSIL_REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); | |
| 212 | 216 | DWORD data_used; |
| 213 | 217 | |
| 214 | 218 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 215 | 219 | data->ReparseDataLength = 0; |
| 216 | 220 | data->Reserved = 0; |
| 217 | 221 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -31,11 +31,15 @@ | |
| 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | #endif |
| 34 | |
| 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | # define LABEL_SECURITY_INFORMATION (0x00000010L) |
| 37 | #endif |
| 38 | |
| 39 | #if defined(__MSVCRT__) |
| 40 | static HANDLE dllhandle = NULL; |
| 41 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | |
| 52 | ** this structure copied on 20 Sept 2014 from |
| 53 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 54 | ** which is a public domain file from the ReactOS DDK package. |
| 55 | */ |
| 56 | |
| 57 | typedef struct _REPARSE_DATA_BUFFER { |
| 58 | ULONG ReparseTag; |
| 59 | USHORT ReparseDataLength; |
| 60 | USHORT Reserved; |
| 61 | _ANONYMOUS_UNION union { |
| 62 | struct { |
| @@ -76,11 +80,11 @@ | |
| 76 | } MountPointReparseBuffer; |
| 77 | struct { |
| 78 | UCHAR DataBuffer[1]; |
| 79 | } GenericReparseBuffer; |
| 80 | } DUMMYUNIONNAME; |
| 81 | } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; |
| 82 | |
| 83 | #define LINK_BUFFER_SIZE 1024 |
| 84 | |
| 85 | static int isVistaOrLater(){ |
| 86 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | |
| 205 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 206 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 207 | |
| 208 | /* use DeviceIoControl to get the reparse point data */ |
| 209 | |
| 210 | int data_size = sizeof(REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); |
| 211 | REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); |
| 212 | DWORD data_used; |
| 213 | |
| 214 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 215 | data->ReparseDataLength = 0; |
| 216 | data->Reserved = 0; |
| 217 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -31,11 +31,15 @@ | |
| 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | #endif |
| 34 | |
| 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | # define LABEL_SECURITY_INFORMATION (0x00000010L) |
| 37 | #endif |
| 38 | |
| 39 | #ifndef FSCTL_GET_REPARSE_POINT |
| 40 | # define FSCTL_GET_REPARSE_POINT (((0x00000009) << 16) | ((0x00000000) << 14) | ((42) << 2) | (0)) |
| 41 | #endif |
| 42 | |
| 43 | #if defined(__MSVCRT__) |
| 44 | static HANDLE dllhandle = NULL; |
| 45 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | |
| 56 | ** this structure copied on 20 Sept 2014 from |
| 57 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 58 | ** which is a public domain file from the ReactOS DDK package. |
| 59 | */ |
| 60 | |
| 61 | typedef struct { |
| 62 | ULONG ReparseTag; |
| 63 | USHORT ReparseDataLength; |
| 64 | USHORT Reserved; |
| 65 | _ANONYMOUS_UNION union { |
| 66 | struct { |
| @@ -76,11 +80,11 @@ | |
| 80 | } MountPointReparseBuffer; |
| 81 | struct { |
| 82 | UCHAR DataBuffer[1]; |
| 83 | } GenericReparseBuffer; |
| 84 | } DUMMYUNIONNAME; |
| 85 | } FOSSIL_REPARSE_DATA_BUFFER; |
| 86 | |
| 87 | #define LINK_BUFFER_SIZE 1024 |
| 88 | |
| 89 | static int isVistaOrLater(){ |
| 90 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | |
| 209 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 210 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 211 | |
| 212 | /* use DeviceIoControl to get the reparse point data */ |
| 213 | |
| 214 | int data_size = sizeof(FOSSIL_REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); |
| 215 | FOSSIL_REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); |
| 216 | DWORD data_used; |
| 217 | |
| 218 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 219 | data->ReparseDataLength = 0; |
| 220 | data->Reserved = 0; |
| 221 |
+9
-5
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -31,11 +31,15 @@ | ||
| 31 | 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | 33 | #endif |
| 34 | 34 | |
| 35 | 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | -# define LABEL_SECURITY_INFORMATION (0x00000010L) | |
| 36 | +# define LABEL_SECURITY_INFORMATION (0x00000010L) | |
| 37 | +#endif | |
| 38 | + | |
| 39 | +#ifndef FSCTL_GET_REPARSE_POINT | |
| 40 | +# define FSCTL_GET_REPARSE_POINT (((0x00000009) << 16) | ((0x00000000) << 14) | ((42) << 2) | (0)) | |
| 37 | 41 | #endif |
| 38 | 42 | |
| 39 | 43 | #if defined(__MSVCRT__) |
| 40 | 44 | static HANDLE dllhandle = NULL; |
| 41 | 45 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | ||
| 52 | 56 | ** this structure copied on 20 Sept 2014 from |
| 53 | 57 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 54 | 58 | ** which is a public domain file from the ReactOS DDK package. |
| 55 | 59 | */ |
| 56 | 60 | |
| 57 | -typedef struct _REPARSE_DATA_BUFFER { | |
| 61 | +typedef struct { | |
| 58 | 62 | ULONG ReparseTag; |
| 59 | 63 | USHORT ReparseDataLength; |
| 60 | 64 | USHORT Reserved; |
| 61 | 65 | _ANONYMOUS_UNION union { |
| 62 | 66 | struct { |
| @@ -76,11 +80,11 @@ | ||
| 76 | 80 | } MountPointReparseBuffer; |
| 77 | 81 | struct { |
| 78 | 82 | UCHAR DataBuffer[1]; |
| 79 | 83 | } GenericReparseBuffer; |
| 80 | 84 | } DUMMYUNIONNAME; |
| 81 | -} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; | |
| 85 | +} FOSSIL_REPARSE_DATA_BUFFER; | |
| 82 | 86 | |
| 83 | 87 | #define LINK_BUFFER_SIZE 1024 |
| 84 | 88 | |
| 85 | 89 | static int isVistaOrLater(){ |
| 86 | 90 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | ||
| 205 | 209 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 206 | 210 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 207 | 211 | |
| 208 | 212 | /* use DeviceIoControl to get the reparse point data */ |
| 209 | 213 | |
| 210 | - int data_size = sizeof(REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); | |
| 211 | - REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); | |
| 214 | + int data_size = sizeof(FOSSIL_REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); | |
| 215 | + FOSSIL_REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); | |
| 212 | 216 | DWORD data_used; |
| 213 | 217 | |
| 214 | 218 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 215 | 219 | data->ReparseDataLength = 0; |
| 216 | 220 | data->Reserved = 0; |
| 217 | 221 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -31,11 +31,15 @@ | |
| 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | #endif |
| 34 | |
| 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | # define LABEL_SECURITY_INFORMATION (0x00000010L) |
| 37 | #endif |
| 38 | |
| 39 | #if defined(__MSVCRT__) |
| 40 | static HANDLE dllhandle = NULL; |
| 41 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | |
| 52 | ** this structure copied on 20 Sept 2014 from |
| 53 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 54 | ** which is a public domain file from the ReactOS DDK package. |
| 55 | */ |
| 56 | |
| 57 | typedef struct _REPARSE_DATA_BUFFER { |
| 58 | ULONG ReparseTag; |
| 59 | USHORT ReparseDataLength; |
| 60 | USHORT Reserved; |
| 61 | _ANONYMOUS_UNION union { |
| 62 | struct { |
| @@ -76,11 +80,11 @@ | |
| 76 | } MountPointReparseBuffer; |
| 77 | struct { |
| 78 | UCHAR DataBuffer[1]; |
| 79 | } GenericReparseBuffer; |
| 80 | } DUMMYUNIONNAME; |
| 81 | } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; |
| 82 | |
| 83 | #define LINK_BUFFER_SIZE 1024 |
| 84 | |
| 85 | static int isVistaOrLater(){ |
| 86 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | |
| 205 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 206 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 207 | |
| 208 | /* use DeviceIoControl to get the reparse point data */ |
| 209 | |
| 210 | int data_size = sizeof(REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); |
| 211 | REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); |
| 212 | DWORD data_used; |
| 213 | |
| 214 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 215 | data->ReparseDataLength = 0; |
| 216 | data->Reserved = 0; |
| 217 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -31,11 +31,15 @@ | |
| 31 | #if !defined(SYMBOLIC_LINK_FLAG_DIRECTORY) |
| 32 | # define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
| 33 | #endif |
| 34 | |
| 35 | #ifndef LABEL_SECURITY_INFORMATION |
| 36 | # define LABEL_SECURITY_INFORMATION (0x00000010L) |
| 37 | #endif |
| 38 | |
| 39 | #ifndef FSCTL_GET_REPARSE_POINT |
| 40 | # define FSCTL_GET_REPARSE_POINT (((0x00000009) << 16) | ((0x00000000) << 14) | ((42) << 2) | (0)) |
| 41 | #endif |
| 42 | |
| 43 | #if defined(__MSVCRT__) |
| 44 | static HANDLE dllhandle = NULL; |
| 45 | static DWORD WINAPI (*getFinalPathNameByHandleW) (HANDLE, LPWSTR, DWORD, DWORD) = NULL; |
| @@ -52,11 +56,11 @@ | |
| 56 | ** this structure copied on 20 Sept 2014 from |
| 57 | ** https://reactos-mirror.googlecode.com/svn-history/r54752/branches/usb-bringup/include/ddk/ntifs.h |
| 58 | ** which is a public domain file from the ReactOS DDK package. |
| 59 | */ |
| 60 | |
| 61 | typedef struct { |
| 62 | ULONG ReparseTag; |
| 63 | USHORT ReparseDataLength; |
| 64 | USHORT Reserved; |
| 65 | _ANONYMOUS_UNION union { |
| 66 | struct { |
| @@ -76,11 +80,11 @@ | |
| 80 | } MountPointReparseBuffer; |
| 81 | struct { |
| 82 | UCHAR DataBuffer[1]; |
| 83 | } GenericReparseBuffer; |
| 84 | } DUMMYUNIONNAME; |
| 85 | } FOSSIL_REPARSE_DATA_BUFFER; |
| 86 | |
| 87 | #define LINK_BUFFER_SIZE 1024 |
| 88 | |
| 89 | static int isVistaOrLater(){ |
| 90 | if( !dllhandle ){ |
| @@ -205,12 +209,12 @@ | |
| 209 | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); |
| 210 | if( (file != NULL) && (file != INVALID_HANDLE_VALUE) ){ |
| 211 | |
| 212 | /* use DeviceIoControl to get the reparse point data */ |
| 213 | |
| 214 | int data_size = sizeof(FOSSIL_REPARSE_DATA_BUFFER) + LINK_BUFFER_SIZE * sizeof(wchar_t); |
| 215 | FOSSIL_REPARSE_DATA_BUFFER* data = fossil_malloc(data_size); |
| 216 | DWORD data_used; |
| 217 | |
| 218 | data->ReparseTag = IO_REPARSE_TAG_SYMLINK; |
| 219 | data->ReparseDataLength = 0; |
| 220 | data->Reserved = 0; |
| 221 |
+2
-2
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -113,12 +113,12 @@ | ||
| 113 | 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | 117 | # |
| 118 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include | |
| 119 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i | |
| 118 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include | |
| 119 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j | |
| 120 | 120 | |
| 121 | 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | 122 | # source code directory resides (depending on the value of the macro |
| 123 | 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 | 125 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -113,12 +113,12 @@ | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | # |
| 118 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include |
| 119 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i |
| 120 | |
| 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | # source code directory resides (depending on the value of the macro |
| 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -113,12 +113,12 @@ | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | # |
| 118 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include |
| 119 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j |
| 120 | |
| 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | # source code directory resides (depending on the value of the macro |
| 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 |
+2
-2
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -113,12 +113,12 @@ | ||
| 113 | 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | 117 | # |
| 118 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include | |
| 119 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i | |
| 118 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include | |
| 119 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j | |
| 120 | 120 | |
| 121 | 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | 122 | # source code directory resides (depending on the value of the macro |
| 123 | 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 | 125 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -113,12 +113,12 @@ | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | # |
| 118 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1i/include |
| 119 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1i |
| 120 | |
| 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | # source code directory resides (depending on the value of the macro |
| 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -113,12 +113,12 @@ | |
| 113 | #### The directories where the OpenSSL include and library files are located. |
| 114 | # The recommended usage here is to use the Sysinternals junction tool |
| 115 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 116 | # Fossil source code directory and the target OpenSSL source directory. |
| 117 | # |
| 118 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1j/include |
| 119 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1j |
| 120 | |
| 121 | #### Either the directory where the Tcl library is installed or the Tcl |
| 122 | # source code directory resides (depending on the value of the macro |
| 123 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 124 | # this directory must have "include" and "lib" sub-directories. If |
| 125 |
+1
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -55,11 +55,11 @@ | ||
| 55 | 55 | |
| 56 | 56 | # Uncomment to enable Tcl support |
| 57 | 57 | # FOSSIL_ENABLE_TCL = 1 |
| 58 | 58 | |
| 59 | 59 | !ifdef FOSSIL_ENABLE_SSL |
| 60 | -SSLDIR = $(B)\compat\openssl-1.0.1i | |
| 60 | +SSLDIR = $(B)\compat\openssl-1.0.1j | |
| 61 | 61 | SSLINCDIR = $(SSLDIR)\inc32 |
| 62 | 62 | SSLLIBDIR = $(SSLDIR)\out32 |
| 63 | 63 | SSLLFLAGS = /nologo /opt:ref /debug |
| 64 | 64 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 65 | 65 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 66 | 66 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -55,11 +55,11 @@ | |
| 55 | |
| 56 | # Uncomment to enable Tcl support |
| 57 | # FOSSIL_ENABLE_TCL = 1 |
| 58 | |
| 59 | !ifdef FOSSIL_ENABLE_SSL |
| 60 | SSLDIR = $(B)\compat\openssl-1.0.1i |
| 61 | SSLINCDIR = $(SSLDIR)\inc32 |
| 62 | SSLLIBDIR = $(SSLDIR)\out32 |
| 63 | SSLLFLAGS = /nologo /opt:ref /debug |
| 64 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 65 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 66 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -55,11 +55,11 @@ | |
| 55 | |
| 56 | # Uncomment to enable Tcl support |
| 57 | # FOSSIL_ENABLE_TCL = 1 |
| 58 | |
| 59 | !ifdef FOSSIL_ENABLE_SSL |
| 60 | SSLDIR = $(B)\compat\openssl-1.0.1j |
| 61 | SSLINCDIR = $(SSLDIR)\inc32 |
| 62 | SSLLIBDIR = $(SSLDIR)\out32 |
| 63 | SSLLFLAGS = /nologo /opt:ref /debug |
| 64 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 65 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 66 |
+1
-1
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -122,11 +122,11 @@ | ||
| 122 | 122 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 123 | 123 | first <a href="https://www.openssl.org/source/">download the official |
| 124 | 124 | source code for OpenSSL</a> and extract it to an appropriately named |
| 125 | 125 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 126 | 126 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 127 | -"<b>compat/openssl-1.0.1i</b>"), then make sure that some recent | |
| 127 | +"<b>compat/openssl-1.0.1j</b>"), then make sure that some recent | |
| 128 | 128 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 129 | 129 | and finally run one of the following commands: |
| 130 | 130 | <blockquote><pre> |
| 131 | 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 132 | 132 | </pre></blockquote> |
| 133 | 133 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -122,11 +122,11 @@ | |
| 122 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 123 | first <a href="https://www.openssl.org/source/">download the official |
| 124 | source code for OpenSSL</a> and extract it to an appropriately named |
| 125 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 126 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 127 | "<b>compat/openssl-1.0.1i</b>"), then make sure that some recent |
| 128 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 129 | and finally run one of the following commands: |
| 130 | <blockquote><pre> |
| 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 132 | </pre></blockquote> |
| 133 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -122,11 +122,11 @@ | |
| 122 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 123 | first <a href="https://www.openssl.org/source/">download the official |
| 124 | source code for OpenSSL</a> and extract it to an appropriately named |
| 125 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 126 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 127 | "<b>compat/openssl-1.0.1j</b>"), then make sure that some recent |
| 128 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 129 | and finally run one of the following commands: |
| 130 | <blockquote><pre> |
| 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 132 | </pre></blockquote> |
| 133 |