Fossil SCM

Merge recent trunk enhancements.

drh 2015-01-26 11:58 UTC mlink-improvements merge
Commit 3c3c166c896b4e0fdbb785e58260a9cffe813ff3
--- skins/etienne1/css.txt
+++ skins/etienne1/css.txt
@@ -30,10 +30,44 @@
3030
.title h1:after {
3131
content: " / ";
3232
color: #777;
3333
font-weight: normal;
3434
}
35
+
36
+.content h1 {
37
+ font-size: 1.25em;
38
+}
39
+.content h2 {
40
+ font-size: 1.15em;
41
+}
42
+.content h2 {
43
+ font-size: 1.05em;
44
+ font-weight: bold;
45
+}
46
+
47
+.section {
48
+ font-size: 1em;
49
+ font-weight: bold;
50
+ background-color: #f5f5f5;
51
+ border: 1px solid #d8d8d8;
52
+ border-radius: 3px 3px 0 0;
53
+ padding: 9px 10px 10px;
54
+ margin: 10px 0;
55
+}
56
+
57
+.sectionmenu {
58
+ border: 1px solid #d8d8d8;
59
+ border-radius: 0 0 3px 3px;
60
+ border-top: 0;
61
+ margin-top: -10px;
62
+ margin-bottom: 10px;
63
+ padding: 10px;
64
+}
65
+.sectionmenu a {
66
+ display: inline-block;
67
+ margin-right: 1em;
68
+}
3569
3670
.status {
3771
float:right;
3872
font-size:.7em;
3973
padding-top:50px;
@@ -80,11 +114,11 @@
80114
border-top-right-radius: 5px;
81115
}
82116
83117
.content {
84118
padding-top: 10px;
85
- font-size:.9em;
119
+ font-size:.8em;
86120
color: #444;
87121
}
88122
89123
.udiff, .sbsdiff,
90124
.content blockquote {
91125
--- skins/etienne1/css.txt
+++ skins/etienne1/css.txt
@@ -30,10 +30,44 @@
30 .title h1:after {
31 content: " / ";
32 color: #777;
33 font-weight: normal;
34 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
36 .status {
37 float:right;
38 font-size:.7em;
39 padding-top:50px;
@@ -80,11 +114,11 @@
80 border-top-right-radius: 5px;
81 }
82
83 .content {
84 padding-top: 10px;
85 font-size:.9em;
86 color: #444;
87 }
88
89 .udiff, .sbsdiff,
90 .content blockquote {
91
--- skins/etienne1/css.txt
+++ skins/etienne1/css.txt
@@ -30,10 +30,44 @@
30 .title h1:after {
31 content: " / ";
32 color: #777;
33 font-weight: normal;
34 }
35
36 .content h1 {
37 font-size: 1.25em;
38 }
39 .content h2 {
40 font-size: 1.15em;
41 }
42 .content h2 {
43 font-size: 1.05em;
44 font-weight: bold;
45 }
46
47 .section {
48 font-size: 1em;
49 font-weight: bold;
50 background-color: #f5f5f5;
51 border: 1px solid #d8d8d8;
52 border-radius: 3px 3px 0 0;
53 padding: 9px 10px 10px;
54 margin: 10px 0;
55 }
56
57 .sectionmenu {
58 border: 1px solid #d8d8d8;
59 border-radius: 0 0 3px 3px;
60 border-top: 0;
61 margin-top: -10px;
62 margin-bottom: 10px;
63 padding: 10px;
64 }
65 .sectionmenu a {
66 display: inline-block;
67 margin-right: 1em;
68 }
69
70 .status {
71 float:right;
72 font-size:.7em;
73 padding-top:50px;
@@ -80,11 +114,11 @@
114 border-top-right-radius: 5px;
115 }
116
117 .content {
118 padding-top: 10px;
119 font-size:.8em;
120 color: #444;
121 }
122
123 .udiff, .sbsdiff,
124 .content blockquote {
125
+2 -2
--- src/branch.c
+++ src/branch.c
@@ -302,11 +302,11 @@
302302
fossil_fatal("branch subcommand should be one of: "
303303
"new list ls");
304304
}
305305
}
306306
307
-static char brlistQuery[] =
307
+static const char brlistQuery[] =
308308
@ SELECT
309309
@ tagxref.value,
310310
@ max(event.mtime),
311311
@ EXISTS(SELECT 1 FROM tagxref AS tx
312312
@ WHERE tx.rid=tagxref.rid
@@ -343,11 +343,11 @@
343343
login_check_credentials();
344344
if( !g.perm.Read ){ login_needed(); return; }
345345
style_header("Branches");
346346
style_adunit_config(ADUNIT_RIGHT_OK);
347347
login_anonymous_available();
348
-
348
+
349349
db_prepare(&q, brlistQuery/*works-like:""*/);
350350
rNow = db_double(0.0, "SELECT julianday('now')");
351351
@ <div class="brlist"><table id="branchlisttable">
352352
@ <thead><tr>
353353
@ <th>Branch Name</th>
354354
--- src/branch.c
+++ src/branch.c
@@ -302,11 +302,11 @@
302 fossil_fatal("branch subcommand should be one of: "
303 "new list ls");
304 }
305 }
306
307 static char brlistQuery[] =
308 @ SELECT
309 @ tagxref.value,
310 @ max(event.mtime),
311 @ EXISTS(SELECT 1 FROM tagxref AS tx
312 @ WHERE tx.rid=tagxref.rid
@@ -343,11 +343,11 @@
343 login_check_credentials();
344 if( !g.perm.Read ){ login_needed(); return; }
345 style_header("Branches");
346 style_adunit_config(ADUNIT_RIGHT_OK);
347 login_anonymous_available();
348
349 db_prepare(&q, brlistQuery/*works-like:""*/);
350 rNow = db_double(0.0, "SELECT julianday('now')");
351 @ <div class="brlist"><table id="branchlisttable">
352 @ <thead><tr>
353 @ <th>Branch Name</th>
354
--- src/branch.c
+++ src/branch.c
@@ -302,11 +302,11 @@
302 fossil_fatal("branch subcommand should be one of: "
303 "new list ls");
304 }
305 }
306
307 static const char brlistQuery[] =
308 @ SELECT
309 @ tagxref.value,
310 @ max(event.mtime),
311 @ EXISTS(SELECT 1 FROM tagxref AS tx
312 @ WHERE tx.rid=tagxref.rid
@@ -343,11 +343,11 @@
343 login_check_credentials();
344 if( !g.perm.Read ){ login_needed(); return; }
345 style_header("Branches");
346 style_adunit_config(ADUNIT_RIGHT_OK);
347 login_anonymous_available();
348
349 db_prepare(&q, brlistQuery/*works-like:""*/);
350 rNow = db_double(0.0, "SELECT julianday('now')");
351 @ <div class="brlist"><table id="branchlisttable">
352 @ <thead><tr>
353 @ <th>Branch Name</th>
354
+3 -3
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888888
889889
/*
890890
** SQL used to compute the age of all files in checkin :ckin whose
891891
** names match :glob
892892
*/
893
-static const char zComputeFileAgeSetup[] =
893
+static const char zComputeFileAgeSetup[] =
894894
@ CREATE TABLE IF NOT EXISTS temp.fileage(
895895
@ fnid INTEGER PRIMARY KEY,
896896
@ fid INTEGER,
897897
@ mid INTEGER,
898898
@ mtime DATETIME,
@@ -899,11 +899,11 @@
899899
@ pathname TEXT
900900
@ );
901901
@ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902902
;
903903
904
-static const char zComputeFileAgeRun[] =
904
+static const char zComputeFileAgeRun[] =
905905
@ WITH RECURSIVE
906906
@ ckin(x) AS (VALUES(:ckin) UNION ALL
907907
@ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908908
@ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909909
@ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
10261026
style_header("File Ages");
10271027
zGlob = P("glob");
10281028
compute_fileage(rid,zGlob);
10291029
db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
10301030
1031
- @ <h2>Files in
1031
+ @ <h2>Files in
10321032
@ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
10331033
if( zGlob && zGlob[0] ){
10341034
@ that match "%h(zGlob)" and
10351035
}
10361036
@ ordered by check-in time</h2>
10371037
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** SQL used to compute the age of all files in checkin :ckin whose
891 ** names match :glob
892 */
893 static const char zComputeFileAgeSetup[] =
894 @ CREATE TABLE IF NOT EXISTS temp.fileage(
895 @ fnid INTEGER PRIMARY KEY,
896 @ fid INTEGER,
897 @ mid INTEGER,
898 @ mtime DATETIME,
@@ -899,11 +899,11 @@
899 @ pathname TEXT
900 @ );
901 @ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902 ;
903
904 static const char zComputeFileAgeRun[] =
905 @ WITH RECURSIVE
906 @ ckin(x) AS (VALUES(:ckin) UNION ALL
907 @ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908 @ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909 @ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
1026 style_header("File Ages");
1027 zGlob = P("glob");
1028 compute_fileage(rid,zGlob);
1029 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1030
1031 @ <h2>Files in
1032 @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1033 if( zGlob && zGlob[0] ){
1034 @ that match "%h(zGlob)" and
1035 }
1036 @ ordered by check-in time</h2>
1037
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** SQL used to compute the age of all files in checkin :ckin whose
891 ** names match :glob
892 */
893 static const char zComputeFileAgeSetup[] =
894 @ CREATE TABLE IF NOT EXISTS temp.fileage(
895 @ fnid INTEGER PRIMARY KEY,
896 @ fid INTEGER,
897 @ mid INTEGER,
898 @ mtime DATETIME,
@@ -899,11 +899,11 @@
899 @ pathname TEXT
900 @ );
901 @ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902 ;
903
904 static const char zComputeFileAgeRun[] =
905 @ WITH RECURSIVE
906 @ ckin(x) AS (VALUES(:ckin) UNION ALL
907 @ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908 @ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909 @ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
1026 style_header("File Ages");
1027 zGlob = P("glob");
1028 compute_fileage(rid,zGlob);
1029 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1030
1031 @ <h2>Files in
1032 @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1033 if( zGlob && zGlob[0] ){
1034 @ that match "%h(zGlob)" and
1035 }
1036 @ ordered by check-in time</h2>
1037
+3 -3
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888888
889889
/*
890890
** SQL used to compute the age of all files in checkin :ckin whose
891891
** names match :glob
892892
*/
893
-static const char zComputeFileAgeSetup[] =
893
+static const char zComputeFileAgeSetup[] =
894894
@ CREATE TABLE IF NOT EXISTS temp.fileage(
895895
@ fnid INTEGER PRIMARY KEY,
896896
@ fid INTEGER,
897897
@ mid INTEGER,
898898
@ mtime DATETIME,
@@ -899,11 +899,11 @@
899899
@ pathname TEXT
900900
@ );
901901
@ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902902
;
903903
904
-static const char zComputeFileAgeRun[] =
904
+static const char zComputeFileAgeRun[] =
905905
@ WITH RECURSIVE
906906
@ ckin(x) AS (VALUES(:ckin) UNION ALL
907907
@ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908908
@ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909909
@ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
10261026
style_header("File Ages");
10271027
zGlob = P("glob");
10281028
compute_fileage(rid,zGlob);
10291029
db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
10301030
1031
- @ <h2>Files in
1031
+ @ <h2>Files in
10321032
@ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
10331033
if( zGlob && zGlob[0] ){
10341034
@ that match "%h(zGlob)" and
10351035
}
10361036
@ ordered by check-in time</h2>
10371037
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** SQL used to compute the age of all files in checkin :ckin whose
891 ** names match :glob
892 */
893 static const char zComputeFileAgeSetup[] =
894 @ CREATE TABLE IF NOT EXISTS temp.fileage(
895 @ fnid INTEGER PRIMARY KEY,
896 @ fid INTEGER,
897 @ mid INTEGER,
898 @ mtime DATETIME,
@@ -899,11 +899,11 @@
899 @ pathname TEXT
900 @ );
901 @ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902 ;
903
904 static const char zComputeFileAgeRun[] =
905 @ WITH RECURSIVE
906 @ ckin(x) AS (VALUES(:ckin) UNION ALL
907 @ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908 @ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909 @ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
1026 style_header("File Ages");
1027 zGlob = P("glob");
1028 compute_fileage(rid,zGlob);
1029 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1030
1031 @ <h2>Files in
1032 @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1033 if( zGlob && zGlob[0] ){
1034 @ that match "%h(zGlob)" and
1035 }
1036 @ ordered by check-in time</h2>
1037
--- src/browse.c
+++ src/browse.c
@@ -888,11 +888,11 @@
888
889 /*
890 ** SQL used to compute the age of all files in checkin :ckin whose
891 ** names match :glob
892 */
893 static const char zComputeFileAgeSetup[] =
894 @ CREATE TABLE IF NOT EXISTS temp.fileage(
895 @ fnid INTEGER PRIMARY KEY,
896 @ fid INTEGER,
897 @ mid INTEGER,
898 @ mtime DATETIME,
@@ -899,11 +899,11 @@
899 @ pathname TEXT
900 @ );
901 @ CREATE VIRTUAL TABLE IF NOT EXISTS temp.foci USING files_of_checkin;
902 ;
903
904 static const char zComputeFileAgeRun[] =
905 @ WITH RECURSIVE
906 @ ckin(x) AS (VALUES(:ckin) UNION ALL
907 @ SELECT pid FROM ckin, plink WHERE cid=x AND isprim)
908 @ INSERT OR IGNORE INTO fileage(fnid, fid, mid, mtime, pathname)
909 @ SELECT mlink.fnid, mlink.fid, x, event.mtime, filename.name
@@ -1026,11 +1026,11 @@
1026 style_header("File Ages");
1027 zGlob = P("glob");
1028 compute_fileage(rid,zGlob);
1029 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1030
1031 @ <h2>Files in
1032 @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1033 if( zGlob && zGlob[0] ){
1034 @ that match "%h(zGlob)" and
1035 }
1036 @ ordered by check-in time</h2>
1037
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -1756,11 +1756,11 @@
17561756
fd = dup(connection);
17571757
if( fd!=0 ) nErr++;
17581758
close(1);
17591759
fd = dup(connection);
17601760
if( fd!=1 ) nErr++;
1761
- if( !g.fHttpTrace && !g.fSqlTrace ){
1761
+ if( !g.fAnyTrace ){
17621762
close(2);
17631763
fd = dup(connection);
17641764
if( fd!=2 ) nErr++;
17651765
}
17661766
close(connection);
17671767
--- src/cgi.c
+++ src/cgi.c
@@ -1756,11 +1756,11 @@
1756 fd = dup(connection);
1757 if( fd!=0 ) nErr++;
1758 close(1);
1759 fd = dup(connection);
1760 if( fd!=1 ) nErr++;
1761 if( !g.fHttpTrace && !g.fSqlTrace ){
1762 close(2);
1763 fd = dup(connection);
1764 if( fd!=2 ) nErr++;
1765 }
1766 close(connection);
1767
--- src/cgi.c
+++ src/cgi.c
@@ -1756,11 +1756,11 @@
1756 fd = dup(connection);
1757 if( fd!=0 ) nErr++;
1758 close(1);
1759 fd = dup(connection);
1760 if( fd!=1 ) nErr++;
1761 if( !g.fAnyTrace ){
1762 close(2);
1763 fd = dup(connection);
1764 if( fd!=2 ) nErr++;
1765 }
1766 close(connection);
1767
+2 -2
--- src/db.c
+++ src/db.c
@@ -795,11 +795,11 @@
795795
}
796796
}
797797
}
798798
799799
/*
800
-** Register the SQL functions that are useful both to the internal
800
+** Register the SQL functions that are useful both to the internal
801801
** representation and to the "fossil sql" command.
802802
*/
803803
void db_add_aux_functions(sqlite3 *db){
804804
sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_UTF8, 0,
805805
db_checkin_mtime_function, 0, 0);
@@ -840,11 +840,11 @@
840840
);
841841
sqlite3_create_function(
842842
db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
843843
);
844844
if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
845
- db_add_aux_functions(db);
845
+ db_add_aux_functions(db);
846846
re_add_sql_func(db); /* The REGEXP operator */
847847
foci_register(db); /* The "files_of_checkin" virtual table */
848848
sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
849849
return db;
850850
}
851851
--- src/db.c
+++ src/db.c
@@ -795,11 +795,11 @@
795 }
796 }
797 }
798
799 /*
800 ** Register the SQL functions that are useful both to the internal
801 ** representation and to the "fossil sql" command.
802 */
803 void db_add_aux_functions(sqlite3 *db){
804 sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_UTF8, 0,
805 db_checkin_mtime_function, 0, 0);
@@ -840,11 +840,11 @@
840 );
841 sqlite3_create_function(
842 db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
843 );
844 if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
845 db_add_aux_functions(db);
846 re_add_sql_func(db); /* The REGEXP operator */
847 foci_register(db); /* The "files_of_checkin" virtual table */
848 sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
849 return db;
850 }
851
--- src/db.c
+++ src/db.c
@@ -795,11 +795,11 @@
795 }
796 }
797 }
798
799 /*
800 ** Register the SQL functions that are useful both to the internal
801 ** representation and to the "fossil sql" command.
802 */
803 void db_add_aux_functions(sqlite3 *db){
804 sqlite3_create_function(db, "checkin_mtime", 2, SQLITE_UTF8, 0,
805 db_checkin_mtime_function, 0, 0);
@@ -840,11 +840,11 @@
840 );
841 sqlite3_create_function(
842 db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
843 );
844 if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
845 db_add_aux_functions(db);
846 re_add_sql_func(db); /* The REGEXP operator */
847 foci_register(db); /* The "files_of_checkin" virtual table */
848 sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
849 return db;
850 }
851
+8 -7
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319319
if( baseCheckin ) firstChngOnly = 1;
320320
if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321321
322322
zPrevDate[0] = 0;
323323
zFilename = PD("name","");
324
+ fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
325
+ if( fnid==0 ){
326
+ @ No such file: %h(zFilename)
327
+ style_footer();
328
+ return;
329
+ }
324330
url_add_parameter(&url, "name", zFilename);
325331
blob_zero(&sql);
326332
blob_append_sql(&sql,
327333
"SELECT"
328334
" datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
339345
" mlink.mid," /* check-in ID */
340346
" mlink.pfnid", /* Previous filename */
341347
timeline_utc(), TAG_BRANCH
342348
);
343349
if( firstChngOnly ){
344
-#if 0
345
- blob_append_sql(&sql, ", min(event.mtime)");
346
-#else
347350
blob_append_sql(&sql,
348351
", min(CASE (SELECT value FROM tagxref"
349352
" WHERE tagtype>0 AND tagid=%d"
350353
" AND tagxref.rid=mlink.mid)"
351354
" WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
352355
TAG_BRANCH);
353
-#endif
354356
}
355357
blob_append_sql(&sql,
356358
" FROM mlink, event"
357
- " WHERE mlink.fnid IN (SELECT fnid FROM filename WHERE name=%Q)"
359
+ " WHERE mlink.fnid=%d"
358360
" AND event.objid=mlink.mid",
359
- zFilename
361
+ fnid
360362
);
361363
if( baseCheckin ){
362364
compute_direct_ancestors(baseCheckin, 10000000);
363365
blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
364366
}
@@ -403,11 +405,10 @@
403405
fossil_free(zUuid);
404406
}else{
405407
blob_appendf(&title, "History of files named ");
406408
hyperlinked_path(zFilename, &title, 0, "tree", "");
407409
}
408
- fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
409410
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
410411
@ <h2>%b(&title)</h2>
411412
blob_reset(&title);
412413
pGraph = graph_init();
413414
@ <div id="canvas" style="position:relative;width:1px;height:1px;"
414415
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319 if( baseCheckin ) firstChngOnly = 1;
320 if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321
322 zPrevDate[0] = 0;
323 zFilename = PD("name","");
 
 
 
 
 
 
324 url_add_parameter(&url, "name", zFilename);
325 blob_zero(&sql);
326 blob_append_sql(&sql,
327 "SELECT"
328 " datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
339 " mlink.mid," /* check-in ID */
340 " mlink.pfnid", /* Previous filename */
341 timeline_utc(), TAG_BRANCH
342 );
343 if( firstChngOnly ){
344 #if 0
345 blob_append_sql(&sql, ", min(event.mtime)");
346 #else
347 blob_append_sql(&sql,
348 ", min(CASE (SELECT value FROM tagxref"
349 " WHERE tagtype>0 AND tagid=%d"
350 " AND tagxref.rid=mlink.mid)"
351 " WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
352 TAG_BRANCH);
353 #endif
354 }
355 blob_append_sql(&sql,
356 " FROM mlink, event"
357 " WHERE mlink.fnid IN (SELECT fnid FROM filename WHERE name=%Q)"
358 " AND event.objid=mlink.mid",
359 zFilename
360 );
361 if( baseCheckin ){
362 compute_direct_ancestors(baseCheckin, 10000000);
363 blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
364 }
@@ -403,11 +405,10 @@
403 fossil_free(zUuid);
404 }else{
405 blob_appendf(&title, "History of files named ");
406 hyperlinked_path(zFilename, &title, 0, "tree", "");
407 }
408 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
409 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
410 @ <h2>%b(&title)</h2>
411 blob_reset(&title);
412 pGraph = graph_init();
413 @ <div id="canvas" style="position:relative;width:1px;height:1px;"
414
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319 if( baseCheckin ) firstChngOnly = 1;
320 if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321
322 zPrevDate[0] = 0;
323 zFilename = PD("name","");
324 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
325 if( fnid==0 ){
326 @ No such file: %h(zFilename)
327 style_footer();
328 return;
329 }
330 url_add_parameter(&url, "name", zFilename);
331 blob_zero(&sql);
332 blob_append_sql(&sql,
333 "SELECT"
334 " datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
345 " mlink.mid," /* check-in ID */
346 " mlink.pfnid", /* Previous filename */
347 timeline_utc(), TAG_BRANCH
348 );
349 if( firstChngOnly ){
 
 
 
350 blob_append_sql(&sql,
351 ", min(CASE (SELECT value FROM tagxref"
352 " WHERE tagtype>0 AND tagid=%d"
353 " AND tagxref.rid=mlink.mid)"
354 " WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
355 TAG_BRANCH);
 
356 }
357 blob_append_sql(&sql,
358 " FROM mlink, event"
359 " WHERE mlink.fnid=%d"
360 " AND event.objid=mlink.mid",
361 fnid
362 );
363 if( baseCheckin ){
364 compute_direct_ancestors(baseCheckin, 10000000);
365 blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
366 }
@@ -403,11 +405,10 @@
405 fossil_free(zUuid);
406 }else{
407 blob_appendf(&title, "History of files named ");
408 hyperlinked_path(zFilename, &title, 0, "tree", "");
409 }
 
