gmain.h File Reference

#include <stdlib.h>
#include "gstdtypes.h"

Go to the source code of this file.

Defines

#define LIB_VERSION_GLIB_MAJOR   0
#define LIB_VERSION_GLIB_MINOR   8
#define GMIN_STAT_OBJ   5
#define false   0
#define true   1
#define MAX_UINT_UL   4294967295UL
#define gENDLITTLE2(x)   ((x<<8) | (x>>8))
#define gENDLITTLE4(x)   ( (x<<24) | ((x&0xFF0000)>>8) | ((x&0xFF00)<<8) | ((x&0xFF000000)>>24) )
#define TO_UD2(x)   ((t_uint16)gENDLITTLE2(x))
#define TO_UD4(x)   ((t_uint32)gENDLITTLE4(x))
#define FROM_UD2(x)   TO_UD2(x)
#define FROM_UD4(x)   TO_UD4(x)
#define MAX_INT16_I   32767
#define MIN_INT16_I   -32768
#define MAX_UINT16_U   65535U
#define MAX_DLINT32   2147483647L
#define MIN_DLINT32   -2147483647L
#define MAX_DUINT32   2147483646UL
#define MAX_LONG_L   2147483648LL
#define MIN_LONG_L   -2147483648LL
#define MAX_U4B_ULL   4294967295ULL
#define MAX_STAMP_UL   MAX_DUINT32
#define gEND_CLEANUP_WSA
#define gEND_STATEMENT   gFileControl::Self().End( false )
#define gFILE_S_IFIFO   __S_IFIFO
#define gEND   gEND_STATEMENT;gEND_CLEANUP_WSA
#define gINIT
#define gMAX(a, b)   ((a>b)?a:b)
#define gMIN(a, b)   ((a<b)?a:b)
#define gRANGEX(v, a, b, x)   ((v<a)?x:(v>b?x:v))
#define gRANGE0(v, a, b)   gRANGEX(v,a,b,0)
#define ISyORn(x)   (x ? 'Y' : 'N')
#define gSLASHSTR   "/"
#define gSLASHCHR   '/'
#define DBGPRINT(args...)   ;
#define DBGPRINT_MIN(args...)   ;
#define DBGPRINT_MEA(args...)   ;
#define DBGPRINT_LOG(args...)   ;
#define ASSERTION_FALSE(y)
#define ASSERTION(x, y)
#define ASSERTION_USE(x, y)   ASSERTION(x,y)

Typedefs

typedef unsigned char t_uchar
typedef t_uchar t_uint8
typedef char t_int8
typedef unsigned short t_uint16
typedef short t_int16
typedef unsigned long long t_uint64
typedef t_uint16 t_gPort
typedef t_uint64 t_inode
typedef unsigned t_uint32
typedef int t_int32
typedef t_uint32 t_uint4B
typedef t_uint16 t_uint2B
typedef t_uint32 t_gTicElapsed
typedef t_uint32 t_stamp


Define Documentation

#define ASSERTION x,
 ) 
 

Value:

{ \
            if ( (x)==0 ) { \
               /* gStorageControl::Self().assertedNr = -2*/; \
               fprintf(stderr,"ASSERTION[v%d.%d]:%s:%u:%s\n", \
                        LIB_VERSION_GLIB_MAJOR, LIB_VERSION_GLIB_MINOR, \
                        __FILE__,__LINE__,y); \
               exit(1); \
            } \
            }

Definition at line 192 of file gmain.h.

Referenced by sCoordText::Add(), gStringGeneric::Add(), sServiceArray::Add(), gHash::Add(), gdSnarfCont::Add(), gParamElem::Add(), sCoordText::AddCoordToList(), gDir::AddDir(), gDir::AddFile(), gXHttpGeneric::AddHeadStr(), gArg::AddParams(), gHtmlCouple::AddTag(), gFileControl::AddTempFile(), gHtmlCouple::AddText(), gParamVal::AddToList(), gHashTriple::AddTriple(), sServiceArray::Allocate(), sServiceRegister::AllocateNodes(), sUnCodeBin::AllocateSymbols(), gHList::AppendCouple(), gHTree::AppendCouplePtr(), gHTree::AppendTreePtr(), gFileStream::Buffer(), gHSeq::Build(), gHAttrs::BuildFromLRLists(), sParamRaw::BuildParamVal(), gStrControl::Compare(), gHSelConf::Config(), gHOutOpt::Config(), gHSelConf::ConfigFromFile(), gHOutOpt::ConfigFromFile(), gXHttpGeneric::Connection(), gXHttpGeneric::ConnectionPtr(), gHtmlString::ConvertAmpToAscii(), gUniString::ConvertChrFromTo(), gHtmlString::ConvertHToAscii(), sServiceNode::Copy(), sTidyArray::Copy(), gKey::Copy(), sAttrsTagNorm::CopyDefaultAttrNorms(), gList::CopyList(), gdHCouple::CopyNormalizeAttr(), gdTxtCouple::Couple(), gTimerTic::CpuTics(), gHParsed::CurrentCouple(), gString::Delete(), sServiceArray::Delete(), gListGeneric::Delete(), gDirStream::doCloseDir(), gDirStream::doOpenDir(), gdOptUnweb::DumpStream(), gListGeneric::ElementsKind(), gFileFetch::Fetch(), gHAttrList::Find(), sAttrRefer::FindAttr(), gHttpRequestList::FindHeadFullFirst(), gParamVal::FindObj(), gArg::FindOption(), gUnweb::FindStringKey(), gBigBuffer::Flush(), gArg::gArg(), gdSnarfCont::gdSnarfCont(), gdURI::gdURI(), gElem::gElem(), gHAttrs::GetAttr(), gHtmlParser::GetAttrDef(), gHAttrList::GetAttrParam(), gHAttrs::GetAttrPtr(), gHtmlParser::GetAttrRef(), gHAttrs::GetAttrValue(), gHttpGeneric::GetBaseBuffer(), gXHttpGeneric::GetBaseBuffer(), gXHttpGeneric::GetBuffer(), sCoordText::GetCoord(), gHNode::GetCouple(), gHList::GetCouple(), gHParsed::GetCouple(), gHtmlContent::GetCouple(), gStack::GetCurrent(), gBigBuffer::GetFile(), gHashGeneric::GetHash(), gIpAddr::GetHostByName(), gHtmlContent::GetHtmlOpt(), gHTree::GetLastNode(), sUnCodeBin::GetLetterCompat(), gDirGeneric::GetName(), gParam::GetNewObjectFromFormat(), gBigBuffer::GetNode(), gListGeneric::GetObjectPtr(), gArg::GetOptionPtr(), sParamRaw::GetParamVal(), gKey::GetReal(), gdURI::GetRelativePathStr(), gTimer::GetSecondsFromTics(), gDir::GetStat(), gFileSysName::GetStat(), gKey::GetString(), gdHCouple::GetTagElement(), gHashTriple::GetTriple(), gHAType::GetType(), gKey::GetUInt64(), gHAttrValue::GetValue(), gFileFetch::gFileFetch(), gFileSysName::gFileSysName(), gFileTemp::gFileTemp(), gHtmlParser::gHtmlParser(), gListGeneric::gListGeneric(), gParam::gParam(), gStorageControl::gStorageControl(), gString::gString(), gTop::gTop(), gUniString::gUniString(), gVector::gVector(), gTcpConnect::Handle(), gSocket::Handle(), gStrControl::Init(), gHtmlCtrl::Init(), sUnCodeBin::IsFlatOk(), sCoordText::IsOk(), gHtmlCouple::IsOk(), gHAttrs::IsOk(), gFileControl::IsOkPathname(), gArray::JoinArrayDown(), gArray::JoinArrayRight(), gControl::Log(), gKey::MatchStorage(), gHAttrList::N(), gDirName::Name(), gFileControl::NanoSleep(), gBigBuffer::NewFile(), gHAttrs::NewType(), gSocket::Open(), gString::operator=(), gVector::operator=(), gVector::operator[](), sOptSnarf::OutStream(), gStack::Push(), gFile::Read(), gFile::ReadBuffer(), sUnCodeBin::ReadFromStream(), sTcbBin::ReadFromStream(), gXHttpCont::ReadReplyBin(), gXHttpCont::ReadReplyChunked(), sServiceRegister::ReleaseData(), gFileControl::RemoveTemp(), gVector::Resize(), gElem::RestoreGuts(), gFileTemp::Rewind(), sAttrRefer::sAttrRefer(), sUnCodeSymbol::SaveBin(), gElem::SaveGuts(), gUniString::Set(), gStringGeneric::Set(), gHAttrList::Set(), gKey::Set(), gIpAddr::SetAddr(), gIpAddr::SetAddrFromStr(), gIpV4Mask::SetBitsCIDR(), sUnCodeSymbol::SetCode(), gSocket::SetConnection(), gHNode::SetCouplePtr(), gDirName::SetDirName(), gControl::SetError(), gStorage::SetStoreMethod(), gTagCoord::SetZ(), gStorage::Show(), gList::Show(), gHash::Show(), gStorageControl::StorageKindName(), gStorage::StorageName(), gElem::Str(), gHAttrList::Str(), gFileSysName::Str(), gHParsed::StrMust(), gHtmlContent::thisAddCouple(), gHash::thisAddElem(), gHtmlContent::thisAddHmtlLine(), gHtmlContent::thisAddHtmlTag(), gArrayCollect::thisAddIntoList(), gArg::thisAddOneParam(), gDir::thisAddStatName(), gDir::thisAddSystemName(), gHttpRequestList::thisAdjustColonStr(), gDirGeneric::thisAllNamesOk(), gBigBuffer::thisAllocateBuf(), gFileStream::thisAllocateBuffer(), gListGeneric::thisAppend(), gHTree::thisAppendNode(), gHSeq::thisAppendTree(), gHSeq::thisBuild(), gArg::thisBuildInternParam(), gHSeq::thisCheck(), gHOutOpt::thisConfig(), gUnweb::thisConsolidateDataCoord(), gDateTime::thisConvertTo_libc_tm(), gStringGeneric::thisCopy(), gUnweb::thisCutCommentsInTxt(), gListGeneric::thisDelete(), gHashGeneric::thisDelete(), gURI::thisFetchScheme(), gString::thisFind(), gString::thisFindBack(), gString::thisFindExcept(), gString::thisFindFwd(), gArg::thisFindParamFromChr(), gArg::thisFindParamFromStr(), gHSeq::thisFindRememberedBlock(), gHtmlParser::thisFindTag(), gArg::thisFlushAll(), gIpAddr::thisGetHostByAddr(), gXHttpCont::thisGetHtmlContrl(), gURI::thisGetSchemeFromString(), gListGeneric::thisIndex(), gdHCouple::thisInitTag(), gdTxtCouple::thisInitTxtCouple(), gDirGeneric::thisNameOk(), gArray::thisNewDim(), gFileTemp::thisOverwrite(), gHtmlParser::thisParse(), gConfig::thisParseLine(), gURI::thisParseString(), gUnweb::thisPostProcess(), gStringGeneric::thisPreAllocate(), gListGeneric::thisPreAllocate(), gHashGeneric::thisPreAllocate(), gUnweb::thisPreProcess(), gConfig::thisProcess(), gArg::thisProcessParamElem(), gHParsed::thisPush(), gConfig::thisRead(), gFileFetch::thisReadFile(), gDir::thisScanDir(), gIpAddr::thisSetIPfromHostEnt(), gParam::thisSplit(), gFileStat::thisStatName(), gUnweb::thisStripReplace(), gUnweb::thisStrSetParse(), gUniString::thisUniDelete(), gElem::ToString(), gHAttrs::TypeEnumToSmartL(), gHAttrs::TypeName2HAttrType(), gFileStream::UBuffer(), sOptSnarf::UnwebOpt(), gHtmlContent::UpCaseAttributes(), gFileStat::Update(), gHAttrList::ValidateValue(), gUnweb::VerboseStream(), gNetConnect::Write(), gXHttpGeneric::WriteHead(), and gTop::~gTop().

