- Adapted indenation to new agreed upon system

- Added support for second generation scriptcontext based counter
This commit is contained in:
koennecke
2009-02-13 09:00:03 +00:00
parent a3dcad2bfa
commit 91d4af0541
405 changed files with 88101 additions and 88173 deletions

View File

@ -23,74 +23,74 @@
----------------------------------------------------------------------------*/
#ifndef DYNAMICSTRING
#define DYNAMICSTRING
typedef struct __DynString *pDynString;
typedef struct __DynString *pDynString;
/*----------------------- live and death ----------------------------------*/
pDynString CreateDynString(int iInitialLength, int iResizeLength);
pDynString CreateDynString(int iInitialLength, int iResizeLength);
/*
Create a new DynString Object. Its initial length will be iInitialLength.
It will be resized in iResizeLength steps. This allows for efficient
storage management. It woul be seriously inefficient to allocate
per added character.
*/
void DeleteDynString(pDynString self);
/*----------------------- interface to it --------------------------------- */
Create a new DynString Object. Its initial length will be iInitialLength.
It will be resized in iResizeLength steps. This allows for efficient
storage management. It woul be seriously inefficient to allocate
per added character.
*/
void DeleteDynString(pDynString self);
/*----------------------- interface to it --------------------------------- */
int DynStringCopy(pDynString self, char *pText);
int DynStringCopy(pDynString self, char *pText);
/*
Copies the text in Text into the DynString starting at 0 and over
writing anything there beforehand.
*/
int DynStringConcat(pDynString self, char *pText);
/*
Concatenates the string in DynString with the one supplied
in string.
*/
Copies the text in Text into the DynString starting at 0 and over
writing anything there beforehand.
*/
int DynStringConcatChar(pDynString self, char c);
int DynStringConcat(pDynString self, char *pText);
/*
adds one character at the end of the string
*/
int DynStringInsert(pDynString self, char *pText, int iPos);
/*
inserts the text in pText at Position iPos in the DynString.
Everything behind iPos will be pushed outwards in order to create
space for pText.
*/
Concatenates the string in DynString with the one supplied
in string.
*/
int DynStringReplace(pDynString self, char *pText, int iPos);
int DynStringConcatChar(pDynString self, char c);
/*
Starting at iPos, replace everything after it with ptext. In
contrats to insert this won't push data backwards.
*/
char *GetCharArray(pDynString self);
adds one character at the end of the string
*/
int DynStringInsert(pDynString self, char *pText, int iPos);
/*
inserts the text in pText at Position iPos in the DynString.
Everything behind iPos will be pushed outwards in order to create
space for pText.
*/
int DynStringReplace(pDynString self, char *pText, int iPos);
/*
Starting at iPos, replace everything after it with ptext. In
contrats to insert this won't push data backwards.
*/
char *GetCharArray(pDynString self);
/*
retrieves a pointer to the character array keeping the current
text. NEVER, ever free this pointer, otherwise you are rewarded
with a core dump. The pointer belongs to DynString and will be
deleted when deleting the DynString.
*/
int GetDynStringLength(pDynString self);
/*
returns the current length of the dynamic string.
*/
retrieves a pointer to the character array keeping the current
text. NEVER, ever free this pointer, otherwise you are rewarded
with a core dump. The pointer belongs to DynString and will be
deleted when deleting the DynString.
*/
int GetDynStringLength(pDynString self);
int DynStringClear(pDynString self);
/*
removes all old data from the dynstring
*/
int DynStringBackspace(pDynString self);
returns the current length of the dynamic string.
*/
int DynStringClear(pDynString self);
/*
removes all old data from the dynstring
*/
int DynStringBackspace(pDynString self);
/*
removes one character at the end from the dynstring
*/
#endif
removes one character at the end from the dynstring
*/
#endif