410 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
411 @ <h2>%b(&title)</h2>
412 blob_reset(&title);
413 pGraph = graph_init();
414 @ <div id="canvas" style="position:relative;width:1px;height:1px;"
415
+8 -7
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319319
if( baseCheckin ) firstChngOnly = 1;
320320
if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321321
322322
zPrevDate[0] = 0;
323323
zFilename = PD("name","");
324
+ fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
325
+ if( fnid==0 ){
326
+ @ No such file: %h(zFilename)
327
+ style_footer();
328
+ return;
329
+ }
324330
url_add_parameter(&url, "name", zFilename);
325331
blob_zero(&sql);
326332
blob_append_sql(&sql,
327333
"SELECT"
328334
" datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
339345
" mlink.mid," /* check-in ID */
340346
" mlink.pfnid", /* Previous filename */
341347
timeline_utc(), TAG_BRANCH
342348
);
343349
if( firstChngOnly ){
344
-#if 0
345
- blob_append_sql(&sql, ", min(event.mtime)");
346
-#else
347350
blob_append_sql(&sql,
348351
", min(CASE (SELECT value FROM tagxref"
349352
" WHERE tagtype>0 AND tagid=%d"
350353
" AND tagxref.rid=mlink.mid)"
351354
" WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
352355
TAG_BRANCH);
353
-#endif
354356
}
355357
blob_append_sql(&sql,
356358
" FROM mlink, event"
357
- " WHERE mlink.fnid IN (SELECT fnid FROM filename WHERE name=%Q)"
359
+ " WHERE mlink.fnid=%d"
358360
" AND event.objid=mlink.mid",
359
- zFilename
361
+ fnid
360362
);
361363
if( baseCheckin ){
362364
compute_direct_ancestors(baseCheckin, 10000000);
363365
blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
364366
}
@@ -403,11 +405,10 @@
403405
fossil_free(zUuid);
404406
}else{
405407
blob_appendf(&title, "History of files named ");
406408
hyperlinked_path(zFilename, &title, 0, "tree", "");
407409
}
408
- fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
409410
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
410411
@ <h2>%b(&title)</h2>
411412
blob_reset(&title);
412413
pGraph = graph_init();
413414
@ <div id="canvas" style="position:relative;width:1px;height:1px;"
414415
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319 if( baseCheckin ) firstChngOnly = 1;
320 if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321
322 zPrevDate[0] = 0;
323 zFilename = PD("name","");
 
 
 
 
 
 
324 url_add_parameter(&url, "name", zFilename);
325 blob_zero(&sql);
326 blob_append_sql(&sql,
327 "SELECT"
328 " datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
339 " mlink.mid," /* check-in ID */
340 " mlink.pfnid", /* Previous filename */
341 timeline_utc(), TAG_BRANCH
342 );
343 if( firstChngOnly ){
344 #if 0
345 blob_append_sql(&sql, ", min(event.mtime)");
346 #else
347 blob_append_sql(&sql,
348 ", min(CASE (SELECT value FROM tagxref"
349 " WHERE tagtype>0 AND tagid=%d"
350 " AND tagxref.rid=mlink.mid)"
351 " WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
352 TAG_BRANCH);
353 #endif
354 }
355 blob_append_sql(&sql,
356 " FROM mlink, event"
357 " WHERE mlink.fnid IN (SELECT fnid FROM filename WHERE name=%Q)"
358 " AND event.objid=mlink.mid",
359 zFilename
360 );
361 if( baseCheckin ){
362 compute_direct_ancestors(baseCheckin, 10000000);
363 blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
364 }
@@ -403,11 +405,10 @@
403 fossil_free(zUuid);
404 }else{
405 blob_appendf(&title, "History of files named ");
406 hyperlinked_path(zFilename, &title, 0, "tree", "");
407 }
408 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
409 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
410 @ <h2>%b(&title)</h2>
411 blob_reset(&title);
412 pGraph = graph_init();
413 @ <div id="canvas" style="position:relative;width:1px;height:1px;"
414
--- src/finfo.c
+++ src/finfo.c
@@ -319,10 +319,16 @@
319 if( baseCheckin ) firstChngOnly = 1;
320 if( !firstChngOnly ) url_add_parameter(&url, "fco", "0");
321
322 zPrevDate[0] = 0;
323 zFilename = PD("name","");
324 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
325 if( fnid==0 ){
326 @ No such file: %h(zFilename)
327 style_footer();
328 return;
329 }
330 url_add_parameter(&url, "name", zFilename);
331 blob_zero(&sql);
332 blob_append_sql(&sql,
333 "SELECT"
334 " datetime(event.mtime%s)," /* Date of change */
@@ -339,26 +345,22 @@
345 " mlink.mid," /* check-in ID */
346 " mlink.pfnid", /* Previous filename */
347 timeline_utc(), TAG_BRANCH
348 );
349 if( firstChngOnly ){
 
 
 
350 blob_append_sql(&sql,
351 ", min(CASE (SELECT value FROM tagxref"
352 " WHERE tagtype>0 AND tagid=%d"
353 " AND tagxref.rid=mlink.mid)"
354 " WHEN 'trunk' THEN event.mtime-10000 ELSE event.mtime END)",
355 TAG_BRANCH);
 
356 }
357 blob_append_sql(&sql,
358 " FROM mlink, event"
359 " WHERE mlink.fnid=%d"
360 " AND event.objid=mlink.mid",
361 fnid
362 );
363 if( baseCheckin ){
364 compute_direct_ancestors(baseCheckin, 10000000);
365 blob_append_sql(&sql," AND mlink.mid IN (SELECT rid FROM ancestor)");
366 }
@@ -403,11 +405,10 @@
405 fossil_free(zUuid);
406 }else{
407 blob_appendf(&title, "History of files named ");
408 hyperlinked_path(zFilename, &title, 0, "tree", "");
409 }
 
