Documentation fixes from Federico G. Schwindt <fgsch@lodoss.net>

- mention vmod_std(7)
- HEADER is released and used by vmod_std(7) so put it in its own line.
  The explanation is still needed though.
- for consistency replace leading tabs with spaces
- *fallback* are not strings so avoid mentioning the type
- use ascii characters in vmod_std(7)

And a few style changes from me to vmod_std.rst
parent e0901271
......@@ -22,7 +22,7 @@ For instance::
The "std" vmod is one you get with Varnish, it will always be there
and we will put "boutique" functions in it, such as the "toupper"
function shown above. The full contents of the "std" module is
documented in XXX:TBW.
documented in vmod_std(7).
This part of the manual is about how you go about writing your own
VMOD, how the language interface between C and VCC works etc. This
......@@ -185,7 +185,12 @@ VOID
Can only be used for return-value, which makes the function a VCL
procedure.
IP, BOOL, HEADER
HEADER
C-type: ``enum gethdr_e, const char *``
XXX: explain me
IP, BOOL
XXX: these types are not released for use in vmods yet.
......
......@@ -31,29 +31,29 @@ toupper
-------
Prototype
toupper(STRING S)
toupper(STRING s)
Return value
String
Description
Converts the STRING S to upper case.
Converts the string *s* to upper case.
Example
set beresp.http.x-scream = std.toupper("yes!");
tolower
-------
Prototype
tolower(STRING S)
tolower(STRING s)
Return value
String
Description
Converts the STRING to lower case.
Converts the string *s* to lower case.
Example
set beresp.http.x-nice = std.tolower("VerY");
set_up_tos
----------
Prototype
set_ip_tos(INT I)
set_ip_tos(INT i)
Return value
Void
Description
......@@ -84,7 +84,7 @@ Prototype
Return value
Void
Description
Logs string to the shared memory log.
Logs *string* to the shared memory log.
Example
std.log("Something fishy is going on with the vhost " + req.host);
......@@ -120,10 +120,9 @@ Prototype
Return value
Duration
Description
Converts the string s to seconds. s can be quantified with the
usual s (seconds), m (minutes), h (hours), d (days) and w
(weeks) units. If it fails to parse the string *fallback*
will be used
Converts the string *s* to seconds. *s* can be quantified with
the usual s (seconds), m (minutes), h (hours), d (days) and w
(weeks) units. If *s* fails to parse, *fallback* will be used.
Example
set beresp.ttl = std.duration("1w", 3600);
......@@ -134,10 +133,10 @@ Prototype
Return value
Int
Description
Converts the string s to an integer. If it fails to parse the
string *fallback* will be used
Converts the string *s* to an integer. If *s* fails to parse,
*fallback* will be used
Example
if (std.integer(beresp.http.x-foo, 0) > 5) { }
if (std.integer(beresp.http.x-foo, 0) > 5) { ... }
collect
-------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment