Commit graph

108 commits

Author SHA1 Message Date
Christian Thaeter
9752de3102 Some prelimary TODO's for filedescriptor.c to be fixed later 2008-10-15 22:05:22 +02:00
Christian Thaeter
9943dd76fd use a recursive mutex to lock interface operations
locking interfaceregistry operations and later on open/close etc
2008-10-15 17:21:22 +02:00
Christian Thaeter
f7fa5769ca Start of a 'wordlist' type for the config subsystem
wordlists are simple not quoted words delimited by semicolon, tab, space or
commas. Some special functions will allow to access each of this words by
index etc.
2008-10-15 17:19:53 +02:00
Christian Thaeter
0cf7dec793 Interfaceregistry for 'active' interfaces
All interfaces which are available get registered in a tree.
This will be used internal for lookup interfaces. The higher level calls
will be an	amalgamation of this lookup and the upcoming plugindb and
loader.
2008-10-15 17:18:03 +02:00
Christian Thaeter
29f5a0f2ab moved the remaining interface stuff from lib to backend 2008-10-15 16:05:17 +02:00
Christian Thaeter
f05f6772f1 Interface system refactoring
* lumiera_interface are now static structures, never wrritten
 * introduced a lumiera_interfacenode which manages the dynamic data
   of interfaces. The interfaceregistry now holds this nodes.
2008-10-15 16:05:17 +02:00
Christian Thaeter
405a578c42 WIP: interface open/close handling cross dependencies 2008-10-15 16:05:17 +02:00
Christian Thaeter
a6ddb55e9b use a recursive mutex to lock interface operations
locking interfaceregistry operations and later on open/close etc
2008-10-15 16:05:15 +02:00
Christian Thaeter
4bfe430f38 Interfaceregistry for 'active' interfaces
All interfaces which are available get registered in a tree.
This will be used internal for lookup interfaces. The higher level calls
will be an	amalgamation of this lookup and the upcoming plugindb and
loader.
2008-10-15 16:04:28 +02:00
Christian Thaeter
fdbab22ce4 some cosmetics for the config subsystem 2008-10-15 16:01:08 +02:00
Christian Thaeter
2ae274ea51 add wordlist_add function to add a word to a wordlist 2008-10-15 16:01:08 +02:00
Christian Thaeter
211b470e85 docing existing wordlist funcs 2008-10-15 16:01:07 +02:00
Christian Thaeter
b0e60e23e0 change config rwlock to mutex
This was overseen with the splay tree transistion. lookups mutate the
structure, thus it needs to be locked completely.
2008-10-15 16:01:07 +02:00
Christian Thaeter
2041efe5b6 more on config_wordlist
* universal replace function
 * tests
 * missing declarations
2008-10-15 16:01:07 +02:00
Christian Thaeter
f754e1521f Start of a 'wordlist' type for the config subsystem
wordlists are simple not quoted words delimited by semicolon, tab, space or
commas. Some special functions will allow to access each of this words by
index etc.
2008-10-15 16:01:06 +02:00
Christian Thaeter
0346e113e5 use a recursive mutex to lock interface operations
locking interfaceregistry operations and later on open/close etc
2008-10-15 15:51:29 +02:00
Christian Thaeter
14a9e95492 moved plugin code from lib to backend
Plugin management will become stateful. This qualifies it to become a
backend subsystem.
2008-10-15 15:49:34 +02:00
Christian Thaeter
7c992c000d config setters for number and word, thats it for now 2008-09-10 15:19:50 +02:00
Christian Thaeter
4b2973de27 some cosmetics, removed the CONFIG_DEFAULT error which is not used anymore 2008-09-10 15:19:50 +02:00
Christian Thaeter
e8cc26efa4 First highlevel setter, small api change
* setters return LumieraConfigitem (or NULL) instead int
 * the config_string_set works now
2008-09-10 15:19:50 +02:00
Christian Thaeter
928847a193 little more verbose logging, dump some values at TRACE points 2008-09-10 15:19:50 +02:00
Christian Thaeter
056bb87f30 config api change, return pointers as truth value
NULL indicates some failure,
anything else success (with some usable value)
2008-09-10 15:19:50 +02:00
Christian Thaeter
d26a92b67f add configitem_set_value to modify the delim/value of a existing item 2008-09-10 15:19:50 +02:00
Michael Ploujnikov
f5387d8bf3 Merge branch 'master' of git://git.lumiera.org/LUMIERA
Conflicts:

	tests/Makefile.am
