aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-17 17:37:47 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-17 17:37:47 +0000
commit983e225fca9ff72b2251fc3616ad95ecc2c63088 (patch)
tree9e0f7e31bb1efe0c6963d9678e604ec9c43fc145
parent2988d6c210eb062e9c0355e16041da8912d101c6 (diff)
downloadbusybox-w32-983e225fca9ff72b2251fc3616ad95ecc2c63088.tar.gz
busybox-w32-983e225fca9ff72b2251fc3616ad95ecc2c63088.tar.bz2
busybox-w32-983e225fca9ff72b2251fc3616ad95ecc2c63088.zip
Added some help messages.
git-svn-id: svn://busybox.net/trunk/busybox@2359 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rwxr-xr-xexamples/mk2knr.pl10
-rwxr-xr-xscripts/mk2knr.pl10
2 files changed, 18 insertions, 2 deletions
diff --git a/examples/mk2knr.pl b/examples/mk2knr.pl
index 29f94a188..aaf4963b1 100755
--- a/examples/mk2knr.pl
+++ b/examples/mk2knr.pl
@@ -19,6 +19,8 @@ $convertme = 'convertme.pl';
19$convert = 0; 19$convert = 0;
20%converted = (); 20%converted = ();
21 21
22# if no files were specified, print usage
23die "usage: $0 file.c | file.h\n" if scalar(@ARGV) == 0;
22 24
23# prepare the "convert me" file 25# prepare the "convert me" file
24open(CM, ">$convertme") or die "convertme.pl $!"; 26open(CM, ">$convertme") or die "convertme.pl $!";
@@ -29,7 +31,7 @@ while (<>) {
29 31
30 # if the line says "getopt" in it anywhere, we don't want to muck with it 32 # if the line says "getopt" in it anywhere, we don't want to muck with it
31 # because option lists tend to include strings like "cxtzvOf:" which get 33 # because option lists tend to include strings like "cxtzvOf:" which get
32 # matched by the javaStyle / Hungarian and PascalStyle regexps below 34 # matched by the "check for mixed case" regexps below
33 next if /getopt/; 35 next if /getopt/;
34 36
35 # tokenize the string into just the variables 37 # tokenize the string into just the variables
@@ -45,6 +47,9 @@ while (<>) {
45 # this checks for PascalStyle 47 # this checks for PascalStyle
46 $convert++ if ($var =~ /^[A-Z][a-z]+[A-Z][a-z]+/); 48 $convert++ if ($var =~ /^[A-Z][a-z]+[A-Z][a-z]+/);
47 49
50 # if we want to add more checks, we can add 'em here, but the above
51 # checks catch "just enough" and not too much, so prolly not.
52
48 if ($convert) { 53 if ($convert) {
49 $convert = 0; 54 $convert = 0;
50 55
@@ -74,3 +79,6 @@ while (<>) {
74close(CM); 79close(CM);
75chmod 0755, $convertme; 80chmod 0755, $convertme;
76 81
82# print a helpful help message
83print "Done. Scheduled name changes are in $convertme.\n";
84print "Please review/modify it and then type ./$convertme to do the search & replace.\n";
diff --git a/scripts/mk2knr.pl b/scripts/mk2knr.pl
index 29f94a188..aaf4963b1 100755
--- a/scripts/mk2knr.pl
+++ b/scripts/mk2knr.pl
@@ -19,6 +19,8 @@ $convertme = 'convertme.pl';
19$convert = 0; 19$convert = 0;
20%converted = (); 20%converted = ();
21 21
22# if no files were specified, print usage
23die "usage: $0 file.c | file.h\n" if scalar(@ARGV) == 0;
22 24
23# prepare the "convert me" file 25# prepare the "convert me" file
24open(CM, ">$convertme") or die "convertme.pl $!"; 26open(CM, ">$convertme") or die "convertme.pl $!";
@@ -29,7 +31,7 @@ while (<>) {
29 31
30 # if the line says "getopt" in it anywhere, we don't want to muck with it 32 # if the line says "getopt" in it anywhere, we don't want to muck with it
31 # because option lists tend to include strings like "cxtzvOf:" which get 33 # because option lists tend to include strings like "cxtzvOf:" which get
32 # matched by the javaStyle / Hungarian and PascalStyle regexps below 34 # matched by the "check for mixed case" regexps below
33 next if /getopt/; 35 next if /getopt/;
34 36
35 # tokenize the string into just the variables 37 # tokenize the string into just the variables
@@ -45,6 +47,9 @@ while (<>) {
45 # this checks for PascalStyle 47 # this checks for PascalStyle
46 $convert++ if ($var =~ /^[A-Z][a-z]+[A-Z][a-z]+/); 48 $convert++ if ($var =~ /^[A-Z][a-z]+[A-Z][a-z]+/);
47 49
50 # if we want to add more checks, we can add 'em here, but the above
51 # checks catch "just enough" and not too much, so prolly not.
52
48 if ($convert) { 53 if ($convert) {
49 $convert = 0; 54 $convert = 0;
50 55
@@ -74,3 +79,6 @@ while (<>) {
74close(CM); 79close(CM);
75chmod 0755, $convertme; 80chmod 0755, $convertme;
76 81
82# print a helpful help message
83print "Done. Scheduled name changes are in $convertme.\n";
84print "Please review/modify it and then type ./$convertme to do the search & replace.\n";