src/clipsrules/core/utility.c File Reference

#include "setup.h"
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "envrnmnt.h"
#include "evaluatn.h"
#include "facthsh.h"
#include "memalloc.h"
#include "multifld.h"
#include "prntutil.h"
#include "sysdep.h"
#include "utility.h"

Include dependency graph for utility.c:

Go to the source code of this file.

Defines

#define _UTILITY_SOURCE_
#define _STDIO_INCLUDED_
#define MAX_EPHEMERAL_COUNT   1000L
#define MAX_EPHEMERAL_SIZE   10240L
#define COUNT_INCREMENT   1000L
#define SIZE_INCREMENT   10240L

Functions

globle void InitializeUtilityData (void *theEnv)
globle void PeriodicCleanup (void *theEnv, intBool cleanupAllDepths, intBool useHeuristics)
globle intBool AddCleanupFunction (void *theEnv, char *name, void(*theFunction)(void *), int priority)
globle intBool AddPeriodicFunction (char *name, void(*theFunction)(void), int priority)
globle intBool EnvAddPeriodicFunction (void *theEnv, char *name, void(*theFunction)(void *), int priority)
globle intBool RemoveCleanupFunction (void *theEnv, char *name)
globle intBool EnvRemovePeriodicFunction (void *theEnv, char *name)
globle char * StringPrintForm (void *theEnv, char *str)
globle char * AppendStrings (void *theEnv, char *str1, char *str2)
globle char * AppendToString (void *theEnv, char *appendStr, char *oldStr, size_t *oldPos, size_t *oldMax)
globle char * InsertInString (void *theEnv, char *insertStr, size_t position, char *oldStr, size_t *oldPos, size_t *oldMax)
globle char * EnlargeString (void *theEnv, size_t length, char *oldStr, size_t *oldPos, size_t *oldMax)
globle char * AppendNToString (void *theEnv, char *appendStr, char *oldStr, size_t length, size_t *oldPos, size_t *oldMax)
globle char * ExpandStringWithChar (void *theEnv, int inchar, char *str, size_t *pos, size_t *max, size_t newSize)
globle struct callFunctionItemAddFunctionToCallList (void *theEnv, char *name, int priority, void(*func)(void *), struct callFunctionItem *head, intBool environmentAware)
globle struct callFunctionItemAddFunctionToCallListWithContext (void *theEnv, char *name, int priority, void(*func)(void *), struct callFunctionItem *head, intBool environmentAware, void *context)
globle struct callFunctionItemRemoveFunctionFromCallList (void *theEnv, char *name, struct callFunctionItem *head, int *found)
globle void DeallocateCallList (void *theEnv, struct callFunctionItem *theList)
globle unsigned long ItemHashValue (void *theEnv, unsigned short theType, void *theValue, unsigned long theRange)
globle void YieldTime (void *theEnv)
globle short SetGarbageCollectionHeuristics (void *theEnv, short newValue)
globle void EnvIncrementGCLocks (void *theEnv)
globle void EnvDecrementGCLocks (void *theEnv)
globle short EnablePeriodicFunctions (void *theEnv, short value)
globle short EnableYieldFunction (void *theEnv, short value)
globle struct trackedMemoryAddTrackedMemory (void *theEnv, void *theMemory, size_t theSize)
globle void RemoveTrackedMemory (void *theEnv, struct trackedMemory *theTracker)
globle size_t UTF8Length (char *s)
globle void UTF8Increment (char *s, size_t *i)
globle size_t UTF8Offset (char *str, size_t charnum)
globle size_t UTF8CharNum (char *s, size_t offset)


Define Documentation

#define _STDIO_INCLUDED_

Definition at line 39 of file utility.c.

#define _UTILITY_SOURCE_

Definition at line 31 of file utility.c.

#define COUNT_INCREMENT   1000L

Definition at line 54 of file utility.c.

#define MAX_EPHEMERAL_COUNT   1000L

Definition at line 52 of file utility.c.

#define MAX_EPHEMERAL_SIZE   10240L

Definition at line 53 of file utility.c.

#define SIZE_INCREMENT   10240L

Definition at line 55 of file utility.c.


Function Documentation

globle intBool AddCleanupFunction ( void *  theEnv,
char *  name,
void(*)(void *)  theFunction,
int  priority 
)

Definition at line 261 of file utility.c.

globle struct callFunctionItem* AddFunctionToCallList ( void *  theEnv,
char *  name,
int  priority,
void(*)(void *)  func,
struct callFunctionItem head,
intBool  environmentAware 
) [read]