410 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
411 @ <h2>%b(&title)</h2>
412 blob_reset(&title);
413 pGraph = graph_init();
414 @ <div id="canvas" style="position:relative;width:1px;height:1px;"
415
+3 -2
--- src/main.c
+++ src/main.c
@@ -143,10 +143,11 @@
143143
int fSqlTrace; /* True if --sqltrace flag is present */
144144
int fSqlStats; /* True if --sqltrace or --sqlstats are present */
145145
int fSqlPrint; /* True if -sqlprint flag is present */
146146
int fQuiet; /* True if -quiet flag is present */
147147
int fHttpTrace; /* Trace outbound HTTP requests */
148
+ int fAnyTrace; /* Any kind of tracing */
148149
char *zHttpAuth; /* HTTP Authorization user:pass information */
149150
int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */
150151
int fSshTrace; /* Trace the SSH setup traffic */
151152
int fSshClient; /* HTTP client flags for SSH client */
152153
char *zSshCmd; /* SSH command string */
@@ -658,15 +659,15 @@
658659
g.fSystemTrace = find_option("systemtrace", 0, 0)!=0;
659660
g.fSshTrace = find_option("sshtrace", 0, 0)!=0;
660661
g.fSshClient = 0;
661662
g.zSshCmd = 0;
662663
if( g.fSqlTrace ) g.fSqlStats = 1;
663
- g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
664664
g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
665665
#ifdef FOSSIL_ENABLE_TH1_HOOKS
666666
g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
667667
#endif
668
+ g.fAnyTrace = g.fSqlTrace|g.fSystemTrace|g.fSshTrace|g.fHttpTrace;
668669
g.zHttpAuth = 0;
669670
g.zLogin = find_option("user", "U", 1);
670671
g.zSSLIdentity = find_option("ssl-identity", 0, 1);
671672
g.zErrlog = find_option("errorlog", 0, 1);
672673
fossil_init_flags_from_options();
@@ -1873,11 +1874,11 @@
18731874
}
18741875
if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
18751876
/* debug: FILENAME
18761877
**
18771878
** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
1878
- ** into FILENAME.
1879
+ ** into FILENAME.
18791880
*/
18801881
g.fDebug = fossil_fopen(blob_str(&value), "ab");
18811882
blob_reset(&value);
18821883
continue;
18831884
}
18841885
--- src/main.c
+++ src/main.c
@@ -143,10 +143,11 @@
143 int fSqlTrace; /* True if --sqltrace flag is present */
144 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
145 int fSqlPrint; /* True if -sqlprint flag is present */
146 int fQuiet; /* True if -quiet flag is present */
147 int fHttpTrace; /* Trace outbound HTTP requests */
 
148 char *zHttpAuth; /* HTTP Authorization user:pass information */
149 int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */
150 int fSshTrace; /* Trace the SSH setup traffic */
151 int fSshClient; /* HTTP client flags for SSH client */
152 char *zSshCmd; /* SSH command string */
@@ -658,15 +659,15 @@
658 g.fSystemTrace = find_option("systemtrace", 0, 0)!=0;
659 g.fSshTrace = find_option("sshtrace", 0, 0)!=0;
660 g.fSshClient = 0;
661 g.zSshCmd = 0;
662 if( g.fSqlTrace ) g.fSqlStats = 1;
663 g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
664 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
665 #ifdef FOSSIL_ENABLE_TH1_HOOKS
666 g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
667 #endif
 
668 g.zHttpAuth = 0;
669 g.zLogin = find_option("user", "U", 1);
670 g.zSSLIdentity = find_option("ssl-identity", 0, 1);
671 g.zErrlog = find_option("errorlog", 0, 1);
672 fossil_init_flags_from_options();
@@ -1873,11 +1874,11 @@
1873 }
1874 if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
1875 /* debug: FILENAME
1876 **
1877 ** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
1878 ** into FILENAME.
1879 */
1880 g.fDebug = fossil_fopen(blob_str(&value), "ab");
1881 blob_reset(&value);
1882 continue;
1883 }
1884
--- src/main.c
+++ src/main.c
@@ -143,10 +143,11 @@
143 int fSqlTrace; /* True if --sqltrace flag is present */
144 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
145 int fSqlPrint; /* True if -sqlprint flag is present */
146 int fQuiet; /* True if -quiet flag is present */
147 int fHttpTrace; /* Trace outbound HTTP requests */
148 int fAnyTrace; /* Any kind of tracing */
149 char *zHttpAuth; /* HTTP Authorization user:pass information */
150 int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */
151 int fSshTrace; /* Trace the SSH setup traffic */
152 int fSshClient; /* HTTP client flags for SSH client */
153 char *zSshCmd; /* SSH command string */
@@ -658,15 +659,15 @@
659 g.fSystemTrace = find_option("systemtrace", 0, 0)!=0;
660 g.fSshTrace = find_option("sshtrace", 0, 0)!=0;
661 g.fSshClient = 0;
662 g.zSshCmd = 0;
663 if( g.fSqlTrace ) g.fSqlStats = 1;
 
