G:/ScriptBasic/source/memory.c File Reference

#include <stdlib.h>
#include <string.h>
#include "errcodes.h"
#include "memory.h"
#include "myalloc.h"

Go to the source code of this file.

Functions

int memory_InitStructure (pMemoryObject pMo)
int memory_RegisterType (pMemoryObject pMo, unsigned long SizeOfThisType)
void memory_RegisterTypes (pMemoryObject pMo)
pFixSizeMemoryObject memory_NewVariable (pMemoryObject pMo, int type, unsigned long LargeBlockSize)
int memory_ReleaseVariable (pMemoryObject pMo, pFixSizeMemoryObject p)
pFixSizeMemoryObject memory_NewString (pMemoryObject pMo, unsigned long StringSize)
pFixSizeMemoryObject memory_NewCString (pMemoryObject pMo, unsigned long StringSize)
int memory_SetRef (pMemoryObject pMo, pFixSizeMemoryObject *ppVar, pFixSizeMemoryObject *ppVal)
pFixSizeMemoryObject memory_NewRef (pMemoryObject pMo)
int memory_IsUndef (pFixSizeMemoryObject pVar)
int memory_Type (pFixSizeMemoryObject pVar)
pFixSizeMemoryObject memory_SelfOrRealUndef (pFixSizeMemoryObject pVar)
pFixSizeMemoryObject memory_NewUndef (pMemoryObject pMo)
int memory_ReplaceVariable (pMemoryObject pMo, pFixSizeMemoryObject *Lval, pFixSizeMemoryObject NewValue, pMortalList pMortal, int iDupFlag)
pFixSizeMemoryObject memory_NewLong (pMemoryObject pMo)
pFixSizeMemoryObject memory_NewDouble (pMemoryObject pMo)
pFixSizeMemoryObject memory_CopyArray (pMemoryObject pMo, pFixSizeMemoryObject p)
pFixSizeMemoryObject memory_NewArray (pMemoryObject pMo, long LowIndex, long HighIndex)
pFixSizeMemoryObject memory_ReDimArray (pMemoryObject pMo, pFixSizeMemoryObject p, long LowIndex, long HighIndex)
pFixSizeMemoryObject memory_CheckArrayIndex (pMemoryObject pMo, pFixSizeMemoryObject p, long Index)
void memory_Mortalize (pFixSizeMemoryObject p, pMortalList pMortal)
void memory_Immortalize (pFixSizeMemoryObject p, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortal (pMemoryObject pMo, BYTE type, unsigned long LargeBlockSize, pMortalList pMortal)
pFixSizeMemoryObject memory_DupImmortal (pMemoryObject pMo, pFixSizeMemoryObject pVar, int *piErrorCode)
pFixSizeMemoryObject memory_DupVar (pMemoryObject pMo, pFixSizeMemoryObject pVar, pMortalList pMyMortal, int *piErrorCode)
pFixSizeMemoryObject memory_DupMortalize (pMemoryObject pMo, pFixSizeMemoryObject pVar, pMortalList pMyMortal, int *piErrorCode)
void memory_ReleaseMortals (pMemoryObject pMo, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalString (pMemoryObject pMo, unsigned long StringSize, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalCString (pMemoryObject pMo, unsigned long StringSize, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalLong (pMemoryObject pMo, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalRef (pMemoryObject pMo, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalDouble (pMemoryObject pMo, pMortalList pMortal)
pFixSizeMemoryObject memory_NewMortalArray (pMemoryObject pMo, pMortalList pMortal, long IndexLow, long IndexHigh)


Function Documentation

pFixSizeMemoryObject memory_CheckArrayIndex pMemoryObject  pMo,
pFixSizeMemoryObject  p,
long  Index
 

Definition at line 892 of file memory.c.

References memory_ReDimArray().

Referenced by execute_LeftValueArray(), and execute_LeftValueSarray().

pFixSizeMemoryObject memory_CopyArray pMemoryObject  pMo,
pFixSizeMemoryObject  p
 

Definition at line 726 of file memory.c.

References memcpy(), memory_IsUndef(), memory_NewArray(), memory_NewDouble(), memory_NewLong(), memory_NewRef(), memory_NewString(), memory_SetRef(), NULL, result, and STRLEN().

pFixSizeMemoryObject memory_DupImmortal pMemoryObject  pMo,
pFixSizeMemoryObject  pVar,
int *  piErrorCode
 

Definition at line 999 of file memory.c.

References i, memory_NewVariable(), and NULL.

Referenced by while().

pFixSizeMemoryObject memory_DupMortalize pMemoryObject  pMo,
pFixSizeMemoryObject  pVar,
pMortalList  pMyMortal,
int *  piErrorCode
 

Definition at line 1111 of file memory.c.

References memory_DupVar(), and NULL.

Referenced by memory_ReplaceVariable(), and modu_Init().

pFixSizeMemoryObject memory_DupVar pMemoryObject  pMo,
pFixSizeMemoryObject  pVar,
pMortalList  pMyMortal,
int *  piErrorCode
 

Definition at line 1049 of file memory.c.

References memcpy(), memory_NewMortal(), and NULL.

Referenced by execute_LeftValueSarray(), hook_CallScribaFunction(), and memory_DupMortalize().

void memory_Immortalize pFixSizeMemoryObject  p,
pMortalList  pMortal
 

Definition at line 940 of file memory.c.

References NULL.

Referenced by COMMAND_EXTERNAL(), COMMAND_EXTERNAM(), COMMAND_FUNCTIONARG(), execute_LeftValueSarray(), memory_ReplaceVariable(), and modu_Init().

int memory_InitStructure pMemoryObject  pMo  ) 
 

Definition at line 122 of file memory.c.

References alloc_InitSegment(), memset(), and NULL.

Referenced by execute_InitStructure(), and main().

int memory_IsUndef pFixSizeMemoryObject  pVar  ) 
 

Definition at line 564 of file memory.c.

References NULL.

Referenced by basext_GetArgsF(), execute_Convert2Double(), execute_Convert2DoubleS(), execute_Convert2Long(), execute_Convert2LongS(), execute_Convert2Numeric(), execute_Convert2String(), execute_GetDoubleValue(), execute_GetLongValue(), execute_IsInteger(), execute_IsStringInteger(), execute_LeftValueSarray(), if(), IsTrue(), memory_CopyArray(), memory_ReplaceVariable(), STRCMP(), and while().

void memory_Mortalize pFixSizeMemoryObject  p,
pMortalList  pMortal
 

Definition at line 913 of file memory.c.

References NULL.

Referenced by execute_Evaluate(), memory_NewMortal(), memory_NewMortalArray(), memory_NewMortalCString(), memory_NewMortalDouble(), memory_NewMortalLong(), memory_NewMortalRef(), and memory_NewMortalString().

pFixSizeMemoryObject memory_NewArray pMemoryObject  pMo,
long  LowIndex,
long  HighIndex
 

Definition at line 779 of file memory.c.

References i, memory_NewVariable(), NULL, and p.

Referenced by COMMAND_EXTERNAL(), COMMAND_FUNCTIONARG(), execute_ExecuteFunction(), execute_InitExecute(), execute_LeftValueArray(), execute_LeftValueSarray(), hook_CallScribaFunction(), memory_CopyArray(), memory_NewMortalArray(), modu_Init(), scriba_CallArg(), and scriba_CallArgEx().

pFixSizeMemoryObject memory_NewCString pMemoryObject  pMo,
unsigned long  StringSize
 

Definition at line 462 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by memory_NewMortalCString().

pFixSizeMemoryObject memory_NewDouble pMemoryObject  pMo  ) 
 

Definition at line 709 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by execute_Evaluate(), memory_CopyArray(), memory_NewMortalDouble(), modu_Init(), scriba_CallArg(), scriba_CallArgEx(), and scriba_SetVariable().

pFixSizeMemoryObject memory_NewLong pMemoryObject  pMo  ) 
 

Definition at line 692 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by execute_Evaluate(), memory_CopyArray(), memory_NewMortalLong(), modu_Init(), scriba_CallArg(), scriba_CallArgEx(), and scriba_SetVariable().

pFixSizeMemoryObject memory_NewMortal pMemoryObject  pMo,
BYTE  type,
unsigned long  LargeBlockSize,
pMortalList  pMortal
 

Definition at line 974 of file memory.c.

References memory_Mortalize(), memory_NewVariable(), NULL, and p.

Referenced by memory_DupVar().

pFixSizeMemoryObject memory_NewMortalArray pMemoryObject  pMo,
pMortalList  pMortal,
long  IndexLow,
long  IndexHigh
 

Definition at line 1360 of file memory.c.

References memory_Mortalize(), memory_NewArray(), and NULL.

Referenced by modu_Init().

pFixSizeMemoryObject memory_NewMortalCString pMemoryObject  pMo,
unsigned long  StringSize,
pMortalList  pMortal
 

Definition at line 1268 of file memory.c.

References memory_Mortalize(), memory_NewCString(), and NULL.

Referenced by execute_Evaluate().

pFixSizeMemoryObject memory_NewMortalDouble pMemoryObject  pMo,
pMortalList  pMortal
 

Definition at line 1340 of file memory.c.

References memory_Mortalize(), memory_NewDouble(), and NULL.

Referenced by execute_Convert2Double(), execute_Convert2DoubleS(), and modu_Init().

pFixSizeMemoryObject memory_NewMortalLong pMemoryObject  pMo,
pMortalList  pMortal
 

Definition at line 1288 of file memory.c.

References memory_Mortalize(), memory_NewLong(), and NULL.

Referenced by execute_Convert2Long(), execute_Convert2LongS(), execute_Convert2Numeric(), and modu_Init().

pFixSizeMemoryObject memory_NewMortalRef pMemoryObject  pMo,
pMortalList  pMortal
 

Definition at line 1314 of file memory.c.

References memory_Mortalize(), memory_NewRef(), and NULL.

Referenced by modu_Init().

pFixSizeMemoryObject memory_NewMortalString pMemoryObject  pMo,
unsigned long  StringSize,
pMortalList  pMortal
 

Definition at line 1248 of file memory.c.

References memory_Mortalize(), memory_NewString(), and NULL.

Referenced by execute_Convert2String(), and modu_Init().

pFixSizeMemoryObject memory_NewRef pMemoryObject  pMo  ) 
 

Definition at line 541 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by COMMAND_EXTERNAL(), COMMAND_FUNCTIONARG(), execute_ExecuteFunction(), memory_CopyArray(), memory_NewMortalRef(), and modu_Init().

pFixSizeMemoryObject memory_NewString pMemoryObject  pMo,
unsigned long  StringSize
 

Definition at line 428 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by memory_CopyArray(), memory_NewMortalString(), modu_Init(), scriba_CallArg(), scriba_CallArgEx(), and scriba_SetVariable().

pFixSizeMemoryObject memory_NewUndef pMemoryObject  pMo  ) 
 

Definition at line 608 of file memory.c.

References memory_NewVariable(), and NULL.

Referenced by memory_ReplaceVariable(), and memory_SetRef().

pFixSizeMemoryObject memory_NewVariable pMemoryObject  pMo,
int  type,
unsigned long  LargeBlockSize
 

Definition at line 235 of file memory.c.

References alloc_Alloc(), alloc_Free(), and NULL.

Referenced by memory_DupImmortal(), memory_NewArray(), memory_NewCString(), memory_NewDouble(), memory_NewLong(), memory_NewMortal(), memory_NewRef(), memory_NewString(), and memory_NewUndef().

pFixSizeMemoryObject memory_ReDimArray pMemoryObject  pMo,
pFixSizeMemoryObject  p,
long  LowIndex,
long  HighIndex
 

Definition at line 816 of file memory.c.

References alloc_Alloc(), alloc_Free(), ArrayLowLimit, i, and NULL.

Referenced by memory_CheckArrayIndex().

int memory_RegisterType pMemoryObject  pMo,
unsigned long  SizeOfThisType
 

Definition at line 149 of file memory.c.

Referenced by memory_RegisterTypes().

void memory_RegisterTypes pMemoryObject  pMo  ) 
 

Definition at line 172 of file memory.c.

References memory_RegisterType().

