Fossil SCM
Only include the built-in help text once, it the "help" command implementation, not also in the "setup" command. This reduces the size of the binary by the size of the built-in help table.
Commit
b86a58ed172ee37fc936f885349a3e5f8afbca78
Parent
9c4122744e7a912…
1 file changed
+2
-12
+2
-12
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -23,18 +23,10 @@ | ||
| 23 | 23 | |
| 24 | 24 | #if INTERFACE |
| 25 | 25 | #define ArraySize(x) (sizeof(x)/sizeof(x[0])) |
| 26 | 26 | #endif |
| 27 | 27 | |
| 28 | -/* | |
| 29 | -** The table of web pages supported by this application is generated | |
| 30 | -** automatically by the "mkindex" program and written into a file | |
| 31 | -** named "page_index.h". We include that file here to get access | |
| 32 | -** to the table. | |
| 33 | -*/ | |
| 34 | -#include "page_index.h" | |
| 35 | - | |
| 36 | 28 | /* |
| 37 | 29 | ** Output a single entry for a menu generated using an HTML table. |
| 38 | 30 | ** If zLink is not NULL or an empty string, then it is the page that |
| 39 | 31 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| 40 | 32 | ** the menu entry has no hyperlink - it is disabled. |
| @@ -1481,11 +1473,10 @@ | ||
| 1481 | 1473 | if( !g.perm.Setup ){ |
| 1482 | 1474 | login_needed(0); |
| 1483 | 1475 | return; |
| 1484 | 1476 | } |
| 1485 | 1477 | |
| 1486 | - (void) aCmdHelp; /* NOTE: Silence compiler warning. */ | |
| 1487 | 1478 | style_header("Settings"); |
| 1488 | 1479 | if(!g.repositoryOpen){ |
| 1489 | 1480 | /* Provide read-only access to versioned settings, |
| 1490 | 1481 | but only if no repo file was explicitly provided. */ |
| 1491 | 1482 | db_open_local(0); |
| @@ -1546,13 +1537,12 @@ | ||
| 1546 | 1537 | @ <p>Settings marked with (v) are 'versionable' and will be overridden |
| 1547 | 1538 | @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt> |
| 1548 | 1539 | @ in the check-out root. |
| 1549 | 1540 | @ If such a file is present, the corresponding field above is not |
| 1550 | 1541 | @ editable.</p><hr /><p> |
| 1551 | - @ These settings work in the same way, as the <kbd>set</kbd> | |
| 1552 | - @ commandline:<br /> | |
| 1553 | - @ </p><pre>%s(zHelp_setting_cmd)</pre> | |
| 1542 | + @ These settings work the same as the | |
| 1543 | + @ <a href='%R/help?cmd=set'>fossil set</a command. | |
| 1554 | 1544 | db_end_transaction(0); |
| 1555 | 1545 | style_footer(); |
| 1556 | 1546 | } |
| 1557 | 1547 | |
| 1558 | 1548 | /* |
| 1559 | 1549 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -23,18 +23,10 @@ | |
| 23 | |
| 24 | #if INTERFACE |
| 25 | #define ArraySize(x) (sizeof(x)/sizeof(x[0])) |
| 26 | #endif |
| 27 | |
| 28 | /* |
| 29 | ** The table of web pages supported by this application is generated |
| 30 | ** automatically by the "mkindex" program and written into a file |
| 31 | ** named "page_index.h". We include that file here to get access |
| 32 | ** to the table. |
| 33 | */ |
| 34 | #include "page_index.h" |
| 35 | |
| 36 | /* |
| 37 | ** Output a single entry for a menu generated using an HTML table. |
| 38 | ** If zLink is not NULL or an empty string, then it is the page that |
| 39 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| 40 | ** the menu entry has no hyperlink - it is disabled. |
| @@ -1481,11 +1473,10 @@ | |
| 1481 | if( !g.perm.Setup ){ |
| 1482 | login_needed(0); |
| 1483 | return; |
| 1484 | } |
| 1485 | |
| 1486 | (void) aCmdHelp; /* NOTE: Silence compiler warning. */ |
| 1487 | style_header("Settings"); |
| 1488 | if(!g.repositoryOpen){ |
| 1489 | /* Provide read-only access to versioned settings, |
| 1490 | but only if no repo file was explicitly provided. */ |
| 1491 | db_open_local(0); |
| @@ -1546,13 +1537,12 @@ | |
| 1546 | @ <p>Settings marked with (v) are 'versionable' and will be overridden |
| 1547 | @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt> |
| 1548 | @ in the check-out root. |
| 1549 | @ If such a file is present, the corresponding field above is not |
| 1550 | @ editable.</p><hr /><p> |
| 1551 | @ These settings work in the same way, as the <kbd>set</kbd> |
| 1552 | @ commandline:<br /> |
| 1553 | @ </p><pre>%s(zHelp_setting_cmd)</pre> |
| 1554 | db_end_transaction(0); |
| 1555 | style_footer(); |
| 1556 | } |
| 1557 | |
| 1558 | /* |
| 1559 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -23,18 +23,10 @@ | |
| 23 | |
| 24 | #if INTERFACE |
| 25 | #define ArraySize(x) (sizeof(x)/sizeof(x[0])) |
| 26 | #endif |
| 27 | |
| 28 | /* |
| 29 | ** Output a single entry for a menu generated using an HTML table. |
| 30 | ** If zLink is not NULL or an empty string, then it is the page that |
| 31 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| 32 | ** the menu entry has no hyperlink - it is disabled. |
| @@ -1481,11 +1473,10 @@ | |
| 1473 | if( !g.perm.Setup ){ |
| 1474 | login_needed(0); |
| 1475 | return; |
| 1476 | } |
| 1477 | |
| 1478 | style_header("Settings"); |
| 1479 | if(!g.repositoryOpen){ |
| 1480 | /* Provide read-only access to versioned settings, |
| 1481 | but only if no repo file was explicitly provided. */ |
| 1482 | db_open_local(0); |
| @@ -1546,13 +1537,12 @@ | |
| 1537 | @ <p>Settings marked with (v) are 'versionable' and will be overridden |
| 1538 | @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt> |
| 1539 | @ in the check-out root. |
| 1540 | @ If such a file is present, the corresponding field above is not |
| 1541 | @ editable.</p><hr /><p> |
| 1542 | @ These settings work the same as the |
| 1543 | @ <a href='%R/help?cmd=set'>fossil set</a command. |
| 1544 | db_end_transaction(0); |
| 1545 | style_footer(); |
| 1546 | } |
| 1547 | |
| 1548 | /* |
| 1549 |