Fossil SCM

Reduce the number of end-of-line spaces. No functional change.

jan.nijtmans 2014-10-16 11:45 trunk
Commit 20d02ab7502e662fa955bde0f6456dda5c02a3bf
+9 -9
--- src/cache.c
+++ src/cache.c
@@ -61,11 +61,11 @@
6161
fossil_free(zDbName);
6262
if( rc ){
6363
sqlite3_close(db);
6464
return 0;
6565
}
66
- rc = sqlite3_exec(db,
66
+ rc = sqlite3_exec(db,
6767
"PRAGMA page_size=8192;"
6868
"CREATE TABLE IF NOT EXISTS blob(id INTEGER PRIMARY KEY, data BLOB);"
6969
"CREATE TABLE IF NOT EXISTS cache("
7070
"key TEXT PRIMARY KEY," /* Key used to access the cache */
7171
"id INT REFERENCES blob," /* The cache content */
@@ -94,11 +94,11 @@
9494
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
9595
if( rc ){
9696
sqlite3_finalize(pStmt);
9797
pStmt = 0;
9898
}
99
- return pStmt;
99
+ return pStmt;
100100
}
101101
102102
/*
103103
** This routine implements an SQL function that renders a large integer
104104
** compactly: ex: 12.3MB
@@ -153,11 +153,11 @@
153153
if( pStmt==0 ) goto cache_write_end;
154154
sqlite3_bind_blob(pStmt, 1, blob_buffer(pContent), blob_size(pContent),
155155
SQLITE_STATIC);
156156
if( sqlite3_step(pStmt)!=SQLITE_DONE ) goto cache_write_end;
157157
sqlite3_finalize(pStmt);
158
- pStmt = cacheStmt(db,
158
+ pStmt = cacheStmt(db,
159159
"INSERT OR IGNORE INTO cache(key,sz,tm,nref,id)"
160160
"VALUES(?1,?2,strftime('%s','now'),1,?3)"
161161
);
162162
if( pStmt==0 ) goto cache_write_end;
163163
sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC);
@@ -202,27 +202,27 @@
202202
203203
db = cacheOpen(0);
204204
if( db==0 ) return 0;
205205
sqlite3_busy_timeout(db, 10000);
206206
sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, 0);
207
- pStmt = cacheStmt(db,
207
+ pStmt = cacheStmt(db,
208208
"SELECT blob.data FROM cache, blob"
209209
" WHERE cache.key=?1 AND cache.id=blob.id");
210210
if( pStmt==0 ) goto cache_read_done;
211211
sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC);
212212
if( sqlite3_step(pStmt)==SQLITE_ROW ){
213213
blob_append(pContent, sqlite3_column_blob(pStmt, 0),
214214
sqlite3_column_bytes(pStmt, 0));
215215
rc = 1;
216216
sqlite3_reset(pStmt);
217
- pStmt = cacheStmt(db,
217
+ pStmt = cacheStmt(db,
218218
"UPDATE cache SET nref=nref+1, tm=strftime('%s','now')"
219219
" WHERE key=?1");
220220
if( pStmt ){
221221
sqlite3_bind_text(pStmt, 1, zKey, -1, SQLITE_STATIC);
222222
sqlite3_step(pStmt);
223
- }
223
+ }
224224
}
225225
sqlite3_finalize(pStmt);
226226
cache_read_done:
227227
sqlite3_exec(db, "COMMIT", 0, 0, 0);
228228
sqlite3_close(db);
@@ -256,11 +256,11 @@
256256
sqlite3_stmt *pStmt;
257257
258258
db_find_and_open_repository(0,0);
259259
zCmd = g.argc>=3 ? g.argv[2] : "";
260260
nCmd = (int)strlen(zCmd);
261
- if( nCmd<=1 ){
261
+ if( nCmd<=1 ){
262262
fossil_fatal("Usage: %s cache SUBCOMMAND", g.argv[0]);
263263
}
264264
if( strncmp(zCmd, "init", nCmd)==0 ){
265265
db = cacheOpen(0);
266266
sqlite3_close(db);
@@ -290,11 +290,11 @@
290290
fossil_print("cache does not exist\n");
291291
}else{
292292
int nEntry = 0;
293293
char *zDbName = cacheName();
294294
cache_register_sizename(db);
295
- pStmt = cacheStmt(db,
295
+ pStmt = cacheStmt(db,
296296
"SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')"
297297
" FROM cache"
298298
" ORDER BY tm DESC"
299299
);
300300
if( pStmt ){
@@ -338,11 +338,11 @@
338338
if( db==0 ){
339339
@ The web-page cache is disabled for this repository
340340
}else{
341341
char *zDbName = cacheName();
342342
cache_register_sizename(db);
343
- pStmt = cacheStmt(db,
343
+ pStmt = cacheStmt(db,
344344
"SELECT key, sizename(sz), nRef, datetime(tm,'unixepoch')"
345345
" FROM cache"
346346
" ORDER BY tm DESC"
347347
);
348348
if( pStmt ){
349349
--- 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 @@
6565
** The "u32" type must be an unsigned 32-bit integer. Adjust this
6666
*/
6767
typedef unsigned int u32;
6868
6969
/*
70
-** Must be a 16-bit value
70
+** Must be a 16-bit value
7171
*/
7272
typedef short int s16;
7373
typedef unsigned short int u16;
7474
7575
#endif /* INTERFACE */
@@ -82,11 +82,11 @@
8282
8383
/*
8484
** The current state of the rolling hash.
8585
**
8686
** 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
8888
** the window.
8989
**
9090
** Hash.a is the sum of all elements of hash.z[]. Hash.b is a weighted
9191
** sum. Hash.b is z[i]*NHASH + z[i+1]*(NHASH-1) + ... + z[i+NHASH-1]*1.
9292
** (Each index for z[] should be module NHASH, of course. The %NHASH operator
@@ -135,11 +135,11 @@
135135
136136
/*
137137
** Write an base-64 integer into the given buffer.
138138
*/
139139
static void putInt(unsigned int v, char **pz){
140
- static const char zDigits[] =
140
+ static const char zDigits[] =
141141
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~";
142142
/* 123456789 123456789 123456789 123456789 123456789 123456789 123 */
143143
int i, j;
144144
char zBuf[20];
145145
if( v==0 ){
@@ -229,11 +229,11 @@
229229
}
230230
231231
/*
232232
** Create a new delta.
233233
**
234
-** The delta is written into a preallocated buffer, zDelta, which
234
+** The delta is written into a preallocated buffer, zDelta, which
235235
** should be at least 60 bytes longer than the target file, zOut.
236236
** The delta string will be NUL-terminated, but it might also contain
237237
** embedded NUL characters if either the zSrc or zOut files are
238238
** binary. This function returns the length of the delta string
239239
** in bytes, excluding the final NUL terminator character.
@@ -245,11 +245,11 @@
245245
** delta file z, a program can compute the size of the output file
246246
** simply by reading the first line and decoding the base-64 number
247247
** found there. The delta_output_size() routine does exactly this.
248248
**
249249
** 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.
251251
** A copy command looks like this:
252252
**
253253
** NNN@MMM,
254254
**
255255
** where NNN is the number of bytes to be copied and MMM is the offset
@@ -283,11 +283,11 @@
283283
** search for a matching section in the source file. When a match
284284
** is found, a copy command is added to the delta. An effort is
285285
** made to extend the matching section to regions that come before
286286
** and after the 16-byte hash window. A copy command is only issued
287287
** 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
289289
** do not match or which can not be encoded efficiently using copy
290290
** commands.
291291
*/
292292
int delta_create(
293293
const char *zSrc, /* The source or pattern file */
@@ -356,13 +356,13 @@
356356
hv = hash_32bit(&h) % nHash;
357357
DEBUG2( printf("LOOKING: %4d [%s]\n", base+i, print16(&zOut[base+i])); )
358358
iBlock = landmark[hv];
359359
while( iBlock>=0 && (limit--)>0 ){
360360
/*
361
- ** The hash window has identified a potential match against
361
+ ** The hash window has identified a potential match against
362362
** landmark block iBlock. But we need to investigate further.
363
- **
363
+ **
364364
** Look for a region in zOut that matches zSrc. Anchor the search
365365
** at zSrc[iSrc] and zOut[base+i]. Do not include anything prior to
366366
** zOut[base] or after zOut[outLen] nor anything after zSrc[srcLen].
367367
**
368368
** Set cnt equal to the length of the match and set ofst so that
@@ -468,16 +468,16 @@
468468
}
469469
/* Output the final checksum record. */
470470
putInt(checksum(zOut, lenOut), &zDelta);
471471
*(zDelta++) = ';';
472472
fossil_free(collide);
473
- return zDelta - zOrigDelta;
473
+ return zDelta - zOrigDelta;
474474
}
475475
476476
/*
477477
** Return the size (in bytes) of the output from applying
478
-** a delta.
478
+** a delta.
479479
**
480480
** This routine is provided so that an procedure that is able
481481
** to call delta_apply() can learn how much space is required
482482
** for the output and hence allocate nor more space that is really
483483
** needed.
484484
--- 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 @@
2626
** Try to guess the mimetype from content.
2727
**
2828
** If the content is pure text, return NULL.
2929
**
3030
** 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".
3232
**
3333
** For any other binary type, return "unknown/unknown".
3434
*/
3535
const char *mimetype_from_content(Blob *pBlob){
3636
int i;
@@ -83,11 +83,11 @@
8383
int i;
8484
int first, last;
8585
int len;
8686
char zSuffix[20];
8787
88
- /* A table of mimetypes based on file suffixes.
88
+ /* A table of mimetypes based on file suffixes.
8989
** Suffixes must be in sorted order so that we can do a binary
9090
** search to find the mime-type
9191
*/
9292
static const struct {
9393
const char *zSuffix; /* The file suffix */
@@ -487,11 +487,11 @@
487487
db_end_transaction(0);
488488
}
489489
blob_to_utf8_no_bom(&filebody, 0);
490490
491491
/* The file is now contained in the filebody blob. Deliver the
492
- ** file to the user
492
+ ** file to the user
493493
*/
494494
zMime = P("mimetype");
495495
if( zMime==0 ){
496496
zMime = mimetype_from_name(zName);
497497
}
@@ -546,79 +546,79 @@
546546
/* Jump here when unable to locate the document */
547547
db_end_transaction(0);
548548
style_header("Document Not Found");
549549
@ <p>No such document: %h(zName)</p>
550550
style_footer();
551
- return;
551
+ return;
552552
}
553553
554554
/*
555555
** The default logo.
556556
*/
557557
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,
620620
};
621621
622622
/*
623623
** WEBPAGE: logo
624624
**
625625
--- 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 @@
4747
}
4848
i = 0;
4949
zOut = fossil_malloc( count+1 );
5050
while( n-->0 && (c = *zIn)!=0 ){
5151
switch( c ){
52
- case '<':
52
+ case '<':
5353
zOut[i++] = '&';
5454
zOut[i++] = 'l';
5555
zOut[i++] = 't';
5656
zOut[i++] = ';';
5757
break;
58
- case '>':
58
+ case '>':
5959
zOut[i++] = '&';
6060
zOut[i++] = 'g';
6161
zOut[i++] = 't';
6262
zOut[i++] = ';';
6363
break;
64
- case '&':
64
+ case '&':
6565
zOut[i++] = '&';
6666
zOut[i++] = 'a';
6767
zOut[i++] = 'm';
6868
zOut[i++] = 'p';
6969
zOut[i++] = ';';
7070
break;
71
- case '"':
71
+ case '"':
7272
zOut[i++] = '&';
7373
zOut[i++] = 'q';
7474
zOut[i++] = 'u';
7575
zOut[i++] = 'o';
7676
zOut[i++] = 't';
@@ -181,11 +181,11 @@
181181
/*
182182
** Convert the input string into a form that is suitable for use as
183183
** a token in the HTTP protocol. Spaces are encoded as '+' and special
184184
** characters are encoded as "%HH" where HH is a two-digit hexidecimal
185185
** representation of the character. The "/" character is not encoded
186
-** by this routine.
186
+** by this routine.
187187
*/
188188
char *urlize(const char *z, int n){
189189
return EncodeHttp(z, n, 0);
190190
}
191191
@@ -327,11 +327,11 @@
327327
328328
329329
/*
330330
** The characters used for HTTP base64 encoding.
331331
*/
332
-static unsigned char zBase[] =
332
+static unsigned char zBase[] =
333333
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
334334
335335
/*
336336
** Encode a string using a base-64 encoding.
337337
** The encoding can be reversed using the <b>decode64</b> function.
@@ -366,11 +366,11 @@
366366
z64[n] = 0;
367367
return z64;
368368
}
369369
370370
/*
371
-** COMMAND: test-encode64
371
+** COMMAND: test-encode64
372372
** Usage: %fossil test-encode64 STRING
373373
*/
374374
void test_encode64_cmd(void){
375375
char *z;
376376
int i;
@@ -431,11 +431,11 @@
431431
*pnByte = j;
432432
return zData;
433433
}
434434
435435
/*
436
-** COMMAND: test-decode64
436
+** COMMAND: test-decode64
437437
** Usage: %fossil test-decode64 STRING
438438
*/
439439
void test_decode64_cmd(void){
440440
char *z;
441441
int i, n;
@@ -454,11 +454,11 @@
454454
*/
455455
456456
/*
457457
** The array used for encoding
458458
*/ /* 123456789 12345 */
459
-static const char zEncode[] = "0123456789abcdef";
459
+static const char zEncode[] = "0123456789abcdef";
460460
461461
/*
462462
** Encode a N-digit base-256 in base-16. Return zero on success
463463
** and non-zero if there is an error.
464464
*/
@@ -473,33 +473,33 @@
473473
}
474474
475475
/*
476476
** An array for translating single base-16 characters into a value.
477477
** Disallowed input characters have a value of 64. Upper and lower
478
-** case is the same.
478
+** case is the same.
479479
*/
480480
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,
485485
64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
486486
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
487487
64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
488488
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,
497497
};
498498
499499
/*
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
501501
** multiple of 2. The output buffer must be at least N/2 characters
502502
** in length
503503
*/
504504
int decode16(const unsigned char *zIn, unsigned char *pOut, int N){
505505
int i, j;
@@ -545,11 +545,11 @@
545545
/* Randomness used for XOR-ing by the obscure() and unobscure() routines */
546546
static const unsigned char aObscurer[16] = {
547547
0xa7, 0x21, 0x31, 0xe3, 0x2a, 0x50, 0x2c, 0x86,
548548
0x4c, 0xa4, 0x52, 0x25, 0xff, 0x49, 0x35, 0x85
549549
};
550
-
550
+
551551
552552
/*
553553
** Obscure plain text so that it is not easily readable.
554554
**
555555
** This is used for storing sensitive information (such as passwords) in a
@@ -562,11 +562,11 @@
562562
*/
563563
char *obscure(const char *zIn){
564564
int n, i;
565565
unsigned char salt;
566566
char *zOut;
567
-
567
+
568568
if( zIn==0 ) return 0;
569569
n = strlen(zIn);
570570
zOut = fossil_malloc( n*2+3 );
571571
sqlite3_randomness(1, &salt);
572572
zOut[n+1] = (char)salt;
@@ -578,17 +578,17 @@
578578
/*
579579
** Undo the obscuring of text performed by obscure(). Or, if the input is
580580
** not hexadecimal (meaning the input is not the output of obscure()) then
581581
** do the equivalent of strdup().
582582
**
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.
584584
*/
585585
char *unobscure(const char *zIn){
586586
int n, i;
587587
unsigned char salt;
588588
char *zOut;
589
-
589
+
590590
if( zIn==0 ) return 0;
591591
n = strlen(zIn);
592592
zOut = fossil_malloc( n + 1 );
593593
if( n<2
594594
|| decode16((unsigned char*)zIn, &salt, 2)
595595
--- 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
+9 -9
--- src/path.c
+++ src/path.c
@@ -112,11 +112,11 @@
112112
** Compute the shortest path from iFrom to iTo
113113
**
114114
** If directOnly is true, then use only the "primary" links from parent to
115115
** child. In other words, ignore merges.
116116
**
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).
118118
** Elements of the path can be traversed by following the PathNode.u.pTo
119119
** pointer chain.
120120
**
121121
** Return NULL if no path is found.
122122
*/
@@ -135,25 +135,25 @@
135135
if( iTo==iFrom ){
136136
path.pEnd = path.pStart;
137137
return path.pStart;
138138
}
139139
if( oneWayOnly && directOnly ){
140
- db_prepare(&s,
140
+ db_prepare(&s,
141141
"SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim"
142142
);
143143
}else if( oneWayOnly ){
144
- db_prepare(&s,
144
+ db_prepare(&s,
145145
"SELECT cid, 1 FROM plink WHERE pid=:pid "
146146
);
147147
}else if( directOnly ){
148
- db_prepare(&s,
148
+ db_prepare(&s,
149149
"SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim "
150150
"UNION ALL "
151151
"SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim"
152152
);
153153
}else{
154
- db_prepare(&s,
154
+ db_prepare(&s,
155155
"SELECT cid, 1 FROM plink WHERE pid=:pid "
156156
"UNION ALL "
157157
"SELECT pid, 0 FROM plink WHERE cid=:pid"
158158
);
159159
}
@@ -230,11 +230,11 @@
230230
" WHERE blob.rid=%d AND event.objid=%d AND event.type='ci'",
231231
p->rid, p->rid);
232232
fossil_print("%4d: %5d %s", n, p->rid, z);
233233
fossil_free(z);
234234
if( p->u.pTo ){
235
- fossil_print(" is a %s of\n",
235
+ fossil_print(" is a %s of\n",
236236
p->u.pTo->fromIsParent ? "parent" : "child");
237237
}else{
238238
fossil_print("\n");
239239
}
240240
}
@@ -353,11 +353,11 @@
353353
/*
354354
** Compute all file name changes that occur going from checkin iFrom
355355
** to checkin iTo.
356356
**
357357
** 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
359359
** filename.fnid for the original name as seen in check-in iFrom and
360360
** the second is for new name as it is used in check-in iTo.
361361
**
362362
** Space to hold *piChng is obtained from fossil_malloc() and should
363363
** be released by the caller.
@@ -516,11 +516,11 @@
516516
g.argc -= 2;
517517
}
518518
}
519519
520520
/* Query to extract all rename operations */
521
-static const char zRenameQuery[] =
521
+static const char zRenameQuery[] =
522522
@ SELECT
523523
@ datetime(event.mtime),
524524
@ F.name AS old_name,
525525
@ T.name AS new_name,
526526
@ blob.uuid
@@ -531,11 +531,11 @@
531531
@ AND event.objid=mlink.mid
532532
@ AND event.type='ci'
533533
@ AND blob.rid=mlink.mid
534534
@ ORDER BY 1 DESC, 2;
535535
;
536
-
536
+
537537
/*
538538
** WEBPAGE: test-rename-list
539539
**
540540
** Print a list of all file rename operations throughout history.
541541
** This page is intended for for testing purposes only and may change
542542
--- 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
+7 -7
--- src/translate.c
+++ src/translate.c
@@ -13,11 +13,11 @@
1313
** [email protected]
1414
** http://www.hwaci.com/drh/
1515
**
1616
*******************************************************************************
1717
**
18
-** SYNOPSIS:
18
+** SYNOPSIS:
1919
**
2020
** Input lines that begin with the "@" character are translated into
2121
** either cgi_printf() statements or string literals and the
2222
** translated code is written on standard output.
2323
**
@@ -34,22 +34,22 @@
3434
** punctuation.
3535
**
3636
** Enhancement #1:
3737
**
3838
** 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
4040
** rather than text that is to be output via cgi_printf(). Render it
4141
** as such.
4242
**
4343
** Enhancement #2:
4444
**
45
-** Comments of the form: "/* @-comment: CC" cause CC to become a
45
+** Comments of the form: "/* @-comment: CC" cause CC to become a
4646
** comment character for the @-substitution. Typical values for CC are
4747
** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code).
4848
** Lines of subsequent @-blocks that begin with CC are omitted from the
4949
** output.
50
-**
50
+**
5151
*/
5252
#include <stdio.h>
5353
#include <ctype.h>
5454
#include <stdlib.h>
5555
#include <string.h>
@@ -122,11 +122,11 @@
122122
indent = i - 2;
123123
if( indent<0 ) indent = 0;
124124
omitline = 0;
125125
for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){
126126
if( zLine[i]==c1 && (c2==' ' || zLine[i+1]==c2) ){
127
- omitline = 1; break;
127
+ omitline = 1; break;
128128
}
129129
if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; }
130130
zOut[j++] = zLine[i];
131131
}
132132
while( j>0 && isspace(zOut[j-1]) ){ j--; }
@@ -137,11 +137,11 @@
137137
fprintf(out,"%*s\"%s\\n\"\n",indent, "", zOut);
138138
}
139139
}else{
140140
/* Otherwise (if the last non-whitespace was not '=') then generate
141141
** 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
143143
** characters other than \000 and '(') will put "%C" in the
144144
** format and add the "(...)" as an argument to the cgi_printf call.
145145
*/
146146
int indent;
147147
int nC;
@@ -174,11 +174,11 @@
174174
fprintf(out,"%*scgi_printf(\"%s\\n\"",indent-2,"", zOut);
175175
inPrint = 1;
176176
}else{
177177
fprintf(out,"\n%*s\"%s\\n\"",indent+5, "", zOut);
178178
}
179
- }
179
+ }
180180
}
181181
}
182182
183183
int main(int argc, char **argv){
184184
if( argc==2 ){
185185
--- 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

Keyboard Shortcuts

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