Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 6392] Improved API for query and store config information

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT metalab.unc.edu
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 6392] Improved API for query and store config information
  • Date: Mon, 22 Mar 2004 06:42:14 -0500

http://bugs.sourcemage.org/show_bug.cgi?id=6392





------- Additional Comments From marek AT printsoft.cz 2004-03-22 06:42 -------
I collected ideas from all comments and from the IRC, and sent first version
to
devel sorcery. So go ahead and use it :)

What changed from first post:

Functions handling lists
------------------------
List is a string containing space separated unique 'words'. Word is either in
the list, or isn't, no order is specified.
The functions are:
list_(add|remove|find)

Example:
TEST="--with-x --with-javascript"
list_add TEST "--without-jpeg"
echo $TEST (--with-x --with-javascript --without-jpeg)
if list_find $TEST "--with-x"; then
... include header
fi


Variable Persistency
--------------------
We do have functions which can 'mark' variables, so that later the variable is
stored to the file automatically.
functions: persistent_(add|remove|load|save)
Theese functions use one global variable $PERSISTENT_VARIABLES (I'm sorry
about
that), which is a list of persistent variable names.
persistent_load and persistent_save reads or writes the variables to
$SPELL_CONFIG file

Config Functions
----------------
Theese functions are for managing (reading writing querying, etc) persistent
variables.
config_(query|query_option|query_string|query_list)

theese functions works as I proposed. Only difference is, that all queried
variables are automatically set as persistant.

Thank you for your comments, make even more of them :)

Note to the query_(integer|float), I think that the overkill for theese two
functions is not too big, and they may come handy. Any other opinion ?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page