664 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
665 #ifdef FOSSIL_ENABLE_TH1_HOOKS
666 g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
667 #endif
668 g.fAnyTrace = g.fSqlTrace|g.fSystemTrace|g.fSshTrace|g.fHttpTrace;
669 g.zHttpAuth = 0;
670 g.zLogin = find_option("user", "U", 1);
671 g.zSSLIdentity = find_option("ssl-identity", 0, 1);
672 g.zErrlog = find_option("errorlog", 0, 1);
673 fossil_init_flags_from_options();
@@ -1873,11 +1874,11 @@
1874 }
1875 if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
1876 /* debug: FILENAME
1877 **
1878 ** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
1879 ** into FILENAME.
1880 */
1881 g.fDebug = fossil_fopen(blob_str(&value), "ab");
1882 blob_reset(&value);
1883 continue;
1884 }
1885
+3 -2
--- src/main.mk
+++ src/main.mk
@@ -155,11 +155,12 @@
155155
$(SRCDIR)/../skins/plain_gray/footer.txt \
156156
$(SRCDIR)/../skins/plain_gray/header.txt \
157157
$(SRCDIR)/../skins/rounded1/css.txt \
158158
$(SRCDIR)/../skins/rounded1/footer.txt \
159159
$(SRCDIR)/../skins/rounded1/header.txt \
160
- $(SRCDIR)/diff.tcl
160
+ $(SRCDIR)/diff.tcl \
161
+ $(SRCDIR)/markdown.md
161162
162163
TRANS_SRC = \
163164
$(OBJDIR)/add_.c \
164165
$(OBJDIR)/allrepo_.c \
165166
$(OBJDIR)/attach_.c \
@@ -502,11 +503,11 @@
502503
503504
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
504505
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
505506
506507
$(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
507
- $(OBJDIR)/mkbuiltin $(EXTRA_FILES) >$@
508
+ $(OBJDIR)/mkbuiltin --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
508509
509510
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
510511
$(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
511512
$(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
512513
$(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
513514
--- src/main.mk
+++ src/main.mk
@@ -155,11 +155,12 @@
155 $(SRCDIR)/../skins/plain_gray/footer.txt \
156 $(SRCDIR)/../skins/plain_gray/header.txt \
157 $(SRCDIR)/../skins/rounded1/css.txt \
158 $(SRCDIR)/../skins/rounded1/footer.txt \
159 $(SRCDIR)/../skins/rounded1/header.txt \
160 $(SRCDIR)/diff.tcl
 
161
162 TRANS_SRC = \
163 $(OBJDIR)/add_.c \
164 $(OBJDIR)/allrepo_.c \
165 $(OBJDIR)/attach_.c \
@@ -502,11 +503,11 @@
502
503 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
504 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
505
506 $(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
507 $(OBJDIR)/mkbuiltin $(EXTRA_FILES) >$@
508
509 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
510 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
511 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
512 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
513
--- src/main.mk
+++ src/main.mk
@@ -155,11 +155,12 @@
155 $(SRCDIR)/../skins/plain_gray/footer.txt \
156 $(SRCDIR)/../skins/plain_gray/header.txt \
157 $(SRCDIR)/../skins/rounded1/css.txt \
158 $(SRCDIR)/../skins/rounded1/footer.txt \
159 $(SRCDIR)/../skins/rounded1/header.txt \
160 $(SRCDIR)/diff.tcl \
161 $(SRCDIR)/markdown.md
162
163 TRANS_SRC = \
164 $(OBJDIR)/add_.c \
165 $(OBJDIR)/allrepo_.c \
166 $(OBJDIR)/attach_.c \
@@ -502,11 +503,11 @@
503
504 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
505 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
506
507 $(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
508 $(OBJDIR)/mkbuiltin --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
509
510 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
511 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
512 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
513 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
514
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142142
143143
# Additional resource files that get built into the executable.
144144
#
145145
set extra_files {
146146
diff.tcl
147
+ markdown.md
147148
../skins/*/*.txt
148149
}
149150
150151
# Options used to compile the included SQLite library.
151152
#
@@ -372,11 +373,11 @@
372373
set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs]
373374
writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
374375
writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >\$@\n"
375376
376377
writeln "\$(OBJDIR)/builtin_data.h: \$(OBJDIR)/mkbuiltin \$(EXTRA_FILES)"
377
-writeln "\t\$(OBJDIR)/mkbuiltin \$(EXTRA_FILES) >\$@\n"
378
+writeln "\t\$(OBJDIR)/mkbuiltin --prefix \$(SRCDIR)/ \$(EXTRA_FILES) >\$@\n"
378379
379380
writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
380381
writeln "\t\$(OBJDIR)/makeheaders $mhargs"
381382
writeln "\ttouch \$(OBJDIR)/headers"
382383
writeln "\$(OBJDIR)/headers: Makefile"
@@ -1025,11 +1026,11 @@
10251026
append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h"
10261027
writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)"
10271028
writeln "\t\$(MKINDEX) \$(TRANS_SRC) >\$@\n"
10281029
10291030
writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)"
1030
-writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >\$@\n"
1031
+writeln "\t\$(MKBUILTIN) --prefix \$(SRCDIR)/ \$(EXTRA_FILES) >\$@\n"
10311032
10321033
writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h"
10331034
writeln "\t\$(MAKEHEADERS) $mhargs"
10341035
writeln "\techo Done >\$(OBJDIR)/headers\n"
10351036
writeln "\$(OBJDIR)/headers: Makefile\n"
@@ -1204,11 +1205,11 @@
12041205
12051206
page_index.h: mkindex$E $(SRC)
12061207
+$** > $@
12071208
12081209
builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1209
- +$** > $@
1210
+ mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
12101211
12111212
clean:
12121213
-del $(OBJDIR)\*.obj
12131214
-del *.obj *_.c *.h *.map
12141215
@@ -1598,11 +1599,11 @@
15981599
15991600
page_index.h: mkindex$E $(SRC)
16001601
$** > $@
16011602
16021603
builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1603
- $** > $@
1604
+ mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
16041605
16051606
clean:
16061607
-del $(OX)\*.obj
16071608
-del *.obj
16081609
-del *_.c
@@ -1830,11 +1831,11 @@
18301831
# generate the index source, containing all web references,..
18311832
page_index.h: $(TRANSLATEDSRC) mkindex.exe
18321833
mkindex.exe $(TRANSLATEDSRC) >$@
18331834
18341835
builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
1835
- mkbuiltin.exe $(EXTRA_FILES) >$@
1836
+ mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
18361837
18371838
# extracting version info from manifest
18381839
VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
18391840
version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
18401841
18411842
18421843
ADDED src/markdown.md
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142
143 # Additional resource files that get built into the executable.
144 #
145 set extra_files {
146 diff.tcl
 
147 ../skins/*/*.txt
148 }
149
150 # Options used to compile the included SQLite library.
151 #
@@ -372,11 +373,11 @@
372 set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs]
373 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
374 writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >\$@\n"
375
376 writeln "\$(OBJDIR)/builtin_data.h: \$(OBJDIR)/mkbuiltin \$(EXTRA_FILES)"
377 writeln "\t\$(OBJDIR)/mkbuiltin \$(EXTRA_FILES) >\$@\n"
378
379 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
380 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
381 writeln "\ttouch \$(OBJDIR)/headers"
382 writeln "\$(OBJDIR)/headers: Makefile"
@@ -1025,11 +1026,11 @@
1025 append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h"
1026 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)"
1027 writeln "\t\$(MKINDEX) \$(TRANS_SRC) >\$@\n"
1028
1029 writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)"
1030 writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >\$@\n"
1031
1032 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h"
1033 writeln "\t\$(MAKEHEADERS) $mhargs"
1034 writeln "\techo Done >\$(OBJDIR)/headers\n"
1035 writeln "\$(OBJDIR)/headers: Makefile\n"
@@ -1204,11 +1205,11 @@
1204
1205 page_index.h: mkindex$E $(SRC)
1206 +$** > $@
1207
1208 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1209 +$** > $@
1210
1211 clean:
1212 -del $(OBJDIR)\*.obj
1213 -del *.obj *_.c *.h *.map
1214
@@ -1598,11 +1599,11 @@
1598
1599 page_index.h: mkindex$E $(SRC)
1600 $** > $@
1601
1602 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1603 $** > $@
1604
1605 clean:
1606 -del $(OX)\*.obj
1607 -del *.obj
1608 -del *_.c
@@ -1830,11 +1831,11 @@
1830 # generate the index source, containing all web references,..
1831 page_index.h: $(TRANSLATEDSRC) mkindex.exe
1832 mkindex.exe $(TRANSLATEDSRC) >$@
1833
1834 builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
1835 mkbuiltin.exe $(EXTRA_FILES) >$@
1836
1837 # extracting version info from manifest
1838 VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
1839 version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
1840
1841
1842 DDED src/markdown.md
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142
143 # Additional resource files that get built into the executable.
144 #
145 set extra_files {
146 diff.tcl
147 markdown.md
148 ../skins/*/*.txt
149 }
150
151 # Options used to compile the included SQLite library.
152 #
@@ -372,11 +373,11 @@
373 set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs]
374 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex"
375 writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >\$@\n"
376
377 writeln "\$(OBJDIR)/builtin_data.h: \$(OBJDIR)/mkbuiltin \$(EXTRA_FILES)"
378 writeln "\t\$(OBJDIR)/mkbuiltin --prefix \$(SRCDIR)/ \$(EXTRA_FILES) >\$@\n"
379
380 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
381 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
382 writeln "\ttouch \$(OBJDIR)/headers"
383 writeln "\$(OBJDIR)/headers: Makefile"
@@ -1025,11 +1026,11 @@
1026 append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h"
1027 writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)"
1028 writeln "\t\$(MKINDEX) \$(TRANS_SRC) >\$@\n"
1029
1030 writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)"
1031 writeln "\t\$(MKBUILTIN) --prefix \$(SRCDIR)/ \$(EXTRA_FILES) >\$@\n"
1032
1033 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h"
1034 writeln "\t\$(MAKEHEADERS) $mhargs"
1035 writeln "\techo Done >\$(OBJDIR)/headers\n"
1036 writeln "\$(OBJDIR)/headers: Makefile\n"
@@ -1204,11 +1205,11 @@
1205
1206 page_index.h: mkindex$E $(SRC)
1207 +$** > $@
1208
1209 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1210 mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
1211
1212 clean:
1213 -del $(OBJDIR)\*.obj
1214 -del *.obj *_.c *.h *.map
1215
@@ -1598,11 +1599,11 @@
1599
1600 page_index.h: mkindex$E $(SRC)
1601 $** > $@
1602
1603 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
1604 mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
1605
1606 clean:
1607 -del $(OX)\*.obj
1608 -del *.obj
1609 -del *_.c
@@ -1830,11 +1831,11 @@
1831 # generate the index source, containing all web references,..
1832 page_index.h: $(TRANSLATEDSRC) mkindex.exe
1833 mkindex.exe $(TRANSLATEDSRC) >$@
1834
1835 builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
1836 mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
1837
1838 # extracting version info from manifest
1839 VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
1840 version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
1841
1842
1843 DDED src/markdown.md
--- a/src/markdown.md
+++ b/src/markdown.md
@@ -0,0 +1,224 @@
1
+# Markdown formatting rules
2
+
3
+In addition to its native Wiki formatting syntax, Fossil supports Mark down syntax as specified by
4
+[John Gruber's original Markdown implementation](http://daringfireba
5
+[syntax description](http://daringfireball.net/projects/markdown/syntax), of which the page you
6
+are reading is an extract.
7
+
8
+This page itself uses Markdown formatting.
9
+
10
+## Summary
11
+
12
+ - Block elements
13
+
14
+ * A **paragraph** is a group of consecutive lines. Paragraphs are separated by blank lines.
15
+
16
+ * A **Header** is a line of text underlined with equal signs or hyphens, or prefixed by a
17
+ in s, or prefixed by a
18
+ number of hash marks.
19
+
20
+ * **Block quotes** are blocks of text prefixed by '>'.
21
+
22
+ * **Ordered list** items are prefixed by a number and a period. **Unordered list** items
23
+ are prefixed by a hyphen, asterisk or plus sign. Pre
24
+
25
+ * **Code blocks** are formed by lines of text (possibly including empty lines) prefixed by
26
+ at least 4 spaces or a tab.
27
+
28
+ * A **horizontal rule** is a line consisting of 3 or more asterisks, hyphens or underscores,
29
+ with optional whitespace between them.
30
+
31
+ - Span elements
32
+
33
+ * 3 types of **links** exist:
34
+
35
+ - **automatic links** are URLs or email addresses enclosed in angle brackets
36
+ ('<' and '>'), and are displayed as such.
37
+
38
+ - **inline links** consist of the displayed link text in squ
39
+ followed by the
40
+
41
+ - **reference links** separate _link instance_ from _link definition_. A link instance efinition_. A link instance
42
+ consists of the displayed link text
43
+ in square brackets. in square brackets.
44
+ The corresponding link definition can occur anywhere on the page, and consists
45
+ of the link definition name in s a colon, whitespace and the
46
+ link target.
47
+
48
+ * **Emphasis** can be given by wrapping text in one or two asterisks or underscores - use
49
+ one for HTML `<em>`, and two for `<strong>` emphasis.
50
+
51
+ * A **code span** is text wrapped in backticks ('`').
52
+
53
+ * **Images** use a syntax much like inline or reference links, # Markdown formatting rules
54
+
55
+In addition to its native Wiki formatting syntax, Fossil supports Markdown syntax as specified by
56
+[John Gruber's original Markdown implementation](http://daringfireball.net/projects/markdown/).
57
+For lots of examples - not repeated here - please refer to its
58
+[syntax description](http://daringfireball.net/projects/markdown/syntax), of which the page you
59
+are reading is an extract.
60
+
61
+This page itself uses Markdown formatting.
62
+
63
+## Summary
64
+
65
+ - Block elements
66
+
67
+ * A **paragraph** is a group of consecutive lines. Paragraphs are separated by blank lines.
68
+
69
+ * A **Header** is a line of text underlined with equal signs or hyphens, or prefixed by a
70
+ number of hash marks.
71
+
72
+ * **Block quotes** are blocks of text prefixed by '>'.
73
+
74
+ * **Ordered list** items are prefixed by a number and a period. **Unordered list** items
75
+ are prefixed by a hyphen, asterisk or plus sign. Prefix and item text are separated by
76
+ whitespace.
77
+
78
+ * **Code blocks** are formed by lines of text (possibly including empty lines) prefixed by
79
+ at least 4 spaces or a tab.
80
+
81
+ * A **horizontal rule** is a line consisting of 3 or more asterisks, hyphens or underscores,
82
+ with optional whitespace between them.
83
+
84
+ - Span elements
85
+
86
+ * 3 types of **links** exist:
87
+
88
+ - **automatic links** are URLs or email addresses enclosed in angle brackets
89
+ a * **Emphasis** can be given by wrapping text in one or two asterisks or underscores - use
90
+ one for HTML `<em>`, and two for `<strong>` emphasis.
91
+
92
+ * A **code span** is text wrapped in backticks ('`').
93
+
94
+ * **Images** use a syntax much like inline or reference links, but with alt attribute text
95
+ ('img alt=...') instead of link text, and the first pair of square
96
+ brackets m prefix; the items will be
97
+renumbered during rendering. However, future implementations may
98
+for the first item in a list indicates an offset to be used for subsequent items.
99
+
100
+For list items spanning multiple lines, subsequent lines can be indented using an arbitrary amount
101
+of whitespace.
102
+
103
+List items will be wrapped in HTML `<p>` tags if they are separated by blank lines.
104
+
105
+A list item may span multiple paragraphs. At least the first line
106
+be indented using at least 4 spaces or a tab character.
107
+
108
+Block quotes within list items must have their '>' delimiters indented using 4 up to 7 spaces.
109
+
110
+Code blocks within list items need to be indented _twice_, that is, using 8 spaces or 2 tab
111
+characters.
112
+
113
+### Code blocks
114
+
115
+Lines within a code block are rendered verbatim using HTML `<pre>` and `<code>` tags, except that
116
+HTML punctuation characters like '<' and '&' are automatically converted to HTML entities. Thus,
117
+there is no need to explicitly escape HTML syntax within a code block.
118
+
119
+A code block runs until the first non blank line with indent less than 4 spaces or 1 tab character.
120
+
121
+
122
+Regular Markdown syntax is not processed within code blocks.
123
+
124
+### Links
125
+
126
+#### Automatic links
127
+
128
+When rendering automatic links to email addresses, HTML enco
129
+prevent some spambots from harvesting.
130
+
131
+#### Inline links
132
+
133
+Links to resources on the same server can use relative paths (i.e. can start with a '/').
134
+
135
+An optional title for the link (e.g. to have mouseover text in the b rowser) may be given behind
136
+the link target but within the parentheses, in single and double quo
137
+link target by whitespace.
138
+link target by whitespace.
139
+
140
+# reference link consists of
141
+>
142
+> - one or more _link instances_ at appropriate locations in the page text
143
+> - a single _link definition_ at an arbit
144
+> During rendering, each link instance is resolved, and the corresponding definition is
145
+> filled in. No separate link definition clauses occu r in the rendered output.
146
+>
147
+> There are 3 fields involved in link instances and definitions:
148
+>
149
+> - link text (i.e. the text that is displayed at the resulting link)
150
+> - link definition name (i.e. an unique ID binding link instances to link definition)
151
+> - link target (a target URL for the link)
152
+
153
+Multiple link instances may reference the same link definition using its link definition
154
+name.
155
+
156
+Link definition names are case insensitive, and may contain letters, numbers, spaces and
157
+punctuation.
158
+
159
+##### Link instance
160
+
161
+A space may be inserted between the bracket pairs for link text and link definition name.
162
+
163
+A link instance can use an _implicit link definition name_ shortcut, in which case the link
164
+text is used as the link definition name. The second set of brackets then remains empty, e.g.
165
+'[Google][]' ('Google' being used as both link text and link definition name).
166
+
167
+##### Link definition
168
+
169
+The first bracket pair containing the link definition name may be indented using up to 3 spaces.
170
+
171
+The link target may optionally be surrounded by angle brackets ('<' and '>').
172
+
173
+A link target may be followed by an optional title (e.g. to have mouseover text in the browser).
174
+This title may be enclosed in parentheses, single or double quotes.
175
+
176
+Link definitions may be split into 2 lines, with the title on the second line, arbitrarily
177
+indented. This may be more visually pleasing when using long link targets.
178
+
179
+### Emphasis
180
+
181
+The same character(s) used for starting the emphasis must be used to end it; don't mix
182
+asterisks and underscores.
183
+
184
+Emphasis can be used in the middle of a word. That is, there need not be whitespace on either
185
+side of emphasis start or end punctuation characters.
186
+
187
+### Code spans
188
+
189
+To include a literal backtick character in a code span, use multiple backticks as opening and
190
+closing delimiters.
191
+
192
+Whitespace may exist immediately after the opening delimiter and b Markdown formatting rules
193
+
194
+In addition to its native Wiki formatting syntax, Fossil supports Markdown syntax as specified by
195
+[John Gruber's original Markdown implementation](http://daringfireball.net/projects/markdown/).
196
+For lots of examples - not repeated here - please refer to its
197
+[syntax description](http://daringfireball.net/projects/markdownr
198
+a HTML block level construct (`<div>`, `<table>` etc) must be separated from surrounding
199
+context using blank lines, and must both occur at the start of a line.
200
+
201
+No extra unwanted `<p>` HTML tags are added around HTML block level tags.
202
+
203
+Markdown formatting within HTML block level tags is not processed; however, formatting within
204
+span level tags (e.g. `<mark>`) is processed normally.
205
+
206
+### Escaping Markdown punctuation
207
+
208
+The following punctuation characters can be escaped using backslash:
209
+
210
+ - \\ backslash
211
+ - ` backtick
212
+ - * asterisk
213
+ - _ underscore
214
+ - {} curly braces
215
+ - [] square brackets
216
+ - () parentheses
217
+ - # hash mark
218
+ - + plus sign
219
+ - - minus sign (hyphen)
220
+ - . dot
221
+ - ! exclamation mark
222
+
223
+To render a literal backslash, use 2 backslashes ('\\\\').
224
+
--- a/src/markdown.md
+++ b/src/markdown.md
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/markdown.md
+++ b/src/markdown.md
@@ -0,0 +1,224 @@
1 # Markdown formatting rules
2
3 In addition to its native Wiki formatting syntax, Fossil supports Mark down syntax as specified by
4 [John Gruber's original Markdown implementation](http://daringfireba
5 [syntax description](http://daringfireball.net/projects/markdown/syntax), of which the page you
6 are reading is an extract.
7
8 This page itself uses Markdown formatting.
9
10 ## Summary
11
12 - Block elements
13
14 * A **paragraph** is a group of consecutive lines. Paragraphs are separated by blank lines.
15
16 * A **Header** is a line of text underlined with equal signs or hyphens, or prefixed by a
17 in s, or prefixed by a
18 number of hash marks.
19
20 * **Block quotes** are blocks of text prefixed by '>'.
21
22 * **Ordered list** items are prefixed by a number and a period. **Unordered list** items
23 are prefixed by a hyphen, asterisk or plus sign. Pre
24
25 * **Code blocks** are formed by lines of text (possibly including empty lines) prefixed by
26 at least 4 spaces or a tab.
27
28 * A **horizontal rule** is a line consisting of 3 or more asterisks, hyphens or underscores,
29 with optional whitespace between them.
30
31 - Span elements
32
33 * 3 types of **links** exist:
34
35 - **automatic links** are URLs or email addresses enclosed in angle brackets
36 ('<' and '>'), and are displayed as such.
37
38 - **inline links** consist of the displayed link text in squ
39 followed by the
40
41 - **reference links** separate _link instance_ from _link definition_. A link instance efinition_. A link instance
42 consists of the displayed link text
43 in square brackets. in square brackets.
44 The corresponding link definition can occur anywhere on the page, and consists
45 of the link definition name in s a colon, whitespace and the
46 link target.
47
48 * **Emphasis** can be given by wrapping text in one or two asterisks or underscores - use
49 one for HTML `<em>`, and two for `<strong>` emphasis.
50
51 * A **code span** is text wrapped in backticks ('`').
52
53 * **Images** use a syntax much like inline or reference links, # Markdown formatting rules
54
55 In addition to its native Wiki formatting syntax, Fossil supports Markdown syntax as specified by
56 [John Gruber's original Markdown implementation](http://daringfireball.net/projects/markdown/).
57 For lots of examples - not repeated here - please refer to its
58 [syntax description](http://daringfireball.net/projects/markdown/syntax), of which the page you
59 are reading is an extract.
60
61 This page itself uses Markdown formatting.
62
63 ## Summary
64
65 - Block elements
66
67 * A **paragraph** is a group of consecutive lines. Paragraphs are separated by blank lines.
68
69 * A **Header** is a line of text underlined with equal signs or hyphens, or prefixed by a
70 number of hash marks.
71
72 * **Block quotes** are blocks of text prefixed by '>'.
73
74 * **Ordered list** items are prefixed by a number and a period. **Unordered list** items
75 are prefixed by a hyphen, asterisk or plus sign. Prefix and item text are separated by
76 whitespace.
77
78 * **Code blocks** are formed by lines of text (possibly including empty lines) prefixed by
79 at least 4 spaces or a tab.
80
81 * A **horizontal rule** is a line consisting of 3 or more asterisks, hyphens or underscores,
82 with optional whitespace between them.
83
84 - Span elements
85
86 * 3 types of **links** exist:
87
88 - **automatic links** are URLs or email addresses enclosed in angle brackets
89 a * **Emphasis** can be given by wrapping text in one or two asterisks or underscores - use
90 one for HTML `<em>`, and two for `<strong>` emphasis.
91
92 * A **code span** is text wrapped in backticks ('`').
93
94 * **Images** use a syntax much like inline or reference links, but with alt attribute text
95 ('img alt=...') instead of link text, and the first pair of square
96 brackets m prefix; the items will be
97 renumbered during rendering. However, future implementations may
98 for the first item in a list indicates an offset to be used for subsequent items.
99
100 For list items spanning multiple lines, subsequent lines can be indented using an arbitrary amount
101 of whitespace.
102
103 List items will be wrapped in HTML `<p>` tags if they are separated by blank lines.
104
105 A list item may span multiple paragraphs. At least the first line
106 be indented using at least 4 spaces or a tab character.
107
108 Block quotes within list items must have their '>' delimiters indented using 4 up to 7 spaces.
109
110 Code blocks within list items need to be indented _twice_, that is, using 8 spaces or 2 tab
111 characters.
112
113 ### Code blocks
114
115 Lines within a code block are rendered verbatim using HTML `<pre>` and `<code>` tags, except that
116 HTML punctuation characters like '<' and '&' are automatically converted to HTML entities. Thus,
117 there is no need to explicitly escape HTML syntax within a code block.
118
119 A code block runs until the first non blank line with indent less than 4 spaces or 1 tab character.
120
121
122 Regular Markdown syntax is not processed within code blocks.
123
124 ### Links
125
126 #### Automatic links
127
128 When rendering automatic links to email addresses, HTML enco
129 prevent some spambots from harvesting.
130
131 #### Inline links
132
133 Links to resources on the same server can use relative paths (i.e. can start with a '/').
134
135 An optional title for the link (e.g. to have mouseover text in the b rowser) may be given behind
136 the link target but within the parentheses, in single and double quo
137 link target by whitespace.
138 link target by whitespace.
139
140 # reference link consists of
141 >
142 > - one or more _link instances_ at appropriate locations in the page text
143 > - a single _link definition_ at an arbit
144 > During rendering, each link instance is resolved, and the corresponding definition is
145 > filled in. No separate link definition clauses occu r in the rendered output.
146 >
147 > There are 3 fields involved in link instances and definitions:
148 >
149 > - link text (i.e. the text that is displayed at the resulting link)
150 > - link definition name (i.e. an unique ID binding link instances to link definition)
151 > - link target (a target URL for the link)
152
153 Multiple link instances may reference the same link definition using its link definition
154 name.
155
156 Link definition names are case insensitive, and may contain letters, numbers, spaces and
157 punctuation.
158
159 ##### Link instance
160
161 A space may be inserted between the bracket pairs for link text and link definition name.
162
163 A link instance can use an _implicit link definition name_ shortcut, in which case the link
164 text is used as the link definition name. The second set of brackets then remains empty, e.g.
165 '[Google][]' ('Google' being used as both link text and link definition name).
166
167 ##### Link definition
168
169 The first bracket pair containing the link definition name may be indented using up to 3 spaces.
170
171 The link target may optionally be surrounded by angle brackets ('<' and '>').
172
173 A link target may be followed by an optional title (e.g. to have mouseover text in the browser).
174 This title may be enclosed in parentheses, single or double quotes.
175
176 Link definitions may be split into 2 lines, with the title on the second line, arbitrarily
177 indented. This may be more visually pleasing when using long link targets.
178
179 ### Emphasis
180
181 The same character(s) used for starting the emphasis must be used to end it; don't mix
182 asterisks and underscores.
183
184 Emphasis can be used in the middle of a word. That is, there need not be whitespace on either
185 side of emphasis start or end punctuation characters.
186
187 ### Code spans
188
189 To include a literal backtick character in a code span, use multiple backticks as opening and
190 closing delimiters.
191
192 Whitespace may exist immediately after the opening delimiter and b Markdown formatting rules
193
194 In addition to its native Wiki formatting syntax, Fossil supports Markdown syntax as specified by
195 [John Gruber's original Markdown implementation](http://daringfireball.net/projects/markdown/).
196 For lots of examples - not repeated here - please refer to its
197 [syntax description](http://daringfireball.net/projects/markdownr
198 a HTML block level construct (`<div>`, `<table>` etc) must be separated from surrounding
199 context using blank lines, and must both occur at the start of a line.
200
201 No extra unwanted `<p>` HTML tags are added around HTML block level tags.
202
203 Markdown formatting within HTML block level tags is not processed; however, formatting within
204 span level tags (e.g. `<mark>`) is processed normally.
205
206 ### Escaping Markdown punctuation
207
208 The following punctuation characters can be escaped using backslash:
209
210 - \\ backslash
211 - ` backtick
212 - * asterisk
213 - _ underscore
214 - {} curly braces
215 - [] square brackets
216 - () parentheses
217 - # hash mark
218 - + plus sign
219 - - minus sign (hyphen)
220 - . dot
221 - ! exclamation mark
222
223 To render a literal backslash, use 2 backslashes ('\\\\').
224
+11 -12
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -80,15 +80,22 @@
8080
8181
int main(int argc, char **argv){
8282
int i, sz;
8383
int j, n;
8484
Resource *aRes;
85
- int nRes = argc-1;
85
+ int nRes;
8686
unsigned char *pData;
8787
int nErr = 0;
8888
int nSkip;
89
+ int nPrefix = 0;
8990
91
+ if( argc>3 && strcmp(argv[1],"--prefix")==0 ){
92
+ nPrefix = (int)strlen(argv[2]);
93
+ argc -= 2;
94
+ argv += 2;
95
+ }
96
+ nRes = argc - 1;
9097
aRes = malloc( nRes*sizeof(aRes[0]) );
9198
if( aRes==0 ){
9299
fprintf(stderr, "malloc failed\n");
93100
return 1;
94101
}
@@ -141,25 +148,17 @@
141148
printf(" int nByte;\n");
142149
printf("};\n");
143150
printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
144151
for(i=0; i<nRes; i++){
145152
const char *z = aRes[i].zName;
146
- const char *zTail;
147
- int nSlash = 0;
148
- zTail = z;
149
- while( z && z[0] ){
150
- if( z[0]=='/' || z[0]=='\\' ){
151
- nSlash++;
152
- if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1];
153
- }
154
- z++;
155
- }
156
- aRes[i].zName = zTail;
153
+ if( strlen(z)>=nPrefix ) z += nPrefix;
154
+ while( z[0]=='.' || z[0]=='/' ){ z++; }
155
+ aRes[i].zName = z;
157156
}
158157
qsort(aRes, nRes, sizeof(aRes[0]), compareResource);
159158
for(i=0; i<nRes; i++){
160159
printf(" { \"%s\", bidata%d, %d },\n",
161160
aRes[i].zName, aRes[i].idx, aRes[i].nByte);
162161
}
163162
printf("};\n");
164163
return nErr;
165164
}
166165
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -80,15 +80,22 @@
80
81 int main(int argc, char **argv){
82 int i, sz;
83 int j, n;
84 Resource *aRes;
85 int nRes = argc-1;
86 unsigned char *pData;
87 int nErr = 0;
88 int nSkip;
 
89
 
 
 
 
 
 
90 aRes = malloc( nRes*sizeof(aRes[0]) );
91 if( aRes==0 ){
92 fprintf(stderr, "malloc failed\n");
93 return 1;
94 }
@@ -141,25 +148,17 @@
141 printf(" int nByte;\n");
142 printf("};\n");
143 printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
144 for(i=0; i<nRes; i++){
145 const char *z = aRes[i].zName;
146 const char *zTail;
147 int nSlash = 0;
148 zTail = z;
149 while( z && z[0] ){
150 if( z[0]=='/' || z[0]=='\\' ){
151 nSlash++;
152 if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1];
153 }
154 z++;
155 }
156 aRes[i].zName = zTail;
157 }
158 qsort(aRes, nRes, sizeof(aRes[0]), compareResource);
159 for(i=0; i<nRes; i++){
160 printf(" { \"%s\", bidata%d, %d },\n",
161 aRes[i].zName, aRes[i].idx, aRes[i].nByte);
162 }
163 printf("};\n");
164 return nErr;
165 }
166
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -80,15 +80,22 @@
80
81 int main(int argc, char **argv){
82 int i, sz;
83 int j, n;
84 Resource *aRes;
85 int nRes;
86 unsigned char *pData;
87 int nErr = 0;
88 int nSkip;
89 int nPrefix = 0;
90
91 if( argc>3 && strcmp(argv[1],"--prefix")==0 ){
92 nPrefix = (int)strlen(argv[2]);
93 argc -= 2;
94 argv += 2;
95 }
96 nRes = argc - 1;
97 aRes = malloc( nRes*sizeof(aRes[0]) );
98 if( aRes==0 ){
99 fprintf(stderr, "malloc failed\n");
100 return 1;
101 }
@@ -141,25 +148,17 @@
148 printf(" int nByte;\n");
149 printf("};\n");
150 printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
151 for(i=0; i<nRes; i++){
152 const char *z = aRes[i].zName;
153 if( strlen(z)>=nPrefix ) z += nPrefix;
154 while( z[0]=='.' || z[0]=='/' ){ z++; }
155 aRes[i].zName = z;
 
 
 
 
 
 
 
 
156 }
157 qsort(aRes, nRes, sizeof(aRes[0]), compareResource);
158 for(i=0; i<nRes; i++){
159 printf(" { \"%s\", bidata%d, %d },\n",
160 aRes[i].zName, aRes[i].idx, aRes[i].nByte);
161 }
162 printf("};\n");
163 return nErr;
164 }
165
+2 -2
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
1212
** Author contact information:
1313
** [email protected]
1414
** http://www.hwaci.com/drh/
1515
**
1616
*******************************************************************************
17
-**
17
+**
1818
** This file contains string constants that implement the database schema.
1919
*/
2020
#include "config.h"
2121
#include "schema.h"
2222
@@ -81,11 +81,11 @@
8181
@ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
8282
@ content BLOB, -- Compressed content of this record
8383
@ CHECK( length(uuid)==40 AND rid>0 )
8484
@ );
8585
@ CREATE TABLE delta(
86
-@ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
86
+@ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
8787
@ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
8888
@ );
8989
@ CREATE INDEX delta_i1 ON delta(srcid);
9090
@
9191
@ -------------------------------------------------------------------------
9292
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains string constants that implement the database schema.
19 */
20 #include "config.h"
21 #include "schema.h"
22
@@ -81,11 +81,11 @@
81 @ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
82 @ content BLOB, -- Compressed content of this record
83 @ CHECK( length(uuid)==40 AND rid>0 )
84 @ );
85 @ CREATE TABLE delta(
86 @ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
87 @ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
88 @ );
89 @ CREATE INDEX delta_i1 ON delta(srcid);
90 @
91 @ -------------------------------------------------------------------------
92
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains string constants that implement the database schema.
19 */
20 #include "config.h"
21 #include "schema.h"
22
@@ -81,11 +81,11 @@
81 @ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
82 @ content BLOB, -- Compressed content of this record
83 @ CHECK( length(uuid)==40 AND rid>0 )
84 @ );
85 @ CREATE TABLE delta(
86 @ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
87 @ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
88 @ );
89 @ CREATE INDEX delta_i1 ON delta(srcid);
90 @
91 @ -------------------------------------------------------------------------
92
+2 -2
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
1212
** Author contact information:
1313
** [email protected]
1414
** http://www.hwaci.com/drh/
1515
**
1616
*******************************************************************************
17
-**
17
+**
1818
** This file contains string constants that implement the database schema.
1919
*/
2020
#include "config.h"
2121
#include "schema.h"
2222
@@ -81,11 +81,11 @@
8181
@ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
8282
@ content BLOB, -- Compressed content of this record
8383
@ CHECK( length(uuid)==40 AND rid>0 )
8484
@ );
8585
@ CREATE TABLE delta(
86
-@ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
86
+@ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
8787
@ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
8888
@ );
8989
@ CREATE INDEX delta_i1 ON delta(srcid);
9090
@
9191
@ -------------------------------------------------------------------------
9292
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains string constants that implement the database schema.
19 */
20 #include "config.h"
21 #include "schema.h"
22
@@ -81,11 +81,11 @@
81 @ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
82 @ content BLOB, -- Compressed content of this record
83 @ CHECK( length(uuid)==40 AND rid>0 )
84 @ );
85 @ CREATE TABLE delta(
86 @ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
87 @ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
88 @ );
89 @ CREATE INDEX delta_i1 ON delta(srcid);
90 @
91 @ -------------------------------------------------------------------------
92
--- src/schema.c
+++ src/schema.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains string constants that implement the database schema.
19 */
20 #include "config.h"
21 #include "schema.h"
22
@@ -81,11 +81,11 @@
81 @ uuid TEXT UNIQUE NOT NULL, -- SHA1 hash of the content
82 @ content BLOB, -- Compressed content of this record
83 @ CHECK( length(uuid)==40 AND rid>0 )
84 @ );
85 @ CREATE TABLE delta(
86 @ rid INTEGER PRIMARY KEY, -- BLOB that is delta-compressed
87 @ srcid INTEGER NOT NULL REFERENCES blob -- Baseline for delta-compression
88 @ );
89 @ CREATE INDEX delta_i1 ON delta(srcid);
90 @
91 @ -------------------------------------------------------------------------
92
+1 -1
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -108,11 +108,11 @@
108108
sqlite3_result_error(context, "input is not zlib compressed", -1);
109109
}
110110
}
111111
112112
/*
113
-** Add the content(), compress(), and decompress() SQL functions to
113
+** Add the content(), compress(), and decompress() SQL functions to
114114
** database connection db.
115115
*/
116116
int add_content_sql_commands(sqlite3 *db){
117117
sqlite3_create_function(db, "content", 1, SQLITE_UTF8, 0,
118118
sqlcmd_content, 0, 0);
119119
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -108,11 +108,11 @@
108 sqlite3_result_error(context, "input is not zlib compressed", -1);
109 }
110 }
111
112 /*
113 ** Add the content(), compress(), and decompress() SQL functions to
114 ** database connection db.
115 */
116 int add_content_sql_commands(sqlite3 *db){
117 sqlite3_create_function(db, "content", 1, SQLITE_UTF8, 0,
118 sqlcmd_content, 0, 0);
119
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -108,11 +108,11 @@
108 sqlite3_result_error(context, "input is not zlib compressed", -1);
109 }
110 }
111
112 /*
113 ** Add the content(), compress(), and decompress() SQL functions to
114 ** database connection db.
115 */
116 int add_content_sql_commands(sqlite3 *db){
117 sqlite3_create_function(db, "content", 1, SQLITE_UTF8, 0,
118 sqlcmd_content, 0, 0);
119
+1 -1
--- src/style.c
+++ src/style.c
@@ -354,11 +354,11 @@
354354
355355
#if INTERFACE
356356
/* Allowed parameters for style_adunit() */
357357
#define ADUNIT_OFF 0x0001 /* Do not allow ads on this page */
358358
#define ADUNIT_RIGHT_OK 0x0002 /* Right-side vertical ads ok here */
359
-#endif
359
+#endif
360360
361361
/*
362362
** Various page implementations can invoke this interface to let the
363363
** style manager know what kinds of ads are appropriate for this page.
364364
*/
365365
--- src/style.c
+++ src/style.c
@@ -354,11 +354,11 @@
354
355 #if INTERFACE
356 /* Allowed parameters for style_adunit() */
357 #define ADUNIT_OFF 0x0001 /* Do not allow ads on this page */
358 #define ADUNIT_RIGHT_OK 0x0002 /* Right-side vertical ads ok here */
359 #endif
360
361 /*
362 ** Various page implementations can invoke this interface to let the
363 ** style manager know what kinds of ads are appropriate for this page.
364 */
365
--- src/style.c
+++ src/style.c
@@ -354,11 +354,11 @@
354
355 #if INTERFACE
356 /* Allowed parameters for style_adunit() */
357 #define ADUNIT_OFF 0x0001 /* Do not allow ads on this page */
358 #define ADUNIT_RIGHT_OK 0x0002 /* Right-side vertical ads ok here */
359 #endif
360
361 /*
362 ** Various page implementations can invoke this interface to let the
363 ** style manager know what kinds of ads are appropriate for this page.
364 */
365
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -269,11 +269,11 @@
269269
}
270270
g.markPrivate = content_is_private(rid);
271271
zValue = g.argc==5 ? g.argv[4] : 0;
272272
db_begin_transaction();
273273
tag_insert(zTag, tagtype, zValue, -1, 0.0, rid);
274
- db_end_transaction(0);
274
+ db_end_transaction(0);
275275
}
276276
277277
/*
278278
** Add a control record to the repository that either creates
279279
** or cancels a tag.
280280
--- src/tag.c
+++ src/tag.c
@@ -269,11 +269,11 @@
269 }
270 g.markPrivate = content_is_private(rid);
271 zValue = g.argc==5 ? g.argv[4] : 0;
272 db_begin_transaction();
273 tag_insert(zTag, tagtype, zValue, -1, 0.0, rid);
274 db_end_transaction(0);
275 }
276
277 /*
278 ** Add a control record to the repository that either creates
279 ** or cancels a tag.
280
--- src/tag.c
+++ src/tag.c
@@ -269,11 +269,11 @@
269 }
270 g.markPrivate = content_is_private(rid);
271 zValue = g.argc==5 ? g.argv[4] : 0;
272 db_begin_transaction();
273 tag_insert(zTag, tagtype, zValue, -1, 0.0, rid);
274 db_end_transaction(0);
275 }
276
277 /*
278 ** Add a control record to the repository that either creates
279 ** or cancels a tag.
280
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1556,11 +1556,11 @@
15561556
}
15571557
}
15581558
if( P("showsql") ){
15591559
@ <blockquote>%h(blob_sql_text(&sql))</blockquote>
15601560
}
1561
- if( P("showrid") ) tmFlags |= TIMELINE_SHOWRID;
1561
+ if( P("showid") ) tmFlags |= TIMELINE_SHOWRID;
15621562
blob_zero(&sql);
15631563
db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
15641564
@ <h2>%b(&desc)</h2>
15651565
blob_reset(&desc);
15661566
www_print_timeline(&q, tmFlags, zThisUser, zThisTag, 0);
15671567
--- src/timeline.c
+++ src/timeline.c
@@ -1556,11 +1556,11 @@
1556 }
1557 }
1558 if( P("showsql") ){
1559 @ <blockquote>%h(blob_sql_text(&sql))</blockquote>
1560 }
1561 if( P("showrid") ) tmFlags |= TIMELINE_SHOWRID;
1562 blob_zero(&sql);
1563 db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
1564 @ <h2>%b(&desc)</h2>
1565 blob_reset(&desc);
1566 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, 0);
1567
--- src/timeline.c
+++ src/timeline.c
@@ -1556,11 +1556,11 @@
1556 }
1557 }
1558 if( P("showsql") ){
1559 @ <blockquote>%h(blob_sql_text(&sql))</blockquote>
1560 }
1561 if( P("showid") ) tmFlags |= TIMELINE_SHOWRID;
1562 blob_zero(&sql);
1563 db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
1564 @ <h2>%b(&desc)</h2>
1565 blob_reset(&desc);
1566 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, 0);
1567
+22 -1
--- src/wiki.c
+++ src/wiki.c
@@ -155,10 +155,30 @@
155155
@ <pre>
156156
@ %h(blob_str(pWiki))
157157
@ </pre>
158158
}
159159
}
160
+
161
+/*
162
+** WEBPAGE: md_rules
163
+**
164
+** Show a summary of the Markdown wiki formatting rules.
165
+*/
166
+void markdown_rules_page(void){
167
+ Blob x;
168
+ int fTxt = P("txt")!=0;
169
+ style_header("Markdown Formatting Rules");
170
+ if( fTxt ){
171
+ style_submenu_element("Formatted", "Formatted", "%R/md_rules");
172
+ }else{
173
+ style_submenu_element("Plain-Text", "Plain-Text", "%R/md_rules?txt=1");
174
+ }
175
+ blob_init(&x, builtin_text("markdown.md"), -1);
176
+ wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
177
+ blob_reset(&x);
178
+ style_footer();
179
+}
160180
161181
/*
162182
** Returns non-zero if moderation is required for wiki changes and wiki
163183
** attachments.
164184
*/
@@ -213,11 +233,12 @@
213233
@ <li> %z(href("%R/wiki?name=%t",zHomePageName))
214234
@ %h(zHomePageName)</a> project home page.</li>
215235
}
216236
}
217237
@ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
218
- @ <li> %z(href("%R/wiki_rules"))Formatting rules</a> for wiki.</li>
238
+ @ <li> Formatting rules for %z(href("%R/wiki_rules"))Fossil Wiki</a> and for
239
+ @ %z(href("%R/md_rules"))Markdown Wiki</a>.</li>
219240
@ <li> Use the %z(href("%R/wiki?name=Sandbox"))Sandbox</a>
220241
@ to experiment.</li>
221242
if( g.perm.NewWiki ){
222243
@ <li> Create a %z(href("%R/wikinew"))new wiki page</a>.</li>
223244
if( g.perm.Write ){
224245
--- src/wiki.c
+++ src/wiki.c
@@ -155,10 +155,30 @@
155 @ <pre>
156 @ %h(blob_str(pWiki))
157 @ </pre>
158 }
159 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
161 /*
162 ** Returns non-zero if moderation is required for wiki changes and wiki
163 ** attachments.
164 */
@@ -213,11 +233,12 @@
213 @ <li> %z(href("%R/wiki?name=%t",zHomePageName))
214 @ %h(zHomePageName)</a> project home page.</li>
215 }
216 }
217 @ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
218 @ <li> %z(href("%R/wiki_rules"))Formatting rules</a> for wiki.</li>
 
