aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2006-04-02 18:45:41 +0000
committerschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2006-04-02 18:45:41 +0000
commit05a2536e0caef7617dedd3c9eaad4ae5429b131f (patch)
treed3e5fe1f78c9c19bd0cec1e9c596cdb63ce1c03b /src/util
parent2df022fc2ab9a209faea4e0d223c40d66c0272b1 (diff)
Correct errors in helper programmes.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@73 83718e91-0e4f-0410-abf4-91180603181f
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/makeblob.pl41
-rwxr-xr-xsrc/util/makemetablob.pl18
2 files changed, 27 insertions, 32 deletions
diff --git a/src/util/makeblob.pl b/src/util/makeblob.pl
index 11f5aa6..6407537 100755
--- a/src/util/makeblob.pl
+++ b/src/util/makeblob.pl
@@ -6,14 +6,11 @@ use strict;
my $items_per_line = 16;
my $items_per_file = 1024 * 1024;
-$#ARGV == 2 or die;
+$#ARGV == 1 or die;
my $arrangement = $ARGV[0];
-$arrangement ne '' or die;
my $thorn = $ARGV[1];
$thorn ne '' or die;
-my $output = $ARGV[2];
-$output ne '' or die;
print <<EOF;
/* This is an auto-generated file -- do not edit */
@@ -46,8 +43,8 @@ EOF
my $done = 0;
for (my $fcount = 0; ! $done; ++ $fcount)
{
- printf ("\n");
- printf ("static unsigned char const data_%04d [] = {", $fcount);
+ printf "\n";
+ printf "static unsigned char const data_%04d [] = {", $fcount;
my $count;
for ($count = 0; $count < $items_per_file; ++ $count)
{
@@ -59,35 +56,33 @@ for (my $fcount = 0; ! $done; ++ $fcount)
}
if ($count != 0)
{
- printf (",");
+ printf ",";
}
if ($count % $items_per_line == 0)
{
- printf ("\n");
- printf (" ");
+ printf "\n";
+ printf " ";
}
- printf ("%3d", ord $ch);
+ printf "%3d", ord $ch;
}
- printf ("\n");
- printf ("};\n");
- printf ("\n");
+ printf "\n";
+ printf "};\n";
+ printf "\n";
if (! $done)
{
- printf ("struct datainfo const cactus_data_%04d_%s;\n",
- $fcount + 1, $thorn);
+ printf "struct datainfo const cactus_data_%04d_%s;\n", $fcount + 1, $thorn;
}
- printf ("struct datainfo const cactus_data_%04d_%s =\n",
- $fcount, $thorn);
- printf ("{\n");
- printf (" data_%04d,\n", $fcount);
- printf (" %dUL,\n", $count);
+ printf "struct datainfo const cactus_data_%04d_%s =\n", $fcount, $thorn;
+ printf "{\n";
+ printf " data_%04d,\n", $fcount;
+ printf " %dUL,\n", $count;
if (! $done)
{
- printf (" & cactus_data_%04d_%s\n", $fcount + 1, $thorn);
+ printf " & cactus_data_%04d_%s\n", $fcount + 1, $thorn;
}
else
{
- printf (" NULL\n");
+ printf " NULL\n";
}
- printf ("};\n");
+ printf "};\n";
}
diff --git a/src/util/makemetablob.pl b/src/util/makemetablob.pl
index 49ffcde..2f11a75 100755
--- a/src/util/makemetablob.pl
+++ b/src/util/makemetablob.pl
@@ -26,19 +26,19 @@ EOF
for (my $count = 0; $count <= $#ARGV; ++ $count)
{
- printf ("extern struct sourceinfo cactus_source_%s;\n", $ARGV[$count]);
+ printf "extern struct sourceinfo cactus_source_%s;\n", $ARGV[$count];
}
-printf ("\n");
-printf ("struct sourceinfo const * const cactus_source [] = {");
+printf "\n";
+printf "struct sourceinfo const * const cactus_source [] = {";
for (my $count = 0; $count <= $#ARGV; ++ $count)
{
if ($count != 0)
{
- printf (",");
+ printf ",";
}
- printf ("\n");
- printf (" & cactus_source_%s", $ARGV[$count]);
+ printf "\n";
+ printf " & cactus_source_%s", $ARGV[$count];
}
-printf ("\n");
-printf ("};\n");
-printf ("size_t const cactus_source_length = %d;\n", $#ARGV + 1);
+printf "\n";
+printf "};\n";
+printf "size_t const cactus_source_length = %d;\n", $#ARGV + 1;