Commit c97f7e7c authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


include/my_global.h:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqladmin.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
scripts/mysqlbug.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
Makefile.am:
  manual merge
mysql-test/t/trigger.test:
  manual merge
strings/ctype-extra.c:
  manual merge
parents e9f6b353 50361d9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# Copyright (C) 2002, 2004-2005 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
+1 −2
Original line number Diff line number Diff line
@@ -177,8 +177,7 @@ check_cpu () {
  touch __test.c

  while [ "$cpu_arg" ] ; do
    # FIXME: echo -n isn't portable - see contortions autoconf goes through
    echo -n testing $cpu_arg "... " >&2
    printf "testing $cpu_arg ... " >&2
          
    # compile check
    check_cpu_cflags=`eval echo $check_cpu_args`
+15 −0
Original line number Diff line number Diff line
# Copyright (C) 2006 MySQL AB
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

PROJECT(MySql)

# This reads user configuration, generated by configure.js.
+1 −1
Original line number Diff line number Diff line
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# Copyright (C) 2000-2006 MySQL AB
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

Docs/Support/colspec-fix.pl

deleted100755 → 0
+0 −78
Original line number Diff line number Diff line
#!/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";
}
Loading