219 @ <li> Use the %z(href("%R/wiki?name=Sandbox"))Sandbox</a>
220 @ to experiment.</li>
221 if( g.perm.NewWiki ){
222 @ <li> Create a %z(href("%R/wikinew"))new wiki page</a>.</li>
223 if( g.perm.Write ){
224
--- src/wiki.c
+++ src/wiki.c
@@ -155,10 +155,30 @@
155 @ <pre>
156 @ %h(blob_str(pWiki))
157 @ </pre>
158 }
159 }
160
161 /*
162 ** WEBPAGE: md_rules
163 **
164 ** Show a summary of the Markdown wiki formatting rules.
165 */
166 void markdown_rules_page(void){
167 Blob x;
168 int fTxt = P("txt")!=0;
169 style_header("Markdown Formatting Rules");
170 if( fTxt ){
171 style_submenu_element("Formatted", "Formatted", "%R/md_rules");
172 }else{
173 style_submenu_element("Plain-Text", "Plain-Text", "%R/md_rules?txt=1");
174 }
175 blob_init(&x, builtin_text("markdown.md"), -1);
176 wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
177 blob_reset(&x);
178 style_footer();
179 }
180
181 /*
182 ** Returns non-zero if moderation is required for wiki changes and wiki
183 ** attachments.
184 */
@@ -213,11 +233,12 @@
233 @ <li> %z(href("%R/wiki?name=%t",zHomePageName))
234 @ %h(zHomePageName)</a> project home page.</li>
235 }
236 }
237 @ <li> %z(href("%R/timeline?y=w"))Recent changes</a> to wiki pages.</li>
238 @ <li> Formatting rules for %z(href("%R/wiki_rules"))Fossil Wiki</a> and for
239 @ %z(href("%R/md_rules"))Markdown Wiki</a>.</li>
240 @ <li> Use the %z(href("%R/wiki?name=Sandbox"))Sandbox</a>
241 @ to experiment.</li>
242 if( g.perm.NewWiki ){
243 @ <li> Create a %z(href("%R/wikinew"))new wiki page</a>.</li>
244 if( g.perm.Write ){
245
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -141,11 +141,11 @@
141141
# generate the index source, containing all web references,..
142142
page_index.h: $(TRANSLATEDSRC) mkindex.exe
143143
mkindex.exe $(TRANSLATEDSRC) >$@
144144
145145
builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
146
- mkbuiltin.exe $(EXTRA_FILES) >$@
146
+ mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
147147
148148
# extracting version info from manifest
149149
VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
150150
version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
151151
152152
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -141,11 +141,11 @@
141 # generate the index source, containing all web references,..
142 page_index.h: $(TRANSLATEDSRC) mkindex.exe
143 mkindex.exe $(TRANSLATEDSRC) >$@
144
145 builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
146 mkbuiltin.exe $(EXTRA_FILES) >$@
147
148 # extracting version info from manifest
149 VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
150 version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
151
152
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -141,11 +141,11 @@
141 # generate the index source, containing all web references,..
142 page_index.h: $(TRANSLATEDSRC) mkindex.exe
143 mkindex.exe $(TRANSLATEDSRC) >$@
144
145 builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe
146 mkbuiltin.exe --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
147
148 # extracting version info from manifest
149 VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION
150 version.exe ..\manifest.uuid ..\manifest ..\VERSION >$@
151
152
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -96,11 +96,11 @@
9696
9797
page_index.h: mkindex$E $(SRC)
9898
+$** > $@
9999
100100
builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
101
- +$** > $@
101
+ mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
102102
103103
clean:
104104
-del $(OBJDIR)\*.obj
105105
-del *.obj *_.c *.h *.map
106106
107107
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -96,11 +96,11 @@
96
97 page_index.h: mkindex$E $(SRC)
98 +$** > $@
99
100 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
101 +$** > $@
102
103 clean:
104 -del $(OBJDIR)\*.obj
105 -del *.obj *_.c *.h *.map
106
107
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -96,11 +96,11 @@
96
97 page_index.h: mkindex$E $(SRC)
98 +$** > $@
99
100 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
101 mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
102
103 clean:
104 -del $(OBJDIR)\*.obj
105 -del *.obj *_.c *.h *.map
106
107
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -508,11 +508,12 @@
508508
$(SRCDIR)/../skins/plain_gray/footer.txt \
509509
$(SRCDIR)/../skins/plain_gray/header.txt \
510510
$(SRCDIR)/../skins/rounded1/css.txt \
511511
$(SRCDIR)/../skins/rounded1/footer.txt \
512512
$(SRCDIR)/../skins/rounded1/header.txt \
513
- $(SRCDIR)/diff.tcl
513
+ $(SRCDIR)/diff.tcl \
514
+ $(SRCDIR)/markdown.md
514515
515516
TRANS_SRC = \
516517
$(OBJDIR)/add_.c \
517518
$(OBJDIR)/allrepo_.c \
518519
$(OBJDIR)/attach_.c \
@@ -939,11 +940,11 @@
939940
940941
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
941942
$(MKINDEX) $(TRANS_SRC) >$@
942943
943944
$(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
944
- $(MKBUILTIN) $(EXTRA_FILES) >$@
945
+ $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
945946
946947
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
947948
$(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
948949
$(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
949950
$(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
950951
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -508,11 +508,12 @@
508 $(SRCDIR)/../skins/plain_gray/footer.txt \
509 $(SRCDIR)/../skins/plain_gray/header.txt \
510 $(SRCDIR)/../skins/rounded1/css.txt \
511 $(SRCDIR)/../skins/rounded1/footer.txt \
512 $(SRCDIR)/../skins/rounded1/header.txt \
513 $(SRCDIR)/diff.tcl
 
514
515 TRANS_SRC = \
516 $(OBJDIR)/add_.c \
517 $(OBJDIR)/allrepo_.c \
518 $(OBJDIR)/attach_.c \
@@ -939,11 +940,11 @@
939
940 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
941 $(MKINDEX) $(TRANS_SRC) >$@
942
943 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
944 $(MKBUILTIN) $(EXTRA_FILES) >$@
945
946 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
947 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
948 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
949 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
950
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -508,11 +508,12 @@
508 $(SRCDIR)/../skins/plain_gray/footer.txt \
509 $(SRCDIR)/../skins/plain_gray/header.txt \
510 $(SRCDIR)/../skins/rounded1/css.txt \
511 $(SRCDIR)/../skins/rounded1/footer.txt \
512 $(SRCDIR)/../skins/rounded1/header.txt \
513 $(SRCDIR)/diff.tcl \
514 $(SRCDIR)/markdown.md
515
516 TRANS_SRC = \
517 $(OBJDIR)/add_.c \
518 $(OBJDIR)/allrepo_.c \
519 $(OBJDIR)/attach_.c \
@@ -939,11 +940,11 @@
940
941 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
942 $(MKINDEX) $(TRANS_SRC) >$@
943
944 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
945 $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
946
947 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
948 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
949 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
950 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
951
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -496,20 +496,24 @@
496496
$(SRCDIR)/../skins/eagle/footer.txt \
497497
$(SRCDIR)/../skins/eagle/header.txt \
498498
$(SRCDIR)/../skins/enhanced1/css.txt \
499499
$(SRCDIR)/../skins/enhanced1/footer.txt \
500500
$(SRCDIR)/../skins/enhanced1/header.txt \
501
+ $(SRCDIR)/../skins/etienne1/css.txt \
502
+ $(SRCDIR)/../skins/etienne1/footer.txt \
503
+ $(SRCDIR)/../skins/etienne1/header.txt \
501504
$(SRCDIR)/../skins/khaki/css.txt \
502505
$(SRCDIR)/../skins/khaki/footer.txt \
503506
$(SRCDIR)/../skins/khaki/header.txt \
504507
$(SRCDIR)/../skins/plain_gray/css.txt \
505508
$(SRCDIR)/../skins/plain_gray/footer.txt \
506509
$(SRCDIR)/../skins/plain_gray/header.txt \
507510
$(SRCDIR)/../skins/rounded1/css.txt \
508511
$(SRCDIR)/../skins/rounded1/footer.txt \
509512
$(SRCDIR)/../skins/rounded1/header.txt \
510
- $(SRCDIR)/diff.tcl
513
+ $(SRCDIR)/diff.tcl \
514
+ $(SRCDIR)/markdown.md
511515
512516
TRANS_SRC = \
513517
$(OBJDIR)/add_.c \
514518
$(OBJDIR)/allrepo_.c \
515519
$(OBJDIR)/attach_.c \
@@ -936,11 +940,11 @@
936940
937941
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
938942
$(MKINDEX) $(TRANS_SRC) >$@
939943
940944
$(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
941
- $(MKBUILTIN) $(EXTRA_FILES) >$@
945
+ $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
942946
943947
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
944948
$(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
945949
$(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
946950
$(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
947951
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -496,20 +496,24 @@
496 $(SRCDIR)/../skins/eagle/footer.txt \
497 $(SRCDIR)/../skins/eagle/header.txt \
498 $(SRCDIR)/../skins/enhanced1/css.txt \
499 $(SRCDIR)/../skins/enhanced1/footer.txt \
500 $(SRCDIR)/../skins/enhanced1/header.txt \
 
 
 
501 $(SRCDIR)/../skins/khaki/css.txt \
502 $(SRCDIR)/../skins/khaki/footer.txt \
503 $(SRCDIR)/../skins/khaki/header.txt \
504 $(SRCDIR)/../skins/plain_gray/css.txt \
505 $(SRCDIR)/../skins/plain_gray/footer.txt \
506 $(SRCDIR)/../skins/plain_gray/header.txt \
507 $(SRCDIR)/../skins/rounded1/css.txt \
508 $(SRCDIR)/../skins/rounded1/footer.txt \
509 $(SRCDIR)/../skins/rounded1/header.txt \
510 $(SRCDIR)/diff.tcl
 
511
512 TRANS_SRC = \
513 $(OBJDIR)/add_.c \
514 $(OBJDIR)/allrepo_.c \
515 $(OBJDIR)/attach_.c \
@@ -936,11 +940,11 @@
936
937 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
938 $(MKINDEX) $(TRANS_SRC) >$@
939
940 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
941 $(MKBUILTIN) $(EXTRA_FILES) >$@
942
943 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
944 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
945 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
946 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
947
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -496,20 +496,24 @@
496 $(SRCDIR)/../skins/eagle/footer.txt \
497 $(SRCDIR)/../skins/eagle/header.txt \
498 $(SRCDIR)/../skins/enhanced1/css.txt \
499 $(SRCDIR)/../skins/enhanced1/footer.txt \
500 $(SRCDIR)/../skins/enhanced1/header.txt \
501 $(SRCDIR)/../skins/etienne1/css.txt \
502 $(SRCDIR)/../skins/etienne1/footer.txt \
503 $(SRCDIR)/../skins/etienne1/header.txt \
504 $(SRCDIR)/../skins/khaki/css.txt \
505 $(SRCDIR)/../skins/khaki/footer.txt \
506 $(SRCDIR)/../skins/khaki/header.txt \
507 $(SRCDIR)/../skins/plain_gray/css.txt \
508 $(SRCDIR)/../skins/plain_gray/footer.txt \
509 $(SRCDIR)/../skins/plain_gray/header.txt \
510 $(SRCDIR)/../skins/rounded1/css.txt \
511 $(SRCDIR)/../skins/rounded1/footer.txt \
512 $(SRCDIR)/../skins/rounded1/header.txt \
513 $(SRCDIR)/diff.tcl \
514 $(SRCDIR)/markdown.md
515
516 TRANS_SRC = \
517 $(OBJDIR)/add_.c \
518 $(OBJDIR)/allrepo_.c \
519 $(OBJDIR)/attach_.c \
@@ -936,11 +940,11 @@
940
941 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX)
942 $(MKINDEX) $(TRANS_SRC) >$@
943
944 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
945 $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
946
947 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
948 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
949 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
950 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
951
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -346,11 +346,12 @@
346346
$(SRCDIR)\../skins/plain_gray/footer.txt \
347347
$(SRCDIR)\../skins/plain_gray/header.txt \
348348
$(SRCDIR)\../skins/rounded1/css.txt \
349349
$(SRCDIR)\../skins/rounded1/footer.txt \
350350
$(SRCDIR)\../skins/rounded1/header.txt \
351
- $(SRCDIR)\diff.tcl
351
+ $(SRCDIR)\diff.tcl \
352
+ $(SRCDIR)\markdown.md
352353
353354
OBJ = $(OX)\add$O \
354355
$(OX)\allrepo$O \
355356
$(OX)\attach$O \
356357
$(OX)\bag$O \
@@ -698,11 +699,11 @@
698699
699700
page_index.h: mkindex$E $(SRC)
700701
$** > $@
701702
702703
builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
703
- $** > $@
704
+ mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
704705
705706
clean:
706707
-del $(OX)\*.obj
707708
-del *.obj
708709
-del *_.c
709710
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -346,11 +346,12 @@
346 $(SRCDIR)\../skins/plain_gray/footer.txt \
347 $(SRCDIR)\../skins/plain_gray/header.txt \
348 $(SRCDIR)\../skins/rounded1/css.txt \
349 $(SRCDIR)\../skins/rounded1/footer.txt \
350 $(SRCDIR)\../skins/rounded1/header.txt \
351 $(SRCDIR)\diff.tcl
 
352
353 OBJ = $(OX)\add$O \
354 $(OX)\allrepo$O \
355 $(OX)\attach$O \
356 $(OX)\bag$O \
@@ -698,11 +699,11 @@
698
699 page_index.h: mkindex$E $(SRC)
700 $** > $@
701
702 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
703 $** > $@
704
705 clean:
706 -del $(OX)\*.obj
707 -del *.obj
708 -del *_.c
709
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -346,11 +346,12 @@
346 $(SRCDIR)\../skins/plain_gray/footer.txt \
347 $(SRCDIR)\../skins/plain_gray/header.txt \
348 $(SRCDIR)\../skins/rounded1/css.txt \
349 $(SRCDIR)\../skins/rounded1/footer.txt \
350 $(SRCDIR)\../skins/rounded1/header.txt \
351 $(SRCDIR)\diff.tcl \
352 $(SRCDIR)\markdown.md
353
354 OBJ = $(OX)\add$O \
355 $(OX)\allrepo$O \
356 $(OX)\attach$O \
357 $(OX)\bag$O \
@@ -698,11 +699,11 @@
699
700 page_index.h: mkindex$E $(SRC)
701 $** > $@
702
703 builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
704 mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
705
706 clean:
707 -del $(OX)\*.obj
708 -del *.obj
709 -del *_.c
710

Keyboard Shortcuts

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