Mailinglist Archive: zypp-devel (68 mails)
| < Previous | Next > |
[zypp-devel] Ini parser commited
- From: Duncan Mac-Vicar <dmacvicar@xxxxxxx>
- Date: Mon, 7 May 2007 17:41:30 +0200
- Message-id: <200705071741.31110.dmacvicar@xxxxxxx>
I just commited a light Ini file parser. You may wonder why?
libiniparser parser is the one I had in parser/inifile and I was using. I was
happy with it until I wanted to get the section names in a sane way. Then I
wanted to use the InputStream classes and everything became more
unconfortable.
Then I realized 99% of the code of libiniparser is the basic hash, iteration,
etc stuff (what you get coding in C), and only 15 lines of code was the
parser itself.
The parser I commited is splitted in 2 layers, one is the parser itself, which
you can use for any purpose as it is incremental and uses callbacks everytime
it hits entries. And IniDict, which gives you the functionallity of
libiniparser, accesing the ini file as a dictionary, and providing iterators
to sections and entries.
I still have a few items todo in it, like supporting comments and dump back
the dict into a file.
--
Duncan Mac-Vicar Prett
Novell :: SUSE R&D, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |