You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/07/18 07:11:30 UTC
[lucy-commits] svn commit: r1147746 - in /incubator/lucy/trunk:
charmonizer/src/Charmonizer/ charmonizer/src/Charmonizer/Core/
charmonizer/src/Charmonizer/Probe/ clownfish/lib/Clownfish/Binding/
clownfish/src/ perl/buildlib/Lucy/ perl/t/
Author: marvin
Date: Mon Jul 18 05:11:28 2011
New Revision: 1147746
URL: http://svn.apache.org/viewvc?rev=1147746&view=rev
Log:
Apply lucytidy.
Modified:
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm
incubator/lucy/trunk/clownfish/src/CFCBindClass.c
incubator/lucy/trunk/clownfish/src/CFCBindCore.c
incubator/lucy/trunk/clownfish/src/CFCBindCore.h
incubator/lucy/trunk/clownfish/src/CFCBindFile.c
incubator/lucy/trunk/clownfish/src/CFCClass.h
incubator/lucy/trunk/clownfish/src/CFCUtil.c
incubator/lucy/trunk/clownfish/src/CFCUtil.h
incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
incubator/lucy/trunk/perl/t/025-debug.t
incubator/lucy/trunk/perl/t/109-read_locking.t
incubator/lucy/trunk/perl/t/308-simple.t
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c Mon Jul 18 05:11:28 2011
@@ -87,7 +87,7 @@ CC_init(const char *compiler_command, co
printf("Trying to compile a small test file...\n");
}
if (!CC_test_compile(code, strlen(code))) {
- Util_die("Failed to compile a small test file");
+ Util_die("Failed to compile a small test file");
}
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h Mon Jul 18 05:11:28 2011
@@ -26,7 +26,7 @@ extern "C" {
/* Set up the Charmonizer environment. This should be called before anything
* else.
- *
+ *
* If the environment variable CHARM_VERBOSITY has been set, it will be
* processed at this time:
*
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c Mon Jul 18 05:11:28 2011
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
-static const char cygwin_code[] =
+static const char cygwin_code[] =
QUOTE(#ifndef __CYGWIN__ )
QUOTE( #error "Not Cygwin" )
QUOTE(#endif )
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm Mon Jul 18 05:11:28 2011
@@ -85,7 +85,7 @@ sub new {
$xs_file_components[-1] .= '.xs';
$xs_path{$self} = catfile( $lib, @xs_file_components );
- $pm_path{$self} = catfile( $lib, @file_components, 'Autobinding.pm' );
+ $pm_path{$self} = catfile( $lib, @file_components, 'Autobinding.pm' );
$boot_h_file{$self} = $parcel->get_prefix . "boot.h";
$boot_c_file{$self} = $parcel->get_prefix . "boot.c";
$boot_h_path{$self} = catfile( $dest_dir, $self->_get_boot_h_file );
@@ -356,8 +356,8 @@ sub _write_boot_h {
my $filepath = catfile( $hierarchy->get_dest, $self->_get_boot_h_file );
my $guard = uc( $self->_get_boot_class . "_BOOT" );
$guard =~ s/\W+/_/g;
- my $header = $self->_get_header;
- my $footer = $self->_get_footer;
+ my $header = $self->_get_header;
+ my $footer = $self->_get_footer;
my $boot_func = $self->_get_boot_func;
unlink $filepath;
Modified: incubator/lucy/trunk/clownfish/src/CFCBindClass.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindClass.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindClass.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindClass.c Mon Jul 18 05:11:28 2011
@@ -151,7 +151,7 @@ S_to_c_header_inert(CFCBindClass *self)
char *inert_var_defs = S_inert_var_declarations(self);
char *short_names = S_short_names(self);
- char pattern[] =
+ char pattern[] =
"#include \"charmony.h\"\n"
"#include \"parcel.h\"\n"
"\n"
@@ -198,7 +198,7 @@ S_to_c_header_dynamic(CFCBindClass *self
char *callback_declarations = S_callback_declarations(self);
char *short_names = S_short_names(self);
- char pattern[] =
+ char pattern[] =
"#include \"charmony.h\"\n"
"#include \"parcel.h\"\n"
"\n"
@@ -331,7 +331,7 @@ CFCBindClass_to_c(CFCBindClass *self) {
char *offset_str = CFCUtil_cat(CFCUtil_strdup(""), "(offsetof(", vt_type,
", methods) + ", meth_num_str,
" * sizeof(cfish_method_t))", NULL);
- offsets = CFCUtil_cat(offsets, "size_t ", full_offset_sym, " = ",
+ offsets = CFCUtil_cat(offsets, "size_t ", full_offset_sym, " = ",
offset_str, ";\n", NULL);
FREEMEM(full_offset_sym);
Modified: incubator/lucy/trunk/clownfish/src/CFCBindCore.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindCore.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindCore.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindCore.c Mon Jul 18 05:11:28 2011
@@ -48,7 +48,7 @@ static void
S_write_parcel_c(CFCBindCore *self);
CFCBindCore*
-CFCBindCore_new(CFCHierarchy *hierarchy, const char *dest, const char *header,
+CFCBindCore_new(CFCHierarchy *hierarchy, const char *dest, const char *header,
const char *footer) {
CFCBindCore *self
= (CFCBindCore*)CFCBase_allocate(sizeof(CFCBindCore),
@@ -122,7 +122,7 @@ S_write_parcel_h(CFCBindCore *self) {
CFCClass *klass = ordered[i];
if (!CFCClass_inert(klass)) {
const char *full_struct = CFCClass_full_struct_sym(klass);
- typedefs = CFCUtil_cat(typedefs, "typedef struct ", full_struct,
+ typedefs = CFCUtil_cat(typedefs, "typedef struct ", full_struct,
" ", full_struct, ";\n", NULL);
}
}
@@ -131,7 +131,7 @@ S_write_parcel_h(CFCBindCore *self) {
// Create Clownfish aliases if necessary.
char *aliases = CFCBindAliases_c_aliases();
- const char pattern[] =
+ const char pattern[] =
"%s\n"
"#ifndef CFCPARCEL_H\n"
"#define CFCPARCEL_H 1\n"
@@ -250,7 +250,7 @@ S_write_parcel_c(CFCBindCore *self) {
const char *cfc_class = CFCBase_get_cfc_class(blocks[j]);
if (strcmp(cfc_class, "Clownfish::Class") == 0) {
CFCClass *klass = (CFCClass*)blocks[j];
-
+
CFCBindClass *class_binding = CFCBindClass_new(klass);
char *c_code = CFCBindClass_to_c(class_binding);
content = CFCUtil_cat(content, c_code, "\n", NULL);
@@ -266,7 +266,7 @@ S_write_parcel_c(CFCBindCore *self) {
}
}
- char pattern[] =
+ char pattern[] =
"%s\n"
"\n"
"%s\n"
Modified: incubator/lucy/trunk/clownfish/src/CFCBindCore.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindCore.h?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindCore.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindCore.h Mon Jul 18 05:11:28 2011
@@ -26,7 +26,7 @@ struct CFCHierarchy;
CFCBindCore*
CFCBindCore_new(struct CFCHierarchy *hierarchy, const char *dest,
- const char *header, const char *footer);
+ const char *header, const char *footer);
CFCBindCore*
CFCBindCore_init(CFCBindCore *self, struct CFCHierarchy *hierarchy,
Modified: incubator/lucy/trunk/clownfish/src/CFCBindFile.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindFile.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindFile.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindFile.c Mon Jul 18 05:11:28 2011
@@ -37,7 +37,7 @@ CFCBindFile_write_h(CFCFile *file, const
char *h_path = (char*)MALLOCATE(h_path_buf_size);
CFCFile_h_path(file, h_path, h_path_buf_size, dest);
char *h_dir = CFCUtil_strdup(h_path);
- for (size_t len = h_path_buf_size; len--; ) {
+ for (size_t len = h_path_buf_size; len--;) {
if (h_dir[len] == CFCUTIL_PATH_SEP_CHAR) {
h_dir[len] = 0;
break;
@@ -81,7 +81,7 @@ CFCBindFile_write_h(CFCFile *file, const
}
}
- char pattern[] =
+ char pattern[] =
"%s\n"
"\n"
"%s\n"
Modified: incubator/lucy/trunk/clownfish/src/CFCClass.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCClass.h?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCClass.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCClass.h Mon Jul 18 05:11:28 2011
@@ -161,7 +161,7 @@ const char*
CFCClass_full_vtable_type(CFCClass *self);
/** Access the symbol which unlocks the class struct definition and other
- * private information.
+ * private information.
*/
const char*
CFCClass_privacy_symbol(CFCClass *self);
Modified: incubator/lucy/trunk/clownfish/src/CFCUtil.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCUtil.c?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCUtil.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCUtil.c Mon Jul 18 05:11:28 2011
@@ -345,7 +345,7 @@ typedef struct WinDH {
} WinDH;
int
-CFCUtil_make_dir (const char *dir) {
+CFCUtil_make_dir(const char *dir) {
return !mkdir(dir);
}
@@ -404,7 +404,7 @@ CFCUtil_closedir(void *dirhandle, const
#include <dirent.h>
int
-CFCUtil_make_dir (const char *dir) {
+CFCUtil_make_dir(const char *dir) {
return !mkdir(dir, 0777);
}
Modified: incubator/lucy/trunk/clownfish/src/CFCUtil.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCUtil.h?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCUtil.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCUtil.h Mon Jul 18 05:11:28 2011
@@ -113,7 +113,7 @@ CFCUtil_slurp_text(const char *file_path
long
CFCUtil_flength(void *file);
-/* A string and a char representing the path separator for this OS.
+/* A string and a char representing the path separator for this OS.
*/
#ifdef _WIN32
#define CFCUTIL_PATH_SEP "\\"
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Mon Jul 18 05:11:28 2011
@@ -112,8 +112,9 @@ my $is_distro_not_devel = -e 'core';
my $base_dir = rel2abs( $is_distro_not_devel ? getcwd() : updir() );
my $CHARMONIZER_ORIG_DIR = catdir( $base_dir, 'charmonizer' );
-my $CHARMONIZE_EXE_PATH = catfile( $CHARMONIZER_ORIG_DIR, "charmonize$Config{_exe}" );
-my $CHARMONY_PATH = 'charmony.h';
+my $CHARMONIZE_EXE_PATH
+ = catfile( $CHARMONIZER_ORIG_DIR, "charmonize$Config{_exe}" );
+my $CHARMONY_PATH = 'charmony.h';
my $SNOWSTEM_SRC_DIR
= catdir( $base_dir, qw( modules analysis snowstem source ) );
my $SNOWSTEM_INC_DIR = catdir( $SNOWSTEM_SRC_DIR, 'include' );
@@ -132,8 +133,8 @@ sub new { shift->SUPER::new( recursive_t
sub _run_make {
my ( $self, %params ) = @_;
- my @command = @{ $params{args} };
- my $dir = $params{dir};
+ my @command = @{ $params{args} };
+ my $dir = $params{dir};
my $current_directory = getcwd();
chdir $dir if $dir;
unshift @command, 'CC=' . $self->config('cc');
@@ -287,7 +288,6 @@ sub ACTION_clownfish {
my $pm_filepaths = $self->rscan_dir( $LIB_DIR, qr/\.pm$/ );
my $cfh_filepaths = $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.cfh$/ );
-
# XXX joes thinks this is dubious
# Don't bother parsing Clownfish files if everything's up to date.
return
@@ -484,11 +484,11 @@ sub ACTION_compile_custom_xs {
# Compile C source files.
my $c_files = [];
- push @$c_files, @{ $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.c$/ ) };
- push @$c_files, @{ $self->rscan_dir( $XS_SOURCE_DIR, qr/\.c$/ ) };
- push @$c_files, @{ $self->rscan_dir( $AUTOGEN_DIR, qr/\.c$/ ) };
- push @$c_files, @{ $self->rscan_dir( $SNOWSTEM_SRC_DIR, qr/\.c$/ ) };
- push @$c_files, @{ $self->rscan_dir( $SNOWSTOP_SRC_DIR, qr/\.c$/ ) };
+ push @$c_files, @{ $self->rscan_dir( $CORE_SOURCE_DIR, qr/\.c$/ ) };
+ push @$c_files, @{ $self->rscan_dir( $XS_SOURCE_DIR, qr/\.c$/ ) };
+ push @$c_files, @{ $self->rscan_dir( $AUTOGEN_DIR, qr/\.c$/ ) };
+ push @$c_files, @{ $self->rscan_dir( $SNOWSTEM_SRC_DIR, qr/\.c$/ ) };
+ push @$c_files, @{ $self->rscan_dir( $SNOWSTOP_SRC_DIR, qr/\.c$/ ) };
for my $c_file (@$c_files) {
my $o_file = $c_file;
my $ccs_file = $c_file;
@@ -643,6 +643,7 @@ sub ACTION_dist {
README
);
print "Copying files...\n";
+
for my $item (@items_to_copy) {
confess("'$item' already exists") if -e $item;
system("cp -R ../$item $item");
@@ -656,8 +657,8 @@ sub ACTION_dist {
# Clean up.
print "Removing copied files...\n";
rmtree($_) for @items_to_copy;
- unlink("META.yml");
- move("MANIFEST.bak", "MANIFEST") or die "move() failed: $!";
+ unlink("META.yml");
+ move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!";
}
# Generate a list of files for PAUSE, search.cpan.org, etc to ignore.
Modified: incubator/lucy/trunk/perl/t/025-debug.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/t/025-debug.t?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/t/025-debug.t (original)
+++ incubator/lucy/trunk/perl/t/025-debug.t Mon Jul 18 05:11:28 2011
@@ -54,7 +54,7 @@ pass("ASSERT(true) didn't die");
SKIP: {
skip( "Windows fork not supported by Lucy", 3 )
- if $^O =~ /(mswin|cygwin)/i;
+ if $^O =~ /(mswin|cygwin)/i;
my $stderr_out = capture_debug( 'Lucy.xs', 'Borax' );
like( $stderr_out, qr/Borax/, "DEBUG - file name" );
Modified: incubator/lucy/trunk/perl/t/109-read_locking.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/t/109-read_locking.t?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/t/109-read_locking.t (original)
+++ incubator/lucy/trunk/perl/t/109-read_locking.t Mon Jul 18 05:11:28 2011
@@ -82,7 +82,8 @@ SKIP: {
);
};
ok( blessed($@) && $@->isa("Lucy::Store::LockErr"),
- "IndexReader dies if it can't get deletion lock" );
+ "IndexReader dies if it can't get deletion lock"
+ );
}
$folder->delete('locks/deletion.lock') or die "Can't delete 'deletion.lock'";
Modified: incubator/lucy/trunk/perl/t/308-simple.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/t/308-simple.t?rev=1147746&r1=1147745&r2=1147746&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/t/308-simple.t (original)
+++ incubator/lucy/trunk/perl/t/308-simple.t Mon Jul 18 05:11:28 2011
@@ -52,7 +52,7 @@ is( $lucy->search( query => 'cream' ), 4
SKIP: {
skip( "fork on Windows not supported by Lucy", 1 )
- if $^O =~ /(mswin|cygwin)/i;
+ if $^O =~ /(mswin|cygwin)/i;
# We need another one:
my $test_index_loc = init_test_index_loc();