ini parser for FeOS
Go to file
2012-06-04 15:13:49 -05:00
include provide pregenerated parser/lexer. flex and bison are now optional (for if you want to generate the parse/lexer yourself) 2012-06-04 15:13:07 -05:00
source provide pregenerated parser/lexer. flex and bison are now optional (for if you want to generate the parse/lexer yourself) 2012-06-04 15:13:07 -05:00
.gitignore add ini.elf.dbg to .gitignore 2012-06-04 15:13:49 -05:00
lex.l optionally use debugging statements 2012-06-04 15:09:42 -05:00
Makefile provide pregenerated parser/lexer. flex and bison are now optional (for if you want to generate the parse/lexer yourself) 2012-06-04 15:13:07 -05:00
Makefile.FeOS add missing " 2011-11-28 13:37:57 -06:00
parse.y optionally use debugging statements 2012-06-04 15:09:42 -05:00
README.md provide pregenerated parser/lexer. flex and bison are now optional (for if you want to generate the parse/lexer yourself) 2012-06-04 15:13:07 -05:00

FeOSIni v0.2 Beta

Introduction

FeOSIni is a free, open-source ini parser for the FeOS operating system. It supports reading and writing ini files.

Build Prerequisites

You need the following in order to build FeOSIni:

Optional

  • bison
  • flex

How to Build FeOSIni

cd $(FEOSSDK)/userlib
git clone git://github.com/mtheall/FeOSIni.git
cd /path/to/FeOS
make libinstall

How to Use FeOSIni

In your C/C++ source:

#include <ini.h>

In your Makefile:

CONF_LIBDIRS = $(FEOSSDK)/userlib/FeOSIni
CONF_LIBS = -lini

API

Function Description
Ini IniAlloc(); Allocate an empty ini structure.
void IniFree(Ini ini); Deallocate an ini structure.
const char* IniGetValue(Ini ini, const char *section, const char *property); Return the value for a property in a section. If the section or property does not exist, return NULL.
int IniSetValue(Ini ini, const char *section, const char *property, const char *value); Set the value for a property in a section. If the section or property does not exist, they are created. Returns 0 for success, -1 for failure.
Ini IniRead(const char *filename); Read an ini file and return a structure filled in with the file's contents. Returns NULL for failure.
int IniWrite(Ini ini, const char *filename); Write an ini file with the contents of the ini structure. Returns 0 for succes, -1 for failure.