gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 6c40fe14ed58e2217b17


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 6c40fe14ed58e2217b17a1e6ab05e64869f530e9
Date: Thu, 07 Oct 2010 12:18:26 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  6c40fe14ed58e2217b17a1e6ab05e64869f530e9 (commit)
       via  d6a1e379b950a57fbc934a83a7c6832a4f109049 (commit)
      from  be73e7767c044651bf38023505df175e8c02404b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=6c40fe14ed58e2217b17a1e6ab05e64869f530e9


commit 6c40fe14ed58e2217b17a1e6ab05e64869f530e9
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Oct 7 14:16:47 2010 +0200

    Remove unused perl scripts.

diff --git a/devtools/lib/Gnash/Distribution.pm 
b/devtools/lib/Gnash/Distribution.pm
deleted file mode 100644
index f707eb1..0000000
--- a/devtools/lib/Gnash/Distribution.pm
+++ /dev/null
@@ -1,307 +0,0 @@
-package Gnash::Distribution;
-
-use strict;
-use warnings;
-
-use Data::Dumper;
-use File::Spec;
-use FindBin qw/$Bin/;
-use File::Find;
-
-my $dist;
-
-sub new {
-    my $class = shift;
-
-    return $dist if defined $dist;
-    my $self = bless {}, $class;
-    return $self->_initialize(@_);
-}
-
-{
-    no warnings 'File::Find';
-    my @found_files;
-    sub _initialize {
-        my $self = shift;
-
-        my $dist = $_[0] || $Bin.'/../..';
-        $self->{_distribution_root} = $dist; 
-        _croak(undef, 
-          "Failed to find distribution root; did you move the test directory?"
-        ) unless (-d $dist);
-
-        find(\&_search_for_files, $dist);
-        if( defined $dist ) {
-            $self->_dist_files( [
-                @found_files
-            ] );
-        }
-
-        return $self;
-   }
-
-   sub _search_for_files {
-       ## Get only files, which are not in the CVS directory or otherwise
-       ## related to CVS/subversion.  Prune might make this more efficient.
-       return unless (-f $_);
-       return if ($File::Find::name =~ m|/CVS/| || 
-                  $File::Find::name =~ m|/\.svn/| ||
-                  $File::Find::name =~ m|\.svnignore/| ||
-                  $File::Find::name =~ m|/\.cvsignore/|);
-
-       push @found_files, $File::Find::name;
-   }
-
-}
-
-sub distribution_root {
-    my $self = shift;
-    return $self->{_distribution_root};
-}
-
-sub _croak {
-    my( $self, @message ) = @_;
-    require Carp;
-    Carp::croak(@message);
-}
-
-BEGIN {
-    my @getter_setters = qw{ _dist_files };
-
-    for my $method ( @getter_setters ) {
-        no strict 'refs';
-
-        *$method = sub {
-            my $self = shift;
-            unless (@_) {
-                $self->{$method} ||= [];
-                return wantarray
-                    ? @{ $self->{$method} }
-                    : $self->{$method};
-            }
-            $self->{$method} = shift;
-            return $self;
-        };
-    }
-}
-
-
-BEGIN {
-    my %file_class = (
-        source => {
-            cpp    => { file_exts => ['cpp', 'cc'] },
-            m4     => { file_exts => ['m4'] },
-        },
-        header => {
-            cpp    => { file_exts => ['h'] },
-        },
-    );
-
-    ## Some of this can probably be cropped out, since we're ignoring dirs
-    my @ignore_dirs = qw{ .svn CVS };
-
-    for my $class ( keys %file_class ) {
-        for my $type ( keys %{ $file_class{$class} } ) {
-            no strict 'refs';
-
-            my @exts       = @{ $file_class{$class}{$type}{file_exts} };
-            my @exceptions = defined $file_class{$class}{$type}{except_dirs}
-                ? @{ $file_class{$class}{$type}{except_dirs} }
-                : ();
-            my $method     = join '_' => $type, $class;
-            my $filter_ext = join '|' => map { "\\.${_}\$" } @exts;
-            my $filter_dir = join '|' =>
-                map { qr{\b$_\b} }
-                map { quotemeta($_) }
-                @ignore_dirs,
-                @exceptions;
-
-            next unless $method;
-
-            *{ $method . '_file_directories' } = sub {
-                my $self = shift;
-
-                # Look through the distribution files for
-                # file endings in the proper extensions and make
-                # a hash out of the directories.
-                my %dirs =
-                    map { ( ( File::Spec->splitpath($_) )[1] => 1 ) }
-                    grep { m|(?i)(?:$filter_ext)| }
-                    $self->_dist_files;
-
-                # Filter out ignored directories
-                # and return the results
-                return
-                    sort
-                    grep {
-                      -d File::Spec->catdir($_) and File::Spec->catdir($_)
-                    } grep { !m|(?:$filter_dir)|
-                    } keys %dirs;
-            };
-
-
-            *{ $method . '_files' } = sub {
-                my( $self ) = @_;
-
-                # Look through the filelist
-                # for files ending in the proper extension(s)
-                # and return a sorted list of filenames
-                return
-                    sort
-                    grep { m|(?i)(?:$filter_ext)| }
-                    $self->_dist_files;
-            };
-        }
-    }
-}
-
-
-sub get_m4_language_files {
-    my $self = shift;
-
-    my @files = (
-        $self->m4_source_files,
-    );
-
-    my @m4_language_files = ();
-    foreach my $file ( @files ) {
-        next if $self->is_m4_exemption($file);
-        push @m4_language_files, $file;
-    }
-
-    return @m4_language_files;
-}
-
-{
-    my @exemptions;
-
-    sub is_m4_exemption {
-        my( $self, $file ) = @_;
-
-        push @exemptions => map { File::Spec->canonpath($_) } qw{
-        } unless @exemptions;
-
-        $file->path =~ /\Q$_\E$/ && return 1
-            for @exemptions;
-        return;
-    }
-}
-
-sub get_cpp_language_files {
-    my $self = shift;
-
-    my @files = (
-        $self->cpp_source_files,
-        $self->cpp_header_files,
-    );
-
-    my @cpp_language_files = ();
-    foreach my $file ( @files ) {
-        next if $self->is_cpp_exemption($file);
-        push @cpp_language_files, $file;
-    }
-
-    return @cpp_language_files;
-}
-
-
-{
-    my @exemptions;
-
-    sub is_cpp_exemption {
-        my( $self, $file ) = @_;
-
-        push @exemptions => map { File::Spec->canonpath($_) } qw{
-        } unless @exemptions;
-
-        $file->path =~ /\Q$_\E$/ && return 1
-            for @exemptions;
-        return;
-    }
-}
-
-
-1;
-
-=pod
-
-=head1 NAME
-
-Gnash::Distribution - Get information about files in the Gnash distribution
-
-=head1 SYNOPSIS
-
-    use Gnash::Distribution;
-
-    my $dist = Gnash::Distribution->new();
-    my @cpp = $dist->get_cpp_language_files();  ## Get all C++ files
-
-=head1 DESCRIPTION
-
-This module can generate a list of all files found in your checkout of
-the Gnash distribution.  Particular categories of files can then be
-requested.
-
-In order to find files, it works on the assumption that it will be used
-by files in the directory devtools/testsuite, which will be located within
-the Gnash top-level checkout directory.  You may also explicitly specify
-a distribution root at construction.
-
-=head1 METHODS
-
-=over 4
-
-=item new([DISTRIBUTION_ROOT])
-
-The constructor will search the file system as described above, then
-create a list of all files in the top-level checkout directory or in
-nested directories.  It will throw an exception if the distribution
-root is not found.
-
-You may optionally supply your own distribution root, using a full
-path.
-
-=item distribution_root()
-
-Returns the full path of the directory this library considers to be
-your distribution root.  All files under that directory will be 
-considered for inclusion in the lists returned by the next two methods.
-
-Use this method if you want to ensure that you are operating on the
-correct directory (for example if you are writing a one-off script).
-
-=item get_cpp_language_files()
-
-This method will return an array containing all C++ files, which includes
-files ending with the following extensions: .h, .cc, and .cpp.
-
-=item get_m4_language_files()
-
-This method returns an array containing all files ending with the .m4
-extension.
-
-=back
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden> and Jerry Gay, based upon ideas from the Parrot
-L<http://http://dev.perl.org/perl6/> test suite.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
diff --git a/devtools/lib/Gnash/Utils.pm b/devtools/lib/Gnash/Utils.pm
deleted file mode 100644
index 022ba6a..0000000
--- a/devtools/lib/Gnash/Utils.pm
+++ /dev/null
@@ -1,148 +0,0 @@
-package Gnash::Utils;
-
-use strict;
-use warnings;
-use Regexp::Common qw/comment delimited/;
-
-use Exporter 'import';
-our @EXPORT_OK = qw/
-    clean 
-    clean_cpp_comment 
-    clean_c_comment 
-    clean_single_quoted_string 
-    clean_double_quoted_string
-/;
-
-sub clean {
-    return 
-      clean_cpp_comment(
-        clean_c_comment(
-          clean_quoted_string(
-            $_[0]
-          )
-        )
-      );
-}
-
-sub clean_cpp_comment {
-    my $string = shift;
-    while ($string =~ /$RE{comment}{'C++'}{-keep}/) {
-        my $matched = $1;
-        (my $newlines = $matched) =~ s/[^\n]//;
-        $string =~ s/$RE{comment}{'C++'}/$newlines/;
-    }
-    return $string;
-}
-
-sub clean_c_comment {
-    my $string = shift;
-    while ($string =~ /$RE{comment}{C}{-keep}/) {
-        my $matched = $1;
-        (my $newlines = $matched) =~ s/[^\n]//;
-        $string =~ s/$RE{comment}{C}/$newlines/;
-    }
-    return $string;
-}
-
-sub clean_quoted_string {
-    my $string = shift;
- 
-    while ($string =~ /$RE{delimited}{-delim=>q{"'}}{-keep}/) {
-        my $matched = $1;
-        (my $newlines = $matched) =~ s/[^\n]//;
-        $string =~ s/$RE{delimited}{-delim=>q{"'}}/$newlines/;
-    }
-    return $string;
-}
-
-
-1;
-
-=pod
-
-=head1 NAME
-
-Gnash::Utils - Utility functions for the coding standards test suite.
-
-=head1 SYNOPSIS
-
-    use Gnash::Utils qw/clean/;
- 
-    clean($source_code);
-
-=head1 DESCRIPTION
-
-It is easier to run tests which check code quality if the code doesn't
-contain comments or quoted strings.  This module provides some functions
-to remove these distractions from the source code. 
-
-=head1 FUNCTIONS
-
-All functions may be optionally imported.
-
-=over 4
-
-=item clean($source)
-
-This function calls C<clean_quoted_string>, 
-C<clean_c_comment>, and C<clean_cpp_comment>
-and returns a string.  It expects to receive the entire contents of a source
-file.
-
-=item clean_cpp_comment($source)
-
-This routine removes comments which begin with C<//>.  It can operate on
-an entire file or on just a single line of source code.  It returns the
-modified input as a string.  For instance,
-    return 1; // return true
-
-becomes:
-    return 1;
-
-=item clean_c_comment($source)
-
-This function removes comments of the C</* ... */> style.  It expects
-to receive the entire source code and will return the modified code as a
-string.  For example,
-    /* This is a
-       comment */
-    return 1;
-
-becomes:
-    return 1;
-
-=item clean_quoted_string($source)
-
-This routine will remove quoted strings.  It expects to receive the
-entire source code and will return the modified code as a string.  For
-instance,
-    return 'hello world';
-
-becomes
-    return ;
-
-=back
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden>
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
-
diff --git a/devtools/testsuite/c_casts.t b/devtools/testsuite/c_casts.t
deleted file mode 100755
index e3fc5d7..0000000
--- a/devtools/testsuite/c_casts.t
+++ /dev/null
@@ -1,112 +0,0 @@
-#! perl
-
-use strict;
-use warnings;
-
-use FindBin qw/$Bin/;
-use lib $Bin.'/../lib';
-use Test::More tests => 1;
-use Gnash::Distribution;
-use Gnash::Utils qw/clean/;
-
-my $DIST = Gnash::Distribution->new;
-
-## Jerry Gay explained that this construction was needed because Windows
-## does not get @ARGV the same way as most systems.
-my @files = @ARGV 
-    ? ( $^O eq 'MSwin32' ? <@ARGV> : @ARGV )
-    : $DIST->get_cpp_language_files();
-
-my @var_types = qw/int bool char long double/; 
-my @failures;  
-
-foreach my $path (@files) {
-    open my $fh, '<', $path
-        or die "Cannot open '$path' for reading: $!\n";
-
-    my $prefix = qq<  $path line(s):>;
-    my $message = '';
-
-    ## Read in the entire file, as some of the cleaning spans lines
-    local $/ = undef;
-    my $entire_file = clean(<$fh>);
-    my @lines = split /\n/, $entire_file;    
-
-    ## We need the array index to report the correct line number.
-    LINE: foreach my $i (0..$#lines) {
-        my $string = $lines[$i];
-
-        ## Look for C-style pointer for each builtin data type.  This
-        ## will not check for user-defined types, but it prevents false
-        ## positives such as functions.
-        my $errmark = 0;
-        TYPE: foreach my $type (@var_types) {
-            ## Skip unless a cast of type 'int num = (int*) x;' is found.
-            $errmark = 1, last TYPE if ( $string =~ /=\s*\($type\*?\)\s*\w+/ );
-
-            ## Skip unless a cast of type 'num = int*(x);' is found
-            $errmark = 1, last TYPE if ( $string =~ /=\s*$type\*?\(\w+\)/ );
-        }
-
-        next LINE unless ($errmark); 
-        $message .= " ".($i+1);
-    }
-    push @failures => "$prefix$message\n" if ($message);
-    close $fh;
-}
-
-ok( !scalar(@failures), "C-style casting" )
-    or diag("C-style casting found in ".scalar @failures." 
files:address@hidden");
-
-=head1 NAME
-
-devtools/testsuite/c_casts.t - checks for C-style casts C++ source and headers
-
-=head1 SYNOPSIS
-
-    # test all files
-    % prove devtools/testsuite/c_casts.t
-
-    # test specific files
-    % perl devtools/testsuite/c_casts.t recently/modified/file
-
-=head1 DESCRIPTION
-
-This test looks for C++ source files which contain C-style casts.  These
-are examples of casting using C-style:
-
-    double x;
-    int num = (int) x
-
-    double x;
-    num = int*(x)
-
-C++ casting style (shown below) provides better diagnoses of usage errors
-and are easier to identify and maintain.
-
-    double x;
-    int num = static_cast<int>(x);
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden>, based upon ideas from the Parrot
-L<http://http://dev.perl.org/perl6/> test suite.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
diff --git a/devtools/testsuite/copyright_notices.t 
b/devtools/testsuite/copyright_notices.t
deleted file mode 100755
index 559d830..0000000
--- a/devtools/testsuite/copyright_notices.t
+++ /dev/null
@@ -1,127 +0,0 @@
-#! perl
-
-use strict;
-use warnings;
-
-use FindBin qw/$Bin/;
-use lib $Bin.'/../lib';
-use Test::More tests => 1;
-use Gnash::Distribution;
-use Gnash::Utils qw/clean/;
-
-my $DIST = Gnash::Distribution->new;
-
-## Jerry Gay explained that this construction was needed because Windows
-## does not get @ARGV the same way as most systems.
-my @files = @ARGV 
-    ? ( $^O eq 'MSwin32' ? <@ARGV> : @ARGV )
-    : $DIST->get_cpp_language_files();
-
-my $year = (localtime())[5] + 1900;
-
-my @failures;
-FILE: foreach my $path (@files) {
-    open my $fh, '<', $path
-        or die "Cannot open '$path' for reading: $!\n";
-
-    ## Read in the entire file, as some of the cleaning spans lines
-    local $/ = undef;
-    my $entire_file = <$fh>;
-    close $fh;
-
-    my @reason;
-
-    ## If there is no copyright notice, skip other checks
-    if ($entire_file !~ m|This program is free software; you can|) {
-        push @failures => "$path:\n\t* Copyright notice is missing.\n";
-        next FILE;
-    }
-
-    ## 'You should have received a copy of the GNU General Public License
-    ## along with the program; see the file COPYING.' should begin a new
-    ## paragraph.
-    if ($entire_file =~ m|details.\s+[*/]+\s+You|s) {
-        push @reason, "* 'You should have received...' does not ".
-          "begin a new paragraph."
-    }
-
-    ## Each file should start with a one-line comment describing it.
-    my ($fn) = $path =~ m|([^/\\]+)$|;
-    if ($entire_file !~ m|^\s*//\s+$fn|is) {
-        push @reason, "* Missing intro comment with filename and description."
-    }
-
-    ## There should be no unusual whitespace before the CVS tag.
-    # TODO (I haven't thought of a good way to check for this)
-
-    ## Copyright notices should include the current year
-    if ($entire_file !~ m|Copyright \(C\)[,\s\d]+$year|is) {
-        push @reason, "* Copyright does not extend to $year.";
-    }
-
-    push @failures => "$path:\n\t". (join "\n\t", @reason) ."\n" if (@reason);
-}
-
-ok( !scalar(@failures), "Incorrect GNU copyright notice" )
-    or diag("Incorrect GNU copyright notice found in ".
-    scalar @failures." files:address@hidden");
-
-=pod
-
-=head1 NAME
-
-devtools/testsuite/copyright_notices.t - look for incorrect copyright notices
-
-=head1 SYNOPSIS
-
-    # test all files
-    % prove devtools/testsuite/copyright_notices.t
-
-    # test specific files
-    % perl devtools/testsuite/copyright_notices.t recently/modified/file
-
-=head1 DESCRIPTION
-
-This test looks for errors in the copyright notices in all C++ files.  
-Specifically, it looks for:
-
-=over 4
-
-=item * That there is a copyright notice
-
-=item * Instances where the line 'You should have received...' does not
-begin a new paragraph
-
-=item * Files which don't begin with a comment which includes the filename
-and a description of the file
-
-=item * Copyright notices which don't include the current year
-
-=back
-
-A test to check for odd whitespace after the copyright notice and before
-the CVS Id tag should be added.
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden>, based upon ideas from the Parrot
-L<http://http://dev.perl.org/perl6/> test suite.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
diff --git a/devtools/testsuite/tabs.t b/devtools/testsuite/tabs.t
deleted file mode 100755
index 027e8a3..0000000
--- a/devtools/testsuite/tabs.t
+++ /dev/null
@@ -1,87 +0,0 @@
-#! perl
-
-use strict;
-use warnings;
-
-use FindBin qw/$Bin/;
-use lib $Bin.'/../lib';
-use Test::More tests => 1;
-use Gnash::Distribution;
-use Gnash::Utils qw/clean/;
-
-my $DIST = Gnash::Distribution->new;
-
-## Jerry Gay explained that this construction was needed because Windows
-## does not get @ARGV the same way as most systems.
-my @files = @ARGV 
-    ? ( $^O eq 'MSwin32' ? <@ARGV> : @ARGV )
-    : $DIST->get_cpp_language_files();
-
-my @failures;  
-
-foreach my $path (@files) {
-    open my $fh, '<', $path
-        or die "Cannot open '$path' for reading: $!\n";
-
-    my $prefix = qq<  $path line(s):>;
-    my $message = '';
-
-    ## Read in the entire file, as some of the cleaning spans lines
-    local $/ = undef;
-    my $entire_file = clean(<$fh>);
-    my @lines = split /\n/, $entire_file;    
-
-    ## We need the array index to report the correct line number.
-    foreach my $i (0..$#lines) {
-        my $string = $lines[$i];
-
-        ## Skip unless some tabs are found.
-        next unless ($string =~ /\t/);
-        $message .= " ".($i+1);
-    }
-    push @failures => "$prefix$message\n" if ($message);
-    close $fh;
-}
-
-ok( !scalar(@failures), "tabs" )
-    or diag( "hard tabs found in ".scalar @failures." files:address@hidden" );
-
-=head1 NAME
-
-devtools/testsuite/tabs.t - checks for tabs in C++ source and headers
-
-=head1 SYNOPSIS
-
-    # test all files
-    % prove devtools/testsuite/tabs.t
-
-    # test specific files
-    % perl devtools/testsuite/tabs.t recently/modified/file
-
-=head1 DESCRIPTION
-
-This test checks for code which contains tabs.
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden>, based upon ideas from the Parrot
-L<http://http://dev.perl.org/perl6/> test suite.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
diff --git a/devtools/testsuite/uncuddled_else.t 
b/devtools/testsuite/uncuddled_else.t
deleted file mode 100755
index a53b215..0000000
--- a/devtools/testsuite/uncuddled_else.t
+++ /dev/null
@@ -1,102 +0,0 @@
-#! perl
-
-use strict;
-use warnings;
-
-use FindBin qw/$Bin/;
-use lib $Bin.'/../lib';
-use Test::More tests => 1;
-use Gnash::Distribution;
-use Gnash::Utils qw/clean/;
-
-my $DIST = Gnash::Distribution->new;
-
-## Jerry Gay explained that this construction was needed because Windows
-## does not get @ARGV the same way as most systems.
-my @files = @ARGV 
-    ? ( $^O eq 'MSwin32' ? <@ARGV> : @ARGV )
-    : $DIST->get_cpp_language_files();
-
-my @failures;  
-
-foreach my $path (@files) {
-    open my $fh, '<', $path
-        or die "Cannot open '$path' for reading: $!\n";
-
-    my $prefix = qq<  $path line(s):>;
-    my $message = '';
-
-    ## Read in the entire file, as some of the cleaning spans lines
-    local $/ = undef;
-    my $entire_file = clean(<$fh>);
-    my @lines = split /\n/, $entire_file;    
-
-    ## We need the array index to report the correct line number.
-    foreach my $i (0..$#lines) {
-        my $string = $lines[$i];
-
-        ## Skip unless we find uncuddled elses.  First look for left-hand
-        ## failures, then right-hand failures.
-        next unless ($string =~ /^\s*else/ || 
-                     $string =~ /^\s*}?\s*else[^{]*$/);
-        $message .= " ".($i+1);
-    }
-    push @failures => "$prefix$message\n" if ($message);
-    close $fh;
-}
-
-ok( !scalar(@failures), "uncuddled else" )
-    or diag( "uncuddled else found in ".scalar @failures." 
files:address@hidden" );
-
-=head1 NAME
-
-devtools/testsuite/uncuddled_else.t - checks for uncuddled elses in C++ source 
and headers
-
-=head1 SYNOPSIS
-
-    # test all files
-    % prove devtools/testsuite/uncuddled_else.t
-
-    # test specific files
-    % perl devtools/testsuite/uncuddled_else.t recently/modified/file
-
-=head1 DESCRIPTION
-
-This test checks for code which contains uncuddled elses.  
-
-These are examples of cuddled elses:
-    } else {
-    } else (blah) {
-
-And these are examples of uncuddled elses, which will make the test fail:
-    } else
-    {
-  
-    }
-    else {
-
-    else return false;
-
-=head1 AUTHORS
-
-Ann Barcomb <address@hidden>, based upon ideas from the Parrot
-L<http://http://dev.perl.org/perl6/> test suite.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut
diff --git a/doc/C/actionscript.xml b/doc/C/actionscript.xml
index a91f600..46d33c8 100644
--- a/doc/C/actionscript.xml
+++ b/doc/C/actionscript.xml
@@ -10,7 +10,6 @@
   <!ENTITY appname "Gnash">
   <!ENTITY actionscript "ActionScript">
   <!ENTITY fn_call "<emphasis>fn_call</emphasis>">
-  <!ENTITY gen_asclass "<emphasis>gen-asclass.sh</emphasis>">
   <!ENTITY version "0.8.8">
 
   <!ENTITY main SYSTEM "actionscript/main.xml">

http://git.savannah.gnu.org/cgit//commit/?id=d6a1e379b950a57fbc934a83a7c6832a4f109049


commit d6a1e379b950a57fbc934a83a7c6832a4f109049
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Oct 7 14:12:43 2010 +0200

    Remove out-of-date script.

diff --git a/libcore/asobj/gen-asclass.pl b/libcore/asobj/gen-asclass.pl
deleted file mode 100755
index 8bee0c7..0000000
--- a/libcore/asobj/gen-asclass.pl
+++ /dev/null
@@ -1,529 +0,0 @@
-#!perl
-
-
-########################### NOTES ##################################
-## If you wish to change the output of this program, search for
-## 'sub create_headerfile' and 'sub create_cppfile'.
-##
-## To run this program, type 'gen-class.pl --help' (you may need
-## to use '/path/to/perl gen-clas.pl --help'), which will display
-## available options.
-####################################################################
-
-
-use strict;
-use warnings;
-use Getopt::Long;
-use Pod::Usage;
-
-our $VERBOSE = 0;  ## default setting; can be changed by command-line option
-
-our $LICENSE = q|//
-//   Copyright (C) | . (join ', ', (2005..((localtime)[5]+1900))) .
-q| Free Software Foundation, Inc.
-//
-// 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; either version 3 of the License, or
-// (at your option) any later version.
-//
-// 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
-//
-|;
-
-my %args = %{process_arguments()};
-create_headerfile(%args);
-create_cppfile(%args);
-
-########################### Output Functions #######################
-
-## Create the ClassName.h file
-sub create_headerfile {
-    my %args = @_;
-
-    my $fh;
-    open ($fh, '>', $args{headerfile}) or die
-        "Cannot open file '$args{headerfile}': $!\n";
-    notify("Creating file '$args{headerfile}'.");
-    print $fh <<EOF;
-// $args{headerfile}:  ActionScript "$args{class}" class, for Gnash.
-EOF
-    print $fh $LICENSE;
-
-    ## The text between the EOFs will be printed in the header file.
-    print $fh <<EOF;
-
-#ifndef GNASH_ASOBJ_$args{up}_H
-#define GNASH_ASOBJ_$args{up}_H
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-//#include <smart_ptr.h> // for intrusive_ptr and GC stuff
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global $args{class} class
-void $args{lc}_class_init(as_object& global);
-
-/// Return a $args{class} instance (in case the core lib needs it)
-//boost::intrusive_ptr<as_object> init_$args{lc}_instance();
-
-} // end of gnash namespace
-
-// GNASH_ASOBJ_$args{up}_H
-#endif
-EOF
-
-    close $fh;
-    return;
-}
-
-## Create the ClassName.cpp file
-sub create_cppfile {
-    my %args = @_;
-
-    my $fh;
-    open ($fh, '>', $args{cppfile}) or die
-        "Cannot open file '$args{cppfile}': $!\n";
-    notify("Creating file '$args{cppfile}'.");
-    print $fh <<EOF;
-// $args{cppfile}:  ActionScript "$args{class}" class, for Gnash.
-EOF
-    print $fh $LICENSE;
-
-
-    ## Loop through the list of methods.  Generate code, stored in
-    ## $declarations, $registrations, and $implementations.  $declarations
-    ## contains the declaration code for all methods, etc.  These will
-    ## be printed later, in the section delimited with EOF.  You may
-    ## change the output of these three looped sections.
-    my ($declarations, $registrations, $implementations);
-    foreach my $m (@{$args{methods}}) {
-
-        ## Where you see 'qq|' and '|', read '"' and '"'.  Using the quote
-        ## operator eliminates the need to escape literal quotes.  Thus,
-        ##   qq|This is an "example".\n|  ==  "This is an \"example\".\n"
-        ## A '.' concatenates a string.
-
-        $declarations .=
-          qq|\nstatic as_value $args{lc}_| .$m. qq|(const fn_call& fn);|;
-
-        $registrations .=
-          qq|\n    o.init_member("$m", new builtin_function($args{lc}_$m));|;
-
-        $implementations .=
-          qq|\nstatic as_value\n$args{lc}_| .$m.
-          qq|(const fn_call& fn)
-{
-       boost::intrusive_ptr<$args{lc}_as> ptr = ensure<ThisIs<$args{lc}_as> 
>(fn);
-       UNUSED(ptr);
-       LOG_ONCE( log_unimpl (__FUNCTION__) );
-       return as_value();
-}
-|;
-
-    }
-
-    ## Loop through the list of static methods.  Generate code, stored in
-    ## $declarations, $registrations, and $implementations.  $declarations
-    ## contains the declaration code for all methods, etc.  These will
-    ## be printed later, in the section delimited with EOF.  You may
-    ## change the output of these three looped sections.
-    my ($static_declarations, $static_registrations, $static_implementations);
-    foreach my $m (@{$args{static_methods}}) {
-
-        ## Where you see 'qq|' and '|', read '"' and '"'.  Using the quote
-        ## operator eliminates the need to escape literal quotes.  Thus,
-        ##   qq|This is an "example".\n|  ==  "This is an \"example\".\n"
-        ## A '.' concatenates a string.
-
-        $static_declarations .=
-          qq|\nstatic as_value $args{lc}_| .$m. qq|(const fn_call& fn);|;
-
-        $static_registrations .=
-          qq|\n    o.init_member("$m", new builtin_function($args{lc}_$m));|;
-
-        $static_implementations .=
-          qq|\nstatic as_value\n$args{lc}_| .$m.
-          qq|(const fn_call& fn)
-{
-       boost::intrusive_ptr<$args{lc}_as> ptr = ensure<ThisIs<$args{lc}_as> 
>(fn);
-       UNUSED(ptr);
-       LOG_ONCE( log_unimpl (__FUNCTION__) );
-       return as_value();
-}
-|;
-
-    }
-
-    ## Loop through the list of properties.  Generate code, stored in
-    ## $declarations, $registrations, and $implementations.  $declarations
-    ## contains the declaration code for all methods, etc.  These will
-    ## be printed later, in the section delimited with EOF.  You may
-    ## change the output of these three looped sections.
-    foreach my $p (@{$args{properties}}) {
-
-        ## Where you see 'qq|' and '|', read '"' and '"'.  Using the quote
-        ## operator eliminates the need to escape literal quotes.  Thus,
-        ##   qq|This is an "example".\n|  ==  "This is an \"example\".\n"
-        ## A '.' concatenates a string.
-
-        $declarations .=
-          qq|\nstatic as_value $args{lc}_| .$p. "_getset". qq|(const fn_call& 
fn);|;
-
-        $registrations .=
-                 qq|\n    o.init_property("$p", $args{lc}_${p}_getset, 
$args{lc}_${p}_getset);|;
-
-        $implementations .=
-          qq|\nstatic as_value\n$args{lc}_| .$p. "_getset" .
-          qq|(const fn_call& fn)
-{
-       boost::intrusive_ptr<$args{lc}_as> ptr = ensure<ThisIs<$args{lc}_as> 
>(fn);
-       UNUSED(ptr);
-       LOG_ONCE( log_unimpl (__FUNCTION__) );
-       return as_value();
-}
-|;
-
-    }
-
-    ## Loop through the list of static properties.  Generate code, stored in
-    ## $declarations, $registrations, and $implementations.  $declarations
-    ## contains the declaration code for all methods, etc.  These will
-    ## be printed later, in the section delimited with EOF.  You may
-    ## change the output of these three looped sections.
-    foreach my $p (@{$args{static_properties}}) {
-
-        ## Where you see 'qq|' and '|', read '"' and '"'.  Using the quote
-        ## operator eliminates the need to escape literal quotes.  Thus,
-        ##   qq|This is an "example".\n|  ==  "This is an \"example\".\n"
-        ## A '.' concatenates a string.
-
-        $static_declarations .=
-          qq|\nstatic as_value $args{lc}_| .$p. "_getset". qq|(const fn_call& 
fn);|;
-
-        $static_registrations .=
-                 qq|\n    o.init_property("$p", $args{lc}_${p}_getset, 
$args{lc}_${p}_getset);|;
-
-        $static_implementations .=
-          qq|\nstatic as_value\n$args{lc}_| .$p. "_getset" .
-          qq|(const fn_call& fn)
-{
-       boost::intrusive_ptr<$args{lc}_as> ptr = ensure<ThisIs<$args{lc}_as> 
>(fn);
-       UNUSED(ptr);
-       LOG_ONCE( log_unimpl (__FUNCTION__) );
-       return as_value();
-}
-|;
-
-    }
-
-    ## The text between the EOFs will be printed in the C++ source file.
-    print $fh <<EOF;
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-#include "$args{class}_as.h"
-#include "as_object.h" // for inheritance
-#include "log.h"
-#include "fn_call.h"
-#include "smart_ptr.h" // for boost intrusive_ptr
-#include "builtin_function.h" // need builtin_function
-#include "GnashException.h" // for ActionException
-#include "VM.h" // for addStatics
-
-#include <sstream>
-
-namespace gnash {
-$declarations
-$static_declarations
-
-as_value $args{lc}_ctor(const fn_call& fn);
-
-static void
-attach$args{class}Interface(as_object& o)
-{$registrations
-}
-
-static void
-attach$args{class}StaticProperties(as_object& o)
-{
-   $static_registrations
-}
-
-static as_object*
-get$args{class}Interface()
-{
-       static boost::intrusive_ptr<as_object> o;
-
-       if ( ! o )
-       {
-               // TODO: check if this class should inherit from Object
-               //       or from a different class
-               o = new as_object(getObjectInterface());
-               VM::get().addStatic(o.get());
-
-               attach$args{class}Interface(*o);
-
-       }
-
-       return o.get();
-}
-
-class $args{lc}_as: public as_object
-{
-
-public:
-
-       $args{lc}_as()
-               :
-               as_object(get$args{class}Interface())
-       {}
-
-       // override from as_object ?
-       //std::string get_text_value() const { return "$args{class}"; }
-
-       // override from as_object ?
-       //double get_numeric_value() const { return 0; }
-};
-
-$implementations
-$static_implementations
-
-as_value
-$args{lc}_ctor(const fn_call& fn)
-{
-       boost::intrusive_ptr<as_object> obj = new $args{lc}_as;
-
-       if ( fn.nargs )
-       {
-               std::stringstream ss;
-               fn.dump_args(ss);
-               LOG_ONCE( log_unimpl("$args{lc}(%s): %s", ss.str(), 
_("arguments discarded")) );
-       }
-
-       return as_value(obj.get()); // will keep alive
-}
-
-// extern 
-void $args{lc}_class_init(as_object& where)
-{
-       // This is going to be the $args{class} "class"/"function"
-       // in the 'where' package
-       boost::intrusive_ptr<builtin_function> cl;
-       cl=new builtin_function(&$args{lc}_ctor, get$args{class}Interface());
-       attach$args{class}StaticProperties(*cl);
-
-       // Register _global.$args{class}
-       where.init_member("$args{class}", cl.get());
-}
-
-} // end of gnash namespace
-EOF
-
-    close $fh;
-    return;
-}
-
-
-
-########################### Helper Functions #######################
-
-## Accept and process the user's arguments
-sub accept_arguments {
-    my %args;
-    GetOptions(
-        "class=s"   => \$args{class},
-        "help"      => \$args{help},
-        "verbose!"  => \$VERBOSE,
-        "force!"    => \$args{force},
-        "notes=s"   => \$args{datafile},
-    );
-
-    ## Class is a required argument
-    pod2usage(-verbose => 0), exit if ($args{help} || !$args{class});
-    delete $args{help};
-
-    ## Output files should not already exist.
-    $args{headerfile} = "$args{class}_as.h";
-    $args{cppfile}    = "$args{class}_as.cpp";
-    unless($args{force}) {
-        die "$args{headerfile} exists!  Aborting.\n" if (-e $args{headerfile});
-        die "$args{cppfile} exists!  Aborting.\n" if (-e $args{cppfile});
-    }
-    notify("The following files will be written: '$args{headerfile}', ".
-      "'$args{cppfile}'");
-
-    ## Use the default note file unless one was specified; ensure it exists.
-    $args{datafile} = '../../doc/C/NOTES' if (!$args{datafile});
-    die "Could not find file '$args{datafile}'; aborting.\n"
-        unless (-e $args{datafile});
-    notify("Using notes file '$args{datafile}'");
-
-    return \%args;
-}
-
-## Create a hash containing data which will be of use throughout the script.
-sub process_arguments {
-    my %args = %{accept_arguments()};
-
-    ## Find our methods and properties
-    %args = (%args, %{parse_notefile(%args)});
-
-    ## Add some extra variables we'll use often
-    $args{lc} = $args{class};
-    $args{up} = uc($args{class});
-
-    return \%args;
-}
-
-## Report a message if the user has enabled verbose.
-sub notify {
-    return unless ($VERBOSE);
-    my $message = shift;
-    print "$message\n";
-}
-
-## Take all property names out of notefile data.
-sub get_properties {
-    my %args = @_;
-    my @want;
-    foreach my $row (@{$args{notes}}) {
-       if ($row =~ /^$args{class}\.(\w+)$/) {
-               push @want, $1;
-               notify(" Property $1");
-       }
-    }
-    return address@hidden;
-}
-
-## Take static property names out of notefile data.
-sub get_static_properties {
-    my %args = @_;
-    my @want;
-    foreach my $row (@{$args{notes}}) {
-       if ($row =~ /^$args{class}\.(\w+) static$/) {
-               push @want, $1;
-               notify(" Static property $1");
-       }
-    }
-    return address@hidden;
-}
-
-## Take all method names out of notefile data.
-sub get_methods {
-    my %args = @_;
-    my @want;
-
-    ## Note that case should not be converted, as SWF7 is case-sensitive
-    foreach my $row (@{$args{notes}}) {
-       if ($row =~ /^$args{class}\.(\w+)\(\)$/) {
-               push @want, $1;
-               notify(" Method $1");
-       }
-    }
-    return address@hidden;
-}
-
-## Take all static method names out of notefile data.
-sub get_static_methods {
-    my %args = @_;
-    my @want;
-
-    ## Note that case should not be converted, as SWF7 is case-sensitive
-    foreach my $row (@{$args{notes}}) {
-       if ($row =~ /^$args{class}\.(\w+)\(\) static$/) {
-               push @want, $1;
-               notify(" Static Method $1");
-       }
-    }
-    return address@hidden;
-}
-
-## Get references to the class out of the notefile
-sub parse_notefile {
-    my %args = @_;
-    my $fh;
-    my @data;
-
-    open($fh, '<', $args{datafile}) or die
-        "Cannot open file '$args{datafile}': $!\n";
-
-    while (<$fh>) {
-        push @data, $_ if ($_ =~ /^$args{class}\b/);
-    }
-
-    close $fh;
-
-    my $methods = get_methods(%args, notes => address@hidden);
-    my $static_methods = get_static_methods(%args, notes => address@hidden);
-    my $props   = get_properties(%args, notes => address@hidden);
-    my $static_props   = get_static_properties(%args, notes => address@hidden);
-    return { methods => $methods, properties => $props,
-       static_methods => $static_methods, static_properties => $static_props };
-}
-
-########################### Documentation ############################
-=pod
-
-=head1 SYNOPSIS
-
-    perl gen-asclass.pl --class <classname> [--verbose] [--notes <filename>] 
[--force]
-
-=over 4
-
-=item --class <classname>
-
-This required argument specifies the name of the class you wish to create.
-
-=item --notes <filename>
-
-This allows you to specify the 'notes' where method names and (static)
-properties are specified.  By default, the file is F<../../doc/C/NOTES>,
-but if you wish to create a custom class, you should create your own version
-of this file following the same format.
-
-=item --force
-
-With this option enabled, any pre-existing class files of the same name
-will be overwritten.
-
-=item --verbose
-
-This is an optional argument.  If you enable it, the script will
-inform you of its progress.
-
-=back
-
-=head1 LICENSE
-
-Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-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; either version 3 of the License, or
-(at your option) any later version.
-
-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
-
-=cut

-----------------------------------------------------------------------

Summary of changes:
 devtools/lib/Gnash/Distribution.pm     |  307 ------------------
 devtools/lib/Gnash/Utils.pm            |  148 ---------
 devtools/testsuite/c_casts.t           |  112 -------
 devtools/testsuite/copyright_notices.t |  127 --------
 devtools/testsuite/tabs.t              |   87 ------
 devtools/testsuite/uncuddled_else.t    |  102 ------
 doc/C/actionscript.xml                 |    1 -
 libcore/asobj/gen-asclass.pl           |  529 --------------------------------
 8 files changed, 0 insertions(+), 1413 deletions(-)
 delete mode 100644 devtools/lib/Gnash/Distribution.pm
 delete mode 100644 devtools/lib/Gnash/Utils.pm
 delete mode 100755 devtools/testsuite/c_casts.t
 delete mode 100755 devtools/testsuite/copyright_notices.t
 delete mode 100755 devtools/testsuite/tabs.t
 delete mode 100755 devtools/testsuite/uncuddled_else.t
 delete mode 100755 libcore/asobj/gen-asclass.pl


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]