summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index a2eb9ce3..4631be84 100644
--- a/parse.c
+++ b/parse.c
@@ -453,6 +453,20 @@ int rsParsGetParsePointer(rsParsObj *pThis)
return rsCStrLen(pThis->pCStr) - 1;
}
+/* peek at the character at the parse pointer
+ * the caller must ensure that the parse pointer is not
+ * at the end of the parse buffer (e.g. by first calling
+ * parsIsAtEndOfParseString).
+ * rgerhards, 2005-09-27
+ */
+char parsPeekAtCharAtParsPtr(rsParsObj *pThis)
+{
+ rsCHECKVALIDOBJECT(pThis, OIDrsPars);
+ assert(pThis->iCurrPos < rsCStrLen(pThis->pCStr));
+
+ return(*(pThis->pCStr->pBuf + pThis->iCurrPos));
+}
+
/*
* Local variables: