[Nagiosplug-checkins] CVS: nagiosplug/plugins check_by_ssh.c,1.17,1.18 check_dig.c,1.17,1.18 check_disk.c,1.36,1.37 check_dns.c,1.21,1.22 check_dummy.c,1.5,1.6 check_fping.c,1.9,1.10 check_game.c,1.7,1.8 check_hpjd.c,1.15,1.16 check_http.c,1.48,1.49 check_ide-smart.c,1.3,1.4 check_ldap.c,1.13,1.14 check_load.c,1.11,1.12 check_mrtg.c,1.9,1.10 check_mysql.c,1.11,1.12 check_nagios.c,1.10,1.11 check_nt.c,1.17,1.18 check_nwstat.c,1.12,1.13 check_overcr.c,1.7,1.8 check_pgsql.c,1.14,1.15 check_ping.c,1.23,1.24 check_procs.c,1.19,1.20 check_radius.c,1.8,1.9 check_real.c,1.11,1.12 check_smtp.c,1.19,1.20 check_snmp.c,1.34,1.35 check_ssh.c,1.12,1.13 check_swap.c,1.17,1.18 check_tcp.c,1.35,1.36 check_time.c,1.10,1.11 check_udp.c,1.11,1.12 check_ups.c,1.10,1.11 check_users.c,1.8,1.9 negate.c,1.12,1.13 urlize.c,1.8,1.9

Karl DeBisschop kdebisschop at users.sourceforge.net
Thu Aug 21 23:23:31 CEST 2003


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

Modified Files:
	check_by_ssh.c check_dig.c check_disk.c check_dns.c 
	check_dummy.c check_fping.c check_game.c check_hpjd.c 
	check_http.c check_ide-smart.c check_ldap.c check_load.c 
	check_mrtg.c check_mysql.c check_nagios.c check_nt.c 
	check_nwstat.c check_overcr.c check_pgsql.c check_ping.c 
	check_procs.c check_radius.c check_real.c check_smtp.c 
	check_snmp.c check_ssh.c check_swap.c check_tcp.c check_time.c 
	check_udp.c check_ups.c check_users.c negate.c urlize.c 
Log Message:
- bindtextdomain for gettext, a few other smale cleanups here and there

Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_by_ssh.c	10 Aug 2003 06:53:21 -0000	1.17
--- check_by_ssh.c	22 Aug 2003 06:22:37 -0000	1.18
***************
*** 43,51 ****
  int verbose = FALSE;
  
- 
- 
- 
- 
- 
  int
  main (int argc, char **argv)
--- 43,46 ----
***************
*** 62,67 ****
  	FILE *fp = NULL;
  
! 	asprintf (&remotecmd, "%s", "");
! 	asprintf (&comm, "%s", SSH_COMMAND);
  
  	/* process arguments */
--- 57,67 ----
  	FILE *fp = NULL;
  
! 	remotecmd = strdup ("");
! 	comm = strdup (SSH_COMMAND);
! 	result_text = strdup ("");
! 
! 	setlocale (LC_ALL, "");
! 	bindtextdomain (PACKAGE, LOCALEDIR);
! 	textdomain (PACKAGE);
  
  	/* process arguments */
***************
*** 72,76 ****
  	/* Set signal handling and alarm timeout */
  	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
! 		printf ("Cannot catch SIGALRM");
  		return STATE_UNKNOWN;
  	}
--- 72,76 ----
  	/* Set signal handling and alarm timeout */
  	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
! 		printf (_("Cannot catch SIGALRM"));
  		return STATE_UNKNOWN;
  	}
***************
*** 98,102 ****
  
  
! 	/* get results from remote command */
  	while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process))
  		asprintf (&result_text, "%s%s", result_text, input_buffer);
--- 98,102 ----
  
  
! 	/* build up results from remote command in result_text */
  	while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process))
  		asprintf (&result_text, "%s%s", result_text, input_buffer);
***************
*** 106,109 ****
--- 106,111 ----
  	if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) {
  		printf ("%s\n", input_buffer);
+ 		while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process))
+ 			printf ("%s\n", input_buffer);
  		return STATE_WARNING;
  	}
