Merge pull request #2197 from yangfl/master

treewide: Fix typos in comments
This commit is contained in:
Hannu Nyman 2018-10-10 20:25:11 +03:00 committed by GitHub
commit 67fd6b6e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 80 additions and 80 deletions

View file

@ -35,7 +35,7 @@ function io.exec(command)
return buffer return buffer
end end
--- Execute command and invoke given callback for each readed line --- Execute command and invoke given callback for each read line
-- @param command String containing the command to execute -- @param command String containing the command to execute
-- @param callback Function to call back for each line -- @param callback Function to call back for each line
-- @return Always true -- @return Always true
@ -53,7 +53,7 @@ function io.execl(command, callback)
return true return true
end end
--- Execute command and return an iterator that returns one line per invokation --- Execute command and return an iterator that returns one line per invocation
-- @param command String containing the command to execute -- @param command String containing the command to execute
-- @return Iterator function -- @return Iterator function
function io.execi(command) function io.execi(command)
@ -71,7 +71,7 @@ end
--- LuCI Asterisk - core status --- LuCI Asterisk - core status
core = luci.util.class() core = luci.util.class()
--- Retrive version string. --- Retrieve version string.
-- @return String containing the reported asterisk version -- @return String containing the reported asterisk version
function core.version(self) function core.version(self)
local version = io.exec("core show version") local version = io.exec("core show version")
@ -141,7 +141,7 @@ function sip.peers(self)
return peers return peers
end end
--- Get informations of given SIP peer --- Get information of given SIP peer
-- @param peer String containing the name of the SIP peer -- @param peer String containing the name of the SIP peer
function sip.peer(peer) function sip.peer(peer)
local info = { } local info = { }
@ -217,7 +217,7 @@ end
--- Convert given list to a collection of hyperlinks --- Convert given list to a collection of hyperlinks
-- @param list Table of tokens -- @param list Table of tokens
-- @param url String pattern or callback function to construct urls (optional) -- @param url String pattern or callback function to construct urls (optional)
-- @param sep String containing the seperator (optional, default is ", ") -- @param sep String containing the separator (optional, default is ", ")
-- @return String containing the html fragment -- @return String containing the html fragment
function tools.hyperlinks(list, url, sep) function tools.hyperlinks(list, url, sep)
local html local html

View file

@ -126,7 +126,7 @@
<div class="cbi-section-create cbi-tblsection-create" style="padding: 3px"> <div class="cbi-section-create cbi-tblsection-create" style="padding: 3px">
<h3>Create a new dialzone</h3> <h3>Create a new dialzone</h3>
The name is required and must be unique. It may only contain the characters A-Z, a-z, 0-9 and _ .<br /> The name is required and must be unique. It may only contain the characters A-Z, a-z, 0-9 and _ .<br />
You can specifiy multiple number matches by separating them with spaces.<br /> You can specify multiple number matches by separating them with spaces.<br />
<%- if create_error then %> <%- if create_error then %>
<br /><span style="color:red">Invalid name given!</span><br /> <br /><span style="color:red">Invalid name given!</span><br />

View file

@ -90,7 +90,7 @@ end
-- will use dynamic_dns_lucihelper to check if -- will use dynamic_dns_lucihelper to check if
-- local IP can be read -- local IP can be read
local function _verify_ip_source() local function _verify_ip_source()
-- section is globally defined here be calling agrument (see above) -- section is globally defined here be calling argument (see above)
local _arg local _arg
local _ipv6 = usev6:formvalue(section) local _ipv6 = usev6:formvalue(section)
@ -173,7 +173,7 @@ end
-- function to verify if option is valid -- function to verify if option is valid
local function _option_validate(self, value, optional) local function _option_validate(self, value, optional)
-- section is globally defined here be calling agrument (see above) -- section is globally defined here be calling argument (see above)
local fusev6 = usev6:formvalue(section) or "0" local fusev6 = usev6:formvalue(section) or "0"
local fsvc4 = svc4:formvalue(section) or "-" local fsvc4 = svc4:formvalue(section) or "-"
local fsvc6 = svc6:formvalue(section) or "-" local fsvc6 = svc6:formvalue(section) or "-"
@ -200,7 +200,7 @@ local function _option_validate(self, value, optional)
if (#urlsh == 0) then return "" end if (#urlsh == 0) then return "" end
used = _option_used(self.option, urlsh) used = _option_used(self.option, urlsh)
-- on error or not used return empty sting -- on error or not used return empty string
if used < 1 then return "" end if used < 1 then return "" end
-- needed but no data then return error -- needed but no data then return error
if not value or (#value == 0) then if not value or (#value == 0) then

View file

@ -329,7 +329,7 @@ function place_new_nodes() {
} }
} }
else { else {
// beginn somewhere // begin somewhere
n.x = Math.random()*400; n.x = Math.random()*400;
n.y = Math.random()*400; n.y = Math.random()*400;
} }

View file