#define ASSERTION_FALSE  ) 
 

Value:

{ \
               /* gStorageControl::Self().assertedNr = -1*/; \
               fprintf(stderr,"ASSERTION[v%d.%d]:%s:%u:%s\n", \
                        LIB_VERSION_GLIB_MAJOR, LIB_VERSION_GLIB_MINOR, \
                        __FILE__,__LINE__,y); \
               exit(1); \
            }

Definition at line 184 of file gmain.h.

Referenced by gStrControl::ConvertToUInt32(), gKey::Copy(), gHttpGeneric::GetBuffer(), sUnCodeBin::GetDescStgChr(), gIpAddr::GetHostByName(), gIpV4Mask::gIpV4Mask(), gKey::HashPos(), gStrControl::InitTab(), gKey::MatchKey(), gListGeneric::NewObject(), gElem::NewObject(), gHashGeneric::NewObject(), gKey::NewObject(), gControl::NewObject(), gParamElem::NewObject(), gHAttrs::NewType(), gSocket::Open(), gFile::OpenDevice(), gXHttpCont::ReadReplyText(), gFileTemp::Rewind(), gTcpConnect::thisConnect(), gArg::thisFlushAll(), gIpAddr::thisGetHostByAddr(), gIpAddr::thisGetHostByteOrder(), gKey::thisNewKind(), gFileTemp::thisOverwrite(), gIpAddr::thisSetIPfromHostByteOrder(), gKey::ToString(), and gFileTemp::~gFileTemp().

#define ASSERTION_USE x,
 )     ASSERTION(x,y)
 

Definition at line 203 of file gmain.h.

Referenced by gListGeneric::thisIndex().

#define DBGPRINT args...   )     ;
 

Definition at line 159 of file gmain.h.

Referenced by sFileStreamCtrl::DoRemove(), gFileControl::End(), gParamVal::FillParam(), gHttpRequestList::FindHeadFullFirst(), gArg::FlushParams(), gHSeq::GetURL(), gFileTemp::gFileTemp(), sUnCodeBin::HasHtml(), gXHttpGeneric::MiliSecSleep(), gFileControl::NanoSleep(), gNetConnect::Read(), sUnCodeBin::ReadFromStream(), gXHttpCont::ReadReplyChunked(), gFileTemp::Rewind(), sUnCodeBin::SaveToStream(), gFileControl::SecSleep(), gXHttpGeneric::SecSleep(), gHtmlParser::SetOptions(), gURI::SetString(), gHTree::Show(), gHtmlParser::ShowTree(), gHtmlContent::thisAddHtmlTag(), gFileStream::thisAllocateBuffer(), gHSeq::thisCheck(), gHOutOpt::thisConfig(), gArg::thisFlushAll(), gHOutOpt::thisHasTidy(), gHOutOpt::thisHasTidyAttr(), gHtmlParser::thisParse(), gXHttpGeneric::thisParseServerReply(), gURI::thisParseString(), gUnweb::thisPostProcess(), gdHttpURI::thisProcessHttpURI(), gHParsed::TrashLast(), gHtmlContent::UpCaseAttributes(), gXHttpGeneric::WriteHead(), gElem::~gElem(), and sFileStreamCtrl::~sFileStreamCtrl().

#define DBGPRINT_LOG args...   )     ;
 

Definition at line 177 of file gmain.h.

Referenced by gControl::Log().

#define DBGPRINT_MEA args...   )     ;
 

Definition at line 171 of file gmain.h.

#define DBGPRINT_MIN args...   )     ;
 

Definition at line 165 of file gmain.h.

Referenced by gXHttpGeneric::AddHead(), gHtmlString::ConvertToHString(), gHAttrList::CopyAttr(), gDirStream::doOpenDir(), gHATypeColor::gHATypeColor(), gHATypeText::gHATypeText(), gHtmlCouple::gHtmlCouple(), gStrControl::gStrControl(), gTop::gTop(), gFileControl::IsSignaled(), gFileControl::MiliSecSleep(), gXHttpCont::ReadReplyChunked(), gHAttrList::Set(), gHInOpt::SetFromString(), gFileControl::SetSignaled(), gFileControl::SetSignaledByStr(), gHAttrs::Show(), gDateTime::thisConvertTo_libc_tm(), gDateTime::thisConvertToStamp(), gXHttpCont::thisGetHtmlContrl(), gTimerTic::thisGetTime(), gHOutOpt::thisHasTidy(), gStrControl::thisInit(), gHtmlParser::thisParse(), gDir::thisScanDir(), gFileStat::thisStatName(), gHAttrs::TypeName2HAttrType(), and gTop::~gTop().

#define false   0
 

Definition at line 13 of file gmain.h.

Referenced by gHList::AppendCouple(), gHAttrs::BuildFromLRLists(), gdHttpSnarf::FileInOut(), gDir::gDir(), gdURI::GetDomainAndPathStr(), gFileStat::gFileStat(), gHAttrs::IsOk(), gdHCouple::IsOk(), gKey::MatchKey(), gXHttpCont::ReadReplyBin(), gXHttpCont::ReadReplyText(), sUnCodeBin::SaveToStream(), gHInOpt::SetFromString(), gHSeq::thisBuild(), gHtmlParser::thisParse(), gConfig::thisRead(), gXHttpCont::thisReadChunkSize(), and gFileTemp::~gFileTemp().

#define FROM_UD2  )     TO_UD2(x)
 

Definition at line 57 of file gmain.h.

Referenced by sUnCodeSymbol::ReadBin(), and sUnCodeBin::ReadFromStream().

#define FROM_UD4  )     TO_UD4(x)
 

Definition at line 58 of file gmain.h.

Referenced by sUnCodeSymbol::ReadBin(), sUnCodeBin::ReadFromStream(), and sTcbBin::ReadFromStream().

#define gEND   gEND_STATEMENT;gEND_CLEANUP_WSA
 

Definition at line 98 of file gmain.h.

#define gEND_CLEANUP_WSA
 

Definition at line 77 of file gmain.h.

#define gEND_STATEMENT   gFileControl::Self().End( false )
 

Definition at line 83 of file gmain.h.

#define gENDLITTLE2  )     ((x<<8) | (x>>8))
 

Definition at line 50 of file gmain.h.

#define gENDLITTLE4  )     ( (x<<24) | ((x&0xFF0000)>>8) | ((x&0xFF00)<<8) | ((x&0xFF000000)>>24) )
 

Definition at line 51 of file gmain.h.

#define gFILE_S_IFIFO   __S_IFIFO
 

Definition at line 92 of file gmain.h.

#define gINIT
 

Value:

ASSERTION(gStorageControl::Self().StorageKindName(0)!=nil,"gINIT:error(2)"); \
                gFileControl::Self().Init();

Definition at line 103 of file gmain.h.

#define gMAX a,
 )     ((a>b)?a:b)
 

Definition at line 113 of file gmain.h.

#define gMIN a,
 )     ((a<b)?a:b)
 

Definition at line 114 of file gmain.h.

Referenced by gString::Delete(), gListGeneric::Delete(), and gUniString::thisUniDelete().

#define GMIN_STAT_OBJ   5
 

Definition at line 10 of file gmain.h.

#define gRANGE0 v,
a,
 )     gRANGEX(v,a,b,0)
 

Definition at line 117 of file gmain.h.

Referenced by gDateTime::RestoreGuts().

#define gRANGEX v,
a,
b,
 )     ((v<a)?x:(v>b?x:v))
 

Definition at line 116 of file gmain.h.

#define gSLASHCHR   '/'
 

Definition at line 129 of file gmain.h.

Referenced by gStrControl::GetFilenameCode(), gFileTemp::gFileTemp(), gStrControl::gStrControl(), gStrControl::Init(), gFileControl::IsOkPathname(), gFileControl::IsOkStrict(), gDirName::thisBuildDirStr(), gFileControl::thisGetUniqueName(), gArg::thisProgramName(), and gDir::thisScanDir().

#define gSLASHSTR   "/"
 

Definition at line 128 of file gmain.h.

Referenced by gFileControl::CtrlGetTempPath().

#define ISyORn  )     (x ? 'Y' : 'N')
 

Definition at line 120 of file gmain.h.

