IniParser.cc File Reference

#include "config.h"
#include <y2util/PathInfo.h>
#include <ycp/y2log.h>
#include <vector>
#include <set>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <glob.h>
#include <cassert>
#include "IniParser.h"
#include "IniFile.h"

Defines

#define COMPARE_OPTION(X)   if (sv == #X) X = true; else
#define scanner_error(format, args...)   y2error ("%s:%d: " format, scanner_file.c_str (), scanner_line, ##args)

Functions

 IMPL_BASE_POINTER (Regex_t)
void printPath (const vector< string > &p, const char *c="")
void y2errPath (const vector< string > &p, const char *c="")
bool onlySpaces (const char *str)
bool isYCPStringPair (const YCPValue &v)
int getBeginEndType (const YCPMap &m)
int getParamsType (const YCPMap &m)
void StripLine (string &l, regmatch_t &r)

Define Documentation

#define COMPARE_OPTION (  )     if (sv == #X) X = true; else

Referenced by IniParser::initMachine().

#define scanner_error ( format,
args...   )     y2error ("%s:%d: " format, scanner_file.c_str (), scanner_line, ##args)

Referenced by IniParser::parse_helper().


Function Documentation

int getBeginEndType ( const YCPMap m  ) 

Return 0 if there is: $[ "begin" : [ "...", "...", ], "end" : [ "...", "...", ],] 1 if there is: $[ "begin" : [ "...", "...", ],] -1 if format is totaly broken

References YCPElement::isNull(), isYCPStringPair(), and YCPMap::value().

Referenced by IniParser::initMachine().

int getParamsType ( const YCPMap m  ) 

Returns 0 if there is: $[ "match" : [ "...", "...", ], "multiline" : [ "...", "...", ], ] 1 if there is: $[ "match" : [ "...", "...", ],] -1 otherwise

References YCPElement::isNull(), isYCPStringPair(), and YCPMap::value().

Referenced by IniParser::initMachine().

IMPL_BASE_POINTER ( Regex_t   ) 

YaST2: Core system

Description: YaST2 SCR: Ini file agent.

Authors: Petr Blahos <pblahos@suse.cz> Martin Vidner <mvidner@suse.cz>

Id
IniParser.cc 56967 2009-04-24 11:50:17Z mvidner
bool isYCPStringPair ( const YCPValue v  ) 

References YCPList::size(), and YCPList::value().

Referenced by getBeginEndType(), and getParamsType().

bool onlySpaces ( const char *  str  ) 

Referenced by IniParser::parse_helper().

void printPath ( const vector< string > &  p,
const char *  c = "" 
)

Debugging.

void StripLine ( string &  l,
regmatch_t &  r 
)
void y2errPath ( const vector< string > &  p,
const char *  c = "" 
)

References y2error.


Generated on a sunny day for yast2-core by doxygen 1.6.3