***************
*** 123,130 ****
  		}
  
! 		time (&local_time);
  		commands = 0;
  		while (result_text && strlen(result_text) > 0) {
! 			status_text = strstr (result_text, _("STATUS CODE: "));
  			if (status_text == NULL) {
  				printf ("%s", result_text);
--- 125,132 ----
  		}
  
! 		local_time = time (NULL);
  		commands = 0;
  		while (result_text && strlen(result_text) > 0) {
! 			status_text = strstr (result_text, "STATUS CODE: ");
  			if (status_text == NULL) {
  				printf ("%s", result_text);
***************
*** 137,141 ****
  				eol[0] = 0;
  			if (service[commands] && status_text
! 					&& sscanf (status_text, _("STATUS CODE: %d"), &cresult) == 1) {
  				fprintf (fp, _("[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n"),
  								 (int) local_time, host_shortname, service[commands++], cresult,
--- 139,143 ----
  				eol[0] = 0;
  			if (service[commands] && status_text
! 					&& sscanf (status_text, "STATUS CODE: %d", &cresult) == 1) {
  				fprintf (fp, _("[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n"),
  								 (int) local_time, host_shortname, service[commands++], cresult,
***************
*** 146,149 ****
--- 148,152 ----
  	}
  
+ 
  	/* print the first line from the remote command */
  	else {
***************
*** 154,158 ****
  	}
  
! 	/* return error status from remote command */
  	return result;
  }
--- 157,162 ----
  	}
  
! 
! 	/* return error status from remote command */	
  	return result;
  }
***************
*** 223,227 ****
  			if (!is_integer (optarg))
  				usage2 (_("timeout interval must be an integer"), optarg);
! 			timeout_interval = atoi (optarg);
  			break;
  		case 'H':									/* host */
--- 227,232 ----
  			if (!is_integer (optarg))
  				usage2 (_("timeout interval must be an integer"), optarg);
! 			else
! 				timeout_interval = atoi (optarg);
  			break;
  		case 'H':									/* host */
***************
*** 383,386 ****
--- 388,393 ----
  all of -O, -s, and -n options (servicelist order must match '-C'\n\
  options)\n"));
+ 
+ 	printf (_(UT_SUPPORT));
  }
  

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_dig.c	10 Aug 2003 06:53:21 -0000	1.17
--- check_dig.c	22 Aug 2003 06:22:37 -0000	1.18
***************
*** 43,51 ****
  int critical_interval = -1;
  
- 
- 
- 
- 
- 
  int
  main (int argc, char **argv)
--- 43,46 ----
***************
*** 58,61 ****
--- 53,60 ----
  	output = strdup ("");
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	/* Set signal handling and alarm */
  	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR)
***************
*** 281,284 ****
--- 280,284 ----
  	print_revision (progname, revision);
  
+ 	printf (_("Copyright (c) 2000 Karl DeBisschop <kdebisschop at users.sourceforge.net>\n"));
  	printf (_(COPYRIGHT), copyright, email);
  

Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** check_disk.c	10 Aug 2003 06:53:21 -0000	1.36
--- check_disk.c	22 Aug 2003 06:22:37 -0000	1.37
***************
*** 152,155 ****
--- 152,159 ----
  	details = strdup ("");
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	mount_list = read_filesystem_list (0);
  

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** check_dns.c	10 Aug 2003 12:48:47 -0000	1.21
--- check_dns.c	22 Aug 2003 06:22:37 -0000	1.22
***************
*** 83,86 ****
--- 83,90 ----
  	int multi_address;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	/* Set signal handling and alarm */
  	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
***************
*** 399,402 ****
--- 403,407 ----
  	print_revision (progname, revision);
  
+ 	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
  	printf (_(COPYRIGHT), copyright, email);
  

Index: check_dummy.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dummy.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** check_dummy.c	9 Aug 2003 00:41:06 -0000	1.5
--- check_dummy.c	22 Aug 2003 06:22:37 -0000	1.6
***************
*** 35,38 ****
--- 35,42 ----
  	int result;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (argc != 2)
  		usage (_("Incorrect number of arguments supplied\n"));

Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_fping.c	10 Aug 2003 06:53:21 -0000	1.9
--- check_fping.c	22 Aug 2003 06:22:37 -0000	1.10
***************
*** 70,73 ****
--- 70,77 ----
  	input_buffer = malloc (MAX_INPUT_BUFFER);
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: check_game.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_game.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_game.c	10 Aug 2003 06:53:21 -0000	1.7
--- check_game.c	22 Aug 2003 06:22:37 -0000	1.8
***************
*** 61,64 ****
--- 61,68 ----
  	int i;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	result = process_arguments (argc, argv);
  

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** check_hpjd.c	10 Aug 2003 06:53:21 -0000	1.15
--- check_hpjd.c	22 Aug 2003 06:22:37 -0000	1.16
***************
*** 80,83 ****
--- 80,87 ----
  	errmsg = malloc(MAX_INPUT_BUFFER);
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));
***************
*** 375,378 ****
--- 379,383 ----
  	print_revision (progname, revision);
  
