Permalink
Browse files

HTML Reference table for the genconfig stuff (/set, rc, cmdline options)

Is generated by genconfig as part of 'make doc'.
Also made some small improvements to genconfig and updated some documentation.
The default value of force-redraw is now 0 (was 2).
  • Loading branch information...
1 parent 42b7022 commit 76d7bce129b6715cfc2164d3530fb0d57368aefc ec429 committed May 22, 2011
Showing with 155 additions and 16 deletions.
  1. +1 −1 Makefile
  2. +7 −2 README
  3. +2 −2 config.cdl
  4. +1 −1 config_def.c
  5. +14 −1 config_help.c
  6. +2 −2 config_pargs.c
  7. +60 −0 config_ref.htm
  8. +1 −1 config_set.c
  9. +64 −2 genconfig.c
  10. +0 −2 plans
  11. +3 −2 readme.htm
View
@@ -29,7 +29,7 @@ clean:
realclean: clean
-rm c_init.c README version.h config_*
-doc: README
+doc: README config_ref.htm
README: readme.htm
-sed -e "s/&apos;/'/g" -e "s/&quot;/\"/g" < readme.htm | html2text -nobs -o README
View
9 README
@@ -60,6 +60,7 @@ the channel (or nick if current tab is a private messaging tab).
and $COLUMNS, using defaults of 80x24 if these env vars are not
found), but you can override those guesses here or on the command
line.
+ For full details see config_ref.htm.
/ignore [-ipd] user[@host]
/ignore [-ipd] -r regex
/ignore -l
@@ -112,7 +113,8 @@ the channel (or nick if current tab is a private messaging tab).
parent servers; maintaining the order of the servers and of each server's
channels).
***** Configuration *****
-quIRC can be configured through an "rc file" as follows.
+quIRC can be configured through an "rc file" as follows. (For a compact
+reference table see config_ref.htm)
In your home directory (/home/username), create a file called ".quirc", and
open it in your editor.
In this file you can set servers, nick and channels to automatically use:
@@ -137,7 +139,10 @@ fred force-redraw
which will redraw the whole screen when things change; the number controls how
often.
0 won't redraw at all, while 3 will redraw every 0.25 seconds. The default is
-2, which redraws whenever any buffer is written to or input is entered.
+now 0 (it used to be 2, which redraws whenever any buffer is written to or
+input is entered). Since some improvements were made to the drawing code,
+fred's assistance should no longer be needed, but we've kept him around just in
+case.
The size of each scrollback buffer, in lines, can be set with
buf buf-lines
the default being 256. Larger values will, of course, increase memory
View
@@ -1,7 +1,7 @@
int:width:80:30:::width:width:S:display width
int:height:24:5:::height:height:S:display height
int:mirc_colour_compat:1:0:2:mcc:mcc:mcc:L:mirc colour compatibility
-int:force_redraw:2:0:3:fred:fred:fred:L:force-redraw
+int:force_redraw:0:0:3:fred:fred:fred:L:force-redraw
int:buflines:256:32::buf:buf-lines:buf:S:buffer lines
int:maxnlen:16:4::mnln:maxnicklen:mnln:S:max nick length
bool:full_width_colour:false:::fwc:fwc:fwc:B:full width colour
@@ -10,5 +10,5 @@ bool:tsb:true:::tsb:tsb:tsb:B:top status bar
int:tping:30:15::tping:tping:tping:S:outbound ping time
int:ts:1:0:4:ts:timestamps:ts:L:timestamping
bool:utc:false:::utc:utc:utc:B:UTC timestamps
-bool:its:false:::its:input clock:its:B:input clock
+bool:its:false:::its:its:its:B:input clock
bool:quiet:false:::quiet:quiet:quiet:B:quiet mode
View
@@ -2,7 +2,7 @@
width=80;
height=24;
mirc_colour_compat=1;
- force_redraw=2;
+ force_redraw=0;
buflines=256;
maxnlen=16;
full_width_colour=0;
View
@@ -1,2 +1,15 @@
/* Generated by genconfig */
- fprintf(stderr, "\t--width=<numeric> : display width\n"); fprintf(stderr, "\t--height=<numeric> : display height\n"); fprintf(stderr, "\t--mcc=<0 to 2> : mirc colour compatibility\n"); fprintf(stderr, "\t--fred=<0 to 3> : force-redraw\n"); fprintf(stderr, "\t--buf-lines=<numeric> : buffer lines\n"); fprintf(stderr, "\t--maxnicklen=<numeric> : max nick length\n"); fprintf(stderr, "\t--[no-]fwc : full width colour\n"); fprintf(stderr, "\t--[no-]hts : highlight tabstrip\n"); fprintf(stderr, "\t--[no-]tsb : top status bar\n"); fprintf(stderr, "\t--tping=<numeric> : outbound ping time\n"); fprintf(stderr, "\t--timestamps=<0 to 4> : timestamping\n"); fprintf(stderr, "\t--[no-]utc : UTC timestamps\n"); fprintf(stderr, "\t--[no-]input clock : input clock\n"); fprintf(stderr, "\t--[no-]quiet : quiet mode\n");
+ fprintf(stderr, "\t--width=<numeric> : display width\n");
+ fprintf(stderr, "\t--height=<numeric> : display height\n");
+ fprintf(stderr, "\t--mcc=<0 to 2> : mirc colour compatibility\n");
+ fprintf(stderr, "\t--fred=<0 to 3> : force-redraw\n");
+ fprintf(stderr, "\t--buf-lines=<numeric> : buffer lines\n");
+ fprintf(stderr, "\t--maxnicklen=<numeric> : max nick length\n");
+ fprintf(stderr, "\t--[no-]fwc : full width colour\n");
+ fprintf(stderr, "\t--[no-]hts : highlight tabstrip\n");
+ fprintf(stderr, "\t--[no-]tsb : top status bar\n");
+ fprintf(stderr, "\t--tping=<numeric> : outbound ping time\n");
+ fprintf(stderr, "\t--timestamps=<0 to 4> : timestamping\n");
+ fprintf(stderr, "\t--[no-]utc : UTC timestamps\n");
+ fprintf(stderr, "\t--[no-]its : input clock\n");
+ fprintf(stderr, "\t--[no-]quiet : quiet mode\n");
View
@@ -31,9 +31,9 @@
utc=true;
else if(strcmp(argv[arg], "--no-utc")==0)
utc=false;
- else if(strcmp(argv[arg], "--input clock")==0)
+ else if(strcmp(argv[arg], "--its")==0)
its=true;
- else if(strcmp(argv[arg], "--no-input clock")==0)
+ else if(strcmp(argv[arg], "--no-its")==0)
its=false;
else if(strcmp(argv[arg], "--quiet")==0)
quiet=true;
View
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>quIRC: configuration reference</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />
+ <link rel="stylesheet" href="readme.css" />
+ <style type="text/css">
+ tt {margin-left:4em;}
+ td {border:1px solid; border-color:#1f273f; padding:2px;}
+ .int {background-color:#376f4f; color:black;}
+ .bool {background-color:#374f6f; color:black;}
+ .na {background-color:#2f2f37; color:#7f7f9f};
+ </style>
+</head>
+<body>
+<div id="title">
+<h1>quIRC: reference</h1>
+<h5>A reference table for quIRC's configuration options, and how to set them.<br>
+Generated by <small>genconfig</small></h5>
+</div><!--#title-->
+<div id="key">
+<h2>Key to Columns</h2>
+<dl>
+<dt>name</dt>
+ <dd>The internal name of the setting.</dd>
+<dt>type</dt>
+ <dd>The setting's type, either <span class="int">INT</span> (integer) or <span class="bool">BOOL</span> (boolean).</dd>
+<dt>default</dt>
+ <dd>The setting's default value.</dd>
+<dt>rc</dt>
+ <dd>The setting's name in the rc file (typically ~/.quirc/rc), if settable there.</dd>
+<dt>cmdline</dt>
+ <dd>The setting's name on the command line, if settable there.</dd>
+<dt>/set</dt>
+ <dd>The name to use with the /set command. If the setting is an <span class="int">INT</span>, use <small>/set &lt;name&gt; &lt;value&gt;</small>; omitting <small>&lt;value&gt;</small> sets to the default value. If the setting is a <span class="bool">BOOL</span>, use <small>/set &lt;name&gt;</small> to enable, and <small>/set no-&lt;name&gt;</small> to disable (you can also use other forms, such as supplying a <small>&lt;value&gt;</small> of + or 1 to enable and - or 0 to disable).</dd>
+<dt>description</dt>
+ <dd>A short description of the setting, as used in messages produced by /set.</dd>
+</dl>
+</div><!--#key-->
+<div id="table">
+<table style="border:1px solid;">
+<tr style="text-align:center"><td>name</td><td>type</td><td>default</td><td>rc</td><td>cmdline</td><td>/set</td><td>description</td></tr>
+<tr><td>width</td><td><span class="int">INT</span></td><td>80</td><td><span class="na">[N/A]</span></td><td>width</td><td>width</td><td>display width</td></tr>
+<tr><td>height</td><td><span class="int">INT</span></td><td>24</td><td><span class="na">[N/A]</span></td><td>height</td><td>height</td><td>display height</td></tr>
+<tr><td>mirc_colour_compat</td><td><span class="int">INT</span></td><td>1</td><td>mcc</td><td>mcc</td><td>mcc</td><td>mirc colour compatibility</td></tr>
+<tr><td>force_redraw</td><td><span class="int">INT</span></td><td>0</td><td>fred</td><td>fred</td><td>fred</td><td>force-redraw</td></tr>
+<tr><td>buflines</td><td><span class="int">INT</span></td><td>256</td><td>buf</td><td>buf-lines</td><td>buf</td><td>buffer lines</td></tr>
+<tr><td>maxnlen</td><td><span class="int">INT</span></td><td>16</td><td>mnln</td><td>maxnicklen</td><td>mnln</td><td>max nick length</td></tr>
+<tr><td>full_width_colour</td><td><span class="bool">BOOL</span></td><td>false</td><td>fwc</td><td>fwc</td><td>fwc</td><td>full width colour</td></tr>
+<tr><td>hilite_tabstrip</td><td><span class="bool">BOOL</span></td><td>false</td><td>hts</td><td>hts</td><td>hts</td><td>highlight tabstrip</td></tr>
+<tr><td>tsb</td><td><span class="bool">BOOL</span></td><td>true</td><td>tsb</td><td>tsb</td><td>tsb</td><td>top status bar</td></tr>
+<tr><td>tping</td><td><span class="int">INT</span></td><td>30</td><td>tping</td><td>tping</td><td>tping</td><td>outbound ping time</td></tr>
+<tr><td>ts</td><td><span class="int">INT</span></td><td>1</td><td>ts</td><td>timestamps</td><td>ts</td><td>timestamping</td></tr>
+<tr><td>utc</td><td><span class="bool">BOOL</span></td><td>false</td><td>utc</td><td>utc</td><td>utc</td><td>UTC timestamps</td></tr>
+<tr><td>its</td><td><span class="bool">BOOL</span></td><td>false</td><td>its</td><td>its</td><td>its</td><td>input clock</td></tr>
+<tr><td>quiet</td><td><span class="bool">BOOL</span></td><td>false</td><td>quiet</td><td>quiet</td><td>quiet</td><td>quiet mode</td></tr>
+</table>
+</div><!--#table-->
+</body>
+</html>
View
@@ -85,7 +85,7 @@
force_redraw=value;
}
else
- force_redraw=2;
+ force_redraw=0;
if(!quiet)
{
if(force_redraw)
View
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
otype=6;
else if(strcmp(argv[1], "config_help.c")==0)
otype=7;
+ else if(strcmp(argv[1], "config_ref.htm")==0)
+ otype=8;
else
{
fprintf(stderr, "genconfig: unrecognised outtype '%s'\n", argv[1]);
@@ -297,7 +299,50 @@ int main(int argc, char **argv)
}
free(line);
}
- printf("/* Generated by genconfig */\n");
+ if(otype==8)
+ printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\
+<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\
+<head>\n\
+\t<title>quIRC: configuration reference</title>\n\
+\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8;\" />\n\
+\t<link rel=\"stylesheet\" href=\"readme.css\" />\n\t<style type=\"text/css\">\n\
+\t\ttt {margin-left:4em;}\n\
+\t\ttd {border:1px solid; border-color:#1f273f; padding:2px;}\n\
+\t\t.int {background-color:#376f4f; color:black;}\n\
+\t\t.bool {background-color:#374f6f; color:black;}\n\
+\t\t.na {background-color:#2f2f37; color:#7f7f9f};\n\
+\t</style>\n\
+</head>\n\
+<body>\n\
+<div id=\"title\">\n\
+<h1>quIRC: reference</h1>\n\
+<h5>A reference table for quIRC's configuration options, and how to set them.<br>\n\
+Generated by <small>genconfig</small></h5>\n\
+</div><!--#title-->\n\
+<div id=\"key\">\n\
+<h2>Key to Columns</h2>\n\
+<dl>\n\
+<dt>name</dt>\n\
+\t<dd>The internal name of the setting.</dd>\n\
+<dt>type</dt>\n\
+\t<dd>The setting's type, either <span class=\"int\">INT</span> (integer) or <span class=\"bool\">BOOL</span> (boolean).</dd>\n\
+<dt>default</dt>\n\
+\t<dd>The setting's default value.</dd>\n\
+<dt>rc</dt>\n\
+\t<dd>The setting's name in the rc file (typically ~/.quirc/rc), if settable there.</dd>\n\
+<dt>cmdline</dt>\n\
+\t<dd>The setting's name on the command line, if settable there.</dd>\n\
+<dt>/set</dt>\n\
+\t<dd>The name to use with the /set command. If the setting is an <span class=\"int\">INT</span>, use <small>/set &lt;name&gt; &lt;value&gt;</small>; omitting <small>&lt;value&gt;</small> sets to the default value. If the setting is a <span class=\"bool\">BOOL</span>, use <small>/set &lt;name&gt;</small> to enable, and <small>/set no-&lt;name&gt;</small> to disable (you can also use other forms, such as supplying a <small>&lt;value&gt;</small> of + or 1 to enable and - or 0 to disable).</dd>\n\
+<dt>description</dt>\n\
+\t<dd>A short description of the setting, as used in messages produced by /set.</dd>\n\
+</dl>\n\
+</div><!--#key-->\n\
+<div id=\"table\">\n\
+<table style=\"border:1px solid;\">\n\
+<tr style=\"text-align:center\"><td>name</td><td>type</td><td>default</td><td>rc</td><td>cmdline</td><td>/set</td><td>description</td></tr>\n");
+ else
+ printf("/* Generated by genconfig */\n");
switch(otype)
{
case 1:
@@ -523,7 +568,21 @@ int main(int argc, char **argv)
}
break;
}
- printf(": %s\\n\");", ents[i].set_msg);
+ printf(": %s\\n\");\n", ents[i].set_msg);
+ }
+ break;
+ case 8:
+ switch(ents[i].type)
+ {
+ case BOOL:
+ printf("<tr><td>%s</td><td><span class=\"bool\">BOOL</span></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", ents[i].cname, ents[i].value?"true":"false", ents[i].rc_name?ents[i].rc_name:"<span class=\"na\">[N/A]</span>", ents[i].cmdline_name?ents[i].cmdline_name:"<span class=\"na\">[N/A]</span>", ents[i].set_name?ents[i].set_name:"<span class=\"na\">[N/A]</span>", ents[i].set_msg?ents[i].set_msg:"<span class=\"na\">[N/A]</span>");
+ break;
+ case INT:
+ printf("<tr><td>%s</td><td><span class=\"int\">INT</span></td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", ents[i].cname, ents[i].value, ents[i].rc_name?ents[i].rc_name:"<span class=\"na\">[N/A]</span>", ents[i].cmdline_name?ents[i].cmdline_name:"<span class=\"na\">[N/A]</span>", ents[i].set_name?ents[i].set_name:"<span class=\"na\">[N/A]</span>", ents[i].set_msg?ents[i].set_msg:"<span class=\"na\">[N/A]</span>");
+ break;
+ default:
+ printf("<tr><td>%s</td><td><em>(unknown type)</em></td><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", ents[i].cname, ents[i].value, ents[i].rc_name?ents[i].rc_name:"<span class=\"na\">[N/A]</span>", ents[i].cmdline_name?ents[i].cmdline_name:"<span class=\"na\">[N/A]</span>", ents[i].set_name?ents[i].set_name:"<span class=\"na\">[N/A]</span>", ents[i].set_msg?ents[i].set_msg:"<span class=\"na\">[N/A]</span>");
+ break;
}
break;
default:
@@ -537,6 +596,9 @@ int main(int argc, char **argv)
case 1:
printf("\treturn(0);\n}\n");
break;
+ case 8:
+ printf("</table>\n</div><!--#table-->\n</body>\n</html>\n");
+ break;
}
}
View
2 plans
@@ -10,8 +10,6 @@ Fix possible issue with CTCP. Funny stuff (including random characters) happene
Proper handling of Unicode in character-based things like cursor-movement, backspace.
-Generate a rc/set reference document with genconfig.
-
Improve the parsing of mirc-colour-codes (to fix things like \003124 which currently gets eaten entirely). The relevant code is in bits.c.
/dump command. Pipes a screendump (or better still, unprocessed text) into program of choice.
View
@@ -63,6 +63,7 @@
<ul>
<li>The options &apos;height&apos; and &apos;width&apos; are used to tell quIRC how many rows and columns your terminal has (for cursor-positioning). quIRC will try to deduce these values (from environment variables $LINES and $COLUMNS, using defaults of 80x24 if these env vars are not found), but you can override those guesses here or on the command line.</li>
</ul>
+ For full details see <a href="config_ref.htm">config_ref.htm</a>.
</dd>
<dt>/ignore [-ipd] <em>user</em>[@<em>host</em>]</dt>
<dt>/ignore [-ipd] -r <em>regex</em></dt>
@@ -117,7 +118,7 @@
</div><!--#commands-->
<div id="configuration">
<h2>Configuration</h2>
-<p>quIRC can be configured through an &quot;rc file&quot; as follows.</p>
+<p>quIRC can be configured through an &quot;rc file&quot; as follows. (For a compact reference table see <a href="config_ref.htm">config_ref.htm</a>)</p>
<p>In your home directory (/home/username), create a file called &quot;.quirc&quot;, and open it in your editor.</p>
<p>In this file you can set servers, nick and channels to automatically use:<br />
<tt>nick <em>global-nickname</em></tt><br />
@@ -135,7 +136,7 @@
<p>Another setting here is force-redraw, with<br />
<tt>fred <em>force-redraw</em></tt><br />
which will redraw the whole screen when things change; the number controls how often.<br />
-0 won't redraw at all, while 3 will redraw every 0.25 seconds. The default is 2, which redraws whenever any buffer is written to or input is entered.</p>
+0 won't redraw at all, while 3 will redraw every 0.25 seconds. The default is now 0 (it used to be 2, which redraws whenever any buffer is written to or input is entered). Since some improvements were made to the drawing code, fred's assistance should no longer be needed, but we've kept him around just in case.</p>
<p>The size of each scrollback buffer, in lines, can be set with<br />
<tt>buf <em>buf-lines</em></tt><br />
the default being 256. Larger values will, of course, increase memory consumption.</p>

0 comments on commit 76d7bce

Please sign in to comment.