yast2-core
|
#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 <cstdarg>
#include <stdexcept>
#include "IniParser.h"
#include "IniFile.h"
#include "quotes.h"
Macros | |
#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) |
std::string | format (const char *format,...) |
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().
std::string format | ( | const char * | format, |
... | |||
) |
sprintf to a std::string, throwing runtime_error on OOM
Referenced by IniParser::getFileName(), s_timestring(), and IniParser::write_helper().
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 | ) |
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.