SVN: nagios-notify/trunk/nagios-notify

glen glen at pld-linux.org
Sat Oct 11 21:39:17 CEST 2008


Author: glen
Date: Sat Oct 11 21:39:17 2008
New Revision: 9903

Modified:
   nagios-notify/trunk/nagios-notify
Log:
- local vars for functions

Modified: nagios-notify/trunk/nagios-notify
==============================================================================
--- nagios-notify/trunk/nagios-notify	(original)
+++ nagios-notify/trunk/nagios-notify	Sat Oct 11 21:39:17 2008
@@ -17,7 +17,7 @@
 	local tmpl="$1"
 	awk '
 	# escape string for shell arg
-	function escape_shell_arg(string) {
+	function escape_shell_arg(string,   q, qq, s) {
 		q = sprintf("%c", 39);
 		qq = "\"";
 		s = q qq q qq q;
@@ -26,7 +26,7 @@
 	}
 
 	# base64 encode a file
-	function base64(file) {
+	function base64(file,   cmd, out) {
 		cmd = "base64 " file;
 		out = ""
 		while ((cmd | getline) > 0) {
@@ -37,7 +37,7 @@
 	}
 
 	# base64 encode a string
-	function base64_string(data) {
+	function base64_string(data,   cmd, out) {
 		# if i knew how to make two way pipes, i would do that here
 		cmd = "echo -n " escape_shell_arg(data) " | base64";
 		out = ""
@@ -54,7 +54,7 @@
 	}
 
 	# urlencode
-	function urlencode(data) {
+	function urlencode(data,   hextab, i, n, res, c, lo, hi) {
 		split("1 2 3 4 5 6 7 8 9 a b c d e f", hextab, " ")
 		hextab[0] = 0
 		for (i = 1; i <= 255; i++) {


More information about the pld-cvs-commit mailing list