@ -544,7 +544,7 @@ function bl.validate(self, value)
elseif v < 1 or v > 4096 then elseif v < 1 or v > 4096 then
return nil, err_tab_access(self.title_base, translate("Value not between 1 and 4096") ) return nil, err_tab_access(self.title_base, translate("Value not between 1 and 4096") )
elseif v == self.default then elseif v == self.default then
return "" -- dont need to save default return "" -- don't need to save default
end end
return value return value
end end
@ -721,7 +721,7 @@ function st.validate(self, value)
elseif v < 1 then elseif v < 1 then
return nil, err_tab_misc(self.title_base, translate("Value not greater 0 or empty") ) return nil, err_tab_misc(self.title_base, translate("Value not greater 0 or empty") )
elseif v == self.default then elseif v == self.default then
return "" -- dont need to save default return "" -- don't need to save default
end end
return value return value
end end
@ -740,7 +740,7 @@ function mcc.validate(self, value)
elseif v < 1 then elseif v < 1 then
return nil, err_tab_misc(self.title_base, translate("Value not greater 0 or empty") ) return nil, err_tab_misc(self.title_base, translate("Value not greater 0 or empty") )
elseif v == self.default then elseif v == self.default then
return "" -- dont need to save default return "" -- don't need to save default
end end
return value return value
end end

View file

@ -167,7 +167,7 @@ function mode.write(self, section, value)
-- * wl0 gets an ipv6 address, in this case the fdca:ffee:babe::1:1/64 -- * wl0 gets an ipv6 address, in this case the fdca:ffee:babe::1:1/64
-- * we do a ::ffff:ffff:0/96 route into siit0, so everything from 6mesh goes into translation. -- * we do a ::ffff:ffff:0/96 route into siit0, so everything from 6mesh goes into translation.
-- * an HNA6 of ::ffff:ffff:0:0/96 announces the mapped 0.0.0.0/0 ipv4 space. -- * an HNA6 of ::ffff:ffff:0:0/96 announces the mapped 0.0.0.0/0 ipv4 space.
-- * MTU on WAN, LAN down to 1400, ipv6 headers are slighly larger. -- * MTU on WAN, LAN down to 1400, ipv6 headers are slightly larger.
if value == "gateway" then if value == "gateway" then

View file

@ -81,7 +81,7 @@ if has_custom_splash then
is limited and because of this we ask you not to do any of the following:%></p> is limited and because of this we ask you not to do any of the following:%></p>
<ul> <ul>
<li><%:use filesharing applications on this network%></li> <li><%:use filesharing applications on this network%></li>
<li><%:waste bandwidth with unneccesary downloads or streams%></li> <li><%:waste bandwidth with unnecessary downloads or streams%></li>
<li><%:perform any kind of illegal activities%></li> <li><%:perform any kind of illegal activities%></li>
</ul> </ul>
<br /> <br />

View file

@ -237,12 +237,12 @@ start() {
[ -s $IPT_REPLAY ] && . $IPT_REPLAY [ -s $IPT_REPLAY ] && . $IPT_REPLAY
echo -n > $IPT_REPLAY echo -n > $IPT_REPLAY
### Add interface independant prerouting rules ### Add interface independent prerouting rules
$IPT -t nat -A luci_splash_prerouting -j luci_splash_leases $IPT -t nat -A luci_splash_prerouting -j luci_splash_leases
$IPT -t nat -A luci_splash_leases -p udp --dport 53 -j REDIRECT --to-ports 53 $IPT -t nat -A luci_splash_leases -p udp --dport 53 -j REDIRECT --to-ports 53
$IPT -t nat -A luci_splash_leases -p tcp --dport 80 -j REDIRECT --to-ports 8082 $IPT -t nat -A luci_splash_leases -p tcp --dport 80 -j REDIRECT --to-ports 8082
### Add interface independant forwarding rules ### Add interface independent forwarding rules
$IPT -t filter -A luci_splash_forwarding -j luci_splash_filter $IPT -t filter -A luci_splash_forwarding -j luci_splash_filter
$IPT -t filter -A luci_splash_filter -p tcp -j REJECT --reject-with tcp-reset $IPT -t filter -A luci_splash_filter -p tcp -j REJECT --reject-with tcp-reset
$IPT -t filter -A luci_splash_filter -j REJECT --reject-with icmp-net-prohibited $IPT -t filter -A luci_splash_filter -j REJECT --reject-with icmp-net-prohibited

View file

@ -10,7 +10,7 @@ function index()
require("luci.util") require("luci.util")
require("luci.statistics.datatree") require("luci.statistics.datatree")
-- override entry(): check for existance <plugin>.so where <plugin> is derived from the called path -- override entry(): check for existence <plugin>.so where <plugin> is derived from the called path
function _entry( path, ... ) function _entry( path, ... )
local file = path[5] or path[4] local file = path[5] or path[4]
if nixio.fs.access( "/usr/lib/collectd/" .. file .. ".so" ) then if nixio.fs.access( "/usr/lib/collectd/" .. file .. ".so" ) then

View file

@ -17,7 +17,7 @@ function rrdargs( graph, plugin, plugin_instance )
-- diagram data description -- diagram data description
data = { data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional) -- defined sources for data types, if omitted assume a single DS named "value" (optional)
sources = { sources = {
if_octets = { "tx", "rx" } if_octets = { "tx", "rx" }
}, },

View file

@ -14,7 +14,7 @@ function rrdargs( graph, plugin, plugin_instance )
-- diagram data description -- diagram data description
data = { data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional) -- defined sources for data types, if omitted assume a single DS named "value" (optional)
sources = { sources = {
if_octets = { "tx", "rx" } if_octets = { "tx", "rx" }
}, },

View file

@ -58,7 +58,7 @@ end
function ztype.cfgvalue(self, s) function ztype.cfgvalue(self, s)
-- Format a meaninful tile for the Zone Type column -- Format a meaningful tile for the Zone Type column
local itxt = self.map:get(s, "zone_type") local itxt = self.map:get(s, "zone_type")
local itls = self.map:get(s, "tls_upstream") local itls = self.map:get(s, "tls_upstream")
@ -84,7 +84,7 @@ end
function zones.cfgvalue(self, s) function zones.cfgvalue(self, s)
-- Format a meaninful sentence for the Zones viewed column -- Format a meaningful sentence for the Zones viewed column
local xtxt, otxt local xtxt, otxt
local itxt = self.map:get(s, "zone_name") local itxt = self.map:get(s, "zone_name")
local itype = self.map:get(s, "zone_type") local itype = self.map:get(s, "zone_type")
@ -131,7 +131,7 @@ end
function servers.cfgvalue(self, s) function servers.cfgvalue(self, s)
-- Format a meaninful sentence for the Servers (and URL) column -- Format a meaningful sentence for the Servers (and URL) column
local xtxt, otxt, rtxt, found local xtxt, otxt, rtxt, found
local itxt = self.map:get(s, "server") local itxt = self.map:get(s, "server")
local iurl = self.map:get(s, "url_dir") local iurl = self.map:get(s, "url_dir")

View file

@ -17,13 +17,13 @@ There are various use cases why you would like to do so:
Regarding 1: Please note, that you need to unload the wireless driver modules in order to get the most effect of saving power. Regarding 1: Please note, that you need to unload the wireless driver modules in order to get the most effect of saving power.
In my test scenario only disabling WiFi saves about ~0.4 Watt, unloading the modules removes another ~0.4 Watt. In my test scenario only disabling WiFi saves about ~0.4 Watt, unloading the modules removes another ~0.4 Watt.
Regarding 2: Think of a wireless accesspoint e.g. in your bedrom, kids room where you want to remove the ammount of radiation emitted. Regarding 2: Think of a wireless accesspoint e.g. in your bedrom, kids room where you want to remove the amount of radiation emitted.
Regarding 3: E.g. in a company, why would wireless need to be enabled weekends if no one is there working? Regarding 3: E.g. in a company, why would wireless need to be enabled weekends if no one is there working?
Or think of an accesspoint in your kids room when you want the youngsters to sleep after 10 pm instead of facebooking... Or think of an accesspoint in your kids room when you want the youngsters to sleep after 10 pm instead of facebooking...
## Configuration ## Configuration
You can create an arbitrary number of schedule events. Please note that there is on sanity check done wheather the start / stop times overlap or make sense. You can create an arbitrary number of schedule events. Please note that there is on sanity check done whether the start / stop times overlap or make sense.
If start and stop time are equal, this leads to disabling the WiFi at the given time. If start and stop time are equal, this leads to disabling the WiFi at the given time.
Logging if enabled is done to the file `/var/log/wifi_schedule.log` and can be reviewed through the "View Logfile" tab. Logging if enabled is done to the file `/var/log/wifi_schedule.log` and can be reviewed through the "View Logfile" tab.

View file

@ -14,7 +14,7 @@ find . -type f -name '*.lua' -path '*/controller/*' | while read controller; do
package="${controller##*/controller/}"; package="${package%.lua}"; package="luci.controller.${package//\//.}" package="${controller##*/controller/}"; package="${package%.lua}"; package="luci.controller.${package//\//.}"
if ! grep -sqE '\bmodule[[:space:]]*\(?[[:space:]]*("|\047|\[=*\[)'"$package" "$controller"; then if ! grep -sqE '\bmodule[[:space:]]*\(?[[:space:]]*("|\047|\[=*\[)'"$package" "$controller"; then
echo "'$controller' does not containt the expected\n\t'module(\"$package\", ...)' line.\n" echo "'$controller' does not contain the expected\n\t'module(\"$package\", ...)' line.\n"
fi fi
grep -sqE '\b(Form|SimpleForm)[[:space:]]*\(' "$model" && ! grep -sqE '\bMap[[:space:]]*\(' "$model" && is_form=1 || is_form=0 grep -sqE '\b(Form|SimpleForm)[[:space:]]*\(' "$model" && ! grep -sqE '\bMap[[:space:]]*\(' "$model" && is_form=1 || is_form=0

View file

@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;
use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged); use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged);
@ARGV >= 1 || die "Usage: $0 <source direcory>\n"; @ARGV >= 1 || die "Usage: $0 <source directory>\n";
my %stringtable; my %stringtable;