Referenced by execute_InitStructure(), and main().

void memory_ReleaseMortals pMemoryObject  pMo,
pMortalList  pMortal
 

Definition at line 1136 of file memory.c.

References memory_ReleaseVariable(), NULL, and p.

Referenced by COMMAND_EXTERNAL(), COMMAND_EXTERNAM(), COMMAND_FUNCTIONARG(), and modu_Init().

int memory_ReleaseVariable pMemoryObject  pMo,
pFixSizeMemoryObject  p
 

Definition at line 322 of file memory.c.

References alloc_Free(), ArrayHighLimit, memory_ReleaseVariable(), NULL, printf(), and q.

int memory_ReplaceVariable pMemoryObject  pMo,
pFixSizeMemoryObject *  Lval,
pFixSizeMemoryObject  NewValue,
pMortalList  pMortal,
int  iDupFlag
 

Definition at line 626 of file memory.c.

References COMMAND_ERROR_SUCCESS, LONGVALUE(), memory_DupMortalize(), memory_Immortalize(), memory_IsUndef(), memory_NewUndef(), memory_ReleaseVariable(), and NULL.

Referenced by if().

pFixSizeMemoryObject memory_SelfOrRealUndef pFixSizeMemoryObject  pVar  ) 
 

Definition at line 595 of file memory.c.

References NULL.

Referenced by execute_Evaluate().

int memory_SetRef pMemoryObject  pMo,
pFixSizeMemoryObject *  ppVar,
pFixSizeMemoryObject *  ppVal
 

Definition at line 484 of file memory.c.

References COMMAND_ERROR_MEMORY_LOW, COMMAND_ERROR_SUCCESS, memory_NewUndef(), NULL, and refcount.

Referenced by COMMAND_EXTERNAL(), COMMAND_FUNCTIONARG(), execute_ExecuteFunction(), memory_CopyArray(), and modu_Init().

int memory_Type pFixSizeMemoryObject  pVar  ) 
 

Definition at line 583 of file memory.c.

References NULL.


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