OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

shtmlparser.c
This file contains all the methods which are used in parsing Shtml file. The functions read the shtml file line by line and parse them for any SSI Tags. If any SSI Tags are present then the corresponding routines which handle the Tags are called based on the SSI Tag.
Return Type Method Summary
CHAR AddVarToVector(Vector *varVect, CHAR *word)
             It will split the incoming word in to parameter name and its value and store it in the var Vector.
CHAR* ReadFirstWord(CHAR *startPtr, CHAR *word)
             The "startPtr" will point to a character stream (line), this method retrive the first word and put it in the variable "word".
CHAR SplitParamNameAndValue(CHAR *word, CHAR **paramName, CHAR **paramValue)
             It will split the given string into two strings (param name & value), by using '=' as divider.
   
Method Details

AddVarToVector()

CHAR AddVarToVector(Vector *varVect, CHAR *word)

It will split the incoming word in to parameter name and its value and store it in the var Vector.

Arguments:
1. Vector to add var params (OUT).
2. Parsed var tag string (IN).
Return type:
Exit Status.
Bugs:
null

ReadFirstWord()

CHAR* ReadFirstWord(CHAR *startPtr, CHAR *word)

The "startPtr" will point to a character stream (line), this method retrive the first word and put it in the variable "word". After the word is retrieved it will return the next word's address in the stream. If there is no word is found then it will return NULL.

Arguments:
1. Pointer to character stream (IN).
2. Variable to store the retrived word (OUT).
Return type:
Address of the next word.
Bugs:
null

SplitParamNameAndValue()

CHAR SplitParamNameAndValue(CHAR *word, CHAR **paramName, CHAR **paramValue)

It will split the given string into two strings (param name & value), by using '=' as divider. If the character '=' is found then split the string and return SUCCESS otherwise, i.e if it is not possible to split then return FAILURE.

Arguments:
1. String to split (IN).
2. Variable to store splitted varName (OUT).
3. Variable to store splitted varValue (OUT).
Return type:
Exit Status.
Bugs:
null



OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

Copyright (c) 2009 ZOHO Corp. All Rights Reserved.