Fossil

Check-in [de4c07ca]
Login

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

Overview
Comment:Fix the mkindex program so that it ignores lines beginning with COMMAND: when assembling help text.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:de4c07ca52ef1f3dd2078540140f33821c825e09
User & Date: drh 2010-12-26 00:40:42
Context
2010-12-26
00:43
Update the quick-start guide documentation to provide hyperlinks to the command-line help in the web interface. Add the beginning of a technical overview article, but as that article is still incomplete, do not hyperlink to it. check-in: 0e1447a6 user: drh tags: trunk
00:40
Fix the mkindex program so that it ignores lines beginning with COMMAND: when assembling help text. check-in: de4c07ca user: drh tags: trunk
2010-12-25
23:58
All the help URL to have its command specified as a path extension in addition to the "cmd" query parameter. check-in: ae76c787 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

1602
1603
1604
1605
1606
1607
1608

1609
1610
1611
1612
1613
1614
1615
  { "web-browser",   0,               32, ""                    },
  { 0,0,0,0 }
};

/*
** COMMAND: settings
** COMMAND: unset

** %fossil settings ?PROPERTY? ?VALUE? ?-global?
** %fossil unset PROPERTY ?-global?
**
** The "settings" command with no arguments lists all properties and their
** values.  With just a property name it shows the value of that property.
** With a value argument it changes the property for the current repository.
**







>







1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
  { "web-browser",   0,               32, ""                    },
  { 0,0,0,0 }
};

/*
** COMMAND: settings
** COMMAND: unset
**
** %fossil settings ?PROPERTY? ?VALUE? ?-global?
** %fossil unset PROPERTY ?-global?
**
** The "settings" command with no arguments lists all properties and their
** values.  With just a property name it shows the value of that property.
** With a value argument it changes the property for the current repository.
**

Changes to src/mkindex.c.

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
126
127
128
129
130
131
132
133

134



135
136
137
138
139
140
141
** Maximum number of entries
*/
#define N_ENTRY 500

/*
** Maximum size of a help message
*/
#define MX_HELP 10000

/*
** Table of entries
*/
Entry aEntry[N_ENTRY];

/*
................................................................................
/*
** Scan a line for a function that implements a web page or command.
*/
void scan_for_func(char *zLine){
  int i,j,k;
  char *z;
  if( nUsed<=nFixed ) return;
  if( strncmp(zLine, "**", 2)==0 && isspace(zLine[2])

       && strlen(zLine)<sizeof(zHelp)-nHelp-1 && nUsed>nFixed ){



    if( zLine[2]=='\n' ){
      zHelp[nHelp++] = '\n';
    }else{
      if( strncmp(&zLine[3], "Usage: ", 6)==0 ) nHelp = 0;
      strcpy(&zHelp[nHelp], &zLine[3]);
      nHelp += strlen(&zHelp[nHelp]);
    }







|







 







|
>
|
>
>
>







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
** Maximum number of entries
*/
#define N_ENTRY 500

/*
** Maximum size of a help message
*/
#define MX_HELP 25000

/*
** Table of entries
*/
Entry aEntry[N_ENTRY];

/*
................................................................................
/*
** Scan a line for a function that implements a web page or command.
*/
void scan_for_func(char *zLine){
  int i,j,k;
  char *z;
  if( nUsed<=nFixed ) return;
  if( strncmp(zLine, "**", 2)==0
   && isspace(zLine[2])
   && strlen(zLine)<sizeof(zHelp)-nHelp-1
   && nUsed>nFixed
   && memcmp(zLine,"** COMMAND:",11)!=0
  ){
    if( zLine[2]=='\n' ){
      zHelp[nHelp++] = '\n';
    }else{
      if( strncmp(&zLine[3], "Usage: ", 6)==0 ) nHelp = 0;
      strcpy(&zHelp[nHelp], &zLine[3]);
      nHelp += strlen(&zHelp[nHelp]);
    }