Fossil SCM

moved /json/timeline|wiki commands/pages into their own files.

stephan 2011-09-27 01:18 UTC json
Commit 821830d2fbc11339412cb292db0c5c339f8ec250
+15 -757
--- src/json.c
+++ src/json.c
@@ -39,10 +39,21 @@
3939
4040
#if INTERFACE
4141
#include "json_detail.h" /* workaround for apparent enum limitation in makeheaders */
4242
#endif
4343
44
+const FossilJsonKeys_ FossilJsonKeys = {
45
+ "anonymousSeed" /*anonymousSeed*/,
46
+ "authToken" /*authToken*/,
47
+ "COMMAND_PATH" /*commandPath*/,
48
+ "payload" /* payload */,
49
+ "requestId" /*requestId*/,
50
+ "resultCode" /*resultCode*/,
51
+ "resultText" /*resultText*/,
52
+ "timestamp" /*timestamp*/
53
+};
54
+
4455
/*
4556
** Internal helpers to manipulate a byte array as a bitset. The B
4657
** argument must be-a array at least (BIT/8+1) bytes long.
4758
** The BIT argument is the bit number to query/set/clear/toggle.
4859
*/
@@ -280,11 +291,11 @@
280291
**
281292
** If it finds a value and that value is-a JSON number or is a string
282293
** which looks like an integer or is-a JSON bool then it is converted
283294
** to an int. If none of those apply then dflt is returned.
284295
*/
285
-static int json_getenv_int(char const * pKey, int dflt ){
296
+int json_getenv_int(char const * pKey, int dflt ){
286297
cson_value const * v = json_getenv(pKey);
287298
if(!v){
288299
return dflt;
289300
}else if( cson_value_is_number(v) ){
290301
return (int)cson_value_get_integer(v);
@@ -306,11 +317,11 @@
306317
** value is-a String. Non-strings are not converted to strings for
307318
** this purpose. Returned memory is owned by g.json or fossil and is
308319
** valid until end-of-app or the given key is replaced in fossil's
309320
** internals via cgi_replace_parameter() and friends or json_setenv().
310321
*/
311
-static char const * json_getenv_cstr( char const * zKey ){
322
+char const * json_getenv_cstr( char const * zKey ){
312323
return cson_value_get_cstr( json_getenv(zKey) );
313324
}
314325
315326
316327
/*
@@ -859,11 +870,10 @@
859870
*/
860871
char const * json_auth_token_cstr(){
861872
return cson_value_get_cstr( json_auth_token() );
862873
}
863874
864
-
865875
/*
866876
** Returns the JsonPageDef with the given name, or NULL if no match is
867877
** found.
868878
**
869879
** head must be a pointer to an array of JsonPageDefs in which the
@@ -911,11 +921,11 @@
911921
/*
912922
** Convenience routine which converts a Julian time value into a Unix
913923
** Epoch timestamp. Requires the db, so this cannot be used before the
914924
** repo is opened (will trigger a fatal error in db_xxx()).
915925
*/
916
-static cson_value * json_julian_to_timestamp(double j){
926
+cson_value * json_julian_to_timestamp(double j){
917927
return cson_value_new_integer((cson_int_t)
918928
db_int64(0,"SELECT strftime('%%s',%lf)",j)
919929
);
920930
}
921931
@@ -1300,48 +1310,10 @@
13001310
return jv;
13011311
#undef SETBUF
13021312
}
13031313
13041314
1305
-static cson_value * json_wiki_create();
1306
-static cson_value * json_wiki_get();
1307
-static cson_value * json_wiki_list();
1308
-static cson_value * json_wiki_save();
1309
-static cson_value * json_timeline_ci();
1310
-static cson_value * json_timeline_ticket();
1311
-static cson_value * json_timeline_wiki();
1312
-
1313
-/*
1314
-** Mapping of /json/wiki/XXX commands/paths to callbacks.
1315
-*/
1316
-static const JsonPageDef JsonPageDefs_Wiki[] = {
1317
-{"create", json_wiki_create, 1},
1318
-{"get", json_wiki_get, 0},
1319
-{"list", json_wiki_list, 0},
1320
-{"save", json_wiki_save, 1},
1321
-{"timeline", json_timeline_wiki,0},
1322
-/* Last entry MUST have a NULL name. */
1323
-{NULL,NULL,0}
1324
-};
1325
-
1326
-/*
1327
-** Mapping of /json/timeline/XXX commands/paths to callbacks.
1328
-*/
1329
-static const JsonPageDef JsonPageDefs_Timeline[] = {
1330
-{"c", json_timeline_ci, 0},
1331
-{"ci", json_timeline_ci, 0},
1332
-{"com", json_timeline_ci, 0},
1333
-{"commit", json_timeline_ci, 0},
1334
-{"t", json_timeline_ticket, 0},
1335
-{"ticket", json_timeline_ticket, 0},
1336
-{"w", json_timeline_wiki, 0},
1337
-{"wi", json_timeline_wiki, 0},
1338
-{"wik", json_timeline_wiki, 0},
1339
-{"wiki", json_timeline_wiki, 0},
1340
-/* Last entry MUST have a NULL name. */
1341
-{NULL,NULL,0}
1342
-};
13431315
13441316
static cson_value * json_user_list();
13451317
static cson_value * json_user_get();
13461318
#if 0
13471319
static cson_value * json_user_create();
@@ -1359,26 +1331,11 @@
13591331
/* Last entry MUST have a NULL name. */
13601332
{NULL,NULL,0}
13611333
};
13621334
13631335
1364
-/*
1365
-** A page/command dispatch helper for fossil_json_f() implementations.
1366
-** pages must be an array of JsonPageDef commands which we can
1367
-** dispatch. The final item in the array MUST have a NULL name
1368
-** element.
1369
-**
1370
-** This function takes the command specified in
1371
-** json_comand_arg(1+g.json.dispatchDepth) and searches pages for a
1372
-** matching name. If found then that page's func() is called to fetch
1373
-** the payload, which is returned to the caller.
1374
-**
1375
-** On error, g.json.resultCode is set to one of the FossilJsonCodes
1376
-** values and NULL is returned. If non-NULL is returned, ownership is
1377
-** transfered to the caller.
1378
-*/
1379
-static cson_value * json_page_dispatch_helper(JsonPageDef const * pages){
1336
+cson_value * json_page_dispatch_helper(JsonPageDef const * pages){
13801337
JsonPageDef const * def;
13811338
char const * cmd = json_command_arg(1+g.json.dispatchDepth);
13821339
assert( NULL != pages );
13831340
if( ! cmd ){
13841341
g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
@@ -1400,229 +1357,10 @@
14001357
**
14011358
*/
14021359
static cson_value * json_page_user(){
14031360
return json_page_dispatch_helper(&JsonPageDefs_User[0]);
14041361
}
1405
-
1406
-/*
1407
-** Implements the /json/wiki family of pages/commands.
1408
-**
1409
-*/
1410
-static cson_value * json_page_wiki(){
1411
- return json_page_dispatch_helper(&JsonPageDefs_Wiki[0]);
1412
-}
1413
-
1414
-
1415
-/*
1416
-** Implementation of /json/wiki/get.
1417
-**
1418
-** TODO: add option to parse wiki output. It is currently
1419
-** unparsed.
1420
-*/
1421
-static cson_value * json_wiki_get(){
1422
- int rid;
1423
- Manifest *pWiki = 0;
1424
- char const * zBody = NULL;
1425
- char const * zPageName;
1426
- char doParse = 0/*not yet implemented*/;
1427
-
1428
- if( !g.perm.RdWiki ){
1429
- g.json.resultCode = FSL_JSON_E_DENIED;
1430
- return NULL;
1431
- }
1432
- zPageName = g.isHTTP
1433
- ? json_getenv_cstr("page")
1434
- : find_option("page","p",1);
1435
- if(!zPageName||!*zPageName){
1436
- g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1437
- return NULL;
1438
- }
1439
- rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1440
- " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1441
- " ORDER BY x.mtime DESC LIMIT 1",
1442
- zPageName
1443
- );
1444
- if( (pWiki = manifest_get(rid, CFTYPE_WIKI))!=0 ){
1445
- zBody = pWiki->zWiki;
1446
- }
1447
- if( zBody==0 ){
1448
- manifest_destroy(pWiki);
1449
- g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
1450
- return NULL;
1451
- }else{
1452
- unsigned int const len = strlen(zBody);
1453
- cson_value * payV = cson_value_new_object();
1454
- cson_object * pay = cson_value_get_object(payV);
1455
- cson_object_set(pay,"name",json_new_string(zPageName));
1456
- cson_object_set(pay,"version",json_new_string(pWiki->zBaseline))
1457
- /*FIXME: pWiki->zBaseline is NULL. How to get the version number?*/
1458
- ;
1459
- cson_object_set(pay,"rid",cson_value_new_integer((cson_int_t)rid));
1460
- cson_object_set(pay,"lastSavedBy",json_new_string(pWiki->zUser));
1461
- cson_object_set(pay,FossilJsonKeys.timestamp, json_julian_to_timestamp(pWiki->rDate));
1462
- cson_object_set(pay,"contentLength",cson_value_new_integer((cson_int_t)len));
1463
- cson_object_set(pay,"contentFormat",json_new_string(doParse?"html":"raw"));
1464
- cson_object_set(pay,"content",cson_value_new_string(zBody,len));
1465
- /*TODO: add 'T' (tag) fields*/
1466
- /*TODO: add the 'A' card (file attachment) entries?*/
1467
- manifest_destroy(pWiki);
1468
- return payV;
1469
- }
1470
-}
1471
-
1472
-/*
1473
-** Internal impl of /wiki/save and /wiki/create. If createMode is 0
1474
-** and the page already exists then a
1475
-** FSL_JSON_E_RESOURCE_ALREADY_EXISTS error is triggered. If
1476
-** createMode is false then the FSL_JSON_E_RESOURCE_NOT_FOUND is
1477
-** triggered if the page does not already exists.
1478
-**
1479
-** Note that the error triggered when createMode==0 and no such page
1480
-** exists is rather arbitrary - we could just as well create the entry
1481
-** here if it doesn't already exist. With that, save/create would
1482
-** become one operation. That said, i expect there are people who
1483
-** would categorize such behaviour as "being too clever" or "doing too
1484
-** much automatically" (and i would likely agree with them).
1485
-*/
1486
-static cson_value * json_wiki_create_or_save(char createMode){
1487
- Blob content = empty_blob;
1488
- cson_value * nameV;
1489
- cson_value * contentV;
1490
- cson_value * emptyContent = NULL;
1491
- cson_value * payV = NULL;
1492
- cson_object * pay = NULL;
1493
- cson_string const * jstr = NULL;
1494
- char const * zContent;
1495
- char const * zBody = NULL;
1496
- char const * zPageName;
1497
- unsigned int contentLen = 0;
1498
- int rid;
1499
- if( (createMode && !g.perm.NewWiki)
1500
- || (!createMode && !g.perm.WrWiki)){
1501
- g.json.resultCode = FSL_JSON_E_DENIED;
1502
- return NULL;
1503
- }
1504
- nameV = json_req_payload_get("name");
1505
- if(!nameV){
1506
- g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1507
- goto error;
1508
- }
1509
- zPageName = cson_string_cstr(cson_value_get_string(nameV));
1510
- rid = db_int(0,
1511
- "SELECT x.rid FROM tag t, tagxref x"
1512
- " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1513
- " ORDER BY x.mtime DESC LIMIT 1",
1514
- zPageName
1515
- );
1516
-
1517
- if(rid){
1518
- if(createMode){
1519
- g.json.resultCode = FSL_JSON_E_RESOURCE_ALREADY_EXISTS;
1520
- goto error;
1521
- }
1522
- }else{
1523
- if(!createMode){
1524
- g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
1525
- goto error;
1526
- }
1527
- }
1528
-
1529
- contentV = json_req_payload_get("content");
1530
- if( !contentV ){
1531
- if( createMode ){
1532
- contentV = emptyContent = cson_value_new_string("",0);
1533
- }else{
1534
- g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1535
- goto error;
1536
- }
1537
- }
1538
- if( !cson_value_is_string(nameV)
1539
- || !cson_value_is_string(contentV)){
1540
- g.json.resultCode = FSL_JSON_E_INVALID_ARGS;
1541
- goto error;
1542
- }
1543
- jstr = cson_value_get_string(contentV);
1544
- contentLen = (int)cson_string_length_bytes(jstr);
1545
- if(contentLen){
1546
- blob_append(&content, cson_string_cstr(jstr),contentLen);
1547
- }
1548
- wiki_cmd_commit(zPageName, 0==rid, &content);
1549
- blob_reset(&content);
1550
-
1551
- payV = cson_value_new_object();
1552
- pay = cson_value_get_object(payV);
1553
- cson_object_set( pay, "name", nameV );
1554
- cson_object_set( pay, FossilJsonKeys.timestamp,
1555
- json_new_timestamp(-1) );
1556
-
1557
- goto ok;
1558
- error:
1559
- assert( 0 != g.json.resultCode );
1560
- cson_value_free(payV);
1561
- payV = NULL;
1562
- ok:
1563
- if( emptyContent ){
1564
- /* We have some potentially tricky memory ownership
1565
- here, which is why we handle emptyContent separately.
1566
- */
1567
- cson_value_free(emptyContent);
1568
- }
1569
- return payV;
1570
-
1571
-}
1572
-
1573
-/*
1574
-** Implementation of /json/wiki/create.
1575
-*/
1576
-static cson_value * json_wiki_create(){
1577
- return json_wiki_create_or_save(1);
1578
-}
1579
-
1580
-/*
1581
-** Implementation of /json/wiki/save.
1582
-*/
1583
-static cson_value * json_wiki_save(){
1584
- /* FIXME: add GET/POST.payload bool option createIfNotExists. */
1585
- return json_wiki_create_or_save(0);
1586
-}
1587
-
1588
-/*
1589
-** Implementation of /json/wiki/list.
1590
-*/
1591
-static cson_value * json_wiki_list(){
1592
- cson_value * listV = NULL;
1593
- cson_array * list = NULL;
1594
- Stmt q;
1595
- if( !g.perm.RdWiki ){
1596
- g.json.resultCode = FSL_JSON_E_DENIED;
1597
- return NULL;
1598
- }
1599
- db_prepare(&q,"SELECT"
1600
- " substr(tagname,6) as name"
1601
- " FROM tag WHERE tagname GLOB 'wiki-*'"
1602
- " ORDER BY lower(name)");
1603
- listV = cson_value_new_array();
1604
- list = cson_value_get_array(listV);
1605
- while( SQLITE_ROW == db_step(&q) ){
1606
- cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
1607
- if(!v){
1608
- goto error;
1609
- }else if( 0 != cson_array_append( list, v ) ){
1610
- cson_value_free(v);
1611
- goto error;
1612
- }
1613
- }
1614
- goto end;
1615
- error:
1616
- g.json.resultCode = FSL_JSON_E_UNKNOWN;
1617
- cson_value_free(listV);
1618
- listV = NULL;
1619
- end:
1620
- db_finalize(&q);
1621
- return listV;
1622
-}
1623
-
16241362
16251363
static cson_value * json_branch_list();
16261364
/*
16271365
** Mapping of /json/branch/XXX commands/paths to callbacks.
16281366
*/
@@ -1737,490 +1475,10 @@
17371475
}
17381476
}
17391477
return payV;
17401478
}
17411479
1742
-/*
1743
-** Implements the /json/timeline family of pages/commands. Far from
1744
-** complete.
1745
-**
1746
-*/
1747
-static cson_value * json_page_timeline(){
1748
- return json_page_dispatch_helper(&JsonPageDefs_Timeline[0]);
1749
-}
1750
-
1751
-/*
1752
-** Create a temporary table suitable for storing timeline data.
1753
-*/
1754
-static void json_timeline_temp_table(void){
1755
- /* Field order MUST match that from json_timeline_query()!!! */
1756
- static const char zSql[] =
1757
- @ CREATE TEMP TABLE IF NOT EXISTS json_timeline(
1758
- @ sortId INTEGER PRIMARY KEY,
1759
- @ rid INTEGER,
1760
- @ uuid TEXT,
1761
- @ mtime INTEGER,
1762
- @ timestampString TEXT,
1763
- @ comment TEXT,
1764
- @ user TEXT,
1765
- @ isLeaf BOOLEAN,
1766
- @ bgColor TEXT,
1767
- @ eventType TEXT,
1768
- @ tags TEXT,
1769
- @ tagId INTEGER,
1770
- @ brief TEXT
1771
- @ )
1772
- ;
1773
- db_multi_exec(zSql);
1774
-}
1775
-
1776
-/*
1777
-** Return a pointer to a constant string that forms the basis
1778
-** for a timeline query for the JSON interface.
1779
-*/
1780
-const char const * json_timeline_query(void){
1781
- /* Field order MUST match that from json_timeline_temp_table()!!! */
1782
- static const char zBaseSql[] =
1783
- @ SELECT
1784
- @ NULL,
1785
- @ blob.rid,
1786
- @ uuid,
1787
- @ strftime('%%s',event.mtime),
1788
- @ datetime(event.mtime,'utc'),
1789
- @ coalesce(ecomment, comment),
1790
- @ coalesce(euser, user),
1791
- @ blob.rid IN leaf,
1792
- @ bgcolor,
1793
- @ event.type,
1794
- @ (SELECT group_concat(substr(tagname,5), ',') FROM tag, tagxref
1795
- @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
1796
- @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0),
1797
- @ tagid,
1798
- @ brief
1799
- @ FROM event JOIN blob
1800
- @ WHERE blob.rid=event.objid
1801
- ;
1802
- return zBaseSql;
1803
-}
1804
-
1805
-/*
1806
-** Helper for the timeline family of functions. Possibly appends 1
1807
-** AND clause and an ORDER BY clause to pSql, depending on the state
1808
-** of the "after" ("a") or "before" ("b") environment parameters.
1809
-** This function gives "after" precedence over "before", and only
1810
-** applies one of them.
1811
-**
1812
-** Returns -1 if it adds a "before" clause, 1 if it adds
1813
-** an "after" clause, and 0 if adds only an order-by clause.
1814
-*/
1815
-static char json_timeline_add_time_clause(Blob *pSql){
1816
- char const * zAfter = NULL;
1817
- char const * zBefore = NULL;
1818
- if( g.isHTTP ){
1819
- /**
1820
- FIXME: we are only honoring STRING values here, not int (for
1821
- passing Unix Epoch times).
1822
- */
1823
- zAfter = json_getenv_cstr("after");
1824
- if(!zAfter || !*zAfter){
1825
- zAfter = json_getenv_cstr("a");
1826
- }
1827
- if(!zAfter){
1828
- zBefore = json_getenv_cstr("before");
1829
- if(!zBefore||!*zBefore){
1830
- zBefore = json_getenv_cstr("b");
1831
- }
1832
- }
1833
- }else{
1834
- zAfter = find_option("after","a",1);
1835
- zBefore = zAfter ? NULL : find_option("before","b",1);
1836
- }
1837
- if(zAfter&&*zAfter){
1838
- while( fossil_isspace(*zAfter) ) ++zAfter;
1839
- blob_appendf(pSql,
1840
- " AND event.mtime>=(SELECT julianday(%Q,'utc')) "
1841
- " ORDER BY event.mtime ASC ",
1842
- zAfter);
1843
- return 1;
1844
- }else if(zBefore && *zBefore){
1845
- while( fossil_isspace(*zBefore) ) ++zBefore;
1846
- blob_appendf(pSql,
1847
- " AND event.mtime<=(SELECT julianday(%Q,'utc')) "
1848
- " ORDER BY event.mtime DESC ",
1849
- zBefore);
1850
- return -1;
1851
- }else{
1852
- blob_append(pSql," ORDER BY event.mtime DESC ", -1);
1853
- return 0;
1854
- }
1855
-}
1856
-
1857
-/*
1858
-** Tries to figure out a timeline query length limit base on
1859
-** environment parameters. If it can it returns that value,
1860
-** else it returns some statically defined default value.
1861
-**
1862
-** Never returns a negative value. 0 means no limit.
1863
-*/
1864
-static int json_timeline_limit(){
1865
- static const int defaultLimit = 20;
1866
- int limit = -1;
1867
- if( g.isHTTP ){
1868
- limit = json_getenv_int("limit",-1);
1869
- if(limit<0){
1870
- limit = json_getenv_int("n",-1);
1871
- }
1872
- }else{/* CLI mode */
1873
- char const * arg = find_option("limit","n",1);
1874
- if(arg && *arg){
1875
- limit = atoi(arg);
1876
- }
1877
- }
1878
- return (limit<0) ? defaultLimit : limit;
1879
-}
1880
-
1881
-/*
1882
-** Internal helper for the json_timeline_EVENTTYPE() family of
1883
-** functions. zEventType must be one of (ci, w, t). pSql must be a
1884
-** cleanly-initialized, empty Blob to store the sql in. If pPayload is
1885
-** not NULL it is assumed to be the pending response payload. If
1886
-** json_timeline_limit() returns non-0, this function adds a LIMIT
1887
-** clause to the generated SQL and (if pPayload is not NULL) adds the
1888
-** limit value as the "limit" property of pPayload.
1889
-*/
1890
-static void json_timeline_setup_sql( char const * zEventType,
1891
- Blob * pSql,
1892
- cson_object * pPayload ){
1893
- int limit;
1894
- assert( zEventType && *zEventType && pSql );
1895
- json_timeline_temp_table();
1896
- blob_append(pSql, "INSERT OR IGNORE INTO json_timeline ", -1);
1897
- blob_append(pSql, json_timeline_query(), -1 );
1898
- blob_appendf(pSql, " AND event.type IN(%Q) ", zEventType);
1899
- json_timeline_add_time_clause(pSql);
1900
- limit = json_timeline_limit();
1901
- if(limit){
1902
- blob_appendf(pSql,"LIMIT %d ",limit);
1903
- }
1904
- if(pPayload){
1905
- cson_object_set(pPayload, "limit",cson_value_new_integer(limit));
1906
- }
1907
-
1908
-}
1909
-/*
1910
-** Implementation of /json/timeline/ci.
1911
-**
1912
-** Still a few TODOs (like figuring out how to structure
1913
-** inheritance info).
1914
-*/
1915
-static cson_value * json_timeline_ci(){
1916
- cson_value * payV = NULL;
1917
- cson_object * pay = NULL;
1918
- cson_value * tmp = NULL;
1919
- cson_value * listV = NULL;
1920
- cson_array * list = NULL;
1921
- int check = 0;
1922
- Stmt q;
1923
- Blob sql = empty_blob;
1924
- if( !g.perm.Read/* && !g.perm.RdTkt && !g.perm.RdWiki*/ ){
1925
- g.json.resultCode = FSL_JSON_E_DENIED;
1926
- return NULL;
1927
- }
1928
- payV = cson_value_new_object();
1929
- pay = cson_value_get_object(payV);
1930
- json_timeline_setup_sql( "ci", &sql, pay );
1931
-#define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
1932
- g.json.resultCode = (cson_rc.AllocError==check) \
1933
- ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
1934
- goto error;\
1935
- }
1936
- db_multi_exec(blob_buffer(&sql));
1937
-
1938
-#if 0
1939
- /* only for testing! */
1940
- tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
1941
- SET("timelineSql");
1942
-#endif
1943
-
1944
- blob_reset(&sql);
1945
- blob_append(&sql, "SELECT "
1946
- " rid AS rid,"
1947
- " uuid AS uuid,"
1948
- " mtime AS timestamp,"
1949
- " timestampString AS timestampString,"
1950
- " comment AS comment, "
1951
- " user AS user,"
1952
- " isLeaf AS isLeaf," /*FIXME: convert to JSON bool */
1953
- " bgColor AS bgColor," /* why always null? */
1954
- " eventType AS eventType,"
1955
- " tags AS tags," /*FIXME: split this into
1956
- a JSON array*/
1957
- " tagId AS tagId"
1958
- " FROM json_timeline"
1959
- " ORDER BY sortId",
1960
- -1);
1961
- db_prepare(&q,blob_buffer(&sql));
1962
- blob_reset(&sql);
1963
- listV = cson_value_new_array();
1964
- list = cson_value_get_array(listV);
1965
- tmp = listV;
1966
- SET("timeline");
1967
- while( (SQLITE_ROW == db_step(&q) )){
1968
- /* convert each row into a JSON object...*/
1969
- cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
1970
- cson_object * row = cson_value_get_object(rowV);
1971
- cson_string const * tagsStr = NULL;
1972
- if(!row){
1973
- json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
1974
- "Could not convert at least one timeline result row to JSON." );
1975
- continue;
1976
- }
1977
- /* Split tags string field into JSON Array... */
1978
- cson_array_append(list, rowV);
1979
- tagsStr = cson_value_get_string(cson_object_get(row,"tags"));
1980
- if(tagsStr){
1981
- cson_value * tags = json_string_split2( cson_string_cstr(tagsStr),
1982
- ',', 0);
1983
- if( tags ){
1984
- if(0 != cson_object_set(row,"tags",tags)){
1985
- cson_value_free(tags);
1986
- }else{
1987
- /*replaced/deleted old tags value, invalidating tagsStr*/;
1988
- tagsStr = NULL;
1989
- }
1990
- }else{
1991
- json_warn(FSL_JSON_W_STRING_TO_ARRAY_FAILED,
1992
- "Could not convert tags string to array.");
1993
- }
1994
- }
1995
-
1996
- /* replace isLeaf int w/ JSON bool */
1997
- tmp = cson_object_get(row,"isLeaf");
1998
- if(tmp && cson_value_is_integer(tmp)){
1999
- cson_object_set(row,"isLeaf",
2000
- cson_value_get_integer(tmp)
2001
- ? cson_value_true()
2002
- : cson_value_false());
2003
- tmp = NULL;
2004
- }
2005
- }
2006
- db_finalize(&q);
2007
-#undef SET
2008
- goto ok;
2009
- error:
2010
- assert( 0 != g.json.resultCode );
2011
- cson_value_free(payV);
2012
- payV = NULL;
2013
- ok:
2014
- return payV;
2015
-}
2016
-
2017
-/*
2018
-** Implementation of /json/timeline/wiki.
2019
-**
2020
-*/
2021
-static cson_value * json_timeline_wiki(){
2022
- /* This code is 95% the same as json_timeline_ci(), by the way. */
2023
- cson_value * payV = NULL;
2024
- cson_object * pay = NULL;
2025
- cson_value * tmp = NULL;
2026
- cson_value * listV = NULL;
2027
- cson_array * list = NULL;
2028
- int check = 0;
2029
- Stmt q;
2030
- Blob sql = empty_blob;
2031
- if( !g.perm.Read || !g.perm.RdWiki ){
2032
- g.json.resultCode = FSL_JSON_E_DENIED;
2033
- return NULL;
2034
- }
2035
- payV = cson_value_new_object();
2036
- pay = cson_value_get_object(payV);
2037
- json_timeline_setup_sql( "w", &sql, pay );
2038
-#define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
2039
- g.json.resultCode = (cson_rc.AllocError==check) \
2040
- ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
2041
- goto error;\
2042
- }
2043
- db_multi_exec(blob_buffer(&sql));
2044
-
2045
-#if 0
2046
- /* only for testing! */
2047
- tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
2048
- SET("timelineSql");
2049
-#endif
2050
-
2051
- blob_reset(&sql);
2052
- blob_append(&sql, "SELECT rid AS rid,"
2053
- " uuid AS uuid,"
2054
- " mtime AS timestamp,"
2055
- " timestampString AS timestampString,"
2056
- " comment AS comment, "
2057
- " user AS user,"
2058
- " eventType AS eventType"
2059
-#if 0
2060
- /* can wiki pages have tags? */
2061
- " tags AS tags," /*FIXME: split this into
2062
- a JSON array*/
2063
- " tagId AS tagId,"
2064
-#endif
2065
- " FROM json_timeline"
2066
- " ORDER BY sortId",
2067
- -1);
2068
- db_prepare(&q, blob_buffer(&sql));
2069
- blob_reset(&sql);
2070
- listV = cson_value_new_array();
2071
- list = cson_value_get_array(listV);
2072
- tmp = listV;
2073
- SET("timeline");
2074
- while( (SQLITE_ROW == db_step(&q) )){
2075
- /* convert each row into a JSON object...*/
2076
- cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
2077
- cson_object * row = cson_value_get_object(rowV);
2078
- int rc;
2079
- if(!row){
2080
- json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
2081
- "Could not convert at least one timeline result row to JSON." );
2082
- continue;
2083
- }
2084
- rc = cson_array_append( list, rowV );
2085
- if( 0 != rc ){
2086
- cson_value_free(rowV);
2087
- g.json.resultCode = (cson_rc.AllocError==rc)
2088
- ? FSL_JSON_E_ALLOC
2089
- : FSL_JSON_E_UNKNOWN;
2090
- goto error;
2091
- }
2092
- }
2093
- db_finalize(&q);
2094
-#undef SET
2095
- goto ok;
2096
- error:
2097
- assert( 0 != g.json.resultCode );
2098
- cson_value_free(payV);
2099
- payV = NULL;
2100
- ok:
2101
- return payV;
2102
-}
2103
-
2104
-/*
2105
-** Implementation of /json/timeline/ticket.
2106
-**
2107
-*/
2108
-static cson_value * json_timeline_ticket(){
2109
- /* This code is 95% the same as json_timeline_ci(), by the way. */
2110
- cson_value * payV = NULL;
2111
- cson_object * pay = NULL;
2112
- cson_value * tmp = NULL;
2113
- cson_value * listV = NULL;
2114
- cson_array * list = NULL;
2115
- int check = 0;
2116
- Stmt q;
2117
- Blob sql = empty_blob;
2118
- if( !g.perm.Read || !g.perm.RdTkt ){
2119
- g.json.resultCode = FSL_JSON_E_DENIED;
2120
- return NULL;
2121
- }
2122
- payV = cson_value_new_object();
2123
- pay = cson_value_get_object(payV);
2124
- json_timeline_setup_sql( "t", &sql, pay );
2125
- db_multi_exec(blob_buffer(&sql));
2126
-#define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
2127
- g.json.resultCode = (cson_rc.AllocError==check) \
2128
- ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
2129
- goto error;\
2130
- }
2131
-
2132
-#if 0
2133
- /* only for testing! */
2134
- tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
2135
- SET("timelineSql");
2136
-#endif
2137
-
2138
- blob_reset(&sql);
2139
- blob_append(&sql, "SELECT rid AS rid,"
2140
- " uuid AS uuid,"
2141
- " mtime AS timestamp,"
2142
- " timestampString AS timestampString,"
2143
- " user AS user,"
2144
- " eventType AS eventType,"
2145
- " comment AS comment,"
2146
- " brief AS briefComment"
2147
- " FROM json_timeline"
2148
- " ORDER BY sortId",
2149
- -1);
2150
- db_prepare(&q,blob_buffer(&sql));
2151
- blob_reset(&sql);
2152
- listV = cson_value_new_array();
2153
- list = cson_value_get_array(listV);
2154
- tmp = listV;
2155
- SET("timeline");
2156
- while( (SQLITE_ROW == db_step(&q) )){
2157
- /* convert each row into a JSON object...*/
2158
- int rc;
2159
- cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
2160
- cson_object * row = cson_value_get_object(rowV);
2161
- if(!row){
2162
- json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
2163
- "Could not convert at least one timeline result row to JSON." );
2164
- continue;
2165
- }
2166
- rc = cson_array_append( list, rowV );
2167
- if( 0 != rc ){
2168
- cson_value_free(rowV);
2169
- g.json.resultCode = (cson_rc.AllocError==rc)
2170
- ? FSL_JSON_E_ALLOC
2171
- : FSL_JSON_E_UNKNOWN;
2172
- goto error;
2173
- }
2174
- }
2175
- db_finalize(&q);
2176
-#undef SET
2177
- goto ok;
2178
- error:
2179
- assert( 0 != g.json.resultCode );
2180
- cson_value_free(payV);
2181
- payV = NULL;
2182
- ok:
2183
- return payV;
2184
-}
2185
-
2186
-
2187
-/*
2188
-** Implements the /json/whoami page/command.
2189
-*/
2190
-static cson_value * json_page_whoami(){
2191
- cson_value * payload = NULL;
2192
- cson_object * obj = NULL;
2193
- Stmt q;
2194
- db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
2195
- if( db_step(&q)==SQLITE_ROW ){
2196
-
2197
- /* reminder: we don't use g.zLogin because it's 0 for the guest
2198
- user and the HTML UI appears to currently allow the name to be
2199
- changed (but doing so would break other code). */
2200
- char const * str;
2201
- payload = cson_value_new_object();
2202
- obj = cson_value_get_object(payload);
2203
- str = (char const *)sqlite3_column_text(q.pStmt,0);
2204
- if( str ){
2205
- cson_object_set( obj, "name",
2206
- cson_value_new_string(str,strlen(str)) );
2207
- }
2208
- str = (char const *)sqlite3_column_text(q.pStmt,1);
2209
- if( str ){
2210
- cson_object_set( obj, "capabilities",
2211
- cson_value_new_string(str,strlen(str)) );
2212
- }
2213
- if( g.json.authToken ){
2214
- cson_object_set( obj, "authToken", g.json.authToken );
2215
- }
2216
- }else{
2217
- g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
2218
- }
2219
- db_finalize(&q);
2220
- return payload;
2221
-}
22221480
22231481
/*
22241482
** Impl of /json/user/list. Requires admin rights.
22251483
*/
22261484
static cson_value * json_user_list(){
22271485
--- src/json.c
+++ src/json.c
@@ -39,10 +39,21 @@
39
40 #if INTERFACE
41 #include "json_detail.h" /* workaround for apparent enum limitation in makeheaders */
42 #endif
43
 
 
 
 
 
 
 
 
 
 
 
44 /*
45 ** Internal helpers to manipulate a byte array as a bitset. The B
46 ** argument must be-a array at least (BIT/8+1) bytes long.
47 ** The BIT argument is the bit number to query/set/clear/toggle.
48 */
@@ -280,11 +291,11 @@
280 **
281 ** If it finds a value and that value is-a JSON number or is a string
282 ** which looks like an integer or is-a JSON bool then it is converted
283 ** to an int. If none of those apply then dflt is returned.
284 */
285 static int json_getenv_int(char const * pKey, int dflt ){
286 cson_value const * v = json_getenv(pKey);
287 if(!v){
288 return dflt;
289 }else if( cson_value_is_number(v) ){
290 return (int)cson_value_get_integer(v);
@@ -306,11 +317,11 @@
306 ** value is-a String. Non-strings are not converted to strings for
307 ** this purpose. Returned memory is owned by g.json or fossil and is
308 ** valid until end-of-app or the given key is replaced in fossil's
309 ** internals via cgi_replace_parameter() and friends or json_setenv().
310 */
311 static char const * json_getenv_cstr( char const * zKey ){
312 return cson_value_get_cstr( json_getenv(zKey) );
313 }
314
315
316 /*
@@ -859,11 +870,10 @@
859 */
860 char const * json_auth_token_cstr(){
861 return cson_value_get_cstr( json_auth_token() );
862 }
863
864
865 /*
866 ** Returns the JsonPageDef with the given name, or NULL if no match is
867 ** found.
868 **
869 ** head must be a pointer to an array of JsonPageDefs in which the
@@ -911,11 +921,11 @@
911 /*
912 ** Convenience routine which converts a Julian time value into a Unix
913 ** Epoch timestamp. Requires the db, so this cannot be used before the
914 ** repo is opened (will trigger a fatal error in db_xxx()).
915 */
916 static cson_value * json_julian_to_timestamp(double j){
917 return cson_value_new_integer((cson_int_t)
918 db_int64(0,"SELECT strftime('%%s',%lf)",j)
919 );
920 }
921
@@ -1300,48 +1310,10 @@
1300 return jv;
1301 #undef SETBUF
1302 }
1303
1304
1305 static cson_value * json_wiki_create();
1306 static cson_value * json_wiki_get();
1307 static cson_value * json_wiki_list();
1308 static cson_value * json_wiki_save();
1309 static cson_value * json_timeline_ci();
1310 static cson_value * json_timeline_ticket();
1311 static cson_value * json_timeline_wiki();
1312
1313 /*
1314 ** Mapping of /json/wiki/XXX commands/paths to callbacks.
1315 */
1316 static const JsonPageDef JsonPageDefs_Wiki[] = {
1317 {"create", json_wiki_create, 1},
1318 {"get", json_wiki_get, 0},
1319 {"list", json_wiki_list, 0},
1320 {"save", json_wiki_save, 1},
1321 {"timeline", json_timeline_wiki,0},
1322 /* Last entry MUST have a NULL name. */
1323 {NULL,NULL,0}
1324 };
1325
1326 /*
1327 ** Mapping of /json/timeline/XXX commands/paths to callbacks.
1328 */
1329 static const JsonPageDef JsonPageDefs_Timeline[] = {
1330 {"c", json_timeline_ci, 0},
1331 {"ci", json_timeline_ci, 0},
1332 {"com", json_timeline_ci, 0},
1333 {"commit", json_timeline_ci, 0},
1334 {"t", json_timeline_ticket, 0},
1335 {"ticket", json_timeline_ticket, 0},
1336 {"w", json_timeline_wiki, 0},
1337 {"wi", json_timeline_wiki, 0},
1338 {"wik", json_timeline_wiki, 0},
1339 {"wiki", json_timeline_wiki, 0},
1340 /* Last entry MUST have a NULL name. */
1341 {NULL,NULL,0}
1342 };
1343
1344 static cson_value * json_user_list();
1345 static cson_value * json_user_get();
1346 #if 0
1347 static cson_value * json_user_create();
@@ -1359,26 +1331,11 @@
1359 /* Last entry MUST have a NULL name. */
1360 {NULL,NULL,0}
1361 };
1362
1363
1364 /*
1365 ** A page/command dispatch helper for fossil_json_f() implementations.
1366 ** pages must be an array of JsonPageDef commands which we can
1367 ** dispatch. The final item in the array MUST have a NULL name
1368 ** element.
1369 **
1370 ** This function takes the command specified in
1371 ** json_comand_arg(1+g.json.dispatchDepth) and searches pages for a
1372 ** matching name. If found then that page's func() is called to fetch
1373 ** the payload, which is returned to the caller.
1374 **
1375 ** On error, g.json.resultCode is set to one of the FossilJsonCodes
1376 ** values and NULL is returned. If non-NULL is returned, ownership is
1377 ** transfered to the caller.
1378 */
1379 static cson_value * json_page_dispatch_helper(JsonPageDef const * pages){
1380 JsonPageDef const * def;
1381 char const * cmd = json_command_arg(1+g.json.dispatchDepth);
1382 assert( NULL != pages );
1383 if( ! cmd ){
1384 g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
@@ -1400,229 +1357,10 @@
1400 **
1401 */
1402 static cson_value * json_page_user(){
1403 return json_page_dispatch_helper(&JsonPageDefs_User[0]);
1404 }
1405
1406 /*
1407 ** Implements the /json/wiki family of pages/commands.
1408 **
1409 */
1410 static cson_value * json_page_wiki(){
1411 return json_page_dispatch_helper(&JsonPageDefs_Wiki[0]);
1412 }
1413
1414
1415 /*
1416 ** Implementation of /json/wiki/get.
1417 **
1418 ** TODO: add option to parse wiki output. It is currently
1419 ** unparsed.
1420 */
1421 static cson_value * json_wiki_get(){
1422 int rid;
1423 Manifest *pWiki = 0;
1424 char const * zBody = NULL;
1425 char const * zPageName;
1426 char doParse = 0/*not yet implemented*/;
1427
1428 if( !g.perm.RdWiki ){
1429 g.json.resultCode = FSL_JSON_E_DENIED;
1430 return NULL;
1431 }
1432 zPageName = g.isHTTP
1433 ? json_getenv_cstr("page")
1434 : find_option("page","p",1);
1435 if(!zPageName||!*zPageName){
1436 g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1437 return NULL;
1438 }
1439 rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1440 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1441 " ORDER BY x.mtime DESC LIMIT 1",
1442 zPageName
1443 );
1444 if( (pWiki = manifest_get(rid, CFTYPE_WIKI))!=0 ){
1445 zBody = pWiki->zWiki;
1446 }
1447 if( zBody==0 ){
1448 manifest_destroy(pWiki);
1449 g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
1450 return NULL;
1451 }else{
1452 unsigned int const len = strlen(zBody);
1453 cson_value * payV = cson_value_new_object();
1454 cson_object * pay = cson_value_get_object(payV);
1455 cson_object_set(pay,"name",json_new_string(zPageName));
1456 cson_object_set(pay,"version",json_new_string(pWiki->zBaseline))
1457 /*FIXME: pWiki->zBaseline is NULL. How to get the version number?*/
1458 ;
1459 cson_object_set(pay,"rid",cson_value_new_integer((cson_int_t)rid));
1460 cson_object_set(pay,"lastSavedBy",json_new_string(pWiki->zUser));
1461 cson_object_set(pay,FossilJsonKeys.timestamp, json_julian_to_timestamp(pWiki->rDate));
1462 cson_object_set(pay,"contentLength",cson_value_new_integer((cson_int_t)len));
1463 cson_object_set(pay,"contentFormat",json_new_string(doParse?"html":"raw"));
1464 cson_object_set(pay,"content",cson_value_new_string(zBody,len));
1465 /*TODO: add 'T' (tag) fields*/
1466 /*TODO: add the 'A' card (file attachment) entries?*/
1467 manifest_destroy(pWiki);
1468 return payV;
1469 }
1470 }
1471
1472 /*
1473 ** Internal impl of /wiki/save and /wiki/create. If createMode is 0
1474 ** and the page already exists then a
1475 ** FSL_JSON_E_RESOURCE_ALREADY_EXISTS error is triggered. If
1476 ** createMode is false then the FSL_JSON_E_RESOURCE_NOT_FOUND is
1477 ** triggered if the page does not already exists.
1478 **
1479 ** Note that the error triggered when createMode==0 and no such page
1480 ** exists is rather arbitrary - we could just as well create the entry
1481 ** here if it doesn't already exist. With that, save/create would
1482 ** become one operation. That said, i expect there are people who
1483 ** would categorize such behaviour as "being too clever" or "doing too
1484 ** much automatically" (and i would likely agree with them).
1485 */
1486 static cson_value * json_wiki_create_or_save(char createMode){
1487 Blob content = empty_blob;
1488 cson_value * nameV;
1489 cson_value * contentV;
1490 cson_value * emptyContent = NULL;
1491 cson_value * payV = NULL;
1492 cson_object * pay = NULL;
1493 cson_string const * jstr = NULL;
1494 char const * zContent;
1495 char const * zBody = NULL;
1496 char const * zPageName;
1497 unsigned int contentLen = 0;
1498 int rid;
1499 if( (createMode && !g.perm.NewWiki)
1500 || (!createMode && !g.perm.WrWiki)){
1501 g.json.resultCode = FSL_JSON_E_DENIED;
1502 return NULL;
1503 }
1504 nameV = json_req_payload_get("name");
1505 if(!nameV){
1506 g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1507 goto error;
1508 }
1509 zPageName = cson_string_cstr(cson_value_get_string(nameV));
1510 rid = db_int(0,
1511 "SELECT x.rid FROM tag t, tagxref x"
1512 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1513 " ORDER BY x.mtime DESC LIMIT 1",
1514 zPageName
1515 );
1516
1517 if(rid){
1518 if(createMode){
1519 g.json.resultCode = FSL_JSON_E_RESOURCE_ALREADY_EXISTS;
1520 goto error;
1521 }
1522 }else{
1523 if(!createMode){
1524 g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
1525 goto error;
1526 }
1527 }
1528
1529 contentV = json_req_payload_get("content");
1530 if( !contentV ){
1531 if( createMode ){
1532 contentV = emptyContent = cson_value_new_string("",0);
1533 }else{
1534 g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
1535 goto error;
1536 }
1537 }
1538 if( !cson_value_is_string(nameV)
1539 || !cson_value_is_string(contentV)){
1540 g.json.resultCode = FSL_JSON_E_INVALID_ARGS;
1541 goto error;
1542 }
1543 jstr = cson_value_get_string(contentV);
1544 contentLen = (int)cson_string_length_bytes(jstr);
1545 if(contentLen){
1546 blob_append(&content, cson_string_cstr(jstr),contentLen);
1547 }
1548 wiki_cmd_commit(zPageName, 0==rid, &content);
1549 blob_reset(&content);
1550
1551 payV = cson_value_new_object();
1552 pay = cson_value_get_object(payV);
1553 cson_object_set( pay, "name", nameV );
1554 cson_object_set( pay, FossilJsonKeys.timestamp,
1555 json_new_timestamp(-1) );
1556
1557 goto ok;
1558 error:
1559 assert( 0 != g.json.resultCode );
1560 cson_value_free(payV);
1561 payV = NULL;
1562 ok:
1563 if( emptyContent ){
1564 /* We have some potentially tricky memory ownership
1565 here, which is why we handle emptyContent separately.
1566 */
1567 cson_value_free(emptyContent);
1568 }
1569 return payV;
1570
1571 }
1572
1573 /*
1574 ** Implementation of /json/wiki/create.
1575 */
1576 static cson_value * json_wiki_create(){
1577 return json_wiki_create_or_save(1);
1578 }
1579
1580 /*
1581 ** Implementation of /json/wiki/save.
1582 */
1583 static cson_value * json_wiki_save(){
1584 /* FIXME: add GET/POST.payload bool option createIfNotExists. */
1585 return json_wiki_create_or_save(0);
1586 }
1587
1588 /*
1589 ** Implementation of /json/wiki/list.
1590 */
1591 static cson_value * json_wiki_list(){
1592 cson_value * listV = NULL;
1593 cson_array * list = NULL;
1594 Stmt q;
1595 if( !g.perm.RdWiki ){
1596 g.json.resultCode = FSL_JSON_E_DENIED;
1597 return NULL;
1598 }
1599 db_prepare(&q,"SELECT"
1600 " substr(tagname,6) as name"
1601 " FROM tag WHERE tagname GLOB 'wiki-*'"
1602 " ORDER BY lower(name)");
1603 listV = cson_value_new_array();
1604 list = cson_value_get_array(listV);
1605 while( SQLITE_ROW == db_step(&q) ){
1606 cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
1607 if(!v){
1608 goto error;
1609 }else if( 0 != cson_array_append( list, v ) ){
1610 cson_value_free(v);
1611 goto error;
1612 }
1613 }
1614 goto end;
1615 error:
1616 g.json.resultCode = FSL_JSON_E_UNKNOWN;
1617 cson_value_free(listV);
1618 listV = NULL;
1619 end:
1620 db_finalize(&q);
1621 return listV;
1622 }
1623
1624
1625 static cson_value * json_branch_list();
1626 /*
1627 ** Mapping of /json/branch/XXX commands/paths to callbacks.
1628 */
@@ -1737,490 +1475,10 @@
1737 }
1738 }
1739 return payV;
1740 }
1741
1742 /*
1743 ** Implements the /json/timeline family of pages/commands. Far from
1744 ** complete.
1745 **
1746 */
1747 static cson_value * json_page_timeline(){
1748 return json_page_dispatch_helper(&JsonPageDefs_Timeline[0]);
1749 }
1750
1751 /*
1752 ** Create a temporary table suitable for storing timeline data.
1753 */
1754 static void json_timeline_temp_table(void){
1755 /* Field order MUST match that from json_timeline_query()!!! */
1756 static const char zSql[] =
1757 @ CREATE TEMP TABLE IF NOT EXISTS json_timeline(
1758 @ sortId INTEGER PRIMARY KEY,
1759 @ rid INTEGER,
1760 @ uuid TEXT,
1761 @ mtime INTEGER,
1762 @ timestampString TEXT,
1763 @ comment TEXT,
1764 @ user TEXT,
1765 @ isLeaf BOOLEAN,
1766 @ bgColor TEXT,
1767 @ eventType TEXT,
1768 @ tags TEXT,
1769 @ tagId INTEGER,
1770 @ brief TEXT
1771 @ )
1772 ;
1773 db_multi_exec(zSql);
1774 }
1775
1776 /*
1777 ** Return a pointer to a constant string that forms the basis
1778 ** for a timeline query for the JSON interface.
1779 */
1780 const char const * json_timeline_query(void){
1781 /* Field order MUST match that from json_timeline_temp_table()!!! */
1782 static const char zBaseSql[] =
1783 @ SELECT
1784 @ NULL,
1785 @ blob.rid,
1786 @ uuid,
1787 @ strftime('%%s',event.mtime),
1788 @ datetime(event.mtime,'utc'),
1789 @ coalesce(ecomment, comment),
1790 @ coalesce(euser, user),
1791 @ blob.rid IN leaf,
1792 @ bgcolor,
1793 @ event.type,
1794 @ (SELECT group_concat(substr(tagname,5), ',') FROM tag, tagxref
1795 @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
1796 @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0),
1797 @ tagid,
1798 @ brief
1799 @ FROM event JOIN blob
1800 @ WHERE blob.rid=event.objid
1801 ;
1802 return zBaseSql;
1803 }
1804
1805 /*
1806 ** Helper for the timeline family of functions. Possibly appends 1
1807 ** AND clause and an ORDER BY clause to pSql, depending on the state
1808 ** of the "after" ("a") or "before" ("b") environment parameters.
1809 ** This function gives "after" precedence over "before", and only
1810 ** applies one of them.
1811 **
1812 ** Returns -1 if it adds a "before" clause, 1 if it adds
1813 ** an "after" clause, and 0 if adds only an order-by clause.
1814 */
1815 static char json_timeline_add_time_clause(Blob *pSql){
1816 char const * zAfter = NULL;
1817 char const * zBefore = NULL;
1818 if( g.isHTTP ){
1819 /**
1820 FIXME: we are only honoring STRING values here, not int (for
1821 passing Unix Epoch times).
1822 */
1823 zAfter = json_getenv_cstr("after");
1824 if(!zAfter || !*zAfter){
1825 zAfter = json_getenv_cstr("a");
1826 }
1827 if(!zAfter){
1828 zBefore = json_getenv_cstr("before");
1829 if(!zBefore||!*zBefore){
1830 zBefore = json_getenv_cstr("b");
1831 }
1832 }
1833 }else{
1834 zAfter = find_option("after","a",1);
1835 zBefore = zAfter ? NULL : find_option("before","b",1);
1836 }
1837 if(zAfter&&*zAfter){
1838 while( fossil_isspace(*zAfter) ) ++zAfter;
1839 blob_appendf(pSql,
1840 " AND event.mtime>=(SELECT julianday(%Q,'utc')) "
1841 " ORDER BY event.mtime ASC ",
1842 zAfter);
1843 return 1;
1844 }else if(zBefore && *zBefore){
1845 while( fossil_isspace(*zBefore) ) ++zBefore;
1846 blob_appendf(pSql,
1847 " AND event.mtime<=(SELECT julianday(%Q,'utc')) "
1848 " ORDER BY event.mtime DESC ",
1849 zBefore);
1850 return -1;
1851 }else{
1852 blob_append(pSql," ORDER BY event.mtime DESC ", -1);
1853 return 0;
1854 }
1855 }
1856
1857 /*
1858 ** Tries to figure out a timeline query length limit base on
1859 ** environment parameters. If it can it returns that value,
1860 ** else it returns some statically defined default value.
1861 **
1862 ** Never returns a negative value. 0 means no limit.
1863 */
1864 static int json_timeline_limit(){
1865 static const int defaultLimit = 20;
1866 int limit = -1;
1867 if( g.isHTTP ){
1868 limit = json_getenv_int("limit",-1);
1869 if(limit<0){
1870 limit = json_getenv_int("n",-1);
1871 }
1872 }else{/* CLI mode */
1873 char const * arg = find_option("limit","n",1);
1874 if(arg && *arg){
1875 limit = atoi(arg);
1876 }
1877 }
1878 return (limit<0) ? defaultLimit : limit;
1879 }
1880
1881 /*
1882 ** Internal helper for the json_timeline_EVENTTYPE() family of
1883 ** functions. zEventType must be one of (ci, w, t). pSql must be a
1884 ** cleanly-initialized, empty Blob to store the sql in. If pPayload is
1885 ** not NULL it is assumed to be the pending response payload. If
1886 ** json_timeline_limit() returns non-0, this function adds a LIMIT
1887 ** clause to the generated SQL and (if pPayload is not NULL) adds the
1888 ** limit value as the "limit" property of pPayload.
1889 */
1890 static void json_timeline_setup_sql( char const * zEventType,
1891 Blob * pSql,
1892 cson_object * pPayload ){
1893 int limit;
1894 assert( zEventType && *zEventType && pSql );
1895 json_timeline_temp_table();
1896 blob_append(pSql, "INSERT OR IGNORE INTO json_timeline ", -1);
1897 blob_append(pSql, json_timeline_query(), -1 );
1898 blob_appendf(pSql, " AND event.type IN(%Q) ", zEventType);
1899 json_timeline_add_time_clause(pSql);
1900 limit = json_timeline_limit();
1901 if(limit){
1902 blob_appendf(pSql,"LIMIT %d ",limit);
1903 }
1904 if(pPayload){
1905 cson_object_set(pPayload, "limit",cson_value_new_integer(limit));
1906 }
1907
1908 }
1909 /*
1910 ** Implementation of /json/timeline/ci.
1911 **
1912 ** Still a few TODOs (like figuring out how to structure
1913 ** inheritance info).
1914 */
1915 static cson_value * json_timeline_ci(){
1916 cson_value * payV = NULL;
1917 cson_object * pay = NULL;
1918 cson_value * tmp = NULL;
1919 cson_value * listV = NULL;
1920 cson_array * list = NULL;
1921 int check = 0;
1922 Stmt q;
1923 Blob sql = empty_blob;
1924 if( !g.perm.Read/* && !g.perm.RdTkt && !g.perm.RdWiki*/ ){
1925 g.json.resultCode = FSL_JSON_E_DENIED;
1926 return NULL;
1927 }
1928 payV = cson_value_new_object();
1929 pay = cson_value_get_object(payV);
1930 json_timeline_setup_sql( "ci", &sql, pay );
1931 #define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
1932 g.json.resultCode = (cson_rc.AllocError==check) \
1933 ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
1934 goto error;\
1935 }
1936 db_multi_exec(blob_buffer(&sql));
1937
1938 #if 0
1939 /* only for testing! */
1940 tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
1941 SET("timelineSql");
1942 #endif
1943
1944 blob_reset(&sql);
1945 blob_append(&sql, "SELECT "
1946 " rid AS rid,"
1947 " uuid AS uuid,"
1948 " mtime AS timestamp,"
1949 " timestampString AS timestampString,"
1950 " comment AS comment, "
1951 " user AS user,"
1952 " isLeaf AS isLeaf," /*FIXME: convert to JSON bool */
1953 " bgColor AS bgColor," /* why always null? */
1954 " eventType AS eventType,"
1955 " tags AS tags," /*FIXME: split this into
1956 a JSON array*/
1957 " tagId AS tagId"
1958 " FROM json_timeline"
1959 " ORDER BY sortId",
1960 -1);
1961 db_prepare(&q,blob_buffer(&sql));
1962 blob_reset(&sql);
1963 listV = cson_value_new_array();
1964 list = cson_value_get_array(listV);
1965 tmp = listV;
1966 SET("timeline");
1967 while( (SQLITE_ROW == db_step(&q) )){
1968 /* convert each row into a JSON object...*/
1969 cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
1970 cson_object * row = cson_value_get_object(rowV);
1971 cson_string const * tagsStr = NULL;
1972 if(!row){
1973 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
1974 "Could not convert at least one timeline result row to JSON." );
1975 continue;
1976 }
1977 /* Split tags string field into JSON Array... */
1978 cson_array_append(list, rowV);
1979 tagsStr = cson_value_get_string(cson_object_get(row,"tags"));
1980 if(tagsStr){
1981 cson_value * tags = json_string_split2( cson_string_cstr(tagsStr),
1982 ',', 0);
1983 if( tags ){
1984 if(0 != cson_object_set(row,"tags",tags)){
1985 cson_value_free(tags);
1986 }else{
1987 /*replaced/deleted old tags value, invalidating tagsStr*/;
1988 tagsStr = NULL;
1989 }
1990 }else{
1991 json_warn(FSL_JSON_W_STRING_TO_ARRAY_FAILED,
1992 "Could not convert tags string to array.");
1993 }
1994 }
1995
1996 /* replace isLeaf int w/ JSON bool */
1997 tmp = cson_object_get(row,"isLeaf");
1998 if(tmp && cson_value_is_integer(tmp)){
1999 cson_object_set(row,"isLeaf",
2000 cson_value_get_integer(tmp)
2001 ? cson_value_true()
2002 : cson_value_false());
2003 tmp = NULL;
2004 }
2005 }
2006 db_finalize(&q);
2007 #undef SET
2008 goto ok;
2009 error:
2010 assert( 0 != g.json.resultCode );
2011 cson_value_free(payV);
2012 payV = NULL;
2013 ok:
2014 return payV;
2015 }
2016
2017 /*
2018 ** Implementation of /json/timeline/wiki.
2019 **
2020 */
2021 static cson_value * json_timeline_wiki(){
2022 /* This code is 95% the same as json_timeline_ci(), by the way. */
2023 cson_value * payV = NULL;
2024 cson_object * pay = NULL;
2025 cson_value * tmp = NULL;
2026 cson_value * listV = NULL;
2027 cson_array * list = NULL;
2028 int check = 0;
2029 Stmt q;
2030 Blob sql = empty_blob;
2031 if( !g.perm.Read || !g.perm.RdWiki ){
2032 g.json.resultCode = FSL_JSON_E_DENIED;
2033 return NULL;
2034 }
2035 payV = cson_value_new_object();
2036 pay = cson_value_get_object(payV);
2037 json_timeline_setup_sql( "w", &sql, pay );
2038 #define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
2039 g.json.resultCode = (cson_rc.AllocError==check) \
2040 ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
2041 goto error;\
2042 }
2043 db_multi_exec(blob_buffer(&sql));
2044
2045 #if 0
2046 /* only for testing! */
2047 tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
2048 SET("timelineSql");
2049 #endif
2050
2051 blob_reset(&sql);
2052 blob_append(&sql, "SELECT rid AS rid,"
2053 " uuid AS uuid,"
2054 " mtime AS timestamp,"
2055 " timestampString AS timestampString,"
2056 " comment AS comment, "
2057 " user AS user,"
2058 " eventType AS eventType"
2059 #if 0
2060 /* can wiki pages have tags? */
2061 " tags AS tags," /*FIXME: split this into
2062 a JSON array*/
2063 " tagId AS tagId,"
2064 #endif
2065 " FROM json_timeline"
2066 " ORDER BY sortId",
2067 -1);
2068 db_prepare(&q, blob_buffer(&sql));
2069 blob_reset(&sql);
2070 listV = cson_value_new_array();
2071 list = cson_value_get_array(listV);
2072 tmp = listV;
2073 SET("timeline");
2074 while( (SQLITE_ROW == db_step(&q) )){
2075 /* convert each row into a JSON object...*/
2076 cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
2077 cson_object * row = cson_value_get_object(rowV);
2078 int rc;
2079 if(!row){
2080 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
2081 "Could not convert at least one timeline result row to JSON." );
2082 continue;
2083 }
2084 rc = cson_array_append( list, rowV );
2085 if( 0 != rc ){
2086 cson_value_free(rowV);
2087 g.json.resultCode = (cson_rc.AllocError==rc)
2088 ? FSL_JSON_E_ALLOC
2089 : FSL_JSON_E_UNKNOWN;
2090 goto error;
2091 }
2092 }
2093 db_finalize(&q);
2094 #undef SET
2095 goto ok;
2096 error:
2097 assert( 0 != g.json.resultCode );
2098 cson_value_free(payV);
2099 payV = NULL;
2100 ok:
2101 return payV;
2102 }
2103
2104 /*
2105 ** Implementation of /json/timeline/ticket.
2106 **
2107 */
2108 static cson_value * json_timeline_ticket(){
2109 /* This code is 95% the same as json_timeline_ci(), by the way. */
2110 cson_value * payV = NULL;
2111 cson_object * pay = NULL;
2112 cson_value * tmp = NULL;
2113 cson_value * listV = NULL;
2114 cson_array * list = NULL;
2115 int check = 0;
2116 Stmt q;
2117 Blob sql = empty_blob;
2118 if( !g.perm.Read || !g.perm.RdTkt ){
2119 g.json.resultCode = FSL_JSON_E_DENIED;
2120 return NULL;
2121 }
2122 payV = cson_value_new_object();
2123 pay = cson_value_get_object(payV);
2124 json_timeline_setup_sql( "t", &sql, pay );
2125 db_multi_exec(blob_buffer(&sql));
2126 #define SET(K) if(0!=(check=cson_object_set(pay,K,tmp))){ \
2127 g.json.resultCode = (cson_rc.AllocError==check) \
2128 ? FSL_JSON_E_ALLOC : FSL_JSON_E_UNKNOWN; \
2129 goto error;\
2130 }
2131
2132 #if 0
2133 /* only for testing! */
2134 tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)));
2135 SET("timelineSql");
2136 #endif
2137
2138 blob_reset(&sql);
2139 blob_append(&sql, "SELECT rid AS rid,"
2140 " uuid AS uuid,"
2141 " mtime AS timestamp,"
2142 " timestampString AS timestampString,"
2143 " user AS user,"
2144 " eventType AS eventType,"
2145 " comment AS comment,"
2146 " brief AS briefComment"
2147 " FROM json_timeline"
2148 " ORDER BY sortId",
2149 -1);
2150 db_prepare(&q,blob_buffer(&sql));
2151 blob_reset(&sql);
2152 listV = cson_value_new_array();
2153 list = cson_value_get_array(listV);
2154 tmp = listV;
2155 SET("timeline");
2156 while( (SQLITE_ROW == db_step(&q) )){
2157 /* convert each row into a JSON object...*/
2158 int rc;
2159 cson_value * rowV = cson_sqlite3_row_to_object(q.pStmt);
2160 cson_object * row = cson_value_get_object(rowV);
2161 if(!row){
2162 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
2163 "Could not convert at least one timeline result row to JSON." );
2164 continue;
2165 }
2166 rc = cson_array_append( list, rowV );
2167 if( 0 != rc ){
2168 cson_value_free(rowV);
2169 g.json.resultCode = (cson_rc.AllocError==rc)
2170 ? FSL_JSON_E_ALLOC
2171 : FSL_JSON_E_UNKNOWN;
2172 goto error;
2173 }
2174 }
2175 db_finalize(&q);
2176 #undef SET
2177 goto ok;
2178 error:
2179 assert( 0 != g.json.resultCode );
2180 cson_value_free(payV);
2181 payV = NULL;
2182 ok:
2183 return payV;
2184 }
2185
2186
2187 /*
2188 ** Implements the /json/whoami page/command.
2189 */
2190 static cson_value * json_page_whoami(){
2191 cson_value * payload = NULL;
2192 cson_object * obj = NULL;
2193 Stmt q;
2194 db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
2195 if( db_step(&q)==SQLITE_ROW ){
2196
2197 /* reminder: we don't use g.zLogin because it's 0 for the guest
2198 user and the HTML UI appears to currently allow the name to be
2199 changed (but doing so would break other code). */
2200 char const * str;
2201 payload = cson_value_new_object();
2202 obj = cson_value_get_object(payload);
2203 str = (char const *)sqlite3_column_text(q.pStmt,0);
2204 if( str ){
2205 cson_object_set( obj, "name",
2206 cson_value_new_string(str,strlen(str)) );
2207 }
2208 str = (char const *)sqlite3_column_text(q.pStmt,1);
2209 if( str ){
2210 cson_object_set( obj, "capabilities",
2211 cson_value_new_string(str,strlen(str)) );
2212 }
2213 if( g.json.authToken ){
2214 cson_object_set( obj, "authToken", g.json.authToken );
2215 }
2216 }else{
2217 g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
2218 }
2219 db_finalize(&q);
2220 return payload;
2221 }
2222
2223 /*
2224 ** Impl of /json/user/list. Requires admin rights.
2225 */
2226 static cson_value * json_user_list(){
2227
--- src/json.c
+++ src/json.c
@@ -39,10 +39,21 @@
39
40 #if INTERFACE
41 #include "json_detail.h" /* workaround for apparent enum limitation in makeheaders */
42 #endif
43
44 const FossilJsonKeys_ FossilJsonKeys = {
45 "anonymousSeed" /*anonymousSeed*/,
46 "authToken" /*authToken*/,
47 "COMMAND_PATH" /*commandPath*/,
48 "payload" /* payload */,
49 "requestId" /*requestId*/,
50 "resultCode" /*resultCode*/,
51 "resultText" /*resultText*/,
52 "timestamp" /*timestamp*/
53 };
54
55 /*
56 ** Internal helpers to manipulate a byte array as a bitset. The B
57 ** argument must be-a array at least (BIT/8+1) bytes long.
58 ** The BIT argument is the bit number to query/set/clear/toggle.
59 */
@@ -280,11 +291,11 @@
291 **
292 ** If it finds a value and that value is-a JSON number or is a string
293 ** which looks like an integer or is-a JSON bool then it is converted
294 ** to an int. If none of those apply then dflt is returned.
295 */
296 int json_getenv_int(char const * pKey, int dflt ){
297 cson_value const * v = json_getenv(pKey);
298 if(!v){
299 return dflt;
300 }else if( cson_value_is_number(v) ){
301 return (int)cson_value_get_integer(v);
@@ -306,11 +317,11 @@
317 ** value is-a String. Non-strings are not converted to strings for
318 ** this purpose. Returned memory is owned by g.json or fossil and is
319 ** valid until end-of-app or the given key is replaced in fossil's
320 ** internals via cgi_replace_parameter() and friends or json_setenv().
321 */
322 char const * json_getenv_cstr( char const * zKey ){
323 return cson_value_get_cstr( json_getenv(zKey) );
324 }
325
326
327 /*
@@ -859,11 +870,10 @@
870 */
871 char const * json_auth_token_cstr(){
872 return cson_value_get_cstr( json_auth_token() );
873 }
874
 
875 /*
876 ** Returns the JsonPageDef with the given name, or NULL if no match is
877 ** found.
878 **
879 ** head must be a pointer to an array of JsonPageDefs in which the
@@ -911,11 +921,11 @@
921 /*
922 ** Convenience routine which converts a Julian time value into a Unix
923 ** Epoch timestamp. Requires the db, so this cannot be used before the
924 ** repo is opened (will trigger a fatal error in db_xxx()).
925 */
926 cson_value * json_julian_to_timestamp(double j){
927 return cson_value_new_integer((cson_int_t)
928 db_int64(0,"SELECT strftime('%%s',%lf)",j)
929 );
930 }
931
@@ -1300,48 +1310,10 @@
1310 return jv;
1311 #undef SETBUF
1312 }
1313
1314
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1315
1316 static cson_value * json_user_list();
1317 static cson_value * json_user_get();
1318 #if 0
1319 static cson_value * json_user_create();
@@ -1359,26 +1331,11 @@
1331 /* Last entry MUST have a NULL name. */
1332 {NULL,NULL,0}
1333 };
1334
1335
1336 cson_value * json_page_dispatch_helper(JsonPageDef const * pages){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1337 JsonPageDef const * def;
1338 char const * cmd = json_command_arg(1+g.json.dispatchDepth);
1339 assert( NULL != pages );
1340 if( ! cmd ){
1341 g.json.resultCode = FSL_JSON_E_MISSING_ARGS;
@@ -1400,229 +1357,10 @@
1357 **
1358 */
1359 static cson_value * json_page_user(){
1360 return json_page_dispatch_helper(&JsonPageDefs_User[0]);
1361 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1362
1363 static cson_value * json_branch_list();
1364 /*
1365 ** Mapping of /json/branch/XXX commands/paths to callbacks.
1366 */
@@ -1737,490 +1475,10 @@
1475 }
1476 }
1477 return payV;
1478 }
1479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1480
1481 /*
1482 ** Impl of /json/user/list. Requires admin rights.
1483 */
1484 static cson_value * json_user_list(){
1485
+36 -11
--- src/json_detail.h
+++ src/json_detail.h
@@ -129,27 +129,52 @@
129129
} JsonPageDef;
130130
131131
/*
132132
** Holds common keys used for various JSON API properties.
133133
*/
134
-static const struct FossilJsonKeys_{
134
+typedef struct FossilJsonKeys_{
135135
/** maintainers: please keep alpha sorted (case-insensitive) */
136136
char const * anonymousSeed;
137137
char const * authToken;
138138
char const * commandPath;
139139
char const * payload;
140140
char const * requestId;
141141
char const * resultCode;
142142
char const * resultText;
143143
char const * timestamp;
144
-} FossilJsonKeys = {
145
- "anonymousSeed" /*anonymousSeed*/,
146
- "authToken" /*authToken*/,
147
- "COMMAND_PATH" /*commandPath*/,
148
- "payload" /* payload */,
149
- "requestId" /*requestId*/,
150
- "resultCode" /*resultCode*/,
151
- "resultText" /*resultText*/,
152
- "timestamp" /*timestamp*/
153
-};
144
+} FossilJsonKeys_;
145
+const FossilJsonKeys_ FossilJsonKeys;
146
+
147
+/*
148
+** A page/command dispatch helper for fossil_json_f() implementations.
149
+** pages must be an array of JsonPageDef commands which we can
150
+** dispatch. The final item in the array MUST have a NULL name
151
+** element.
152
+**
153
+** This function takes the command specified in
154
+** json_comand_arg(1+g.json.dispatchDepth) and searches pages for a
155
+** matching name. If found then that page's func() is called to fetch
156
+** the payload, which is returned to the caller.
157
+**
158
+** On error, g.json.resultCode is set to one of the FossilJsonCodes
159
+** values and NULL is returned. If non-NULL is returned, ownership is
160
+** transfered to the caller.
161
+*/
162
+cson_value * json_page_dispatch_helper(JsonPageDef const * pages);
163
+
164
+/*
165
+** Implements the /json/wiki family of pages/commands.
166
+**
167
+*/
168
+cson_value * json_page_wiki();
169
+
170
+/*
171
+** Implements /json/timeline/wiki and /json/wiki/timeline.
172
+*/
173
+cson_value * json_timeline_wiki();
174
+
175
+/*
176
+** Implements /json/timeline family of functions.
177
+*/
178
+cson_value * json_page_timeline();
154179
155180
#endif/*FOSSIL_JSON_DETAIL_H_INCLUDED*/
156181
--- src/json_detail.h
+++ src/json_detail.h
@@ -129,27 +129,52 @@
129 } JsonPageDef;
130
131 /*
132 ** Holds common keys used for various JSON API properties.
133 */
134 static const struct FossilJsonKeys_{
135 /** maintainers: please keep alpha sorted (case-insensitive) */
136 char const * anonymousSeed;
137 char const * authToken;
138 char const * commandPath;
139 char const * payload;
140 char const * requestId;
141 char const * resultCode;
142 char const * resultText;
143 char const * timestamp;
144 } FossilJsonKeys = {
145 "anonymousSeed" /*anonymousSeed*/,
146 "authToken" /*authToken*/,
147 "COMMAND_PATH" /*commandPath*/,
148 "payload" /* payload */,
149 "requestId" /*requestId*/,
150 "resultCode" /*resultCode*/,
151 "resultText" /*resultText*/,
152 "timestamp" /*timestamp*/
153 };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
155 #endif/*FOSSIL_JSON_DETAIL_H_INCLUDED*/
156
--- src/json_detail.h
+++ src/json_detail.h
@@ -129,27 +129,52 @@
129 } JsonPageDef;
130
131 /*
132 ** Holds common keys used for various JSON API properties.
133 */
134 typedef struct FossilJsonKeys_{
135 /** maintainers: please keep alpha sorted (case-insensitive) */
136 char const * anonymousSeed;
137 char const * authToken;
138 char const * commandPath;
139 char const * payload;
140 char const * requestId;
141 char const * resultCode;
142 char const * resultText;
143 char const * timestamp;
144 } FossilJsonKeys_;
145 const FossilJsonKeys_ FossilJsonKeys;
146
147 /*
148 ** A page/command dispatch helper for fossil_json_f() implementations.
149 ** pages must be an array of JsonPageDef commands which we can
150 ** dispatch. The final item in the array MUST have a NULL name
151 ** element.
152 **
153 ** This function takes the command specified in
154 ** json_comand_arg(1+g.json.dispatchDepth) and searches pages for a
155 ** matching name. If found then that page's func() is called to fetch
156 ** the payload, which is returned to the caller.
157 **
158 ** On error, g.json.resultCode is set to one of the FossilJsonCodes
159 ** values and NULL is returned. If non-NULL is returned, ownership is
160 ** transfered to the caller.
161 */
162 cson_value * json_page_dispatch_helper(JsonPageDef const * pages);
163
164 /*
165 ** Implements the /json/wiki family of pages/commands.
166 **
167 */
168 cson_value * json_page_wiki();
169
170 /*
171 ** Implements /json/timeline/wiki and /json/wiki/timeline.
172 */
173 cson_value * json_timeline_wiki();
174
175 /*
176 ** Implements /json/timeline family of functions.
177 */
178 cson_value * json_page_timeline();
179
180 #endif/*FOSSIL_JSON_DETAIL_H_INCLUDED*/
181
+37 -1
--- src/json_login.c
+++ src/json_login.c
@@ -1,7 +1,6 @@
11
#include "config.h"
2
-#include "VERSION.h"
32
#include "json_login.h"
43
54
#if INTERFACE
65
#include "json_detail.h"
76
#endif
@@ -178,5 +177,42 @@
178177
cson_value_new_string( zCaptcha, strlen(zCaptcha) )
179178
);
180179
return v;
181180
}
182181
182
+
183
+
184
+/*
185
+** Implements the /json/whoami page/command.
186
+*/
187
+cson_value * json_page_whoami(){
188
+ cson_value * payload = NULL;
189
+ cson_object * obj = NULL;
190
+ Stmt q;
191
+ db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
192
+ if( db_step(&q)==SQLITE_ROW ){
193
+
194
+ /* reminder: we don't use g.zLogin because it's 0 for the guest
195
+ user and the HTML UI appears to currently allow the name to be
196
+ changed (but doing so would break other code). */
197
+ char const * str;
198
+ payload = cson_value_new_object();
199
+ obj = cson_value_get_object(payload);
200
+ str = (char const *)sqlite3_column_text(q.pStmt,0);
201
+ if( str ){
202
+ cson_object_set( obj, "name",
203
+ cson_value_new_string(str,strlen(str)) );
204
+ }
205
+ str = (char const *)sqlite3_column_text(q.pStmt,1);
206
+ if( str ){
207
+ cson_object_set( obj, "capabilities",
208
+ cson_value_new_string(str,strlen(str)) );
209
+ }
210
+ if( g.json.authToken ){
211
+ cson_object_set( obj, "authToken", g.json.authToken );
212
+ }
213
+ }else{
214
+ g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
215
+ }
216
+ db_finalize(&q);
217
+ return payload;
218
+}
183219
184220
ADDED src/json_timeline.c
185221
ADDED src/json_wiki.c
--- src/json_login.c
+++ src/json_login.c
@@ -1,7 +1,6 @@
1 #include "config.h"
2 #include "VERSION.h"
3 #include "json_login.h"
4
5 #if INTERFACE
6 #include "json_detail.h"
7 #endif
@@ -178,5 +177,42 @@
178 cson_value_new_string( zCaptcha, strlen(zCaptcha) )
179 );
180 return v;
181 }
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
184 DDED src/json_timeline.c
185 DDED src/json_wiki.c
--- src/json_login.c
+++ src/json_login.c
@@ -1,7 +1,6 @@
1 #include "config.h"
 
