Fossil SCM

Remove unnecessary end-of-line spaces. (My editor does that automatically, but I don't want it to happen together with other functional changes in a single commit). No change in code.

jan.nijtmans 2014-01-27 09:05 trunk
Commit 52b35c8b401f303177469153798ffa2d112a42e2
+1 -1
--- src/bag.c
+++ src/bag.c
@@ -75,11 +75,11 @@
7575
/*
7676
** Change the size of the hash table on a bag so that
7777
** it contains N slots
7878
**
7979
** Completely reconstruct the hash table from scratch. Deleted
80
-** entries (indicated by a -1) are removed. When finished, it
80
+** entries (indicated by a -1) are removed. When finished, it
8181
** should be the case that p->cnt==p->used.
8282
*/
8383
static void bag_resize(Bag *p, int newSize){
8484
int i;
8585
Bag old;
8686
--- src/bag.c
+++ src/bag.c
@@ -75,11 +75,11 @@
75 /*
76 ** Change the size of the hash table on a bag so that
77 ** it contains N slots
78 **
79 ** Completely reconstruct the hash table from scratch. Deleted
80 ** entries (indicated by a -1) are removed. When finished, it
81 ** should be the case that p->cnt==p->used.
82 */
83 static void bag_resize(Bag *p, int newSize){
84 int i;
85 Bag old;
86
--- src/bag.c
+++ src/bag.c
@@ -75,11 +75,11 @@
75 /*
76 ** Change the size of the hash table on a bag so that
77 ** it contains N slots
78 **
79 ** Completely reconstruct the hash table from scratch. Deleted
80 ** entries (indicated by a -1) are removed. When finished, it
81 ** should be the case that p->cnt==p->used.
82 */
83 static void bag_resize(Bag *p, int newSize){
84 int i;
85 Bag old;
86
+1 -1
--- src/bisect.c
+++ src/bisect.c
@@ -370,11 +370,11 @@
370370
g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid);
371371
g.argc = 3;
372372
g.fNoSync = 1;
373373
update_cmd();
374374
}
375
-
375
+
376376
if( strncmp(zDisplay,"chart",m)==0 ){
377377
bisect_chart(1);
378378
}else if( strncmp(zDisplay, "log", m)==0 ){
379379
bisect_chart(0);
380380
}else if( strncmp(zDisplay, "status", m)==0 ){
381381
--- src/bisect.c
+++ src/bisect.c
@@ -370,11 +370,11 @@
370 g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid);
371 g.argc = 3;
372 g.fNoSync = 1;
373 update_cmd();
374 }
375
376 if( strncmp(zDisplay,"chart",m)==0 ){
377 bisect_chart(1);
378 }else if( strncmp(zDisplay, "log", m)==0 ){
379 bisect_chart(0);
380 }else if( strncmp(zDisplay, "status", m)==0 ){
381
--- src/bisect.c
+++ src/bisect.c
@@ -370,11 +370,11 @@
370 g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid);
371 g.argc = 3;
372 g.fNoSync = 1;
373 update_cmd();
374 }
375
376 if( strncmp(zDisplay,"chart",m)==0 ){
377 bisect_chart(1);
378 }else if( strncmp(zDisplay, "log", m)==0 ){
379 bisect_chart(0);
380 }else if( strncmp(zDisplay, "status", m)==0 ){
381
+20 -20
--- src/captcha.c
+++ src/captcha.c
@@ -92,11 +92,11 @@
9292
z[k++] = ' ';
9393
}
9494
z[k++] = '\n';
9595
}
9696
z[k] = 0;
97
- return z;
97
+ return z;
9898
}
9999
#endif /* CAPTCHA==1 */
100100
101101
102102
#if CAPTCHA==2
@@ -148,11 +148,11 @@
148148
"|__ |",
149149
" / / ",
150150
" /_/ ",
151151
152152
/* 8 */
153
- " ___ ",
153
+ " ___ ",
154154
"( _ )",
155155
"/ _ \\",
156156
"\\___/",
157157
158158
/* 9 */
@@ -218,11 +218,11 @@
218218
}
219219
}
220220
z[k++] = '\n';
221221
}
222222
z[k] = 0;
223
- return z;
223
+ return z;
224224
}
225225
#endif /* CAPTCHA==2 */
226226
227227
#if CAPTCHA==3
228228
static const char *const azFont3[] = {
@@ -231,123 +231,123 @@
231231
" / _ \\ ",
232232
"| | | |",
233233
"| | | |",
234234
"| |_| |",
235235
" \\___/ ",
236
-
236
+
237237
/* 1 */
238238
" __ ",
239239
"/_ |",
240240
" | |",
241241
" | |",
242242
" | |",
243243
" |_|",
244
-
244
+
245245
/* 2 */
246246
" ___ ",
247247
"|__ \\ ",
248248
" ) |",
249249
" / / ",
250250
" / /_ ",
251251
"|____|",
252
-
252
+
253253
/* 3 */
254254
" ____ ",
255255
"|___ \\ ",
256256
" __) |",
257257
" |__ < ",
258258
" ___) |",
259259
"|____/ ",
260
-
260
+
261261
/* 4 */
262262
" _ _ ",
263263
"| || | ",
264264
"| || |_ ",
265265
"|__ _|",
266266
" | | ",
267267
" |_| ",
268
-
268
+
269269
/* 5 */
270270
" _____ ",
271271
"| ____|",
272272
"| |__ ",
273273
"|___ \\ ",
274274
" ___) |",
275275
"|____/ ",
276
-
276
+
277277
/* 6 */
278278
" __ ",
279279
" / / ",
280280
" / /_ ",
281281
"| '_ \\ ",
282282
"| (_) |",
283283
" \\___/ ",
284
-
284
+
285285
/* 7 */
286286
" ______ ",
287287
"|____ |",
288288
" / / ",
289289
" / / ",
290290
" / / ",
291291
" /_/ ",
292
-
292
+
293293
/* 8 */
294294
" ___ ",
295295
" / _ \\ ",
296296
"| (_) |",
297297
" > _ < ",
298298
"| (_) |",
299299
" \\___/ ",
300
-
300
+
301301
/* 9 */
302302
" ___ ",
303303
" / _ \\ ",
304304
"| (_) |",
305305
" \\__, |",
306306
" / / ",
307307
" /_/ ",
308
-
308
+
309309
/* A */
310310
" ",
311311
" /\\ ",
312312
" / \\ ",
313313
" / /\\ \\ ",
314314
" / ____ \\ ",
315315
"/_/ \\_\\",
316
-
316
+
317317
/* B */
318318
" ____ ",
319319
"| _ \\ ",
320320
"| |_) |",
321321
"| _ < ",
322322
"| |_) |",
323323
"|____/ ",
324
-
324
+
325325
/* C */
326326
" _____ ",
327327
" / ____|",
328328
"| | ",
329329
"| | ",
330330
"| |____ ",
331331
" \\_____|",
332
-
332
+
333333
/* D */
334334
" _____ ",
335335
"| __ \\ ",
336336
"| | | |",
337337
"| | | |",
338338
"| |__| |",
339339
"|_____/ ",
340
-
340
+
341341
/* E */
342342
" ______ ",
343343
"| ____|",
344344
"| |__ ",
345345
"| __| ",
346346
"| |____ ",
347347
"|______|",
348
-
348
+
349349
/* F */
350350
" ______ ",
351351
"| ____|",
352352
"| |__ ",
353353
"| __| ",
@@ -408,11 +408,11 @@
408408
}
409409
}
410410
z[k++] = '\n';
411411
}
412412
z[k] = 0;
413
- return z;
413
+ return z;
414414
}
415415
#endif /* CAPTCHA==3 */
416416
417417
/*
418418
** COMMAND: test-captcha
@@ -478,11 +478,11 @@
478478
** Return true if a CAPTCHA is required for editing wiki or tickets or for
479479
** adding attachments.
480480
**
481481
** A CAPTCHA is required in those cases if the user is not logged in (if they
482482
** are user "nobody") and if the "require-captcha" setting is true. The
483
-** "require-captcha" setting is controlled on the Admin/Access page. It
483
+** "require-captcha" setting is controlled on the Admin/Access page. It
484484
** defaults to true.
485485
*/
486486
int captcha_needed(void){
487487
if( g.zLogin!=0 ) return 0;
488488
return db_get_boolean("require-captcha", 1);
489489
--- src/captcha.c
+++ src/captcha.c
@@ -92,11 +92,11 @@
92 z[k++] = ' ';
93 }
94 z[k++] = '\n';
95 }
96 z[k] = 0;
97 return z;
98 }
99 #endif /* CAPTCHA==1 */
100
101
102 #if CAPTCHA==2
@@ -148,11 +148,11 @@
148 "|__ |",
149 " / / ",
150 " /_/ ",
151
152 /* 8 */
153 " ___ ",
154 "( _ )",
155 "/ _ \\",
156 "\\___/",
157
158 /* 9 */
@@ -218,11 +218,11 @@
218 }
219 }
220 z[k++] = '\n';
221 }
222 z[k] = 0;
223 return z;
224 }
225 #endif /* CAPTCHA==2 */
226
227 #if CAPTCHA==3
228 static const char *const azFont3[] = {
@@ -231,123 +231,123 @@
231 " / _ \\ ",
232 "| | | |",
233 "| | | |",
234 "| |_| |",
235 " \\___/ ",
236
237 /* 1 */
238 " __ ",
239 "/_ |",
240 " | |",
241 " | |",
242 " | |",
243 " |_|",
244
245 /* 2 */
246 " ___ ",
247 "|__ \\ ",
248 " ) |",
249 " / / ",
250 " / /_ ",
251 "|____|",
252
253 /* 3 */
254 " ____ ",
255 "|___ \\ ",
256 " __) |",
257 " |__ < ",
258 " ___) |",
259 "|____/ ",
260
261 /* 4 */
262 " _ _ ",
263 "| || | ",
264 "| || |_ ",
265 "|__ _|",
266 " | | ",
267 " |_| ",
268
269 /* 5 */
270 " _____ ",
271 "| ____|",
272 "| |__ ",
273 "|___ \\ ",
274 " ___) |",
275 "|____/ ",
276
277 /* 6 */
278 " __ ",
279 " / / ",
280 " / /_ ",
281 "| '_ \\ ",
282 "| (_) |",
283 " \\___/ ",
284
285 /* 7 */
286 " ______ ",
287 "|____ |",
288 " / / ",
289 " / / ",
290 " / / ",
291 " /_/ ",
292
293 /* 8 */
294 " ___ ",
295 " / _ \\ ",
296 "| (_) |",
297 " > _ < ",
298 "| (_) |",
299 " \\___/ ",
300
301 /* 9 */
302 " ___ ",
303 " / _ \\ ",
304 "| (_) |",
305 " \\__, |",
306 " / / ",
307 " /_/ ",
308
309 /* A */
310 " ",
311 " /\\ ",
312 " / \\ ",
313 " / /\\ \\ ",
314 " / ____ \\ ",
315 "/_/ \\_\\",
316
317 /* B */
318 " ____ ",
319 "| _ \\ ",
320 "| |_) |",
321 "| _ < ",
322 "| |_) |",
323 "|____/ ",
324
325 /* C */
326 " _____ ",
327 " / ____|",
328 "| | ",
329 "| | ",
330 "| |____ ",
331 " \\_____|",
332
333 /* D */
334 " _____ ",
335 "| __ \\ ",
336 "| | | |",
337 "| | | |",
338 "| |__| |",
339 "|_____/ ",
340
341 /* E */
342 " ______ ",
343 "| ____|",
344 "| |__ ",
345 "| __| ",
346 "| |____ ",
347 "|______|",
348
349 /* F */
350 " ______ ",
351 "| ____|",
352 "| |__ ",
353 "| __| ",
@@ -408,11 +408,11 @@
408 }
409 }
410 z[k++] = '\n';
411 }
412 z[k] = 0;
413 return z;
414 }
415 #endif /* CAPTCHA==3 */
416
417 /*
418 ** COMMAND: test-captcha
@@ -478,11 +478,11 @@
478 ** Return true if a CAPTCHA is required for editing wiki or tickets or for
479 ** adding attachments.
480 **
481 ** A CAPTCHA is required in those cases if the user is not logged in (if they
482 ** are user "nobody") and if the "require-captcha" setting is true. The
483 ** "require-captcha" setting is controlled on the Admin/Access page. It
484 ** defaults to true.
485 */
486 int captcha_needed(void){
487 if( g.zLogin!=0 ) return 0;
488 return db_get_boolean("require-captcha", 1);
489
--- src/captcha.c
+++ src/captcha.c
@@ -92,11 +92,11 @@
92 z[k++] = ' ';
93 }
94 z[k++] = '\n';
95 }
96 z[k] = 0;
97 return z;
98 }
99 #endif /* CAPTCHA==1 */
100
101
102 #if CAPTCHA==2
@@ -148,11 +148,11 @@
148 "|__ |",
149 " / / ",
150 " /_/ ",
151
152 /* 8 */
153 " ___ ",
154 "( _ )",
155 "/ _ \\",
156 "\\___/",
157
158 /* 9 */
@@ -218,11 +218,11 @@
218 }
219 }
220 z[k++] = '\n';
221 }
222 z[k] = 0;
223 return z;
224 }
225 #endif /* CAPTCHA==2 */
226
227 #if CAPTCHA==3
228 static const char *const azFont3[] = {
@@ -231,123 +231,123 @@
231 " / _ \\ ",
232 "| | | |",
233 "| | | |",
234 "| |_| |",
235 " \\___/ ",
236
237 /* 1 */
238 " __ ",
239 "/_ |",
240 " | |",
241 " | |",
242 " | |",
243 " |_|",
244
245 /* 2 */
246 " ___ ",
247 "|__ \\ ",
248 " ) |",
249 " / / ",
250 " / /_ ",
251 "|____|",
252
253 /* 3 */
254 " ____ ",
255 "|___ \\ ",
256 " __) |",
257 " |__ < ",
258 " ___) |",
259 "|____/ ",
260
261 /* 4 */
262 " _ _ ",
263 "| || | ",
264 "| || |_ ",
265 "|__ _|",
266 " | | ",
267 " |_| ",
268
269 /* 5 */
270 " _____ ",
271 "| ____|",
272 "| |__ ",
273 "|___ \\ ",
274 " ___) |",
275 "|____/ ",
276
277 /* 6 */
278 " __ ",
279 " / / ",
280 " / /_ ",
281 "| '_ \\ ",
282 "| (_) |",
283 " \\___/ ",
284
285 /* 7 */
286 " ______ ",
287 "|____ |",
288 " / / ",
289 " / / ",
290 " / / ",
291 " /_/ ",
292
293 /* 8 */
294 " ___ ",
295 " / _ \\ ",
296 "| (_) |",
297 " > _ < ",
298 "| (_) |",
299 " \\___/ ",
300
301 /* 9 */
302 " ___ ",
303 " / _ \\ ",
304 "| (_) |",
305 " \\__, |",
306 " / / ",
307 " /_/ ",
308
309 /* A */
310 " ",
311 " /\\ ",
312 " / \\ ",
313 " / /\\ \\ ",
314 " / ____ \\ ",
315 "/_/ \\_\\",
316
317 /* B */
318 " ____ ",
319 "| _ \\ ",
320 "| |_) |",
321 "| _ < ",
322 "| |_) |",
323 "|____/ ",
324
325 /* C */
326 " _____ ",
327 " / ____|",
328 "| | ",
329 "| | ",
330 "| |____ ",
331 " \\_____|",
332
333 /* D */
334 " _____ ",
335 "| __ \\ ",
336 "| | | |",
337 "| | | |",
338 "| |__| |",
339 "|_____/ ",
340
341 /* E */
342 " ______ ",
343 "| ____|",
344 "| |__ ",
345 "| __| ",
346 "| |____ ",
347 "|______|",
348
349 /* F */
350 " ______ ",
351 "| ____|",
352 "| |__ ",
353 "| __| ",
@@ -408,11 +408,11 @@
408 }
409 }
410 z[k++] = '\n';
411 }
412 z[k] = 0;
413 return z;
414 }
415 #endif /* CAPTCHA==3 */
416
417 /*
418 ** COMMAND: test-captcha
@@ -478,11 +478,11 @@
478 ** Return true if a CAPTCHA is required for editing wiki or tickets or for
479 ** adding attachments.
480 **
481 ** A CAPTCHA is required in those cases if the user is not logged in (if they
482 ** are user "nobody") and if the "require-captcha" setting is true. The
483 ** "require-captcha" setting is controlled on the Admin/Access page. It
484 ** defaults to true.
485 */
486 int captcha_needed(void){
487 if( g.zLogin!=0 ) return 0;
488 return db_get_boolean("require-captcha", 1);
489
+15 -15
--- src/content.c
+++ src/content.c
@@ -114,11 +114,11 @@
114114
contentCache.n = 0;
115115
contentCache.szTotal = 0;
116116
}
117117
118118
/*
119
-** Return the srcid associated with rid. Or return 0 if rid is
119
+** Return the srcid associated with rid. Or return 0 if rid is
120120
** original content and not a delta.
121121
*/
122122
static int findSrcid(int rid){
123123
static Stmt q;
124124
int srcid;
@@ -154,11 +154,11 @@
154154
** a phantom.
155155
*/
156156
int content_is_available(int rid){
157157
int srcid;
158158
int depth = 0; /* Limit to recursion depth */
159
- while( depth++ < 10000000 ){
159
+ while( depth++ < 10000000 ){
160160
if( bag_find(&contentCache.missing, rid) ){
161161
return 0;
162162
}
163163
if( bag_find(&contentCache.available, rid) ){
164164
return 1;
@@ -416,11 +416,11 @@
416416
417417
/* Recursively dephantomize all artifacts that are derived by
418418
** delta from artifact rid and which have not already been
419419
** cross-linked. */
420420
nChildUsed = 0;
421
- db_prepare(&q,
421
+ db_prepare(&q,
422422
"SELECT rid FROM delta"
423423
" WHERE srcid=%d"
424424
" AND NOT EXISTS(SELECT 1 FROM mlink WHERE mid=delta.rid)",
425425
rid
426426
);
@@ -455,11 +455,11 @@
455455
/*
456456
** Write content into the database. Return the record ID. If the
457457
** content is already in the database, just return the record ID.
458458
**
459459
** If srcId is specified, then pBlob is delta content from
460
-** the srcId record. srcId might be a phantom.
460
+** the srcId record. srcId might be a phantom.
461461
**
462462
** pBlob is normally uncompressed text. But if nBlob>0 then the
463463
** pBlob value has already been compressed and nBlob is its uncompressed
464464
** size. If nBlob>0 then zUuid must be valid.
465465
**
@@ -486,11 +486,11 @@
486486
Stmt s1;
487487
Blob cmpr;
488488
Blob hash;
489489
int markAsUnclustered = 0;
490490
int isDephantomize = 0;
491
-
491
+
492492
assert( g.repositoryOpen );
493493
assert( pBlob!=0 );
494494
assert( srcId==0 || zUuid!=0 );
495495
if( zUuid==0 ){
496496
assert( nBlob==0 );
@@ -580,18 +580,18 @@
580580
** really a delta. Record this fact in the delta table.
581581
*/
582582
if( srcId ){
583583
db_multi_exec("REPLACE INTO delta(rid,srcid) VALUES(%d,%d)", rid, srcId);
584584
}
585
- if( !isDephantomize && bag_find(&contentCache.missing, rid) &&
585
+ if( !isDephantomize && bag_find(&contentCache.missing, rid) &&
586586
(srcId==0 || content_is_available(srcId)) ){
587587
content_mark_available(rid);
588588
}
589589
if( isDephantomize ){
590590
after_dephantomize(rid, 0);
591591
}
592
-
592
+
593593
/* Add the element to the unclustered table if has never been
594594
** previously seen.
595595
*/
596596
if( markAsUnclustered ){
597597
db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d)", rid);
@@ -628,11 +628,11 @@
628628
** Create a new phantom with the given UUID and return its artifact ID.
629629
*/
630630
int content_new(const char *zUuid, int isPrivate){
631631
int rid;
632632
static Stmt s1, s2, s3;
633
-
633
+
634634
assert( g.repositoryOpen );
635635
db_begin_transaction();
636636
if( uuid_is_shunned(zUuid) ){
637637
db_end_transaction(0);
638638
return 0;
@@ -727,15 +727,15 @@
727727
"SELECT 1 FROM private WHERE rid=:rid"
728728
);
729729
db_bind_int(&s1, ":rid", rid);
730730
rc = db_step(&s1);
731731
db_reset(&s1);
732
- return rc==SQLITE_ROW;
732
+ return rc==SQLITE_ROW;
733733
}
734734
735735
/*
736
-** Make sure an artifact is public.
736
+** Make sure an artifact is public.
737737
*/
738738
void content_make_public(int rid){
739739
static Stmt s1;
740740
db_static_prepare(&s1,
741741
"DELETE FROM private WHERE rid=:rid"
@@ -758,11 +758,11 @@
758758
**
759759
** If srcid is a delta that depends on rid, then srcid is
760760
** converted to undeltaed text.
761761
**
762762
** If either rid or srcid contain less than 50 bytes, or if the
763
-** resulting delta does not achieve a compression of at least 25%
763
+** resulting delta does not achieve a compression of at least 25%
764764
** the rid is left untouched.
765765
**
766766
** Return 1 if a delta is made and 0 if no delta occurs.
767767
*/
768768
int content_deltify(int rid, int srcid, int force){
@@ -883,11 +883,11 @@
883883
zId, rid, zSrc, srcid
884884
);
885885
nErr++;
886886
}
887887
db_finalize(&q);
888
-
888
+
889889
db_prepare(&q, "SELECT rid, uuid, size FROM blob ORDER BY rid");
890890
total = db_int(0, "SELECT max(rid) FROM blob");
891891
while( db_step(&q)==SQLITE_ROW ){
892892
int rid = db_column_int(&q, 0);
893893
const char *zUuid = db_column_text(&q, 1);
@@ -1050,11 +1050,11 @@
10501050
if( zDetail && zDetail[0] ){
10511051
fossil_print(" %s\n", zDetail);
10521052
}
10531053
fossil_free(zSrc);
10541054
fossil_free(zDate);
1055
- rc = 1;
1055
+ rc = 1;
10561056
}
10571057
return rc;
10581058
}
10591059
10601060
/*
@@ -1097,11 +1097,11 @@
10971097
if( p ){
10981098
nArtifact++;
10991099
nErr += check_exists(p->zBaseline, flags, p, "baseline of", 0);
11001100
nErr += check_exists(p->zAttachSrc, flags, p, "file of", 0);
11011101
for(i=0; i<p->nFile; i++){
1102
- nErr += check_exists(p->aFile[i].zUuid, flags, p, "file of",
1102
+ nErr += check_exists(p->aFile[i].zUuid, flags, p, "file of",
11031103
p->aFile[i].zName);
11041104
}
11051105
for(i=0; i<p->nParent; i++){
11061106
nErr += check_exists(p->azParent[i], flags, p, "parent of", 0);
11071107
}
@@ -1115,14 +1115,14 @@
11151115
nErr += check_exists(p->azCChild[i], flags, p, "in", 0);
11161116
}
11171117
for(i=0; i<p->nTag; i++){
11181118
nErr += check_exists(p->aTag[i].zUuid, flags, p, "target of", 0);
11191119
}
1120
- manifest_destroy(p);
1120
+ manifest_destroy(p);
11211121
}
11221122
}
11231123
db_finalize(&q);
11241124
if( nErr>0 || quietFlag==0 ){
11251125
fossil_print("%d missing or shunned references in %d control artifacts\n",
11261126
nErr, nArtifact);
11271127
}
11281128
}
11291129
--- src/content.c
+++ src/content.c
@@ -114,11 +114,11 @@
114 contentCache.n = 0;
115 contentCache.szTotal = 0;
116 }
117
118 /*
119 ** Return the srcid associated with rid. Or return 0 if rid is
120 ** original content and not a delta.
121 */
122 static int findSrcid(int rid){
123 static Stmt q;
124 int srcid;
@@ -154,11 +154,11 @@
154 ** a phantom.
155 */
156 int content_is_available(int rid){
157 int srcid;
158 int depth = 0; /* Limit to recursion depth */
159 while( depth++ < 10000000 ){
160 if( bag_find(&contentCache.missing, rid) ){
161 return 0;
162 }
163 if( bag_find(&contentCache.available, rid) ){
164 return 1;
@@ -416,11 +416,11 @@
416
417 /* Recursively dephantomize all artifacts that are derived by
418 ** delta from artifact rid and which have not already been
419 ** cross-linked. */
420 nChildUsed = 0;
421 db_prepare(&q,
422 "SELECT rid FROM delta"
423 " WHERE srcid=%d"
424 " AND NOT EXISTS(SELECT 1 FROM mlink WHERE mid=delta.rid)",
425 rid
426 );
@@ -455,11 +455,11 @@
455 /*
456 ** Write content into the database. Return the record ID. If the
457 ** content is already in the database, just return the record ID.
458 **
459 ** If srcId is specified, then pBlob is delta content from
460 ** the srcId record. srcId might be a phantom.
461 **
462 ** pBlob is normally uncompressed text. But if nBlob>0 then the
463 ** pBlob value has already been compressed and nBlob is its uncompressed
464 ** size. If nBlob>0 then zUuid must be valid.
465 **
@@ -486,11 +486,11 @@
486 Stmt s1;
487 Blob cmpr;
488 Blob hash;
489 int markAsUnclustered = 0;
490 int isDephantomize = 0;
491
492 assert( g.repositoryOpen );
493 assert( pBlob!=0 );
494 assert( srcId==0 || zUuid!=0 );
495 if( zUuid==0 ){
496 assert( nBlob==0 );
@@ -580,18 +580,18 @@
580 ** really a delta. Record this fact in the delta table.
581 */
582 if( srcId ){
583 db_multi_exec("REPLACE INTO delta(rid,srcid) VALUES(%d,%d)", rid, srcId);
584 }
585 if( !isDephantomize && bag_find(&contentCache.missing, rid) &&
586 (srcId==0 || content_is_available(srcId)) ){
587 content_mark_available(rid);
588 }
589 if( isDephantomize ){
590 after_dephantomize(rid, 0);
591 }
592
593 /* Add the element to the unclustered table if has never been
594 ** previously seen.
595 */
596 if( markAsUnclustered ){
597 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d)", rid);
@@ -628,11 +628,11 @@
628 ** Create a new phantom with the given UUID and return its artifact ID.
629 */
630 int content_new(const char *zUuid, int isPrivate){
631 int rid;
632 static Stmt s1, s2, s3;
633
634 assert( g.repositoryOpen );
635 db_begin_transaction();
636 if( uuid_is_shunned(zUuid) ){
637 db_end_transaction(0);
638 return 0;
@@ -727,15 +727,15 @@
727 "SELECT 1 FROM private WHERE rid=:rid"
728 );
729 db_bind_int(&s1, ":rid", rid);
730 rc = db_step(&s1);
731 db_reset(&s1);
732 return rc==SQLITE_ROW;
733 }
734
735 /*
736 ** Make sure an artifact is public.
737 */
738 void content_make_public(int rid){
739 static Stmt s1;
740 db_static_prepare(&s1,
741 "DELETE FROM private WHERE rid=:rid"
@@ -758,11 +758,11 @@
758 **
759 ** If srcid is a delta that depends on rid, then srcid is
760 ** converted to undeltaed text.
761 **
762 ** If either rid or srcid contain less than 50 bytes, or if the
763 ** resulting delta does not achieve a compression of at least 25%
764 ** the rid is left untouched.
765 **
766 ** Return 1 if a delta is made and 0 if no delta occurs.
767 */
768 int content_deltify(int rid, int srcid, int force){
@@ -883,11 +883,11 @@
883 zId, rid, zSrc, srcid
884 );
885 nErr++;
886 }
887 db_finalize(&q);
888
889 db_prepare(&q, "SELECT rid, uuid, size FROM blob ORDER BY rid");
890 total = db_int(0, "SELECT max(rid) FROM blob");
891 while( db_step(&q)==SQLITE_ROW ){
892 int rid = db_column_int(&q, 0);
893 const char *zUuid = db_column_text(&q, 1);
@@ -1050,11 +1050,11 @@
1050 if( zDetail && zDetail[0] ){
1051 fossil_print(" %s\n", zDetail);
1052 }
1053 fossil_free(zSrc);
1054 fossil_free(zDate);
1055 rc = 1;
1056 }
1057 return rc;
1058 }
1059
1060 /*
@@ -1097,11 +1097,11 @@
1097 if( p ){
1098 nArtifact++;
1099 nErr += check_exists(p->zBaseline, flags, p, "baseline of", 0);
1100 nErr += check_exists(p->zAttachSrc, flags, p, "file of", 0);
1101 for(i=0; i<p->nFile; i++){
1102 nErr += check_exists(p->aFile[i].zUuid, flags, p, "file of",
1103 p->aFile[i].zName);
1104 }
1105 for(i=0; i<p->nParent; i++){
1106 nErr += check_exists(p->azParent[i], flags, p, "parent of", 0);
1107 }
@@ -1115,14 +1115,14 @@
1115 nErr += check_exists(p->azCChild[i], flags, p, "in", 0);
1116 }
1117 for(i=0; i<p->nTag; i++){
1118 nErr += check_exists(p->aTag[i].zUuid, flags, p, "target of", 0);
1119 }
1120 manifest_destroy(p);
1121 }
1122 }
1123 db_finalize(&q);
1124 if( nErr>0 || quietFlag==0 ){
1125 fossil_print("%d missing or shunned references in %d control artifacts\n",
1126 nErr, nArtifact);
1127 }
1128 }
1129
--- src/content.c
+++ src/content.c
@@ -114,11 +114,11 @@
114 contentCache.n = 0;
115 contentCache.szTotal = 0;
116 }
117
118 /*
119 ** Return the srcid associated with rid. Or return 0 if rid is
120 ** original content and not a delta.
121 */
122 static int findSrcid(int rid){
123 static Stmt q;
124 int srcid;
@@ -154,11 +154,11 @@
154 ** a phantom.
155 */
156 int content_is_available(int rid){
157 int srcid;
158 int depth = 0; /* Limit to recursion depth */
159 while( depth++ < 10000000 ){
160 if( bag_find(&contentCache.missing, rid) ){
161 return 0;
162 }
163 if( bag_find(&contentCache.available, rid) ){
164 return 1;
@@ -416,11 +416,11 @@
416
417 /* Recursively dephantomize all artifacts that are derived by
418 ** delta from artifact rid and which have not already been
419 ** cross-linked. */
420 nChildUsed = 0;
421 db_prepare(&q,
422 "SELECT rid FROM delta"
423 " WHERE srcid=%d"
424 " AND NOT EXISTS(SELECT 1 FROM mlink WHERE mid=delta.rid)",
425 rid
426 );
@@ -455,11 +455,11 @@
455 /*
456 ** Write content into the database. Return the record ID. If the
457 ** content is already in the database, just return the record ID.
458 **
459 ** If srcId is specified, then pBlob is delta content from
460 ** the srcId record. srcId might be a phantom.
461 **
462 ** pBlob is normally uncompressed text. But if nBlob>0 then the
463 ** pBlob value has already been compressed and nBlob is its uncompressed
464 ** size. If nBlob>0 then zUuid must be valid.
465 **
@@ -486,11 +486,11 @@
486 Stmt s1;
487 Blob cmpr;
488 Blob hash;
489 int markAsUnclustered = 0;
490 int isDephantomize = 0;
491
492 assert( g.repositoryOpen );
493 assert( pBlob!=0 );
494 assert( srcId==0 || zUuid!=0 );
495 if( zUuid==0 ){
496 assert( nBlob==0 );
@@ -580,18 +580,18 @@
580 ** really a delta. Record this fact in the delta table.
581 */
582 if( srcId ){
583 db_multi_exec("REPLACE INTO delta(rid,srcid) VALUES(%d,%d)", rid, srcId);
584 }
585 if( !isDephantomize && bag_find(&contentCache.missing, rid) &&
586 (srcId==0 || content_is_available(srcId)) ){
587 content_mark_available(rid);
588 }
589 if( isDephantomize ){
590 after_dephantomize(rid, 0);
591 }
592
593 /* Add the element to the unclustered table if has never been
594 ** previously seen.
595 */
596 if( markAsUnclustered ){
597 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d)", rid);
@@ -628,11 +628,11 @@
628 ** Create a new phantom with the given UUID and return its artifact ID.
629 */
630 int content_new(const char *zUuid, int isPrivate){
631 int rid;
632 static Stmt s1, s2, s3;
633
634 assert( g.repositoryOpen );
635 db_begin_transaction();
636 if( uuid_is_shunned(zUuid) ){
637 db_end_transaction(0);
638 return 0;
@@ -727,15 +727,15 @@
727 "SELECT 1 FROM private WHERE rid=:rid"
728 );
729 db_bind_int(&s1, ":rid", rid);
730 rc = db_step(&s1);
731 db_reset(&s1);
732 return rc==SQLITE_ROW;
733 }
734
735 /*
736 ** Make sure an artifact is public.
737 */
738 void content_make_public(int rid){
739 static Stmt s1;
740 db_static_prepare(&s1,
741 "DELETE FROM private WHERE rid=:rid"
@@ -758,11 +758,11 @@
758 **
759 ** If srcid is a delta that depends on rid, then srcid is
760 ** converted to undeltaed text.
761 **
762 ** If either rid or srcid contain less than 50 bytes, or if the
763 ** resulting delta does not achieve a compression of at least 25%
764 ** the rid is left untouched.
765 **
766 ** Return 1 if a delta is made and 0 if no delta occurs.
767 */
768 int content_deltify(int rid, int srcid, int force){
@@ -883,11 +883,11 @@
883 zId, rid, zSrc, srcid
884 );
885 nErr++;
886 }
887 db_finalize(&q);
888
889 db_prepare(&q, "SELECT rid, uuid, size FROM blob ORDER BY rid");
890 total = db_int(0, "SELECT max(rid) FROM blob");
891 while( db_step(&q)==SQLITE_ROW ){
892 int rid = db_column_int(&q, 0);
893 const char *zUuid = db_column_text(&q, 1);
@@ -1050,11 +1050,11 @@
1050 if( zDetail && zDetail[0] ){
1051 fossil_print(" %s\n", zDetail);
1052 }
1053 fossil_free(zSrc);
1054 fossil_free(zDate);
1055 rc = 1;
1056 }
1057 return rc;
1058 }
1059
1060 /*
@@ -1097,11 +1097,11 @@
1097 if( p ){
1098 nArtifact++;
1099 nErr += check_exists(p->zBaseline, flags, p, "baseline of", 0);
1100 nErr += check_exists(p->zAttachSrc, flags, p, "file of", 0);
1101 for(i=0; i<p->nFile; i++){
1102 nErr += check_exists(p->aFile[i].zUuid, flags, p, "file of",
1103 p->aFile[i].zName);
1104 }
1105 for(i=0; i<p->nParent; i++){
1106 nErr += check_exists(p->azParent[i], flags, p, "parent of", 0);
1107 }
@@ -1115,14 +1115,14 @@
1115 nErr += check_exists(p->azCChild[i], flags, p, "in", 0);
1116 }
1117 for(i=0; i<p->nTag; i++){
1118 nErr += check_exists(p->aTag[i].zUuid, flags, p, "target of", 0);
1119 }
1120 manifest_destroy(p);
1121 }
1122 }
1123 db_finalize(&q);
1124 if( nErr>0 || quietFlag==0 ){
1125 fossil_print("%d missing or shunned references in %d control artifacts\n",
1126 nErr, nArtifact);
1127 }
1128 }
1129
+25 -25
--- src/manifest.c
+++ src/manifest.c
@@ -51,11 +51,11 @@
5151
#define MC_PERMIT_HOOKS 1 /* permit hooks to execute */
5252
5353
/*
5454
** A single F-card within a manifest
5555
*/
56
-struct ManifestFile {
56
+struct ManifestFile {
5757
char *zName; /* Name of a file */
5858
char *zUuid; /* UUID of the file */
5959
char *zPerm; /* File permissions */
6060
char *zPrior; /* Prior name if the name was changed */
6161
};
@@ -89,11 +89,11 @@
8989
ManifestFile *aFile; /* One entry for each F-card */
9090
int nParent; /* Number of parents. */
9191
int nParentAlloc; /* Slots allocated in azParent[] */
9292
char **azParent; /* UUIDs of parents. One for each P card argument */
9393
int nCherrypick; /* Number of entries in aCherrypick[] */
94
- struct {
94
+ struct {
9595
char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */
9696
char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */
9797
} *aCherrypick;
9898
int nCChild; /* Number of cluster children */
9999
int nCChildAlloc; /* Number of closts allocated in azCChild[] */
@@ -105,11 +105,11 @@
105105
char *zUuid; /* UUID that the tag is applied to */
106106
char *zValue; /* Value if the tag is really a property */
107107
} *aTag; /* One for each T card */
108108
int nField; /* Number of J cards */
109109
int nFieldAlloc; /* Slots allocated in aField[] */
110
- struct {
110
+ struct {
111111
char *zName; /* Key or field name */
112112
char *zValue; /* Value of the field */
113113
} *aField; /* One for each J card */
114114
};
115115
#endif
@@ -251,11 +251,11 @@
251251
** Verify the Z-card checksum on the artifact, if there is such a
252252
** checksum. Return 0 if there is no Z-card. Return 1 if the Z-card
253253
** exists and is correct. Return 2 if the Z-card exists and has the wrong
254254
** value.
255255
**
256
-** 0123456789 123456789 123456789 123456789
256
+** 0123456789 123456789 123456789 123456789
257257
** Z aea84f4f863865a8d59d0384e4d2a41c
258258
*/
259259
static int verify_z_card(const char *z, int n){
260260
if( n<35 ) return 0;
261261
if( z[n-35]!='Z' || z[n-34]!=' ' ) return 0;
@@ -435,11 +435,11 @@
435435
char *zName, *zTarget, *zSrc;
436436
int nTarget = 0, nSrc = 0;
437437
zName = next_token(&x, 0);
438438
zTarget = next_token(&x, &nTarget);
439439
zSrc = next_token(&x, &nSrc);
440
- if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
440
+ if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
441441
if( p->zAttachName!=0 ) goto manifest_syntax_error;
442442
defossilize(zName);
443443
if( !file_is_simple_pathname(zName, 0) ){
444444
SYNTAX("invalid filename on A-card");
445445
}
@@ -504,11 +504,11 @@
504504
}
505505
506506
/*
507507
** E <timestamp> <uuid>
508508
**
509
- ** An "event" card that contains the timestamp of the event in the
509
+ ** An "event" card that contains the timestamp of the event in the
510510
** format YYYY-MM-DDtHH:MM:SS and a unique identifier for the event.
511511
** The event timestamp is distinct from the D timestamp. The D
512512
** timestamp is when the artifact was created whereas the E timestamp
513513
** is when the specific event is said to occur.
514514
*/
@@ -551,11 +551,11 @@
551551
SYNTAX("F-card old filename is not a simple path");
552552
}
553553
}
554554
if( p->nFile>=p->nFileAlloc ){
555555
p->nFileAlloc = p->nFileAlloc*2 + 10;
556
- p->aFile = fossil_realloc(p->aFile,
556
+ p->aFile = fossil_realloc(p->aFile,
557557
p->nFileAlloc*sizeof(p->aFile[0]) );
558558
}
559559
i = p->nFile++;
560560
p->aFile[i].zName = zName;
561561
p->aFile[i].zUuid = zUuid;
@@ -743,11 +743,11 @@
743743
** singleton tag, "*" to create a propagating tag, or "-" to create
744744
** anti-tag that undoes a prior "+" or blocks propagation of of
745745
** a "*".
746746
**
747747
** The tag is applied to <uuid>. If <uuid> is "*" then the tag is
748
- ** applied to the current manifest. If <value> is provided then
748
+ ** applied to the current manifest. If <value> is provided then
749749
** the tag is really a property with the given value.
750750
**
751751
** Tags are not allowed in clusters. Multiple T lines are allowed.
752752
*/
753753
case 'T': {
@@ -1050,11 +1050,11 @@
10501050
db_multi_exec(
10511051
"INSERT OR IGNORE INTO orphan(rid, baseline) VALUES(%d,%d)",
10521052
p->rid, rid
10531053
);
10541054
return 1;
1055
- }
1055
+ }
10561056
fossil_fatal("cannot access baseline manifest %S", p->zBaseline);
10571057
}
10581058
}
10591059
return 0;
10601060
}
@@ -1075,11 +1075,11 @@
10751075
**
10761076
** Return NULL for end-of-records or if there is an error. If an error
10771077
** occurs and pErr!=0 then store 1 in *pErr.
10781078
*/
10791079
ManifestFile *manifest_file_next(
1080
- Manifest *p,
1080
+ Manifest *p,
10811081
int *pErr
10821082
){
10831083
ManifestFile *pOut = 0;
10841084
if( pErr ) *pErr = 0;
10851085
if( p->pBaseline==0 ){
@@ -1219,11 +1219,11 @@
12191219
content_deltify(pid, fid, 0);
12201220
}
12211221
}
12221222
12231223
/*
1224
-** Do a binary search to find a file in the p->aFile[] array.
1224
+** Do a binary search to find a file in the p->aFile[] array.
12251225
**
12261226
** As an optimization, guess that the file we seek is at index p->iFile.
12271227
** That will usually be the case. If it is not found there, then do the
12281228
** actual binary search.
12291229
**
@@ -1263,18 +1263,18 @@
12631263
/*
12641264
** Locate a file named zName in the aFile[] array of the given manifest.
12651265
** Return a pointer to the appropriate ManifestFile object. Return NULL
12661266
** if not found.
12671267
**
1268
-** This routine works even if p is a delta-manifest. The pointer
1268
+** This routine works even if p is a delta-manifest. The pointer
12691269
** returned might be to the baseline.
12701270
**
12711271
** We assume that filenames are in sorted order and use a binary search.
12721272
*/
12731273
ManifestFile *manifest_file_seek(Manifest *p, const char *zName){
12741274
ManifestFile *pFile;
1275
-
1275
+
12761276
pFile = manifest_file_seek_base(p, zName);
12771277
if( pFile && pFile->zUuid==0 ) return 0;
12781278
if( pFile==0 && p->zBaseline ){
12791279
fetch_baseline(p, 1);
12801280
pFile = manifest_file_seek_base(p->pBaseline, zName);
@@ -1362,15 +1362,15 @@
13621362
return;
13631363
}
13641364
isPublic = !content_is_private(cid);
13651365
13661366
/* Try to make the parent manifest a delta from the child, if that
1367
- ** is an appropriate thing to do. For a new baseline, make the
1367
+ ** is an appropriate thing to do. For a new baseline, make the
13681368
** previous baseline a delta from the current baseline.
13691369
*/
13701370
if( (pParent->zBaseline==0)==(pChild->zBaseline==0) ){
1371
- content_deltify(pid, cid, 0);
1371
+ content_deltify(pid, cid, 0);
13721372
}else if( pChild->zBaseline==0 && pParent->zBaseline!=0 ){
13731373
content_deltify(pParent->pBaseline->rid, cid, 0);
13741374
}
13751375
13761376
/* Remember all children less than a few seconds younger than their parent,
@@ -1385,11 +1385,11 @@
13851385
);
13861386
}
13871387
13881388
/* First look at all files in pChild, ignoring its baseline. This
13891389
** is where most of the changes will be found.
1390
- */
1390
+ */
13911391
for(i=0, pChildFile=pChild->aFile; i<pChild->nFile; i++, pChildFile++){
13921392
int mperm = manifest_file_mperm(pChildFile);
13931393
if( pChildFile->zPrior ){
13941394
pParentFile = manifest_file_seek(pParent, pChildFile->zPrior);
13951395
if( pParentFile ){
@@ -1450,11 +1450,11 @@
14501450
** but are missing from pChild and mark them as having been deleted. */
14511451
manifest_file_rewind(pParent);
14521452
while( (pParentFile = manifest_file_next(pParent,0))!=0 ){
14531453
pChildFile = manifest_file_seek(pChild, pParentFile->zName);
14541454
if( pChildFile==0 && pParentFile->zUuid!=0 ){
1455
- add_one_mlink(cid, pParentFile->zUuid, 0, pParentFile->zName, 0,
1455
+ add_one_mlink(cid, pParentFile->zUuid, 0, pParentFile->zName, 0,
14561456
isPublic, 0);
14571457
}
14581458
}
14591459
}
14601460
manifest_cache_insert(*ppOther);
@@ -1578,11 +1578,11 @@
15781578
if( once ){
15791579
once = 0;
15801580
zTitleExpr = db_get("ticket-title-expr", "title");
15811581
zStatusColumn = db_get("ticket-status-column", "status");
15821582
}
1583
- zTitle = db_text("unknown",
1583
+ zTitle = db_text("unknown",
15841584
"SELECT %s FROM ticket WHERE tkt_uuid='%s'",
15851585
zTitleExpr, pManifest->zTicketUuid
15861586
);
15871587
if( !isNew ){
15881588
for(i=0; i<pManifest->nField; i++){
@@ -1599,11 +1599,11 @@
15991599
pManifest->nField-1, pManifest->nField==2 ? "" : "s");
16001600
}
16011601
blob_appendf(&brief, "%h ticket [%.10s].",
16021602
zNewStatus, pManifest->zTicketUuid);
16031603
}else{
1604
- zNewStatus = db_text("unknown",
1604
+ zNewStatus = db_text("unknown",
16051605
"SELECT %s FROM ticket WHERE tkt_uuid='%s'",
16061606
zStatusColumn, pManifest->zTicketUuid
16071607
);
16081608
blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with "
16091609
"%d other change%s",
@@ -1661,11 +1661,11 @@
16611661
**
16621662
** If the input is a control artifact, then make appropriate entries
16631663
** in the auxiliary tables of the database in order to crosslink the
16641664
** artifact.
16651665
**
1666
-** If global variable g.xlinkClusterOnly is true, then ignore all
1666
+** If global variable g.xlinkClusterOnly is true, then ignore all
16671667
** control artifacts other than clusters.
16681668
**
16691669
** This routine always resets the pContent blob before returning.
16701670
**
16711671
** Historical note: This routine original processed manifests only.
@@ -1744,11 +1744,11 @@
17441744
" %d,%Q,%Q,"
17451745
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0),"
17461746
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
17471747
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),%.17g);",
17481748
TAG_DATE, rid, p->rDate,
1749
- rid, p->zUser, p->zComment,
1749
+ rid, p->zUser, p->zComment,
17501750
TAG_BGCOLOR, rid,
17511751
TAG_USER, rid,
17521752
TAG_COMMENT, rid, p->rDate
17531753
);
17541754
zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event"
@@ -1802,11 +1802,11 @@
18021802
case '*': type = 2; break; /* Propagate to descendants */
18031803
default:
18041804
fossil_error(1, "unknown tag type in manifest: %s", p->aTag);
18051805
return 0;
18061806
}
1807
- tag_insert(&p->aTag[i].zName[1], type, p->aTag[i].zValue,
1807
+ tag_insert(&p->aTag[i].zName[1], type, p->aTag[i].zValue,
18081808
rid, p->rDate, tid);
18091809
}
18101810
}
18111811
if( parentid ){
18121812
tag_propagate_all(parentid);
@@ -1843,11 +1843,11 @@
18431843
" bgcolor,euser,ecomment)"
18441844
"VALUES('w',%.17g,%d,%Q,%Q,"
18451845
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1),"
18461846
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
18471847
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1848
- p->rDate, rid, p->zUser, zComment,
1848
+ p->rDate, rid, p->zUser, zComment,
18491849
TAG_BGCOLOR, rid,
18501850
TAG_BGCOLOR, rid,
18511851
TAG_USER, rid,
18521852
TAG_COMMENT, rid
18531853
);
@@ -1893,11 +1893,11 @@
18931893
}else{
18941894
db_multi_exec(
18951895
"REPLACE INTO event(type,mtime,objid,tagid,user,comment,bgcolor)"
18961896
"VALUES('e',%.17g,%d,%d,%Q,%Q,"
18971897
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1898
- p->rEventDate, rid, tagid, p->zUser, p->zComment,
1898
+ p->rEventDate, rid, tagid, p->zUser, p->zComment,
18991899
TAG_BGCOLOR, rid
19001900
);
19011901
}
19021902
}
19031903
if( p->type==CFTYPE_TICKET ){
@@ -1925,11 +1925,11 @@
19251925
" WHERE target=%Q AND filename=%Q",
19261926
p->zAttachTarget, p->zAttachName,
19271927
p->zAttachTarget, p->zAttachName
19281928
);
19291929
if( strlen(p->zAttachTarget)!=UUID_SIZE
1930
- || !validate16(p->zAttachTarget, UUID_SIZE)
1930
+ || !validate16(p->zAttachTarget, UUID_SIZE)
19311931
){
19321932
char *zComment;
19331933
if( p->zAttachSrc && p->zAttachSrc[0] ){
19341934
zComment = mprintf(
19351935
"Add attachment [/artifact/%S|%h] to wiki page [%h]",
19361936
--- src/manifest.c
+++ src/manifest.c
@@ -51,11 +51,11 @@
51 #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */
52
53 /*
54 ** A single F-card within a manifest
55 */
56 struct ManifestFile {
57 char *zName; /* Name of a file */
58 char *zUuid; /* UUID of the file */
59 char *zPerm; /* File permissions */
60 char *zPrior; /* Prior name if the name was changed */
61 };
@@ -89,11 +89,11 @@
89 ManifestFile *aFile; /* One entry for each F-card */
90 int nParent; /* Number of parents. */
91 int nParentAlloc; /* Slots allocated in azParent[] */
92 char **azParent; /* UUIDs of parents. One for each P card argument */
93 int nCherrypick; /* Number of entries in aCherrypick[] */
94 struct {
95 char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */
96 char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */
97 } *aCherrypick;
98 int nCChild; /* Number of cluster children */
99 int nCChildAlloc; /* Number of closts allocated in azCChild[] */
@@ -105,11 +105,11 @@
105 char *zUuid; /* UUID that the tag is applied to */
106 char *zValue; /* Value if the tag is really a property */
107 } *aTag; /* One for each T card */
108 int nField; /* Number of J cards */
109 int nFieldAlloc; /* Slots allocated in aField[] */
110 struct {
111 char *zName; /* Key or field name */
112 char *zValue; /* Value of the field */
113 } *aField; /* One for each J card */
114 };
115 #endif
@@ -251,11 +251,11 @@
251 ** Verify the Z-card checksum on the artifact, if there is such a
252 ** checksum. Return 0 if there is no Z-card. Return 1 if the Z-card
253 ** exists and is correct. Return 2 if the Z-card exists and has the wrong
254 ** value.
255 **
256 ** 0123456789 123456789 123456789 123456789
257 ** Z aea84f4f863865a8d59d0384e4d2a41c
258 */
259 static int verify_z_card(const char *z, int n){
260 if( n<35 ) return 0;
261 if( z[n-35]!='Z' || z[n-34]!=' ' ) return 0;
@@ -435,11 +435,11 @@
435 char *zName, *zTarget, *zSrc;
436 int nTarget = 0, nSrc = 0;
437 zName = next_token(&x, 0);
438 zTarget = next_token(&x, &nTarget);
439 zSrc = next_token(&x, &nSrc);
440 if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
441 if( p->zAttachName!=0 ) goto manifest_syntax_error;
442 defossilize(zName);
443 if( !file_is_simple_pathname(zName, 0) ){
444 SYNTAX("invalid filename on A-card");
445 }
@@ -504,11 +504,11 @@
504 }
505
506 /*
507 ** E <timestamp> <uuid>
508 **
509 ** An "event" card that contains the timestamp of the event in the
510 ** format YYYY-MM-DDtHH:MM:SS and a unique identifier for the event.
511 ** The event timestamp is distinct from the D timestamp. The D
512 ** timestamp is when the artifact was created whereas the E timestamp
513 ** is when the specific event is said to occur.
514 */
@@ -551,11 +551,11 @@
551 SYNTAX("F-card old filename is not a simple path");
552 }
553 }
554 if( p->nFile>=p->nFileAlloc ){
555 p->nFileAlloc = p->nFileAlloc*2 + 10;
556 p->aFile = fossil_realloc(p->aFile,
557 p->nFileAlloc*sizeof(p->aFile[0]) );
558 }
559 i = p->nFile++;
560 p->aFile[i].zName = zName;
561 p->aFile[i].zUuid = zUuid;
@@ -743,11 +743,11 @@
743 ** singleton tag, "*" to create a propagating tag, or "-" to create
744 ** anti-tag that undoes a prior "+" or blocks propagation of of
745 ** a "*".
746 **
747 ** The tag is applied to <uuid>. If <uuid> is "*" then the tag is
748 ** applied to the current manifest. If <value> is provided then
749 ** the tag is really a property with the given value.
750 **
751 ** Tags are not allowed in clusters. Multiple T lines are allowed.
752 */
753 case 'T': {
@@ -1050,11 +1050,11 @@
1050 db_multi_exec(
1051 "INSERT OR IGNORE INTO orphan(rid, baseline) VALUES(%d,%d)",
1052 p->rid, rid
1053 );
1054 return 1;
1055 }
1056 fossil_fatal("cannot access baseline manifest %S", p->zBaseline);
1057 }
1058 }
1059 return 0;
1060 }
@@ -1075,11 +1075,11 @@
1075 **
1076 ** Return NULL for end-of-records or if there is an error. If an error
1077 ** occurs and pErr!=0 then store 1 in *pErr.
1078 */
1079 ManifestFile *manifest_file_next(
1080 Manifest *p,
1081 int *pErr
1082 ){
1083 ManifestFile *pOut = 0;
1084 if( pErr ) *pErr = 0;
1085 if( p->pBaseline==0 ){
@@ -1219,11 +1219,11 @@
1219 content_deltify(pid, fid, 0);
1220 }
1221 }
1222
1223 /*
1224 ** Do a binary search to find a file in the p->aFile[] array.
1225 **
1226 ** As an optimization, guess that the file we seek is at index p->iFile.
1227 ** That will usually be the case. If it is not found there, then do the
1228 ** actual binary search.
1229 **
@@ -1263,18 +1263,18 @@
1263 /*
1264 ** Locate a file named zName in the aFile[] array of the given manifest.
1265 ** Return a pointer to the appropriate ManifestFile object. Return NULL
1266 ** if not found.
1267 **
1268 ** This routine works even if p is a delta-manifest. The pointer
1269 ** returned might be to the baseline.
1270 **
1271 ** We assume that filenames are in sorted order and use a binary search.
1272 */
1273 ManifestFile *manifest_file_seek(Manifest *p, const char *zName){
1274 ManifestFile *pFile;
1275
1276 pFile = manifest_file_seek_base(p, zName);
1277 if( pFile && pFile->zUuid==0 ) return 0;
1278 if( pFile==0 && p->zBaseline ){
1279 fetch_baseline(p, 1);
1280 pFile = manifest_file_seek_base(p->pBaseline, zName);
@@ -1362,15 +1362,15 @@
1362 return;
1363 }
1364 isPublic = !content_is_private(cid);
1365
1366 /* Try to make the parent manifest a delta from the child, if that
1367 ** is an appropriate thing to do. For a new baseline, make the
1368 ** previous baseline a delta from the current baseline.
1369 */
1370 if( (pParent->zBaseline==0)==(pChild->zBaseline==0) ){
1371 content_deltify(pid, cid, 0);
1372 }else if( pChild->zBaseline==0 && pParent->zBaseline!=0 ){
1373 content_deltify(pParent->pBaseline->rid, cid, 0);
1374 }
1375
1376 /* Remember all children less than a few seconds younger than their parent,
@@ -1385,11 +1385,11 @@
1385 );
1386 }
1387
1388 /* First look at all files in pChild, ignoring its baseline. This
1389 ** is where most of the changes will be found.
1390 */
1391 for(i=0, pChildFile=pChild->aFile; i<pChild->nFile; i++, pChildFile++){
1392 int mperm = manifest_file_mperm(pChildFile);
1393 if( pChildFile->zPrior ){
1394 pParentFile = manifest_file_seek(pParent, pChildFile->zPrior);
1395 if( pParentFile ){
@@ -1450,11 +1450,11 @@
1450 ** but are missing from pChild and mark them as having been deleted. */
1451 manifest_file_rewind(pParent);
1452 while( (pParentFile = manifest_file_next(pParent,0))!=0 ){
1453 pChildFile = manifest_file_seek(pChild, pParentFile->zName);
1454 if( pChildFile==0 && pParentFile->zUuid!=0 ){
1455 add_one_mlink(cid, pParentFile->zUuid, 0, pParentFile->zName, 0,
1456 isPublic, 0);
1457 }
1458 }
1459 }
1460 manifest_cache_insert(*ppOther);
@@ -1578,11 +1578,11 @@
1578 if( once ){
1579 once = 0;
1580 zTitleExpr = db_get("ticket-title-expr", "title");
1581 zStatusColumn = db_get("ticket-status-column", "status");
1582 }
1583 zTitle = db_text("unknown",
1584 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1585 zTitleExpr, pManifest->zTicketUuid
1586 );
1587 if( !isNew ){
1588 for(i=0; i<pManifest->nField; i++){
@@ -1599,11 +1599,11 @@
1599 pManifest->nField-1, pManifest->nField==2 ? "" : "s");
1600 }
1601 blob_appendf(&brief, "%h ticket [%.10s].",
1602 zNewStatus, pManifest->zTicketUuid);
1603 }else{
1604 zNewStatus = db_text("unknown",
1605 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1606 zStatusColumn, pManifest->zTicketUuid
1607 );
1608 blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with "
1609 "%d other change%s",
@@ -1661,11 +1661,11 @@
1661 **
1662 ** If the input is a control artifact, then make appropriate entries
1663 ** in the auxiliary tables of the database in order to crosslink the
1664 ** artifact.
1665 **
1666 ** If global variable g.xlinkClusterOnly is true, then ignore all
1667 ** control artifacts other than clusters.
1668 **
1669 ** This routine always resets the pContent blob before returning.
1670 **
1671 ** Historical note: This routine original processed manifests only.
@@ -1744,11 +1744,11 @@
1744 " %d,%Q,%Q,"
1745 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0),"
1746 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
1747 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),%.17g);",
1748 TAG_DATE, rid, p->rDate,
1749 rid, p->zUser, p->zComment,
1750 TAG_BGCOLOR, rid,
1751 TAG_USER, rid,
1752 TAG_COMMENT, rid, p->rDate
1753 );
1754 zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event"
@@ -1802,11 +1802,11 @@
1802 case '*': type = 2; break; /* Propagate to descendants */
1803 default:
1804 fossil_error(1, "unknown tag type in manifest: %s", p->aTag);
1805 return 0;
1806 }
1807 tag_insert(&p->aTag[i].zName[1], type, p->aTag[i].zValue,
1808 rid, p->rDate, tid);
1809 }
1810 }
1811 if( parentid ){
1812 tag_propagate_all(parentid);
@@ -1843,11 +1843,11 @@
1843 " bgcolor,euser,ecomment)"
1844 "VALUES('w',%.17g,%d,%Q,%Q,"
1845 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1),"
1846 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
1847 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1848 p->rDate, rid, p->zUser, zComment,
1849 TAG_BGCOLOR, rid,
1850 TAG_BGCOLOR, rid,
1851 TAG_USER, rid,
1852 TAG_COMMENT, rid
1853 );
@@ -1893,11 +1893,11 @@
1893 }else{
1894 db_multi_exec(
1895 "REPLACE INTO event(type,mtime,objid,tagid,user,comment,bgcolor)"
1896 "VALUES('e',%.17g,%d,%d,%Q,%Q,"
1897 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1898 p->rEventDate, rid, tagid, p->zUser, p->zComment,
1899 TAG_BGCOLOR, rid
1900 );
1901 }
1902 }
1903 if( p->type==CFTYPE_TICKET ){
@@ -1925,11 +1925,11 @@
1925 " WHERE target=%Q AND filename=%Q",
1926 p->zAttachTarget, p->zAttachName,
1927 p->zAttachTarget, p->zAttachName
1928 );
1929 if( strlen(p->zAttachTarget)!=UUID_SIZE
1930 || !validate16(p->zAttachTarget, UUID_SIZE)
1931 ){
1932 char *zComment;
1933 if( p->zAttachSrc && p->zAttachSrc[0] ){
1934 zComment = mprintf(
1935 "Add attachment [/artifact/%S|%h] to wiki page [%h]",
1936
--- src/manifest.c
+++ src/manifest.c
@@ -51,11 +51,11 @@
51 #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */
52
53 /*
54 ** A single F-card within a manifest
55 */
56 struct ManifestFile {
57 char *zName; /* Name of a file */
58 char *zUuid; /* UUID of the file */
59 char *zPerm; /* File permissions */
60 char *zPrior; /* Prior name if the name was changed */
61 };
@@ -89,11 +89,11 @@
89 ManifestFile *aFile; /* One entry for each F-card */
90 int nParent; /* Number of parents. */
91 int nParentAlloc; /* Slots allocated in azParent[] */
92 char **azParent; /* UUIDs of parents. One for each P card argument */
93 int nCherrypick; /* Number of entries in aCherrypick[] */
94 struct {
95 char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */
96 char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */
97 } *aCherrypick;
98 int nCChild; /* Number of cluster children */
99 int nCChildAlloc; /* Number of closts allocated in azCChild[] */
@@ -105,11 +105,11 @@
105 char *zUuid; /* UUID that the tag is applied to */
106 char *zValue; /* Value if the tag is really a property */
107 } *aTag; /* One for each T card */
108 int nField; /* Number of J cards */
109 int nFieldAlloc; /* Slots allocated in aField[] */
110 struct {
111 char *zName; /* Key or field name */
112 char *zValue; /* Value of the field */
113 } *aField; /* One for each J card */
114 };
115 #endif
@@ -251,11 +251,11 @@
251 ** Verify the Z-card checksum on the artifact, if there is such a
252 ** checksum. Return 0 if there is no Z-card. Return 1 if the Z-card
253 ** exists and is correct. Return 2 if the Z-card exists and has the wrong
254 ** value.
255 **
256 ** 0123456789 123456789 123456789 123456789
257 ** Z aea84f4f863865a8d59d0384e4d2a41c
258 */
259 static int verify_z_card(const char *z, int n){
260 if( n<35 ) return 0;
261 if( z[n-35]!='Z' || z[n-34]!=' ' ) return 0;
@@ -435,11 +435,11 @@
435 char *zName, *zTarget, *zSrc;
436 int nTarget = 0, nSrc = 0;
437 zName = next_token(&x, 0);
438 zTarget = next_token(&x, &nTarget);
439 zSrc = next_token(&x, &nSrc);
440 if( zName==0 || zTarget==0 ) goto manifest_syntax_error;
441 if( p->zAttachName!=0 ) goto manifest_syntax_error;
442 defossilize(zName);
443 if( !file_is_simple_pathname(zName, 0) ){
444 SYNTAX("invalid filename on A-card");
445 }
@@ -504,11 +504,11 @@
504 }
505
506 /*
507 ** E <timestamp> <uuid>
508 **
509 ** An "event" card that contains the timestamp of the event in the
510 ** format YYYY-MM-DDtHH:MM:SS and a unique identifier for the event.
511 ** The event timestamp is distinct from the D timestamp. The D
512 ** timestamp is when the artifact was created whereas the E timestamp
513 ** is when the specific event is said to occur.
514 */
@@ -551,11 +551,11 @@
551 SYNTAX("F-card old filename is not a simple path");
552 }
553 }
554 if( p->nFile>=p->nFileAlloc ){
555 p->nFileAlloc = p->nFileAlloc*2 + 10;
556 p->aFile = fossil_realloc(p->aFile,
557 p->nFileAlloc*sizeof(p->aFile[0]) );
558 }
559 i = p->nFile++;
560 p->aFile[i].zName = zName;
561 p->aFile[i].zUuid = zUuid;
@@ -743,11 +743,11 @@
743 ** singleton tag, "*" to create a propagating tag, or "-" to create
744 ** anti-tag that undoes a prior "+" or blocks propagation of of
745 ** a "*".
746 **
747 ** The tag is applied to <uuid>. If <uuid> is "*" then the tag is
748 ** applied to the current manifest. If <value> is provided then
749 ** the tag is really a property with the given value.
750 **
751 ** Tags are not allowed in clusters. Multiple T lines are allowed.
752 */
753 case 'T': {
@@ -1050,11 +1050,11 @@
1050 db_multi_exec(
1051 "INSERT OR IGNORE INTO orphan(rid, baseline) VALUES(%d,%d)",
1052 p->rid, rid
1053 );
1054 return 1;
1055 }
1056 fossil_fatal("cannot access baseline manifest %S", p->zBaseline);
1057 }
1058 }
1059 return 0;
1060 }
@@ -1075,11 +1075,11 @@
1075 **
1076 ** Return NULL for end-of-records or if there is an error. If an error
1077 ** occurs and pErr!=0 then store 1 in *pErr.
1078 */
1079 ManifestFile *manifest_file_next(
1080 Manifest *p,
1081 int *pErr
1082 ){
1083 ManifestFile *pOut = 0;
1084 if( pErr ) *pErr = 0;
1085 if( p->pBaseline==0 ){
@@ -1219,11 +1219,11 @@
1219 content_deltify(pid, fid, 0);
1220 }
1221 }
1222
1223 /*
1224 ** Do a binary search to find a file in the p->aFile[] array.
1225 **
1226 ** As an optimization, guess that the file we seek is at index p->iFile.
1227 ** That will usually be the case. If it is not found there, then do the
1228 ** actual binary search.
1229 **
@@ -1263,18 +1263,18 @@
1263 /*
1264 ** Locate a file named zName in the aFile[] array of the given manifest.
1265 ** Return a pointer to the appropriate ManifestFile object. Return NULL
1266 ** if not found.
1267 **
1268 ** This routine works even if p is a delta-manifest. The pointer
1269 ** returned might be to the baseline.
1270 **
1271 ** We assume that filenames are in sorted order and use a binary search.
1272 */
1273 ManifestFile *manifest_file_seek(Manifest *p, const char *zName){
1274 ManifestFile *pFile;
1275
1276 pFile = manifest_file_seek_base(p, zName);
1277 if( pFile && pFile->zUuid==0 ) return 0;
1278 if( pFile==0 && p->zBaseline ){
1279 fetch_baseline(p, 1);
1280 pFile = manifest_file_seek_base(p->pBaseline, zName);
@@ -1362,15 +1362,15 @@
1362 return;
1363 }
1364 isPublic = !content_is_private(cid);
1365
1366 /* Try to make the parent manifest a delta from the child, if that
1367 ** is an appropriate thing to do. For a new baseline, make the
1368 ** previous baseline a delta from the current baseline.
1369 */
1370 if( (pParent->zBaseline==0)==(pChild->zBaseline==0) ){
1371 content_deltify(pid, cid, 0);
1372 }else if( pChild->zBaseline==0 && pParent->zBaseline!=0 ){
1373 content_deltify(pParent->pBaseline->rid, cid, 0);
1374 }
1375
1376 /* Remember all children less than a few seconds younger than their parent,
@@ -1385,11 +1385,11 @@
1385 );
1386 }
1387
1388 /* First look at all files in pChild, ignoring its baseline. This
1389 ** is where most of the changes will be found.
1390 */
1391 for(i=0, pChildFile=pChild->aFile; i<pChild->nFile; i++, pChildFile++){
1392 int mperm = manifest_file_mperm(pChildFile);
1393 if( pChildFile->zPrior ){
1394 pParentFile = manifest_file_seek(pParent, pChildFile->zPrior);
1395 if( pParentFile ){
@@ -1450,11 +1450,11 @@
1450 ** but are missing from pChild and mark them as having been deleted. */
1451 manifest_file_rewind(pParent);
1452 while( (pParentFile = manifest_file_next(pParent,0))!=0 ){
1453 pChildFile = manifest_file_seek(pChild, pParentFile->zName);
1454 if( pChildFile==0 && pParentFile->zUuid!=0 ){
1455 add_one_mlink(cid, pParentFile->zUuid, 0, pParentFile->zName, 0,
1456 isPublic, 0);
1457 }
1458 }
1459 }
1460 manifest_cache_insert(*ppOther);
@@ -1578,11 +1578,11 @@
1578 if( once ){
1579 once = 0;
1580 zTitleExpr = db_get("ticket-title-expr", "title");
1581 zStatusColumn = db_get("ticket-status-column", "status");
1582 }
1583 zTitle = db_text("unknown",
1584 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1585 zTitleExpr, pManifest->zTicketUuid
1586 );
1587 if( !isNew ){
1588 for(i=0; i<pManifest->nField; i++){
@@ -1599,11 +1599,11 @@
1599 pManifest->nField-1, pManifest->nField==2 ? "" : "s");
1600 }
1601 blob_appendf(&brief, "%h ticket [%.10s].",
1602 zNewStatus, pManifest->zTicketUuid);
1603 }else{
1604 zNewStatus = db_text("unknown",
1605 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1606 zStatusColumn, pManifest->zTicketUuid
1607 );
1608 blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with "
1609 "%d other change%s",
@@ -1661,11 +1661,11 @@
1661 **
1662 ** If the input is a control artifact, then make appropriate entries
1663 ** in the auxiliary tables of the database in order to crosslink the
1664 ** artifact.
1665 **
1666 ** If global variable g.xlinkClusterOnly is true, then ignore all
1667 ** control artifacts other than clusters.
1668 **
1669 ** This routine always resets the pContent blob before returning.
1670 **
1671 ** Historical note: This routine original processed manifests only.
@@ -1744,11 +1744,11 @@
1744 " %d,%Q,%Q,"
1745 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0),"
1746 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
1747 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),%.17g);",
1748 TAG_DATE, rid, p->rDate,
1749 rid, p->zUser, p->zComment,
1750 TAG_BGCOLOR, rid,
1751 TAG_USER, rid,
1752 TAG_COMMENT, rid, p->rDate
1753 );
1754 zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event"
@@ -1802,11 +1802,11 @@
1802 case '*': type = 2; break; /* Propagate to descendants */
1803 default:
1804 fossil_error(1, "unknown tag type in manifest: %s", p->aTag);
1805 return 0;
1806 }
1807 tag_insert(&p->aTag[i].zName[1], type, p->aTag[i].zValue,
1808 rid, p->rDate, tid);
1809 }
1810 }
1811 if( parentid ){
1812 tag_propagate_all(parentid);
@@ -1843,11 +1843,11 @@
1843 " bgcolor,euser,ecomment)"
1844 "VALUES('w',%.17g,%d,%Q,%Q,"
1845 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1),"
1846 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
1847 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1848 p->rDate, rid, p->zUser, zComment,
1849 TAG_BGCOLOR, rid,
1850 TAG_BGCOLOR, rid,
1851 TAG_USER, rid,
1852 TAG_COMMENT, rid
1853 );
@@ -1893,11 +1893,11 @@
1893 }else{
1894 db_multi_exec(
1895 "REPLACE INTO event(type,mtime,objid,tagid,user,comment,bgcolor)"
1896 "VALUES('e',%.17g,%d,%d,%Q,%Q,"
1897 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
1898 p->rEventDate, rid, tagid, p->zUser, p->zComment,
1899 TAG_BGCOLOR, rid
1900 );
1901 }
1902 }
1903 if( p->type==CFTYPE_TICKET ){
@@ -1925,11 +1925,11 @@
1925 " WHERE target=%Q AND filename=%Q",
1926 p->zAttachTarget, p->zAttachName,
1927 p->zAttachTarget, p->zAttachName
1928 );
1929 if( strlen(p->zAttachTarget)!=UUID_SIZE
1930 || !validate16(p->zAttachTarget, UUID_SIZE)
1931 ){
1932 char *zComment;
1933 if( p->zAttachSrc && p->zAttachSrc[0] ){
1934 zComment = mprintf(
1935 "Add attachment [/artifact/%S|%h] to wiki page [%h]",
1936
+1 -1
--- src/printf.c
+++ src/printf.c
@@ -859,11 +859,11 @@
859859
fwrite(z, 1, n, toStdErr ? stderr : stdout);
860860
fflush(toStdErr ? stderr : stdout);
861861
}
862862
863863
/*
864
-** Force the standard output cursor to move to the beginning
864
+** Force the standard output cursor to move to the beginning
865865
** of a line, if it is not there already.
866866
*/
867867
void fossil_force_newline(void){
868868
if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0);
869869
}
870870
--- src/printf.c
+++ src/printf.c
@@ -859,11 +859,11 @@
859 fwrite(z, 1, n, toStdErr ? stderr : stdout);
860 fflush(toStdErr ? stderr : stdout);
861 }
862
863 /*
864 ** Force the standard output cursor to move to the beginning
865 ** of a line, if it is not there already.
866 */
867 void fossil_force_newline(void){
868 if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0);
869 }
870
--- src/printf.c
+++ src/printf.c
@@ -859,11 +859,11 @@
859 fwrite(z, 1, n, toStdErr ? stderr : stdout);
860 fflush(toStdErr ? stderr : stdout);
861 }
862
863 /*
864 ** Force the standard output cursor to move to the beginning
865 ** of a line, if it is not there already.
866 */
867 void fossil_force_newline(void){
868 if( g.cgiOutput==0 && stdoutAtBOL==0 ) fossil_puts("\n", 0);
869 }
870
+12 -12
--- src/rebuild.c
+++ src/rebuild.c
@@ -47,18 +47,18 @@
4747
@ mtime INTEGER, -- When added. Seconds since 1970
4848
@ scom TEXT -- Optional text explaining why the shun occurred
4949
@ );
5050
@
5151
@ -- Artifacts that should not be pushed are stored in the "private"
52
-@ -- table.
52
+@ -- table.
5353
@ --
5454
@ CREATE TABLE IF NOT EXISTS private(rid INTEGER PRIMARY KEY);
5555
@
5656
@ -- Some ticket content (such as the originators email address or contact
5757
@ -- information) needs to be obscured to protect privacy. This is achieved
5858
@ -- by storing an SHA1 hash of the content. For display, the hash is
59
-@ -- mapped back into the original text using this table.
59
+@ -- mapped back into the original text using this table.
6060
@ --
6161
@ -- This table contains sensitive information and should not be shared
6262
@ -- with unauthorized users.
6363
@ --
6464
@ CREATE TABLE IF NOT EXISTS concealed(
@@ -153,11 +153,11 @@
153153
db_multi_exec(
154154
"ALTER TABLE concealed ADD COLUMN mtime INTEGER;"
155155
"UPDATE concealed SET mtime=now();"
156156
);
157157
}
158
-}
158
+}
159159
160160
/*
161161
** Variables used to store state information about an on-going "rebuild"
162162
** or "deconstruct".
163163
*/
@@ -227,11 +227,11 @@
227227
if( size!=blob_size(pBase) ){
228228
db_multi_exec(
229229
"UPDATE blob SET size=%d WHERE rid=%d", blob_size(pBase), rid
230230
);
231231
}
232
-
232
+
233233
/* Find all children of artifact rid */
234234
db_static_prepare(&q1, "SELECT rid FROM delta WHERE srcid=:rid");
235235
db_bind_int(&q1, ":rid", rid);
236236
bag_init(&children);
237237
while( db_step(&q1)==SQLITE_ROW ){
@@ -240,11 +240,11 @@
240240
bag_insert(&children, cid);
241241
}
242242
}
243243
nChild = bag_count(&children);
244244
db_reset(&q1);
245
-
245
+
246246
/* Crosslink the artifact */
247247
if( nChild==0 ){
248248
pUse = pBase;
249249
}else{
250250
blob_copy(&copy, pBase);
@@ -262,11 +262,11 @@
262262
free(zUuid);
263263
blob_reset(pUse);
264264
}
265265
assert( blob_is_reset(pUse) );
266266
rebuild_step_done(rid);
267
-
267
+
268268
/* Call all children recursively */
269269
rid = 0;
270270
for(cid=bag_first(&children), i=1; cid; cid=bag_next(&children, cid), i++){
271271
static Stmt q2;
272272
int sz;
@@ -687,11 +687,11 @@
687687
db_close(1);
688688
db_open_repository(g.zRepositoryName);
689689
}
690690
db_begin_transaction();
691691
create_cluster();
692
- db_end_transaction(0);
692
+ db_end_transaction(0);
693693
}
694694
695695
/*
696696
** COMMAND: test-clusters
697697
**
@@ -700,11 +700,11 @@
700700
*/
701701
void test_clusters_cmd(void){
702702
Bag pending;
703703
Stmt q;
704704
int n;
705
-
705
+
706706
db_find_and_open_repository(0, 2);
707707
bag_init(&pending);
708708
db_multi_exec(
709709
"CREATE TEMP TABLE xdone(x INTEGER PRIMARY KEY);"
710710
"INSERT INTO xdone SELECT rid FROM unclustered;"
@@ -722,11 +722,11 @@
722722
db_finalize(&q);
723723
while( bag_count(&pending)>0 ){
724724
Manifest *p;
725725
int rid = bag_first(&pending);
726726
int i;
727
-
727
+
728728
bag_remove(&pending, rid);
729729
p = manifest_get(rid, CFTYPE_CLUSTER, 0);
730730
if( p==0 ){
731731
fossil_fatal("bad cluster: rid=%d", rid);
732732
}
@@ -865,11 +865,11 @@
865865
recon_read_dir(zSubpath);
866866
}
867867
blob_init(&path, 0, 0);
868868
blob_appendf(&path, "%s", zSubpath);
869869
if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870
- fossil_fatal("some unknown error occurred while reading \"%s\"",
870
+ fossil_fatal("some unknown error occurred while reading \"%s\"",
871871
blob_str(&path));
872872
}
873873
content_put(&aContent);
874874
blob_reset(&path);
875875
blob_reset(&aContent);
@@ -922,11 +922,11 @@
922922
/* Skip the verify_before_commit() step on a reconstruct. Most artifacts
923923
** will have been changed and verification therefore takes a really, really
924924
** long time.
925925
*/
926926
verify_cancel();
927
-
927
+
928928
db_end_transaction(0);
929929
fossil_print("project-id: %s\n", db_get("project-code", 0));
930930
fossil_print("server-id: %s\n", db_get("server-code", 0));
931931
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
932932
fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword);
@@ -942,11 +942,11 @@
942942
** writes all artifacts to the file system. The DESTINATION directory
943943
** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where
944944
** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters.
945945
** If -L|--prefixlength is given, the length (default 2) of the directory
946946
** prefix can be set to 0,1,..,9 characters.
947
-**
947
+**
948948
** Options:
949949
** -R|--repository REPOSITORY deconstruct given REPOSITORY
950950
** -L|--prefixlength N set the length of the names of the DESTINATION
951951
** subdirectories to N
952952
** --private Include private artifacts.
953953
--- src/rebuild.c
+++ src/rebuild.c
@@ -47,18 +47,18 @@
47 @ mtime INTEGER, -- When added. Seconds since 1970
48 @ scom TEXT -- Optional text explaining why the shun occurred
49 @ );
50 @
51 @ -- Artifacts that should not be pushed are stored in the "private"
52 @ -- table.
53 @ --
54 @ CREATE TABLE IF NOT EXISTS private(rid INTEGER PRIMARY KEY);
55 @
56 @ -- Some ticket content (such as the originators email address or contact
57 @ -- information) needs to be obscured to protect privacy. This is achieved
58 @ -- by storing an SHA1 hash of the content. For display, the hash is
59 @ -- mapped back into the original text using this table.
60 @ --
61 @ -- This table contains sensitive information and should not be shared
62 @ -- with unauthorized users.
63 @ --
64 @ CREATE TABLE IF NOT EXISTS concealed(
@@ -153,11 +153,11 @@
153 db_multi_exec(
154 "ALTER TABLE concealed ADD COLUMN mtime INTEGER;"
155 "UPDATE concealed SET mtime=now();"
156 );
157 }
158 }
159
160 /*
161 ** Variables used to store state information about an on-going "rebuild"
162 ** or "deconstruct".
163 */
@@ -227,11 +227,11 @@
227 if( size!=blob_size(pBase) ){
228 db_multi_exec(
229 "UPDATE blob SET size=%d WHERE rid=%d", blob_size(pBase), rid
230 );
231 }
232
233 /* Find all children of artifact rid */
234 db_static_prepare(&q1, "SELECT rid FROM delta WHERE srcid=:rid");
235 db_bind_int(&q1, ":rid", rid);
236 bag_init(&children);
237 while( db_step(&q1)==SQLITE_ROW ){
@@ -240,11 +240,11 @@
240 bag_insert(&children, cid);
241 }
242 }
243 nChild = bag_count(&children);
244 db_reset(&q1);
245
246 /* Crosslink the artifact */
247 if( nChild==0 ){
248 pUse = pBase;
249 }else{
250 blob_copy(&copy, pBase);
@@ -262,11 +262,11 @@
262 free(zUuid);
263 blob_reset(pUse);
264 }
265 assert( blob_is_reset(pUse) );
266 rebuild_step_done(rid);
267
268 /* Call all children recursively */
269 rid = 0;
270 for(cid=bag_first(&children), i=1; cid; cid=bag_next(&children, cid), i++){
271 static Stmt q2;
272 int sz;
@@ -687,11 +687,11 @@
687 db_close(1);
688 db_open_repository(g.zRepositoryName);
689 }
690 db_begin_transaction();
691 create_cluster();
692 db_end_transaction(0);
693 }
694
695 /*
696 ** COMMAND: test-clusters
697 **
@@ -700,11 +700,11 @@
700 */
701 void test_clusters_cmd(void){
702 Bag pending;
703 Stmt q;
704 int n;
705
706 db_find_and_open_repository(0, 2);
707 bag_init(&pending);
708 db_multi_exec(
709 "CREATE TEMP TABLE xdone(x INTEGER PRIMARY KEY);"
710 "INSERT INTO xdone SELECT rid FROM unclustered;"
@@ -722,11 +722,11 @@
722 db_finalize(&q);
723 while( bag_count(&pending)>0 ){
724 Manifest *p;
725 int rid = bag_first(&pending);
726 int i;
727
728 bag_remove(&pending, rid);
729 p = manifest_get(rid, CFTYPE_CLUSTER, 0);
730 if( p==0 ){
731 fossil_fatal("bad cluster: rid=%d", rid);
732 }
@@ -865,11 +865,11 @@
865 recon_read_dir(zSubpath);
866 }
867 blob_init(&path, 0, 0);
868 blob_appendf(&path, "%s", zSubpath);
869 if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870 fossil_fatal("some unknown error occurred while reading \"%s\"",
871 blob_str(&path));
872 }
873 content_put(&aContent);
874 blob_reset(&path);
875 blob_reset(&aContent);
@@ -922,11 +922,11 @@
922 /* Skip the verify_before_commit() step on a reconstruct. Most artifacts
923 ** will have been changed and verification therefore takes a really, really
924 ** long time.
925 */
926 verify_cancel();
927
928 db_end_transaction(0);
929 fossil_print("project-id: %s\n", db_get("project-code", 0));
930 fossil_print("server-id: %s\n", db_get("server-code", 0));
931 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
932 fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword);
@@ -942,11 +942,11 @@
942 ** writes all artifacts to the file system. The DESTINATION directory
943 ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where
944 ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters.
945 ** If -L|--prefixlength is given, the length (default 2) of the directory
946 ** prefix can be set to 0,1,..,9 characters.
947 **
948 ** Options:
949 ** -R|--repository REPOSITORY deconstruct given REPOSITORY
950 ** -L|--prefixlength N set the length of the names of the DESTINATION
951 ** subdirectories to N
952 ** --private Include private artifacts.
953
--- src/rebuild.c
+++ src/rebuild.c
@@ -47,18 +47,18 @@
47 @ mtime INTEGER, -- When added. Seconds since 1970
48 @ scom TEXT -- Optional text explaining why the shun occurred
49 @ );
50 @
51 @ -- Artifacts that should not be pushed are stored in the "private"
52 @ -- table.
53 @ --
54 @ CREATE TABLE IF NOT EXISTS private(rid INTEGER PRIMARY KEY);
55 @
56 @ -- Some ticket content (such as the originators email address or contact
57 @ -- information) needs to be obscured to protect privacy. This is achieved
58 @ -- by storing an SHA1 hash of the content. For display, the hash is
59 @ -- mapped back into the original text using this table.
60 @ --
61 @ -- This table contains sensitive information and should not be shared
62 @ -- with unauthorized users.
63 @ --
64 @ CREATE TABLE IF NOT EXISTS concealed(
@@ -153,11 +153,11 @@
153 db_multi_exec(
154 "ALTER TABLE concealed ADD COLUMN mtime INTEGER;"
155 "UPDATE concealed SET mtime=now();"
156 );
157 }
158 }
159
160 /*
161 ** Variables used to store state information about an on-going "rebuild"
162 ** or "deconstruct".
163 */
@@ -227,11 +227,11 @@
227 if( size!=blob_size(pBase) ){
228 db_multi_exec(
229 "UPDATE blob SET size=%d WHERE rid=%d", blob_size(pBase), rid
230 );
231 }
232
233 /* Find all children of artifact rid */
234 db_static_prepare(&q1, "SELECT rid FROM delta WHERE srcid=:rid");
235 db_bind_int(&q1, ":rid", rid);
236 bag_init(&children);
237 while( db_step(&q1)==SQLITE_ROW ){
@@ -240,11 +240,11 @@
240 bag_insert(&children, cid);
241 }
242 }
243 nChild = bag_count(&children);
244 db_reset(&q1);
245
246 /* Crosslink the artifact */
247 if( nChild==0 ){
248 pUse = pBase;
249 }else{
250 blob_copy(&copy, pBase);
@@ -262,11 +262,11 @@
262 free(zUuid);
263 blob_reset(pUse);
264 }
265 assert( blob_is_reset(pUse) );
266 rebuild_step_done(rid);
267
268 /* Call all children recursively */
269 rid = 0;
270 for(cid=bag_first(&children), i=1; cid; cid=bag_next(&children, cid), i++){
271 static Stmt q2;
272 int sz;
@@ -687,11 +687,11 @@
687 db_close(1);
688 db_open_repository(g.zRepositoryName);
689 }
690 db_begin_transaction();
691 create_cluster();
692 db_end_transaction(0);
693 }
694
695 /*
696 ** COMMAND: test-clusters
697 **
@@ -700,11 +700,11 @@
700 */
701 void test_clusters_cmd(void){
702 Bag pending;
703 Stmt q;
704 int n;
705
706 db_find_and_open_repository(0, 2);
707 bag_init(&pending);
708 db_multi_exec(
709 "CREATE TEMP TABLE xdone(x INTEGER PRIMARY KEY);"
710 "INSERT INTO xdone SELECT rid FROM unclustered;"
@@ -722,11 +722,11 @@
722 db_finalize(&q);
723 while( bag_count(&pending)>0 ){
724 Manifest *p;
725 int rid = bag_first(&pending);
726 int i;
727
728 bag_remove(&pending, rid);
729 p = manifest_get(rid, CFTYPE_CLUSTER, 0);
730 if( p==0 ){
731 fossil_fatal("bad cluster: rid=%d", rid);
732 }
@@ -865,11 +865,11 @@
865 recon_read_dir(zSubpath);
866 }
867 blob_init(&path, 0, 0);
868 blob_appendf(&path, "%s", zSubpath);
869 if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870 fossil_fatal("some unknown error occurred while reading \"%s\"",
871 blob_str(&path));
872 }
873 content_put(&aContent);
874 blob_reset(&path);
875 blob_reset(&aContent);
@@ -922,11 +922,11 @@
922 /* Skip the verify_before_commit() step on a reconstruct. Most artifacts
923 ** will have been changed and verification therefore takes a really, really
924 ** long time.
925 */
926 verify_cancel();
927
928 db_end_transaction(0);
929 fossil_print("project-id: %s\n", db_get("project-code", 0));
930 fossil_print("server-id: %s\n", db_get("server-code", 0));
931 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
932 fossil_print("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword);
@@ -942,11 +942,11 @@
942 ** writes all artifacts to the file system. The DESTINATION directory
943 ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where
944 ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters.
945 ** If -L|--prefixlength is given, the length (default 2) of the directory
946 ** prefix can be set to 0,1,..,9 characters.
947 **
948 ** Options:
949 ** -R|--repository REPOSITORY deconstruct given REPOSITORY
950 ** -L|--prefixlength N set the length of the names of the DESTINATION
951 ** subdirectories to N
952 ** --private Include private artifacts.
953
+2 -2
--- src/setup.c
+++ src/setup.c
@@ -975,19 +975,19 @@
975975
@ including user "nobody", as long as (1) the User-Agent string in the
976976
@ HTTP header indicates that the request is coming from an actual human
977977
@ being and not a a robot or spider and (2) the user agent is able to
978978
@ run Javascript in order to set the href= attribute of hyperlinks. Bots
979979
@ and spiders can forge a User-Agent string that makes them seem to be a
980
- @ normal browser and they can run javascript just like browsers. But most
980
+ @ normal browser and they can run javascript just like browsers. But most
981981
@ bots do not go to that much trouble so this is normally an effective defense.</p>
982982
@
983983
@ <p>You do not normally want a bot to walk your entire repository because
984984
@ if it does, your server will end up computing diffs and annotations for
985985
@ every historical version of every file and creating ZIPs and tarballs of
986986
@ every historical check-in, which can use a lot of CPU and bandwidth
987987
@ even for relatively small projects.</p>
988
- @
988
+ @
989989
@ <p>Additional parameters that control this behavior:</p>
990990
@ <blockquote>
991991
onoff_attribute("Require mouse movement before enabling hyperlinks",
992992
"auto-hyperlink-mouseover", "ahmo", 0, 0);
993993
@ <br>
994994
--- src/setup.c
+++ src/setup.c
@@ -975,19 +975,19 @@
975 @ including user "nobody", as long as (1) the User-Agent string in the
976 @ HTTP header indicates that the request is coming from an actual human
977 @ being and not a a robot or spider and (2) the user agent is able to
978 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
979 @ and spiders can forge a User-Agent string that makes them seem to be a
980 @ normal browser and they can run javascript just like browsers. But most
981 @ bots do not go to that much trouble so this is normally an effective defense.</p>
982 @
983 @ <p>You do not normally want a bot to walk your entire repository because
984 @ if it does, your server will end up computing diffs and annotations for
985 @ every historical version of every file and creating ZIPs and tarballs of
986 @ every historical check-in, which can use a lot of CPU and bandwidth
987 @ even for relatively small projects.</p>
988 @
989 @ <p>Additional parameters that control this behavior:</p>
990 @ <blockquote>
991 onoff_attribute("Require mouse movement before enabling hyperlinks",
992 "auto-hyperlink-mouseover", "ahmo", 0, 0);
993 @ <br>
994
--- src/setup.c
+++ src/setup.c
@@ -975,19 +975,19 @@
975 @ including user "nobody", as long as (1) the User-Agent string in the
976 @ HTTP header indicates that the request is coming from an actual human
977 @ being and not a a robot or spider and (2) the user agent is able to
978 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
979 @ and spiders can forge a User-Agent string that makes them seem to be a
980 @ normal browser and they can run javascript just like browsers. But most
981 @ bots do not go to that much trouble so this is normally an effective defense.</p>
982 @
983 @ <p>You do not normally want a bot to walk your entire repository because
984 @ if it does, your server will end up computing diffs and annotations for
985 @ every historical version of every file and creating ZIPs and tarballs of
986 @ every historical check-in, which can use a lot of CPU and bandwidth
987 @ even for relatively small projects.</p>
988 @
989 @ <p>Additional parameters that control this behavior:</p>
990 @ <blockquote>
991 onoff_attribute("Require mouse movement before enabling hyperlinks",
992 "auto-hyperlink-mouseover", "ahmo", 0, 0);
993 @ <br>
994
+5 -5
--- src/timeline.c
+++ src/timeline.c
@@ -247,14 +247,14 @@
247247
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
248248
Stmt fchngQuery; /* Query for file changes on check-ins */
249249
static Stmt qbranch;
250250
int pendingEndTr = 0; /* True if a </td></tr> is needed */
251251
int vid = 0; /* Current checkout version */
252
- int dateFormat = 0; /* 0: HH:MM 1: HH:MM:SS
252
+ int dateFormat = 0; /* 0: HH:MM 1: HH:MM:SS
253253
2: YYYY-MM-DD HH:MM
254254
3: YYMMDD HH:MM */
255
-
255
+
256256
if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
257257
vid = db_lget_int("checkout", 0);
258258
}
259259
zPrevDate[0] = 0;
260260
mxWikiLen = db_get_int("timeline-max-comment", 0);
@@ -591,11 +591,11 @@
591591
){
592592
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593593
GraphRow *pRow;
594594
int i;
595595
char cSep;
596
-
596
+
597597
@ <script type="text/JavaScript">
598598
@ /* <![CDATA[ */
599599
@ var railPitch=%d(pGraph->iRailPitch);
600600
601601
/* the rowinfo[] array contains all the information needed to generate
@@ -2240,11 +2240,11 @@
22402240
if(showYearTotal){
22412241
rowClass = ++nRowNumber % 2;
22422242
@ <tr class='row%d(rowClass)'>
22432243
@ <td></td>
22442244
@ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2245
- @</tr>
2245
+ @</tr>
22462246
}
22472247
nEventsPerYear = 0;
22482248
memcpy(zPrevYear,zTimeframe,4);
22492249
rowClass = ++nRowNumber % 2;
22502250
@ <tr class='row%d(rowClass)'>
@@ -2304,11 +2304,11 @@
23042304
/* Add final year total separator. */
23052305
rowClass = ++nRowNumber % 2;
23062306
@ <tr class='row%d(rowClass)'>
23072307
@ <td></td>
23082308
@ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2309
- @</tr>
2309
+ @</tr>
23102310
}
23112311
@ </tbody></table>
23122312
if(nEventTotal){
23132313
char const * zAvgLabel = includeMonth ? "month" : "year";
23142314
int nAvg = iterations ? (nEventTotal/iterations) : 0;
23152315
--- src/timeline.c
+++ src/timeline.c
@@ -247,14 +247,14 @@
247 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
248 Stmt fchngQuery; /* Query for file changes on check-ins */
249 static Stmt qbranch;
250 int pendingEndTr = 0; /* True if a </td></tr> is needed */
251 int vid = 0; /* Current checkout version */
252 int dateFormat = 0; /* 0: HH:MM 1: HH:MM:SS
253 2: YYYY-MM-DD HH:MM
254 3: YYMMDD HH:MM */
255
256 if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
257 vid = db_lget_int("checkout", 0);
258 }
259 zPrevDate[0] = 0;
260 mxWikiLen = db_get_int("timeline-max-comment", 0);
@@ -591,11 +591,11 @@
591 ){
592 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593 GraphRow *pRow;
594 int i;
595 char cSep;
596
597 @ <script type="text/JavaScript">
598 @ /* <![CDATA[ */
599 @ var railPitch=%d(pGraph->iRailPitch);
600
601 /* the rowinfo[] array contains all the information needed to generate
@@ -2240,11 +2240,11 @@
2240 if(showYearTotal){
2241 rowClass = ++nRowNumber % 2;
2242 @ <tr class='row%d(rowClass)'>
2243 @ <td></td>
2244 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2245 @</tr>
2246 }
2247 nEventsPerYear = 0;
2248 memcpy(zPrevYear,zTimeframe,4);
2249 rowClass = ++nRowNumber % 2;
2250 @ <tr class='row%d(rowClass)'>
@@ -2304,11 +2304,11 @@
2304 /* Add final year total separator. */
2305 rowClass = ++nRowNumber % 2;
2306 @ <tr class='row%d(rowClass)'>
2307 @ <td></td>
2308 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2309 @</tr>
2310 }
2311 @ </tbody></table>
2312 if(nEventTotal){
2313 char const * zAvgLabel = includeMonth ? "month" : "year";
2314 int nAvg = iterations ? (nEventTotal/iterations) : 0;
2315
--- src/timeline.c
+++ src/timeline.c
@@ -247,14 +247,14 @@
247 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
248 Stmt fchngQuery; /* Query for file changes on check-ins */
249 static Stmt qbranch;
250 int pendingEndTr = 0; /* True if a </td></tr> is needed */
251 int vid = 0; /* Current checkout version */
252 int dateFormat = 0; /* 0: HH:MM 1: HH:MM:SS
253 2: YYYY-MM-DD HH:MM
254 3: YYMMDD HH:MM */
255
256 if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
257 vid = db_lget_int("checkout", 0);
258 }
259 zPrevDate[0] = 0;
260 mxWikiLen = db_get_int("timeline-max-comment", 0);
@@ -591,11 +591,11 @@
591 ){
592 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593 GraphRow *pRow;
594 int i;
595 char cSep;
596
597 @ <script type="text/JavaScript">
598 @ /* <![CDATA[ */
599 @ var railPitch=%d(pGraph->iRailPitch);
600
601 /* the rowinfo[] array contains all the information needed to generate
@@ -2240,11 +2240,11 @@
2240 if(showYearTotal){
2241 rowClass = ++nRowNumber % 2;
2242 @ <tr class='row%d(rowClass)'>
2243 @ <td></td>
2244 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2245 @</tr>
2246 }
2247 nEventsPerYear = 0;
2248 memcpy(zPrevYear,zTimeframe,4);
2249 rowClass = ++nRowNumber % 2;
2250 @ <tr class='row%d(rowClass)'>
@@ -2304,11 +2304,11 @@
2304 /* Add final year total separator. */
2305 rowClass = ++nRowNumber % 2;
2306 @ <tr class='row%d(rowClass)'>
2307 @ <td></td>
2308 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2309 @</tr>
2310 }
2311 @ </tbody></table>
2312 if(nEventTotal){
2313 char const * zAvgLabel = includeMonth ? "month" : "year";
2314 int nAvg = iterations ? (nEventTotal/iterations) : 0;
2315
+13 -13
--- src/wiki.c
+++ src/wiki.c
@@ -222,11 +222,11 @@
222222
zBody = db_get("sandbox",zBody);
223223
zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
224224
rid = 0;
225225
}else{
226226
zTag = mprintf("wiki-%s", zPageName);
227
- rid = db_int(0,
227
+ rid = db_int(0,
228228
"SELECT rid FROM tagxref"
229229
" WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
230230
" ORDER BY mtime DESC", zTag
231231
);
232232
free(zTag);
@@ -260,11 +260,11 @@
260260
style_submenu_element("Attach", "Add An Attachment",
261261
"%s/attachadd?page=%T&from=%s/wiki%%3fname=%T",
262262
g.zTop, zPageName, g.zTop, zPageName);
263263
}
264264
if( rid && g.perm.ApndWiki ){
265
- style_submenu_element("Append", "Add A Comment",
265
+ style_submenu_element("Append", "Add A Comment",
266266
"%s/wikiappend?name=%T&mimetype=%s",
267267
g.zTop, zPageName, zMimetype);
268268
}
269269
if( g.perm.Hyperlink ){
270270
style_submenu_element("History", "History", "%s/whistory?name=%T",
@@ -381,11 +381,11 @@
381381
zBody = db_get("sandbox","");
382382
zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
383383
}
384384
}else{
385385
zTag = mprintf("wiki-%s", zPageName);
386
- rid = db_int(0,
386
+ rid = db_int(0,
387387
"SELECT rid FROM tagxref"
388388
" WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
389389
" ORDER BY mtime DESC", zTag
390390
);
391391
free(zTag);
@@ -462,11 +462,11 @@
462462
if( !isWysiwyg ){
463463
/* Traditional markup-only editing */
464464
form_begin(0, "%R/wikiedit");
465465
@ <div>
466466
mimetype_option_menu(zMimetype);
467
- @ <br /><textarea name="w" class="wikiedit" cols="80"
467
+ @ <br /><textarea name="w" class="wikiedit" cols="80"
468468
@ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
469469
@ <br />
470470
if( db_get_boolean("wysiwyg-wiki", 0) ){
471471
@ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
472472
@ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' />
@@ -514,11 +514,11 @@
514514
const char *zMimetype;
515515
login_check_credentials();
516516
if( !g.perm.NewWiki ){
517517
login_needed();
518518
return;
519
- }
519
+ }
520520
zName = PD("name","");
521521
zMimetype = wiki_filter_mimetypes(P("mimetype"));
522522
if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
523523
if( fossil_strcmp(zMimetype,"text/x-fossil-wiki")==0
524524
&& db_get_boolean("wysiwyg-wiki", 0)
@@ -557,11 +557,11 @@
557557
zDate = db_text(0, "SELECT datetime('now')");
558558
zRemark = PD("r","");
559559
zUser = PD("u",g.zLogin);
560560
if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561561
zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562
- blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
562
+ blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563563
zId, zDate, g.zLogin);
564564
if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
565565
blob_appendf(p, " (claiming to be %h)", zUser);
566566
}
567567
blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
@@ -601,11 +601,11 @@
601601
zMimetype = wiki_filter_mimetypes(P("mimetype"));
602602
if( check_name(zPageName) ) return;
603603
isSandbox = is_sandbox(zPageName);
604604
if( !isSandbox ){
605605
zTag = mprintf("wiki-%s", zPageName);
606
- rid = db_int(0,
606
+ rid = db_int(0,
607607
"SELECT rid FROM tagxref"
608608
" WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
609609
" ORDER BY mtime DESC", zTag
610610
);
611611
free(zTag);
@@ -690,11 +690,11 @@
690690
@ <input type="hidden" name="mimetype" value="%h(zMimetype)" />
691691
@ Your Name:
692692
@ <input type="text" name="u" size="20" value="%h(zUser)" /><br />
693693
zFormat = mimetype_common_name(zMimetype);
694694
@ Comment to append (formatted as %s(zFormat)):<br />
695
- @ <textarea name="r" class="wikiedit" cols="80"
695
+ @ <textarea name="r" class="wikiedit" cols="80"
696696
@ rows="10" wrap="virtual">%h(PD("r",""))</textarea>
697697
@ <br />
698698
@ <input type="submit" name="preview" value="Preview Your Comment" />
699699
@ <input type="submit" name="submit" value="Append Your Changes" />
700700
@ <input type="submit" name="cancel" value="Cancel" />
@@ -809,11 +809,11 @@
809809
** - tagxref (whatever that really is!)
810810
**
811811
** Used by wcontent_page() and the JSON wiki code.
812812
*/
813813
void wiki_prepare_page_list( Stmt * pStmt ){
814
- db_prepare(pStmt,
814
+ db_prepare(pStmt,
815815
"SELECT"
816816
" substr(tagname, 6) as name,"
817817
" (SELECT value FROM tagxref WHERE tagid=tag.tagid ORDER BY mtime DESC) as tagXref"
818818
" FROM tag WHERE tagname GLOB 'wiki-*'"
819819
" ORDER BY lower(tagname) /*sort*/"
@@ -866,11 +866,11 @@
866866
login_check_credentials();
867867
if( !g.perm.RdWiki ){ login_needed(); return; }
868868
zTitle = PD("title","*");
869869
style_header("Wiki Pages Found");
870870
@ <ul>
871
- db_prepare(&q,
871
+ db_prepare(&q,
872872
"SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
873873
" ORDER BY lower(tagname) /*sort*/" ,
874874
zTitle);
875875
while( db_step(&q)==SQLITE_ROW ){
876876
const char *zName = db_column_text(&q, 0);
@@ -917,11 +917,11 @@
917917
@ surrounded on both sides by two or more spaces or by a tab. Only a single
918918
@ level of enumeration list is supported by wiki. For nested lists or for
919919
@ enumerations that count using letters or roman numerials, use HTML.</p></li>
920920
@ <li> <p><span class="wikiruleHead">Indented Paragraphs</span>.
921921
@ Any paragraph that begins with two or more spaces or a tab and
922
- @ which is not a bullet or enumeration list item is rendered
922
+ @ which is not a bullet or enumeration list item is rendered
923923
@ indented. Only a single level of indentation is supported by wiki; use
924924
@ HTML for deeper indentation.</p></li>
925925
@ <li> <p><span class="wikiruleHead">Hyperlinks</span>.
926926
@ Text within square brackets ("[...]") becomes a hyperlink. The
927927
@ target can be a wiki page name, the artifact ID of a check-in or ticket,
@@ -1062,11 +1062,11 @@
10621062
}
10631063
zPageName = g.argv[3];
10641064
rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
10651065
" WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
10661066
" ORDER BY x.mtime DESC LIMIT 1",
1067
- zPageName
1067
+ zPageName
10681068
);
10691069
if( (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))!=0 ){
10701070
zBody = pWiki->zWiki;
10711071
}
10721072
if( zBody==0 ){
@@ -1110,11 +1110,11 @@
11101110
}
11111111
fossil_fatal("delete not yet implemented.");
11121112
}else
11131113
if( strncmp(g.argv[2],"list",n)==0 ){
11141114
Stmt q;
1115
- db_prepare(&q,
1115
+ db_prepare(&q,
11161116
"SELECT substr(tagname, 6) FROM tag WHERE tagname GLOB 'wiki-*'"
11171117
" ORDER BY lower(tagname) /*sort*/"
11181118
);
11191119
while( db_step(&q)==SQLITE_ROW ){
11201120
const char *zName = db_column_text(&q, 0);
11211121
--- src/wiki.c
+++ src/wiki.c
@@ -222,11 +222,11 @@
222 zBody = db_get("sandbox",zBody);
223 zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
224 rid = 0;
225 }else{
226 zTag = mprintf("wiki-%s", zPageName);
227 rid = db_int(0,
228 "SELECT rid FROM tagxref"
229 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
230 " ORDER BY mtime DESC", zTag
231 );
232 free(zTag);
@@ -260,11 +260,11 @@
260 style_submenu_element("Attach", "Add An Attachment",
261 "%s/attachadd?page=%T&from=%s/wiki%%3fname=%T",
262 g.zTop, zPageName, g.zTop, zPageName);
263 }
264 if( rid && g.perm.ApndWiki ){
265 style_submenu_element("Append", "Add A Comment",
266 "%s/wikiappend?name=%T&mimetype=%s",
267 g.zTop, zPageName, zMimetype);
268 }
269 if( g.perm.Hyperlink ){
270 style_submenu_element("History", "History", "%s/whistory?name=%T",
@@ -381,11 +381,11 @@
381 zBody = db_get("sandbox","");
382 zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
383 }
384 }else{
385 zTag = mprintf("wiki-%s", zPageName);
386 rid = db_int(0,
387 "SELECT rid FROM tagxref"
388 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
389 " ORDER BY mtime DESC", zTag
390 );
391 free(zTag);
@@ -462,11 +462,11 @@
462 if( !isWysiwyg ){
463 /* Traditional markup-only editing */
464 form_begin(0, "%R/wikiedit");
465 @ <div>
466 mimetype_option_menu(zMimetype);
467 @ <br /><textarea name="w" class="wikiedit" cols="80"
468 @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
469 @ <br />
470 if( db_get_boolean("wysiwyg-wiki", 0) ){
471 @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
472 @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' />
@@ -514,11 +514,11 @@
514 const char *zMimetype;
515 login_check_credentials();
516 if( !g.perm.NewWiki ){
517 login_needed();
518 return;
519 }
520 zName = PD("name","");
521 zMimetype = wiki_filter_mimetypes(P("mimetype"));
522 if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
523 if( fossil_strcmp(zMimetype,"text/x-fossil-wiki")==0
524 && db_get_boolean("wysiwyg-wiki", 0)
@@ -557,11 +557,11 @@
557 zDate = db_text(0, "SELECT datetime('now')");
558 zRemark = PD("r","");
559 zUser = PD("u",g.zLogin);
560 if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561 zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562 blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563 zId, zDate, g.zLogin);
564 if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
565 blob_appendf(p, " (claiming to be %h)", zUser);
566 }
567 blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
@@ -601,11 +601,11 @@
601 zMimetype = wiki_filter_mimetypes(P("mimetype"));
602 if( check_name(zPageName) ) return;
603 isSandbox = is_sandbox(zPageName);
604 if( !isSandbox ){
605 zTag = mprintf("wiki-%s", zPageName);
606 rid = db_int(0,
607 "SELECT rid FROM tagxref"
608 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
609 " ORDER BY mtime DESC", zTag
610 );
611 free(zTag);
@@ -690,11 +690,11 @@
690 @ <input type="hidden" name="mimetype" value="%h(zMimetype)" />
691 @ Your Name:
692 @ <input type="text" name="u" size="20" value="%h(zUser)" /><br />
693 zFormat = mimetype_common_name(zMimetype);
694 @ Comment to append (formatted as %s(zFormat)):<br />
695 @ <textarea name="r" class="wikiedit" cols="80"
696 @ rows="10" wrap="virtual">%h(PD("r",""))</textarea>
697 @ <br />
698 @ <input type="submit" name="preview" value="Preview Your Comment" />
699 @ <input type="submit" name="submit" value="Append Your Changes" />
700 @ <input type="submit" name="cancel" value="Cancel" />
@@ -809,11 +809,11 @@
809 ** - tagxref (whatever that really is!)
810 **
811 ** Used by wcontent_page() and the JSON wiki code.
812 */
813 void wiki_prepare_page_list( Stmt * pStmt ){
814 db_prepare(pStmt,
815 "SELECT"
816 " substr(tagname, 6) as name,"
817 " (SELECT value FROM tagxref WHERE tagid=tag.tagid ORDER BY mtime DESC) as tagXref"
818 " FROM tag WHERE tagname GLOB 'wiki-*'"
819 " ORDER BY lower(tagname) /*sort*/"
@@ -866,11 +866,11 @@
866 login_check_credentials();
867 if( !g.perm.RdWiki ){ login_needed(); return; }
868 zTitle = PD("title","*");
869 style_header("Wiki Pages Found");
870 @ <ul>
871 db_prepare(&q,
872 "SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
873 " ORDER BY lower(tagname) /*sort*/" ,
874 zTitle);
875 while( db_step(&q)==SQLITE_ROW ){
876 const char *zName = db_column_text(&q, 0);
@@ -917,11 +917,11 @@
917 @ surrounded on both sides by two or more spaces or by a tab. Only a single
918 @ level of enumeration list is supported by wiki. For nested lists or for
919 @ enumerations that count using letters or roman numerials, use HTML.</p></li>
920 @ <li> <p><span class="wikiruleHead">Indented Paragraphs</span>.
921 @ Any paragraph that begins with two or more spaces or a tab and
922 @ which is not a bullet or enumeration list item is rendered
923 @ indented. Only a single level of indentation is supported by wiki; use
924 @ HTML for deeper indentation.</p></li>
925 @ <li> <p><span class="wikiruleHead">Hyperlinks</span>.
926 @ Text within square brackets ("[...]") becomes a hyperlink. The
927 @ target can be a wiki page name, the artifact ID of a check-in or ticket,
@@ -1062,11 +1062,11 @@
1062 }
1063 zPageName = g.argv[3];
1064 rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1065 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1066 " ORDER BY x.mtime DESC LIMIT 1",
1067 zPageName
1068 );
1069 if( (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))!=0 ){
1070 zBody = pWiki->zWiki;
1071 }
1072 if( zBody==0 ){
@@ -1110,11 +1110,11 @@
1110 }
1111 fossil_fatal("delete not yet implemented.");
1112 }else
1113 if( strncmp(g.argv[2],"list",n)==0 ){
1114 Stmt q;
1115 db_prepare(&q,
1116 "SELECT substr(tagname, 6) FROM tag WHERE tagname GLOB 'wiki-*'"
1117 " ORDER BY lower(tagname) /*sort*/"
1118 );
1119 while( db_step(&q)==SQLITE_ROW ){
1120 const char *zName = db_column_text(&q, 0);
1121
--- src/wiki.c
+++ src/wiki.c
@@ -222,11 +222,11 @@
222 zBody = db_get("sandbox",zBody);
223 zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
224 rid = 0;
225 }else{
226 zTag = mprintf("wiki-%s", zPageName);
227 rid = db_int(0,
228 "SELECT rid FROM tagxref"
229 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
230 " ORDER BY mtime DESC", zTag
231 );
232 free(zTag);
@@ -260,11 +260,11 @@
260 style_submenu_element("Attach", "Add An Attachment",
261 "%s/attachadd?page=%T&from=%s/wiki%%3fname=%T",
262 g.zTop, zPageName, g.zTop, zPageName);
263 }
264 if( rid && g.perm.ApndWiki ){
265 style_submenu_element("Append", "Add A Comment",
266 "%s/wikiappend?name=%T&mimetype=%s",
267 g.zTop, zPageName, zMimetype);
268 }
269 if( g.perm.Hyperlink ){
270 style_submenu_element("History", "History", "%s/whistory?name=%T",
@@ -381,11 +381,11 @@
381 zBody = db_get("sandbox","");
382 zMimetype = db_get("sandbox-mimetype","text/x-fossil-wiki");
383 }
384 }else{
385 zTag = mprintf("wiki-%s", zPageName);
386 rid = db_int(0,
387 "SELECT rid FROM tagxref"
388 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
389 " ORDER BY mtime DESC", zTag
390 );
391 free(zTag);
@@ -462,11 +462,11 @@
462 if( !isWysiwyg ){
463 /* Traditional markup-only editing */
464 form_begin(0, "%R/wikiedit");
465 @ <div>
466 mimetype_option_menu(zMimetype);
467 @ <br /><textarea name="w" class="wikiedit" cols="80"
468 @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea>
469 @ <br />
470 if( db_get_boolean("wysiwyg-wiki", 0) ){
471 @ <input type="submit" name="edit-wysiwyg" value="Wysiwyg Editor"
472 @ onclick='return confirm("Switching to WYSIWYG-mode\nwill erase your markup\nedits. Continue?")' />
@@ -514,11 +514,11 @@
514 const char *zMimetype;
515 login_check_credentials();
516 if( !g.perm.NewWiki ){
517 login_needed();
518 return;
519 }
520 zName = PD("name","");
521 zMimetype = wiki_filter_mimetypes(P("mimetype"));
522 if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){
523 if( fossil_strcmp(zMimetype,"text/x-fossil-wiki")==0
524 && db_get_boolean("wysiwyg-wiki", 0)
@@ -557,11 +557,11 @@
557 zDate = db_text(0, "SELECT datetime('now')");
558 zRemark = PD("r","");
559 zUser = PD("u",g.zLogin);
560 if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561 zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562 blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563 zId, zDate, g.zLogin);
564 if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
565 blob_appendf(p, " (claiming to be %h)", zUser);
566 }
567 blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
@@ -601,11 +601,11 @@
601 zMimetype = wiki_filter_mimetypes(P("mimetype"));
602 if( check_name(zPageName) ) return;
603 isSandbox = is_sandbox(zPageName);
604 if( !isSandbox ){
605 zTag = mprintf("wiki-%s", zPageName);
606 rid = db_int(0,
607 "SELECT rid FROM tagxref"
608 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
609 " ORDER BY mtime DESC", zTag
610 );
611 free(zTag);
@@ -690,11 +690,11 @@
690 @ <input type="hidden" name="mimetype" value="%h(zMimetype)" />
691 @ Your Name:
692 @ <input type="text" name="u" size="20" value="%h(zUser)" /><br />
693 zFormat = mimetype_common_name(zMimetype);
694 @ Comment to append (formatted as %s(zFormat)):<br />
695 @ <textarea name="r" class="wikiedit" cols="80"
696 @ rows="10" wrap="virtual">%h(PD("r",""))</textarea>
697 @ <br />
698 @ <input type="submit" name="preview" value="Preview Your Comment" />
699 @ <input type="submit" name="submit" value="Append Your Changes" />
700 @ <input type="submit" name="cancel" value="Cancel" />
@@ -809,11 +809,11 @@
809 ** - tagxref (whatever that really is!)
810 **
811 ** Used by wcontent_page() and the JSON wiki code.
812 */
813 void wiki_prepare_page_list( Stmt * pStmt ){
814 db_prepare(pStmt,
815 "SELECT"
816 " substr(tagname, 6) as name,"
817 " (SELECT value FROM tagxref WHERE tagid=tag.tagid ORDER BY mtime DESC) as tagXref"
818 " FROM tag WHERE tagname GLOB 'wiki-*'"
819 " ORDER BY lower(tagname) /*sort*/"
@@ -866,11 +866,11 @@
866 login_check_credentials();
867 if( !g.perm.RdWiki ){ login_needed(); return; }
868 zTitle = PD("title","*");
869 style_header("Wiki Pages Found");
870 @ <ul>
871 db_prepare(&q,
872 "SELECT substr(tagname, 6, 1000) FROM tag WHERE tagname like 'wiki-%%%q%%'"
873 " ORDER BY lower(tagname) /*sort*/" ,
874 zTitle);
875 while( db_step(&q)==SQLITE_ROW ){
876 const char *zName = db_column_text(&q, 0);
@@ -917,11 +917,11 @@
917 @ surrounded on both sides by two or more spaces or by a tab. Only a single
918 @ level of enumeration list is supported by wiki. For nested lists or for
919 @ enumerations that count using letters or roman numerials, use HTML.</p></li>
920 @ <li> <p><span class="wikiruleHead">Indented Paragraphs</span>.
921 @ Any paragraph that begins with two or more spaces or a tab and
922 @ which is not a bullet or enumeration list item is rendered
923 @ indented. Only a single level of indentation is supported by wiki; use
924 @ HTML for deeper indentation.</p></li>
925 @ <li> <p><span class="wikiruleHead">Hyperlinks</span>.
926 @ Text within square brackets ("[...]") becomes a hyperlink. The
927 @ target can be a wiki page name, the artifact ID of a check-in or ticket,
@@ -1062,11 +1062,11 @@
1062 }
1063 zPageName = g.argv[3];
1064 rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1065 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1066 " ORDER BY x.mtime DESC LIMIT 1",
1067 zPageName
1068 );
1069 if( (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))!=0 ){
1070 zBody = pWiki->zWiki;
1071 }
1072 if( zBody==0 ){
@@ -1110,11 +1110,11 @@
1110 }
1111 fossil_fatal("delete not yet implemented.");
1112 }else
1113 if( strncmp(g.argv[2],"list",n)==0 ){
1114 Stmt q;
1115 db_prepare(&q,
1116 "SELECT substr(tagname, 6) FROM tag WHERE tagname GLOB 'wiki-*'"
1117 " ORDER BY lower(tagname) /*sort*/"
1118 );
1119 while( db_step(&q)==SQLITE_ROW ){
1120 const char *zName = db_column_text(&q, 0);
1121
+7 -7
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -228,18 +228,18 @@
228228
@ <div id="wysiwygBox"
229229
@ style="resize:both; overflow:auto; width: %d(w)em; height: %d(h)em;"
230230
@ contenteditable="true">%s(zContent)</div>
231231
@ <script>
232232
@ var oDoc;
233
- @
233
+ @
234234
@ /* Initialize the document editor */
235235
@ function initDoc() {
236236
@ oDoc = document.getElementById("wysiwygBox");
237237
@ if (!isWysiwyg()) { setDocMode(true); }
238238
@ }
239
- @
240
- @ /* Return true if the document editor is in WYSIWYG mode. Return
239
+ @
240
+ @ /* Return true if the document editor is in WYSIWYG mode. Return
241241
@ ** false if it is in Markup mode */
242242
@ function isWysiwyg() {
243243
@ return document.getElementById("editMode").selectedIndex==0;
244244
@ }
245245
@
@@ -247,22 +247,22 @@
247247
@ ** to the server */
248248
@ function wysiwygSubmit() {
249249
@ if(oDoc.style.whiteSpace=="pre-wrap"){setDocMode(0);}
250250
@ document.getElementById("wysiwygValue").value=oDoc.innerHTML;
251251
@ }
252
- @
253
- @ /* Run the editing command if in WYSIWYG mode */
252
+ @
253
+ @ /* Run the editing command if in WYSIWYG mode */
254254
@ function formatDoc(sCmd, sValue) {
255255
@ if (isWysiwyg()){
256256
@ document.execCommand("styleWithCSS", false, false);
257257
@ document.execCommand(sCmd, false, sValue);
258258
@ oDoc.focus();
259259
@ }
260260
@ }
261
- @
261
+ @
262262
@ /* Change the editing mode. Convert to markup if the argument
263
- @ ** is true and wysiwyg if the argument is false. */
263
+ @ ** is true and wysiwyg if the argument is false. */
264264
@ function setDocMode(bToMarkup) {
265265
@ var oContent;
266266
@ if (bToMarkup) {
267267
@ /* WYSIWYG -> Markup */
268268
@ var linebreak = new RegExp("</p><p>","ig");
269269
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -228,18 +228,18 @@
228 @ <div id="wysiwygBox"
229 @ style="resize:both; overflow:auto; width: %d(w)em; height: %d(h)em;"
230 @ contenteditable="true">%s(zContent)</div>
231 @ <script>
232 @ var oDoc;
233 @
234 @ /* Initialize the document editor */
235 @ function initDoc() {
236 @ oDoc = document.getElementById("wysiwygBox");
237 @ if (!isWysiwyg()) { setDocMode(true); }
238 @ }
239 @
240 @ /* Return true if the document editor is in WYSIWYG mode. Return
241 @ ** false if it is in Markup mode */
242 @ function isWysiwyg() {
243 @ return document.getElementById("editMode").selectedIndex==0;
244 @ }
245 @
@@ -247,22 +247,22 @@
247 @ ** to the server */
248 @ function wysiwygSubmit() {
249 @ if(oDoc.style.whiteSpace=="pre-wrap"){setDocMode(0);}
250 @ document.getElementById("wysiwygValue").value=oDoc.innerHTML;
251 @ }
252 @
253 @ /* Run the editing command if in WYSIWYG mode */
254 @ function formatDoc(sCmd, sValue) {
255 @ if (isWysiwyg()){
256 @ document.execCommand("styleWithCSS", false, false);
257 @ document.execCommand(sCmd, false, sValue);
258 @ oDoc.focus();
259 @ }
260 @ }
261 @
262 @ /* Change the editing mode. Convert to markup if the argument
263 @ ** is true and wysiwyg if the argument is false. */
264 @ function setDocMode(bToMarkup) {
265 @ var oContent;
266 @ if (bToMarkup) {
267 @ /* WYSIWYG -> Markup */
268 @ var linebreak = new RegExp("</p><p>","ig");
269
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -228,18 +228,18 @@
228 @ <div id="wysiwygBox"
229 @ style="resize:both; overflow:auto; width: %d(w)em; height: %d(h)em;"
230 @ contenteditable="true">%s(zContent)</div>
231 @ <script>
232 @ var oDoc;
233 @
234 @ /* Initialize the document editor */
235 @ function initDoc() {
236 @ oDoc = document.getElementById("wysiwygBox");
237 @ if (!isWysiwyg()) { setDocMode(true); }
238 @ }
239 @
240 @ /* Return true if the document editor is in WYSIWYG mode. Return
241 @ ** false if it is in Markup mode */
242 @ function isWysiwyg() {
243 @ return document.getElementById("editMode").selectedIndex==0;
244 @ }
245 @
@@ -247,22 +247,22 @@
247 @ ** to the server */
248 @ function wysiwygSubmit() {
249 @ if(oDoc.style.whiteSpace=="pre-wrap"){setDocMode(0);}
250 @ document.getElementById("wysiwygValue").value=oDoc.innerHTML;
251 @ }
252 @
253 @ /* Run the editing command if in WYSIWYG mode */
254 @ function formatDoc(sCmd, sValue) {
255 @ if (isWysiwyg()){
256 @ document.execCommand("styleWithCSS", false, false);
257 @ document.execCommand(sCmd, false, sValue);
258 @ oDoc.focus();
259 @ }
260 @ }
261 @
262 @ /* Change the editing mode. Convert to markup if the argument
263 @ ** is true and wysiwyg if the argument is false. */
264 @ function setDocMode(bToMarkup) {
265 @ var oContent;
266 @ if (bToMarkup) {
267 @ /* WYSIWYG -> Markup */
268 @ var linebreak = new RegExp("</p><p>","ig");
269
+5 -5
--- src/zip.c
+++ src/zip.c
@@ -158,17 +158,17 @@
158158
put16(&zHdr[8], iMethod);
159159
put16(&zHdr[10], dosTime);
160160
put16(&zHdr[12], dosDate);
161161
put16(&zHdr[26], nameLen);
162162
put16(&zHdr[28], 13);
163
-
163
+
164164
put16(&zExTime[0], 0x5455);
165165
put16(&zExTime[2], 9);
166166
zExTime[4] = 3;
167167
put32(&zExTime[5], unixTime);
168168
put32(&zExTime[9], unixTime);
169
-
169
+
170170
171171
/* Write the header and filename.
172172
*/
173173
iStart = blob_size(&body);
174174
blob_append(&body, zHdr, 30);
@@ -202,19 +202,19 @@
202202
blob_append(&body, zOutBuf, toOut);
203203
}while( stream.avail_out==0 );
204204
nByte = stream.total_in;
205205
nByteCompr = stream.total_out;
206206
deflateEnd(&stream);
207
-
207
+
208208
/* Go back and write the header, now that we know the compressed file size.
209209
*/
210210
z = &blob_buffer(&body)[iStart];
211211
put32(&z[14], iCRC);
212212
put32(&z[18], nByteCompr);
213213
put32(&z[22], nByte);
214214
}
215
-
215
+
216216
/* Make an entry in the tables of contents
217217
*/
218218
memset(zBuf, 0, sizeof(zBuf));
219219
put32(&zBuf[0], 0x02014b50);
220220
put16(&zBuf[4], 0x0317);
@@ -322,11 +322,11 @@
322322
Blob mfile, hash, file;
323323
Manifest *pManifest;
324324
ManifestFile *pFile;
325325
Blob filename;
326326
int nPrefix;
327
-
327
+
328328
content_get(rid, &mfile);
329329
if( blob_size(&mfile)==0 ){
330330
blob_zero(pZip);
331331
return;
332332
}
333333
--- src/zip.c
+++ src/zip.c
@@ -158,17 +158,17 @@
158 put16(&zHdr[8], iMethod);
159 put16(&zHdr[10], dosTime);
160 put16(&zHdr[12], dosDate);
161 put16(&zHdr[26], nameLen);
162 put16(&zHdr[28], 13);
163
164 put16(&zExTime[0], 0x5455);
165 put16(&zExTime[2], 9);
166 zExTime[4] = 3;
167 put32(&zExTime[5], unixTime);
168 put32(&zExTime[9], unixTime);
169
170
171 /* Write the header and filename.
172 */
173 iStart = blob_size(&body);
174 blob_append(&body, zHdr, 30);
@@ -202,19 +202,19 @@
202 blob_append(&body, zOutBuf, toOut);
203 }while( stream.avail_out==0 );
204 nByte = stream.total_in;
205 nByteCompr = stream.total_out;
206 deflateEnd(&stream);
207
208 /* Go back and write the header, now that we know the compressed file size.
209 */
210 z = &blob_buffer(&body)[iStart];
211 put32(&z[14], iCRC);
212 put32(&z[18], nByteCompr);
213 put32(&z[22], nByte);
214 }
215
216 /* Make an entry in the tables of contents
217 */
218 memset(zBuf, 0, sizeof(zBuf));
219 put32(&zBuf[0], 0x02014b50);
220 put16(&zBuf[4], 0x0317);
@@ -322,11 +322,11 @@
322 Blob mfile, hash, file;
323 Manifest *pManifest;
324 ManifestFile *pFile;
325 Blob filename;
326 int nPrefix;
327
328 content_get(rid, &mfile);
329 if( blob_size(&mfile)==0 ){
330 blob_zero(pZip);
331 return;
332 }
333
--- src/zip.c
+++ src/zip.c
@@ -158,17 +158,17 @@
158 put16(&zHdr[8], iMethod);
159 put16(&zHdr[10], dosTime);
160 put16(&zHdr[12], dosDate);
161 put16(&zHdr[26], nameLen);
162 put16(&zHdr[28], 13);
163
164 put16(&zExTime[0], 0x5455);
165 put16(&zExTime[2], 9);
166 zExTime[4] = 3;
167 put32(&zExTime[5], unixTime);
168 put32(&zExTime[9], unixTime);
169
170
171 /* Write the header and filename.
172 */
173 iStart = blob_size(&body);
174 blob_append(&body, zHdr, 30);
@@ -202,19 +202,19 @@
202 blob_append(&body, zOutBuf, toOut);
203 }while( stream.avail_out==0 );
204 nByte = stream.total_in;
205 nByteCompr = stream.total_out;
206 deflateEnd(&stream);
207
208 /* Go back and write the header, now that we know the compressed file size.
209 */
210 z = &blob_buffer(&body)[iStart];
211 put32(&z[14], iCRC);
212 put32(&z[18], nByteCompr);
213 put32(&z[22], nByte);
214 }
215
216 /* Make an entry in the tables of contents
217 */
218 memset(zBuf, 0, sizeof(zBuf));
219 put32(&zBuf[0], 0x02014b50);
220 put16(&zBuf[4], 0x0317);
@@ -322,11 +322,11 @@
322 Blob mfile, hash, file;
323 Manifest *pManifest;
324 ManifestFile *pFile;
325 Blob filename;
326 int nPrefix;
327
328 content_get(rid, &mfile);
329 if( blob_size(&mfile)==0 ){
330 blob_zero(pZip);
331 return;
332 }
333

Keyboard Shortcuts

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