summaryrefslogtreecommitdiffstats
path: root/srUtils.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-30 12:19:20 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-30 12:19:20 +0000
commit8618cc00b014dde7e7a3c20740757cab0ff0b007 (patch)
tree10d84c3724b54989ca67af3a5504f19c94a4dfaf /srUtils.c
parent6313a3417605fff4a40e367954c3fcbf79d321d5 (diff)
downloadrsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.tar.gz
rsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.tar.xz
rsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.zip
moved doBinaryOption() and doGetGUID() to cfsysline.c
Diffstat (limited to 'srUtils.c')
-rwxr-xr-xsrUtils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/srUtils.c b/srUtils.c
index 6080d607..4e91bb9c 100755
--- a/srUtils.c
+++ b/srUtils.c
@@ -36,6 +36,7 @@
#include <signal.h>
#include <assert.h>
#include <wait.h>
+#include <ctype.h>
#include "rsyslog.h" /* THIS IS A MODIFICATION FOR RSYSLOG! 2004-11-18 rgerards */
#include "liblogging-stub.h" /* THIS IS A MODIFICATION FOR RSYSLOG! 2004-11-18 rgerards */
#define TRUE 1
@@ -208,6 +209,27 @@ int execProg(uchar *program, int bWait, uchar *arg)
perror("exec");
exit(1); /* not much we can do in this case */
}
+
+
+/* skip over whitespace in a standard C string. The
+ * provided pointer is advanced to the first non-whitespace
+ * charater or the \0 byte, if there is none. It is never
+ * moved past the \0.
+ */
+void skipWhiteSpace(uchar **pp)
+{
+ register uchar *p;
+
+ assert(pp != NULL);
+ assert(*pp != NULL);
+
+ p = *pp;
+ while(*p && isspace((int) *p))
+ ++p;
+ *pp = p;
+}
+
+
/*
* vi:set ai:
*/