diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-15 10:33:47 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-15 10:33:47 +0000 |
commit | caf76db7c08183bc23167687702cb8652c254337 (patch) | |
tree | 281794d7358fa1c53ee11a104a67f600fbb00ff9 /stringbuf.h | |
parent | f820d0ac236f6953e7bd5d115775a8751837ef4f (diff) | |
download | rsyslog-caf76db7c08183bc23167687702cb8652c254337.tar.gz rsyslog-caf76db7c08183bc23167687702cb8652c254337.tar.xz rsyslog-caf76db7c08183bc23167687702cb8652c254337.zip |
prepared for new parse object; now removed allmost all liblogging borrowed
code
Diffstat (limited to 'stringbuf.h')
-rwxr-xr-x | stringbuf.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/stringbuf.h b/stringbuf.h index e0138bdc..a38a0997 100755 --- a/stringbuf.h +++ b/stringbuf.h @@ -16,24 +16,22 @@ * Rainer Gerhards and Adiscon GmbH. All Rights Reserved.
* This code is placed under the GPL.
*/
-#ifndef __LIB3195_STRINGBUF_H_INCLUDED__
-#define __LIB3195_STRINGBUF_H_INCLUDED__ 1
+#ifndef _STRINGBUF_H_INCLUDED__
+#define _STRINGBUF_H_INCLUDED__ 1
#define sbSTRBCHECKVALIDOBJECT(x) {assert(x != NULL); assert(x->OID == OIDrsCStr);}
-
/**
* The dynamic string buffer object.
- *
*/
struct rsCStrObject
{
- srObjID OID; /**< object ID */
- char *pBuf; /**< pointer to the string buffer, may be NULL if string is empty */
- char *pszBuf; /**< pointer to the sz version of the string (after it has been created )*/
- int iBufSize; /**< current maximum size of the string buffer */
- int iBufPtr; /**< pointer (index) of next character position to be written to. */
- int iStrLen; /**< length of the string in characters. */
+ rsObjID OID; /**< object ID */
+ char *pBuf; /**< pointer to the string buffer, may be NULL if string is empty */
+ char *pszBuf; /**< pointer to the sz version of the string (after it has been created )*/
+ int iBufSize; /**< current maximum size of the string buffer */
+ int iBufPtr; /**< pointer (index) of next character position to be written to. */
+ int iStrLen; /**< length of the string in characters. */
int iAllocIncrement; /**< the amount of bytes the string should be expanded if it needs to */
};
typedef struct rsCStrObject rsCStrObj;
@@ -43,6 +41,7 @@ typedef struct rsCStrObject rsCStrObj; * Construct a rsCStr object.
*/
rsCStrObj *rsCStrConstruct(void);
+rsRetVal rsCStrConstructFromszStr(rsCStrObj **ppThis, char *sz);
/**
* Destruct the string buffer object.
@@ -55,7 +54,7 @@ void rsCStrDestruct(rsCStrObj *pThis); *
* \param c Character to append to string.
*/
-srRetVal rsCStrAppendChar(rsCStrObj *pThis, char c);
+rsRetVal rsCStrAppendChar(rsCStrObj *pThis, char c);
/**
* Finish the string buffer. That means, the string
@@ -77,7 +76,7 @@ void rsCStrFinish(rsCStrObj *pThis); *
* \param psz pointer to string to be appended. Must not be NULL.
*/
-srRetVal rsCStrAppendStr(rsCStrObj *pThis, char* psz);
+rsRetVal rsCStrAppendStr(rsCStrObj *pThis, char* psz);
/**
* Set a new allocation incremet. This will influence
@@ -99,7 +98,7 @@ void rsCStrSetAllocIncrement(rsCStrObj *pThis, int iNewIncrement); * Append an integer to the string. No special formatting is
* done.
*/
-srRetVal rsCStrAppendInt(rsCStrObj *pThis, int i);
+rsRetVal rsCStrAppendInt(rsCStrObj *pThis, int i);
char* rsCStrConvSzStrAndDestruct(rsCStrObj *pThis);
|