2 #include "json_login.h"
3
4 #if INTERFACE
5 #include "json_detail.h"
6 #endif
@@ -178,5 +177,42 @@
177 cson_value_new_string( zCaptcha, strlen(zCaptcha) )
178 );
179 return v;
180 }
181
182
183
184 /*
185 ** Implements the /json/whoami page/command.
186 */
187 cson_value * json_page_whoami(){
188 cson_value * payload = NULL;
189 cson_object * obj = NULL;
190 Stmt q;
191 db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
192 if( db_step(&q)==SQLITE_ROW ){
193
194 /* reminder: we don't use g.zLogin because it's 0 for the guest
195 user and the HTML UI appears to currently allow the name to be
196 changed (but doing so would break other code). */
197 char const * str;
198 payload = cson_value_new_object();
199 obj = cson_value_get_object(payload);
200 str = (char const *)sqlite3_column_text(q.pStmt,0);
201 if( str ){
202 cson_object_set( obj, "name",
203 cson_value_new_string(str,strlen(str)) );
204 }
205 str = (char const *)sqlite3_column_text(q.pStmt,1);
206 if( str ){
207 cson_object_set( obj, "capabilities",
208 cson_value_new_string(str,strlen(str)) );
209 }
210 if( g.json.authToken ){
211 cson_object_set( obj, "authToken", g.json.authToken );
212 }
213 }else{
214 g.json.resultCode = FSL_JSON_E_RESOURCE_NOT_FOUND;
215 }
216 db_finalize(&q);
217 return payload;
218 }
219
220 DDED src/json_timeline.c
221 DDED src/json_wiki.c
--- a/src/json_timeline.c
+++ b/src/json_timeline.c
@@ -0,0 +1,148 @@
1
+r warnStringToArrayV);iname)on_(c) json_timeli);yV);
2
+r chck =on_(c) json_time;comcommici, 0},
3
+{"-1},
4
+{"tkcic,
5
+ @ tagid,
6
+ @ sortId"sortIsortIelse if(g.isHTTP){
7
+ zTag = json_getenv_cstr("tag");
8
+ }else{
9
+ zTag = fincson_(c) json_timeli);yV);
10
+r check = );
11
+/*
12
+** Mapping of /json/timeline/XXX commands/paths to {"cname)on_(c) json_ci, 0},
13
+{"ci",tt0},
14
+{"comname)on_(c) json_ci, 0"w-1Read ){
15
+ /* IMO this falls more under the category of g.p0y, but
16
+ i'm following timpl hereo) json_timeli
17
+ goto end;
18
+0
19
+
20
+ end:char warnStringToArray0},
21
+{"wikname)on_(c) json_timeli0yV);
22
+r chck =on_(c) json_time;comcommici, 0},
23
+{"-1},
24
+{"tkcic,
25
+ @ tagid,
26
+ @ sortId"sortIsortIcg.json.resultCode = checkcheck) \
27
+rid AS rid 3 different names
28
+ cson_(c) json_timeli);yV)t, 0},
29
+{"w-1Read ){
30
+ /* IMO this falls more under the category of g.perm.History, but
31
+ i'm following timpl hereo) json_timeli
32
+ goto end;
33
+);
34
+
35
+ end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
36
+r chck =on_(c) json_time;comcommici, 0},
37
+{"-1},
38
+{"tkcic,
39
+ @ tagid,
40
+ @ sortId"sortIsortIelse if(g.isHTTP){
41
+ zTag = json_getenv_cstr("tag");
42
+ }else{
43
+ zTag = fincson_(c) json_timeli);yV);
44
+r check = );
45
+/*
46
+** Mapping of /json/timeline/XXX commands/paths to callbacks.
47
+*/
48
+static con forms are only enabled in CLI mode, to avoid
49
+ that we end up with HTTP clients using 3 different names
50
+ for the same requests.
51
+*/
52
+{"branch", json_timeline_branch, 0},
53
+{"checkin", json_timelinecci, -1},
54
+{"tticket, -1},
55
+{"ticketticket, 0},
56
+{"w-1Read ){
57
+ /* IMO this falls more under the category of g.perm.History, but
58
+ i'm following timpl hereo) json_timeli
59
+ goto end;
60
+);
61
+
62
+ end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
63
+r chck =on_(c) json_time;comcommici, 0},
64
+{"-1},
65
+{"tkcic,
66
+ @ tagid,
67
+ @ sortId"sortIsortIcg.json.resultCode = checkcheck) \
68
+g.json.resultCode = checkcheck) \
69
+
70
+/* && !dWiki*/ FSL_JSON_E_DENIEDcket, 0},
71
+{"w-1Read ){
72
+ead || !g.perm.RdWiki FSL_JSON_E_DENIEDcket, 0},
73
+{"w-1Read ){
74
+ead || !g.perm.RdTkt FSL_JSON_E_DENIEDcket, 0},
75
+{"w-1Read ){
76
+showFshow- and (if pPayload is not NULL) adds the
77
+** limit value as the "limit" property of pPayloadeli
78
+ goto end;
79
+);
80
+
81
+ end:char Blob * ){3ci", &sql, pay "
82
+ " 3 different names
83
+ for the same requests.
84
+*/
85
+{"branch", json_timeline_branch, 0},
86
+{"checkin", json_timelinecci, -1},
87
+{"tticket, -1},
88
+{"ticketticket, 0},
89
+{"w-1Read ){
90
+ /* IMO this falls more under the category of g.perm.History, but
91
+ i'm following timpl hereo) json_timeli
92
+ goto end;
93
+);
94
+
95
+ end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
96
+r chck =on_(c) json_time;comcommici, 0},
97
+{"-1},
98
+{"tkcic,
99
+ @ tagid,
100
+ @ sortId"sortIsortIelse if(g.isHTTP){
101
+ zTag = json_getenv_cstr("tag");
102
+ }else{
103
+ zTag = fincson_(c) json_timeli);yV);
104
+r check = );
105
+/*
106
+** Mapping of /json/timeline/XXX commands/paths to callbacks.
107
+*/
108
+static con forms are only enabled in CLI mode, to avoid
109
+ that we end up with HTTP clients using 3 different names
110
+ for the same requests.
111
+*/
112
+{"branch", json_timeline_branch, 0},
113
+{"checkin", json_timelinecci, -1},
114
+{"tticket, -1},
115
+{"ticketticket, 0},
116
+{"w-1Read ){
117
+ /* IMO this falls more under the category of g.perm.History, but
118
+ i'm following timpl hereo) json_timeli
119
+ goto end;
120
+);
121
+
122
+ end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
123
+r chck =on_(c) json_time;comcommici, 0},
124
+{"-1},
125
+{"tkcic,
126
+ @ tagid,
127
+ cson_(c) json_timeli);yV);
128
+r cheWikipayw", &sql, pay isHTTPcson_value * tagLi,
129
+{"w-1R"
130
+tags AS tagswarnStringToArrayV);iname)on_(cngToArrayV);in,
131
+{"w-1Rstring const * tagsStragsStrstring(tags"));
132
+ if(tagsStrtags = json_string_split2(r warnStringTr warnStringToArrayV);cson_value_n{arnStringToArrayV);iname)on_(c) json_timeli);yV);
133
+r chck =on_(c) json_time;comcommici, 0},(c) json_timeli);yV);
134
+r chck =on_(c) json_time;comcommici, 0},
135
+{"-1},
136
+{"tkcic,
137
+ @ int rcrc =return payV;
138
+}
139
+
140
+stateULL) adds the
141
+** limblob_append(&sql "arnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);"w-1Read ){
142
+showF -1);blob_append(&sqlarnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);"w-1Read ){
143
+showF -1);blob_append(&sqlarnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);yV);
144
+r ch
145
+ }else{
146
+ -1);rcwiki, 0},
147
+{"w-1Read ){
148
+ /*
--- a/src/json_timeline.c
+++ b/src/json_timeline.c
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/json_timeline.c
+++ b/src/json_timeline.c
@@ -0,0 +1,148 @@
1 r warnStringToArrayV);iname)on_(c) json_timeli);yV);
2 r chck =on_(c) json_time;comcommici, 0},
3 {"-1},
4 {"tkcic,
5 @ tagid,
6 @ sortId"sortIsortIelse if(g.isHTTP){
7 zTag = json_getenv_cstr("tag");
8 }else{
9 zTag = fincson_(c) json_timeli);yV);
10 r check = );
11 /*
12 ** Mapping of /json/timeline/XXX commands/paths to {"cname)on_(c) json_ci, 0},
13 {"ci",tt0},
14 {"comname)on_(c) json_ci, 0"w-1Read ){
15 /* IMO this falls more under the category of g.p0y, but
16 i'm following timpl hereo) json_timeli
17 goto end;
18 0
19
20 end:char warnStringToArray0},
21 {"wikname)on_(c) json_timeli0yV);
22 r chck =on_(c) json_time;comcommici, 0},
23 {"-1},
24 {"tkcic,
25 @ tagid,
26 @ sortId"sortIsortIcg.json.resultCode = checkcheck) \
27 rid AS rid 3 different names
28 cson_(c) json_timeli);yV)t, 0},
29 {"w-1Read ){
30 /* IMO this falls more under the category of g.perm.History, but
31 i'm following timpl hereo) json_timeli
32 goto end;
33 );
34
35 end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
36 r chck =on_(c) json_time;comcommici, 0},
37 {"-1},
38 {"tkcic,
39 @ tagid,
40 @ sortId"sortIsortIelse if(g.isHTTP){
41 zTag = json_getenv_cstr("tag");
42 }else{
43 zTag = fincson_(c) json_timeli);yV);
44 r check = );
45 /*
46 ** Mapping of /json/timeline/XXX commands/paths to callbacks.
47 */
48 static con forms are only enabled in CLI mode, to avoid
49 that we end up with HTTP clients using 3 different names
50 for the same requests.
51 */
52 {"branch", json_timeline_branch, 0},
53 {"checkin", json_timelinecci, -1},
54 {"tticket, -1},
55 {"ticketticket, 0},
56 {"w-1Read ){
57 /* IMO this falls more under the category of g.perm.History, but
58 i'm following timpl hereo) json_timeli
59 goto end;
60 );
61
62 end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
63 r chck =on_(c) json_time;comcommici, 0},
64 {"-1},
65 {"tkcic,
66 @ tagid,
67 @ sortId"sortIsortIcg.json.resultCode = checkcheck) \
68 g.json.resultCode = checkcheck) \
69
70 /* && !dWiki*/ FSL_JSON_E_DENIEDcket, 0},
71 {"w-1Read ){
72 ead || !g.perm.RdWiki FSL_JSON_E_DENIEDcket, 0},
73 {"w-1Read ){
74 ead || !g.perm.RdTkt FSL_JSON_E_DENIEDcket, 0},
75 {"w-1Read ){
76 showFshow- and (if pPayload is not NULL) adds the
77 ** limit value as the "limit" property of pPayloadeli
78 goto end;
79 );
80
81 end:char Blob * ){3ci", &sql, pay "
82 " 3 different names
83 for the same requests.
84 */
85 {"branch", json_timeline_branch, 0},
86 {"checkin", json_timelinecci, -1},
87 {"tticket, -1},
88 {"ticketticket, 0},
89 {"w-1Read ){
90 /* IMO this falls more under the category of g.perm.History, but
91 i'm following timpl hereo) json_timeli
92 goto end;
93 );
94
95 end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
96 r chck =on_(c) json_time;comcommici, 0},
97 {"-1},
98 {"tkcic,
99 @ tagid,
100 @ sortId"sortIsortIelse if(g.isHTTP){
101 zTag = json_getenv_cstr("tag");
102 }else{
103 zTag = fincson_(c) json_timeli);yV);
104 r check = );
105 /*
106 ** Mapping of /json/timeline/XXX commands/paths to callbacks.
107 */
108 static con forms are only enabled in CLI mode, to avoid
109 that we end up with HTTP clients using 3 different names
110 for the same requests.
111 */
112 {"branch", json_timeline_branch, 0},
113 {"checkin", json_timelinecci, -1},
114 {"tticket, -1},
115 {"ticketticket, 0},
116 {"w-1Read ){
117 /* IMO this falls more under the category of g.perm.History, but
118 i'm following timpl hereo) json_timeli
119 goto end;
120 );
121
122 end:char warnStringToArrayV);iname)on_(c) json_timeli);yV);
123 r chck =on_(c) json_time;comcommici, 0},
124 {"-1},
125 {"tkcic,
126 @ tagid,
127 cson_(c) json_timeli);yV);
128 r cheWikipayw", &sql, pay isHTTPcson_value * tagLi,
129 {"w-1R"
130 tags AS tagswarnStringToArrayV);iname)on_(cngToArrayV);in,
131 {"w-1Rstring const * tagsStragsStrstring(tags"));
132 if(tagsStrtags = json_string_split2(r warnStringTr warnStringToArrayV);cson_value_n{arnStringToArrayV);iname)on_(c) json_timeli);yV);
133 r chck =on_(c) json_time;comcommici, 0},(c) json_timeli);yV);
134 r chck =on_(c) json_time;comcommici, 0},
135 {"-1},
136 {"tkcic,
137 @ int rcrc =return payV;
138 }
139
140 stateULL) adds the
141 ** limblob_append(&sql "arnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);"w-1Read ){
142 showF -1);blob_append(&sqlarnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);"w-1Read ){
143 showF -1);blob_append(&sqlarnStringToArrayV);iname)on_(c) je)on_(c) json_timeli);yV);
144 r ch
145 }else{
146 -1);rcwiki, 0},
147 {"w-1Read ){
148 /*
--- a/src/json_wiki.c
+++ b/src/json_wiki.c
@@ -0,0 +1,8 @@
1
+tion to parse wiki output. It#if 0ion to parse wiki output. It it is currently
2
+** unparsion to parse wiki outption to parse wikv);
3
+o,"",bool());
4
+#endif/parsion to_or_save(char createMode{
5
+ if(!NOT_FOUND; parse wiki outption to parse wikv);
6
+o,"",bool());
7
+#endiftion to parse wiki output. It#if 0ion to parse wiki output. It it is currently
8
+** unparsio/* FIXME: add G. */
--- a/src/json_wiki.c
+++ b/src/json_wiki.c
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
--- a/src/json_wiki.c
+++ b/src/json_wiki.c
@@ -0,0 +1,8 @@
1 tion to parse wiki output. It#if 0ion to parse wiki output. It it is currently
2 ** unparsion to parse wiki outption to parse wikv);
3 o,"",bool());
4 #endif/parsion to_or_save(char createMode{
5 if(!NOT_FOUND; parse wiki outption to parse wikv);
6 o,"",bool());
7 #endiftion to parse wiki output. It#if 0ion to parse wiki output. It it is currently
8 ** unparsio/* FIXME: add G. */
+22 -2
--- src/main.mk
+++ src/main.mk
@@ -49,10 +49,12 @@
4949
$(SRCDIR)/http_transport.c \
5050
$(SRCDIR)/import.c \
5151
$(SRCDIR)/info.c \
5252
$(SRCDIR)/json.c \
5353
$(SRCDIR)/json_login.c \
54
+ $(SRCDIR)/json_timeline.c \
55
+ $(SRCDIR)/json_wiki.c \
5456
$(SRCDIR)/leaf.c \
5557
$(SRCDIR)/login.c \
5658
$(SRCDIR)/main.c \
5759
$(SRCDIR)/manifest.c \
5860
$(SRCDIR)/md5.c \
@@ -135,10 +137,12 @@
135137
$(OBJDIR)/http_transport_.c \
136138
$(OBJDIR)/import_.c \
137139
$(OBJDIR)/info_.c \
138140
$(OBJDIR)/json_.c \
139141
$(OBJDIR)/json_login_.c \
142
+ $(OBJDIR)/json_timeline_.c \
143
+ $(OBJDIR)/json_wiki_.c \
140144
$(OBJDIR)/leaf_.c \
141145
$(OBJDIR)/login_.c \
142146
$(OBJDIR)/main_.c \
143147
$(OBJDIR)/manifest_.c \
144148
$(OBJDIR)/md5_.c \
@@ -221,10 +225,12 @@
221225
$(OBJDIR)/http_transport.o \
222226
$(OBJDIR)/import.o \
223227
$(OBJDIR)/info.o \
224228
$(OBJDIR)/json.o \
225229
$(OBJDIR)/json_login.o \
230
+ $(OBJDIR)/json_timeline.o \
231
+ $(OBJDIR)/json_wiki.o \
226232
$(OBJDIR)/leaf.o \
227233
$(OBJDIR)/login.o \
228234
$(OBJDIR)/main.o \
229235
$(OBJDIR)/manifest.o \
230236
$(OBJDIR)/md5.o \
@@ -325,14 +331,14 @@
325331
326332
327333
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
328334
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
329335
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
330
- $(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_login_.c:$(OBJDIR)/json_login.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
336
+ $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
331337
touch $(OBJDIR)/headers
332338
$(OBJDIR)/headers: Makefile
333
-$(OBJDIR)/json.o $(OBJDIR)/json_login.o : $(SRCDIR)/json_detail.h
339
+$(OBJDIR)/json.o $(OBJDIR)/json_login.o $(OBJDIR)/json_wiki.o $(OBJDIR)/json_timeline.o : $(SRCDIR)/json_detail.h
334340
Makefile:
335341
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
336342
$(OBJDIR)/translate $(SRCDIR)/add.c >$(OBJDIR)/add_.c
337343
338344
$(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
@@ -610,10 +616,24 @@
610616
611617
$(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
612618
$(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
613619
614620
$(OBJDIR)/json_login.h: $(OBJDIR)/headers
621
+$(OBJDIR)/json_timeline_.c: $(SRCDIR)/json_timeline.c $(OBJDIR)/translate
622
+ $(OBJDIR)/translate $(SRCDIR)/json_timeline.c >$(OBJDIR)/json_timeline_.c
623
+
624
+$(OBJDIR)/json_timeline.o: $(OBJDIR)/json_timeline_.c $(OBJDIR)/json_timeline.h $(SRCDIR)/config.h
625
+ $(XTCC) -o $(OBJDIR)/json_timeline.o -c $(OBJDIR)/json_timeline_.c
626
+
627
+$(OBJDIR)/json_timeline.h: $(OBJDIR)/headers
628
+$(OBJDIR)/json_wiki_.c: $(SRCDIR)/json_wiki.c $(OBJDIR)/translate
629
+ $(OBJDIR)/translate $(SRCDIR)/json_wiki.c >$(OBJDIR)/json_wiki_.c
630
+
631
+$(OBJDIR)/json_wiki.o: $(OBJDIR)/json_wiki_.c $(OBJDIR)/json_wiki.h $(SRCDIR)/config.h
632
+ $(XTCC) -o $(OBJDIR)/json_wiki.o -c $(OBJDIR)/json_wiki_.c
633
+
634
+$(OBJDIR)/json_wiki.h: $(OBJDIR)/headers
615635
$(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
616636
$(OBJDIR)/translate $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
617637
618638
$(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
619639
$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
620640
--- src/main.mk
+++ src/main.mk
@@ -49,10 +49,12 @@
49 $(SRCDIR)/http_transport.c \
50 $(SRCDIR)/import.c \
51 $(SRCDIR)/info.c \
52 $(SRCDIR)/json.c \
53 $(SRCDIR)/json_login.c \
 
 
54 $(SRCDIR)/leaf.c \
55 $(SRCDIR)/login.c \
56 $(SRCDIR)/main.c \
57 $(SRCDIR)/manifest.c \
58 $(SRCDIR)/md5.c \
@@ -135,10 +137,12 @@
135 $(OBJDIR)/http_transport_.c \
136 $(OBJDIR)/import_.c \
137 $(OBJDIR)/info_.c \
138 $(OBJDIR)/json_.c \
139 $(OBJDIR)/json_login_.c \
 
 
140 $(OBJDIR)/leaf_.c \
141 $(OBJDIR)/login_.c \
142 $(OBJDIR)/main_.c \
143 $(OBJDIR)/manifest_.c \
144 $(OBJDIR)/md5_.c \
@@ -221,10 +225,12 @@
221 $(OBJDIR)/http_transport.o \
222 $(OBJDIR)/import.o \
223 $(OBJDIR)/info.o \
224 $(OBJDIR)/json.o \
225 $(OBJDIR)/json_login.o \
 
 
226 $(OBJDIR)/leaf.o \
227 $(OBJDIR)/login.o \
228 $(OBJDIR)/main.o \
229 $(OBJDIR)/manifest.o \
230 $(OBJDIR)/md5.o \
@@ -325,14 +331,14 @@
325
326
327 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
328 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
329 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
330 $(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_login_.c:$(OBJDIR)/json_login.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
331 touch $(OBJDIR)/headers
332 $(OBJDIR)/headers: Makefile
333 $(OBJDIR)/json.o $(OBJDIR)/json_login.o : $(SRCDIR)/json_detail.h
334 Makefile:
335 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
336 $(OBJDIR)/translate $(SRCDIR)/add.c >$(OBJDIR)/add_.c
337
338 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
@@ -610,10 +616,24 @@
610
611 $(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
612 $(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
613
614 $(OBJDIR)/json_login.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615 $(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
616 $(OBJDIR)/translate $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
617
618 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
619 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
620
--- src/main.mk
+++ src/main.mk
@@ -49,10 +49,12 @@
49 $(SRCDIR)/http_transport.c \
50 $(SRCDIR)/import.c \
51 $(SRCDIR)/info.c \
52 $(SRCDIR)/json.c \
53 $(SRCDIR)/json_login.c \
54 $(SRCDIR)/json_timeline.c \
55 $(SRCDIR)/json_wiki.c \
56 $(SRCDIR)/leaf.c \
57 $(SRCDIR)/login.c \
58 $(SRCDIR)/main.c \
59 $(SRCDIR)/manifest.c \
60 $(SRCDIR)/md5.c \
@@ -135,10 +137,12 @@
137 $(OBJDIR)/http_transport_.c \
138 $(OBJDIR)/import_.c \
139 $(OBJDIR)/info_.c \
140 $(OBJDIR)/json_.c \
141 $(OBJDIR)/json_login_.c \
142 $(OBJDIR)/json_timeline_.c \
143 $(OBJDIR)/json_wiki_.c \
144 $(OBJDIR)/leaf_.c \
145 $(OBJDIR)/login_.c \
146 $(OBJDIR)/main_.c \
147 $(OBJDIR)/manifest_.c \
148 $(OBJDIR)/md5_.c \
@@ -221,10 +225,12 @@
225 $(OBJDIR)/http_transport.o \
226 $(OBJDIR)/import.o \
227 $(OBJDIR)/info.o \
228 $(OBJDIR)/json.o \
229 $(OBJDIR)/json_login.o \
230 $(OBJDIR)/json_timeline.o \
231 $(OBJDIR)/json_wiki.o \
232 $(OBJDIR)/leaf.o \
233 $(OBJDIR)/login.o \
234 $(OBJDIR)/main.o \
235 $(OBJDIR)/manifest.o \
236 $(OBJDIR)/md5.o \
@@ -325,14 +331,14 @@
331
332
333 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
334 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
335 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
336 $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
337 touch $(OBJDIR)/headers
338 $(OBJDIR)/headers: Makefile
339 $(OBJDIR)/json.o $(OBJDIR)/json_login.o $(OBJDIR)/json_wiki.o $(OBJDIR)/json_timeline.o : $(SRCDIR)/json_detail.h
340 Makefile:
341 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
342 $(OBJDIR)/translate $(SRCDIR)/add.c >$(OBJDIR)/add_.c
343
344 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
@@ -610,10 +616,24 @@
616
617 $(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
618 $(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
619
620 $(OBJDIR)/json_login.h: $(OBJDIR)/headers
621 $(OBJDIR)/json_timeline_.c: $(SRCDIR)/json_timeline.c $(OBJDIR)/translate
622 $(OBJDIR)/translate $(SRCDIR)/json_timeline.c >$(OBJDIR)/json_timeline_.c
623
624 $(OBJDIR)/json_timeline.o: $(OBJDIR)/json_timeline_.c $(OBJDIR)/json_timeline.h $(SRCDIR)/config.h
625 $(XTCC) -o $(OBJDIR)/json_timeline.o -c $(OBJDIR)/json_timeline_.c
626
627 $(OBJDIR)/json_timeline.h: $(OBJDIR)/headers
628 $(OBJDIR)/json_wiki_.c: $(SRCDIR)/json_wiki.c $(OBJDIR)/translate
629 $(OBJDIR)/translate $(SRCDIR)/json_wiki.c >$(OBJDIR)/json_wiki_.c
630
631 $(OBJDIR)/json_wiki.o: $(OBJDIR)/json_wiki_.c $(OBJDIR)/json_wiki.h $(SRCDIR)/config.h
632 $(XTCC) -o $(OBJDIR)/json_wiki.o -c $(OBJDIR)/json_wiki_.c
633
634 $(OBJDIR)/json_wiki.h: $(OBJDIR)/headers
635 $(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
636 $(OBJDIR)/translate $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
637
638 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
639 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
640
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -55,10 +55,12 @@
5555
http_transport
5656
import
5757
info
5858
json
5959
json_login
60
+ json_timeline
61
+ json_wiki
6062
leaf
6163
login
6264
main
6365
manifest
6466
md5
@@ -236,11 +238,11 @@
236238
writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
237239
writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
238240
writeln "\t\$(OBJDIR)/makeheaders $mhargs"
239241
writeln "\ttouch \$(OBJDIR)/headers"
240242
writeln "\$(OBJDIR)/headers: Makefile"
241
-writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o : \$(SRCDIR)/json_detail.h"
243
+writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_wiki.o \$(OBJDIR)/json_timeline.o : \$(SRCDIR)/json_detail.h"
242244
writeln "Makefile:"
243245
set extra_h(main) \$(OBJDIR)/page_index.h
244246
245247
foreach s [lsort $src] {
246248
writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
@@ -480,11 +482,11 @@
480482
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
481483
482484
set opt {}
483485
writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c"
484486
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
485
-writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o : \$(SRCDIR)/json_detail.h"
487
+writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_wiki.o \$(OBJDIR)/json_timeline.o : \$(SRCDIR)/json_detail.h"
486488
487489
writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
488490
set opt {-Dmain=sqlite3_shell}
489491
append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
490492
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
@@ -612,10 +614,13 @@
612614
realclean:
613615
-del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
614616
615617
$(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
616618
$(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
619
+$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
620
+$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
621
+
617622
618623
}
619624
foreach s [lsort $src] {
620625
writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
621626
writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
@@ -755,10 +760,12 @@
755760
realclean:
756761
-del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
757762
758763
$(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
759764
$(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
765
+$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
766
+$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
760767
761768
}
762769
foreach s [lsort $src] {
763770
writeln "\$(OX)\\$s\$O : ${s}_.c ${s}.h"
764771
writeln "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
765772
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -55,10 +55,12 @@
55 http_transport
56 import
57 info
58 json
59 json_login
 
 
60 leaf
61 login
62 main
63 manifest
64 md5
@@ -236,11 +238,11 @@
236 writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
237 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
238 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
239 writeln "\ttouch \$(OBJDIR)/headers"
240 writeln "\$(OBJDIR)/headers: Makefile"
241 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o : \$(SRCDIR)/json_detail.h"
242 writeln "Makefile:"
243 set extra_h(main) \$(OBJDIR)/page_index.h
244
245 foreach s [lsort $src] {
246 writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
@@ -480,11 +482,11 @@
480 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
481
482 set opt {}
483 writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c"
484 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
485 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o : \$(SRCDIR)/json_detail.h"
486
487 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
488 set opt {-Dmain=sqlite3_shell}
489 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
490 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
@@ -612,10 +614,13 @@
612 realclean:
613 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
614
615 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
616 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
 
 
 
617
618 }
619 foreach s [lsort $src] {
620 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
621 writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
@@ -755,10 +760,12 @@
755 realclean:
756 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
757
758 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
759 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
 
 
760
761 }
762 foreach s [lsort $src] {
763 writeln "\$(OX)\\$s\$O : ${s}_.c ${s}.h"
764 writeln "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
765
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -55,10 +55,12 @@
55 http_transport
56 import
57 info
58 json
59 json_login
60 json_timeline
61 json_wiki
62 leaf
63 login
64 main
65 manifest
66 md5
@@ -236,11 +238,11 @@
238 writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@"
239 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
240 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
241 writeln "\ttouch \$(OBJDIR)/headers"
242 writeln "\$(OBJDIR)/headers: Makefile"
243 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_wiki.o \$(OBJDIR)/json_timeline.o : \$(SRCDIR)/json_detail.h"
244 writeln "Makefile:"
245 set extra_h(main) \$(OBJDIR)/page_index.h
246
247 foreach s [lsort $src] {
248 writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate"
@@ -480,11 +482,11 @@
482 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
483
484 set opt {}
485 writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c"
486 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n"
487 writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_wiki.o \$(OBJDIR)/json_timeline.o : \$(SRCDIR)/json_detail.h"
488
489 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
490 set opt {-Dmain=sqlite3_shell}
491 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
492 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
@@ -612,10 +614,13 @@
614 realclean:
615 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
616
617 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
618 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
619 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
620 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
621
622
623 }
624 foreach s [lsort $src] {
625 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
626 writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
@@ -755,10 +760,12 @@
760 realclean:
761 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
762
763 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
764 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
765 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
766 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
767
768 }
769 foreach s [lsort $src] {
770 writeln "\$(OX)\\$s\$O : ${s}_.c ${s}.h"
771 writeln "\t\$(TCC) /Fo\$@ -c ${s}_.c\n"
772
+19 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -22,13 +22,13 @@
2222
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2323
LIBS = $(DMDIR)\extra\lib\ zlib wsock32
2424
2525
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
2626
27
-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_login_.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 xfer_.c zip_.c
27
+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_login_.c json_timeline_.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 xfer_.c zip_.c
2828
29
-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_login$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)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
29
+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_login$O $(OBJDIR)\json_timeline$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)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3030
3131
3232
RC=$(DMDIR)\bin\rcc
3333
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
3434
@@ -42,11 +42,11 @@
4242
4343
$(OBJDIR)\fossil.res: $B\win\fossil.rc
4444
$(RC) $(RCFLAGS) -o$@ $**
4545
4646
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
47
- +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_login 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 xfer zip shell sqlite3 th th_lang > $@
47
+ +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_login json_timeline 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 xfer zip shell sqlite3 th th_lang > $@
4848
+echo fossil >> $@
4949
+echo fossil >> $@
5050
+echo $(LIBS) >> $@
5151
+echo. >> $@
5252
+echo fossil >> $@
@@ -91,10 +91,13 @@
9191
realclean:
9292
-del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
9393
9494
$(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
9595
$(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
96
+$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
97
+$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
98
+
9699
97100
98101
$(OBJDIR)\add$O : add_.c add.h
99102
$(TCC) -o$@ -c add_.c
100103
@@ -332,10 +335,22 @@
332335
$(OBJDIR)\json_login$O : json_login_.c json_login.h
333336
$(TCC) -o$@ -c json_login_.c
334337
335338
json_login_.c : $(SRCDIR)\json_login.c
336339
+translate$E $** > $@
340
+
341
+$(OBJDIR)\json_timeline$O : json_timeline_.c json_timeline.h
342
+ $(TCC) -o$@ -c json_timeline_.c
343
+
344
+json_timeline_.c : $(SRCDIR)\json_timeline.c
345
+ +translate$E $** > $@
346
+
347
+$(OBJDIR)\json_wiki$O : json_wiki_.c json_wiki.h
348
+ $(TCC) -o$@ -c json_wiki_.c
349
+
350
+json_wiki_.c : $(SRCDIR)\json_wiki.c
351
+ +translate$E $** > $@
337352
338353
$(OBJDIR)\leaf$O : leaf_.c leaf.h
339354
$(TCC) -o$@ -c leaf_.c
340355
341356
leaf_.c : $(SRCDIR)\leaf.c
@@ -598,7 +613,7 @@
598613
599614
zip_.c : $(SRCDIR)\zip.c
600615
+translate$E $** > $@
601616
602617
headers: makeheaders$E page_index.h VERSION.h
603
- +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_login_.c:json_login.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
618
+ +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_login_.c:json_login.h json_timeline_.c:json_timeline.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
604619
@copy /Y nul: headers
605620
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -22,13 +22,13 @@
22 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
23 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
24
25 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
26
27 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_login_.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 xfer_.c zip_.c
28
29 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_login$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)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
30
31
32 RC=$(DMDIR)\bin\rcc
33 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
34
@@ -42,11 +42,11 @@
42
43 $(OBJDIR)\fossil.res: $B\win\fossil.rc
44 $(RC) $(RCFLAGS) -o$@ $**
45
46 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
47 +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_login 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 xfer zip shell sqlite3 th th_lang > $@
48 +echo fossil >> $@
49 +echo fossil >> $@
50 +echo $(LIBS) >> $@
51 +echo. >> $@
52 +echo fossil >> $@
@@ -91,10 +91,13 @@
91 realclean:
92 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
93
94 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
95 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
 
 
 
96
97
98 $(OBJDIR)\add$O : add_.c add.h
99 $(TCC) -o$@ -c add_.c
100
@@ -332,10 +335,22 @@
332 $(OBJDIR)\json_login$O : json_login_.c json_login.h
333 $(TCC) -o$@ -c json_login_.c
334
335 json_login_.c : $(SRCDIR)\json_login.c
336 +translate$E $** > $@
 
 
 
 
 
 
 
 
 
 
 
 
337
338 $(OBJDIR)\leaf$O : leaf_.c leaf.h
339 $(TCC) -o$@ -c leaf_.c
340
341 leaf_.c : $(SRCDIR)\leaf.c
@@ -598,7 +613,7 @@
598
599 zip_.c : $(SRCDIR)\zip.c
600 +translate$E $** > $@
601
602 headers: makeheaders$E page_index.h VERSION.h
603 +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_login_.c:json_login.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
604 @copy /Y nul: headers
605
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -22,13 +22,13 @@
22 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
23 LIBS = $(DMDIR)\extra\lib\ zlib wsock32
24
25 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
26
27 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_login_.c json_timeline_.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 xfer_.c zip_.c
28
29 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_login$O $(OBJDIR)\json_timeline$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)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
30
31
32 RC=$(DMDIR)\bin\rcc
33 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
34
@@ -42,11 +42,11 @@
42
43 $(OBJDIR)\fossil.res: $B\win\fossil.rc
44 $(RC) $(RCFLAGS) -o$@ $**
45
46 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
47 +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_login json_timeline 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 xfer zip shell sqlite3 th th_lang > $@
48 +echo fossil >> $@
49 +echo fossil >> $@
50 +echo $(LIBS) >> $@
51 +echo. >> $@
52 +echo fossil >> $@
@@ -91,10 +91,13 @@
91 realclean:
92 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
93
94 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
95 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
96 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
97 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
98
99
100
101 $(OBJDIR)\add$O : add_.c add.h
102 $(TCC) -o$@ -c add_.c
103
@@ -332,10 +335,22 @@
335 $(OBJDIR)\json_login$O : json_login_.c json_login.h
336 $(TCC) -o$@ -c json_login_.c
337
338 json_login_.c : $(SRCDIR)\json_login.c
339 +translate$E $** > $@
340
341 $(OBJDIR)\json_timeline$O : json_timeline_.c json_timeline.h
342 $(TCC) -o$@ -c json_timeline_.c
343
344 json_timeline_.c : $(SRCDIR)\json_timeline.c
345 +translate$E $** > $@
346
347 $(OBJDIR)\json_wiki$O : json_wiki_.c json_wiki.h
348 $(TCC) -o$@ -c json_wiki_.c
349
350 json_wiki_.c : $(SRCDIR)\json_wiki.c
351 +translate$E $** > $@
352
353 $(OBJDIR)\leaf$O : leaf_.c leaf.h
354 $(TCC) -o$@ -c leaf_.c
355
356 leaf_.c : $(SRCDIR)\leaf.c
@@ -598,7 +613,7 @@
613
614 zip_.c : $(SRCDIR)\zip.c
615 +translate$E $** > $@
616
617 headers: makeheaders$E page_index.h VERSION.h
618 +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_login_.c:json_login.h json_timeline_.c:json_timeline.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
619 @copy /Y nul: headers
620
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -112,10 +112,12 @@
112112
$(SRCDIR)/http_transport.c \
113113
$(SRCDIR)/import.c \
114114
$(SRCDIR)/info.c \
115115
$(SRCDIR)/json.c \
116116
$(SRCDIR)/json_login.c \
117
+ $(SRCDIR)/json_timeline.c \
118
+ $(SRCDIR)/json_wiki.c \
117119
$(SRCDIR)/leaf.c \
118120
$(SRCDIR)/login.c \
119121
$(SRCDIR)/main.c \
120122
$(SRCDIR)/manifest.c \
121123
$(SRCDIR)/md5.c \
@@ -198,10 +200,12 @@
198200
$(OBJDIR)/http_transport_.c \
199201
$(OBJDIR)/import_.c \
200202
$(OBJDIR)/info_.c \
201203
$(OBJDIR)/json_.c \
202204
$(OBJDIR)/json_login_.c \
205
+ $(OBJDIR)/json_timeline_.c \
206
+ $(OBJDIR)/json_wiki_.c \
203207
$(OBJDIR)/leaf_.c \
204208
$(OBJDIR)/login_.c \
205209
$(OBJDIR)/main_.c \
206210
$(OBJDIR)/manifest_.c \
207211
$(OBJDIR)/md5_.c \
@@ -284,10 +288,12 @@
284288
$(OBJDIR)/http_transport.o \
285289
$(OBJDIR)/import.o \
286290
$(OBJDIR)/info.o \
287291
$(OBJDIR)/json.o \
288292
$(OBJDIR)/json_login.o \
293
+ $(OBJDIR)/json_timeline.o \
294
+ $(OBJDIR)/json_wiki.o \
289295
$(OBJDIR)/leaf.o \
290296
$(OBJDIR)/login.o \
291297
$(OBJDIR)/main.o \
292298
$(OBJDIR)/manifest.o \
293299
$(OBJDIR)/md5.o \
@@ -394,11 +400,11 @@
394400
395401
396402
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
397403
$(MKINDEX) $(TRANS_SRC) >$@
398404
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
399
- $(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_login_.c:$(OBJDIR)/json_login.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
405
+ $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
400406
echo Done >$(OBJDIR)/headers
401407
402408
$(OBJDIR)/headers: Makefile
403409
Makefile:
404410
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -679,10 +685,24 @@
679685
680686
$(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
681687
$(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
682688
683689
json_login.h: $(OBJDIR)/headers
690
+$(OBJDIR)/json_timeline_.c: $(SRCDIR)/json_timeline.c $(OBJDIR)/translate
691
+ $(TRANSLATE) $(SRCDIR)/json_timeline.c >$(OBJDIR)/json_timeline_.c
692
+
693
+$(OBJDIR)/json_timeline.o: $(OBJDIR)/json_timeline_.c $(OBJDIR)/json_timeline.h $(SRCDIR)/config.h
694
+ $(XTCC) -o $(OBJDIR)/json_timeline.o -c $(OBJDIR)/json_timeline_.c
695
+
696
+json_timeline.h: $(OBJDIR)/headers
697
+$(OBJDIR)/json_wiki_.c: $(SRCDIR)/json_wiki.c $(OBJDIR)/translate
698
+ $(TRANSLATE) $(SRCDIR)/json_wiki.c >$(OBJDIR)/json_wiki_.c
699
+
700
+$(OBJDIR)/json_wiki.o: $(OBJDIR)/json_wiki_.c $(OBJDIR)/json_wiki.h $(SRCDIR)/config.h
701
+ $(XTCC) -o $(OBJDIR)/json_wiki.o -c $(OBJDIR)/json_wiki_.c
702
+
703
+json_wiki.h: $(OBJDIR)/headers
684704
$(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
685705
$(TRANSLATE) $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
686706
687707
$(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
688708
$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
@@ -993,15 +1013,15 @@
9931013
$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
9941014
9951015
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
9961016
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
9971017
998
-$(OBJDIR)/json.o $(OBJDIR)/json_login.o : $(SRCDIR)/json_detail.h
1018
+$(OBJDIR)/json.o $(OBJDIR)/json_login.o $(OBJDIR)/json_wiki.o $(OBJDIR)/json_timeline.o : $(SRCDIR)/json_detail.h
9991019
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
10001020
$(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
10011021
10021022
$(OBJDIR)/th.o: $(SRCDIR)/th.c
10031023
$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
10041024
10051025
$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
10061026
$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o
10071027
10081028
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -112,10 +112,12 @@
112 $(SRCDIR)/http_transport.c \
113 $(SRCDIR)/import.c \
114 $(SRCDIR)/info.c \
115 $(SRCDIR)/json.c \
116 $(SRCDIR)/json_login.c \
 
 
117 $(SRCDIR)/leaf.c \
118 $(SRCDIR)/login.c \
119 $(SRCDIR)/main.c \
120 $(SRCDIR)/manifest.c \
121 $(SRCDIR)/md5.c \
@@ -198,10 +200,12 @@
198 $(OBJDIR)/http_transport_.c \
199 $(OBJDIR)/import_.c \
200 $(OBJDIR)/info_.c \
201 $(OBJDIR)/json_.c \
202 $(OBJDIR)/json_login_.c \
 
 
203 $(OBJDIR)/leaf_.c \
204 $(OBJDIR)/login_.c \
205 $(OBJDIR)/main_.c \
206 $(OBJDIR)/manifest_.c \
207 $(OBJDIR)/md5_.c \
@@ -284,10 +288,12 @@
284 $(OBJDIR)/http_transport.o \
285 $(OBJDIR)/import.o \
286 $(OBJDIR)/info.o \
287 $(OBJDIR)/json.o \
288 $(OBJDIR)/json_login.o \
 
 
289 $(OBJDIR)/leaf.o \
290 $(OBJDIR)/login.o \
291 $(OBJDIR)/main.o \
292 $(OBJDIR)/manifest.o \
293 $(OBJDIR)/md5.o \
@@ -394,11 +400,11 @@
394
395
396 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
397 $(MKINDEX) $(TRANS_SRC) >$@
398 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
399 $(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_login_.c:$(OBJDIR)/json_login.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
400 echo Done >$(OBJDIR)/headers
401
402 $(OBJDIR)/headers: Makefile
403 Makefile:
404 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -679,10 +685,24 @@
679
680 $(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
681 $(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
682
683 json_login.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684 $(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
685 $(TRANSLATE) $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
686
687 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
688 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
@@ -993,15 +1013,15 @@
993 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
994
995 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
996 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
997
998 $(OBJDIR)/json.o $(OBJDIR)/json_login.o : $(SRCDIR)/json_detail.h
999 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1000 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1001
1002 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1003 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1004
1005 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1006 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o
1007
1008
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -112,10 +112,12 @@
112 $(SRCDIR)/http_transport.c \
113 $(SRCDIR)/import.c \
114 $(SRCDIR)/info.c \
115 $(SRCDIR)/json.c \
116 $(SRCDIR)/json_login.c \
117 $(SRCDIR)/json_timeline.c \
118 $(SRCDIR)/json_wiki.c \
119 $(SRCDIR)/leaf.c \
120 $(SRCDIR)/login.c \
121 $(SRCDIR)/main.c \
122 $(SRCDIR)/manifest.c \
123 $(SRCDIR)/md5.c \
@@ -198,10 +200,12 @@
200 $(OBJDIR)/http_transport_.c \
201 $(OBJDIR)/import_.c \
202 $(OBJDIR)/info_.c \
203 $(OBJDIR)/json_.c \
204 $(OBJDIR)/json_login_.c \
205 $(OBJDIR)/json_timeline_.c \
206 $(OBJDIR)/json_wiki_.c \
207 $(OBJDIR)/leaf_.c \
208 $(OBJDIR)/login_.c \
209 $(OBJDIR)/main_.c \
210 $(OBJDIR)/manifest_.c \
211 $(OBJDIR)/md5_.c \
@@ -284,10 +288,12 @@
288 $(OBJDIR)/http_transport.o \
289 $(OBJDIR)/import.o \
290 $(OBJDIR)/info.o \
291 $(OBJDIR)/json.o \
292 $(OBJDIR)/json_login.o \
293 $(OBJDIR)/json_timeline.o \
294 $(OBJDIR)/json_wiki.o \
295 $(OBJDIR)/leaf.o \
296 $(OBJDIR)/login.o \
297 $(OBJDIR)/main.o \
298 $(OBJDIR)/manifest.o \
299 $(OBJDIR)/md5.o \
@@ -394,11 +400,11 @@
400
401
402 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
403 $(MKINDEX) $(TRANS_SRC) >$@
404 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
405 $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.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)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
406 echo Done >$(OBJDIR)/headers
407
408 $(OBJDIR)/headers: Makefile
409 Makefile:
410 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -679,10 +685,24 @@
685
686 $(OBJDIR)/json_login.o: $(OBJDIR)/json_login_.c $(OBJDIR)/json_login.h $(SRCDIR)/config.h
687 $(XTCC) -o $(OBJDIR)/json_login.o -c $(OBJDIR)/json_login_.c
688
689 json_login.h: $(OBJDIR)/headers
690 $(OBJDIR)/json_timeline_.c: $(SRCDIR)/json_timeline.c $(OBJDIR)/translate
691 $(TRANSLATE) $(SRCDIR)/json_timeline.c >$(OBJDIR)/json_timeline_.c
692
693 $(OBJDIR)/json_timeline.o: $(OBJDIR)/json_timeline_.c $(OBJDIR)/json_timeline.h $(SRCDIR)/config.h
694 $(XTCC) -o $(OBJDIR)/json_timeline.o -c $(OBJDIR)/json_timeline_.c
695
696 json_timeline.h: $(OBJDIR)/headers
697 $(OBJDIR)/json_wiki_.c: $(SRCDIR)/json_wiki.c $(OBJDIR)/translate
698 $(TRANSLATE) $(SRCDIR)/json_wiki.c >$(OBJDIR)/json_wiki_.c
699
700 $(OBJDIR)/json_wiki.o: $(OBJDIR)/json_wiki_.c $(OBJDIR)/json_wiki.h $(SRCDIR)/config.h
701 $(XTCC) -o $(OBJDIR)/json_wiki.o -c $(OBJDIR)/json_wiki_.c
702
703 json_wiki.h: $(OBJDIR)/headers
704 $(OBJDIR)/leaf_.c: $(SRCDIR)/leaf.c $(OBJDIR)/translate
705 $(TRANSLATE) $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
706
707 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
708 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
@@ -993,15 +1013,15 @@
1013 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1014
1015 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1016 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o
1017
1018 $(OBJDIR)/json.o $(OBJDIR)/json_login.o $(OBJDIR)/json_wiki.o $(OBJDIR)/json_timeline.o : $(SRCDIR)/json_detail.h
1019 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1020 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1021
1022 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1023 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1024
1025 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1026 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o
1027
1028
+19 -3
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -36,13 +36,13 @@
3636
LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
3737
LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
3838
3939
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
4040
41
-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_login_.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 xfer_.c zip_.c
41
+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_login_.c json_timeline_.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 xfer_.c zip_.c
4242
43
-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_login$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)\xfer$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
43
+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_login$O $(OX)\json_timeline$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)\xfer$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
4444
4545
4646
APPNAME = $(OX)\fossil$(E)
4747
4848
all: $(OX) $(APPNAME)
@@ -90,10 +90,12 @@
9090
echo $(OX)\http_transport.obj >> $@
9191
echo $(OX)\import.obj >> $@
9292
echo $(OX)\info.obj >> $@
9393
echo $(OX)\json.obj >> $@
9494
echo $(OX)\json_login.obj >> $@
95
+ echo $(OX)\json_timeline.obj >> $@
96
+ echo $(OX)\json_wiki.obj >> $@
9597
echo $(OX)\leaf.obj >> $@
9698
echo $(OX)\login.obj >> $@
9799
echo $(OX)\main.obj >> $@
98100
echo $(OX)\manifest.obj >> $@
99101
echo $(OX)\md5.obj >> $@
@@ -188,10 +190,12 @@
188190
realclean:
189191
-del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
190192
191193
$(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
192194
$(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
195
+$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
196
+$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
193197
194198
195199
$(OX)\add$O : add_.c add.h
196200
$(TCC) /Fo$@ -c add_.c
197201
@@ -429,10 +433,22 @@
429433
$(OX)\json_login$O : json_login_.c json_login.h
430434
$(TCC) /Fo$@ -c json_login_.c
431435
432436
json_login_.c : $(SRCDIR)\json_login.c
433437
translate$E $** > $@
438
+
439
+$(OX)\json_timeline$O : json_timeline_.c json_timeline.h
440
+ $(TCC) /Fo$@ -c json_timeline_.c
441
+
442
+json_timeline_.c : $(SRCDIR)\json_timeline.c
443
+ translate$E $** > $@
444
+
445
+$(OX)\json_wiki$O : json_wiki_.c json_wiki.h
446
+ $(TCC) /Fo$@ -c json_wiki_.c
447
+
448
+json_wiki_.c : $(SRCDIR)\json_wiki.c
449
+ translate$E $** > $@
434450
435451
$(OX)\leaf$O : leaf_.c leaf.h
436452
$(TCC) /Fo$@ -c leaf_.c
437453
438454
leaf_.c : $(SRCDIR)\leaf.c
@@ -695,7 +711,7 @@
695711
696712
zip_.c : $(SRCDIR)\zip.c
697713
translate$E $** > $@
698714
699715
headers: makeheaders$E page_index.h VERSION.h
700
- 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_login_.c:json_login.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
716
+ 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_login_.c:json_login.h json_timeline_.c:json_timeline.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
701717
@copy /Y nul: headers
702718
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -36,13 +36,13 @@
36 LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
37 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
38
39 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
40
41 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_login_.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 xfer_.c zip_.c
42
43 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_login$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)\xfer$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
44
45
46 APPNAME = $(OX)\fossil$(E)
47
48 all: $(OX) $(APPNAME)
@@ -90,10 +90,12 @@
90 echo $(OX)\http_transport.obj >> $@
91 echo $(OX)\import.obj >> $@
92 echo $(OX)\info.obj >> $@
93 echo $(OX)\json.obj >> $@
94 echo $(OX)\json_login.obj >> $@
 
 
95 echo $(OX)\leaf.obj >> $@
96 echo $(OX)\login.obj >> $@
97 echo $(OX)\main.obj >> $@
98 echo $(OX)\manifest.obj >> $@
99 echo $(OX)\md5.obj >> $@
@@ -188,10 +190,12 @@
188 realclean:
189 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
190
191 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
192 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
 
 
193
194
195 $(OX)\add$O : add_.c add.h
196 $(TCC) /Fo$@ -c add_.c
197
@@ -429,10 +433,22 @@
429 $(OX)\json_login$O : json_login_.c json_login.h
430 $(TCC) /Fo$@ -c json_login_.c
431
432 json_login_.c : $(SRCDIR)\json_login.c
433 translate$E $** > $@
 
 
 
 
 
 
 
 
 
 
 
 
434
435 $(OX)\leaf$O : leaf_.c leaf.h
436 $(TCC) /Fo$@ -c leaf_.c
437
438 leaf_.c : $(SRCDIR)\leaf.c
@@ -695,7 +711,7 @@
695
696 zip_.c : $(SRCDIR)\zip.c
697 translate$E $** > $@
698
699 headers: makeheaders$E page_index.h VERSION.h
700 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_login_.c:json_login.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
701 @copy /Y nul: headers
702
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -36,13 +36,13 @@
36 LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
37 LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
38
39 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
40
41 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_login_.c json_timeline_.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 xfer_.c zip_.c
42
43 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_login$O $(OX)\json_timeline$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)\xfer$O $(OX)\zip$O $(OX)\shell$O $(OX)\sqlite3$O $(OX)\th$O $(OX)\th_lang$O
44
45
46 APPNAME = $(OX)\fossil$(E)
47
48 all: $(OX) $(APPNAME)
@@ -90,10 +90,12 @@
90 echo $(OX)\http_transport.obj >> $@
91 echo $(OX)\import.obj >> $@
92 echo $(OX)\info.obj >> $@
93 echo $(OX)\json.obj >> $@
94 echo $(OX)\json_login.obj >> $@
95 echo $(OX)\json_timeline.obj >> $@
96 echo $(OX)\json_wiki.obj >> $@
97 echo $(OX)\leaf.obj >> $@
98 echo $(OX)\login.obj >> $@
99 echo $(OX)\main.obj >> $@
100 echo $(OX)\manifest.obj >> $@
101 echo $(OX)\md5.obj >> $@
@@ -188,10 +190,12 @@
190 realclean:
191 -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E
192
193 $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
194 $(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
195 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
196 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
197
198
199 $(OX)\add$O : add_.c add.h
200 $(TCC) /Fo$@ -c add_.c
201
@@ -429,10 +433,22 @@
433 $(OX)\json_login$O : json_login_.c json_login.h
434 $(TCC) /Fo$@ -c json_login_.c
435
436 json_login_.c : $(SRCDIR)\json_login.c
437 translate$E $** > $@
438
439 $(OX)\json_timeline$O : json_timeline_.c json_timeline.h
440 $(TCC) /Fo$@ -c json_timeline_.c
441
442 json_timeline_.c : $(SRCDIR)\json_timeline.c
443 translate$E $** > $@
444
445 $(OX)\json_wiki$O : json_wiki_.c json_wiki.h
446 $(TCC) /Fo$@ -c json_wiki_.c
447
448 json_wiki_.c : $(SRCDIR)\json_wiki.c
449 translate$E $** > $@
450
451 $(OX)\leaf$O : leaf_.c leaf.h
452 $(TCC) /Fo$@ -c leaf_.c
453
454 leaf_.c : $(SRCDIR)\leaf.c
@@ -695,7 +711,7 @@
711
712 zip_.c : $(SRCDIR)\zip.c
713 translate$E $** > $@
714
715 headers: makeheaders$E page_index.h VERSION.h
716 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_login_.c:json_login.h json_timeline_.c:json_timeline.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 xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
717 @copy /Y nul: headers
718

Keyboard Shortcuts

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