Hello nut-upsdev !<br><br>It's me again !<br>Since my last email about the new formalism for NUT configuration files, no objection was drawn.<br>I propose then to make official this new formalism. Here can be find the grammar of the formalism :
<a href="http://opensource.mgeups.com/projects/nut-config/grammar.od">http://opensource.mgeups.com/projects/nut-config/grammar.od</a><br><br>I made a parser for the new formalism and put sample files and a test program on my branch (JD-NewConf branch, in test directory). The test_parser take a file name as parameter, parse it and then print the tree corresponding to the file.
<br>Please feel free to play with it and to torture it. I think there is no bug (I tested it with valgrind), but if you see one, please tell me.<br>I put a Makefile in the test directory and modified <a href="http://Makefile.in">
Makefile.in</a>, so just run ./configure and then make as usual.<br>You'll have to change the include directive in nut.conf and passwd.conf to be adapted to where you put the file in your system. You must a full path, else test_parser will search the file in your default NUT configuration directory. When launching nut_parser, also give the full path to
nut.conf, else it will not be able to open it. <br><br>As announced in my first email, here is a draft about the API of libupsconfig this time (<a href="http://opensource.mgeups.com/projects/nut-config/API_draft2.odt">http://opensource.mgeups.com/projects/nut-config/API_draft2.odt
</a>) and here a reflection on upsconfig tool (<a href="http://opensource.mgeups.com/projects/nut-config/upsconfig_draft2.odt">http://opensource.mgeups.com/projects/nut-config/upsconfig_draft2.odt</a>).<br>Please let me know if you have any objection/suggestion/reflection about it.
<br><br>Thank for your attention ^_^<br><br>Jonathan Dion