Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4a2f4cca
Commit
4a2f4cca
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
iniGetKeys() section argument is optional (returns root section).
Updated descriptions for all .ini-related methods.
parent
630a01db
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/js_file.c
+14
-9
14 additions, 9 deletions
src/sbbs3/js_file.c
with
14 additions
and
9 deletions
src/sbbs3/js_file.c
+
14
−
9
View file @
4a2f4cca
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* *
* Copyright 200
3
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
4
Rob Swindell - http://www.synchro.net/copyright.html *
* *
* *
* This program is free software; you can redistribute it and/or *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* modify it under the terms of the GNU General Public License *
...
@@ -1567,36 +1567,41 @@ static jsSyncMethodSpec js_file_functions[] = {
...
@@ -1567,36 +1567,41 @@ static jsSyncMethodSpec js_file_functions[] = {
"optionally, only those section names that begin with the specified <i>prefix</i>"
)
"optionally, only those section names that begin with the specified <i>prefix</i>"
)
,
311
,
311
},
},
{
"iniGetKeys"
,
js_iniGetKeys
,
0
,
JSTYPE_ARRAY
,
JSDOCSTR
(
"section"
)
{
"iniGetKeys"
,
js_iniGetKeys
,
1
,
JSTYPE_ARRAY
,
JSDOCSTR
(
"
[
section
]
"
)
,
JSDOCSTR
(
"parse all key names from the specified <i>section</i> in a <tt>.ini</tt> file "
,
JSDOCSTR
(
"parse all key names from the specified <i>section</i> in a <tt>.ini</tt> file "
"and return the key names as an <i>array of strings</i>"
)
"and return the key names as an <i>array of strings</i>. "
"if <i>section</i> is undefined, returns key names from the <i>root</i> section"
)
,
311
,
311
},
},
{
"iniGetValue"
,
js_iniGetValue
,
3
,
JSTYPE_STRING
,
JSDOCSTR
(
"section, key [,default]"
)
{
"iniGetValue"
,
js_iniGetValue
,
3
,
JSTYPE_STRING
,
JSDOCSTR
(
"section, key [,default]"
)
,
JSDOCSTR
(
"parse a key from a <tt>.ini</tt> file and return its value (format = '<tt>key = value</tt>'). "
,
JSDOCSTR
(
"parse a key from a <tt>.ini</tt> file and return its value (format = '<tt>key = value</tt>'). "
"returns the specified <i>default</i> value if the key or value is missing or invalid. "
"returns the specified <i>default</i> value if the key or value is missing or invalid. "
"to parse a key from the <i>root</i> section, pass <i>null</i> for <i>section</i>. "
"will return a <i>bool</i>, <i>number</i>, <i>string</i>, or an <i>array of strings</i> "
"will return a <i>bool</i>, <i>number</i>, <i>string</i>, or an <i>array of strings</i> "
"determined by the type of <i>default</i> value specified"
)
"determined by the type of <i>default</i> value specified"
)
,
311
,
311
},
},
{
"iniSetValue"
,
js_iniSetValue
,
3
,
JSTYPE_BOOLEAN
,
JSDOCSTR
(
"section, key, value"
)
{
"iniSetValue"
,
js_iniSetValue
,
3
,
JSTYPE_BOOLEAN
,
JSDOCSTR
(
"section, key, value"
)
,
JSDOCSTR
(
"set the specified <i>key</i> to the specified <i>value</i> in the specified <i>section</i> "
,
JSDOCSTR
(
"set the specified <i>key</i> to the specified <i>value</i> in the specified <i>section</i> "
"of a <tt>.ini</tt> file"
)
"of a <tt>.ini</tt> file. "
"to set a key in the <i>root</i> section, pass <i>null</i> for <i>section</i>. "
)
,
311
,
311
},
},
{
"iniGetObject"
,
js_iniGetObject
,
1
,
JSTYPE_OBJECT
,
JSDOCSTR
(
"section"
)
{
"iniGetObject"
,
js_iniGetObject
,
1
,
JSTYPE_OBJECT
,
JSDOCSTR
(
"
[
section
]
"
)
,
JSDOCSTR
(
"parse an entire section from a .ini file "
,
JSDOCSTR
(
"parse an entire section from a .ini file "
"and return all of its keys and values as properties of an object"
)
"and return all of its keys and values as properties of an object. "
"if <i>section</i> is undefined, returns key and values from the <i>root</i> section"
)
,
311
,
311
},
},
{
"iniSetObject"
,
js_iniSetObject
,
2
,
JSTYPE_BOOLEAN
,
JSDOCSTR
(
"section, object"
)
{
"iniSetObject"
,
js_iniSetObject
,
2
,
JSTYPE_BOOLEAN
,
JSDOCSTR
(
"section, object"
)
,
JSDOCSTR
(
"write all the properties of the specified <i>object</i> as separate <tt>key=value</tt> pairs "
,
JSDOCSTR
(
"write all the properties of the specified <i>object</i> as separate <tt>key=value</tt> pairs "
"in the specified <i>section</i> of a <tt>.ini</tt> file"
)
"in the specified <i>section</i> of a <tt>.ini</tt> file. "
"to write an object in the <i>root</i> section, pass <i>null</i> for <i>section</i>. "
)
,
311
,
311
},
},
{
"iniGetAllObjects"
,
js_iniGetAllObjects
,
1
,
JSTYPE_ARRAY
,
JSDOCSTR
(
"[name_property] [,prefix]"
)
{
"iniGetAllObjects"
,
js_iniGetAllObjects
,
1
,
JSTYPE_ARRAY
,
JSDOCSTR
(
"[name_property] [,prefix]"
)
,
JSDOCSTR
(
"parse all sections from a .ini file and return all
sections and key
s "
,
JSDOCSTR
(
"parse all sections from a .ini file and return all
(non-<i>root</i>) section
s "
"an array of objects with each section's keys as properties of each
section
object
,
"
"
in
an array of objects with each section's keys as properties of each object
.
"
"<i>name_property</i> is the name of the property to create to contain the section's name "
"<i>name_property</i> is the name of the property to create to contain the section's name "
"(default is <tt>
\"
name
\"
</tt>), "
"(default is <tt>
\"
name
\"
</tt>), "
"the optional <i>prefix</i> has the same use as in the <tt>iniGetSections</tt> method, "
"the optional <i>prefix</i> has the same use as in the <tt>iniGetSections</tt> method, "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment