G:/ScriptBasic/source/extensions/hash/interface.c File Reference

#include <stdio.h>
#include "../../basext.h"

Go to the source code of this file.

Data Structures

struct  _hashe
struct  _hash
struct  _myOBJECT

Defines

#define PRIME   211
#define HASH_ERROR_INVALID_HASH_HANDLE   0x00080001
#define HASH_ERROR_NO_CURRENT_ELEMENT   0x00080002
#define HASH_ERROR_INVALID_VALUE   0x00080003
#define HASH_ERROR_INTERNAL001   0x00080004
#define HASH_ERROR_INTERNAL002   0x00080005
#define MASK   0xf0000000l
#define GET_HASH_HANDLE

Typedefs

typedef _hashe tHashE
typedef _hasheptHashE
typedef _hash tHash
typedef _hashptHash
typedef _myOBJECT myOBJECT
typedef _myOBJECTpmyOBJECT

Functions

static int varcmp (VARIABLE a, VARIABLE b)
static int hashpjw (char *s, long len)
static int varhashpjw (VARIABLE a)
besVERSION_NEGOTIATE return (int)
besEND besFUNCTION (newh)
 if (Argument)
 if (pE==NULL)
 if (pH->FirstElement==NULL)
besEND besFUNCTION (gethv)
 if (besRETURNVALUE==NULL)
 besDEREFERENCE (Argument)
besEND besFUNCTION (delhk)
 if ((*ppE)->Value) besRELEASE((*ppE)->Value) = (*ppE)->prev
 if (pE->small_son)
 besFREE (pE)
besEND besFUNCTION (starth)
besEND besFUNCTION (pervhk)
besEND besFUNCTION (thishk)
besEND besFUNCTION (thishv)
 besFREE (pH)
 besLEFTVALUE (Argument, Lval)
 if (Lval)

Variables

else vValue = NULL
 ppE = pH->Table+varhashpjw(vKey)
else vKey = NULL
ppE = pE = besALLOC(sizeof(tHashE))
else pH LastElement = pE
else pE prev = pH->LastElement
pH LastElement = pE
pH ThisElement = *ppE
if ppE return COMMAND_ERROR_SUCCESS
 besRETURNVALUE = besNEWMORTALREF
 Argument = besARGUMENT(2)
 vKey = Argument
 ppE = pH->Table+varhashpjw(vKey)
 besALLOC_RETURN_LONG
if ppE return COMMAND_ERROR_SUCCESS
pH ThisElement = NULL
 pE = *ppE
 ppE = pE->big_son
 Argument = besARGUMENT(1)


Define Documentation

#define GET_HASH_HANDLE
 

Value:

Argument = besARGUMENT(1);\
  besDEREFERENCE(Argument);\
  Argument = besCONVERT2LONG(Argument);\
  pH = besHandleGetPointer(p->HandleArray,LONGVALUE(Argument));

Referenced by besFUNCTION().

#define HASH_ERROR_INTERNAL001   0x00080004
 

Definition at line 45 of file interface.c.

Referenced by if().

#define HASH_ERROR_INTERNAL002   0x00080005
 

Definition at line 46 of file interface.c.

Referenced by besFUNCTION().

#define HASH_ERROR_INVALID_HASH_HANDLE   0x00080001
 

Definition at line 42 of file interface.c.

#define HASH_ERROR_INVALID_VALUE   0x00080003
 

Definition at line 44 of file interface.c.

Referenced by if().

#define HASH_ERROR_NO_CURRENT_ELEMENT   0x00080002
 

Definition at line 43 of file interface.c.

#define MASK   0xf0000000l
 

Definition at line 106 of file interface.c.

Referenced by hashpjw().

#define PRIME   211
 

Definition at line 23 of file interface.c.

Referenced by sym_FreeSymbolTable(), sym_NewSymbolTable(), and sym_TraverseSymbolTable().


Typedef Documentation

typedef struct _myOBJECT myOBJECT
 

typedef struct _myOBJECT * pmyOBJECT
 

typedef struct _hash* ptHash
 

typedef struct _hashe * ptHashE
 

typedef struct _hash tHash
 

typedef struct _hashe tHashE
 


Function Documentation

besDEREFERENCE Argument   ) 
 

besFREE pH   ) 
 

besFREE pE   ) 
 

besEND besFUNCTION thishv   ) 
 

Definition at line 597 of file interface.c.

References besFREE(), besRELEASE(), _mymysqlHANDLE::next, and pH.

besEND besFUNCTION thishk   ) 
 

Definition at line 565 of file interface.c.

References besALLOC_RETURN_LONG, besALLOC_RETURN_STRING(), besRETURNVALUE, HASH_ERROR_INTERNAL002, LONGVALUE(), memcpy(), pH, STRINGVALUE(), and STRLEN().

besEND besFUNCTION pervhk   ) 
 

Definition at line 532 of file interface.c.

References besALLOC_RETURN_LONG, besALLOC_RETURN_STRING(), besRETURNVALUE, HASH_ERROR_INTERNAL002, LONGVALUE(), memcpy(), pH, STRINGVALUE(), and STRLEN().

besEND besFUNCTION starth   ) 
 

Definition at line 467 of file interface.c.

References besALLOC_RETURN_LONG, besALLOC_RETURN_STRING(), besRETURNVALUE, HASH_ERROR_INTERNAL002, LONGVALUE(), memcpy(), pH, STRINGVALUE(), and STRLEN().

besEND besFUNCTION delhk   ) 
 

Definition at line 383 of file interface.c.

References STRLEN(), and varcmp().

besEND besFUNCTION gethv   ) 
 

Definition at line 292 of file interface.c.

References varcmp().

besEND besFUNCTION newh   ) 
 

Definition at line 158 of file interface.c.

References GET_HASH_HANDLE.

besLEFTVALUE Argument  ,
Lval 
 

static int hashpjw char *  s,
long  len
[static]
 

Definition at line 107 of file interface.c.

References MASK.

Referenced by sym_DeleteSymbol(), sym_LookupSymbol(), and varhashpjw().

if Lval   ) 
 

Definition at line 645 of file interface.c.

References besRELEASE(), and Lval.

if pE->  small_son  ) 
 

Definition at line 443 of file interface.c.

References HASH_ERROR_INTERNAL001, pE, ppE, STRLEN(), and varcmp().

if *ppE->  Value  )  = (*ppE)->prev
 

if besRETURNVALUE  = NULL  ) 
 

Definition at line 326 of file interface.c.

References besALLOC_RETURN_LONG, besRETURNVALUE, LONGVALUE(), and pH.

if pH->  FirstElement = NULL  ) 
 

Definition at line 281 of file interface.c.

References pE, and pH.

if pE  = NULL  ) 
 

Definition at line 270 of file interface.c.

References _mymysqlHANDLE::next, pE, and pH.

if Argument   ) 
 

Definition at line 246 of file interface.c.

References besDEREFERENCE(), HASH_ERROR_INVALID_VALUE, LONGVALUE(), memcpy(), STRINGVALUE(), and STRLEN().

besVERSION_NEGOTIATE return int   ) 
 

Definition at line 132 of file interface.c.

static int varcmp VARIABLE  a,
VARIABLE  b
[static]
 

Definition at line 61 of file interface.c.

References LONGVALUE(), NULL, STRINGVALUE(), and STRLEN().

Referenced by besFUNCTION(), and if().

static int varhashpjw VARIABLE  a  )  [static]
 

Definition at line 119 of file interface.c.

References hashpjw(), LONGVALUE(), NULL, STRINGVALUE(), and STRLEN().


Variable Documentation

Argument = besARGUMENT(1)
 

Definition at line 643 of file interface.c.

Argument = besARGUMENT(2)
 

Definition at line 358 of file interface.c.

besALLOC_RETURN_LONG
 

Definition at line 364 of file interface.c.

besRETURNVALUE = besNEWMORTALREF
 

Definition at line 325 of file interface.c.

if ppE return COMMAND_ERROR_SUCCESS
 

Definition at line 418 of file interface.c.

if ppE return COMMAND_ERROR_SUCCESS
 

Definition at line 322 of file interface.c.

pH LastElement = pE
 

Definition at line 288 of file interface.c.

else pH LastElement = pE
 

Definition at line 279 of file interface.c.

pE = *ppE
 

Definition at line 439 of file interface.c.

Referenced by if().

ppE = pE->big_son
 

Definition at line 441 of file interface.c.

ppE = pH->Table+varhashpjw(vKey)
 

Definition at line 363 of file interface.c.

* ppE = pE = besALLOC(sizeof(tHashE))
 

Definition at line 269 of file interface.c.

ppE = pH->Table+varhashpjw(vKey)
 

Definition at line 226 of file interface.c.

Referenced by if().

else pE prev = pH->LastElement
 

Definition at line 286 of file interface.c.

Referenced by BuildSubTree(), and reader_LoadPreprocessors().

pH ThisElement = NULL
 

Definition at line 436 of file interface.c.

pH ThisElement = *ppE
 

Definition at line 319 of file interface.c.

vKey = Argument
 

Definition at line 360 of file interface.c.

else vKey = NULL
 

Definition at line 267 of file interface.c.

else vValue = NULL
 

Definition at line 223 of file interface.c.


Generated on Sun Mar 12 23:56:35 2006 for ScriptBasic by  doxygen 1.4.6-NO