+ 	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
  	printf (_(COPYRIGHT), copyright, email);
  

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** check_http.c	22 Aug 2003 04:43:11 -0000	1.48
--- check_http.c	22 Aug 2003 06:22:37 -0000	1.49
***************
*** 816,820 ****
  				/* relative url */
  				if ((url[0] != '/')) {
! 					if (x = strrchr(url, '/'))
  						*x = '\0';
  					asprintf (&server_url, "%s/%s", server_url, url);
--- 816,820 ----
  				/* relative url */
  				if ((url[0] != '/')) {
! 					if ((x = strrchr(url, '/')))
  						*x = '\0';
  					asprintf (&server_url, "%s/%s", server_url, url);

Index: check_ide-smart.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ide-smart.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** check_ide-smart.c	3 Aug 2003 06:03:31 -0000	1.3
--- check_ide-smart.c	22 Aug 2003 06:22:37 -0000	1.4
***************
*** 397,400 ****
--- 397,404 ----
  	};
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	while (1) {
  		

Index: check_ldap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** check_ldap.c	10 Aug 2003 06:53:21 -0000	1.13
--- check_ldap.c	22 Aug 2003 06:22:37 -0000	1.14
***************
*** 65,68 ****
--- 65,72 ----
  	time_t time0, time1;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("check_ldap: could not parse arguments\n"));

Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** check_load.c	10 Aug 2003 06:53:21 -0000	1.11
--- check_load.c	22 Aug 2003 06:22:37 -0000	1.12
***************
*** 72,75 ****
--- 72,79 ----
  	float la1, la5, la15;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage ("failed processing arguments\n");

Index: check_mrtg.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtg.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_mrtg.c	10 Aug 2003 06:53:21 -0000	1.9
--- check_mrtg.c	22 Aug 2003 06:22:38 -0000	1.10
***************
*** 54,57 ****
--- 54,61 ----
  	unsigned long value_rate = 0L;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));

Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** check_mysql.c	10 Aug 2003 06:53:22 -0000	1.11
--- check_mysql.c	22 Aug 2003 06:22:38 -0000	1.12
***************
*** 44,47 ****
--- 44,51 ----
  	char *result = NULL;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));

Index: check_nagios.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nagios.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** check_nagios.c	10 Aug 2003 06:53:22 -0000	1.10
--- check_nagios.c	22 Aug 2003 06:22:38 -0000	1.11
***************
*** 57,60 ****
--- 57,64 ----
  	int pos, cols;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: check_nt.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nt.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_nt.c	10 Aug 2003 06:53:22 -0000	1.17
--- check_nt.c	22 Aug 2003 06:22:38 -0000	1.18
***************
*** 97,100 ****
--- 97,104 ----
  	int upminutes=0;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if(process_arguments(argc,argv)==ERROR)
  		usage(_("Could not parse arguments\n"));

