diff options
author | Michael Biebl <biebl@debian.org> | 2008-04-05 19:13:49 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-04-05 19:13:49 +0200 |
commit | 85df627b6c1cfc388a70ef5b01681d5d952a9dd7 (patch) | |
tree | 5b4136af33910f18d7f24c8506a2519620c6da1d /parse.h | |
parent | 6eda8c4f5837480a4f897513d6951e3f5743723d (diff) | |
download | rsyslog-85df627b6c1cfc388a70ef5b01681d5d952a9dd7.tar.gz |
Imported Upstream version 3.14.1upstream/3.14.1
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -23,6 +23,25 @@ * necessary buffer space. * * begun 2005-09-09 rgerhards + * + * Copyright (C) 2005 by Rainer Gerhards and Adiscon GmbH + * + * This file is part of rsyslog. + * + * Rsyslog is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Rsyslog is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Rsyslog. If not, see <http://www.gnu.org/licenses/>. + * + * A copy of the GPL can be found in the file "COPYING" in this distribution. */ #ifndef _PARSE_H_INCLUDED__ #define _PARSE_H_INCLUDED__ 1 @@ -37,7 +56,7 @@ struct rsParsObject #ifndef NDEBUG rsObjID OID; /**< object ID */ #endif - rsCStrObj *pCStr; /**< pointer to the string object we are parsing */ + cstr_t *pCStr; /**< pointer to the string object we are parsing */ int iCurrPos; /**< current parsing position (char offset) */ }; typedef struct rsParsObject rsParsObj; @@ -52,7 +71,7 @@ int rsParsGetParsePointer(rsParsObj *pThis); * Construct a rsPars object. */ rsRetVal rsParsConstruct(rsParsObj **ppThis); -rsRetVal rsParsAssignString(rsParsObj *pThis, rsCStrObj *pCStr); +rsRetVal rsParsAssignString(rsParsObj *pThis, cstr_t *pCStr); /* parse an integer. The parse pointer is advanced */ rsRetVal parsInt(rsParsObj *pThis, int* pInt); @@ -72,10 +91,10 @@ rsRetVal parsSkipWhitespace(rsParsObj *pThis); * Output: * ppCStr Pointer to the parsed string */ -rsRetVal parsDelimCStr(rsParsObj *pThis, rsCStrObj **ppCStr, char cDelim, int bTrimLeading, int bTrimTrailing); +rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrimLeading, int bTrimTrailing); rsRetVal parsSkipAfterChar(rsParsObj *pThis, char c); -rsRetVal parsQuotedCStr(rsParsObj *pThis, rsCStrObj **ppCStr); +rsRetVal parsQuotedCStr(rsParsObj *pThis, cstr_t **ppCStr); rsRetVal rsParsConstructFromSz(rsParsObj **ppThis, unsigned char *psz); rsRetVal rsParsDestruct(rsParsObj *pThis); int parsIsAtEndOfParseString(rsParsObj *pThis); |