diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-30 12:19:20 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-30 12:19:20 +0000 |
commit | 8618cc00b014dde7e7a3c20740757cab0ff0b007 (patch) | |
tree | 10d84c3724b54989ca67af3a5504f19c94a4dfaf /srUtils.c | |
parent | 6313a3417605fff4a40e367954c3fcbf79d321d5 (diff) | |
download | rsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.tar.gz rsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.tar.xz rsyslog-8618cc00b014dde7e7a3c20740757cab0ff0b007.zip |
moved doBinaryOption() and doGetGUID() to cfsysline.c
Diffstat (limited to 'srUtils.c')
-rwxr-xr-x | srUtils.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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: */ |