Check-in [b86a58ed17]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b86a58ed172ee37fc936f885349a3e5f8afbca78
User & Date: drh 2016-09-13 01:38:13.523
Context
2016-09-13
03:11
Fix typo. check-in: 88e1bef9ec user: mistachkin tags: trunk
01:38
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. check-in: b86a58ed17 user: drh tags: trunk
2016-09-12
19:40
Previous documentation change did not work for repositories that are not at the root of the domain. This should fix it. check-in: 9c4122744e user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/setup.c.
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <assert.h>
#include "setup.h"

#if INTERFACE
#define ArraySize(x) (sizeof(x)/sizeof(x[0]))
#endif

/*
** The table of web pages supported by this application is generated
** automatically by the "mkindex" program and written into a file
** named "page_index.h".  We include that file here to get access
** to the table.
*/
#include "page_index.h"

/*
** Output a single entry for a menu generated using an HTML table.
** If zLink is not NULL or an empty string, then it is the page that
** the menu entry will hyperlink to.  If zLink is NULL or "", then
** the menu entry has no hyperlink - it is disabled.
*/
void setup_menu_entry(







<
<
<
<
<
<
<
<







21
22
23
24
25
26
27








28
29
30
31
32
33
34
#include <assert.h>
#include "setup.h"

#if INTERFACE
#define ArraySize(x) (sizeof(x)/sizeof(x[0]))
#endif









/*
** Output a single entry for a menu generated using an HTML table.
** If zLink is not NULL or an empty string, then it is the page that
** the menu entry will hyperlink to.  If zLink is NULL or "", then
** the menu entry has no hyperlink - it is disabled.
*/
void setup_menu_entry(
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493

  login_check_credentials();
  if( !g.perm.Setup ){
    login_needed(0);
    return;
  }

  (void) aCmdHelp; /* NOTE: Silence compiler warning. */
  style_header("Settings");
  if(!g.repositoryOpen){
    /* Provide read-only access to versioned settings,
       but only if no repo file was explicitly provided. */
    db_open_local(0);
  }
  db_begin_transaction();







<







1471
1472
1473
1474
1475
1476
1477

1478
1479
1480
1481
1482
1483
1484

  login_check_credentials();
  if( !g.perm.Setup ){
    login_needed(0);
    return;
  }


  style_header("Settings");
  if(!g.repositoryOpen){
    /* Provide read-only access to versioned settings,
       but only if no repo file was explicitly provided. */
    db_open_local(0);
  }
  db_begin_transaction();
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
  @ </td></tr></table>
  @ </div></form>
  @ <p>Settings marked with (v) are 'versionable' and will be overridden
  @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>
  @ in the check-out root.
  @ If such a file is present, the corresponding field above is not
  @ editable.</p><hr /><p>
  @ These settings work in the same way, as the <kbd>set</kbd>
  @ commandline:<br />
  @ </p><pre>%s(zHelp_setting_cmd)</pre>
  db_end_transaction(0);
  style_footer();
}

/*
** WEBPAGE: setup_config
**







|
|
<







1535
1536
1537
1538
1539
1540
1541
1542
1543

1544
1545
1546
1547
1548
1549
1550
  @ </td></tr></table>
  @ </div></form>
  @ <p>Settings marked with (v) are 'versionable' and will be overridden
  @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>
  @ in the check-out root.
  @ If such a file is present, the corresponding field above is not
  @ editable.</p><hr /><p>
  @ These settings work the same as the 
  @ <a href='%R/help?cmd=set'>fossil set</a command.

  db_end_transaction(0);
  style_footer();
}

/*
** WEBPAGE: setup_config
**