[Nagiosplug-checkins] CVS: nagiosplug/plugins utils.c,1.25,1.26 utils.h,1.7,1.8

Karl DeBisschop kdebisschop at users.sourceforge.net
Sat Aug 2 11:23:03 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv26599

Modified Files:
	utils.c utils.h 
Log Message:
ifdef so utils.h can be header for utils.c

Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** utils.c	29 Jul 2003 05:49:23 -0000	1.25
--- utils.c	2 Aug 2003 18:22:51 -0000	1.26
***************
*** 12,17 ****
--- 12,20 ----
   ****************************************************************************/
  
+ #define LOCAL_TIMEOUT_ALARM_HANDLER
+ 
  #include "config.h"
  #include "common.h"
+ #include "utils.h"
  #include <stdarg.h>
  #include <limits.h>
***************
*** 20,58 ****
  
  extern void print_usage (void);
- extern int timeout_interval;
  extern const char *progname;
  
- void support (void);
- char *clean_revstring (const char *);
- void print_revision (const char *, const char *);
- void die (int result, const char *fmt, ...);
- void terminate (int result, const char *fmt, ...);
- RETSIGTYPE timeout_alarm_handler (int);
- 
- int is_integer (char *);
- int is_intpos (char *);
- int is_intneg (char *);
- int is_intnonneg (char *);
- int is_intpercent (char *);
- 
- int is_numeric (char *);
- int is_positive (char *);
- int is_negative (char *);
- int is_nonnegative (char *);
- int is_percentage (char *);
- 
- int is_option (char *str);
- 
- double delta_time (struct timeval tv);
- 
- void strip (char *);
- char *strscpy (char *dest, const char *src);
- char *strscat (char *dest, char *src);
- char *strnl (char *str);
- char *strpcpy (char *dest, const char *src, const char *str);
- char *strpcat (char *dest, const char *src, const char *str);
- 
- char *state_text (int result);
- 
  #define STRLEN 64
  #define TXTBLK 128
--- 23,28 ----
***************
*** 66,71 ****
   ****************************************************************************/
  
- #define max(a,b) (((a)>(b))?(a):(b))
- 
  int
  max_state (int a, int b)
--- 36,39 ----
***************
*** 399,403 ****
  
  char *
! strscat (char *dest, char *src)
  {
  
--- 367,371 ----
  
  char *
! strscat (char *dest, const char *src)
  {
  

Index: utils.h
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** utils.h	2 Aug 2003 16:42:57 -0000	1.7
--- utils.h	2 Aug 2003 18:22:51 -0000	1.8
***************
*** 14,29 ****
  /* Standardize version information, termination */
  
- char *my_basename (char *);
  void support (void);
  char *clean_revstring (const char *revstring);
  void print_revision (const char *, const char *);
  void die (int result, const char *fmt, ...);
! void terminate (int result, char *msg, ...);
! extern RETSIGTYPE timeout_alarm_handler (int);
  
  /* Handle timeouts */
  
! time_t start_time, end_time;
  int timeout_interval = DEFAULT_SOCKET_TIMEOUT;
  
  /* Test input types */
--- 14,34 ----
  /* Standardize version information, termination */
  
  void support (void);
  char *clean_revstring (const char *revstring);
  void print_revision (const char *, const char *);
  void die (int result, const char *fmt, ...);
! void terminate (int result, const char *msg, ...);
  
  /* Handle timeouts */
  
! #ifdef LOCAL_TIMEOUT_ALARM_HANDLER
! extern int timeout_interval;
! RETSIGTYPE timeout_alarm_handler (int);
! #else
  int timeout_interval = DEFAULT_SOCKET_TIMEOUT;
+ extern RETSIGTYPE timeout_alarm_handler (int);
+ #endif
+ 
+ time_t start_time, end_time;
  
  /* Test input types */
***************
*** 60,65 ****
  
  void strip (char *buffer);
! char *strscpy (char *dest, char *src);
! char *strscat (char *dest, char *src);
  char *strnl (char *str);
  char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */
--- 65,70 ----
  
  void strip (char *buffer);
! char *strscpy (char *dest, const char *src);
! char *strscat (char *dest, const char *src);
  char *strnl (char *str);
  char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */
***************
*** 125,126 ****
--- 130,141 ----
   -t, --timeout=INTEGER\n\
      Seconds before connection times out (default: %d)\n"
+ 
+ #define UT_SUPPORT "\n\
+ Send email to nagios-users at lists.sourceforge.net if you have questions\n\
+ regarding use of this software. To submit patches or suggest improvements,\n\
+ send email to nagiosplug-devel at lists.sourceforge.net\n"
+ 
+ #define UT_NOWARRANTY "\
+ The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\
+ copies of the plugins under the terms of the GNU General Public License.\n\
+ For more information about these matters, see the file named COPYING.\n"





More information about the Commits mailing list