Blob Blame History Raw
From 70686e8d2b400a804277ba0cdc664e71dd393dd5 Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Fri, 5 Dec 2014 12:12:19 +0200
Subject: [PATCH 1/3] rad_counter: Use heredoc for help message

Use Perl's here document syntax for rad_counter's help message and
replace tab escape sequences with spaces to make the source more
readable and easier to modify.
---
 src/modules/rlm_counter/rad_counter | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/modules/rlm_counter/rad_counter b/src/modules/rlm_counter/rad_counter
index be0a33a..b6c1159 100755
--- a/src/modules/rlm_counter/rad_counter
+++ b/src/modules/rlm_counter/rad_counter
@@ -19,15 +19,18 @@ my $help = 0;
 $filename = '';
 
 sub show_help {
-    print "Usage: $0 --file=<counter filename> [--reset=<seconds>] [--match=<regexp>]\n";
-    print "[--user=<username>] [--help] [--hours|--minutes|--seconds]\n\n";
-    print "--user=<username>", "\t\t", "Information for specific user\n";
-    print "--file=<filename>", "\t\t", "Counter db filename\n";
-    print "--match=<regexp>", "\t\t", "Information for matching users\n";
-    print "--reset=<number>", "\t\t", "Reset counter to <number>.\n";
-    print "\t\t\t\t", "If divisor is set use it, else <number> means seconds\n";
-    print "--help", "\t\t\t\t", "Show this help screen\n";
-    print "--(hours|minutes|seconds)", "\t", "Specify information divisor\n";
+    print <<"EOF";
+Usage: $0 --file=<counter filename> [--reset=<seconds>] [--match=<regexp>]
+[--user=<username>] [--help] [--hours|--minutes|--seconds]
+
+--user=<username>               Information for specific user
+--file=<filename>               Counter db filename
+--match=<regexp>                Information for matching users
+--reset=<number>                Reset counter to <number>.
+                                If divisor is set use it, else <number> means seconds
+--help                          Show this help screen
+--(hours|minutes|seconds)       Specify information divisor
+EOF
     exit 0;
 }
 
-- 
2.1.3