2008-09-06 20:15:05 -04:00
Christian Thaeter
c4e6cd3c51 Merge branch 'configloader_devel' of git://git.lumiera.org/lumiera/simeon into backend_devel
* 'configloader_devel' of git://git.lumiera.org/lumiera/simeon: (24 commits)
  Added directive-parser and tests for a content-check of a parsed configitem
  Fixed configitem_move, first parsing tests pass now
  FIX: Remove llist_move again and put a note to list_relocate, add test
  WIP: add config_lookup skeleton
  filedescriptor fixup for new copy func in cuckoo
  add a custom copy function to the cuckoo hash
  fixes after the cuckoo update in filedescriptor.c
  Cuckoo hash update
  Added two very simple tests for configitem
  Typo fix
  Fix for section-parser
  added section part to parser
  parser improvements, compiles now
  added CONFIG_SYNTAX errors
  typo fix and redundant comment removal
  add configitem and configentry to the build system
  give the charsets for config keys some constants
  fix to make parser mockup compileable, little simplified
  WIP: started low-level parser
  more functional mockup of the configitem bootstrap
  ...

Conflicts:

	src/backend/config.c
	src/backend/config.h
	src/backend/config_lookup.c
	src/backend/config_lookup.h
	src/backend/configitem.c
	src/backend/configitem.h
	src/backend/filedescriptor.c
	src/lib/cuckoo.c
	src/lib/cuckoo.h
	tests/22config_highlevel.tests
	tests/backend/test-config.c
2008-09-06 13:18:29 +02:00
Christian Thaeter
477ecd3974 Remove the 'path' member from the config and bootstrap the config system
* the path parameter given to config_init becomes a registered default
   value for 'config.path' itself thus the config system finds its data
   path on itself.
 * the printf formatting string for representing values are also
   bootstrapped as default entries in the config system. This is just a
   prelimary example and will be refined later
2008-09-06 12:41:23 +02:00
Christian Thaeter
b94e615291 just psplay_remove leaked, do psplay_delete_node 2008-09-06 12:41:23 +02:00
Christian Thaeter
a95ae05ddb some cosmetics 2008-09-06 12:41:22 +02:00
Christian Thaeter
fa54fb9bc2 add a diagnostic config dump function 2008-09-06 12:41:22 +02:00
Christian Thaeter
21db988e18 remove the default return in case an illegal config entry was found
Fallback to a default in case of a already pending error is not needed.
This would only obtruse error handling. If the default entry would be
erroneous it would be silently ignored and make the thing worse.
2008-09-06 12:41:22 +02:00
Christian Thaeter
b6e3650f62 use psplay trees instead cuckoo hashes in config_lookup 2008-09-06 12:41:22 +02:00
Christian Thaeter
a1bd3ee1f5 use psplay trees for the filedescriptor registry 2008-09-06 12:41:03 +02:00
Christian Thaeter
c3e2941eb8 some machinery for registering and retrieving defaults
* let config_setdefault() take a complete configline instead key:value pair
2008-09-06 12:40:32 +02:00
Christian Thaeter
a0105eec42 Documentation and error handling for config_lookup 2008-09-06 12:40:32 +02:00
Christian Thaeter
1dca87271f ConfigLookup working (for now)
added the missing unimplemented function, fixed some prototypes,
some cosmetics. Barely tested, no documentation yet.
2008-09-06 12:40:20 +02:00
Christian Thaeter
a55c122cc3 Fixed configitem_move, first parsing tests pass now 2008-09-06 12:40:19 +02:00
Christian Thaeter
d9f2b6d6fa WIP: add config_lookup skeleton 2008-09-06 12:40:19 +02:00
Simeon Voelkel
a52b08bfc5 added section part to parser 2008-09-06 12:40:10 +02:00
Simeon Voelkel
36375ce0f6 parser improvements, compiles now 2008-09-06 12:38:57 +02:00
Simeon Voelkel
1a66b58fcb added CONFIG_SYNTAX errors 2008-09-06 12:38:57 +02:00
Christian Thaeter
a51f61683f add configitem and configentry to the build system 2008-09-06 12:38:48 +02:00
Christian Thaeter
1f8906a2d8 More mockup of the configitem bootstrap
* started low-level parser
 * give the charsets for config keys some constants
2008-09-06 12:38:03 +02:00
Michael Ploujnikov
8bdab41ea0 factor out -I$(top_srcdir)/src/ to a top-level AM_CPPFLAGS
also remove a related unnecesary comment in src/gui/Makefile.am
2008-08-30 12:05:21 -04:00
Simeon Voelkel
700a7e9645 Added directive-parser and tests for a content-check of a parsed configitem 2008-08-27 11:00:10 +02:00
Christian Thaeter
1dc836fc3d Fixed configitem_move, first parsing tests pass now 2008-08-13 10:50:27 +02:00
Christian Thaeter
238218f776 WIP: add config_lookup skeleton 2008-08-13 09:21:33 +02:00
Christian Thaeter
0fe3d6a059 filedescriptor fixup for new copy func in cuckoo 2008-08-13 09:21:33 +02:00
Christian Thaeter
e78908bc7d fixes after the cuckoo update in filedescriptor.c 2008-08-13 09:21:32 +02:00
Simeon Voelkel
b5dafbcd53 Fix for section-parser 2008-08-13 08:33:49 +02:00
Simeon Voelkel
19c2af0c69 added section part to parser 2008-08-12 12:39:48 +02:00