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.

drh 2016-09-13 01:38 trunk
Commit b86a58ed172ee37fc936f885349a3e5f8afbca78
1 file changed +2 -12
+2 -12
--- src/setup.c
+++ src/setup.c
@@ -23,18 +23,10 @@
2323
2424
#if INTERFACE
2525
#define ArraySize(x) (sizeof(x)/sizeof(x[0]))
2626
#endif
2727
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
-
3628
/*
3729
** Output a single entry for a menu generated using an HTML table.
3830
** If zLink is not NULL or an empty string, then it is the page that
3931
** the menu entry will hyperlink to. If zLink is NULL or "", then
4032
** the menu entry has no hyperlink - it is disabled.
@@ -1481,11 +1473,10 @@
14811473
if( !g.perm.Setup ){
14821474
login_needed(0);
14831475
return;
14841476
}
14851477
1486
- (void) aCmdHelp; /* NOTE: Silence compiler warning. */
14871478
style_header("Settings");
14881479
if(!g.repositoryOpen){
14891480
/* Provide read-only access to versioned settings,
14901481
but only if no repo file was explicitly provided. */
14911482
db_open_local(0);
@@ -1546,13 +1537,12 @@
15461537
@ <p>Settings marked with (v) are 'versionable' and will be overridden
15471538
@ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>
15481539
@ in the check-out root.
15491540
@ If such a file is present, the corresponding field above is not
15501541
@ 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.
15541544
db_end_transaction(0);
15551545
style_footer();
15561546
}
15571547
15581548
/*
15591549
--- 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

Keyboard Shortcuts

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