Index: check_nwstat.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nwstat.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** check_nwstat.c	10 Aug 2003 06:53:22 -0000	1.12
--- check_nwstat.c	22 Aug 2003 06:22:38 -0000	1.13
***************
*** 118,121 ****
--- 118,125 ----
  	char uptime[MAX_INPUT_BUFFER];
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments(argc,argv)==ERROR)
  		usage(_("Could not parse arguments\n"));

Index: check_overcr.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_overcr.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_overcr.c	10 Aug 2003 06:53:22 -0000	1.7
--- check_overcr.c	22 Aug 2003 06:22:38 -0000	1.8
***************
*** 80,83 ****
--- 80,87 ----
  	int uptime_minutes = 0;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage ("Could not parse arguments\n");

Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** check_pgsql.c	10 Aug 2003 06:53:22 -0000	1.14
--- check_pgsql.c	22 Aug 2003 06:22:38 -0000	1.15
***************
*** 129,132 ****
--- 129,136 ----
  	pgtty = NULL;      /* debugging tty for the backend server */
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage ("Could not parse arguments");

Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** check_ping.c	18 Aug 2003 11:05:17 -0000	1.23
--- check_ping.c	22 Aug 2003 06:22:38 -0000	1.24
***************
*** 71,74 ****
--- 71,78 ----
  	int i;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	addresses = malloc ((size_t)max_addr);
  

Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** check_procs.c	10 Aug 2003 06:53:22 -0000	1.19
--- check_procs.c	22 Aug 2003 06:22:38 -0000	1.20
***************
*** 104,107 ****
--- 104,111 ----
  	int result = STATE_UNKNOWN;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	asprintf (&metric_name, "PROCS");
  	metric = METRIC_PROCS;

Index: check_radius.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_radius.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_radius.c	10 Aug 2003 06:53:22 -0000	1.8
--- check_radius.c	22 Aug 2003 06:22:38 -0000	1.9
***************
*** 104,107 ****
--- 104,111 ----
  	char *str;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: check_real.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_real.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** check_real.c	10 Aug 2003 06:53:22 -0000	1.11
--- check_real.c	22 Aug 2003 06:22:38 -0000	1.12
***************
*** 62,65 ****
--- 62,69 ----
  	char *status_line = NULL;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));

Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** check_smtp.c	10 Aug 2003 12:48:47 -0000	1.19
--- check_smtp.c	22 Aug 2003 06:22:38 -0000	1.20
***************
*** 67,70 ****
--- 67,74 ----
  	struct timeval tv;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));

Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** check_snmp.c	10 Aug 2003 06:53:22 -0000	1.34
--- check_snmp.c	22 Aug 2003 06:22:38 -0000	1.35
***************
*** 138,141 ****
--- 138,145 ----
  	char *show = NULL;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	labels = malloc (labels_size);
  	unitv = malloc (unitv_size);
***************
*** 444,448 ****
  			if (!is_integer (optarg))
  				usage2 (_("Timeout Interval must be an integer"), optarg);
! 			timeout_interval = atoi (optarg);
  			break;
  
--- 448,453 ----
  			if (!is_integer (optarg))
  				usage2 (_("Timeout Interval must be an integer"), optarg);
! 			else
! 				timeout_interval = atoi (optarg);
  			break;
  

Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** check_ssh.c	10 Aug 2003 06:53:22 -0000	1.12
--- check_ssh.c	22 Aug 2003 06:22:38 -0000	1.13
***************
*** 49,52 ****
--- 49,56 ----
  	int result;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: check_swap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_swap.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** check_swap.c	10 Aug 2003 06:53:22 -0000	1.17
--- check_swap.c	22 Aug 2003 06:22:38 -0000	1.18
***************
*** 72,75 ****
--- 72,79 ----
  	char *status;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	status = strdup("");
  