Definition at line 631 of file utility.c.

globle struct callFunctionItem* AddFunctionToCallListWithContext ( void *  theEnv,
char *  name,
int  priority,
void(*)(void *)  func,
struct callFunctionItem head,
intBool  environmentAware,
void *  context 
) [read]

Definition at line 647 of file utility.c.

globle intBool AddPeriodicFunction ( char *  name,
void(*)(void)  theFunction,
int  priority 
)

Definition at line 279 of file utility.c.

globle struct trackedMemory* AddTrackedMemory ( void *  theEnv,
void *  theMemory,
size_t  theSize 
) [read]

Definition at line 890 of file utility.c.

globle char* AppendNToString ( void *  theEnv,
char *  appendStr,
char *  oldStr,
size_t  length,
size_t *  oldPos,
size_t *  oldMax 
)

Definition at line 528 of file utility.c.

globle char* AppendStrings ( void *  theEnv,
char *  str1,
char *  str2 
)

Definition at line 386 of file utility.c.

globle char* AppendToString ( void *  theEnv,
char *  appendStr,
char *  oldStr,
size_t *  oldPos,
size_t *  oldMax 
)

Definition at line 408 of file utility.c.

globle void DeallocateCallList ( void *  theEnv,
struct callFunctionItem theList 
)

Definition at line 736 of file utility.c.

globle short EnablePeriodicFunctions ( void *  theEnv,
short  value 
)

Definition at line 858 of file utility.c.

globle short EnableYieldFunction ( void *  theEnv,
short  value 
)

Definition at line 874 of file utility.c.

globle char* EnlargeString ( void *  theEnv,
size_t  length,
char *  oldStr,
size_t *  oldPos,
size_t *  oldMax 
)

Definition at line 495 of file utility.c.

globle intBool EnvAddPeriodicFunction ( void *  theEnv,
char *  name,
void(*)(void *)  theFunction,
int  priority 
)

Definition at line 301 of file utility.c.

globle void EnvDecrementGCLocks ( void *  theEnv  ) 

Definition at line 848 of file utility.c.

globle void EnvIncrementGCLocks ( void *  theEnv  ) 

Definition at line 838 of file utility.c.

globle intBool EnvRemovePeriodicFunction ( void *  theEnv,
char *  name 
)

Definition at line 335 of file utility.c.

globle char* ExpandStringWithChar ( void *  theEnv,
int  inchar,
char *  str,
size_t *  pos,
size_t *  max,
size_t  newSize 
)

Definition at line 586 of file utility.c.

globle void InitializeUtilityData ( void *  theEnv  ) 

Definition at line 67 of file utility.c.

globle char* InsertInString ( void *  theEnv,
char *  insertStr,
size_t  position,
char *  oldStr,
size_t *  oldPos,
size_t *  oldMax 
)

Definition at line 448 of file utility.c.

globle unsigned long ItemHashValue ( void *  theEnv,
unsigned short  theType,
void *  theValue,
unsigned long  theRange 
)

Definition at line 755 of file utility.c.

globle void PeriodicCleanup ( void *  theEnv,
intBool  cleanupAllDepths,
intBool  useHeuristics 
)

Definition at line 126 of file utility.c.

globle intBool RemoveCleanupFunction ( void *  theEnv,
char *  name 
)

Definition at line 319 of file utility.c.

globle struct callFunctionItem* RemoveFunctionFromCallList ( void *  theEnv,
char *  name,
struct callFunctionItem head,
int *  found 
) [read]

Definition at line 698 of file utility.c.

globle void RemoveTrackedMemory ( void *  theEnv,
struct trackedMemory theTracker 
)

Definition at line 911 of file utility.c.

globle short SetGarbageCollectionHeuristics ( void *  theEnv,
short  newValue 
)

Definition at line 821 of file utility.c.

globle char* StringPrintForm ( void *  theEnv,
char *  str 
)

Definition at line 351 of file utility.c.

globle size_t UTF8CharNum ( char *  s,
size_t  offset 
)

Definition at line 985 of file utility.c.

globle void UTF8Increment ( char *  s,
size_t *  i 
)

Definition at line 948 of file utility.c.

globle size_t UTF8Length ( char *  s  ) 

Definition at line 930 of file utility.c.

globle size_t UTF8Offset ( char *  str,
size_t  charnum 
)

Definition at line 962 of file utility.c.

globle void YieldTime ( void *  theEnv  ) 

Definition at line 811 of file utility.c.


Generated on Mon Jan 10 22:33:42 2011 by  doxygen 1.5.6