Referenced by gXHttpCont::ReadReplyUnsized(), gdTxtCouple::Show(), gHSeq::thisCheck(), gArg::thisFlushAll(), gXHttpCont::thisGetHtmlContrl(), gHOutOpt::thisHasTidy(), gHtmlParser::thisParse(), and gHtmlContent::UpCaseAttributes().

#define LIB_VERSION_GLIB_MAJOR   0
 

Definition at line 4 of file gmain.h.

#define LIB_VERSION_GLIB_MINOR   8
 

Definition at line 5 of file gmain.h.

#define MAX_DLINT32   2147483647L
 

Definition at line 64 of file gmain.h.

Referenced by gInt::GetMaxInt().

#define MAX_DUINT32   2147483646UL
 

Definition at line 66 of file gmain.h.

Referenced by gHATypeSimpleU32::GetInt32(), and gUInt::GetMaxUInt().

#define MAX_INT16_I   32767
 

Definition at line 60 of file gmain.h.

Referenced by gInt::GetMaxInt(), and gVersion::thisSetMajorOrMinor().

#define MAX_LONG_L   2147483648LL
 

Definition at line 68 of file gmain.h.

Referenced by gStrControl::ConvertToInt32(), gParamVal::GetLong(), gKey::HashPos(), and gParamVal::SetString().

#define MAX_STAMP_UL   MAX_DUINT32
 

Definition at line 72 of file gmain.h.

#define MAX_U4B_ULL   4294967295ULL
 

Definition at line 70 of file gmain.h.

Referenced by gStrControl::ReturnAndAssignUInt32().

#define MAX_UINT16_U   65535U
 

Definition at line 62 of file gmain.h.

Referenced by gUInt::GetMaxUInt(), gdHttpURI::ParseProxyStr(), and gHtmlString::thisFindSymbolISO().

#define MAX_UINT_UL   4294967295UL
 

Definition at line 33 of file gmain.h.

#define MIN_DLINT32   -2147483647L
 

Definition at line 65 of file gmain.h.

Referenced by gInt::GetMinInt().

#define MIN_INT16_I   -32768
 

Definition at line 61 of file gmain.h.

#define MIN_LONG_L   -2147483648LL
 

Definition at line 69 of file gmain.h.

#define TO_UD2  )     ((t_uint16)gENDLITTLE2(x))
 

Definition at line 55 of file gmain.h.

Referenced by sUnCodeSymbol::SaveBin(), and sUnCodeBin::SaveToStream().

#define TO_UD4  )     ((t_uint32)gENDLITTLE4(x))
 

Definition at line 56 of file gmain.h.

Referenced by sUnCodeSymbol::SaveBin(), and sUnCodeBin::SaveToStream().

#define true   1
 

Definition at line 14 of file gmain.h.

Referenced by gHAttrList::Find(), gHSeq::thisBuild(), gHtmlParser::thisParse(), and gUnweb::thisPostProcess().


Typedef Documentation

typedef t_uint16 t_gPort
 

Definition at line 24 of file gmain.h.

typedef t_uint32 t_gTicElapsed
 

Definition at line 41 of file gmain.h.

typedef t_uint64 t_inode
 

Definition at line 26 of file gmain.h.

typedef short t_int16
 

Definition at line 20 of file gmain.h.

typedef int t_int32
 

Definition at line 32 of file gmain.h.

typedef char t_int8
 

Definition at line 18 of file gmain.h.

typedef t_uint32 t_stamp
 

Definition at line 42 of file gmain.h.

typedef unsigned char t_uchar
 

Definition at line 16 of file gmain.h.

typedef unsigned short t_uint16
 

Definition at line 19 of file gmain.h.

typedef t_uint16 t_uint2B
 

Definition at line 39 of file gmain.h.

typedef unsigned t_uint32
 

Definition at line 31 of file gmain.h.

typedef t_uint32 t_uint4B
 

Definition at line 38 of file gmain.h.

typedef unsigned long long t_uint64
 

Definition at line 22 of file gmain.h.

typedef t_uchar t_uint8
 

Definition at line 17 of file gmain.h.


Generated on Sat Aug 18 02:41:01 2007 for xpfweb_v2x lib by  doxygen 1.4.2