View file

@ -1,6 +1,6 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- LuaDoc configuration file. This file contains the default options for -- LuaDoc configuration file. This file contains the default options for
-- luadoc operation. These options can be overriden by the command line tool -- luadoc operation. These options can be overridden by the command line tool
-- @see luadoc.print_help -- @see luadoc.print_help
-- @release $Id: config.lua,v 1.6 2007/04/18 14:28:39 tomas Exp $ -- @release $Id: config.lua,v 1.6 2007/04/18 14:28:39 tomas Exp $
------------------------------------------------------------------------------- -------------------------------------------------------------------------------

View file

@ -46,7 +46,7 @@ set_defaults() {
b="${b//_/ }" b="${b//_/ }"
string_contains "$a" "_LENGTH" && continue string_contains "$a" "_LENGTH" && continue
string_contains "$a" "_ITEM" && { string_contains "$a" "_ITEM" && {
# special threatment for lists. use add_list and remove the # special treatment for lists. use add_list and remove the
# item index (_ITEMx). # item index (_ITEMx).
uci add_list $2.${a//_ITEM[0-9]*/}="$b" uci add_list $2.${a//_ITEM[0-9]*/}="$b"
} || { } || {

View file

@ -131,7 +131,7 @@ If you call this function several times the dependencies will be linked with **"
Adds an entry to the selection list Adds an entry to the selection list
#### property .widget = "select" #### property .widget = "select"
**"select"** shows a selction list, **"radio"** shows a list of radio buttons inside form **"select"** shows a selection list, **"radio"** shows a list of radio buttons inside form
#### property .default = nil #### property .default = nil
The default value The default value
@ -194,7 +194,7 @@ If you call this function several times the dependencies will be linked with **"
Adds an entry to the list Adds an entry to the list
#### property .widget = "checkbox" #### property .widget = "checkbox"
**"select"** shows a selction list, **"checkbox"** shows a list of checkboxes inside form **"select"** shows a selection list, **"checkbox"** shows a list of checkboxes inside form
#### property .delimiter = " " #### property .delimiter = " "
The string which will be used to delimit the values inside stored option The string which will be used to delimit the values inside stored option

View file

@ -1,7 +1,7 @@
LuCI has a simple regex based template processor which parses HTML-files to Lua functions and allows to store precompiled template files. LuCI has a simple regex based template processor which parses HTML-files to Lua functions and allows to store precompiled template files.
The simplest form of a template is just an ordinary HTML-file. It will be printed out to the user as is. The simplest form of a template is just an ordinary HTML-file. It will be printed out to the user as is.
In LuCI every template is an object with an own scope. It can therefore be instanciated and each instance can has a different scope. As every template processor. LuCI supports several special markups. Those are enclosed in `<% %>`-Tags. In LuCI every template is an object with an own scope. It can therefore be instantiated and each instance can has a different scope. As every template processor. LuCI supports several special markups. Those are enclosed in `<% %>`-Tags.
By adding `-` (dash) right after the opening `<%` every whitespace before the markup will be stripped. Adding a `-` right before the closing `%>` will equivalently strip every whitespace behind the markup. By adding `-` (dash) right after the opening `<%` every whitespace before the markup will be stripped. Adding a `-` right before the closing `%>` will equivalently strip every whitespace behind the markup.

View file

@ -7,7 +7,7 @@ vice versa.
module "luci.http.mime" module "luci.http.mime"
---[[ ---[[
MIME mapping table containg extension - mimetype relations. MIME mapping table containing extension - mimetype relations.
@class table @class table
]] ]]

View file

@ -283,7 +283,7 @@ Fetch all routes, optionally matching the given criteria.
@sort 9 @sort 9
@name routes @name routes
@param filter <p>Table containing one or more of the possible filter @param filter <p>Table containing one or more of the possible filter
critera described below (optional)</p><table> criteria described below (optional)</p><table>
<tr><th>Field</th><th>Description</th></tr> <tr><th>Field</th><th>Description</th></tr>
<tr><td>`family`</td><td> <tr><td>`family`</td><td>
Number describing the address family to return - `4` selects Number describing the address family to return - `4` selects
@ -363,7 +363,7 @@ Fetches entries from the IPv4 ARP and IPv6 neighbour kernel table
@sort 10 @sort 10
@name neighbors @name neighbors
@param filter <p>Table containing one or more of the possible filter @param filter <p>Table containing one or more of the possible filter
critera described below (optional)</p><table> criteria described below (optional)</p><table>
<tr><th>Field</th><th>Description</th></tr> <tr><th>Field</th><th>Description</th></tr>
<tr><td>`family`</td><td> <tr><td>`family`</td><td>
Number describing the address family to return - `4` selects Number describing the address family to return - `4` selects
@ -652,7 +652,7 @@ are considered lower than MAC addresses</li>
@class function @class function
@sort 10 @sort 10
@name cidr.lower @name cidr.lower
@param addr A `luci.ip.cidr` instance or a string convertable by @param addr A `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()` to compare against. `luci.ip.new()` to compare against.
@return `true` if this CIDR is lower than the given address, @return `true` if this CIDR is lower than the given address,
else `false`. else `false`.
@ -676,7 +676,7 @@ are considered lower than MAC addresses</li>
@class function @class function
@sort 11 @sort 11
@name cidr.higher @name cidr.higher
@param addr A `luci.ip.cidr` instance or a string convertable by @param addr A `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()` to compare against. `luci.ip.new()` to compare against.
@return `true` if this CIDR is higher than the given address, @return `true` if this CIDR is higher than the given address,
else `false`. else `false`.
@ -696,7 +696,7 @@ Checks whether this CIDR instance is equal to the given argument.
@class function @class function
@sort 12 @sort 12
@name cidr.equal @name cidr.equal
@param addr A `luci.ip.cidr` instance or a string convertable by @param addr A `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()` to compare against. `luci.ip.new()` to compare against.
@return `true` if this CIDR is equal to the given address, @return `true` if this CIDR is equal to the given address,
else `false`. else `false`.
@ -877,7 +877,7 @@ Test whether CIDR contains given range.
@class function @class function
@sort 21 @sort 21
@name cidr.contains @name cidr.contains
@param addr A `luci.ip.cidr` instance or a string convertable by @param addr A `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()` to test. `luci.ip.new()` to test.
@return `true` if this instance fully contains the given address else @return `true` if this instance fully contains the given address else
`false`. `false`.
@ -903,12 +903,12 @@ address space, the result is set to the highest possible address.
@sort 22 @sort 22
@name cidr.add @name cidr.add
@param amount A numeric value between 0 and 0xFFFFFFFF, a @param amount A numeric value between 0 and 0xFFFFFFFF, a
`luci.ip.cidr` instance or a string convertable by `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()`. `luci.ip.new()`.
@param inplace If `true`, modify this instance instead of returning @param inplace If `true`, modify this instance instead of returning
a new derived CIDR instance. a new derived CIDR instance.
@return <ul> @return <ul>
<li>When adding inplace: Return `true` if the addition succeded <li>When adding inplace: Return `true` if the addition succeeded
or `false` when the addition overflowed.</li> or `false` when the addition overflowed.</li>
<li>When deriving new CIDR: Return new instance representing the value of <li>When deriving new CIDR: Return new instance representing the value of
this instance plus the added amount or the highest possible address if this instance plus the added amount or the highest possible address if
@ -952,7 +952,7 @@ possible address is returned.
@sort 23 @sort 23
@name cidr.sub @name cidr.sub
@param amount A numeric value between 0 and 0xFFFFFFFF, a @param amount A numeric value between 0 and 0xFFFFFFFF, a
`luci.ip.cidr` instance or a string convertable by `luci.ip.cidr` instance or a string convertible by
`luci.ip.new()`. `luci.ip.new()`.
@param inplace If `true`, modify this instance instead of returning @param inplace If `true`, modify this instance instead of returning
a new derived CIDR instance. a new derived CIDR instance.

View file

@ -10,7 +10,7 @@ module "nixio.CHANGELOG"
-- <li>Added support for x509 certificates in DER format.</li> -- <li>Added support for x509 certificates in DER format.</li>
-- <li>Added support for splice() in UnifiedIO.copyz().</li> -- <li>Added support for splice() in UnifiedIO.copyz().</li>
-- <li>Added interface to inject chunks into UnifiedIO.linesource() buffer.</li> -- <li>Added interface to inject chunks into UnifiedIO.linesource() buffer.</li>
-- <li>Changed TLS behaviour to explicitely separate servers and clients.</li> -- <li>Changed TLS behaviour to explicitly separate servers and clients.</li>
-- <li>Fixed usage of signed datatype breaking Base64 decoding.</li> -- <li>Fixed usage of signed datatype breaking Base64 decoding.</li>
-- <li>Fixed namespace clashes for nixio.fs.</li> -- <li>Fixed namespace clashes for nixio.fs.</li>
-- <li>Fixed splice() support for some exotic C libraries.</li> -- <li>Fixed splice() support for some exotic C libraries.</li>

View file

@ -18,7 +18,7 @@ module "nixio.README"
-- table <strong>nixio.const_sock</strong> for socket error codes. This might -- table <strong>nixio.const_sock</strong> for socket error codes. This might
-- be important if you are dealing with Windows applications, on POSIX however -- be important if you are dealing with Windows applications, on POSIX however
-- const_sock is just an alias for const.</li> -- const_sock is just an alias for const.</li>
-- <li>With some exceptions - which are explicitely stated in the function -- <li>With some exceptions - which are explicitly stated in the function
-- documentation - all blocking functions are signal-protected and will not fail -- documentation - all blocking functions are signal-protected and will not fail
-- with EINTR.</li> -- with EINTR.</li>
-- <li>On POSIX the SIGPIPE signal will be set to ignore upon initialization. -- <li>On POSIX the SIGPIPE signal will be set to ignore upon initialization.

View file

@ -59,7 +59,7 @@ module "nixio"
-- <li>aliases = Table of alias names</li> -- <li>aliases = Table of alias names</li>
-- </ul> -- </ul>
--- Get all or a specifc proto entry. --- Get all or a specific proto entry.
-- @class function -- @class function
-- @name nixio.getproto -- @name nixio.getproto
-- @param proto protocol number or name to lookup (optional) -- @param proto protocol number or name to lookup (optional)

View file

@ -720,7 +720,7 @@ cleanup:
} }
/* /*
* Helper for mpi substraction * Helper for mpi subtraction
*/ */
static void mpi_sub_hlp( int n, t_int *s, t_int *d ) static void mpi_sub_hlp( int n, t_int *s, t_int *d )
{ {
@ -741,7 +741,7 @@ static void mpi_sub_hlp( int n, t_int *s, t_int *d )
} }
/* /*
* Unsigned substraction: X = |A| - |B| (HAC 14.9) * Unsigned subtraction: X = |A| - |B| (HAC 14.9)
*/ */
int mpi_sub_abs( mpi *X, mpi *A, mpi *B ) int mpi_sub_abs( mpi *X, mpi *A, mpi *B )
{ {
@ -809,7 +809,7 @@ cleanup:
} }
/* /*
* Signed substraction: X = A - B * Signed subtraction: X = A - B
*/ */
int mpi_sub_mpi( mpi *X, mpi *A, mpi *B ) int mpi_sub_mpi( mpi *X, mpi *A, mpi *B )
{ {
@ -856,7 +856,7 @@ int mpi_add_int( mpi *X, mpi *A, int b )
} }
/* /*
* Signed substraction: X = A - b * Signed subtraction: X = A - b
*/ */
int mpi_sub_int( mpi *X, mpi *A, int b ) int mpi_sub_int( mpi *X, mpi *A, int b )
{ {

View file

@ -19,7 +19,7 @@
* MA 02110-1301 USA * MA 02110-1301 USA
*/ */
/* /*
* The ITU-T X.509 standard defines a certificat format for PKI. * The ITU-T X.509 standard defines a certificate format for PKI.
* *
* http://www.ietf.org/rfc/rfc2459.txt * http://www.ietf.org/rfc/rfc2459.txt
* http://www.ietf.org/rfc/rfc3279.txt * http://www.ietf.org/rfc/rfc3279.txt
@ -68,7 +68,7 @@ static int asn1_eval_octet(unsigned int digit)
} }
/* /*
* write the asn.1 lenght form into p * write the asn.1 length form into p
*/ */
static int asn1_add_len(unsigned int size, x509_node *node) static int asn1_add_len(unsigned int size, x509_node *node)
{ {
@ -788,7 +788,7 @@ static int x509write_parse_names(x509_node *node, unsigned char *names)
R_len = len; R_len = len;
} }
/* set tag poiner to begin */ /* set tag pointer to begin */
tag_sp = tag; tag_sp = tag;
/* is at end? */ /* is at end? */
@ -866,7 +866,7 @@ static int x509write_parse_names(x509_node *node, unsigned char *names)
} }
/* /*
* Copy raw data from orginal ca to node * Copy raw data from original ca to node
*/ */
static int x509write_copy_from_raw(x509_node *node, x509_buf *raw) static int x509write_copy_from_raw(x509_node *node, x509_buf *raw)
{ {

View file

@ -272,7 +272,7 @@ int mpi_cmp_int( mpi *X, int z );
int mpi_add_abs( mpi *X, mpi *A, mpi *B ); int mpi_add_abs( mpi *X, mpi *A, mpi *B );
/** /**
* \brief Unsigned substraction: X = |A| - |B| * \brief Unsigned subtraction: X = |A| - |B|
* *
* \return 0 if successful, * \return 0 if successful,
* POLARSSL_ERR_MPI_NEGATIVE_VALUE if B is greater than A * POLARSSL_ERR_MPI_NEGATIVE_VALUE if B is greater than A
@ -288,7 +288,7 @@ int mpi_sub_abs( mpi *X, mpi *A, mpi *B );
int mpi_add_mpi( mpi *X, mpi *A, mpi *B ); int mpi_add_mpi( mpi *X, mpi *A, mpi *B );
/** /**
* \brief Signed substraction: X = A - B * \brief Signed subtraction: X = A - B
* *
* \return 0 if successful, * \return 0 if successful,
* 1 if memory allocation failed * 1 if memory allocation failed
@ -304,7 +304,7 @@ int mpi_sub_mpi( mpi *X, mpi *A, mpi *B );
int mpi_add_int( mpi *X, mpi *A, int b ); int mpi_add_int( mpi *X, mpi *A, int b );
/** /**
* \brief Signed substraction: X = A - b * \brief Signed subtraction: X = A - b
* *
* \return 0 if successful, * \return 0 if successful,
* 1 if memory allocation failed * 1 if memory allocation failed

View file

@ -375,7 +375,7 @@ int x509write_add_pubkey( x509_raw *chain, rsa_context *pubkey );
* the string parse. * the string parse.
* *
* \param chain points to the raw certificate data * \param chain points to the raw certificate data
* \param names a string that can hold (separete with ";"): * \param names a string that can hold (separate with ";"):
* CN=CommonName * CN=CommonName
* -- O=Organization * -- O=Organization
* -- OU=OrgUnit * -- OU=OrgUnit
@ -402,7 +402,7 @@ int x509write_add_customize ( x509_raw *crt,
* \brief Add x509 issuer field * \brief Add x509 issuer field
* *
* \param chain points to the raw certificate data * \param chain points to the raw certificate data
* \param issuer a string holding (separete with ";"): * \param issuer a string holding (separate with ";"):
* CN=CommonName * CN=CommonName
* -- O=Organization * -- O=Organization
* -- OU=OrgUnit * -- OU=OrgUnit
@ -419,7 +419,7 @@ int x509write_add_issuer( x509_raw *crt, unsigned char *issuer);
* \brief Add x509 subject field * \brief Add x509 subject field
* *
* \param chain points to the raw certificate data * \param chain points to the raw certificate data
* \param subject a string holding (separete with ";"): * \param subject a string holding (separate with ";"):
* CN=CommonName * CN=CommonName
* -- O=Organization * -- O=Organization
* -- OU=OrgUnit * -- OU=OrgUnit

View file

@ -22,7 +22,7 @@ Check whether a dispatch node shall be visible
]] ]]
---[[ ---[[
Return a sorted table of visible childs within a given node Return a sorted table of visible children within a given node
@class function @class function
@name node_childs @name node_childs

View file

@ -335,13 +335,13 @@ end
-- Content-Type. Stores all extracted data associated with its parameter name -- Content-Type. Stores all extracted data associated with its parameter name
-- in the params table within the given message object. Multiple parameter -- in the params table within the given message object. Multiple parameter
-- values are stored as tables, ordinary ones as strings. -- values are stored as tables, ordinary ones as strings.
-- If an optional file callback function is given then it is feeded with the -- If an optional file callback function is given then it is fed with the
-- file contents chunk by chunk and only the extracted file name is stored -- file contents chunk by chunk and only the extracted file name is stored
-- within the params table. The callback function will be called subsequently -- within the params table. The callback function will be called subsequently
-- with three arguments: -- with three arguments:
-- o Table containing decoded (name, file) and raw (headers) mime header data -- o Table containing decoded (name, file) and raw (headers) mime header data
-- o String value containing a chunk of the file data -- o String value containing a chunk of the file data
-- o Boolean which indicates wheather the current chunk is the last one (eof) -- o Boolean which indicates whether the current chunk is the last one (eof)
function mimedecode_message_body(src, msg, file_cb) function mimedecode_message_body(src, msg, file_cb)
local parser, header, field local parser, header, field
local len, maxlen = 0, tonumber(msg.env.CONTENT_LENGTH or nil) local len, maxlen = 0, tonumber(msg.env.CONTENT_LENGTH or nil)

View file

@ -204,13 +204,13 @@ Stores all extracted data associated with its parameter name
in the params table within the given message object. Multiple parameter in the params table within the given message object. Multiple parameter
values are stored as tables, ordinary ones as strings. values are stored as tables, ordinary ones as strings.
If an optional file callback function is given then it is feeded with the If an optional file callback function is given then it is fed with the
file contents chunk by chunk and only the extracted file name is stored file contents chunk by chunk and only the extracted file name is stored
within the params table. The callback function will be called subsequently within the params table. The callback function will be called subsequently
with three arguments: with three arguments:
o Table containing decoded (name, file) and raw (headers) mime header data o Table containing decoded (name, file) and raw (headers) mime header data
o String value containing a chunk of the file data o String value containing a chunk of the file data
o Boolean which indicates wheather the current chunk is the last one (eof) o Boolean which indicates whether the current chunk is the last one (eof)
@class function @class function
@name mimedecode_message_body @name mimedecode_message_body

View file

@ -15,7 +15,7 @@ local type, tostring, tonumber, unpack = type, tostring, tonumber, unpack
-- cursor factory, modify data (via Cursor.add, Cursor.delete, etc.), -- cursor factory, modify data (via Cursor.add, Cursor.delete, etc.),
-- save the changes to the staging area via Cursor.save and finally -- save the changes to the staging area via Cursor.save and finally
-- Cursor.commit the data to the actual config files. -- Cursor.commit the data to the actual config files.
-- LuCI then needs to Cursor.apply the changes so deamons etc. are -- LuCI then needs to Cursor.apply the changes so daemons etc. are
-- reloaded. -- reloaded.
module "luci.model.uci" module "luci.model.uci"

View file

@ -5,7 +5,7 @@ The typical workflow for UCI is: Get a cursor instance from the
cursor factory, modify data (via Cursor.add, Cursor.delete, etc.), cursor factory, modify data (via Cursor.add, Cursor.delete, etc.),
save the changes to the staging area via Cursor.save and finally save the changes to the staging area via Cursor.save and finally
Cursor.commit the data to the actual config files. Cursor.commit the data to the actual config files.
LuCI then needs to Cursor.apply the changes so deamons etc. are LuCI then needs to Cursor.apply the changes so daemons etc. are
reloaded. reloaded.
@cstyle instance @cstyle instance
]] ]]
@ -172,7 +172,7 @@ has the same effect as deleting the option.
---[[ ---[[
Create a sub-state of this cursor. Create a sub-state of this cursor.
The sub-state is tied to the parent curser, means it the parent unloads or The sub-state is tied to the parent cursor, means it the parent unloads or
loads configs, the sub state will do so as well. loads configs, the sub state will do so as well.
@class function @class function
@ -339,7 +339,7 @@ Set the configuration directory.
]] ]]
---[[ ---[[
Set the directory for uncommited changes. Set the directory for uncommitted changes.
@class function @class function
@name Cursor.set_savedir @name Cursor.set_savedir

View file

@ -18,7 +18,7 @@ Execute a given shell command and capture its standard output
@class function @class function
@name exec @name exec
@param command Command to call @param command Command to call
@return String containg the return the output of the command @return String containing the return the output of the command
]] ]]
---[[ ---[[
@ -38,7 +38,7 @@ exists.
@class function @class function
@name getenv @name getenv
@param var Name of the environment variable to retrieve (optional) @param var Name of the environment variable to retrieve (optional)
@return String containg the value of the specified variable @return String containing the value of the specified variable
@return Table containing all variables if no variable name is given @return Table containing all variables if no variable name is given
]] ]]
@ -279,7 +279,7 @@ LuCI system utilities / user related functions.
]] ]]
---[[ ---[[
Retrieve user informations for given uid. Retrieve user information for given uid.
@class function @class function
@name getuser @name getuser
@ -305,7 +305,7 @@ Test whether given string matches the password of a given system user.
@name user.checkpasswd @name user.checkpasswd
@param username String containing the Unix user name @param username String containing the Unix user name
@param pass String containing the password to compare @param pass String containing the password to compare
@return Boolean indicating wheather the passwords are equal @return Boolean indicating whether the passwords are equal
]] ]]
---[[ ---[[

View file

@ -262,7 +262,7 @@ end
-- one token per invocation, the tokens are separated by whitespace. If the -- one token per invocation, the tokens are separated by whitespace. If the
-- input value is a table, it is transformed into a string first. A nil value -- input value is a table, it is transformed into a string first. A nil value
-- will result in a valid interator which aborts with the first invocation. -- will result in a valid iterator which aborts with the first invocation.
function imatch(v) function imatch(v)
if type(v) == "table" then if type(v) == "table" then
local k = nil local k = nil

View file

@ -158,7 +158,7 @@ Return a matching iterator for the given value.
The iterator will return one token per invocation, the tokens are separated by The iterator will return one token per invocation, the tokens are separated by
whitespace. If the input value is a table, it is transformed into a string first. whitespace. If the input value is a table, it is transformed into a string first.
A nil value will result in a valid interator which aborts with the first invocation. A nil value will result in a valid iterator which aborts with the first invocation.
@class function @class function
@name imatch @name imatch
@ -289,7 +289,7 @@ will be stripped before it is returned.
]] ]]
---[[ ---[[
Strips unnescessary lua bytecode from given string. Strips unnecessary lua bytecode from given string.
Information like line numbers and debugging numbers will be discarded. Information like line numbers and debugging numbers will be discarded.
Original version by Peter Cawley (http://lua-users.org/lists/lua-l/2008-02/msg01158.html) Original version by Peter Cawley (http://lua-users.org/lists/lua-l/2008-02/msg01158.html)

View file

@ -258,7 +258,7 @@ static int _validate_utf8(unsigned char **s, int l, struct template_buffer *buf)
break; break;
} }
/* advance beyound the last found valid continuation char */ /* advance beyond the last found valid continuation char */
o = v; o = v;
ptr += v; ptr += v;
} }

View file

@ -130,7 +130,7 @@ end
-- --
-- Langauge & Style -- Language & Style
-- --
o = s:taboption("language", ListValue, "_lang", translate("Language")) o = s:taboption("language", ListValue, "_lang", translate("Language"))