***************
*** 206,211 ****
  {
  	int c = 0;  /* option character */
- 	int wc = 0; /* warning counter  */
- 	int cc = 0; /* critical counter */
  
  	int option = 0;
--- 210,213 ----
***************
*** 230,234 ****
  
  		switch (c) {
! 		case 'w':									/* warning time threshold */
  			if (is_intnonneg (optarg)) {
  				warn_size = atoi (optarg);
--- 232,236 ----
  
  		switch (c) {
! 		case 'w':									/* warning size threshold */
  			if (is_intnonneg (optarg)) {
  				warn_size = atoi (optarg);
***************
*** 247,251 ****
  				usage (_("Warning threshold must be integer or percentage!\n"));
  			}
! 		case 'c':									/* critical time threshold */
  			if (is_intnonneg (optarg)) {
  				crit_size = atoi (optarg);
--- 249,253 ----
  				usage (_("Warning threshold must be integer or percentage!\n"));
  			}
! 		case 'c':									/* critical size threshold */
  			if (is_intnonneg (optarg)) {
  				crit_size = atoi (optarg);

Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** check_tcp.c	10 Aug 2003 06:53:22 -0000	1.35
--- check_tcp.c	22 Aug 2003 06:22:38 -0000	1.36
***************
*** 17,22 ****
  *****************************************************************************/
  
! /* progname changes depending on symlink called */
! char *progname = "check_tcp";
  const char *revision = "$Revision$";
  const char *copyright = "1999-2003";
--- 17,22 ----
  *****************************************************************************/
  
! /* progname "check_tcp" changes depending on symlink called */
! char *progname;
  const char *revision = "$Revision$";
  const char *copyright = "1999-2003";
***************
*** 199,202 ****
--- 199,203 ----
  	}
  	else {
+ 		progname = strdup ("check_tcp");
  		usage (_("ERROR: Generic check_tcp called with unknown service\n"));
  	}
***************
*** 593,596 ****
--- 594,598 ----
  	print_revision (progname, revision);
  
+ 	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
  	printf (_(COPYRIGHT), copyright, email);
  

Index: check_time.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_time.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** check_time.c	20 Aug 2003 09:54:12 -0000	1.10
--- check_time.c	22 Aug 2003 06:22:38 -0000	1.11
***************
*** 56,59 ****
--- 56,63 ----
  	int result;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) != OK)
  		usage (_("Invalid command arguments supplied\n"));

Index: check_udp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** check_udp.c	10 Aug 2003 06:53:22 -0000	1.11
--- check_udp.c	22 Aug 2003 06:22:38 -0000	1.12
***************
*** 46,49 ****
--- 46,53 ----
  	char recv_buffer[MAX_INPUT_BUFFER];
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage ("\n");

Index: check_ups.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ups.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** check_ups.c	10 Aug 2003 06:53:22 -0000	1.10
--- check_ups.c	22 Aug 2003 06:22:38 -0000	1.11
***************
*** 80,85 ****
  	char *message;
  	char temp_buffer[MAX_INPUT_BUFFER];
- 
  	double ups_utility_deviation = 0.0;
  	ups_status = strdup ("N/A");
  
--- 80,89 ----
  	char *message;
  	char temp_buffer[MAX_INPUT_BUFFER];
  	double ups_utility_deviation = 0.0;
+ 
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	ups_status = strdup ("N/A");
  

Index: check_users.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_users.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_users.c	10 Aug 2003 06:53:22 -0000	1.8
--- check_users.c	22 Aug 2003 06:22:38 -0000	1.9
***************
*** 42,45 ****
--- 42,49 ----
  	char input_buffer[MAX_INPUT_BUFFER];
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: negate.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/negate.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** negate.c	10 Aug 2003 06:53:22 -0000	1.12
--- negate.c	22 Aug 2003 06:22:38 -0000	1.13
***************
*** 76,79 ****
--- 76,83 ----
  	char *buf;
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	if (process_arguments (argc, argv) == ERROR)
  		usage (_("Could not parse arguments\n"));

Index: urlize.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/urlize.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** urlize.c	10 Aug 2003 06:53:22 -0000	1.8
--- urlize.c	22 Aug 2003 06:22:38 -0000	1.9
***************
*** 46,49 ****
--- 46,53 ----
  	};
  
+ 	setlocale (LC_ALL, "");
+ 	bindtextdomain (PACKAGE, LOCALEDIR);
+ 	textdomain (PACKAGE);
+ 
  	while (1) {
  		c = getopt_long (argc, argv, "+hVu:", longopts, &option);





More information about the Commits mailing list