Fossil SCM

Merge the "moderation" branch into trunk. This adds the ability to have an approval process for edits to Wiki and Tickets, including creating new Wiki and Tickets and adding attachments. Probably there are still some problems, but things are working well enough for trunk.

drh 2012-11-02 02:36 trunk merge
Commit ba418ee1ce46d43986ba7e169f11f53d1f9c2738
+256 -55
--- src/attach.c
+++ src/attach.c
@@ -41,11 +41,13 @@
4141
4242
if( zPage && zTkt ) zTkt = 0;
4343
login_check_credentials();
4444
blob_zero(&sql);
4545
blob_append(&sql,
46
- "SELECT datetime(mtime,'localtime'), src, target, filename, comment, user"
46
+ "SELECT datetime(mtime,'localtime'), src, target, filename,"
47
+ " comment, user,"
48
+ " (SELECT uuid FROM blob WHERE rid=attachid), attachid"
4749
" FROM attachment",
4850
-1
4951
);
5052
if( zPage ){
5153
if( g.perm.RdWiki==0 ) login_needed();
@@ -59,17 +61,20 @@
5961
if( g.perm.RdTkt==0 && g.perm.RdWiki==0 ) login_needed();
6062
style_header("All Attachments");
6163
}
6264
blob_appendf(&sql, " ORDER BY mtime DESC");
6365
db_prepare(&q, "%s", blob_str(&sql));
66
+ @ <ol>
6467
while( db_step(&q)==SQLITE_ROW ){
6568
const char *zDate = db_column_text(&q, 0);
6669
const char *zSrc = db_column_text(&q, 1);
6770
const char *zTarget = db_column_text(&q, 2);
6871
const char *zFilename = db_column_text(&q, 3);
6972
const char *zComment = db_column_text(&q, 4);
7073
const char *zUser = db_column_text(&q, 5);
74
+ const char *zUuid = db_column_text(&q, 6);
75
+ int attachid = db_column_int(&q, 7);
7176
int i;
7277
char *zUrlTail;
7378
for(i=0; zFilename[i]; i++){
7479
if( zFilename[i]=='/' && zFilename[i+1]!=0 ){
7580
zFilename = &zFilename[i+1];
@@ -79,12 +84,16 @@
7984
if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
8085
zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
8186
}else{
8287
zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
8388
}
84
- @
85
- @ <p><a href="/attachview?%s(zUrlTail)">%h(zFilename)</a>
89
+ @ <li><p>
90
+ @ Attachment %z(href("%R/ainfo/%s",zUuid))%S(zUuid)</a>
91
+ if( moderation_pending(attachid) ){
92
+ @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
93
+ }
94
+ @ <br><a href="/attachview?%s(zUrlTail)">%h(zFilename)</a>
8695
@ [<a href="/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
8796
if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
8897
if( zComment && zComment[0] ){
8998
@ %w(zComment)<br />
9099
}
@@ -111,10 +120,11 @@
111120
@ by %h(zUser) on
112121
hyperlink_to_date(zDate, ".");
113122
free(zUrlTail);
114123
}
115124
db_finalize(&q);
125
+ @ </ol>
116126
style_footer();
117127
return;
118128
}
119129
120130
/*
@@ -182,10 +192,34 @@
182192
cgi_replace_parameter("m", mimetype_from_name(zFile));
183193
rawartifact_page();
184194
}
185195
}
186196
197
+/*
198
+** Save an attachment control artifact into the repository
199
+*/
200
+static void attach_put(
201
+ Blob *pAttach, /* Text of the Attachment record */
202
+ int attachRid, /* RID for the file that is being attached */
203
+ int needMod /* True if the attachment is subject to moderation */
204
+){
205
+ int rid;
206
+ if( needMod ){
207
+ rid = content_put_ex(pAttach, 0, 0, 0, 1);
208
+ moderation_table_create();
209
+ db_multi_exec(
210
+ "INSERT INTO modreq(objid,attachRid) VALUES(%d,%d);",
211
+ rid, attachRid
212
+ );
213
+ }else{
214
+ rid = content_put(pAttach);
215
+ db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
216
+ db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
217
+ }
218
+ manifest_crosslink(rid, pAttach);
219
+}
220
+
187221
188222
/*
189223
** WEBPAGE: attachadd
190224
**
191225
** tkt=TICKETUUID
@@ -240,10 +274,11 @@
240274
char *zDate;
241275
int rid;
242276
int i, n;
243277
int addCompress = 0;
244278
Manifest *pManifest;
279
+ int needModerator;
245280
246281
db_begin_transaction();
247282
blob_init(&content, aContent, szContent);
248283
pManifest = manifest_parse(&content, 0, 0);
249284
manifest_destroy(pManifest);
@@ -250,11 +285,14 @@
250285
blob_init(&content, aContent, szContent);
251286
if( pManifest ){
252287
blob_compress(&content, &content);
253288
addCompress = 1;
254289
}
255
- rid = content_put(&content);
290
+ needModerator =
291
+ (zTkt!=0 && g.perm.ModTkt==0 && db_get_boolean("modreq-tkt",0)==1) ||
292
+ (zPage!=0 && g.perm.ModWiki==0 && db_get_boolean("modreq-wiki",0)==1);
293
+ rid = content_put_ex(&content, 0, 0, 0, needModerator);
256294
zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
257295
blob_zero(&manifest);
258296
for(i=n=0; zName[i]; i++){
259297
if( zName[i]=='/' || zName[i]=='\\' ) n = i;
260298
}
@@ -272,12 +310,11 @@
272310
zDate = date_in_standard_format("now");
273311
blob_appendf(&manifest, "D %s\n", zDate);
274312
blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
275313
md5sum_blob(&manifest, &cksum);
276314
blob_appendf(&manifest, "Z %b\n", &cksum);
277
- rid = content_put(&manifest);
278
- manifest_crosslink(rid, &manifest);
315
+ attach_put(&manifest, rid, needModerator);
279316
assert( blob_is_reset(&manifest) );
280317
db_end_transaction(0);
281318
cgi_redirect(zFrom);
282319
}
283320
style_header("Add Attachment");
@@ -298,50 +335,85 @@
298335
@ <input type="submit" name="cancel" value="Cancel" />
299336
@ </div></form>
300337
style_footer();
301338
}
302339
303
-
304
-/*
305
-** WEBPAGE: attachdelete
306
-**
307
-** tkt=TICKETUUID
308
-** page=WIKIPAGE
309
-** file=FILENAME
310
-**
311
-** "Delete" an attachment. Because objects in Fossil are immutable
312
-** the attachment isn't really deleted. Instead, we change the content
313
-** of the attachment to NULL, which the system understands as being
314
-** deleted. Historical values of the attachment are preserved.
315
-*/
316
-void attachdel_page(void){
317
- const char *zPage = P("page");
318
- const char *zTkt = P("tkt");
319
- const char *zFile = P("file");
320
- const char *zFrom = P("from");
321
- const char *zTarget;
322
-
323
- if( zPage && zTkt ) fossil_redirect_home();
324
- if( zPage==0 && zTkt==0 ) fossil_redirect_home();
325
- if( zFile==0 ) fossil_redirect_home();
340
+/*
341
+** WEBPAGE: ainfo
342
+** URL: /ainfo?name=ARTIFACTID
343
+**
344
+** Show the details of an attachment artifact.
345
+*/
346
+void ainfo_page(void){
347
+ int rid; /* RID for the control artifact */
348
+ int ridSrc; /* RID for the attached file */
349
+ char *zDate; /* Date attached */
350
+ const char *zUuid; /* UUID of the control artifact */
351
+ Manifest *pAttach; /* Parse of the control artifact */
352
+ const char *zTarget; /* Wiki or ticket attached to */
353
+ const char *zSrc; /* UUID of the attached file */
354
+ const char *zName; /* Name of the attached file */
355
+ const char *zDesc; /* Description of the attached file */
356
+ const char *zWikiName = 0; /* Wiki page name when attached to Wiki */
357
+ const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */
358
+ int modPending; /* True if awaiting moderation */
359
+ const char *zModAction; /* Moderation action or NULL */
360
+ int isModerator; /* TRUE if user is the moderator */
361
+ const char *zMime; /* MIME Type */
362
+ Blob attach; /* Content of the attachment */
363
+ int wantToDelete = P("del")!=0;/* Want to delete */
364
+
326365
login_check_credentials();
327
- if( zPage ){
328
- if( g.perm.WrWiki==0 || g.perm.Attach==0 ) login_needed();
329
- zTarget = zPage;
330
- }else{
331
- if( g.perm.WrTkt==0 || g.perm.Attach==0 ) login_needed();
332
- zTarget = zTkt;
333
- }
334
- if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
335
- if( P("cancel") ){
336
- cgi_redirect(zFrom);
337
- }
338
- if( P("confirm") ){
366
+ if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; }
367
+ rid = name_to_rid_www("name");
368
+ if( rid==0 ){ fossil_redirect_home(); }
369
+ zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
370
+#if 0
371
+ /* Shunning here needs to get both the attachment control artifact and
372
+ ** the object that is attached. */
373
+ if( g.perm.Admin ){
374
+ if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
375
+ style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
376
+ g.zTop, zUuid);
377
+ }else{
378
+ style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
379
+ g.zTop, zUuid);
380
+ }
381
+ }
382
+#endif
383
+ pAttach = manifest_get(rid, CFTYPE_ATTACHMENT);
384
+ if( pAttach==0 ) fossil_redirect_home();
385
+ zTarget = pAttach->zAttachTarget;
386
+ zSrc = pAttach->zAttachSrc;
387
+ ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc);
388
+ zName = pAttach->zAttachName;
389
+ zDesc = pAttach->zComment;
390
+ if( validate16(zTarget, strlen(zTarget))
391
+ && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget)
392
+ ){
393
+ zTktUuid = zTarget;
394
+ if( !g.perm.RdTkt ){ login_needed(); return; }
395
+ if( g.perm.WrTkt ){
396
+ style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid);
397
+ }
398
+ }else if( db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'",zTarget) ){
399
+ zWikiName = zTarget;
400
+ if( !g.perm.RdWiki ){ login_needed(); return; }
401
+ if( g.perm.WrWiki ){
402
+ style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid);
403
+ }
404
+ }
405
+ zDate = db_text(0, "SELECT datetime(%.12f)", pAttach->rDate);
406
+
407
+ if( P("confirm")
408
+ && ((zTktUuid && g.perm.WrTkt) || (zWikiName && g.perm.WrWiki))
409
+ ){
339410
int i, n, rid;
340411
char *zDate;
341412
Blob manifest;
342413
Blob cksum;
414
+ const char *zFile = zName;
343415
344416
db_begin_transaction();
345417
blob_zero(&manifest);
346418
for(i=n=0; zFile[i]; i++){
347419
if( zFile[i]=='/' || zFile[i]=='\\' ) n = i;
@@ -355,24 +427,153 @@
355427
md5sum_blob(&manifest, &cksum);
356428
blob_appendf(&manifest, "Z %b\n", &cksum);
357429
rid = content_put(&manifest);
358430
manifest_crosslink(rid, &manifest);
359431
db_end_transaction(0);
360
- cgi_redirect(zFrom);
361
- }
362
- style_header("Delete Attachment");
363
- @ <form action="%s(g.zTop)/attachdelete" method="post"><div>
364
- @ <p>Confirm that you want to delete the attachment named
365
- @ "%h(zFile)" on %s(zTkt?"ticket":"wiki page") %h(zTarget):<br /></p>
366
- if( zTkt ){
367
- @ <input type="hidden" name="tkt" value="%h(zTkt)" />
432
+ @ <p>The attachment below has been deleted.</p>
433
+ }
434
+
435
+ if( P("del")
436
+ && ((zTktUuid && g.perm.WrTkt) || (zWikiName && g.perm.WrWiki))
437
+ ){
438
+ @ <form method="post" action="%R/ainfo/%s(zUuid)">
439
+ @ <p>Confirm you want to delete the attachment shown below.
440
+ @ <input type="submit" name="confirm" value="Confirm">
441
+ @ </form>
442
+ }
443
+
444
+ isModerator = (zTktUuid && g.perm.ModTkt) || (zWikiName && g.perm.ModWiki);
445
+ if( isModerator && (zModAction = P("modaction"))!=0 ){
446
+ if( strcmp(zModAction,"delete")==0 ){
447
+ moderation_disapprove(rid);
448
+ if( zTktUuid ){
449
+ cgi_redirectf("%R/tktview/%s", zTktUuid);
450
+ }else{
451
+ cgi_redirectf("%R/wiki?name=%t", zWikiName);
452
+ }
453
+ return;
454
+ }
455
+ if( strcmp(zModAction,"approve")==0 ){
456
+ moderation_approve(rid);
457
+ }
458
+ }
459
+ style_header("Attachment Details");
460
+ style_submenu_element("Raw", "Raw", "%R/artifact/%S", zUuid);
461
+
462
+ @ <div class="section">Overview</div>
463
+ @ <p><table class="label-value">
464
+ @ <tr><th>Artifact&nbsp;ID:</th>
465
+ @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
466
+ if( g.perm.Setup ){
467
+ @ (%d(rid))
468
+ }
469
+ modPending = moderation_pending(rid);
470
+ if( modPending ){
471
+ @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
472
+ }
473
+ if( zTktUuid ){
474
+ @ <tr><th>Ticket:</th>
475
+ @ <td>%z(href("%R/tktview/%s",zTktUuid))%s(zTktUuid)</a></td></tr>
476
+ }
477
+ if( zWikiName ){
478
+ @ <tr><th>Wiki&nbsp;Page:</th>
479
+ @ <td>%z(href("%R/wiki?name=%t",zWikiName))%h(zWikiName)</a></td></tr>
480
+ }
481
+ @ <tr><th>Date:</th><td>
482
+ hyperlink_to_date(zDate, "</td></tr>");
483
+ free(zDate);
484
+ @ <tr><th>User:</th><td>
485
+ hyperlink_to_user(pAttach->zUser, zDate, "</td></tr>");
486
+ @ <tr><th>Artifact&nbsp;Attached:</th>
487
+ @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a>
488
+ if( g.perm.Setup ){
489
+ @ (%d(ridSrc))
490
+ }
491
+ @ <tr><th>Filename:</th><td>%h(zName)</td></tr>
492
+ zMime = mimetype_from_name(zName);
493
+ if( g.perm.Setup ){
494
+ @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr>
495
+ }
496
+ @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr>
497
+ @ </table>
498
+
499
+ if( isModerator && modPending ){
500
+ @ <div class="section">Moderation</div>
501
+ @ <blockquote>
502
+ @ <form method="POST" action="%R/ainfo/%s(zUuid)">
503
+ @ <label><input type="radio" name="modaction" value="delete">
504
+ @ Delete this change</label><br />
505
+ @ <label><input type="radio" name="modaction" value="approve">
506
+ @ Approve this change</label><br />
507
+ @ <input type="submit" value="Submit">
508
+ @ </form>
509
+ @ </blockquote>
510
+ }
511
+
512
+ @ <div class="section">Content Appended</div>
513
+ @ <blockquote>
514
+ blob_zero(&attach);
515
+ if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){
516
+ const char *z;
517
+ const char *zLn = P("ln");
518
+ content_get(ridSrc, &attach);
519
+ blob_strip_bom(&attach, 0);
520
+ z = blob_str(&attach);
521
+ if( zLn ){
522
+ output_text_with_line_numbers(z, zLn);
523
+ }else{
524
+ @ <pre>
525
+ @ %h(z)
526
+ @ </pre>
527
+ }
528
+ }else if( strncmp(zMime, "image/", 6)==0 ){
529
+ @ <img src="%R/raw?name=%s(zSrc)&m=%s(zMime)"></img>
368530
}else{
369
- @ <input type="hidden" name="page" value="%h(zPage)" />
531
+ int sz = db_int(0, "SELECT sz FROM blob WHERE rid=%d", ridSrc);
532
+ @ <i>(file is %d(sz) bytes of binary data)</i>
370533
}
371
- @ <input type="hidden" name="file" value="%h(zFile)" />
372
- @ <input type="hidden" name="from" value="%h(zFrom)" />
373
- @ <input type="submit" name="confirm" value="Delete" />
374
- @ <input type="submit" name="cancel" value="Cancel" />
375
- @ </div></form>
534
+ @ </blockquote>
535
+ manifest_destroy(pAttach);
536
+ blob_reset(&attach);
376537
style_footer();
538
+}
377539
540
+/*
541
+** Output HTML to show a list of attachments.
542
+*/
543
+void attachment_list(
544
+ const char *zTarget, /* Object that things are attached to */
545
+ const char *zHeader /* Header to display with attachments */
546
+){
547
+ int cnt = 0;
548
+ Stmt q;
549
+ db_prepare(&q,
550
+ "SELECT datetime(mtime,'localtime'), filename, user,"
551
+ " (SELECT uuid FROM blob WHERE rid=attachid), src"
552
+ " FROM attachment"
553
+ " WHERE isLatest AND src!='' AND target=%Q"
554
+ " ORDER BY mtime DESC",
555
+ zTarget
556
+ );
557
+ while( db_step(&q)==SQLITE_ROW ){
558
+ const char *zDate = db_column_text(&q, 0);
559
+ const char *zFile = db_column_text(&q, 1);
560
+ const char *zUser = db_column_text(&q, 2);
561
+ const char *zUuid = db_column_text(&q, 3);
562
+ const char *zSrc = db_column_text(&q, 4);
563
+ if( cnt==0 ){
564
+ @ %s(zHeader)
565
+ }
566
+ cnt++;
567
+ @ <li>
568
+ @ %z(href("%R/artifact/%s",zSrc))%h(zFile)</a>
569
+ @ added by %h(zUser) on
570
+ hyperlink_to_date(zDate, ".");
571
+ @ [%z(href("%R/ainfo/%s",zUuid))details</a>]
572
+ @ </li>
573
+ }
574
+ if( cnt ){
575
+ @ </ul>
576
+ }
577
+ db_finalize(&q);
578
+
378579
}
379580
--- src/attach.c
+++ src/attach.c
@@ -41,11 +41,13 @@
41
42 if( zPage && zTkt ) zTkt = 0;
43 login_check_credentials();
44 blob_zero(&sql);
45 blob_append(&sql,
46 "SELECT datetime(mtime,'localtime'), src, target, filename, comment, user"
 
 
47 " FROM attachment",
48 -1
49 );
50 if( zPage ){
51 if( g.perm.RdWiki==0 ) login_needed();
@@ -59,17 +61,20 @@
59 if( g.perm.RdTkt==0 && g.perm.RdWiki==0 ) login_needed();
60 style_header("All Attachments");
61 }
62 blob_appendf(&sql, " ORDER BY mtime DESC");
63 db_prepare(&q, "%s", blob_str(&sql));
 
64 while( db_step(&q)==SQLITE_ROW ){
65 const char *zDate = db_column_text(&q, 0);
66 const char *zSrc = db_column_text(&q, 1);
67 const char *zTarget = db_column_text(&q, 2);
68 const char *zFilename = db_column_text(&q, 3);
69 const char *zComment = db_column_text(&q, 4);
70 const char *zUser = db_column_text(&q, 5);
 
 
71 int i;
72 char *zUrlTail;
73 for(i=0; zFilename[i]; i++){
74 if( zFilename[i]=='/' && zFilename[i+1]!=0 ){
75 zFilename = &zFilename[i+1];
@@ -79,12 +84,16 @@
79 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
80 zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
81 }else{
82 zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
83 }
84 @
85 @ <p><a href="/attachview?%s(zUrlTail)">%h(zFilename)</a>
 
 
 
 
86 @ [<a href="/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
87 if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
88 if( zComment && zComment[0] ){
89 @ %w(zComment)<br />
90 }
@@ -111,10 +120,11 @@
111 @ by %h(zUser) on
112 hyperlink_to_date(zDate, ".");
113 free(zUrlTail);
114 }
115 db_finalize(&q);
 
116 style_footer();
117 return;
118 }
119
120 /*
@@ -182,10 +192,34 @@
182 cgi_replace_parameter("m", mimetype_from_name(zFile));
183 rawartifact_page();
184 }
185 }
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
188 /*
189 ** WEBPAGE: attachadd
190 **
191 ** tkt=TICKETUUID
@@ -240,10 +274,11 @@
240 char *zDate;
241 int rid;
242 int i, n;
243 int addCompress = 0;
244 Manifest *pManifest;
 
245
246 db_begin_transaction();
247 blob_init(&content, aContent, szContent);
248 pManifest = manifest_parse(&content, 0, 0);
249 manifest_destroy(pManifest);
@@ -250,11 +285,14 @@
250 blob_init(&content, aContent, szContent);
251 if( pManifest ){
252 blob_compress(&content, &content);
253 addCompress = 1;
254 }
255 rid = content_put(&content);
 
 
 
256 zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
257 blob_zero(&manifest);
258 for(i=n=0; zName[i]; i++){
259 if( zName[i]=='/' || zName[i]=='\\' ) n = i;
260 }
@@ -272,12 +310,11 @@
272 zDate = date_in_standard_format("now");
273 blob_appendf(&manifest, "D %s\n", zDate);
274 blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
275 md5sum_blob(&manifest, &cksum);
276 blob_appendf(&manifest, "Z %b\n", &cksum);
277 rid = content_put(&manifest);
278 manifest_crosslink(rid, &manifest);
279 assert( blob_is_reset(&manifest) );
280 db_end_transaction(0);
281 cgi_redirect(zFrom);
282 }
283 style_header("Add Attachment");
@@ -298,50 +335,85 @@
298 @ <input type="submit" name="cancel" value="Cancel" />
299 @ </div></form>
300 style_footer();
301 }
302
303
304 /*
305 ** WEBPAGE: attachdelete
306 **
307 ** tkt=TICKETUUID
308 ** page=WIKIPAGE
309 ** file=FILENAME
310 **
311 ** "Delete" an attachment. Because objects in Fossil are immutable
312 ** the attachment isn't really deleted. Instead, we change the content
313 ** of the attachment to NULL, which the system understands as being
314 ** deleted. Historical values of the attachment are preserved.
315 */
316 void attachdel_page(void){
317 const char *zPage = P("page");
318 const char *zTkt = P("tkt");
319 const char *zFile = P("file");
320 const char *zFrom = P("from");
321 const char *zTarget;
322
323 if( zPage && zTkt ) fossil_redirect_home();
324 if( zPage==0 && zTkt==0 ) fossil_redirect_home();
325 if( zFile==0 ) fossil_redirect_home();
 
 
326 login_check_credentials();
327 if( zPage ){
328 if( g.perm.WrWiki==0 || g.perm.Attach==0 ) login_needed();
329 zTarget = zPage;
330 }else{
331 if( g.perm.WrTkt==0 || g.perm.Attach==0 ) login_needed();
332 zTarget = zTkt;
333 }
334 if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
335 if( P("cancel") ){
336 cgi_redirect(zFrom);
337 }
338 if( P("confirm") ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339 int i, n, rid;
340 char *zDate;
341 Blob manifest;
342 Blob cksum;
 
343
344 db_begin_transaction();
345 blob_zero(&manifest);
346 for(i=n=0; zFile[i]; i++){
347 if( zFile[i]=='/' || zFile[i]=='\\' ) n = i;
@@ -355,24 +427,153 @@
355 md5sum_blob(&manifest, &cksum);
356 blob_appendf(&manifest, "Z %b\n", &cksum);
357 rid = content_put(&manifest);
358 manifest_crosslink(rid, &manifest);
359 db_end_transaction(0);
360 cgi_redirect(zFrom);
361 }
362 style_header("Delete Attachment");
363 @ <form action="%s(g.zTop)/attachdelete" method="post"><div>
364 @ <p>Confirm that you want to delete the attachment named
365 @ "%h(zFile)" on %s(zTkt?"ticket":"wiki page") %h(zTarget):<br /></p>
366 if( zTkt ){
367 @ <input type="hidden" name="tkt" value="%h(zTkt)" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368 }else{
369 @ <input type="hidden" name="page" value="%h(zPage)" />
 
370 }
371 @ <input type="hidden" name="file" value="%h(zFile)" />
372 @ <input type="hidden" name="from" value="%h(zFrom)" />
373 @ <input type="submit" name="confirm" value="Delete" />
374 @ <input type="submit" name="cancel" value="Cancel" />
375 @ </div></form>
376 style_footer();
 
377
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378 }
379
--- src/attach.c
+++ src/attach.c
@@ -41,11 +41,13 @@
41
42 if( zPage && zTkt ) zTkt = 0;
43 login_check_credentials();
44 blob_zero(&sql);
45 blob_append(&sql,
46 "SELECT datetime(mtime,'localtime'), src, target, filename,"
47 " comment, user,"
48 " (SELECT uuid FROM blob WHERE rid=attachid), attachid"
49 " FROM attachment",
50 -1
51 );
52 if( zPage ){
53 if( g.perm.RdWiki==0 ) login_needed();
@@ -59,17 +61,20 @@
61 if( g.perm.RdTkt==0 && g.perm.RdWiki==0 ) login_needed();
62 style_header("All Attachments");
63 }
64 blob_appendf(&sql, " ORDER BY mtime DESC");
65 db_prepare(&q, "%s", blob_str(&sql));
66 @ <ol>
67 while( db_step(&q)==SQLITE_ROW ){
68 const char *zDate = db_column_text(&q, 0);
69 const char *zSrc = db_column_text(&q, 1);
70 const char *zTarget = db_column_text(&q, 2);
71 const char *zFilename = db_column_text(&q, 3);
72 const char *zComment = db_column_text(&q, 4);
73 const char *zUser = db_column_text(&q, 5);
74 const char *zUuid = db_column_text(&q, 6);
75 int attachid = db_column_int(&q, 7);
76 int i;
77 char *zUrlTail;
78 for(i=0; zFilename[i]; i++){
79 if( zFilename[i]=='/' && zFilename[i+1]!=0 ){
80 zFilename = &zFilename[i+1];
@@ -79,12 +84,16 @@
84 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
85 zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
86 }else{
87 zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
88 }
89 @ <li><p>
90 @ Attachment %z(href("%R/ainfo/%s",zUuid))%S(zUuid)</a>
91 if( moderation_pending(attachid) ){
92 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
93 }
94 @ <br><a href="/attachview?%s(zUrlTail)">%h(zFilename)</a>
95 @ [<a href="/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
96 if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
97 if( zComment && zComment[0] ){
98 @ %w(zComment)<br />
99 }
@@ -111,10 +120,11 @@
120 @ by %h(zUser) on
121 hyperlink_to_date(zDate, ".");
122 free(zUrlTail);
123 }
124 db_finalize(&q);
125 @ </ol>
126 style_footer();
127 return;
128 }
129
130 /*
@@ -182,10 +192,34 @@
192 cgi_replace_parameter("m", mimetype_from_name(zFile));
193 rawartifact_page();
194 }
195 }
196
197 /*
198 ** Save an attachment control artifact into the repository
199 */
200 static void attach_put(
201 Blob *pAttach, /* Text of the Attachment record */
202 int attachRid, /* RID for the file that is being attached */
203 int needMod /* True if the attachment is subject to moderation */
204 ){
205 int rid;
206 if( needMod ){
207 rid = content_put_ex(pAttach, 0, 0, 0, 1);
208 moderation_table_create();
209 db_multi_exec(
210 "INSERT INTO modreq(objid,attachRid) VALUES(%d,%d);",
211 rid, attachRid
212 );
213 }else{
214 rid = content_put(pAttach);
215 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
216 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
217 }
218 manifest_crosslink(rid, pAttach);
219 }
220
221
222 /*
223 ** WEBPAGE: attachadd
224 **
225 ** tkt=TICKETUUID
@@ -240,10 +274,11 @@
274 char *zDate;
275 int rid;
276 int i, n;
277 int addCompress = 0;
278 Manifest *pManifest;
279 int needModerator;
280
281 db_begin_transaction();
282 blob_init(&content, aContent, szContent);
283 pManifest = manifest_parse(&content, 0, 0);
284 manifest_destroy(pManifest);
@@ -250,11 +285,14 @@
285 blob_init(&content, aContent, szContent);
286 if( pManifest ){
287 blob_compress(&content, &content);
288 addCompress = 1;
289 }
290 needModerator =
291 (zTkt!=0 && g.perm.ModTkt==0 && db_get_boolean("modreq-tkt",0)==1) ||
292 (zPage!=0 && g.perm.ModWiki==0 && db_get_boolean("modreq-wiki",0)==1);
293 rid = content_put_ex(&content, 0, 0, 0, needModerator);
294 zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
295 blob_zero(&manifest);
296 for(i=n=0; zName[i]; i++){
297 if( zName[i]=='/' || zName[i]=='\\' ) n = i;
298 }
@@ -272,12 +310,11 @@
310 zDate = date_in_standard_format("now");
311 blob_appendf(&manifest, "D %s\n", zDate);
312 blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
313 md5sum_blob(&manifest, &cksum);
314 blob_appendf(&manifest, "Z %b\n", &cksum);
315 attach_put(&manifest, rid, needModerator);
 
316 assert( blob_is_reset(&manifest) );
317 db_end_transaction(0);
318 cgi_redirect(zFrom);
319 }
320 style_header("Add Attachment");
@@ -298,50 +335,85 @@
335 @ <input type="submit" name="cancel" value="Cancel" />
336 @ </div></form>
337 style_footer();
338 }
339
340 /*
341 ** WEBPAGE: ainfo
342 ** URL: /ainfo?name=ARTIFACTID
343 **
344 ** Show the details of an attachment artifact.
345 */
346 void ainfo_page(void){
347 int rid; /* RID for the control artifact */
348 int ridSrc; /* RID for the attached file */
349 char *zDate; /* Date attached */
350 const char *zUuid; /* UUID of the control artifact */
351 Manifest *pAttach; /* Parse of the control artifact */
352 const char *zTarget; /* Wiki or ticket attached to */
353 const char *zSrc; /* UUID of the attached file */
354 const char *zName; /* Name of the attached file */
355 const char *zDesc; /* Description of the attached file */
356 const char *zWikiName = 0; /* Wiki page name when attached to Wiki */
357 const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */
358 int modPending; /* True if awaiting moderation */
359 const char *zModAction; /* Moderation action or NULL */
360 int isModerator; /* TRUE if user is the moderator */
361 const char *zMime; /* MIME Type */
362 Blob attach; /* Content of the attachment */
363 int wantToDelete = P("del")!=0;/* Want to delete */
364
365 login_check_credentials();
366 if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; }
367 rid = name_to_rid_www("name");
368 if( rid==0 ){ fossil_redirect_home(); }
369 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
370 #if 0
371 /* Shunning here needs to get both the attachment control artifact and
372 ** the object that is attached. */
373 if( g.perm.Admin ){
374 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
375 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
376 g.zTop, zUuid);
377 }else{
378 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
379 g.zTop, zUuid);
380 }
381 }
382 #endif
383 pAttach = manifest_get(rid, CFTYPE_ATTACHMENT);
384 if( pAttach==0 ) fossil_redirect_home();
385 zTarget = pAttach->zAttachTarget;
386 zSrc = pAttach->zAttachSrc;
387 ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc);
388 zName = pAttach->zAttachName;
389 zDesc = pAttach->zComment;
390 if( validate16(zTarget, strlen(zTarget))
391 && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget)
392 ){
393 zTktUuid = zTarget;
394 if( !g.perm.RdTkt ){ login_needed(); return; }
395 if( g.perm.WrTkt ){
396 style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid);
397 }
398 }else if( db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'",zTarget) ){
399 zWikiName = zTarget;
400 if( !g.perm.RdWiki ){ login_needed(); return; }
401 if( g.perm.WrWiki ){
402 style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid);
403 }
404 }
405 zDate = db_text(0, "SELECT datetime(%.12f)", pAttach->rDate);
406
407 if( P("confirm")
408 && ((zTktUuid && g.perm.WrTkt) || (zWikiName && g.perm.WrWiki))
409 ){
410 int i, n, rid;
411 char *zDate;
412 Blob manifest;
413 Blob cksum;
414 const char *zFile = zName;
415
416 db_begin_transaction();
417 blob_zero(&manifest);
418 for(i=n=0; zFile[i]; i++){
419 if( zFile[i]=='/' || zFile[i]=='\\' ) n = i;
@@ -355,24 +427,153 @@
427 md5sum_blob(&manifest, &cksum);
428 blob_appendf(&manifest, "Z %b\n", &cksum);
429 rid = content_put(&manifest);
430 manifest_crosslink(rid, &manifest);
431 db_end_transaction(0);
432 @ <p>The attachment below has been deleted.</p>
433 }
434
435 if( P("del")
436 && ((zTktUuid && g.perm.WrTkt) || (zWikiName && g.perm.WrWiki))
437 ){
438 @ <form method="post" action="%R/ainfo/%s(zUuid)">
439 @ <p>Confirm you want to delete the attachment shown below.
440 @ <input type="submit" name="confirm" value="Confirm">
441 @ </form>
442 }
443
444 isModerator = (zTktUuid && g.perm.ModTkt) || (zWikiName && g.perm.ModWiki);
445 if( isModerator && (zModAction = P("modaction"))!=0 ){
446 if( strcmp(zModAction,"delete")==0 ){
447 moderation_disapprove(rid);
448 if( zTktUuid ){
449 cgi_redirectf("%R/tktview/%s", zTktUuid);
450 }else{
451 cgi_redirectf("%R/wiki?name=%t", zWikiName);
452 }
453 return;
454 }
455 if( strcmp(zModAction,"approve")==0 ){
456 moderation_approve(rid);
457 }
458 }
459 style_header("Attachment Details");
460 style_submenu_element("Raw", "Raw", "%R/artifact/%S", zUuid);
461
462 @ <div class="section">Overview</div>
463 @ <p><table class="label-value">
464 @ <tr><th>Artifact&nbsp;ID:</th>
465 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
466 if( g.perm.Setup ){
467 @ (%d(rid))
468 }
469 modPending = moderation_pending(rid);
470 if( modPending ){
471 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
472 }
473 if( zTktUuid ){
474 @ <tr><th>Ticket:</th>
475 @ <td>%z(href("%R/tktview/%s",zTktUuid))%s(zTktUuid)</a></td></tr>
476 }
477 if( zWikiName ){
478 @ <tr><th>Wiki&nbsp;Page:</th>
479 @ <td>%z(href("%R/wiki?name=%t",zWikiName))%h(zWikiName)</a></td></tr>
480 }
481 @ <tr><th>Date:</th><td>
482 hyperlink_to_date(zDate, "</td></tr>");
483 free(zDate);
484 @ <tr><th>User:</th><td>
485 hyperlink_to_user(pAttach->zUser, zDate, "</td></tr>");
486 @ <tr><th>Artifact&nbsp;Attached:</th>
487 @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a>
488 if( g.perm.Setup ){
489 @ (%d(ridSrc))
490 }
491 @ <tr><th>Filename:</th><td>%h(zName)</td></tr>
492 zMime = mimetype_from_name(zName);
493 if( g.perm.Setup ){
494 @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr>
495 }
496 @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr>
497 @ </table>
498
499 if( isModerator && modPending ){
500 @ <div class="section">Moderation</div>
501 @ <blockquote>
502 @ <form method="POST" action="%R/ainfo/%s(zUuid)">
503 @ <label><input type="radio" name="modaction" value="delete">
504 @ Delete this change</label><br />
505 @ <label><input type="radio" name="modaction" value="approve">
506 @ Approve this change</label><br />
507 @ <input type="submit" value="Submit">
508 @ </form>
509 @ </blockquote>
510 }
511
512 @ <div class="section">Content Appended</div>
513 @ <blockquote>
514 blob_zero(&attach);
515 if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){
516 const char *z;
517 const char *zLn = P("ln");
518 content_get(ridSrc, &attach);
519 blob_strip_bom(&attach, 0);
520 z = blob_str(&attach);
521 if( zLn ){
522 output_text_with_line_numbers(z, zLn);
523 }else{
524 @ <pre>
525 @ %h(z)
526 @ </pre>
527 }
528 }else if( strncmp(zMime, "image/", 6)==0 ){
529 @ <img src="%R/raw?name=%s(zSrc)&m=%s(zMime)"></img>
530 }else{
531 int sz = db_int(0, "SELECT sz FROM blob WHERE rid=%d", ridSrc);
532 @ <i>(file is %d(sz) bytes of binary data)</i>
533 }
534 @ </blockquote>
535 manifest_destroy(pAttach);
536 blob_reset(&attach);
 
 
537 style_footer();
538 }
539
540 /*
541 ** Output HTML to show a list of attachments.
542 */
543 void attachment_list(
544 const char *zTarget, /* Object that things are attached to */
545 const char *zHeader /* Header to display with attachments */
546 ){
547 int cnt = 0;
548 Stmt q;
549 db_prepare(&q,
550 "SELECT datetime(mtime,'localtime'), filename, user,"
551 " (SELECT uuid FROM blob WHERE rid=attachid), src"
552 " FROM attachment"
553 " WHERE isLatest AND src!='' AND target=%Q"
554 " ORDER BY mtime DESC",
555 zTarget
556 );
557 while( db_step(&q)==SQLITE_ROW ){
558 const char *zDate = db_column_text(&q, 0);
559 const char *zFile = db_column_text(&q, 1);
560 const char *zUser = db_column_text(&q, 2);
561 const char *zUuid = db_column_text(&q, 3);
562 const char *zSrc = db_column_text(&q, 4);
563 if( cnt==0 ){
564 @ %s(zHeader)
565 }
566 cnt++;
567 @ <li>
568 @ %z(href("%R/artifact/%s",zSrc))%h(zFile)</a>
569 @ added by %h(zUser) on
570 hyperlink_to_date(zDate, ".");
571 @ [%z(href("%R/ainfo/%s",zUuid))details</a>]
572 @ </li>
573 }
574 if( cnt ){
575 @ </ul>
576 }
577 db_finalize(&q);
578
579 }
580
--- src/clone.c
+++ src/clone.c
@@ -72,10 +72,11 @@
7272
fix_private_blob_dependencies(1);
7373
db_multi_exec(
7474
"DELETE FROM blob WHERE rid IN private;"
7575
"DELETE FROM delta wHERE rid IN private;"
7676
"DELETE FROM private;"
77
+ "DROP TABLE IF EXISTS modreq;"
7778
);
7879
}
7980
8081
8182
/*
8283
--- src/clone.c
+++ src/clone.c
@@ -72,10 +72,11 @@
72 fix_private_blob_dependencies(1);
73 db_multi_exec(
74 "DELETE FROM blob WHERE rid IN private;"
75 "DELETE FROM delta wHERE rid IN private;"
76 "DELETE FROM private;"
 
77 );
78 }
79
80
81 /*
82
--- src/clone.c
+++ src/clone.c
@@ -72,10 +72,11 @@
72 fix_private_blob_dependencies(1);
73 db_multi_exec(
74 "DELETE FROM blob WHERE rid IN private;"
75 "DELETE FROM delta wHERE rid IN private;"
76 "DELETE FROM private;"
77 "DROP TABLE IF EXISTS modreq;"
78 );
79 }
80
81
82 /*
83
+182 -90
--- src/info.c
+++ src/info.c
@@ -713,84 +713,98 @@
713713
style_footer();
714714
}
715715
716716
/*
717717
** WEBPAGE: winfo
718
-** URL: /winfo?name=RID
718
+** URL: /winfo?name=UUID
719719
**
720720
** Return information about a wiki page.
721721
*/
722722
void winfo_page(void){
723
- Stmt q;
724723
int rid;
724
+ Manifest *pWiki;
725
+ char *zUuid;
726
+ char *zDate;
727
+ Blob wiki;
728
+ int modPending;
729
+ const char *zModAction;
725730
726731
login_check_credentials();
727732
if( !g.perm.RdWiki ){ login_needed(); return; }
728733
rid = name_to_rid_www("name");
729
- if( rid==0 ){
734
+ if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI))==0 ){
730735
style_header("Wiki Page Information Error");
731
- @ No such object: %h(g.argv[2])
736
+ @ No such object: %h(P("name"))
732737
style_footer();
733738
return;
734739
}
735
- db_prepare(&q,
736
- "SELECT substr(tagname, 6, 1000), uuid,"
737
- " datetime(event.mtime, 'localtime'), user"
738
- " FROM tagxref, tag, blob, event"
739
- " WHERE tagxref.rid=%d"
740
- " AND tag.tagid=tagxref.tagid"
741
- " AND tag.tagname LIKE 'wiki-%%'"
742
- " AND blob.rid=%d"
743
- " AND event.objid=%d",
744
- rid, rid, rid
745
- );
746
- if( db_step(&q)==SQLITE_ROW ){
747
- const char *zName = db_column_text(&q, 0);
748
- const char *zUuid = db_column_text(&q, 1);
749
- char *zTitle = mprintf("Wiki Page %s", zName);
750
- const char *zDate = db_column_text(&q,2);
751
- const char *zUser = db_column_text(&q,3);
752
- style_header(zTitle);
753
- free(zTitle);
754
- login_anonymous_available();
755
- @ <div class="section">Overview</div>
756
- @ <p><table class="label-value">
757
- @ <tr><th>Version:</th><td>%s(zUuid)</td></tr>
758
- @ <tr><th>Date:</th><td>
759
- hyperlink_to_date(zDate, "</td></tr>");
760
- if( g.perm.Setup ){
761
- @ <tr><th>Record ID:</th><td>%d(rid)</td></tr>
762
- }
763
- @ <tr><th>Original&nbsp;User:</th><td>
764
- hyperlink_to_user(zUser, zDate, "</td></tr>");
765
- if( g.perm.Hyperlink ){
766
- @ <tr><th>Commands:</th>
767
- @ <td>
768
- @ %z(href("%R/whistory?name=%t",zName))history</a>
769
- @ | %z(href("%R/artifact/%S",zUuid))raw-text</a>
770
- @ </td>
771
- @ </tr>
772
- }
773
- @ </table></p>
774
- }else{
775
- style_header("Wiki Information");
776
- rid = 0;
777
- }
778
- db_finalize(&q);
779
- showTags(rid, "wiki-*");
780
- if( rid ){
781
- Manifest *pWiki;
782
- pWiki = manifest_get(rid, CFTYPE_WIKI);
783
- if( pWiki ){
784
- Blob wiki;
785
- blob_init(&wiki, pWiki->zWiki, -1);
786
- @ <div class="section">Content</div>
787
- wiki_convert(&wiki, 0, 0);
788
- blob_reset(&wiki);
789
- }
790
- manifest_destroy(pWiki);
791
- }
740
+ if( g.perm.ModWiki && (zModAction = P("modaction"))!=0 ){
741
+ if( strcmp(zModAction,"delete")==0 ){
742
+ moderation_disapprove(rid);
743
+ cgi_redirectf("%R/wiki?name=%T", pWiki->zWikiTitle);
744
+ /*NOTREACHED*/
745
+ }
746
+ if( strcmp(zModAction,"approve")==0 ){
747
+ moderation_approve(rid);
748
+ }
749
+ }
750
+ style_header("Update of \"%h\"", pWiki->zWikiTitle);
751
+ zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
752
+ zDate = db_text(0, "SELECT datetime(%.17g)", pWiki->rDate);
753
+ style_submenu_element("Raw", "Raw", "artifact/%S", zUuid);
754
+ style_submenu_element("History", "History", "whistory?name=%t",
755
+ pWiki->zWikiTitle);
756
+ style_submenu_element("Page", "Page", "wiki?name=%t",
757
+ pWiki->zWikiTitle);
758
+ login_anonymous_available();
759
+ @ <div class="section">Overview</div>
760
+ @ <p><table class="label-value">
761
+ @ <tr><th>Artifact&nbsp;ID:</th>
762
+ @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
763
+ if( g.perm.Setup ){
764
+ @ (%d(rid))
765
+ }
766
+ modPending = moderation_pending(rid);
767
+ if( modPending ){
768
+ @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
769
+ }
770
+ @ </td></tr>
771
+ @ <tr><th>Page&nbsp;Name:</th><td>%h(pWiki->zWikiTitle)</td></tr>
772
+ @ <tr><th>Date:</th><td>
773
+ hyperlink_to_date(zDate, "</td></tr>");
774
+ @ <tr><th>Original&nbsp;User:</th><td>
775
+ hyperlink_to_user(pWiki->zUser, zDate, "</td></tr>");
776
+ if( pWiki->nParent>0 ){
777
+ int i;
778
+ @ <tr><th>Parent%s(pWiki->nParent==1?"":"s"):</th><td>
779
+ for(i=0; i<pWiki->nParent; i++){
780
+ char *zParent = pWiki->azParent[i];
781
+ @ %z(href("info/%S",zParent))%s(zParent)</a>
782
+ }
783
+ @ </td></tr>
784
+ }
785
+ @ </table>
786
+
787
+ if( g.perm.ModWiki && modPending ){
788
+ @ <div class="section">Moderation</div>
789
+ @ <blockquote>
790
+ @ <form method="POST" action="%R/winfo/%s(zUuid)">
791
+ @ <label><input type="radio" name="modaction" value="delete">
792
+ @ Delete this change</label><br />
793
+ @ <label><input type="radio" name="modaction" value="approve">
794
+ @ Approve this change</label><br />
795
+ @ <input type="submit" value="Submit">
796
+ @ </form>
797
+ @ </blockquote>
798
+ }
799
+
800
+
801
+ @ <div class="section">Content</div>
802
+ blob_init(&wiki, pWiki->zWiki, -1);
803
+ wiki_convert(&wiki, 0, 0);
804
+ blob_reset(&wiki);
805
+ manifest_destroy(pWiki);
792806
style_footer();
793807
}
794808
795809
/*
796810
** Show a webpage error message
@@ -993,10 +1007,25 @@
9931007
manifest_destroy(pTo);
9941008
9951009
style_footer();
9961010
}
9971011
1012
+#if INTERFACE
1013
+/*
1014
+** Possible return values from object_description()
1015
+*/
1016
+#define OBJTYPE_CHECKIN 0x0001
1017
+#define OBJTYPE_CONTENT 0x0002
1018
+#define OBJTYPE_WIKI 0x0004
1019
+#define OBJTYPE_TICKET 0x0008
1020
+#define OBJTYPE_ATTACHMENT 0x0010
1021
+#define OBJTYPE_EVENT 0x0020
1022
+#define OBJTYPE_TAG 0x0040
1023
+#define OBJTYPE_SYMLINK 0x0080
1024
+#define OBJTYPE_EXE 0x0100
1025
+#endif
1026
+
9981027
/*
9991028
** Write a description of an object to the www reply.
10001029
**
10011030
** If the object is a file then mention:
10021031
**
@@ -1008,18 +1037,19 @@
10081037
**
10091038
** * It's artifact ID
10101039
** * date of check-in
10111040
** * Comment & user
10121041
*/
1013
-void object_description(
1042
+int object_description(
10141043
int rid, /* The artifact ID */
10151044
int linkToView, /* Add viewer link if true */
10161045
Blob *pDownloadName /* Fill with an appropriate download name */
10171046
){
10181047
Stmt q;
10191048
int cnt = 0;
10201049
int nWiki = 0;
1050
+ int objType = 0;
10211051
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
10221052
10231053
char *prevName = 0;
10241054
10251055
db_prepare(&q,
@@ -1051,15 +1081,18 @@
10511081
if( prevName ) {
10521082
@ </ul>
10531083
}
10541084
if( mPerm==PERM_LNK ){
10551085
@ <li>Symbolic link
1086
+ objType |= OBJTYPE_SYMLINK;
10561087
}else if( mPerm==PERM_EXE ){
10571088
@ <li>Executable file
1089
+ objType |= OBJTYPE_EXE;
10581090
}else{
10591091
@ <li>File
10601092
}
1093
+ objType |= OBJTYPE_CONTENT;
10611094
@ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
10621095
@ <ul>
10631096
prevName = fossil_strdup(zName);
10641097
}
10651098
@ <li>
@@ -1100,17 +1133,18 @@
11001133
if( cnt>0 ){
11011134
@ Also wiki page
11021135
}else{
11031136
@ Wiki page
11041137
}
1138
+ objType |= OBJTYPE_WIKI;
11051139
@ [%z(href("%R/wiki?name=%t",zPagename))%h(zPagename)</a>] by
11061140
hyperlink_to_user(zUser,zDate," on");
11071141
hyperlink_to_date(zDate,".");
11081142
nWiki++;
11091143
cnt++;
11101144
if( pDownloadName && blob_size(pDownloadName)==0 ){
1111
- blob_appendf(pDownloadName, "%s.wiki", zPagename);
1145
+ blob_appendf(pDownloadName, "%s.txt", zPagename);
11121146
}
11131147
}
11141148
db_finalize(&q);
11151149
if( nWiki==0 ){
11161150
db_prepare(&q,
@@ -1129,16 +1163,20 @@
11291163
if( cnt>0 ){
11301164
@ Also
11311165
}
11321166
if( zType[0]=='w' ){
11331167
@ Wiki edit
1168
+ objType |= OBJTYPE_WIKI;
11341169
}else if( zType[0]=='t' ){
11351170
@ Ticket change
1171
+ objType |= OBJTYPE_TICKET;
11361172
}else if( zType[0]=='c' ){
11371173
@ Manifest of check-in
1174
+ objType |= OBJTYPE_CHECKIN;
11381175
}else if( zType[0]=='e' ){
11391176
@ Instance of event
1177
+ objType |= OBJTYPE_EVENT;
11401178
hyperlink_to_event_tagid(db_column_int(&q, 5));
11411179
}else{
11421180
@ Control file referencing
11431181
}
11441182
if( zType[0]!='e' ){
@@ -1170,10 +1208,11 @@
11701208
if( cnt>0 ){
11711209
@ Also attachment "%h(zFilename)" to
11721210
}else{
11731211
@ Attachment "%h(zFilename)" to
11741212
}
1213
+ objType |= OBJTYPE_ATTACHMENT;
11751214
if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
11761215
if( g.perm.Hyperlink && g.perm.RdTkt ){
11771216
@ ticket [%z(href("%R/tktview?name=%S",zTarget))%S(zTarget)</a>]
11781217
}else{
11791218
@ ticket [%S(zTarget)]
@@ -1200,10 +1239,11 @@
12001239
blob_appendf(pDownloadName, "%.10s.txt", zUuid);
12011240
}
12021241
}else if( linkToView && g.perm.Hyperlink ){
12031242
@ %z(href("%R/artifact/%S",zUuid))[view]</a>
12041243
}
1244
+ return objType;
12051245
}
12061246
12071247
12081248
/*
12091249
** WEBPAGE: fdiff
@@ -1399,11 +1439,15 @@
13991439
g.zTop, zUuid);
14001440
}
14011441
}
14021442
style_header("Hex Artifact Content");
14031443
zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
1404
- @ <h2>Artifact %s(zUuid):</h2>
1444
+ if( g.perm.Setup ){
1445
+ @ <h2>Artifact %s(zUuid) (%d(rid)):</h2>
1446
+ }else{
1447
+ @ <h2>Artifact %s(zUuid):</h2>
1448
+ }
14051449
blob_zero(&downloadName);
14061450
object_description(rid, 0, &downloadName);
14071451
style_submenu_element("Download", "Download",
14081452
"%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
14091453
@ <hr />
@@ -1449,11 +1493,11 @@
14491493
**
14501494
** zLn is the ?ln= parameter for the HTTP query. If there is an argument,
14511495
** then highlight that line number and scroll to it once the page loads.
14521496
** If there are two line numbers, highlight the range of lines.
14531497
*/
1454
-static void output_text_with_line_numbers(
1498
+void output_text_with_line_numbers(
14551499
const char *z,
14561500
const char *zLn
14571501
){
14581502
int iStart, iEnd; /* Start and end of region to highlight */
14591503
int n = 0; /* Current line number */
@@ -1519,11 +1563,15 @@
15191563
Blob content;
15201564
const char *zMime;
15211565
Blob downloadName;
15221566
int renderAsWiki = 0;
15231567
int renderAsHtml = 0;
1568
+ int objType;
1569
+ int asText;
15241570
const char *zUuid;
1571
+ Manifest *pManifest;
1572
+
15251573
if( P("ci") && P("filename") ){
15261574
rid = artifact_from_ci_and_filename();
15271575
}
15281576
if( rid==0 ){
15291577
rid = name_to_rid_www("name");
@@ -1542,37 +1590,45 @@
15421590
g.zTop, zUuid);
15431591
}
15441592
}
15451593
style_header("Artifact Content");
15461594
zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid);
1547
- @ <h2>Artifact %s(zUuid)</h2>
1595
+ if( g.perm.Setup ){
1596
+ @ <h2>Artifact %s(zUuid) (%d(rid)):</h2>
1597
+ }else{
1598
+ @ <h2>Artifact %s(zUuid):</h2>
1599
+ }
15481600
blob_zero(&downloadName);
1549
- object_description(rid, 0, &downloadName);
1601
+ objType = object_description(rid, 0, &downloadName);
15501602
style_submenu_element("Download", "Download",
15511603
"%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
1604
+ asText = P("txt")!=0;
15521605
zMime = mimetype_from_name(blob_str(&downloadName));
15531606
if( zMime ){
15541607
if( fossil_strcmp(zMime, "text/html")==0 ){
1555
- if( P("txt") ){
1608
+ if( asText ){
15561609
style_submenu_element("Html", "Html",
15571610
"%s/artifact/%s", g.zTop, zUuid);
15581611
}else{
15591612
renderAsHtml = 1;
15601613
style_submenu_element("Text", "Text",
15611614
"%s/artifact/%s?txt=1", g.zTop, zUuid);
15621615
}
15631616
}else if( fossil_strcmp(zMime, "application/x-fossil-wiki")==0 ){
1564
- if( P("txt") ){
1617
+ if( asText ){
15651618
style_submenu_element("Wiki", "Wiki",
15661619
"%s/artifact/%s", g.zTop, zUuid);
15671620
}else{
15681621
renderAsWiki = 1;
15691622
style_submenu_element("Text", "Text",
15701623
"%s/artifact/%s?txt=1", g.zTop, zUuid);
15711624
}
15721625
}
15731626
}
1627
+ if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){
1628
+ style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid);
1629
+ }
15741630
@ <hr />
15751631
content_get(rid, &content);
15761632
if( renderAsWiki ){
15771633
wiki_convert(&content, 0, 0);
15781634
}else if( renderAsHtml ){
@@ -1614,12 +1670,14 @@
16141670
*/
16151671
void tinfo_page(void){
16161672
int rid;
16171673
char *zDate;
16181674
const char *zUuid;
1619
- char zTktName[20];
1675
+ char zTktName[UUID_SIZE+1];
16201676
Manifest *pTktChng;
1677
+ int modPending;
1678
+ const char *zModAction;
16211679
16221680
login_check_credentials();
16231681
if( !g.perm.RdTkt ){ login_needed(); return; }
16241682
rid = name_to_rid_www("name");
16251683
if( rid==0 ){ fossil_redirect_home(); }
@@ -1632,33 +1690,64 @@
16321690
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
16331691
g.zTop, zUuid);
16341692
}
16351693
}
16361694
pTktChng = manifest_get(rid, CFTYPE_TICKET);
1637
- if( pTktChng==0 ){
1638
- fossil_redirect_home();
1695
+ if( pTktChng==0 ) fossil_redirect_home();
1696
+ zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
1697
+ memcpy(zTktName, pTktChng->zTicketUuid, UUID_SIZE+1);
1698
+ if( g.perm.ModTkt && (zModAction = P("modaction"))!=0 ){
1699
+ if( strcmp(zModAction,"delete")==0 ){
1700
+ moderation_disapprove(rid);
1701
+ cgi_redirectf("%R/tktview/%s", zTktName);
1702
+ /*NOTREACHED*/
1703
+ }
1704
+ if( strcmp(zModAction,"approve")==0 ){
1705
+ moderation_approve(rid);
1706
+ }
16391707
}
16401708
style_header("Ticket Change Details");
1641
- zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
1642
- memcpy(zTktName, pTktChng->zTicketUuid, 10);
1643
- zTktName[10] = 0;
1644
- if( g.perm.Hyperlink ){
1645
- @ <h2>Changes to ticket
1646
- @ %z(href("%R/tktview/%s",pTktChng->zTicketUuid))%s(zTktName)</a></h2>
1647
- @
1648
- @ <p>By %h(pTktChng->zUser) on %s(zDate). See also:
1649
- @ %z(href("%R/artifact/%T",zUuid))artifact content</a>, and
1650
- @ %z(href("%R/tkthistory/%s",pTktChng->zTicketUuid))ticket history</a></p>
1651
- }else{
1652
- @ <h2>Changes to ticket %s(zTktName)</h2>
1653
- @
1654
- @ <p>By %h(pTktChng->zUser) on %s(zDate).
1655
- @ </p>
1656
- }
1657
- @
1658
- @ <ol>
1709
+ style_submenu_element("Raw", "Raw", "%R/artifact/%S", zUuid);
1710
+ style_submenu_element("History", "History", "%R/tkthistory/%s", zTktName);
1711
+ style_submenu_element("Page", "Page", "%R/tktview/%t", zTktName);
1712
+ style_submenu_element("Timeline", "Timeline", "%R/tkttimeline/%t", zTktName);
1713
+
1714
+ @ <div class="section">Overview</div>
1715
+ @ <p><table class="label-value">
1716
+ @ <tr><th>Artifact&nbsp;ID:</th>
1717
+ @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
1718
+ if( g.perm.Setup ){
1719
+ @ (%d(rid))
1720
+ }
1721
+ modPending = moderation_pending(rid);
1722
+ if( modPending ){
1723
+ @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
1724
+ }
1725
+ @ <tr><th>Ticket:</th>
1726
+ @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr>
1727
+ @ <tr><th>Date:</th><td>
1728
+ hyperlink_to_date(zDate, "</td></tr>");
16591729
free(zDate);
1730
+ @ <tr><th>User:</th><td>
1731
+ hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
1732
+ @ </table>
1733
+
1734
+ if( g.perm.ModTkt && modPending ){
1735
+ @ <div class="section">Moderation</div>
1736
+ @ <blockquote>
1737
+ @ <form method="POST" action="%R/tinfo/%s(zUuid)">
1738
+ @ <label><input type="radio" name="modaction" value="delete">
1739
+ @ Delete this change</label><br />
1740
+ @ <label><input type="radio" name="modaction" value="approve">
1741
+ @ Approve this change</label><br />
1742
+ @ <input type="submit" value="Submit">
1743
+ @ </form>
1744
+ @ </blockquote>
1745
+ }
1746
+
1747
+ @ <div class="section">Changes</div>
1748
+ @ <p>
16601749
ticket_output_change_artifact(pTktChng);
16611750
manifest_destroy(pTktChng);
16621751
style_footer();
16631752
}
16641753
@@ -1724,10 +1813,13 @@
17241813
if( db_exists("SELECT 1 FROM plink WHERE cid=%d", rid) ){
17251814
ci_page();
17261815
}else
17271816
if( db_exists("SELECT 1 FROM plink WHERE pid=%d", rid) ){
17281817
ci_page();
1818
+ }else
1819
+ if( db_exists("SELECT 1 FROM attachment WHERE attachid=%d", rid) ){
1820
+ ainfo_page();
17291821
}else
17301822
{
17311823
artifact_page();
17321824
}
17331825
}
17341826
--- src/info.c
+++ src/info.c
@@ -713,84 +713,98 @@
713 style_footer();
714 }
715
716 /*
717 ** WEBPAGE: winfo
718 ** URL: /winfo?name=RID
719 **
720 ** Return information about a wiki page.
721 */
722 void winfo_page(void){
723 Stmt q;
724 int rid;
 
 
 
 
 
 
725
726 login_check_credentials();
727 if( !g.perm.RdWiki ){ login_needed(); return; }
728 rid = name_to_rid_www("name");
729 if( rid==0 ){
730 style_header("Wiki Page Information Error");
731 @ No such object: %h(g.argv[2])
732 style_footer();
733 return;
734 }
735 db_prepare(&q,
736 "SELECT substr(tagname, 6, 1000), uuid,"
737 " datetime(event.mtime, 'localtime'), user"
738 " FROM tagxref, tag, blob, event"
739 " WHERE tagxref.rid=%d"
740 " AND tag.tagid=tagxref.tagid"
741 " AND tag.tagname LIKE 'wiki-%%'"
742 " AND blob.rid=%d"
743 " AND event.objid=%d",
744 rid, rid, rid
745 );
746 if( db_step(&q)==SQLITE_ROW ){
747 const char *zName = db_column_text(&q, 0);
748 const char *zUuid = db_column_text(&q, 1);
749 char *zTitle = mprintf("Wiki Page %s", zName);
750 const char *zDate = db_column_text(&q,2);
751 const char *zUser = db_column_text(&q,3);
752 style_header(zTitle);
753 free(zTitle);
754 login_anonymous_available();
755 @ <div class="section">Overview</div>
756 @ <p><table class="label-value">
757 @ <tr><th>Version:</th><td>%s(zUuid)</td></tr>
758 @ <tr><th>Date:</th><td>
759 hyperlink_to_date(zDate, "</td></tr>");
760 if( g.perm.Setup ){
761 @ <tr><th>Record ID:</th><td>%d(rid)</td></tr>
762 }
763 @ <tr><th>Original&nbsp;User:</th><td>
764 hyperlink_to_user(zUser, zDate, "</td></tr>");
765 if( g.perm.Hyperlink ){
766 @ <tr><th>Commands:</th>
767 @ <td>
768 @ %z(href("%R/whistory?name=%t",zName))history</a>
769 @ | %z(href("%R/artifact/%S",zUuid))raw-text</a>
770 @ </td>
771 @ </tr>
772 }
773 @ </table></p>
774 }else{
775 style_header("Wiki Information");
776 rid = 0;
777 }
778 db_finalize(&q);
779 showTags(rid, "wiki-*");
780 if( rid ){
781 Manifest *pWiki;
782 pWiki = manifest_get(rid, CFTYPE_WIKI);
783 if( pWiki ){
784 Blob wiki;
785 blob_init(&wiki, pWiki->zWiki, -1);
786 @ <div class="section">Content</div>
787 wiki_convert(&wiki, 0, 0);
788 blob_reset(&wiki);
789 }
790 manifest_destroy(pWiki);
791 }
 
 
 
 
 
 
 
 
 
792 style_footer();
793 }
794
795 /*
796 ** Show a webpage error message
@@ -993,10 +1007,25 @@
993 manifest_destroy(pTo);
994
995 style_footer();
996 }
997
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
998 /*
999 ** Write a description of an object to the www reply.
1000 **
1001 ** If the object is a file then mention:
1002 **
@@ -1008,18 +1037,19 @@
1008 **
1009 ** * It's artifact ID
1010 ** * date of check-in
1011 ** * Comment & user
1012 */
1013 void object_description(
1014 int rid, /* The artifact ID */
1015 int linkToView, /* Add viewer link if true */
1016 Blob *pDownloadName /* Fill with an appropriate download name */
1017 ){
1018 Stmt q;
1019 int cnt = 0;
1020 int nWiki = 0;
 
1021 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1022
1023 char *prevName = 0;
1024
1025 db_prepare(&q,
@@ -1051,15 +1081,18 @@
1051 if( prevName ) {
1052 @ </ul>
1053 }
1054 if( mPerm==PERM_LNK ){
1055 @ <li>Symbolic link
 
1056 }else if( mPerm==PERM_EXE ){
1057 @ <li>Executable file
 
1058 }else{
1059 @ <li>File
1060 }
 
1061 @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
1062 @ <ul>
1063 prevName = fossil_strdup(zName);
1064 }
1065 @ <li>
@@ -1100,17 +1133,18 @@
1100 if( cnt>0 ){
1101 @ Also wiki page
1102 }else{
1103 @ Wiki page
1104 }
 
1105 @ [%z(href("%R/wiki?name=%t",zPagename))%h(zPagename)</a>] by
1106 hyperlink_to_user(zUser,zDate," on");
1107 hyperlink_to_date(zDate,".");
1108 nWiki++;
1109 cnt++;
1110 if( pDownloadName && blob_size(pDownloadName)==0 ){
1111 blob_appendf(pDownloadName, "%s.wiki", zPagename);
1112 }
1113 }
1114 db_finalize(&q);
1115 if( nWiki==0 ){
1116 db_prepare(&q,
@@ -1129,16 +1163,20 @@
1129 if( cnt>0 ){
1130 @ Also
1131 }
1132 if( zType[0]=='w' ){
1133 @ Wiki edit
 
1134 }else if( zType[0]=='t' ){
1135 @ Ticket change
 
1136 }else if( zType[0]=='c' ){
1137 @ Manifest of check-in
 
1138 }else if( zType[0]=='e' ){
1139 @ Instance of event
 
1140 hyperlink_to_event_tagid(db_column_int(&q, 5));
1141 }else{
1142 @ Control file referencing
1143 }
1144 if( zType[0]!='e' ){
@@ -1170,10 +1208,11 @@
1170 if( cnt>0 ){
1171 @ Also attachment "%h(zFilename)" to
1172 }else{
1173 @ Attachment "%h(zFilename)" to
1174 }
 
1175 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1176 if( g.perm.Hyperlink && g.perm.RdTkt ){
1177 @ ticket [%z(href("%R/tktview?name=%S",zTarget))%S(zTarget)</a>]
1178 }else{
1179 @ ticket [%S(zTarget)]
@@ -1200,10 +1239,11 @@
1200 blob_appendf(pDownloadName, "%.10s.txt", zUuid);
1201 }
1202 }else if( linkToView && g.perm.Hyperlink ){
1203 @ %z(href("%R/artifact/%S",zUuid))[view]</a>
1204 }
 
1205 }
1206
1207
1208 /*
1209 ** WEBPAGE: fdiff
@@ -1399,11 +1439,15 @@
1399 g.zTop, zUuid);
1400 }
1401 }
1402 style_header("Hex Artifact Content");
1403 zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
1404 @ <h2>Artifact %s(zUuid):</h2>
 
 
 
 
1405 blob_zero(&downloadName);
1406 object_description(rid, 0, &downloadName);
1407 style_submenu_element("Download", "Download",
1408 "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
1409 @ <hr />
@@ -1449,11 +1493,11 @@
1449 **
1450 ** zLn is the ?ln= parameter for the HTTP query. If there is an argument,
1451 ** then highlight that line number and scroll to it once the page loads.
1452 ** If there are two line numbers, highlight the range of lines.
1453 */
1454 static void output_text_with_line_numbers(
1455 const char *z,
1456 const char *zLn
1457 ){
1458 int iStart, iEnd; /* Start and end of region to highlight */
1459 int n = 0; /* Current line number */
@@ -1519,11 +1563,15 @@
1519 Blob content;
1520 const char *zMime;
1521 Blob downloadName;
1522 int renderAsWiki = 0;
1523 int renderAsHtml = 0;
 
 
1524 const char *zUuid;
 
 
1525 if( P("ci") && P("filename") ){
1526 rid = artifact_from_ci_and_filename();
1527 }
1528 if( rid==0 ){
1529 rid = name_to_rid_www("name");
@@ -1542,37 +1590,45 @@
1542 g.zTop, zUuid);
1543 }
1544 }
1545 style_header("Artifact Content");
1546 zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid);
1547 @ <h2>Artifact %s(zUuid)</h2>
 
 
 
 
1548 blob_zero(&downloadName);
1549 object_description(rid, 0, &downloadName);
1550 style_submenu_element("Download", "Download",
1551 "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
 
1552 zMime = mimetype_from_name(blob_str(&downloadName));
1553 if( zMime ){
1554 if( fossil_strcmp(zMime, "text/html")==0 ){
1555 if( P("txt") ){
1556 style_submenu_element("Html", "Html",
1557 "%s/artifact/%s", g.zTop, zUuid);
1558 }else{
1559 renderAsHtml = 1;
1560 style_submenu_element("Text", "Text",
1561 "%s/artifact/%s?txt=1", g.zTop, zUuid);
1562 }
1563 }else if( fossil_strcmp(zMime, "application/x-fossil-wiki")==0 ){
1564 if( P("txt") ){
1565 style_submenu_element("Wiki", "Wiki",
1566 "%s/artifact/%s", g.zTop, zUuid);
1567 }else{
1568 renderAsWiki = 1;
1569 style_submenu_element("Text", "Text",
1570 "%s/artifact/%s?txt=1", g.zTop, zUuid);
1571 }
1572 }
1573 }
 
 
 
1574 @ <hr />
1575 content_get(rid, &content);
1576 if( renderAsWiki ){
1577 wiki_convert(&content, 0, 0);
1578 }else if( renderAsHtml ){
@@ -1614,12 +1670,14 @@
1614 */
1615 void tinfo_page(void){
1616 int rid;
1617 char *zDate;
1618 const char *zUuid;
1619 char zTktName[20];
1620 Manifest *pTktChng;
 
 
1621
1622 login_check_credentials();
1623 if( !g.perm.RdTkt ){ login_needed(); return; }
1624 rid = name_to_rid_www("name");
1625 if( rid==0 ){ fossil_redirect_home(); }
@@ -1632,33 +1690,64 @@
1632 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1633 g.zTop, zUuid);
1634 }
1635 }
1636 pTktChng = manifest_get(rid, CFTYPE_TICKET);
1637 if( pTktChng==0 ){
1638 fossil_redirect_home();
 
 
 
 
 
 
 
 
 
 
1639 }
1640 style_header("Ticket Change Details");
1641 zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
1642 memcpy(zTktName, pTktChng->zTicketUuid, 10);
1643 zTktName[10] = 0;
1644 if( g.perm.Hyperlink ){
1645 @ <h2>Changes to ticket
1646 @ %z(href("%R/tktview/%s",pTktChng->zTicketUuid))%s(zTktName)</a></h2>
1647 @
1648 @ <p>By %h(pTktChng->zUser) on %s(zDate). See also:
1649 @ %z(href("%R/artifact/%T",zUuid))artifact content</a>, and
1650 @ %z(href("%R/tkthistory/%s",pTktChng->zTicketUuid))ticket history</a></p>
1651 }else{
1652 @ <h2>Changes to ticket %s(zTktName)</h2>
1653 @
1654 @ <p>By %h(pTktChng->zUser) on %s(zDate).
1655 @ </p>
1656 }
1657 @
1658 @ <ol>
 
 
1659 free(zDate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1660 ticket_output_change_artifact(pTktChng);
1661 manifest_destroy(pTktChng);
1662 style_footer();
1663 }
1664
@@ -1724,10 +1813,13 @@
1724 if( db_exists("SELECT 1 FROM plink WHERE cid=%d", rid) ){
1725 ci_page();
1726 }else
1727 if( db_exists("SELECT 1 FROM plink WHERE pid=%d", rid) ){
1728 ci_page();
 
 
 
1729 }else
1730 {
1731 artifact_page();
1732 }
1733 }
1734
--- src/info.c
+++ src/info.c
@@ -713,84 +713,98 @@
713 style_footer();
714 }
715
716 /*
717 ** WEBPAGE: winfo
718 ** URL: /winfo?name=UUID
719 **
720 ** Return information about a wiki page.
721 */
722 void winfo_page(void){
 
723 int rid;
724 Manifest *pWiki;
725 char *zUuid;
726 char *zDate;
727 Blob wiki;
728 int modPending;
729 const char *zModAction;
730
731 login_check_credentials();
732 if( !g.perm.RdWiki ){ login_needed(); return; }
733 rid = name_to_rid_www("name");
734 if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI))==0 ){
735 style_header("Wiki Page Information Error");
736 @ No such object: %h(P("name"))
737 style_footer();
738 return;
739 }
740 if( g.perm.ModWiki && (zModAction = P("modaction"))!=0 ){
741 if( strcmp(zModAction,"delete")==0 ){
742 moderation_disapprove(rid);
743 cgi_redirectf("%R/wiki?name=%T", pWiki->zWikiTitle);
744 /*NOTREACHED*/
745 }
746 if( strcmp(zModAction,"approve")==0 ){
747 moderation_approve(rid);
748 }
749 }
750 style_header("Update of \"%h\"", pWiki->zWikiTitle);
751 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
752 zDate = db_text(0, "SELECT datetime(%.17g)", pWiki->rDate);
753 style_submenu_element("Raw", "Raw", "artifact/%S", zUuid);
754 style_submenu_element("History", "History", "whistory?name=%t",
755 pWiki->zWikiTitle);
756 style_submenu_element("Page", "Page", "wiki?name=%t",
757 pWiki->zWikiTitle);
758 login_anonymous_available();
759 @ <div class="section">Overview</div>
760 @ <p><table class="label-value">
761 @ <tr><th>Artifact&nbsp;ID:</th>
762 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
763 if( g.perm.Setup ){
764 @ (%d(rid))
765 }
766 modPending = moderation_pending(rid);
767 if( modPending ){
768 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
769 }
770 @ </td></tr>
771 @ <tr><th>Page&nbsp;Name:</th><td>%h(pWiki->zWikiTitle)</td></tr>
772 @ <tr><th>Date:</th><td>
773 hyperlink_to_date(zDate, "</td></tr>");
774 @ <tr><th>Original&nbsp;User:</th><td>
775 hyperlink_to_user(pWiki->zUser, zDate, "</td></tr>");
776 if( pWiki->nParent>0 ){
777 int i;
778 @ <tr><th>Parent%s(pWiki->nParent==1?"":"s"):</th><td>
779 for(i=0; i<pWiki->nParent; i++){
780 char *zParent = pWiki->azParent[i];
781 @ %z(href("info/%S",zParent))%s(zParent)</a>
782 }
783 @ </td></tr>
784 }
785 @ </table>
786
787 if( g.perm.ModWiki && modPending ){
788 @ <div class="section">Moderation</div>
789 @ <blockquote>
790 @ <form method="POST" action="%R/winfo/%s(zUuid)">
791 @ <label><input type="radio" name="modaction" value="delete">
792 @ Delete this change</label><br />
793 @ <label><input type="radio" name="modaction" value="approve">
794 @ Approve this change</label><br />
795 @ <input type="submit" value="Submit">
796 @ </form>
797 @ </blockquote>
798 }
799
800
801 @ <div class="section">Content</div>
802 blob_init(&wiki, pWiki->zWiki, -1);
803 wiki_convert(&wiki, 0, 0);
804 blob_reset(&wiki);
805 manifest_destroy(pWiki);
806 style_footer();
807 }
808
809 /*
810 ** Show a webpage error message
@@ -993,10 +1007,25 @@
1007 manifest_destroy(pTo);
1008
1009 style_footer();
1010 }
1011
1012 #if INTERFACE
1013 /*
1014 ** Possible return values from object_description()
1015 */
1016 #define OBJTYPE_CHECKIN 0x0001
1017 #define OBJTYPE_CONTENT 0x0002
1018 #define OBJTYPE_WIKI 0x0004
1019 #define OBJTYPE_TICKET 0x0008
1020 #define OBJTYPE_ATTACHMENT 0x0010
1021 #define OBJTYPE_EVENT 0x0020
1022 #define OBJTYPE_TAG 0x0040
1023 #define OBJTYPE_SYMLINK 0x0080
1024 #define OBJTYPE_EXE 0x0100
1025 #endif
1026
1027 /*
1028 ** Write a description of an object to the www reply.
1029 **
1030 ** If the object is a file then mention:
1031 **
@@ -1008,18 +1037,19 @@
1037 **
1038 ** * It's artifact ID
1039 ** * date of check-in
1040 ** * Comment & user
1041 */
1042 int object_description(
1043 int rid, /* The artifact ID */
1044 int linkToView, /* Add viewer link if true */
1045 Blob *pDownloadName /* Fill with an appropriate download name */
1046 ){
1047 Stmt q;
1048 int cnt = 0;
1049 int nWiki = 0;
1050 int objType = 0;
1051 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1052
1053 char *prevName = 0;
1054
1055 db_prepare(&q,
@@ -1051,15 +1081,18 @@
1081 if( prevName ) {
1082 @ </ul>
1083 }
1084 if( mPerm==PERM_LNK ){
1085 @ <li>Symbolic link
1086 objType |= OBJTYPE_SYMLINK;
1087 }else if( mPerm==PERM_EXE ){
1088 @ <li>Executable file
1089 objType |= OBJTYPE_EXE;
1090 }else{
1091 @ <li>File
1092 }
1093 objType |= OBJTYPE_CONTENT;
1094 @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
1095 @ <ul>
1096 prevName = fossil_strdup(zName);
1097 }
1098 @ <li>
@@ -1100,17 +1133,18 @@
1133 if( cnt>0 ){
1134 @ Also wiki page
1135 }else{
1136 @ Wiki page
1137 }
1138 objType |= OBJTYPE_WIKI;
1139 @ [%z(href("%R/wiki?name=%t",zPagename))%h(zPagename)</a>] by
1140 hyperlink_to_user(zUser,zDate," on");
1141 hyperlink_to_date(zDate,".");
1142 nWiki++;
1143 cnt++;
1144 if( pDownloadName && blob_size(pDownloadName)==0 ){
1145 blob_appendf(pDownloadName, "%s.txt", zPagename);
1146 }
1147 }
1148 db_finalize(&q);
1149 if( nWiki==0 ){
1150 db_prepare(&q,
@@ -1129,16 +1163,20 @@
1163 if( cnt>0 ){
1164 @ Also
1165 }
1166 if( zType[0]=='w' ){
1167 @ Wiki edit
1168 objType |= OBJTYPE_WIKI;
1169 }else if( zType[0]=='t' ){
1170 @ Ticket change
1171 objType |= OBJTYPE_TICKET;
1172 }else if( zType[0]=='c' ){
1173 @ Manifest of check-in
1174 objType |= OBJTYPE_CHECKIN;
1175 }else if( zType[0]=='e' ){
1176 @ Instance of event
1177 objType |= OBJTYPE_EVENT;
1178 hyperlink_to_event_tagid(db_column_int(&q, 5));
1179 }else{
1180 @ Control file referencing
1181 }
1182 if( zType[0]!='e' ){
@@ -1170,10 +1208,11 @@
1208 if( cnt>0 ){
1209 @ Also attachment "%h(zFilename)" to
1210 }else{
1211 @ Attachment "%h(zFilename)" to
1212 }
1213 objType |= OBJTYPE_ATTACHMENT;
1214 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1215 if( g.perm.Hyperlink && g.perm.RdTkt ){
1216 @ ticket [%z(href("%R/tktview?name=%S",zTarget))%S(zTarget)</a>]
1217 }else{
1218 @ ticket [%S(zTarget)]
@@ -1200,10 +1239,11 @@
1239 blob_appendf(pDownloadName, "%.10s.txt", zUuid);
1240 }
1241 }else if( linkToView && g.perm.Hyperlink ){
1242 @ %z(href("%R/artifact/%S",zUuid))[view]</a>
1243 }
1244 return objType;
1245 }
1246
1247
1248 /*
1249 ** WEBPAGE: fdiff
@@ -1399,11 +1439,15 @@
1439 g.zTop, zUuid);
1440 }
1441 }
1442 style_header("Hex Artifact Content");
1443 zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
1444 if( g.perm.Setup ){
1445 @ <h2>Artifact %s(zUuid) (%d(rid)):</h2>
1446 }else{
1447 @ <h2>Artifact %s(zUuid):</h2>
1448 }
1449 blob_zero(&downloadName);
1450 object_description(rid, 0, &downloadName);
1451 style_submenu_element("Download", "Download",
1452 "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
1453 @ <hr />
@@ -1449,11 +1493,11 @@
1493 **
1494 ** zLn is the ?ln= parameter for the HTTP query. If there is an argument,
1495 ** then highlight that line number and scroll to it once the page loads.
1496 ** If there are two line numbers, highlight the range of lines.
1497 */
1498 void output_text_with_line_numbers(
1499 const char *z,
1500 const char *zLn
1501 ){
1502 int iStart, iEnd; /* Start and end of region to highlight */
1503 int n = 0; /* Current line number */
@@ -1519,11 +1563,15 @@
1563 Blob content;
1564 const char *zMime;
1565 Blob downloadName;
1566 int renderAsWiki = 0;
1567 int renderAsHtml = 0;
1568 int objType;
1569 int asText;
1570 const char *zUuid;
1571 Manifest *pManifest;
1572
1573 if( P("ci") && P("filename") ){
1574 rid = artifact_from_ci_and_filename();
1575 }
1576 if( rid==0 ){
1577 rid = name_to_rid_www("name");
@@ -1542,37 +1590,45 @@
1590 g.zTop, zUuid);
1591 }
1592 }
1593 style_header("Artifact Content");
1594 zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid);
1595 if( g.perm.Setup ){
1596 @ <h2>Artifact %s(zUuid) (%d(rid)):</h2>
1597 }else{
1598 @ <h2>Artifact %s(zUuid):</h2>
1599 }
1600 blob_zero(&downloadName);
1601 objType = object_description(rid, 0, &downloadName);
1602 style_submenu_element("Download", "Download",
1603 "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid);
1604 asText = P("txt")!=0;
1605 zMime = mimetype_from_name(blob_str(&downloadName));
1606 if( zMime ){
1607 if( fossil_strcmp(zMime, "text/html")==0 ){
1608 if( asText ){
1609 style_submenu_element("Html", "Html",
1610 "%s/artifact/%s", g.zTop, zUuid);
1611 }else{
1612 renderAsHtml = 1;
1613 style_submenu_element("Text", "Text",
1614 "%s/artifact/%s?txt=1", g.zTop, zUuid);
1615 }
1616 }else if( fossil_strcmp(zMime, "application/x-fossil-wiki")==0 ){
1617 if( asText ){
1618 style_submenu_element("Wiki", "Wiki",
1619 "%s/artifact/%s", g.zTop, zUuid);
1620 }else{
1621 renderAsWiki = 1;
1622 style_submenu_element("Text", "Text",
1623 "%s/artifact/%s?txt=1", g.zTop, zUuid);
1624 }
1625 }
1626 }
1627 if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){
1628 style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid);
1629 }
1630 @ <hr />
1631 content_get(rid, &content);
1632 if( renderAsWiki ){
1633 wiki_convert(&content, 0, 0);
1634 }else if( renderAsHtml ){
@@ -1614,12 +1670,14 @@
1670 */
1671 void tinfo_page(void){
1672 int rid;
1673 char *zDate;
1674 const char *zUuid;
1675 char zTktName[UUID_SIZE+1];
1676 Manifest *pTktChng;
1677 int modPending;
1678 const char *zModAction;
1679
1680 login_check_credentials();
1681 if( !g.perm.RdTkt ){ login_needed(); return; }
1682 rid = name_to_rid_www("name");
1683 if( rid==0 ){ fossil_redirect_home(); }
@@ -1632,33 +1690,64 @@
1690 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1691 g.zTop, zUuid);
1692 }
1693 }
1694 pTktChng = manifest_get(rid, CFTYPE_TICKET);
1695 if( pTktChng==0 ) fossil_redirect_home();
1696 zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate);
1697 memcpy(zTktName, pTktChng->zTicketUuid, UUID_SIZE+1);
1698 if( g.perm.ModTkt && (zModAction = P("modaction"))!=0 ){
1699 if( strcmp(zModAction,"delete")==0 ){
1700 moderation_disapprove(rid);
1701 cgi_redirectf("%R/tktview/%s", zTktName);
1702 /*NOTREACHED*/
1703 }
1704 if( strcmp(zModAction,"approve")==0 ){
1705 moderation_approve(rid);
1706 }
1707 }
1708 style_header("Ticket Change Details");
1709 style_submenu_element("Raw", "Raw", "%R/artifact/%S", zUuid);
1710 style_submenu_element("History", "History", "%R/tkthistory/%s", zTktName);
1711 style_submenu_element("Page", "Page", "%R/tktview/%t", zTktName);
1712 style_submenu_element("Timeline", "Timeline", "%R/tkttimeline/%t", zTktName);
1713
1714 @ <div class="section">Overview</div>
1715 @ <p><table class="label-value">
1716 @ <tr><th>Artifact&nbsp;ID:</th>
1717 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
1718 if( g.perm.Setup ){
1719 @ (%d(rid))
1720 }
1721 modPending = moderation_pending(rid);
1722 if( modPending ){
1723 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
1724 }
1725 @ <tr><th>Ticket:</th>
1726 @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr>
1727 @ <tr><th>Date:</th><td>
1728 hyperlink_to_date(zDate, "</td></tr>");
1729 free(zDate);
1730 @ <tr><th>User:</th><td>
1731 hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
1732 @ </table>
1733
1734 if( g.perm.ModTkt && modPending ){
1735 @ <div class="section">Moderation</div>
1736 @ <blockquote>
1737 @ <form method="POST" action="%R/tinfo/%s(zUuid)">
1738 @ <label><input type="radio" name="modaction" value="delete">
1739 @ Delete this change</label><br />
1740 @ <label><input type="radio" name="modaction" value="approve">
1741 @ Approve this change</label><br />
1742 @ <input type="submit" value="Submit">
1743 @ </form>
1744 @ </blockquote>
1745 }
1746
1747 @ <div class="section">Changes</div>
1748 @ <p>
1749 ticket_output_change_artifact(pTktChng);
1750 manifest_destroy(pTktChng);
1751 style_footer();
1752 }
1753
@@ -1724,10 +1813,13 @@
1813 if( db_exists("SELECT 1 FROM plink WHERE cid=%d", rid) ){
1814 ci_page();
1815 }else
1816 if( db_exists("SELECT 1 FROM plink WHERE pid=%d", rid) ){
1817 ci_page();
1818 }else
1819 if( db_exists("SELECT 1 FROM attachment WHERE attachid=%d", rid) ){
1820 ainfo_page();
1821 }else
1822 {
1823 artifact_page();
1824 }
1825 }
1826
+2 -1
--- src/login.c
+++ src/login.c
@@ -977,11 +977,12 @@
977977
case 's': g.perm.Setup = 1; /* Fall thru into Admin */
978978
case 'a': g.perm.Admin = g.perm.RdTkt = g.perm.WrTkt = g.perm.Zip =
979979
g.perm.RdWiki = g.perm.WrWiki = g.perm.NewWiki =
980980
g.perm.ApndWiki = g.perm.Hyperlink = g.perm.Clone =
981981
g.perm.NewTkt = g.perm.Password = g.perm.RdAddr =
982
- g.perm.TktFmt = g.perm.Attach = g.perm.ApndTkt = 1;
982
+ g.perm.TktFmt = g.perm.Attach = g.perm.ApndTkt =
983
+ g.perm.ModWiki = g.perm.ModTkt = 1;
983984
/* Fall thru into Read/Write */
984985
case 'i': g.perm.Read = g.perm.Write = 1; break;
985986
case 'o': g.perm.Read = 1; break;
986987
case 'z': g.perm.Zip = 1; break;
987988
988989
--- src/login.c
+++ src/login.c
@@ -977,11 +977,12 @@
977 case 's': g.perm.Setup = 1; /* Fall thru into Admin */
978 case 'a': g.perm.Admin = g.perm.RdTkt = g.perm.WrTkt = g.perm.Zip =
979 g.perm.RdWiki = g.perm.WrWiki = g.perm.NewWiki =
980 g.perm.ApndWiki = g.perm.Hyperlink = g.perm.Clone =
981 g.perm.NewTkt = g.perm.Password = g.perm.RdAddr =
982 g.perm.TktFmt = g.perm.Attach = g.perm.ApndTkt = 1;
 
983 /* Fall thru into Read/Write */
984 case 'i': g.perm.Read = g.perm.Write = 1; break;
985 case 'o': g.perm.Read = 1; break;
986 case 'z': g.perm.Zip = 1; break;
987
988
--- src/login.c
+++ src/login.c
@@ -977,11 +977,12 @@
977 case 's': g.perm.Setup = 1; /* Fall thru into Admin */
978 case 'a': g.perm.Admin = g.perm.RdTkt = g.perm.WrTkt = g.perm.Zip =
979 g.perm.RdWiki = g.perm.WrWiki = g.perm.NewWiki =
980 g.perm.ApndWiki = g.perm.Hyperlink = g.perm.Clone =
981 g.perm.NewTkt = g.perm.Password = g.perm.RdAddr =
982 g.perm.TktFmt = g.perm.Attach = g.perm.ApndTkt =
983 g.perm.ModWiki = g.perm.ModTkt = 1;
984 /* Fall thru into Read/Write */
985 case 'i': g.perm.Read = g.perm.Write = 1; break;
986 case 'o': g.perm.Read = 1; break;
987 case 'z': g.perm.Zip = 1; break;
988
989
+11 -1
--- src/main.mk
+++ src/main.mk
@@ -71,10 +71,11 @@
7171
$(SRCDIR)/main.c \
7272
$(SRCDIR)/manifest.c \
7373
$(SRCDIR)/md5.c \
7474
$(SRCDIR)/merge.c \
7575
$(SRCDIR)/merge3.c \
76
+ $(SRCDIR)/moderate.c \
7677
$(SRCDIR)/name.c \
7778
$(SRCDIR)/path.c \
7879
$(SRCDIR)/pivot.c \
7980
$(SRCDIR)/popen.c \
8081
$(SRCDIR)/pqueue.c \
@@ -171,10 +172,11 @@
171172
$(OBJDIR)/main_.c \
172173
$(OBJDIR)/manifest_.c \
173174
$(OBJDIR)/md5_.c \
174175
$(OBJDIR)/merge_.c \
175176
$(OBJDIR)/merge3_.c \
177
+ $(OBJDIR)/moderate_.c \
176178
$(OBJDIR)/name_.c \
177179
$(OBJDIR)/path_.c \
178180
$(OBJDIR)/pivot_.c \
179181
$(OBJDIR)/popen_.c \
180182
$(OBJDIR)/pqueue_.c \
@@ -271,10 +273,11 @@
271273
$(OBJDIR)/main.o \
272274
$(OBJDIR)/manifest.o \
273275
$(OBJDIR)/md5.o \
274276
$(OBJDIR)/merge.o \
275277
$(OBJDIR)/merge3.o \
278
+ $(OBJDIR)/moderate.o \
276279
$(OBJDIR)/name.o \
277280
$(OBJDIR)/path.o \
278281
$(OBJDIR)/pivot.o \
279282
$(OBJDIR)/popen.o \
280283
$(OBJDIR)/pqueue.o \
@@ -378,11 +381,11 @@
378381
379382
380383
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
381384
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
382385
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
383
- $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
386
+ $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
384387
touch $(OBJDIR)/headers
385388
$(OBJDIR)/headers: Makefile
386389
$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
387390
Makefile:
388391
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -796,10 +799,17 @@
796799
797800
$(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
798801
$(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
799802
800803
$(OBJDIR)/merge3.h: $(OBJDIR)/headers
804
+$(OBJDIR)/moderate_.c: $(SRCDIR)/moderate.c $(OBJDIR)/translate
805
+ $(OBJDIR)/translate $(SRCDIR)/moderate.c >$(OBJDIR)/moderate_.c
806
+
807
+$(OBJDIR)/moderate.o: $(OBJDIR)/moderate_.c $(OBJDIR)/moderate.h $(SRCDIR)/config.h
808
+ $(XTCC) -o $(OBJDIR)/moderate.o -c $(OBJDIR)/moderate_.c
809
+
810
+$(OBJDIR)/moderate.h: $(OBJDIR)/headers
801811
$(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
802812
$(OBJDIR)/translate $(SRCDIR)/name.c >$(OBJDIR)/name_.c
803813
804814
$(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
805815
$(XTCC) -o $(OBJDIR)/name.o -c $(OBJDIR)/name_.c
806816
--- src/main.mk
+++ src/main.mk
@@ -71,10 +71,11 @@
71 $(SRCDIR)/main.c \
72 $(SRCDIR)/manifest.c \
73 $(SRCDIR)/md5.c \
74 $(SRCDIR)/merge.c \
75 $(SRCDIR)/merge3.c \
 
76 $(SRCDIR)/name.c \
77 $(SRCDIR)/path.c \
78 $(SRCDIR)/pivot.c \
79 $(SRCDIR)/popen.c \
80 $(SRCDIR)/pqueue.c \
@@ -171,10 +172,11 @@
171 $(OBJDIR)/main_.c \
172 $(OBJDIR)/manifest_.c \
173 $(OBJDIR)/md5_.c \
174 $(OBJDIR)/merge_.c \
175 $(OBJDIR)/merge3_.c \
 
176 $(OBJDIR)/name_.c \
177 $(OBJDIR)/path_.c \
178 $(OBJDIR)/pivot_.c \
179 $(OBJDIR)/popen_.c \
180 $(OBJDIR)/pqueue_.c \
@@ -271,10 +273,11 @@
271 $(OBJDIR)/main.o \
272 $(OBJDIR)/manifest.o \
273 $(OBJDIR)/md5.o \
274 $(OBJDIR)/merge.o \
275 $(OBJDIR)/merge3.o \
 
276 $(OBJDIR)/name.o \
277 $(OBJDIR)/path.o \
278 $(OBJDIR)/pivot.o \
279 $(OBJDIR)/popen.o \
280 $(OBJDIR)/pqueue.o \
@@ -378,11 +381,11 @@
378
379
380 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
381 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
382 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
383 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
384 touch $(OBJDIR)/headers
385 $(OBJDIR)/headers: Makefile
386 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
387 Makefile:
388 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -796,10 +799,17 @@
796
797 $(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
798 $(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
799
800 $(OBJDIR)/merge3.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
801 $(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
802 $(OBJDIR)/translate $(SRCDIR)/name.c >$(OBJDIR)/name_.c
803
804 $(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
805 $(XTCC) -o $(OBJDIR)/name.o -c $(OBJDIR)/name_.c
806
--- src/main.mk
+++ src/main.mk
@@ -71,10 +71,11 @@
71 $(SRCDIR)/main.c \
72 $(SRCDIR)/manifest.c \
73 $(SRCDIR)/md5.c \
74 $(SRCDIR)/merge.c \
75 $(SRCDIR)/merge3.c \
76 $(SRCDIR)/moderate.c \
77 $(SRCDIR)/name.c \
78 $(SRCDIR)/path.c \
79 $(SRCDIR)/pivot.c \
80 $(SRCDIR)/popen.c \
81 $(SRCDIR)/pqueue.c \
@@ -171,10 +172,11 @@
172 $(OBJDIR)/main_.c \
173 $(OBJDIR)/manifest_.c \
174 $(OBJDIR)/md5_.c \
175 $(OBJDIR)/merge_.c \
176 $(OBJDIR)/merge3_.c \
177 $(OBJDIR)/moderate_.c \
178 $(OBJDIR)/name_.c \
179 $(OBJDIR)/path_.c \
180 $(OBJDIR)/pivot_.c \
181 $(OBJDIR)/popen_.c \
182 $(OBJDIR)/pqueue_.c \
@@ -271,10 +273,11 @@
273 $(OBJDIR)/main.o \
274 $(OBJDIR)/manifest.o \
275 $(OBJDIR)/md5.o \
276 $(OBJDIR)/merge.o \
277 $(OBJDIR)/merge3.o \
278 $(OBJDIR)/moderate.o \
279 $(OBJDIR)/name.o \
280 $(OBJDIR)/path.o \
281 $(OBJDIR)/pivot.o \
282 $(OBJDIR)/popen.o \
283 $(OBJDIR)/pqueue.o \
@@ -378,11 +381,11 @@
381
382
383 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
384 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
385 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
386 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
387 touch $(OBJDIR)/headers
388 $(OBJDIR)/headers: Makefile
389 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
390 Makefile:
391 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -796,10 +799,17 @@
799
800 $(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
801 $(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
802
803 $(OBJDIR)/merge3.h: $(OBJDIR)/headers
804 $(OBJDIR)/moderate_.c: $(SRCDIR)/moderate.c $(OBJDIR)/translate
805 $(OBJDIR)/translate $(SRCDIR)/moderate.c >$(OBJDIR)/moderate_.c
806
807 $(OBJDIR)/moderate.o: $(OBJDIR)/moderate_.c $(OBJDIR)/moderate.h $(SRCDIR)/config.h
808 $(XTCC) -o $(OBJDIR)/moderate.o -c $(OBJDIR)/moderate_.c
809
810 $(OBJDIR)/moderate.h: $(OBJDIR)/headers
811 $(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
812 $(OBJDIR)/translate $(SRCDIR)/name.c >$(OBJDIR)/name_.c
813
814 $(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
815 $(XTCC) -o $(OBJDIR)/name.o -c $(OBJDIR)/name_.c
816
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -74,10 +74,11 @@
7474
main
7575
manifest
7676
md5
7777
merge
7878
merge3
79
+ moderate
7980
name
8081
path
8182
pivot
8283
popen
8384
pqueue
8485
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -74,10 +74,11 @@
74 main
75 manifest
76 md5
77 merge
78 merge3
 
79 name
80 path
81 pivot
82 popen
83 pqueue
84
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -74,10 +74,11 @@
74 main
75 manifest
76 md5
77 merge
78 merge3
79 moderate
80 name
81 path
82 pivot
83 popen
84 pqueue
85
+6 -4
--- src/manifest.c
+++ src/manifest.c
@@ -318,20 +318,22 @@
318318
** Parse a blob into a Manifest object. The Manifest object
319319
** takes over the input blob and will free it when the
320320
** Manifest object is freed. Zeros are inserted into the blob
321321
** as string terminators so that blob should not be used again.
322322
**
323
-** Return TRUE if the content really is a control file of some
324
-** kind. Return FALSE if there are syntax errors.
323
+** Return a pointer to an allocated Manifest object if the content
324
+** really is a control file of some kind. This object needs to be
325
+** freed by a subsequent call to manifest_destroy(). Return NULL
326
+** if there are syntax errors.
325327
**
326328
** This routine is strict about the format of a control file.
327329
** The format must match exactly or else it is rejected. This
328330
** rule minimizes the risk that a content file will be mistaken
329331
** for a control file simply because they look the same.
330332
**
331
-** The pContent is reset. If TRUE is returned, then pContent will
332
-** be reset when the Manifest object is cleared. If FALSE is
333
+** The pContent is reset. If a pointer is returned, then pContent will
334
+** be reset when the Manifest object is cleared. If NULL is
333335
** returned then the Manifest object is cleared automatically
334336
** and pContent is reset before the return.
335337
**
336338
** The entire file can be PGP clear-signed. The signature is ignored.
337339
** The file consists of zero or more cards, one card per line.
338340
339341
ADDED src/moderate.c
--- src/manifest.c
+++ src/manifest.c
@@ -318,20 +318,22 @@
318 ** Parse a blob into a Manifest object. The Manifest object
319 ** takes over the input blob and will free it when the
320 ** Manifest object is freed. Zeros are inserted into the blob
321 ** as string terminators so that blob should not be used again.
322 **
323 ** Return TRUE if the content really is a control file of some
324 ** kind. Return FALSE if there are syntax errors.
 
 
325 **
326 ** This routine is strict about the format of a control file.
327 ** The format must match exactly or else it is rejected. This
328 ** rule minimizes the risk that a content file will be mistaken
329 ** for a control file simply because they look the same.
330 **
331 ** The pContent is reset. If TRUE is returned, then pContent will
332 ** be reset when the Manifest object is cleared. If FALSE is
333 ** returned then the Manifest object is cleared automatically
334 ** and pContent is reset before the return.
335 **
336 ** The entire file can be PGP clear-signed. The signature is ignored.
337 ** The file consists of zero or more cards, one card per line.
338
339 DDED src/moderate.c
--- src/manifest.c
+++ src/manifest.c
@@ -318,20 +318,22 @@
318 ** Parse a blob into a Manifest object. The Manifest object
319 ** takes over the input blob and will free it when the
320 ** Manifest object is freed. Zeros are inserted into the blob
321 ** as string terminators so that blob should not be used again.
322 **
323 ** Return a pointer to an allocated Manifest object if the content
324 ** really is a control file of some kind. This object needs to be
325 ** freed by a subsequent call to manifest_destroy(). Return NULL
326 ** if there are syntax errors.
327 **
328 ** This routine is strict about the format of a control file.
329 ** The format must match exactly or else it is rejected. This
330 ** rule minimizes the risk that a content file will be mistaken
331 ** for a control file simply because they look the same.
332 **
333 ** The pContent is reset. If a pointer is returned, then pContent will
334 ** be reset when the Manifest object is cleared. If NULL is
335 ** returned then the Manifest object is cleared automatically
336 ** and pContent is reset before the return.
337 **
338 ** The entire file can be PGP clear-signed. The signature is ignored.
339 ** The file consists of zero or more cards, one card per line.
340
341 DDED src/moderate.c
--- a/src/moderate.c
+++ b/src/moderate.c
@@ -0,0 +1,3 @@
1
+/writewritetransactiontransaction();
2
+RdWiki && !g.perm.RRdWiki && g.anonion();
3
+RdWiki && !g.perm.RRdWiki && g.anon/wr
--- a/src/moderate.c
+++ b/src/moderate.c
@@ -0,0 +1,3 @@
 
 
 
--- a/src/moderate.c
+++ b/src/moderate.c
@@ -0,0 +1,3 @@
1 /writewritetransactiontransaction();
2 RdWiki && !g.perm.RRdWiki && g.anonion();
3 RdWiki && !g.perm.RRdWiki && g.anon/wr
+1 -1
--- src/rebuild.c
+++ src/rebuild.c
@@ -347,11 +347,11 @@
347347
zTable = db_text(0,
348348
"SELECT name FROM sqlite_master /*scan*/"
349349
" WHERE type='table'"
350350
" AND name NOT IN ('blob','delta','rcvfrom','user',"
351351
"'config','shun','private','reportfmt',"
352
- "'concealed','accesslog')"
352
+ "'concealed','accesslog','modreq')"
353353
" AND name NOT GLOB 'sqlite_*'"
354354
);
355355
if( zTable==0 ) break;
356356
db_multi_exec("DROP TABLE %Q", zTable);
357357
free(zTable);
358358
--- src/rebuild.c
+++ src/rebuild.c
@@ -347,11 +347,11 @@
347 zTable = db_text(0,
348 "SELECT name FROM sqlite_master /*scan*/"
349 " WHERE type='table'"
350 " AND name NOT IN ('blob','delta','rcvfrom','user',"
351 "'config','shun','private','reportfmt',"
352 "'concealed','accesslog')"
353 " AND name NOT GLOB 'sqlite_*'"
354 );
355 if( zTable==0 ) break;
356 db_multi_exec("DROP TABLE %Q", zTable);
357 free(zTable);
358
--- src/rebuild.c
+++ src/rebuild.c
@@ -347,11 +347,11 @@
347 zTable = db_text(0,
348 "SELECT name FROM sqlite_master /*scan*/"
349 " WHERE type='table'"
350 " AND name NOT IN ('blob','delta','rcvfrom','user',"
351 "'config','shun','private','reportfmt',"
352 "'concealed','accesslog','modreq')"
353 " AND name NOT GLOB 'sqlite_*'"
354 );
355 if( zTable==0 ) break;
356 db_multi_exec("DROP TABLE %Q", zTable);
357 free(zTable);
358
+47
--- src/setup.c
+++ src/setup.c
@@ -92,10 +92,13 @@
9292
"Edit the Cascading Style Sheet used by all pages of this repository");
9393
setup_menu_entry("Header", "setup_header",
9494
"Edit HTML text inserted at the top of every page");
9595
setup_menu_entry("Footer", "setup_footer",
9696
"Edit HTML text inserted at the bottom of every page");
97
+ setup_menu_entry("Moderation", "setup_modreq",
98
+ "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
99
+ "edits and attachments.");
97100
setup_menu_entry("Ad-Unit", "setup_adunit",
98101
"Edit HTML text for an ad unit inserted after the menu bar");
99102
setup_menu_entry("Logo", "setup_logo",
100103
"Change the logo and background images for the server");
101104
setup_menu_entry("Shunned", "shun",
@@ -1403,10 +1406,54 @@
14031406
@ <blockquote><pre>
14041407
@ %h(zDefaultFooter)
14051408
@ </pre></blockquote>
14061409
style_footer();
14071410
db_end_transaction(0);
1411
+}
1412
+
1413
+/*
1414
+** WEBPAGE: setup_modreq
1415
+*/
1416
+void setup_modreq(void){
1417
+ login_check_credentials();
1418
+ if( !g.perm.Setup ){
1419
+ login_needed();
1420
+ }
1421
+
1422
+ style_header("Moderator For Wiki And Tickets");
1423
+ db_begin_transaction();
1424
+ @ <form action="%R/setup_modreq" method="post"><div>
1425
+ login_insert_csrf_secret();
1426
+ @ <hr />
1427
+ onoff_attribute("Moderate ticket changes",
1428
+ "modreq-tkt", "modreq-tkt", 0);
1429
+ @ <p>When enabled, any change to tickets is subject to the approval
1430
+ @ a ticket moderator - a user with the "q" or Mod-Tkt privilege.
1431
+ @ Ticket changes enter the system and are shown locally, but are not
1432
+ @ synced until they are approved. The moderator has the option to
1433
+ @ delete the change rather than approve it. Ticket changes made by
1434
+ @ a user who hwas the Mod-Tkt privilege are never subject to
1435
+ @ moderation.
1436
+ @
1437
+ @ <hr />
1438
+ onoff_attribute("Moderate wiki changes",
1439
+ "modreq-wiki", "modreq-wiki", 0);
1440
+ @ <p>When enabled, any change to wiki is subject to the approval
1441
+ @ a ticket moderator - a user with the "l" or Mod-Wiki privilege.
1442
+ @ Wiki changes enter the system and are shown locally, but are not
1443
+ @ synced until they are approved. The moderator has the option to
1444
+ @ delete the change rather than approve it. Wiki changes made by
1445
+ @ a user who has the Mod-Wiki privilege are never subject to
1446
+ @ moderation.
1447
+ @ </p>
1448
+
1449
+ @ <hr />
1450
+ @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1451
+ @ </div></form>
1452
+ db_end_transaction(0);
1453
+ style_footer();
1454
+
14081455
}
14091456
14101457
/*
14111458
** WEBPAGE: setup_adunit
14121459
*/
14131460
--- src/setup.c
+++ src/setup.c
@@ -92,10 +92,13 @@
92 "Edit the Cascading Style Sheet used by all pages of this repository");
93 setup_menu_entry("Header", "setup_header",
94 "Edit HTML text inserted at the top of every page");
95 setup_menu_entry("Footer", "setup_footer",
96 "Edit HTML text inserted at the bottom of every page");
 
 
 
97 setup_menu_entry("Ad-Unit", "setup_adunit",
98 "Edit HTML text for an ad unit inserted after the menu bar");
99 setup_menu_entry("Logo", "setup_logo",
100 "Change the logo and background images for the server");
101 setup_menu_entry("Shunned", "shun",
@@ -1403,10 +1406,54 @@
1403 @ <blockquote><pre>
1404 @ %h(zDefaultFooter)
1405 @ </pre></blockquote>
1406 style_footer();
1407 db_end_transaction(0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1408 }
1409
1410 /*
1411 ** WEBPAGE: setup_adunit
1412 */
1413
--- src/setup.c
+++ src/setup.c
@@ -92,10 +92,13 @@
92 "Edit the Cascading Style Sheet used by all pages of this repository");
93 setup_menu_entry("Header", "setup_header",
94 "Edit HTML text inserted at the top of every page");
95 setup_menu_entry("Footer", "setup_footer",
96 "Edit HTML text inserted at the bottom of every page");
97 setup_menu_entry("Moderation", "setup_modreq",
98 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
99 "edits and attachments.");
100 setup_menu_entry("Ad-Unit", "setup_adunit",
101 "Edit HTML text for an ad unit inserted after the menu bar");
102 setup_menu_entry("Logo", "setup_logo",
103 "Change the logo and background images for the server");
104 setup_menu_entry("Shunned", "shun",
@@ -1403,10 +1406,54 @@
1406 @ <blockquote><pre>
1407 @ %h(zDefaultFooter)
1408 @ </pre></blockquote>
1409 style_footer();
1410 db_end_transaction(0);
1411 }
1412
1413 /*
1414 ** WEBPAGE: setup_modreq
1415 */
1416 void setup_modreq(void){
1417 login_check_credentials();
1418 if( !g.perm.Setup ){
1419 login_needed();
1420 }
1421
1422 style_header("Moderator For Wiki And Tickets");
1423 db_begin_transaction();
1424 @ <form action="%R/setup_modreq" method="post"><div>
1425 login_insert_csrf_secret();
1426 @ <hr />
1427 onoff_attribute("Moderate ticket changes",
1428 "modreq-tkt", "modreq-tkt", 0);
1429 @ <p>When enabled, any change to tickets is subject to the approval
1430 @ a ticket moderator - a user with the "q" or Mod-Tkt privilege.
1431 @ Ticket changes enter the system and are shown locally, but are not
1432 @ synced until they are approved. The moderator has the option to
1433 @ delete the change rather than approve it. Ticket changes made by
1434 @ a user who hwas the Mod-Tkt privilege are never subject to
1435 @ moderation.
1436 @
1437 @ <hr />
1438 onoff_attribute("Moderate wiki changes",
1439 "modreq-wiki", "modreq-wiki", 0);
1440 @ <p>When enabled, any change to wiki is subject to the approval
1441 @ a ticket moderator - a user with the "l" or Mod-Wiki privilege.
1442 @ Wiki changes enter the system and are shown locally, but are not
1443 @ synced until they are approved. The moderator has the option to
1444 @ delete the change rather than approve it. Wiki changes made by
1445 @ a user who has the Mod-Wiki privilege are never subject to
1446 @ moderation.
1447 @ </p>
1448
1449 @ <hr />
1450 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1451 @ </div></form>
1452 db_end_transaction(0);
1453 style_footer();
1454
1455 }
1456
1457 /*
1458 ** WEBPAGE: setup_adunit
1459 */
1460
+6 -1
--- src/style.c
+++ src/style.c
@@ -930,13 +930,18 @@
930930
{ "span.diffhr",
931931
"suppressed lines in a diff",
932932
@ color: #0000ff;
933933
},
934934
{ "span.diffln",
935
- "line nubmers in a diff",
935
+ "line numbers in a diff",
936936
@ color: #a0a0a0;
937937
},
938
+ { "span.modpending",
939
+ "Moderation Pending message on timelin",
940
+ @ color: #b03800;
941
+ @ font-style: italic;
942
+ },
938943
{ 0,
939944
0,
940945
0
941946
}
942947
};
943948
--- src/style.c
+++ src/style.c
@@ -930,13 +930,18 @@
930 { "span.diffhr",
931 "suppressed lines in a diff",
932 @ color: #0000ff;
933 },
934 { "span.diffln",
935 "line nubmers in a diff",
936 @ color: #a0a0a0;
937 },
 
 
 
 
 
938 { 0,
939 0,
940 0
941 }
942 };
943
--- src/style.c
+++ src/style.c
@@ -930,13 +930,18 @@
930 { "span.diffhr",
931 "suppressed lines in a diff",
932 @ color: #0000ff;
933 },
934 { "span.diffln",
935 "line numbers in a diff",
936 @ color: #a0a0a0;
937 },
938 { "span.modpending",
939 "Moderation Pending message on timelin",
940 @ color: #b03800;
941 @ font-style: italic;
942 },
943 { 0,
944 0,
945 0
946 }
947 };
948
+7 -5
--- src/th_main.c
+++ src/th_main.c
@@ -192,11 +192,11 @@
192192
free(zOut);
193193
return TH_OK;
194194
}
195195
196196
/*
197
-** TH command: hascap STRING
197
+** TH command: hascap STRING...
198198
**
199199
** Return true if the user has all of the capabilities listed in STRING.
200200
*/
201201
static int hascapCmd(
202202
Th_Interp *interp,
@@ -203,15 +203,17 @@
203203
void *p,
204204
int argc,
205205
const char **argv,
206206
int *argl
207207
){
208
- int rc;
209
- if( argc!=2 ){
210
- return Th_WrongNumArgs(interp, "hascap STRING");
208
+ int rc = 0, i;
209
+ if( argc<2 ){
210
+ return Th_WrongNumArgs(interp, "hascap STRING ...");
211211
}
212
- rc = login_has_capability((char*)argv[1],argl[1]);
212
+ for(i=1; i<argc && rc==0; i++){
213
+ rc = login_has_capability((char*)argv[i],argl[i]);
214
+ }
213215
if( g.thTrace ){
214216
Th_Trace("[hascap %#h] => %d<br />\n", argl[1], argv[1], rc);
215217
}
216218
Th_SetResultInt(interp, rc);
217219
return TH_OK;
218220
--- src/th_main.c
+++ src/th_main.c
@@ -192,11 +192,11 @@
192 free(zOut);
193 return TH_OK;
194 }
195
196 /*
197 ** TH command: hascap STRING
198 **
199 ** Return true if the user has all of the capabilities listed in STRING.
200 */
201 static int hascapCmd(
202 Th_Interp *interp,
@@ -203,15 +203,17 @@
203 void *p,
204 int argc,
205 const char **argv,
206 int *argl
207 ){
208 int rc;
209 if( argc!=2 ){
210 return Th_WrongNumArgs(interp, "hascap STRING");
211 }
212 rc = login_has_capability((char*)argv[1],argl[1]);
 
 
213 if( g.thTrace ){
214 Th_Trace("[hascap %#h] => %d<br />\n", argl[1], argv[1], rc);
215 }
216 Th_SetResultInt(interp, rc);
217 return TH_OK;
218
--- src/th_main.c
+++ src/th_main.c
@@ -192,11 +192,11 @@
192 free(zOut);
193 return TH_OK;
194 }
195
196 /*
197 ** TH command: hascap STRING...
198 **
199 ** Return true if the user has all of the capabilities listed in STRING.
200 */
201 static int hascapCmd(
202 Th_Interp *interp,
@@ -203,15 +203,17 @@
203 void *p,
204 int argc,
205 const char **argv,
206 int *argl
207 ){
208 int rc = 0, i;
209 if( argc<2 ){
210 return Th_WrongNumArgs(interp, "hascap STRING ...");
211 }
212 for(i=1; i<argc && rc==0; i++){
213 rc = login_has_capability((char*)argv[i],argl[i]);
214 }
215 if( g.thTrace ){
216 Th_Trace("[hascap %#h] => %d<br />\n", argl[1], argv[1], rc);
217 }
218 Th_SetResultInt(interp, rc);
219 return TH_OK;
220
+9 -2
--- src/timeline.c
+++ src/timeline.c
@@ -236,12 +236,16 @@
236236
const char *zUser = db_column_text(pQuery, 4);
237237
const char *zTagList = db_column_text(pQuery, 8);
238238
int tagid = db_column_int(pQuery, 9);
239239
const char *zBr = 0; /* Branch */
240240
int commentColumn = 3; /* Column containing comment text */
241
+ int modPending; /* Pending moderation */
241242
char zTime[8];
243
+
244
+ modPending = moderation_pending(rid);
242245
if( tagid ){
246
+ if( modPending ) tagid = -tagid;
243247
if( tagid==prevTagid ){
244248
if( tmFlags & TIMELINE_BRIEF ){
245249
suppressCnt++;
246250
continue;
247251
}else{
@@ -320,10 +324,13 @@
320324
@ <td class="timelineTableCell">
321325
}
322326
if( pGraph && zType[0]!='c' ){
323327
@ &bull;
324328
}
329
+ if( modPending ){
330
+ @ <span class="modpending">(Awaiting Moderator Approval)</span>
331
+ }
325332
if( zType[0]=='c' ){
326333
hyperlink_to_uuid(zUuid);
327334
if( isLeaf ){
328335
if( db_exists("SELECT 1 FROM tagxref"
329336
" WHERE rid=%d AND tagid=%d AND tagtype>0",
@@ -332,11 +339,11 @@
332339
}else{
333340
@ <span class="timelineLeaf">Leaf:</span>
334341
}
335342
}
336343
}else if( zType[0]=='e' && tagid ){
337
- hyperlink_to_event_tagid(tagid);
344
+ hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
338345
}else if( (tmFlags & TIMELINE_ARTID)!=0 ){
339346
hyperlink_to_uuid(zUuid);
340347
}
341348
db_column_blob(pQuery, commentColumn, &comment);
342349
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
@@ -361,11 +368,11 @@
361368
}else{
362369
@ (user: %h(zUser)%s(zTagList?",":"\051")
363370
}
364371
365372
/* Generate a "detail" link for tags. */
366
- if( zType[0]=='g' && g.perm.Hyperlink ){
373
+ if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
367374
@ [%z(href("%R/info/%S",zUuid))details</a>]
368375
}
369376
370377
/* Generate the "tags: TAGLIST" at the end of the comment, together
371378
** with hyperlinks to the tag list.
372379
--- src/timeline.c
+++ src/timeline.c
@@ -236,12 +236,16 @@
236 const char *zUser = db_column_text(pQuery, 4);
237 const char *zTagList = db_column_text(pQuery, 8);
238 int tagid = db_column_int(pQuery, 9);
239 const char *zBr = 0; /* Branch */
240 int commentColumn = 3; /* Column containing comment text */
 
241 char zTime[8];
 
 
242 if( tagid ){
 
243 if( tagid==prevTagid ){
244 if( tmFlags & TIMELINE_BRIEF ){
245 suppressCnt++;
246 continue;
247 }else{
@@ -320,10 +324,13 @@
320 @ <td class="timelineTableCell">
321 }
322 if( pGraph && zType[0]!='c' ){
323 @ &bull;
324 }
 
 
 
325 if( zType[0]=='c' ){
326 hyperlink_to_uuid(zUuid);
327 if( isLeaf ){
328 if( db_exists("SELECT 1 FROM tagxref"
329 " WHERE rid=%d AND tagid=%d AND tagtype>0",
@@ -332,11 +339,11 @@
332 }else{
333 @ <span class="timelineLeaf">Leaf:</span>
334 }
335 }
336 }else if( zType[0]=='e' && tagid ){
337 hyperlink_to_event_tagid(tagid);
338 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
339 hyperlink_to_uuid(zUuid);
340 }
341 db_column_blob(pQuery, commentColumn, &comment);
342 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
@@ -361,11 +368,11 @@
361 }else{
362 @ (user: %h(zUser)%s(zTagList?",":"\051")
363 }
364
365 /* Generate a "detail" link for tags. */
366 if( zType[0]=='g' && g.perm.Hyperlink ){
367 @ [%z(href("%R/info/%S",zUuid))details</a>]
368 }
369
370 /* Generate the "tags: TAGLIST" at the end of the comment, together
371 ** with hyperlinks to the tag list.
372
--- src/timeline.c
+++ src/timeline.c
@@ -236,12 +236,16 @@
236 const char *zUser = db_column_text(pQuery, 4);
237 const char *zTagList = db_column_text(pQuery, 8);
238 int tagid = db_column_int(pQuery, 9);
239 const char *zBr = 0; /* Branch */
240 int commentColumn = 3; /* Column containing comment text */
241 int modPending; /* Pending moderation */
242 char zTime[8];
243
244 modPending = moderation_pending(rid);
245 if( tagid ){
246 if( modPending ) tagid = -tagid;
247 if( tagid==prevTagid ){
248 if( tmFlags & TIMELINE_BRIEF ){
249 suppressCnt++;
250 continue;
251 }else{
@@ -320,10 +324,13 @@
324 @ <td class="timelineTableCell">
325 }
326 if( pGraph && zType[0]!='c' ){
327 @ &bull;
328 }
329 if( modPending ){
330 @ <span class="modpending">(Awaiting Moderator Approval)</span>
331 }
332 if( zType[0]=='c' ){
333 hyperlink_to_uuid(zUuid);
334 if( isLeaf ){
335 if( db_exists("SELECT 1 FROM tagxref"
336 " WHERE rid=%d AND tagid=%d AND tagtype>0",
@@ -332,11 +339,11 @@
339 }else{
340 @ <span class="timelineLeaf">Leaf:</span>
341 }
342 }
343 }else if( zType[0]=='e' && tagid ){
344 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
345 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
346 hyperlink_to_uuid(zUuid);
347 }
348 db_column_blob(pQuery, commentColumn, &comment);
349 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
@@ -361,11 +368,11 @@
368 }else{
369 @ (user: %h(zUser)%s(zTagList?",":"\051")
370 }
371
372 /* Generate a "detail" link for tags. */
373 if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
374 @ [%z(href("%R/info/%S",zUuid))details</a>]
375 }
376
377 /* Generate the "tags: TAGLIST" at the end of the comment, together
378 ** with hyperlinks to the tag list.
379
+32 -54
--- src/tkt.c
+++ src/tkt.c
@@ -335,48 +335,11 @@
335335
336336
zFullName = db_text(0,
337337
"SELECT tkt_uuid FROM ticket"
338338
" WHERE tkt_uuid GLOB '%q*'", zUuid);
339339
if( zFullName ){
340
- int cnt = 0;
341
- Stmt q;
342
- db_prepare(&q,
343
- "SELECT datetime(mtime,'localtime'), filename, user"
344
- " FROM attachment"
345
- " WHERE isLatest AND src!='' AND target=%Q"
346
- " ORDER BY mtime DESC",
347
- zFullName);
348
- while( db_step(&q)==SQLITE_ROW ){
349
- const char *zDate = db_column_text(&q, 0);
350
- const char *zFile = db_column_text(&q, 1);
351
- const char *zUser = db_column_text(&q, 2);
352
- if( cnt==0 ){
353
- @ <hr /><h2>Attachments:</h2>
354
- @ <ul>
355
- }
356
- cnt++;
357
- @ <li>
358
- if( g.perm.Read && g.perm.Hyperlink ){
359
- @ %z(href("%R/attachview?tkt=%s&file=%t",zFullName,zFile))
360
- @ %h(zFile)</a>
361
- }else{
362
- @ %h(zFile)
363
- }
364
- @ added by %h(zUser) on
365
- hyperlink_to_date(zDate, ".");
366
- if( g.perm.WrTkt && g.perm.Attach ){
367
- char *zH;
368
- zH = href("%R/attachdelete?tkt=%s&file=%t&from=%R/tktview%%3fname=%s",
369
- zFullName, zFile, zFullName);
370
- @ [%z(zH)delete</a>]
371
- }
372
- @ </li>
373
- }
374
- if( cnt ){
375
- @ </ul>
376
- }
377
- db_finalize(&q);
340
+ attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
378341
}
379342
380343
style_footer();
381344
}
382345
@@ -415,10 +378,38 @@
415378
return TH_ERROR;
416379
}
417380
azAppend[idx] = mprintf("%.*s", argl[2], argv[2]);
418381
return TH_OK;
419382
}
383
+
384
+/*
385
+** Write a ticket into the repository.
386
+*/
387
+static void ticket_put(
388
+ Blob *pTicket, /* The text of the ticket change record */
389
+ const char *zTktId, /* The ticket to which this change is applied */
390
+ int needMod /* True if moderation is needed */
391
+){
392
+ int rid = content_put_ex(pTicket, 0, 0, 0, needMod);
393
+ if( rid==0 ){
394
+ fossil_panic("trouble committing ticket: %s", g.zErrMsg);
395
+ }
396
+ if( needMod ){
397
+ moderation_table_create();
398
+ db_multi_exec(
399
+ "INSERT INTO modreq(objid, tktid) VALUES(%d,'%s')",
400
+ rid, zTktId
401
+ );
402
+ }else{
403
+ db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
404
+ db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
405
+ }
406
+ manifest_crosslink_begin();
407
+ manifest_crosslink(rid, pTicket);
408
+ assert( blob_is_reset(pTicket) );
409
+ manifest_crosslink_end();
410
+}
420411
421412
/*
422413
** Subscript command: submit_ticket
423414
**
424415
** Construct and submit a new ticket artifact. The fields of the artifact
@@ -498,18 +489,12 @@
498489
}else if( g.thTrace ){
499490
Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n"
500491
"}<br />\n",
501492
blob_str(&tktchng));
502493
}else{
503
- rid = content_put(&tktchng);
504
- if( rid==0 ){
505
- fossil_panic("trouble committing ticket: %s", g.zErrMsg);
506
- }
507
- manifest_crosslink_begin();
508
- manifest_crosslink(rid, &tktchng);
509
- assert( blob_is_reset(&tktchng) );
510
- manifest_crosslink_end();
494
+ ticket_put(&tktchng, zUuid,
495
+ (g.perm.ModTkt==0 && db_get_boolean("modreq-tkt",0)==1));
511496
}
512497
return ticket_change();
513498
}
514499
515500
@@ -1187,18 +1172,11 @@
11871172
}
11881173
blob_appendf(&tktchng, "K %s\n", zTktUuid);
11891174
blob_appendf(&tktchng, "U %F\n", zUser);
11901175
md5sum_blob(&tktchng, &cksum);
11911176
blob_appendf(&tktchng, "Z %b\n", &cksum);
1192
- rid = content_put(&tktchng);
1193
- if( rid==0 ){
1194
- fossil_panic("trouble committing ticket: %s", g.zErrMsg);
1195
- }
1196
- manifest_crosslink_begin();
1197
- manifest_crosslink(rid, &tktchng);
1198
- manifest_crosslink_end();
1199
- assert( blob_is_reset(&tktchng) );
1177
+ ticket_put(&tktchng, zTktUuid, 0);
12001178
printf("ticket %s succeeded for %s\n",
12011179
(eCmd==set?"set":"add"),zTktUuid);
12021180
}
12031181
}
12041182
}
12051183
--- src/tkt.c
+++ src/tkt.c
@@ -335,48 +335,11 @@
335
336 zFullName = db_text(0,
337 "SELECT tkt_uuid FROM ticket"
338 " WHERE tkt_uuid GLOB '%q*'", zUuid);
339 if( zFullName ){
340 int cnt = 0;
341 Stmt q;
342 db_prepare(&q,
343 "SELECT datetime(mtime,'localtime'), filename, user"
344 " FROM attachment"
345 " WHERE isLatest AND src!='' AND target=%Q"
346 " ORDER BY mtime DESC",
347 zFullName);
348 while( db_step(&q)==SQLITE_ROW ){
349 const char *zDate = db_column_text(&q, 0);
350 const char *zFile = db_column_text(&q, 1);
351 const char *zUser = db_column_text(&q, 2);
352 if( cnt==0 ){
353 @ <hr /><h2>Attachments:</h2>
354 @ <ul>
355 }
356 cnt++;
357 @ <li>
358 if( g.perm.Read && g.perm.Hyperlink ){
359 @ %z(href("%R/attachview?tkt=%s&file=%t",zFullName,zFile))
360 @ %h(zFile)</a>
361 }else{
362 @ %h(zFile)
363 }
364 @ added by %h(zUser) on
365 hyperlink_to_date(zDate, ".");
366 if( g.perm.WrTkt && g.perm.Attach ){
367 char *zH;
368 zH = href("%R/attachdelete?tkt=%s&file=%t&from=%R/tktview%%3fname=%s",
369 zFullName, zFile, zFullName);
370 @ [%z(zH)delete</a>]
371 }
372 @ </li>
373 }
374 if( cnt ){
375 @ </ul>
376 }
377 db_finalize(&q);
378 }
379
380 style_footer();
381 }
382
@@ -415,10 +378,38 @@
415 return TH_ERROR;
416 }
417 azAppend[idx] = mprintf("%.*s", argl[2], argv[2]);
418 return TH_OK;
419 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
421 /*
422 ** Subscript command: submit_ticket
423 **
424 ** Construct and submit a new ticket artifact. The fields of the artifact
@@ -498,18 +489,12 @@
498 }else if( g.thTrace ){
499 Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n"
500 "}<br />\n",
501 blob_str(&tktchng));
502 }else{
503 rid = content_put(&tktchng);
504 if( rid==0 ){
505 fossil_panic("trouble committing ticket: %s", g.zErrMsg);
506 }
507 manifest_crosslink_begin();
508 manifest_crosslink(rid, &tktchng);
509 assert( blob_is_reset(&tktchng) );
510 manifest_crosslink_end();
511 }
512 return ticket_change();
513 }
514
515
@@ -1187,18 +1172,11 @@
1187 }
1188 blob_appendf(&tktchng, "K %s\n", zTktUuid);
1189 blob_appendf(&tktchng, "U %F\n", zUser);
1190 md5sum_blob(&tktchng, &cksum);
1191 blob_appendf(&tktchng, "Z %b\n", &cksum);
1192 rid = content_put(&tktchng);
1193 if( rid==0 ){
1194 fossil_panic("trouble committing ticket: %s", g.zErrMsg);
1195 }
1196 manifest_crosslink_begin();
1197 manifest_crosslink(rid, &tktchng);
1198 manifest_crosslink_end();
1199 assert( blob_is_reset(&tktchng) );
1200 printf("ticket %s succeeded for %s\n",
1201 (eCmd==set?"set":"add"),zTktUuid);
1202 }
1203 }
1204 }
1205
--- src/tkt.c
+++ src/tkt.c
@@ -335,48 +335,11 @@
335
336 zFullName = db_text(0,
337 "SELECT tkt_uuid FROM ticket"
338 " WHERE tkt_uuid GLOB '%q*'", zUuid);
339 if( zFullName ){
340 attachment_list(zFullName, "<hr /><h2>Attachments:</h2><ul>");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341 }
342
343 style_footer();
344 }
345
@@ -415,10 +378,38 @@
378 return TH_ERROR;
379 }
380 azAppend[idx] = mprintf("%.*s", argl[2], argv[2]);
381 return TH_OK;
382 }
383
384 /*
385 ** Write a ticket into the repository.
386 */
387 static void ticket_put(
388 Blob *pTicket, /* The text of the ticket change record */
389 const char *zTktId, /* The ticket to which this change is applied */
390 int needMod /* True if moderation is needed */
391 ){
392 int rid = content_put_ex(pTicket, 0, 0, 0, needMod);
393 if( rid==0 ){
394 fossil_panic("trouble committing ticket: %s", g.zErrMsg);
395 }
396 if( needMod ){
397 moderation_table_create();
398 db_multi_exec(
399 "INSERT INTO modreq(objid, tktid) VALUES(%d,'%s')",
400 rid, zTktId
401 );
402 }else{
403 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
404 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
405 }
406 manifest_crosslink_begin();
407 manifest_crosslink(rid, pTicket);
408 assert( blob_is_reset(pTicket) );
409 manifest_crosslink_end();
410 }
411
412 /*
413 ** Subscript command: submit_ticket
414 **
415 ** Construct and submit a new ticket artifact. The fields of the artifact
@@ -498,18 +489,12 @@
489 }else if( g.thTrace ){
490 Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n"
491 "}<br />\n",
492 blob_str(&tktchng));
493 }else{
494 ticket_put(&tktchng, zUuid,
495 (g.perm.ModTkt==0 && db_get_boolean("modreq-tkt",0)==1));
 
 
 
 
 
 
496 }
497 return ticket_change();
498 }
499
500
@@ -1187,18 +1172,11 @@
1172 }
1173 blob_appendf(&tktchng, "K %s\n", zTktUuid);
1174 blob_appendf(&tktchng, "U %F\n", zUser);
1175 md5sum_blob(&tktchng, &cksum);
1176 blob_appendf(&tktchng, "Z %b\n", &cksum);
1177 ticket_put(&tktchng, zTktUuid, 0);
 
 
 
 
 
 
 
1178 printf("ticket %s succeeded for %s\n",
1179 (eCmd==set?"set":"add"),zTktUuid);
1180 }
1181 }
1182 }
1183
+8 -3
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -595,13 +595,18 @@
595595
@ <ol>
596596
@ <th1>html $report_items</th1>
597597
@ </ol>
598598
@
599599
@ <th1>
600
-@ if {[hascap t]} {
601
-@ html "<p>Create a new ticket display format:</p>"
602
-@ html "<ul><li><a href='rptnew'>New report format</a></li></ul>"
600
+@ if {[hascap t q]} {
601
+@ html "<p>Other options:</p>\n<ul>\n"
602
+@ if {[hascap t]} {
603
+@ html "<li><a href='rptnew'>New report format</a></li>\n"
604
+@ }
605
+@ if {[hascap q]} {
606
+@ html "<li><a href='modreq'>Tend to pending moderation requests</a></li>\n"
607
+@ }
603608
@ }
604609
@ </th1>
605610
;
606611
607612
/*
608613
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -595,13 +595,18 @@
595 @ <ol>
596 @ <th1>html $report_items</th1>
597 @ </ol>
598 @
599 @ <th1>
600 @ if {[hascap t]} {
601 @ html "<p>Create a new ticket display format:</p>"
602 @ html "<ul><li><a href='rptnew'>New report format</a></li></ul>"
 
 
 
 
 
603 @ }
604 @ </th1>
605 ;
606
607 /*
608
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -595,13 +595,18 @@
595 @ <ol>
596 @ <th1>html $report_items</th1>
597 @ </ol>
598 @
599 @ <th1>
600 @ if {[hascap t q]} {
601 @ html "<p>Other options:</p>\n<ul>\n"
602 @ if {[hascap t]} {
603 @ html "<li><a href='rptnew'>New report format</a></li>\n"
604 @ }
605 @ if {[hascap q]} {
606 @ html "<li><a href='modreq'>Tend to pending moderation requests</a></li>\n"
607 @ }
608 @ }
609 @ </th1>
610 ;
611
612 /*
613
+25 -50
--- src/wiki.c
+++ src/wiki.c
@@ -158,10 +158,13 @@
158158
@ <li> Create a %z(href("%R/eventedit"))new event</a>.</li>
159159
}
160160
}
161161
@ <li> %z(href("%R/wcontent"))List of All Wiki Pages</a>
162162
@ available on this server.</li>
163
+ if( g.perm.ModWiki ){
164
+ @ <li> %z(href("%R/modreq"))Tend to pending moderation requests</a></li>
165
+ }
163166
@ <li> <form method="get" action="%s(g.zTop)/wfind"><div>
164167
@ Search wiki titles: <input type="text" name="title"/>
165168
@ &nbsp; <input type="submit" /></div></form>
166169
@ </li>
167170
@ </ul>
@@ -214,48 +217,32 @@
214217
style_set_current_page("%s?name=%T", g.zPath, zPageName);
215218
style_header(zPageName);
216219
blob_init(&wiki, zBody, -1);
217220
wiki_convert(&wiki, 0, 0);
218221
blob_reset(&wiki);
219
-
220
- db_prepare(&q,
221
- "SELECT datetime(mtime,'localtime'), filename, user"
222
- " FROM attachment"
223
- " WHERE isLatest AND src!='' AND target=%Q"
224
- " ORDER BY mtime DESC",
225
- zPageName);
226
- while( db_step(&q)==SQLITE_ROW ){
227
- const char *zDate = db_column_text(&q, 0);
228
- const char *zFile = db_column_text(&q, 1);
229
- const char *zUser = db_column_text(&q, 2);
230
- if( cnt==0 ){
231
- @ <hr /><h2>Attachments:</h2>
232
- @ <ul>
233
- }
234
- cnt++;
235
- @ <li>
236
- if( g.perm.Hyperlink && g.perm.Read ){
237
- @ %z(href("%R/attachview?page=%T&file=%t",zPageName,zFile))
238
- @ %h(zFile)</a>
239
- }else{
240
- @ %h(zFile)
241
- }
242
- @ added by %h(zUser) on
243
- hyperlink_to_date(zDate, ".");
244
- if( g.perm.WrWiki && g.perm.Attach ){
245
- @ [%z(href("%R/attachdelete?page=%t&file=%t&from=%R/wiki%%3fname=%f",zPageName,zFile,zPageName))delete</a>]
246
- }
247
- @ </li>
248
- }
249
- if( cnt ){
250
- @ </ul>
251
- }
252
- db_finalize(&q);
253
-
222
+ attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
254223
manifest_destroy(pWiki);
255224
style_footer();
256225
}
226
+
227
+/*
228
+** Write a wiki artifact into the repository
229
+*/
230
+static void wiki_put(Blob *pWiki, int parent){
231
+ int nrid;
232
+ if( g.perm.ModWiki || db_get_boolean("modreq-wiki",0)==0 ){
233
+ nrid = content_put_ex(pWiki, 0, 0, 0, 0);
234
+ if( parent) content_deltify(parent, nrid, 0);
235
+ }else{
236
+ nrid = content_put_ex(pWiki, 0, 0, 0, 1);
237
+ moderation_table_create();
238
+ db_multi_exec("INSERT INTO modreq(objid) VALUES(%d)", nrid);
239
+ }
240
+ db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
241
+ db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", nrid);
242
+ manifest_crosslink(nrid, pWiki);
243
+}
257244
258245
/*
259246
** WEBPAGE: wikiedit
260247
** URL: /wikiedit?name=PAGENAME
261248
*/
@@ -335,15 +322,11 @@
335322
}
336323
blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
337324
md5sum_blob(&wiki, &cksum);
338325
blob_appendf(&wiki, "Z %b\n", &cksum);
339326
blob_reset(&cksum);
340
- nrid = content_put(&wiki);
341
- db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
342
- manifest_crosslink(nrid, &wiki);
343
- assert( blob_is_reset(&wiki) );
344
- content_deltify(rid, nrid, 0);
327
+ wiki_put(&wiki, 0);
345328
}
346329
db_end_transaction(0);
347330
cgi_redirectf("wiki?name=%T", zPageName);
348331
}
349332
if( P("cancel")!=0 ){
@@ -535,15 +518,11 @@
535518
appendRemark(&body);
536519
blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
537520
md5sum_blob(&wiki, &cksum);
538521
blob_appendf(&wiki, "Z %b\n", &cksum);
539522
blob_reset(&cksum);
540
- nrid = content_put(&wiki);
541
- db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
542
- manifest_crosslink(nrid, &wiki);
543
- assert( blob_is_reset(&wiki) );
544
- content_deltify(rid, nrid, 0);
523
+ wiki_put(&wiki, rid);
545524
db_end_transaction(0);
546525
}
547526
cgi_redirectf("wiki?name=%T", zPageName);
548527
}
549528
if( P("cancel")!=0 ){
@@ -878,15 +857,11 @@
878857
blob_str(pContent) );
879858
md5sum_blob(&wiki, &cksum);
880859
blob_appendf(&wiki, "Z %b\n", &cksum);
881860
blob_reset(&cksum);
882861
db_begin_transaction();
883
- nrid = content_put( &wiki);
884
- db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
885
- manifest_crosslink(nrid,&wiki);
886
- assert( blob_is_reset(&wiki) );
887
- content_deltify(rid,nrid,0);
862
+ wiki_put(&wiki, 0);
888863
db_end_transaction(0);
889864
return 1;
890865
}
891866
892867
/*
893868
--- src/wiki.c
+++ src/wiki.c
@@ -158,10 +158,13 @@
158 @ <li> Create a %z(href("%R/eventedit"))new event</a>.</li>
159 }
160 }
161 @ <li> %z(href("%R/wcontent"))List of All Wiki Pages</a>
162 @ available on this server.</li>
 
 
 
163 @ <li> <form method="get" action="%s(g.zTop)/wfind"><div>
164 @ Search wiki titles: <input type="text" name="title"/>
165 @ &nbsp; <input type="submit" /></div></form>
166 @ </li>
167 @ </ul>
@@ -214,48 +217,32 @@
214 style_set_current_page("%s?name=%T", g.zPath, zPageName);
215 style_header(zPageName);
216 blob_init(&wiki, zBody, -1);
217 wiki_convert(&wiki, 0, 0);
218 blob_reset(&wiki);
219
220 db_prepare(&q,
221 "SELECT datetime(mtime,'localtime'), filename, user"
222 " FROM attachment"
223 " WHERE isLatest AND src!='' AND target=%Q"
224 " ORDER BY mtime DESC",
225 zPageName);
226 while( db_step(&q)==SQLITE_ROW ){
227 const char *zDate = db_column_text(&q, 0);
228 const char *zFile = db_column_text(&q, 1);
229 const char *zUser = db_column_text(&q, 2);
230 if( cnt==0 ){
231 @ <hr /><h2>Attachments:</h2>
232 @ <ul>
233 }
234 cnt++;
235 @ <li>
236 if( g.perm.Hyperlink && g.perm.Read ){
237 @ %z(href("%R/attachview?page=%T&file=%t",zPageName,zFile))
238 @ %h(zFile)</a>
239 }else{
240 @ %h(zFile)
241 }
242 @ added by %h(zUser) on
243 hyperlink_to_date(zDate, ".");
244 if( g.perm.WrWiki && g.perm.Attach ){
245 @ [%z(href("%R/attachdelete?page=%t&file=%t&from=%R/wiki%%3fname=%f",zPageName,zFile,zPageName))delete</a>]
246 }
247 @ </li>
248 }
249 if( cnt ){
250 @ </ul>
251 }
252 db_finalize(&q);
253
254 manifest_destroy(pWiki);
255 style_footer();
256 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
258 /*
259 ** WEBPAGE: wikiedit
260 ** URL: /wikiedit?name=PAGENAME
261 */
@@ -335,15 +322,11 @@
335 }
336 blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
337 md5sum_blob(&wiki, &cksum);
338 blob_appendf(&wiki, "Z %b\n", &cksum);
339 blob_reset(&cksum);
340 nrid = content_put(&wiki);
341 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
342 manifest_crosslink(nrid, &wiki);
343 assert( blob_is_reset(&wiki) );
344 content_deltify(rid, nrid, 0);
345 }
346 db_end_transaction(0);
347 cgi_redirectf("wiki?name=%T", zPageName);
348 }
349 if( P("cancel")!=0 ){
@@ -535,15 +518,11 @@
535 appendRemark(&body);
536 blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
537 md5sum_blob(&wiki, &cksum);
538 blob_appendf(&wiki, "Z %b\n", &cksum);
539 blob_reset(&cksum);
540 nrid = content_put(&wiki);
541 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
542 manifest_crosslink(nrid, &wiki);
543 assert( blob_is_reset(&wiki) );
544 content_deltify(rid, nrid, 0);
545 db_end_transaction(0);
546 }
547 cgi_redirectf("wiki?name=%T", zPageName);
548 }
549 if( P("cancel")!=0 ){
@@ -878,15 +857,11 @@
878 blob_str(pContent) );
879 md5sum_blob(&wiki, &cksum);
880 blob_appendf(&wiki, "Z %b\n", &cksum);
881 blob_reset(&cksum);
882 db_begin_transaction();
883 nrid = content_put( &wiki);
884 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
885 manifest_crosslink(nrid,&wiki);
886 assert( blob_is_reset(&wiki) );
887 content_deltify(rid,nrid,0);
888 db_end_transaction(0);
889 return 1;
890 }
891
892 /*
893
--- src/wiki.c
+++ src/wiki.c
@@ -158,10 +158,13 @@
158 @ <li> Create a %z(href("%R/eventedit"))new event</a>.</li>
159 }
160 }
161 @ <li> %z(href("%R/wcontent"))List of All Wiki Pages</a>
162 @ available on this server.</li>
163 if( g.perm.ModWiki ){
164 @ <li> %z(href("%R/modreq"))Tend to pending moderation requests</a></li>
165 }
166 @ <li> <form method="get" action="%s(g.zTop)/wfind"><div>
167 @ Search wiki titles: <input type="text" name="title"/>
168 @ &nbsp; <input type="submit" /></div></form>
169 @ </li>
170 @ </ul>
@@ -214,48 +217,32 @@
217 style_set_current_page("%s?name=%T", g.zPath, zPageName);
218 style_header(zPageName);
219 blob_init(&wiki, zBody, -1);
220 wiki_convert(&wiki, 0, 0);
221 blob_reset(&wiki);
222 attachment_list(zPageName, "<hr /><h2>Attachments:</h2><ul>");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223 manifest_destroy(pWiki);
224 style_footer();
225 }
226
227 /*
228 ** Write a wiki artifact into the repository
229 */
230 static void wiki_put(Blob *pWiki, int parent){
231 int nrid;
232 if( g.perm.ModWiki || db_get_boolean("modreq-wiki",0)==0 ){
233 nrid = content_put_ex(pWiki, 0, 0, 0, 0);
234 if( parent) content_deltify(parent, nrid, 0);
235 }else{
236 nrid = content_put_ex(pWiki, 0, 0, 0, 1);
237 moderation_table_create();
238 db_multi_exec("INSERT INTO modreq(objid) VALUES(%d)", nrid);
239 }
240 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
241 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", nrid);
242 manifest_crosslink(nrid, pWiki);
243 }
244
245 /*
246 ** WEBPAGE: wikiedit
247 ** URL: /wikiedit?name=PAGENAME
248 */
@@ -335,15 +322,11 @@
322 }
323 blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
324 md5sum_blob(&wiki, &cksum);
325 blob_appendf(&wiki, "Z %b\n", &cksum);
326 blob_reset(&cksum);
327 wiki_put(&wiki, 0);
 
 
 
 
328 }
329 db_end_transaction(0);
330 cgi_redirectf("wiki?name=%T", zPageName);
331 }
332 if( P("cancel")!=0 ){
@@ -535,15 +518,11 @@
518 appendRemark(&body);
519 blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
520 md5sum_blob(&wiki, &cksum);
521 blob_appendf(&wiki, "Z %b\n", &cksum);
522 blob_reset(&cksum);
523 wiki_put(&wiki, rid);
 
 
 
 
524 db_end_transaction(0);
525 }
526 cgi_redirectf("wiki?name=%T", zPageName);
527 }
528 if( P("cancel")!=0 ){
@@ -878,15 +857,11 @@
857 blob_str(pContent) );
858 md5sum_blob(&wiki, &cksum);
859 blob_appendf(&wiki, "Z %b\n", &cksum);
860 blob_reset(&cksum);
861 db_begin_transaction();
862 wiki_put(&wiki, 0);
 
 
 
 
863 db_end_transaction(0);
864 return 1;
865 }
866
867 /*
868
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
2929
SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
3030
31
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
31
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3232
33
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
33
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3434
3535
3636
RC=$(DMDIR)\bin\rcc
3737
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
3838
@@ -46,11 +46,11 @@
4646
4747
$(OBJDIR)\fossil.res: $B\win\fossil.rc
4848
$(RC) $(RCFLAGS) -o$@ $**
4949
5050
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51
- +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest md5 merge merge3 name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
51
+ +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest md5 merge merge3 moderate name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5252
+echo fossil >> $@
5353
+echo fossil >> $@
5454
+echo $(LIBS) >> $@
5555
+echo. >> $@
5656
+echo fossil >> $@
@@ -463,10 +463,16 @@
463463
$(OBJDIR)\merge3$O : merge3_.c merge3.h
464464
$(TCC) -o$@ -c merge3_.c
465465
466466
merge3_.c : $(SRCDIR)\merge3.c
467467
+translate$E $** > $@
468
+
469
+$(OBJDIR)\moderate$O : moderate_.c moderate.h
470
+ $(TCC) -o$@ -c moderate_.c
471
+
472
+moderate_.c : $(SRCDIR)\moderate.c
473
+ +translate$E $** > $@
468474
469475
$(OBJDIR)\name$O : name_.c name.h
470476
$(TCC) -o$@ -c name_.c
471477
472478
name_.c : $(SRCDIR)\name.c
@@ -699,7 +705,7 @@
699705
700706
zip_.c : $(SRCDIR)\zip.c
701707
+translate$E $** > $@
702708
703709
headers: makeheaders$E page_index.h VERSION.h
704
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
710
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
705711
@copy /Y nul: headers
706712
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
30
31 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
32
33 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
34
35
36 RC=$(DMDIR)\bin\rcc
37 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
38
@@ -46,11 +46,11 @@
46
47 $(OBJDIR)\fossil.res: $B\win\fossil.rc
48 $(RC) $(RCFLAGS) -o$@ $**
49
50 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest md5 merge merge3 name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
52 +echo fossil >> $@
53 +echo fossil >> $@
54 +echo $(LIBS) >> $@
55 +echo. >> $@
56 +echo fossil >> $@
@@ -463,10 +463,16 @@
463 $(OBJDIR)\merge3$O : merge3_.c merge3.h
464 $(TCC) -o$@ -c merge3_.c
465
466 merge3_.c : $(SRCDIR)\merge3.c
467 +translate$E $** > $@
 
 
 
 
 
 
468
469 $(OBJDIR)\name$O : name_.c name.h
470 $(TCC) -o$@ -c name_.c
471
472 name_.c : $(SRCDIR)\name.c
@@ -699,7 +705,7 @@
699
700 zip_.c : $(SRCDIR)\zip.c
701 +translate$E $** > $@
702
703 headers: makeheaders$E page_index.h VERSION.h
704 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
705 @copy /Y nul: headers
706
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -26,13 +26,13 @@
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
30
31 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
32
33 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
34
35
36 RC=$(DMDIR)\bin\rcc
37 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
38
@@ -46,11 +46,11 @@
46
47 $(OBJDIR)\fossil.res: $B\win\fossil.rc
48 $(RC) $(RCFLAGS) -o$@ $**
49
50 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
51 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_tag json_timeline json_user json_wiki leaf login main manifest md5 merge merge3 moderate name path pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
52 +echo fossil >> $@
53 +echo fossil >> $@
54 +echo $(LIBS) >> $@
55 +echo. >> $@
56 +echo fossil >> $@
@@ -463,10 +463,16 @@
463 $(OBJDIR)\merge3$O : merge3_.c merge3.h
464 $(TCC) -o$@ -c merge3_.c
465
466 merge3_.c : $(SRCDIR)\merge3.c
467 +translate$E $** > $@
468
469 $(OBJDIR)\moderate$O : moderate_.c moderate.h
470 $(TCC) -o$@ -c moderate_.c
471
472 moderate_.c : $(SRCDIR)\moderate.c
473 +translate$E $** > $@
474
475 $(OBJDIR)\name$O : name_.c name.h
476 $(TCC) -o$@ -c name_.c
477
478 name_.c : $(SRCDIR)\name.c
@@ -699,7 +705,7 @@
705
706 zip_.c : $(SRCDIR)\zip.c
707 +translate$E $** > $@
708
709 headers: makeheaders$E page_index.h VERSION.h
710 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
711 @copy /Y nul: headers
712
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -274,10 +274,11 @@
274274
$(SRCDIR)/main.c \
275275
$(SRCDIR)/manifest.c \
276276
$(SRCDIR)/md5.c \
277277
$(SRCDIR)/merge.c \
278278
$(SRCDIR)/merge3.c \
279
+ $(SRCDIR)/moderate.c \
279280
$(SRCDIR)/name.c \
280281
$(SRCDIR)/path.c \
281282
$(SRCDIR)/pivot.c \
282283
$(SRCDIR)/popen.c \
283284
$(SRCDIR)/pqueue.c \
@@ -374,10 +375,11 @@
374375
$(OBJDIR)/main_.c \
375376
$(OBJDIR)/manifest_.c \
376377
$(OBJDIR)/md5_.c \
377378
$(OBJDIR)/merge_.c \
378379
$(OBJDIR)/merge3_.c \
380
+ $(OBJDIR)/moderate_.c \
379381
$(OBJDIR)/name_.c \
380382
$(OBJDIR)/path_.c \
381383
$(OBJDIR)/pivot_.c \
382384
$(OBJDIR)/popen_.c \
383385
$(OBJDIR)/pqueue_.c \
@@ -474,10 +476,11 @@
474476
$(OBJDIR)/main.o \
475477
$(OBJDIR)/manifest.o \
476478
$(OBJDIR)/md5.o \
477479
$(OBJDIR)/merge.o \
478480
$(OBJDIR)/merge3.o \
481
+ $(OBJDIR)/moderate.o \
479482
$(OBJDIR)/name.o \
480483
$(OBJDIR)/path.o \
481484
$(OBJDIR)/pivot.o \
482485
$(OBJDIR)/popen.o \
483486
$(OBJDIR)/pqueue.o \
@@ -625,11 +628,11 @@
625628
626629
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
627630
$(MKINDEX) $(TRANS_SRC) >$@
628631
629632
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
630
- $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
633
+ $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
631634
echo Done >$(OBJDIR)/headers
632635
633636
$(OBJDIR)/headers: Makefile
634637
635638
Makefile:
@@ -1103,10 +1106,18 @@
11031106
11041107
$(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
11051108
$(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
11061109
11071110
$(OBJDIR)/merge3.h: $(OBJDIR)/headers
1111
+
1112
+$(OBJDIR)/moderate_.c: $(SRCDIR)/moderate.c $(OBJDIR)/translate
1113
+ $(TRANSLATE) $(SRCDIR)/moderate.c >$(OBJDIR)/moderate_.c
1114
+
1115
+$(OBJDIR)/moderate.o: $(OBJDIR)/moderate_.c $(OBJDIR)/moderate.h $(SRCDIR)/config.h
1116
+ $(XTCC) -o $(OBJDIR)/moderate.o -c $(OBJDIR)/moderate_.c
1117
+
1118
+$(OBJDIR)/moderate.h: $(OBJDIR)/headers
11081119
11091120
$(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
11101121
$(TRANSLATE) $(SRCDIR)/name.c >$(OBJDIR)/name_.c
11111122
11121123
$(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
11131124
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -274,10 +274,11 @@
274 $(SRCDIR)/main.c \
275 $(SRCDIR)/manifest.c \
276 $(SRCDIR)/md5.c \
277 $(SRCDIR)/merge.c \
278 $(SRCDIR)/merge3.c \
 
279 $(SRCDIR)/name.c \
280 $(SRCDIR)/path.c \
281 $(SRCDIR)/pivot.c \
282 $(SRCDIR)/popen.c \
283 $(SRCDIR)/pqueue.c \
@@ -374,10 +375,11 @@
374 $(OBJDIR)/main_.c \
375 $(OBJDIR)/manifest_.c \
376 $(OBJDIR)/md5_.c \
377 $(OBJDIR)/merge_.c \
378 $(OBJDIR)/merge3_.c \
 
379 $(OBJDIR)/name_.c \
380 $(OBJDIR)/path_.c \
381 $(OBJDIR)/pivot_.c \
382 $(OBJDIR)/popen_.c \
383 $(OBJDIR)/pqueue_.c \
@@ -474,10 +476,11 @@
474 $(OBJDIR)/main.o \
475 $(OBJDIR)/manifest.o \
476 $(OBJDIR)/md5.o \
477 $(OBJDIR)/merge.o \
478 $(OBJDIR)/merge3.o \
 
479 $(OBJDIR)/name.o \
480 $(OBJDIR)/path.o \
481 $(OBJDIR)/pivot.o \
482 $(OBJDIR)/popen.o \
483 $(OBJDIR)/pqueue.o \
@@ -625,11 +628,11 @@
625
626 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
627 $(MKINDEX) $(TRANS_SRC) >$@
628
629 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
630 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
631 echo Done >$(OBJDIR)/headers
632
633 $(OBJDIR)/headers: Makefile
634
635 Makefile:
@@ -1103,10 +1106,18 @@
1103
1104 $(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
1105 $(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
1106
1107 $(OBJDIR)/merge3.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1108
1109 $(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
1110 $(TRANSLATE) $(SRCDIR)/name.c >$(OBJDIR)/name_.c
1111
1112 $(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
1113
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -274,10 +274,11 @@
274 $(SRCDIR)/main.c \
275 $(SRCDIR)/manifest.c \
276 $(SRCDIR)/md5.c \
277 $(SRCDIR)/merge.c \
278 $(SRCDIR)/merge3.c \
279 $(SRCDIR)/moderate.c \
280 $(SRCDIR)/name.c \
281 $(SRCDIR)/path.c \
282 $(SRCDIR)/pivot.c \
283 $(SRCDIR)/popen.c \
284 $(SRCDIR)/pqueue.c \
@@ -374,10 +375,11 @@
375 $(OBJDIR)/main_.c \
376 $(OBJDIR)/manifest_.c \
377 $(OBJDIR)/md5_.c \
378 $(OBJDIR)/merge_.c \
379 $(OBJDIR)/merge3_.c \
380 $(OBJDIR)/moderate_.c \
381 $(OBJDIR)/name_.c \
382 $(OBJDIR)/path_.c \
383 $(OBJDIR)/pivot_.c \
384 $(OBJDIR)/popen_.c \
385 $(OBJDIR)/pqueue_.c \
@@ -474,10 +476,11 @@
476 $(OBJDIR)/main.o \
477 $(OBJDIR)/manifest.o \
478 $(OBJDIR)/md5.o \
479 $(OBJDIR)/merge.o \
480 $(OBJDIR)/merge3.o \
481 $(OBJDIR)/moderate.o \
482 $(OBJDIR)/name.o \
483 $(OBJDIR)/path.o \
484 $(OBJDIR)/pivot.o \
485 $(OBJDIR)/popen.o \
486 $(OBJDIR)/pqueue.o \
@@ -625,11 +628,11 @@
628
629 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
630 $(MKINDEX) $(TRANS_SRC) >$@
631
632 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
633 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
634 echo Done >$(OBJDIR)/headers
635
636 $(OBJDIR)/headers: Makefile
637
638 Makefile:
@@ -1103,10 +1106,18 @@
1106
1107 $(OBJDIR)/merge3.o: $(OBJDIR)/merge3_.c $(OBJDIR)/merge3.h $(SRCDIR)/config.h
1108 $(XTCC) -o $(OBJDIR)/merge3.o -c $(OBJDIR)/merge3_.c
1109
1110 $(OBJDIR)/merge3.h: $(OBJDIR)/headers
1111
1112 $(OBJDIR)/moderate_.c: $(SRCDIR)/moderate.c $(OBJDIR)/translate
1113 $(TRANSLATE) $(SRCDIR)/moderate.c >$(OBJDIR)/moderate_.c
1114
1115 $(OBJDIR)/moderate.o: $(OBJDIR)/moderate_.c $(OBJDIR)/moderate.h $(SRCDIR)/config.h
1116 $(XTCC) -o $(OBJDIR)/moderate.o -c $(OBJDIR)/moderate_.c
1117
1118 $(OBJDIR)/moderate.h: $(OBJDIR)/headers
1119
1120 $(OBJDIR)/name_.c: $(SRCDIR)/name.c $(OBJDIR)/translate
1121 $(TRANSLATE) $(SRCDIR)/name.c >$(OBJDIR)/name_.c
1122
1123 $(OBJDIR)/name.o: $(OBJDIR)/name_.c $(OBJDIR)/name.h $(SRCDIR)/config.h
1124
+10 -3
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -40,13 +40,13 @@
4040
LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
4141
LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
4242
4343
SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 /DSQLITE_THREADSAFE=0 /DSQLITE_DEFAULT_FILE_FORMAT=4 /DSQLITE_ENABLE_STAT3 /Dlocaltime=fossil_localtime /DSQLITE_ENABLE_LOCKING_STYLE=0
4444
45
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
45
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
4646
47
-OBJ = $(OX)\add$O $(OX)\allrepo$O $(OX)\attach$O $(OX)\bag$O $(OX)\bisect$O $(OX)\blob$O $(OX)\branch$O $(OX)\browse$O $(OX)\captcha$O $(OX)\cgi$O $(OX)\checkin$O $(OX)\checkout$O $(OX)\clearsign$O $(OX)\clone$O $(OX)\comformat$O $(OX)\configure$O $(OX)\content$O $(OX)\db$O $(OX)\delta$O $(OX)\deltacmd$O $(OX)\descendants$O $(OX)\diff$O $(OX)\diffcmd$O $(OX)\doc$O $(OX)\encode$O $(OX)\event$O $(OX)\export$O $(OX)\file$O $(OX)\finfo$O $(OX)\glob$O $(OX)\graph$O $(OX)\gzip$O $(OX)\http$O $(OX)\http_socket$O $(OX)\http_ssl$O $(OX)\http_transport$O $(OX)\import$O $(OX)\info$O $(OX)\json$O $(OX)\json_artifact$O $(OX)\json_branch$O $(OX)\json_config$O $(OX)\json_diff$O $(OX)\json_dir$O $(OX)\json_finfo$O $(OX)\json_login$O $(OX)\json_query$O $(OX)\json_report$O $(OX)\json_tag$O $(OX)\json_timeline$O $(OX)\json_user$O $(OX)\json_wiki$O $(OX)\leaf$O $(OX)\login$O $(OX)\main$O $(OX)\manifest$O $(OX)\md5$O $(OX)\merge$O $(OX)\merge3$O $(OX)\name$O $(OX)\path$O $(OX)\pivot$O $(OX)\popen$O $(OX)\pqueue$O $(OX)\printf$O $(OX)\rebuild$O $(OX)\report$O $(OX)\rss$O $(OX)\schema$O $(OX)\search$O $(OX)\setup$O $(OX)\sha1$O $(OX)\shun$O $(OX)\skins$O $(OX)\sqlcmd$O $(OX)\stash$O $(OX)\stat$O $(OX)\style$O $(OX)\sync$O $(OX)\tag$O $(OX)\tar$O $(OX)\th_main$O $(OX)\timeline$O $(OX)\tkt$O $(OX)\tktsetup$O $(OX)\undo$O $(OX)\update$O $(OX)\url$O $(OX)\user$O $(OX)\verify$O $(OX)\vfile$O $(OX)\wiki$O $(OX)\wikiformat$O $(OX)\winhttp$O $(OX)\wysiwyg$O $(OX)\xfer$O $(OX)\xfersetup$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
47
+OBJ = $(OX)\add$O $(OX)\allrepo$O $(OX)\attach$O $(OX)\bag$O $(OX)\bisect$O $(OX)\blob$O $(OX)\branch$O $(OX)\browse$O $(OX)\captcha$O $(OX)\cgi$O $(OX)\checkin$O $(OX)\checkout$O $(OX)\clearsign$O $(OX)\clone$O $(OX)\comformat$O $(OX)\configure$O $(OX)\content$O $(OX)\db$O $(OX)\delta$O $(OX)\deltacmd$O $(OX)\descendants$O $(OX)\diff$O $(OX)\diffcmd$O $(OX)\doc$O $(OX)\encode$O $(OX)\event$O $(OX)\export$O $(OX)\file$O $(OX)\finfo$O $(OX)\glob$O $(OX)\graph$O $(OX)\gzip$O $(OX)\http$O $(OX)\http_socket$O $(OX)\http_ssl$O $(OX)\http_transport$O $(OX)\import$O $(OX)\info$O $(OX)\json$O $(OX)\json_artifact$O $(OX)\json_branch$O $(OX)\json_config$O $(OX)\json_diff$O $(OX)\json_dir$O $(OX)\json_finfo$O $(OX)\json_login$O $(OX)\json_query$O $(OX)\json_report$O $(OX)\json_tag$O $(OX)\json_timeline$O $(OX)\json_user$O $(OX)\json_wiki$O $(OX)\leaf$O $(OX)\login$O $(OX)\main$O $(OX)\manifest$O $(OX)\md5$O $(OX)\merge$O $(OX)\merge3$O $(OX)\moderate$O $(OX)\name$O $(OX)\path$O $(OX)\pivot$O $(OX)\popen$O $(OX)\pqueue$O $(OX)\printf$O $(OX)\rebuild$O $(OX)\report$O $(OX)\rss$O $(OX)\schema$O $(OX)\search$O $(OX)\setup$O $(OX)\sha1$O $(OX)\shun$O $(OX)\skins$O $(OX)\sqlcmd$O $(OX)\stash$O $(OX)\stat$O $(OX)\style$O $(OX)\sync$O $(OX)\tag$O $(OX)\tar$O $(OX)\th_main$O $(OX)\timeline$O $(OX)\tkt$O $(OX)\tktsetup$O $(OX)\undo$O $(OX)\update$O $(OX)\url$O $(OX)\user$O $(OX)\verify$O $(OX)\vfile$O $(OX)\wiki$O $(OX)\wikiformat$O $(OX)\winhttp$O $(OX)\wysiwyg$O $(OX)\xfer$O $(OX)\xfersetup$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
4848
4949
5050
APPNAME = $(OX)\fossil$(E)
5151
5252
all: $(OX) $(APPNAME)
@@ -113,10 +113,11 @@
113113
echo $(OX)\main.obj >> $@
114114
echo $(OX)\manifest.obj >> $@
115115
echo $(OX)\md5.obj >> $@
116116
echo $(OX)\merge.obj >> $@
117117
echo $(OX)\merge3.obj >> $@
118
+ echo $(OX)\moderate.obj >> $@
118119
echo $(OX)\name.obj >> $@
119120
echo $(OX)\path.obj >> $@
120121
echo $(OX)\pivot.obj >> $@
121122
echo $(OX)\popen.obj >> $@
122123
echo $(OX)\pqueue.obj >> $@
@@ -573,10 +574,16 @@
573574
$(OX)\merge3$O : merge3_.c merge3.h
574575
$(TCC) /Fo$@ -c merge3_.c
575576
576577
merge3_.c : $(SRCDIR)\merge3.c
577578
translate$E $** > $@
579
+
580
+$(OX)\moderate$O : moderate_.c moderate.h
581
+ $(TCC) /Fo$@ -c moderate_.c
582
+
583
+moderate_.c : $(SRCDIR)\moderate.c
584
+ translate$E $** > $@
578585
579586
$(OX)\name$O : name_.c name.h
580587
$(TCC) /Fo$@ -c name_.c
581588
582589
name_.c : $(SRCDIR)\name.c
@@ -809,7 +816,7 @@
809816
810817
zip_.c : $(SRCDIR)\zip.c
811818
translate$E $** > $@
812819
813820
headers: makeheaders$E page_index.h VERSION.h
814
- makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
821
+ makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
815822
@copy /Y nul: headers
816823
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -40,13 +40,13 @@
40 LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
41 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
42
43 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 /DSQLITE_THREADSAFE=0 /DSQLITE_DEFAULT_FILE_FORMAT=4 /DSQLITE_ENABLE_STAT3 /Dlocaltime=fossil_localtime /DSQLITE_ENABLE_LOCKING_STYLE=0
44
45 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
46
47 OBJ = $(OX)\add$O $(OX)\allrepo$O $(OX)\attach$O $(OX)\bag$O $(OX)\bisect$O $(OX)\blob$O $(OX)\branch$O $(OX)\browse$O $(OX)\captcha$O $(OX)\cgi$O $(OX)\checkin$O $(OX)\checkout$O $(OX)\clearsign$O $(OX)\clone$O $(OX)\comformat$O $(OX)\configure$O $(OX)\content$O $(OX)\db$O $(OX)\delta$O $(OX)\deltacmd$O $(OX)\descendants$O $(OX)\diff$O $(OX)\diffcmd$O $(OX)\doc$O $(OX)\encode$O $(OX)\event$O $(OX)\export$O $(OX)\file$O $(OX)\finfo$O $(OX)\glob$O $(OX)\graph$O $(OX)\gzip$O $(OX)\http$O $(OX)\http_socket$O $(OX)\http_ssl$O $(OX)\http_transport$O $(OX)\import$O $(OX)\info$O $(OX)\json$O $(OX)\json_artifact$O $(OX)\json_branch$O $(OX)\json_config$O $(OX)\json_diff$O $(OX)\json_dir$O $(OX)\json_finfo$O $(OX)\json_login$O $(OX)\json_query$O $(OX)\json_report$O $(OX)\json_tag$O $(OX)\json_timeline$O $(OX)\json_user$O $(OX)\json_wiki$O $(OX)\leaf$O $(OX)\login$O $(OX)\main$O $(OX)\manifest$O $(OX)\md5$O $(OX)\merge$O $(OX)\merge3$O $(OX)\name$O $(OX)\path$O $(OX)\pivot$O $(OX)\popen$O $(OX)\pqueue$O $(OX)\printf$O $(OX)\rebuild$O $(OX)\report$O $(OX)\rss$O $(OX)\schema$O $(OX)\search$O $(OX)\setup$O $(OX)\sha1$O $(OX)\shun$O $(OX)\skins$O $(OX)\sqlcmd$O $(OX)\stash$O $(OX)\stat$O $(OX)\style$O $(OX)\sync$O $(OX)\tag$O $(OX)\tar$O $(OX)\th_main$O $(OX)\timeline$O $(OX)\tkt$O $(OX)\tktsetup$O $(OX)\undo$O $(OX)\update$O $(OX)\url$O $(OX)\user$O $(OX)\verify$O $(OX)\vfile$O $(OX)\wiki$O $(OX)\wikiformat$O $(OX)\winhttp$O $(OX)\wysiwyg$O $(OX)\xfer$O $(OX)\xfersetup$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
48
49
50 APPNAME = $(OX)\fossil$(E)
51
52 all: $(OX) $(APPNAME)
@@ -113,10 +113,11 @@
113 echo $(OX)\main.obj >> $@
114 echo $(OX)\manifest.obj >> $@
115 echo $(OX)\md5.obj >> $@
116 echo $(OX)\merge.obj >> $@
117 echo $(OX)\merge3.obj >> $@
 
118 echo $(OX)\name.obj >> $@
119 echo $(OX)\path.obj >> $@
120 echo $(OX)\pivot.obj >> $@
121 echo $(OX)\popen.obj >> $@
122 echo $(OX)\pqueue.obj >> $@
@@ -573,10 +574,16 @@
573 $(OX)\merge3$O : merge3_.c merge3.h
574 $(TCC) /Fo$@ -c merge3_.c
575
576 merge3_.c : $(SRCDIR)\merge3.c
577 translate$E $** > $@
 
 
 
 
 
 
578
579 $(OX)\name$O : name_.c name.h
580 $(TCC) /Fo$@ -c name_.c
581
582 name_.c : $(SRCDIR)\name.c
@@ -809,7 +816,7 @@
809
810 zip_.c : $(SRCDIR)\zip.c
811 translate$E $** > $@
812
813 headers: makeheaders$E page_index.h VERSION.h
814 makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
815 @copy /Y nul: headers
816
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -40,13 +40,13 @@
40 LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
41 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
42
43 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 /DSQLITE_THREADSAFE=0 /DSQLITE_DEFAULT_FILE_FORMAT=4 /DSQLITE_ENABLE_STAT3 /Dlocaltime=fossil_localtime /DSQLITE_ENABLE_LOCKING_STYLE=0
44
45 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
46
47 OBJ = $(OX)\add$O $(OX)\allrepo$O $(OX)\attach$O $(OX)\bag$O $(OX)\bisect$O $(OX)\blob$O $(OX)\branch$O $(OX)\browse$O $(OX)\captcha$O $(OX)\cgi$O $(OX)\checkin$O $(OX)\checkout$O $(OX)\clearsign$O $(OX)\clone$O $(OX)\comformat$O $(OX)\configure$O $(OX)\content$O $(OX)\db$O $(OX)\delta$O $(OX)\deltacmd$O $(OX)\descendants$O $(OX)\diff$O $(OX)\diffcmd$O $(OX)\doc$O $(OX)\encode$O $(OX)\event$O $(OX)\export$O $(OX)\file$O $(OX)\finfo$O $(OX)\glob$O $(OX)\graph$O $(OX)\gzip$O $(OX)\http$O $(OX)\http_socket$O $(OX)\http_ssl$O $(OX)\http_transport$O $(OX)\import$O $(OX)\info$O $(OX)\json$O $(OX)\json_artifact$O $(OX)\json_branch$O $(OX)\json_config$O $(OX)\json_diff$O $(OX)\json_dir$O $(OX)\json_finfo$O $(OX)\json_login$O $(OX)\json_query$O $(OX)\json_report$O $(OX)\json_tag$O $(OX)\json_timeline$O $(OX)\json_user$O $(OX)\json_wiki$O $(OX)\leaf$O $(OX)\login$O $(OX)\main$O $(OX)\manifest$O $(OX)\md5$O $(OX)\merge$O $(OX)\merge3$O $(OX)\moderate$O $(OX)\name$O $(OX)\path$O $(OX)\pivot$O $(OX)\popen$O $(OX)\pqueue$O $(OX)\printf$O $(OX)\rebuild$O $(OX)\report$O $(OX)\rss$O $(OX)\schema$O $(OX)\search$O $(OX)\setup$O $(OX)\sha1$O $(OX)\shun$O $(OX)\skins$O $(OX)\sqlcmd$O $(OX)\stash$O $(OX)\stat$O $(OX)\style$O $(OX)\sync$O $(OX)\tag$O $(OX)\tar$O $(OX)\th_main$O $(OX)\timeline$O $(OX)\tkt$O $(OX)\tktsetup$O $(OX)\undo$O $(OX)\update$O $(OX)\url$O $(OX)\user$O $(OX)\verify$O $(OX)\vfile$O $(OX)\wiki$O $(OX)\wikiformat$O $(OX)\winhttp$O $(OX)\wysiwyg$O $(OX)\xfer$O $(OX)\xfersetup$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
48
49
50 APPNAME = $(OX)\fossil$(E)
51
52 all: $(OX) $(APPNAME)
@@ -113,10 +113,11 @@
113 echo $(OX)\main.obj >> $@
114 echo $(OX)\manifest.obj >> $@
115 echo $(OX)\md5.obj >> $@
116 echo $(OX)\merge.obj >> $@
117 echo $(OX)\merge3.obj >> $@
118 echo $(OX)\moderate.obj >> $@
119 echo $(OX)\name.obj >> $@
120 echo $(OX)\path.obj >> $@
121 echo $(OX)\pivot.obj >> $@
122 echo $(OX)\popen.obj >> $@
123 echo $(OX)\pqueue.obj >> $@
@@ -573,10 +574,16 @@
574 $(OX)\merge3$O : merge3_.c merge3.h
575 $(TCC) /Fo$@ -c merge3_.c
576
577 merge3_.c : $(SRCDIR)\merge3.c
578 translate$E $** > $@
579
580 $(OX)\moderate$O : moderate_.c moderate.h
581 $(TCC) /Fo$@ -c moderate_.c
582
583 moderate_.c : $(SRCDIR)\moderate.c
584 translate$E $** > $@
585
586 $(OX)\name$O : name_.c name.h
587 $(TCC) /Fo$@ -c name_.c
588
589 name_.c : $(SRCDIR)\name.c
@@ -809,7 +816,7 @@
816
817 zip_.c : $(SRCDIR)\zip.c
818 translate$E $** > $@
819
820 headers: makeheaders$E page_index.h VERSION.h
821 makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
822 @copy /Y nul: headers
823

Keyboard Shortcuts

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