Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/scp_parser.cpp File Reference

#include "scp_parser.h"
#include "console.h"
#include "utils.h"
#include "inlines.h"

Namespaces

namespace  xss

Defines

#define MAXLINELENGHT   2048
#define PARSELINELIMIT   1600
#define MAXSYMBOLLENGHT   128

Functions

void parseDefineCommand (char *line)
 Parses a define command.

bool evaluateOneDefine (char *szLine, bool check)
 Evalutates the first $symbol in the line.

char * evaluateAllDefines (char *szLine, bool check=true)
 Evaluates ALL the defines.

char * getSzFromFile (char *buffer, int len, FILE *fileHandle)
 enhanced version of fgets which trims leading spaces, trailing new lines and parses $symbols


Variables

std::map< std::string, std::string > s_mapDefines

Define Documentation

#define MAXLINELENGHT   2048
 

#define MAXSYMBOLLENGHT   128
 

#define PARSELINELIMIT   1600
 


Function Documentation

char* evaluateAllDefines char *    szLine,
bool    check = true
[static]
 

Evaluates ALL the defines.

Returns:
the line evaluated
Author:
Xanathar
Parameters:
szLine  the line with *MUST* have some free bytes at its end
Todo:
fix the MUST, maybe?

bool evaluateOneDefine char *    szLine,
bool    check
 

Evalutates the first $symbol in the line.

Returns:
true if valid
Author:
Xanathar
Parameters:
szLine  the line with *MUST* have some spare bytes at its end
Todo:
fix the MUST, maybe?

char* getSzFromFile char *    buffer,
int    len,
FILE *    fileHandle
[static]
 

enhanced version of fgets which trims leading spaces, trailing new lines and parses $symbols

Returns:
line cleaned with defines evaluated
Author:
Xanathar
Parameters:
buffer  the buffer in which the sz should be stored
len  maximum lenght of the buffer
fileHandle  the file handle

void parseDefineCommand char *    line [static]
 

Parses a define command.

Author:
Xanathar
Parameters:
line  the line containing the define command


Variable Documentation

std::map<std::string, std::string> s_mapDefines [static]
 

SourceForge.net Logo