diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-09-21 23:01:28 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-09-21 23:01:28 +0000 |
commit | 8a39526e1b8754a8b8fbb50f7f6806af4def7baa (patch) | |
tree | c80f8ddafe75a920cdcec549e30e728bb57125f9 /lib/utils_cmd.h | |
parent | 7a7052512953e6626edf8efc87664dba3ee01d74 (diff) | |
download | monitoring-plugins-8a39526e1b8754a8b8fbb50f7f6806af4def7baa.tar.gz |
Stop double expansion of parameters for negate - works like
time command now
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1784 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/utils_cmd.h')
-rw-r--r-- | lib/utils_cmd.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h new file mode 100644 index 00000000..d54b2b4d --- /dev/null +++ b/lib/utils_cmd.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef _UTILS_CMD_ | ||
2 | #define _UTILS_CMD_ | ||
3 | |||
4 | /* | ||
5 | * Header file for nagios plugins utils_cmd.c | ||
6 | * | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /** types **/ | ||
11 | struct output | ||
12 | { | ||
13 | char *buf; /* output buffer */ | ||
14 | size_t buflen; /* output buffer content length */ | ||
15 | char **line; /* array of lines (points to buf) */ | ||
16 | size_t *lens; /* string lengths */ | ||
17 | size_t lines; /* lines of output */ | ||
18 | }; | ||
19 | |||
20 | typedef struct output output; | ||
21 | |||
22 | /** prototypes **/ | ||
23 | int cmd_run (const char *, output *, output *, int); | ||
24 | int cmd_run_array (char *const *, output *, output *, int); | ||
25 | |||
26 | /* only multi-threaded plugins need to bother with this */ | ||
27 | void cmd_init (void); | ||
28 | #define CMD_INIT cmd_init() | ||
29 | |||
30 | /* possible flags for cmd_run()'s fourth argument */ | ||
31 | #define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */ | ||
32 | #define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */ | ||
33 | |||
34 | #endif /* _UTILS_CMD_ */ | ||