diff options
author | kent@mysql.com/kent-amd64.(none) <> | 2006-12-31 01:02:27 +0100 |
---|---|---|
committer | kent@mysql.com/kent-amd64.(none) <> | 2006-12-31 01:02:27 +0100 |
commit | 6523aca7291d55b7fcb7668610a6fb0c752a3770 (patch) | |
tree | 7b220f39f60a4a00409eee49ae6349e8255a4bff /Docs/Support/colspec-fix.pl | |
parent | 226a5c833f3084bc634996c70d47a1c0d9164e0d (diff) | |
download | mariadb-git-6523aca7291d55b7fcb7668610a6fb0c752a3770.tar.gz |
my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
Don't update the files from BitKeeper
Many files:
Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
Adjusted year(s) in copyright header
Many files:
Added GPL copyright text
Removed files:
Docs/Support/colspec-fix.pl
Docs/Support/docbook-fixup.pl
Docs/Support/docbook-prefix.pl
Docs/Support/docbook-split
Docs/Support/make-docbook
Docs/Support/make-makefile
Docs/Support/test-make-manual
Docs/Support/test-make-manual-de
Docs/Support/xwf
Diffstat (limited to 'Docs/Support/colspec-fix.pl')
-rwxr-xr-x | Docs/Support/colspec-fix.pl | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/Docs/Support/colspec-fix.pl b/Docs/Support/colspec-fix.pl deleted file mode 100755 index 6c64edd1441..00000000000 --- a/Docs/Support/colspec-fix.pl +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/perl -w - -# -# Script to rewrite colspecs from relative values to absolute values -# - -# arjen 2002-03-14 append "cm" specifier to colwidth field. - -use strict; - -my $table_width = 12.75; # Specify the max width of the table in cm -my $gutter_width = 0.55; # Specify the width of the gutters in cm - -my $str = join '', <>; # Push stdin (or file) - -$str =~ s{([\t ]*(<colspec colwidth=\".+?\" />\s*)+)} - {&rel2abs($1)}ges; - -print STDOUT $str; -exit; - -# -# Definitions for helper sub-routines -# - -sub msg { - print STDERR shift, "\n"; -} - -sub rel2abs { - my $str = shift; - my $colnum = 1; - - my @widths = (); - my $total = 0; - my $output = ''; - - my $gutters; - my $content_width; - my $total_width; - my @num_cache; - - $str =~ /^(\s+)/; - my $ws = $1; - - while ($str =~ m/<colspec colwidth="(\d+)\*" \/>/g) { - $total += $1; - push @widths, $1; - } - - msg("!!! WARNING: Total Percent > 100%: $total%") if $total > 100; - - if (! $total) { - die 'Something bad has happened - the script believes that there are no columns'; - } - - $gutters = $#widths * $gutter_width; - $content_width = $table_width - $gutters; - # Don't forget that $#... is the last offset not the count - - foreach (@widths) { - my $temp = sprintf ("%0.2f", $_/100 * $content_width); - $total_width += $temp; - - if ($total_width > $content_width) { - $temp -= $total_width - $content_width; - msg("!!! WARNING: Column width reduced from " . - ($temp + ($total_width - $content_width)) . " to $temp !!!"); - $total_width -= $total_width - $content_width; - } - - $output .= $ws . '<colspec colnum="'. $colnum .'" colwidth="'. $temp .'cm" />' . "\n"; - ++$colnum; - push @num_cache, $temp; - } - - return $output . "\n$ws"; -} |