FAQ

svn commit: r884674 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer: ./ Core/ Probe/ Test/

Marvin
Nov 26, 2009 at 7:32 pm
Author: marvin
Date: Thu Nov 26 19:32:00 2009
New Revision: 884674

URL: http://svn.apache.org/viewvc?rev=884674&view=rev
Log:
Commit most of LUCY-72, making Charmonizer's symbol prefixing more coherent
and consistent with the Lucy core.

Modified:
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/CompilerSpec.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/DirManip.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/FuncMacro.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/UnusedVars.c
lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/VariadicMacros.c

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c Thu Nov 26 19:32:00 2009
@@ -26,13 +26,13 @@
static void
S_do_test_compile(Compiler *self);

-chaz_Compiler*
-chaz_CC_new(OperSys *oper_sys, const char *cc_command, const char *cc_flags)
+Compiler*
+CC_new(OperSys *oper_sys, const char *cc_command, const char *cc_flags)
{
CompilerSpec *compiler_spec = CCSpec_find_spec();
Compiler *self = (Compiler*)malloc(sizeof(Compiler));

- if (verbosity)
+ if (Util_verbosity)
printf("Creating compiler object...\n");

/* assign */
@@ -120,7 +120,7 @@
chaz_bool_t result;

/* Prepare the compiler command. */
- if (verbosity < 2 && chaz_ModHand_charm_run_available) {
+ if (Util_verbosity < 2 && chaz_ModHand_charm_run_available) {
sprintf(command, "%s%s %s %s %s%s %s %s",
os->local_command_start, "_charm_run ",
self->cc_command, source_path,
@@ -137,11 +137,11 @@
}

/* Write the source file. */
- write_file(source_path, code);
+ Util_write_file(source_path, code);

/* Run the compiler command. See if compilation was successful. */
system(command);
- result = can_open_file(exe_file);
+ result = Util_can_open_file(exe_file);

free(command);
free(inc_dir_string);
@@ -170,7 +170,7 @@
chaz_bool_t result;

/* Prepare the compiler command. */
- if (verbosity < 2 && chaz_ModHand_charm_run_available) {
+ if (Util_verbosity < 2 && chaz_ModHand_charm_run_available) {
sprintf(command, "%s%s %s %s %s%s %s %s",
os->local_command_start, "_charm_run ",
self->cc_command, source_path,
@@ -187,11 +187,11 @@
}

/* Write the source file. */
- write_file(source_path, code);
+ Util_write_file(source_path, code);

/* Run the compiler command. See if compilation was successful. */
system(command);
- result = can_open_file(obj_file);
+ result = Util_can_open_file(obj_file);

free(command);
free(inc_dir_string);
@@ -205,14 +205,14 @@
char *code = "int main() { return 0; }\n";
chaz_bool_t success;

- if (verbosity)
+ if (Util_verbosity)
printf("Trying to compile a small test file...\n");

/* attempt compilation */
success = self->compile_exe(self, "_charm_try.c",
"_charm_try", code, strlen(code));
if (!success)
- die("Failed to compile a small test file");
+ Util_die("Failed to compile a small test file");

/* clean up */
remove("_charm_try.c");

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/CompilerSpec.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/CompilerSpec.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/CompilerSpec.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/CompilerSpec.c Thu Nov 26 19:32:00 2009
@@ -14,10 +14,10 @@
#endif


-chaz_CompilerSpec*
-chaz_CCSpec_find_spec()
+CompilerSpec*
+CCSpec_find_spec()
{
- if (verbosity)
+ if (Util_verbosity)
printf("Trying to find a supported compiler...\n");

return &spec;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c Thu Nov 26 19:32:00 2009
@@ -14,7 +14,7 @@
static chaz_bool_t mkdir_available = false;
static chaz_bool_t rmdir_available = false;
static chaz_bool_t initialized = false;
-int chaz_Dir_mkdir_num_args = 0;
+int Dir_mkdir_num_args = 0;
static char mkdir_command[7];
char *Dir_mkdir_command = mkdir_command;

@@ -56,7 +56,7 @@

/* Attempt compilation. */
sprintf(code_buf, posix_mkdir_code, header);
- mkdir_available = compiler->compile_exe(compiler, "_charm_mkdir.c",
+ mkdir_available = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_mkdir.c",
"_charm_mkdir", code_buf, strlen(code_buf));

/* Set vars on success. */
@@ -77,7 +77,7 @@
static chaz_bool_t
S_try_init_win_mkdir()
{
- mkdir_available = compiler->compile_exe(compiler, "_charm_mkdir.c",
+ mkdir_available = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_mkdir.c",
"_charm_mkdir", win_mkdir_code, strlen(win_mkdir_code));
if (mkdir_available) {
strcpy(mkdir_command, "_mkdir");
@@ -89,7 +89,7 @@
static void
S_init_mkdir()
{
- if (verbosity) {
+ if (Util_verbosity) {
printf("Attempting to compile _charm_mkdir utility...\n");
}
if (S_try_init_win_mkdir()) { return; }
@@ -103,7 +103,7 @@
size_t needed = sizeof(posix_mkdir_code) + 30;
char *code_buf = malloc(needed);
sprintf(code_buf, rmdir_code, header);
- rmdir_available = compiler->compile_exe(compiler, "_charm_rmdir.c",
+ rmdir_available = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_rmdir.c",
"_charm_rmdir", code_buf, strlen(code_buf));
free(code_buf);
return rmdir_available;
@@ -112,7 +112,7 @@
static void
S_init_rmdir()
{
- if (verbosity) {
+ if (Util_verbosity) {
printf("Attempting to compile _charm_rmdir utility...\n");
}
if (S_try_init_rmdir("unistd.h")) { return; }
@@ -122,7 +122,7 @@

/* Compile _charm_mkdir and _charm_rmdir. */
void
-chaz_Dir_init(void)
+Dir_init(void)
{
if (!initialized) {
initialized = true;
@@ -132,17 +132,17 @@
}

chaz_bool_t
-chaz_Dir_mkdir(const char *filepath)
+Dir_mkdir(const char *filepath)
{
- if (!initialized) { chaz_Dir_init(); }
- return os->run_local(os, "_charm_mkdir ", filepath, NULL);
+ if (!initialized) { Dir_init(); }
+ return ModHand_os->run_local(ModHand_os, "_charm_mkdir ", filepath, NULL);
}

chaz_bool_t
-chaz_Dir_rmdir(const char *filepath)
+Dir_rmdir(const char *filepath)
{
- if (!initialized) { chaz_Dir_init(); }
- return os->run_local(os, "_charm_rmdir ", filepath, NULL);
+ if (!initialized) { Dir_init(); }
+ return ModHand_os->run_local(ModHand_os, "_charm_rmdir ", filepath, NULL);
}

/**

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c Thu Nov 26 19:32:00 2009
@@ -43,7 +43,7 @@
S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists);

void
-chaz_HeadCheck_init()
+HeadCheck_init()
{
Header *null_header = (Header*)malloc(sizeof(Header));

@@ -56,7 +56,7 @@
}

chaz_bool_t
-chaz_HeadCheck_check_header(const char *header_name)
+HeadCheck_check_header(const char *header_name)
{
Header *header;
Header key;
@@ -82,7 +82,7 @@
}

chaz_bool_t
-chaz_HeadCheck_check_many_headers(const char **header_names)
+HeadCheck_check_many_headers(const char **header_names)
{
chaz_bool_t success;
int i;
@@ -104,7 +104,7 @@
strcat(code_buf, test_code);

/* if the code compiles, bulk add all header names to the cache */
- success = test_compile(code_buf, strlen(code_buf));
+ success = ModHand_test_compile(code_buf, strlen(code_buf));
if (success) {
for (i = 0; header_names[i] != NULL; i++) {
S_maybe_add_to_cache(header_names[i], true);
@@ -122,7 +122,7 @@
METAQUOTE;

chaz_bool_t
-chaz_HeadCheck_contains_member(const char *struct_name, const char *member,
+HeadCheck_contains_member(const char *struct_name, const char *member,
const char *includes)
{
long needed = sizeof(contains_code) + strlen(struct_name)
@@ -130,7 +130,7 @@
char *buf = malloc(needed);
chaz_bool_t retval;
sprintf(buf, contains_code, includes, struct_name, member);
- retval = test_compile(buf, strlen(buf));
+ retval = ModHand_test_compile(buf, strlen(buf));
free(buf);
return retval;
}
@@ -159,7 +159,7 @@

/* see whether code that tries to pull in this header compiles */
sprintf(include_test, "#include <%s>\n%s", header_name, test_code);
- header->exists = test_compile(include_test, strlen(include_test));
+ header->exists = ModHand_test_compile(include_test, strlen(include_test));

free(include_test);
return header;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h Thu Nov 26 19:32:00 2009
@@ -30,10 +30,10 @@
const char *includes);

#ifdef CHAZ_USE_SHORT_NAMES
- #define HeadCheck_init chaz_HeadCheck_init
- #define HeadCheck_contains_member chaz_HeadCheck_contains_member
- #define check_header chaz_HeadCheck_check_header
- #define check_many_headers chaz_HeadCheck_check_many_headers
+ #define HeadCheck_init chaz_HeadCheck_init
+ #define HeadCheck_contains_member chaz_HeadCheck_contains_member
+ #define HeadCheck_check_header chaz_HeadCheck_check_header
+ #define HeadCheck_check_many_headers chaz_HeadCheck_check_many_headers
#endif

#endif /* H_CHAZ_HEAD_CHECK */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c Thu Nov 26 19:32:00 2009
@@ -27,26 +27,26 @@
S_clean_up_try();

/* global vars */
-struct chaz_OperSys *chaz_ModHand_os = NULL;
-struct chaz_Compiler *chaz_ModHand_compiler = NULL;
+struct OperSys *ModHand_os = NULL;
+struct Compiler *ModHand_compiler = NULL;
chaz_bool_t chaz_ModHand_charm_run_available = false;
-FILE* chaz_ModHand_charmony_fh = NULL;
+FILE* ModHand_charmony_fh = NULL;

/* static vars */
static char *try_app_path = NULL;
static char *try_app_command = NULL;

void
-chaz_ModHand_init()
+ModHand_init()
{
/* set the name of the application which we "try" to execute */
- try_app_path = malloc(strlen(TRY_APP_BASENAME) + strlen(os->exe_ext) + 1);
- sprintf(try_app_path, "%s%s", TRY_APP_BASENAME, os->exe_ext);
+ try_app_path = malloc(strlen(TRY_APP_BASENAME) + strlen(ModHand_os->exe_ext) + 1);
+ sprintf(try_app_path, "%s%s", TRY_APP_BASENAME, ModHand_os->exe_ext);

/* set the invocation string for the "try" application */
- try_app_command = malloc(strlen(os->local_command_start) +
+ try_app_command = malloc(strlen(ModHand_os->local_command_start) +
strlen(try_app_path) + 1);
- sprintf(try_app_command, "%s%s", os->local_command_start, try_app_path);
+ sprintf(try_app_command, "%s%s", ModHand_os->local_command_start, try_app_path);

/* write files needed by this module and others */
S_build_charm_run();
@@ -54,17 +54,17 @@
}

void
-chaz_ModHand_open_charmony_h(const char *charmony_start)
+ModHand_open_charmony_h(const char *charmony_start)
{
/* open the filehandle */
- charmony_fh = fopen("charmony.h", "w+");
- if (charmony_fh == NULL)
- die("Can't open 'charmony.h': %s", strerror(errno));
+ ModHand_charmony_fh = fopen("charmony.h", "w+");
+ if (ModHand_charmony_fh == NULL)
+ Util_die("Can't open 'charmony.h': %s", strerror(errno));

/* print supplied text (if any) along with warning, open include guard */
if (charmony_start != NULL)
- fprintf(charmony_fh, charmony_start);
- fprintf(charmony_fh,
+ fprintf(ModHand_charmony_fh, charmony_start);
+ fprintf(ModHand_charmony_fh,
"/* Header file auto-generated by Charmonizer. \n"
" * DO NOT EDIT THIS FILE!!\n"
" */\n\n"
@@ -74,17 +74,17 @@
}

void
-chaz_ModHand_clean_up(void)
+ModHand_clean_up(void)
{
/* clean up some temp files */
remove("_charm.h");
- os->remove_exe(os, "_charm_run");
- os->remove_exe(os, "_charm_stat");
+ ModHand_os->remove_exe(ModHand_os, "_charm_run");
+ ModHand_os->remove_exe(ModHand_os, "_charm_stat");

/* write the last bit of charmony.h and close */
- fprintf(charmony_fh, "#endif /* H_CHARMONY */\n\n");
- if (fclose(charmony_fh))
- die("Couldn't close 'charmony.h': %s", strerror(errno));
+ fprintf(ModHand_charmony_fh, "#endif /* H_CHARMONY */\n\n");
+ if (fclose(ModHand_charmony_fh))
+ Util_die("Couldn't close 'charmony.h': %s", strerror(errno));
}

static char charm_h_code[] = METAQUOTE
@@ -102,7 +102,7 @@
static void
S_write_charm_h()
{
- write_file("_charm.h", charm_h_code);
+ Util_write_file("_charm.h", charm_h_code);
}

static char charm_run_code_a[] = METAQUOTE
@@ -158,9 +158,9 @@
chaz_bool_t compile_succeeded = false;
size_t needed = sizeof(charm_run_code_a)
+ sizeof(charm_run_code_b)
- + strlen(os->devnull)
+ + strlen(ModHand_os->devnull)
+ sizeof(charm_run_code_c)
- + strlen(os->devnull)
+ + strlen(ModHand_os->devnull)
+ sizeof(charm_run_code_d)
+ 20;
char *code = malloc(needed);
@@ -168,30 +168,30 @@
sprintf(code, "%s%s \"%s\" %s \"%s\" %s",
charm_run_code_a,
charm_run_code_b,
- os->devnull,
+ ModHand_os->devnull,
charm_run_code_c,
- os->devnull,
+ ModHand_os->devnull,
charm_run_code_d);
- compile_succeeded = compiler->compile_exe(compiler, "_charm_run.c",
- "_charm_run", code, strlen(code));
+ compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler,
+ "_charm_run.c", "_charm_run", code, strlen(code));
if (!compile_succeeded)
- die("failed to compile _charm_run helper utility");
+ Util_die("failed to compile _charm_run helper utility");

remove("_charm_run.c");
free(code);
- charm_run_available = true;
+ chaz_ModHand_charm_run_available = true;
}

chaz_bool_t
-chaz_ModHand_test_compile(char *source, size_t source_len)
+ModHand_test_compile(char *source, size_t source_len)
{
chaz_bool_t compile_succeeded;

- if ( !remove_and_verify(try_app_path) )
- die("Failed to delete file '%s'", try_app_path);
+ if ( !Util_remove_and_verify(try_app_path) )
+ Util_die("Failed to delete file '%s'", try_app_path);

- compile_succeeded = compiler->compile_exe(compiler, TRY_SOURCE_PATH,
- TRY_APP_BASENAME, source, source_len);
+ compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler,
+ TRY_SOURCE_PATH, TRY_APP_BASENAME, source, source_len);

S_clean_up_try();

@@ -199,24 +199,24 @@
}

char*
-chaz_ModHand_capture_output(char *source, size_t source_len,
+ModHand_capture_output(char *source, size_t source_len,
size_t *output_len)
{
char *captured_output = NULL;
chaz_bool_t compile_succeeded;

/* clear out previous versions and test to make sure removal worked */
- if ( !remove_and_verify(try_app_path) )
- die("Failed to delete file '%s'", try_app_path);
- if ( !remove_and_verify(TARGET_PATH) )
- die("Failed to delete file '%s'", TARGET_PATH);
+ if ( !Util_remove_and_verify(try_app_path) )
+ Util_die("Failed to delete file '%s'", try_app_path);
+ if ( !Util_remove_and_verify(TARGET_PATH) )
+ Util_die("Failed to delete file '%s'", TARGET_PATH);

/* attempt compilation; if successful, run app and slurp output */
- compile_succeeded = compiler->compile_exe(compiler, TRY_SOURCE_PATH,
- TRY_APP_BASENAME, source, source_len);
+ compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler,
+ TRY_SOURCE_PATH, TRY_APP_BASENAME, source, source_len);
if (compile_succeeded) {
system(try_app_command);
- captured_output = slurp_file(TARGET_PATH, output_len);
+ captured_output = Util_slurp_file(TARGET_PATH, output_len);
}
else {
*output_len = 0;
@@ -229,12 +229,12 @@
}

void
-chaz_ModHand_append_conf(char *fmt, ...)
+ModHand_append_conf(char *fmt, ...)
{
va_list args;

va_start(args, fmt);
- vfprintf(chaz_ModHand_charmony_fh, fmt, args);
+ vfprintf(ModHand_charmony_fh, fmt, args);
va_end(args);
}

@@ -242,26 +242,26 @@
S_clean_up_try()
{
remove(TRY_SOURCE_PATH);
- os->remove_exe(os, TRY_APP_BASENAME);
+ ModHand_os->remove_exe(ModHand_os, TRY_APP_BASENAME);
remove(TARGET_PATH);
}

void
-chaz_ModHand_shorten_macro(const char *sym)
+ModHand_shorten_macro(const char *sym)
{
- append_conf(" #define %s CHY_%s\n", sym, sym);
+ ModHand_append_conf(" #define %s CHY_%s\n", sym, sym);
}

void
-chaz_ModHand_shorten_typedef(const char *sym)
+ModHand_shorten_typedef(const char *sym)
{
- append_conf(" #define %s chy_%s\n", sym, sym);
+ ModHand_append_conf(" #define %s chy_%s\n", sym, sym);
}

void
-chaz_ModHand_shorten_function(const char *sym)
+ModHand_shorten_function(const char *sym)
{
- append_conf(" #define %s chy_%s\n", sym, sym);
+ ModHand_append_conf(" #define %s chy_%s\n", sym, sym);
}



Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h Thu Nov 26 19:32:00 2009
@@ -66,11 +66,11 @@
/* Print bookends delimiting a short names block.
*/
#define CHAZ_MODHAND_START_SHORT_NAMES \
- append_conf( \
+ chaz_ModHand_append_conf( \
"\n#if defined(CHY_USE_SHORT_NAMES) || defined(CHAZ_USE_SHORT_NAMES)\n")

#define CHAZ_MODHAND_END_SHORT_NAMES \
- append_conf("#endif /* USE_SHORT_NAMES */\n")
+ chaz_ModHand_append_conf("#endif /* USE_SHORT_NAMES */\n")

/* Define a shortened version of a macro symbol (minus the "CHY_" prefix);
*/
@@ -91,39 +91,38 @@
*/
#define CHAZ_MODHAND_START_RUN(module_name) \
do { \
- append_conf("\n/* %s */\n", module_name); \
- if (verbosity > 0) \
+ chaz_ModHand_append_conf("\n/* %s */\n", module_name); \
+ if (chaz_Util_verbosity > 0) \
printf("Running %s module...\n", module_name); \
} while (0)

/* Leave a little whitespace at the end of each module.
*/
-#define CHAZ_MODHAND_END_RUN append_conf("\n")
-
+#define CHAZ_MODHAND_END_RUN chaz_ModHand_append_conf("\n")

#ifdef CHAZ_USE_SHORT_NAMES
- #define TRY_SOURCE_PATH CHAZ_MOD_HAND_TRY_SOURCE_PATH
- #define TRY_APP_BASENAME CHAZ_MOD_HAND_TRY_APP_BASENAME
- #define TARGET_PATH CHAZ_MOD_HAND_TARGET_PATH
- #define os chaz_ModHand_os
- #define compiler chaz_ModHand_compiler
- #define charm_run_available chaz_ModHand_charm_run_available
- #define charmony_fh chaz_ModHand_charmony_fh
- #define ModHand_init chaz_ModHand_init
- #define ModHand_open_charmony_h chaz_ModHand_open_charmony_h
- #define ModHand_clean_up chaz_ModHand_clean_up
- #define write_charm_h chaz_ModHand_write_charm_h
- #define build_charm_run chaz_ModHand_build_charm_run
- #define START_SHORT_NAMES CHAZ_MODHAND_START_SHORT_NAMES
- #define END_SHORT_NAMES CHAZ_MODHAND_END_SHORT_NAMES
- #define test_compile chaz_ModHand_test_compile
- #define capture_output chaz_ModHand_capture_output
- #define append_conf chaz_ModHand_append_conf
- #define shorten_macro chaz_ModHand_shorten_macro
- #define shorten_typedef chaz_ModHand_shorten_typedef
- #define shorten_function chaz_ModHand_shorten_function
- #define START_RUN CHAZ_MODHAND_START_RUN
- #define END_RUN CHAZ_MODHAND_END_RUN
+ #define TRY_SOURCE_PATH CHAZ_MOD_HAND_TRY_SOURCE_PATH
+ #define TRY_APP_BASENAME CHAZ_MOD_HAND_TRY_APP_BASENAME
+ #define TARGET_PATH CHAZ_MOD_HAND_TARGET_PATH
+ #define ModHand_os chaz_ModHand_os
+ #define ModHand_compiler chaz_ModHand_compiler
+ #define ModHand_charm_run_available chaz_ModHand_charm_run_available
+ #define ModHand_charmony_fh chaz_ModHand_charmony_fh
+ #define ModHand_init chaz_ModHand_init
+ #define ModHand_open_charmony_h chaz_ModHand_open_charmony_h
+ #define ModHand_clean_up chaz_ModHand_clean_up
+ #define ModHand_write_charm_h chaz_ModHand_write_charm_h
+ #define ModHand_build_charm_run chaz_ModHand_build_charm_run
+ #define START_SHORT_NAMES CHAZ_MODHAND_START_SHORT_NAMES
+ #define END_SHORT_NAMES CHAZ_MODHAND_END_SHORT_NAMES
+ #define ModHand_test_compile chaz_ModHand_test_compile
+ #define ModHand_capture_output chaz_ModHand_capture_output
+ #define ModHand_append_conf chaz_ModHand_append_conf
+ #define ModHand_shorten_macro chaz_ModHand_shorten_macro
+ #define ModHand_shorten_typedef chaz_ModHand_shorten_typedef
+ #define ModHand_shorten_function chaz_ModHand_shorten_function
+ #define START_RUN CHAZ_MODHAND_START_RUN
+ #define END_RUN CHAZ_MODHAND_END_RUN
#endif

#endif /* H_CHAZ_MOD_HAND */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c Thu Nov 26 19:32:00 2009
@@ -22,12 +22,12 @@
static int
S_run_local(OperSys *self, ...);

-chaz_OperSys*
-chaz_OS_new(const char *name)
+OperSys*
+OS_new(const char *name)
{
OperSys *self = (OperSys*)malloc(sizeof(OperSys));

- if (verbosity)
+ if (Util_verbosity)
printf("Creating os object...\n");

/* assign */
@@ -68,19 +68,19 @@
};
int i;

- if (verbosity)
+ if (Util_verbosity)
printf("Trying to find a bit-bucket a la /dev/null...\n");

/* iterate through names of possible devnulls trying to open them */
for (i = 0; devnull_options[i] != NULL; i++) {
- if (can_open_file(devnull_options[i])) {
+ if (Util_can_open_file(devnull_options[i])) {
self->devnull = strdup(devnull_options[i]);
return;
}
}

/* bail out we couldn't find a devnull */
- die("Couldn't find anything like /dev/null");
+ Util_die("Couldn't find anything like /dev/null");
}

static void

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c Thu Nov 26 19:32:00 2009
@@ -19,7 +19,7 @@
S_init();

void
-chaz_Stat_stat(const char *filepath, chaz_Stat *target)
+Stat_stat(const char *filepath, Stat *target)
{
char *stat_output;
size_t output_len;
@@ -36,10 +36,10 @@
return;

/* run _charm_stat */
- remove_and_verify("_charm_statout");
- os->run_local(os, "_charm_stat ", filepath, NULL);
- stat_output = slurp_file("_charm_statout", &output_len);
- remove_and_verify("_charm_statout");
+ Util_remove_and_verify("_charm_statout");
+ ModHand_os->run_local(ModHand_os, "_charm_stat ", filepath, NULL);
+ stat_output = Util_slurp_file("_charm_statout", &output_len);
+ Util_remove_and_verify("_charm_statout");

/* parse the output of _charm_stat and store vars in Stat struct */
if (stat_output != NULL) {
@@ -74,16 +74,16 @@
{
/* only try this once */
initialized = true;
- if (verbosity)
+ if (Util_verbosity)
printf("Attempting to compile _charm_stat utility...\n");

/* bail if sys/stat.h isn't available */
- if (!check_header("sys/stat.h"))
+ if (!HeadCheck_check_header("sys/stat.h"))
return;

/* if the compile succeeds, open up for business */
- stat_available = compiler->compile_exe(compiler, "_charm_stat.c",
- "_charm_stat", charm_stat_code, strlen(charm_stat_code));
+ stat_available = ModHand_compiler->compile_exe(ModHand_compiler,
+ "_charm_stat.c", "_charm_stat", charm_stat_code, strlen(charm_stat_code));
remove("_charm_stat.c");
}


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c Thu Nov 26 19:32:00 2009
@@ -7,22 +7,22 @@
#include "Charmonizer/Core/Util.h"

/* global verbosity setting */
-int chaz_Util_verbosity = 1;
+int Util_verbosity = 1;

void
-chaz_Util_write_file(const char *filename, const char *content)
+Util_write_file(const char *filename, const char *content)
{
FILE *fh = fopen(filename, "w+");
size_t content_len = strlen(content);
if (fh == NULL)
- die("Couldn't open '%s': %s", filename, strerror(errno));
+ Util_die("Couldn't open '%s': %s", filename, strerror(errno));
fwrite(content, sizeof(char), content_len, fh);
if (fclose(fh))
- die("Error when closing '%s': %s", filename, strerror(errno));
+ Util_die("Error when closing '%s': %s", filename, strerror(errno));
}

char*
-chaz_Util_slurp_file(char *file_path, size_t *len_ptr)
+Util_slurp_file(char *file_path, size_t *len_ptr)
{
FILE *const file = fopen(file_path, "r");
char *contents;
@@ -31,10 +31,10 @@

/* sanity check */
if (file == NULL)
- die("Error opening file '%s': %s", file_path, strerror(errno));
+ Util_die("Error opening file '%s': %s", file_path, strerror(errno));

/* find length; return NULL if the file has a zero-length */
- len = flength(file);
+ len = Util_flength(file);
if (len == 0) {
*len_ptr = 0;
return NULL;
@@ -43,13 +43,13 @@
/* allocate memory and read the file */
contents = (char*)malloc(len * sizeof(char) + 1);
if (contents == NULL)
- die("Out of memory at %d, %s", __FILE__, __LINE__);
+ Util_die("Out of memory at %d, %s", __FILE__, __LINE__);
contents[len] = '\0';
check_val = fread(contents, sizeof(char), len, file);

/* weak error check, because CRLF might result in fewer chars read */
if (check_val <= 0)
- die("Tried to read %d characters of '%s', got %d", (int)len,
+ Util_die("Tried to read %d characters of '%s', got %d", (int)len,
file_path, check_val);

/* set length pointer for benefit of caller */
@@ -57,13 +57,13 @@

/* clean up */
if (fclose(file))
- die("Error closing file '%s': %s", file_path, strerror(errno));
+ Util_die("Error closing file '%s': %s", file_path, strerror(errno));

return contents;
}

long
-chaz_Util_flength(FILE *f)
+Util_flength(FILE *f)
{
const long bookmark = ftell(f);
long check_val;
@@ -72,21 +72,21 @@
/* seek to end of file and check length */
check_val = fseek(f, 0, SEEK_END);
if (check_val == -1)
- die("fseek error : %s\n", strerror(errno));
+ Util_die("fseek error : %s\n", strerror(errno));
len = ftell(f);
if (len == -1)
- die("ftell error : %s\n", strerror(errno));
+ Util_die("ftell error : %s\n", strerror(errno));

/* return to where we were */
check_val = fseek(f, bookmark, SEEK_SET);
if (check_val == -1)
- die("fseek error : %s\n", strerror(errno));
+ Util_die("fseek error : %s\n", strerror(errno));

return len;
}

void
-chaz_Util_die(char* format, ...)
+Util_die(char* format, ...)
{
va_list args;
va_start(args, format);
@@ -97,7 +97,7 @@
}

void
-chaz_Util_warn(char* format, ...)
+Util_warn(char* format, ...)
{
va_list args;
va_start(args, format);
@@ -107,17 +107,17 @@
}

int
-chaz_Util_remove_and_verify(char *file_path)
+Util_remove_and_verify(char *file_path)
{
/* try to remove the file */
remove(file_path);

/* return what *might* be success or failure */
- return can_open_file(file_path) ? 0 : 1;
+ return Util_can_open_file(file_path) ? 0 : 1;
}

int
-chaz_Util_can_open_file(char *file_path)
+Util_can_open_file(char *file_path)
{
FILE *garbage_fh;


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h Thu Nov 26 19:32:00 2009
@@ -10,7 +10,7 @@

extern int chaz_Util_verbosity;

-/* Open a file (truncating if necessary) and write [content] to it. die() if
+/* Open a file (truncating if necessary) and write [content] to it. Util_die() if
* an error occurs.
*/
void
@@ -51,14 +51,14 @@
chaz_Util_can_open_file(char *file_path);

#ifdef CHAZ_USE_SHORT_NAMES
- #define verbosity chaz_Util_verbosity
- #define write_file chaz_Util_write_file
- #define slurp_file chaz_Util_slurp_file
- #define flength chaz_Util_flength
- #define die chaz_Util_die
- #define warn chaz_Util_warn
- #define remove_and_verify chaz_Util_remove_and_verify
- #define can_open_file chaz_Util_can_open_file
+ #define Util_verbosity chaz_Util_verbosity
+ #define Util_write_file chaz_Util_write_file
+ #define Util_slurp_file chaz_Util_slurp_file
+ #define Util_flength chaz_Util_flength
+ #define Util_die chaz_Util_die
+ #define Util_warn chaz_Util_warn
+ #define Util_remove_and_verify chaz_Util_remove_and_verify
+ #define Util_can_open_file chaz_Util_can_open_file
#endif

#endif /* H_CHAZ_UTIL */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c Thu Nov 26 19:32:00 2009
@@ -11,52 +11,52 @@
#include "Charmonizer/Core/OperSys.h"

void
-chaz_Probe_init(const char *osname, const char *cc_command,
+Probe_init(const char *osname, const char *cc_command,
const char *cc_flags, const char *charmony_start)
{
/* create os and compiler objects */
- os = OS_new(osname);
- compiler = CC_new(os, cc_command, cc_flags);
+ ModHand_os = OS_new(osname);
+ ModHand_compiler = CC_new(ModHand_os, cc_command, cc_flags);

/* dispatch other tasks */
ModHand_init();
HeadCheck_init();
ModHand_open_charmony_h(charmony_start);

- if (verbosity)
+ if (Util_verbosity)
printf("Initialization complete.\n");
}

void
-chaz_Probe_clean_up()
+Probe_clean_up()
{
- if (verbosity)
+ if (Util_verbosity)
printf("Cleaning up...\n");

/* dispatch ModHandler's clean up routines, destroy objects */
ModHand_clean_up();
- os->destroy(os);
- compiler->destroy(compiler);
+ ModHand_os->destroy(ModHand_os);
+ ModHand_compiler->destroy(ModHand_compiler);

- if (verbosity)
+ if (Util_verbosity)
printf("Cleanup complete.\n");
}

void
-chaz_Probe_set_verbosity(int level)
+Probe_set_verbosity(int level)
{
- verbosity = level;
+ Util_verbosity = level;
}

char*
-chaz_Probe_slurp_file(char* filepath, size_t *len_ptr) {
- return slurp_file(filepath, len_ptr);
+Probe_slurp_file(char* filepath, size_t *len_ptr) {
+ return Util_slurp_file(filepath, len_ptr);
}

FILE*
-chaz_Probe_get_charmony_fh(void)
+Probe_get_charmony_fh(void)
{
- return charmony_fh;
+ return ModHand_charmony_fh;
}

/**

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.h Thu Nov 26 19:32:00 2009
@@ -42,6 +42,13 @@
FILE*
chaz_Probe_get_charmony_fh(void);

+#ifdef CHAZ_USE_SHORT_NAMES
+ #define Probe_init chaz_Probe_init
+ #define Probe_clean_up chaz_Probe_clean_up
+ #define Probe_set_verbosity chaz_Probe_set_verbosity
+ #define Probe_slurp_file chaz_Probe_slurp_file
+#endif
+
#endif /* include guard */

/**

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c Thu Nov 26 19:32:00 2009
@@ -10,14 +10,14 @@
#include <stdlib.h>

void
-chaz_DirManip_run(void)
+DirManip_run(void)
{
FILE *f;
char dir_sep[3];
chaz_bool_t dir_sep_is_valid = false;
chaz_bool_t remove_zaps_dirs = false;
- chaz_bool_t has_dirent_h = check_header("dirent.h");
- chaz_bool_t has_direct_h = check_header("direct.h");
+ chaz_bool_t has_dirent_h = HeadCheck_check_header("dirent.h");
+ chaz_bool_t has_direct_h = HeadCheck_check_header("direct.h");
chaz_bool_t has_dirent_d_namlen = false;
chaz_bool_t has_dirent_d_type = false;

@@ -26,10 +26,10 @@

/* Header checks. */
if (has_dirent_h) {
- append_conf("#define CHY_HAS_DIRENT_H\n");
+ ModHand_append_conf("#define CHY_HAS_DIRENT_H\n");
}
if (has_direct_h) {
- append_conf("#define CHY_HAS_DIRECT_H\n");
+ ModHand_append_conf("#define CHY_HAS_DIRECT_H\n");
}

/* Check for members in struct dirent. */
@@ -37,26 +37,26 @@
has_dirent_d_namlen = HeadCheck_contains_member("struct dirent",
"d_namlen", "#include <sys/types.h>\n#include <dirent.h>");
if (has_dirent_d_namlen) {
- append_conf("#define CHY_HAS_DIRENT_D_NAMLEN\n", dir_sep);
+ ModHand_append_conf("#define CHY_HAS_DIRENT_D_NAMLEN\n", dir_sep);
}
has_dirent_d_type = HeadCheck_contains_member("struct dirent",
"d_type", "#include <sys/types.h>\n#include <dirent.h>");
if (has_dirent_d_type) {
- append_conf("#define CHY_HAS_DIRENT_D_TYPE\n", dir_sep);
+ ModHand_append_conf("#define CHY_HAS_DIRENT_D_TYPE\n", dir_sep);
}
}

if (Dir_mkdir_num_args == 2) {
/* It's two args, but the command isn't "mkdir". */
- append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n",
+ ModHand_append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n",
Dir_mkdir_command);
- append_conf("#define CHY_MAKEDIR_MODE_IGNORED 0\n");
+ ModHand_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 0\n");
}
else if (Dir_mkdir_num_args == 1) {
/* It's one arg... mode arg will be ignored. */
- append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n",
+ ModHand_append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n",
Dir_mkdir_command);
- append_conf("#define CHY_MAKEDIR_MODE_IGNORED 1\n");
+ ModHand_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 1\n");
}

/* Create a directory. */
@@ -83,7 +83,7 @@
dir_sep_is_valid = true;
}
if (dir_sep_is_valid) {
- append_conf("#define CHY_DIR_SEP \"%s\"\n", dir_sep);
+ ModHand_append_conf("#define CHY_DIR_SEP \"%s\"\n", dir_sep);
}

/* Clean up - delete all possible files without verifying. */
@@ -98,20 +98,20 @@
Dir_mkdir("_charm_test_remove_me");
if (0 == remove("_charm_test_remove_me")) {
remove_zaps_dirs = true;
- append_conf("#define CHY_REMOVE_ZAPS_DIRS\n");
+ ModHand_append_conf("#define CHY_REMOVE_ZAPS_DIRS\n");
}
Dir_rmdir("_charm_test_remove_me");

/* Shorten. */
START_SHORT_NAMES;
- if (dir_sep_is_valid) { shorten_macro("DIR_SEP"); }
- if (has_dirent_h) { shorten_macro("HAS_DIRENT_H"); }
- if (has_direct_h) { shorten_macro("HAS_DIRECT_H"); }
- if (has_dirent_d_namlen) { shorten_macro("HAS_DIRENT_D_NAMLEN"); }
- if (has_dirent_d_type) { shorten_macro("HAS_DIRENT_D_TYPE"); }
- shorten_function("makedir");
- shorten_macro("MAKEDIR_MODE_IGNORED");
- if (remove_zaps_dirs) { shorten_macro("REMOVE_ZAPS_DIRS"); }
+ if (dir_sep_is_valid) { ModHand_shorten_macro("DIR_SEP"); }
+ if (has_dirent_h) { ModHand_shorten_macro("HAS_DIRENT_H"); }
+ if (has_direct_h) { ModHand_shorten_macro("HAS_DIRECT_H"); }
+ if (has_dirent_d_namlen) { ModHand_shorten_macro("HAS_DIRENT_D_NAMLEN"); }
+ if (has_dirent_d_type) { ModHand_shorten_macro("HAS_DIRENT_D_TYPE"); }
+ ModHand_shorten_function("makedir");
+ ModHand_shorten_macro("MAKEDIR_MODE_IGNORED");
+ if (remove_zaps_dirs) { ModHand_shorten_macro("REMOVE_ZAPS_DIRS"); }

END_SHORT_NAMES;


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c Thu Nov 26 19:32:00 2009
@@ -9,18 +9,18 @@
#include <stdlib.h>

void
-chaz_Floats_run(void)
+Floats_run(void)
{
START_RUN("Floats");

- append_conf(
+ ModHand_append_conf(
"typedef float chy_f32_t;\n"
"typedef double chy_f64_t;\n"
"#define CHY_HAS_F32_T\n"
"#define CHY_HAS_F64_T\n"
);

- append_conf(
+ ModHand_append_conf(
"typedef union { chy_i32_t i; float f; } chy_floati32;\n"
"static const chy_floati32 chy_f32inf = {CHY_I32_C(0x7f800000)};\n"
"static const chy_floati32 chy_f32neginf = {CHY_I32_C(0xff800000)};\n"
@@ -32,13 +32,13 @@

/* Shorten. */
START_SHORT_NAMES;
- shorten_typedef("f32_t");
- shorten_typedef("f64_t");
- shorten_macro("HAS_F32_T");
- shorten_macro("HAS_F64_T");
- shorten_macro("F32_INF");
- shorten_macro("F32_NEGINF");
- shorten_macro("F32_NAN");
+ ModHand_shorten_typedef("f32_t");
+ ModHand_shorten_typedef("f64_t");
+ ModHand_shorten_macro("HAS_F32_T");
+ ModHand_shorten_macro("HAS_F64_T");
+ ModHand_shorten_macro("F32_INF");
+ ModHand_shorten_macro("F32_NEGINF");
+ ModHand_shorten_macro("F32_NAN");
END_SHORT_NAMES;

END_RUN;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c Thu Nov 26 19:32:00 2009
@@ -42,7 +42,7 @@
S_try_inline(const char *keyword, size_t *output_len) {
char code[ sizeof(inline_code) + 30 ];
sprintf(code, inline_code, keyword);
- return capture_output(code, strlen(code), output_len);
+ return ModHand_capture_output(code, strlen(code), output_len);
}

static const char* inline_options[] = {
@@ -53,7 +53,7 @@
static int num_inline_options = sizeof(inline_options) / sizeof(void*);

void
-chaz_FuncMacro_run(void)
+FuncMacro_run(void)
{
int i;
char *output;
@@ -66,7 +66,7 @@
START_RUN("FuncMacro");

/* check for ISO func macro */
- output = capture_output(iso_func_code, strlen(iso_func_code),
+ output = ModHand_capture_output(iso_func_code, strlen(iso_func_code),
&output_len);
if (output != NULL && strncmp(output, "main", 4) == 0) {
has_funcmac = true;
@@ -75,7 +75,7 @@
free(output);

/* check for GNUC func macro */
- output = capture_output(gnuc_func_code, strlen(gnuc_func_code),
+ output = ModHand_capture_output(gnuc_func_code, strlen(gnuc_func_code),
&output_len);
if (output != NULL && strncmp(output, "main", 4) == 0) {
has_funcmac = true;
@@ -88,7 +88,7 @@
char *macro_text = has_iso_funcmac
? "__func__"
: "__FUNCTION__";
- append_conf(
+ ModHand_append_conf(
"#define CHY_HAS_FUNC_MACRO\n"
"#define CHY_FUNC_MACRO %s\n",
macro_text
@@ -97,10 +97,10 @@

/* write out specific defines */
if (has_iso_funcmac) {
- append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
+ ModHand_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
}
if (has_gnuc_funcmac) {
- append_conf("#define CHY_HAS_GNUC_FUNC_MACRO\n");
+ ModHand_append_conf("#define CHY_HAS_GNUC_FUNC_MACRO\n");
}

/* Check for inline keyword. */
@@ -110,26 +110,26 @@
output = S_try_inline(inline_option, &output_len);
if (output != NULL) {
has_inline = true;
- append_conf("#define CHY_INLINE %s\n", inline_option);
+ ModHand_append_conf("#define CHY_INLINE %s\n", inline_option);
free(output);
break;
}
}
if (!has_inline) {
- append_conf("#define CHY_INLINE\n");
+ ModHand_append_conf("#define CHY_INLINE\n");
}

/* shorten */
START_SHORT_NAMES;
if (has_iso_funcmac)
- shorten_macro("HAS_ISO_FUNC_MACRO");
+ ModHand_shorten_macro("HAS_ISO_FUNC_MACRO");
if (has_gnuc_funcmac)
- shorten_macro("HAS_GNUC_FUNC_MACRO");
+ ModHand_shorten_macro("HAS_GNUC_FUNC_MACRO");
if (has_iso_funcmac || has_gnuc_funcmac) {
- shorten_macro("HAS_FUNC_MACRO");
- shorten_macro("FUNC_MACRO");
+ ModHand_shorten_macro("HAS_FUNC_MACRO");
+ ModHand_shorten_macro("FUNC_MACRO");
}
- shorten_macro("INLINE");
+ ModHand_shorten_macro("INLINE");
END_SHORT_NAMES;

END_RUN;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c Thu Nov 26 19:32:00 2009
@@ -77,13 +77,13 @@
};

chaz_bool_t
-chaz_Headers_check(const char *header_name)
+Headers_check(const char *header_name)
{
- return check_header(header_name);
+ return HeadCheck_check_header(header_name);
}

void
-chaz_Headers_run(void)
+Headers_run(void)
{
int i;
chaz_bool_t has_posix = false;
@@ -94,9 +94,9 @@
START_RUN("Headers");

/* Try for all POSIX headers in one blast. */
- if (check_many_headers((const char**)posix_headers)) {
+ if (HeadCheck_check_many_headers((const char**)posix_headers)) {
has_posix = true;
- append_conf("#define CHY_HAS_POSIX\n");
+ ModHand_append_conf("#define CHY_HAS_POSIX\n");
for (i = 0; posix_headers[i] != NULL; i++) {
S_keep(posix_headers[i]);
}
@@ -104,17 +104,17 @@
/* Test one-at-a-time. */
else {
for (i = 0; posix_headers[i] != NULL; i++) {
- if (check_header(posix_headers[i])) {
+ if (HeadCheck_check_header(posix_headers[i])) {
S_keep(posix_headers[i]);
}
}
}

/* test for all c89 headers in one blast */
- if (check_many_headers((const char**)c89_headers)) {
+ if (HeadCheck_check_many_headers((const char**)c89_headers)) {
has_c89 = true;
- append_conf("#define CHY_HAS_C89\n");
- append_conf("#define CHY_HAS_C90\n");
+ ModHand_append_conf("#define CHY_HAS_C89\n");
+ ModHand_append_conf("#define CHY_HAS_C90\n");
for (i = 0; c89_headers[i] != NULL; i++) {
S_keep(c89_headers[i]);
}
@@ -122,14 +122,14 @@
/* Test one-at-a-time. */
else {
for (i = 0; c89_headers[i] != NULL; i++) {
- if (check_header(c89_headers[i])) {
+ if (HeadCheck_check_header(c89_headers[i])) {
S_keep(c89_headers[i]);
}
}
}

/* Test for all Windows headers in one blast */
- if (check_many_headers((const char**)win_headers)) {
+ if (HeadCheck_check_many_headers((const char**)win_headers)) {
for (i = 0; win_headers[i] != NULL; i++) {
S_keep(win_headers[i]);
}
@@ -137,7 +137,7 @@
/* Test one-at-a-time. */
else {
for (i = 0; win_headers[i] != NULL; i++) {
- if (check_header(win_headers[i])) {
+ if (HeadCheck_check_header(win_headers[i])) {
S_keep(win_headers[i]);
}
}
@@ -146,20 +146,20 @@
/* append the config with every header detected so far */
for (i = 0; keepers[i] != NULL; i++) {
S_encode_affirmation(keepers[i]);
- append_conf("#define CHY_%s\n", aff_buf);
+ ModHand_append_conf("#define CHY_%s\n", aff_buf);
}

/* shorten */
START_SHORT_NAMES;
if (has_posix)
- shorten_macro("HAS_POSIX");
+ ModHand_shorten_macro("HAS_POSIX");
if (has_c89) {
- shorten_macro("HAS_C89");
- shorten_macro("HAS_C90");
+ ModHand_shorten_macro("HAS_C89");
+ ModHand_shorten_macro("HAS_C90");
}
for (i = 0; keepers[i] != NULL; i++) {
S_encode_affirmation(keepers[i]);
- shorten_macro(aff_buf);
+ ModHand_shorten_macro(aff_buf);
}
END_SHORT_NAMES;

@@ -170,7 +170,7 @@
S_keep(const char *header_name)
{
if (keeper_count >= MAX_KEEPER_COUNT)
- die("Too many keepers -- increase MAX_KEEPER_COUNT");
+ Util_die("Too many keepers -- increase MAX_KEEPER_COUNT");
keepers[keeper_count++] = header_name;
keepers[keeper_count] = NULL;
}

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c Thu Nov 26 19:32:00 2009
@@ -50,7 +50,7 @@
METAQUOTE;

void
-chaz_Integers_run(void)
+Integers_run(void)
{
char *output;
size_t output_len;
@@ -67,7 +67,7 @@
chaz_bool_t has_64 = false;
chaz_bool_t has_long_long = false;
chaz_bool_t has___int64 = false;
- chaz_bool_t has_inttypes = check_header("inttypes.h");
+ chaz_bool_t has_inttypes = HeadCheck_check_header("inttypes.h");
char i32_t_type[10];
char i32_t_postfix[10];
char u32_t_postfix[10];
@@ -80,12 +80,12 @@

/* document endian-ness */
if (S_machine_is_big_endian())
- append_conf("#define CHY_BIG_END\n");
+ ModHand_append_conf("#define CHY_BIG_END\n");
else
- append_conf("#define CHY_LITTLE_END\n");
+ ModHand_append_conf("#define CHY_LITTLE_END\n");

/* Record sizeof() for several common integer types. */
- output = capture_output(sizes_code, strlen(sizes_code), &output_len);
+ output = ModHand_capture_output(sizes_code, strlen(sizes_code), &output_len);
if (output != NULL) {
char *end_ptr = output;

@@ -102,7 +102,7 @@

/* determine whether long longs are available */
sprintf(code_buf, type64_code, "long long");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL) {
has_long_long = true;
sizeof_long_long = strtol(output, NULL, 10);
@@ -110,7 +110,7 @@

/* determine whether the __int64 type is available */
sprintf(code_buf, type64_code, "__int64");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL) {
has___int64 = true;
sizeof___int64 = strtol(output, NULL, 10);
@@ -155,58 +155,58 @@
}
else if (has_64) {
sprintf(code_buf, literal64_code, "LL");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL) {
strcpy(i64_t_postfix, "LL");
}
else {
sprintf(code_buf, literal64_code, "i64");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL)
strcpy(i64_t_postfix, "i64");
else
- die("64-bit types, but no literal syntax found");
+ Util_die("64-bit types, but no literal syntax found");
}
sprintf(code_buf, literal64_code, "ULL");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL) {
strcpy(u64_t_postfix, "ULL");
}
else {
sprintf(code_buf, literal64_code, "Ui64");
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
if (output != NULL)
strcpy(u64_t_postfix, "Ui64");
else
- die("64-bit types, but no literal syntax found");
+ Util_die("64-bit types, but no literal syntax found");
}
}

/* write out some conditional defines */
if (has_inttypes)
- append_conf("#define CHY_HAS_INTTYPES_H\n");
+ ModHand_append_conf("#define CHY_HAS_INTTYPES_H\n");
if (has_long_long)
- append_conf("#define CHY_HAS_LONG_LONG\n");
+ ModHand_append_conf("#define CHY_HAS_LONG_LONG\n");
if (has___int64)
- append_conf("#define CHY_HAS___INT64\n");
+ ModHand_append_conf("#define CHY_HAS___INT64\n");

/* write out sizes */
- append_conf("#define CHY_SIZEOF_CHAR %d\n", sizeof_char);
- append_conf("#define CHY_SIZEOF_SHORT %d\n", sizeof_short);
- append_conf("#define CHY_SIZEOF_INT %d\n", sizeof_int);
- append_conf("#define CHY_SIZEOF_LONG %d\n", sizeof_long);
- append_conf("#define CHY_SIZEOF_PTR %d\n", sizeof_ptr);
+ ModHand_append_conf("#define CHY_SIZEOF_CHAR %d\n", sizeof_char);
+ ModHand_append_conf("#define CHY_SIZEOF_SHORT %d\n", sizeof_short);
+ ModHand_append_conf("#define CHY_SIZEOF_INT %d\n", sizeof_int);
+ ModHand_append_conf("#define CHY_SIZEOF_LONG %d\n", sizeof_long);
+ ModHand_append_conf("#define CHY_SIZEOF_PTR %d\n", sizeof_ptr);
if (has_long_long) {
- append_conf("#define CHY_SIZEOF_LONG_LONG %d\n", sizeof_long_long);
+ ModHand_append_conf("#define CHY_SIZEOF_LONG_LONG %d\n", sizeof_long_long);
}
if (has___int64) {
- append_conf("#define CHY_SIZEOF___INT64 %d\n", sizeof___int64);
+ ModHand_append_conf("#define CHY_SIZEOF___INT64 %d\n", sizeof___int64);
}

/* write affirmations, typedefs and maximums/minimums */
- append_conf("typedef int chy_bool_t;\n");
+ ModHand_append_conf("typedef int chy_bool_t;\n");
if (has_8) {
- append_conf(
+ ModHand_append_conf(
"#define CHY_HAS_I8_T\n"
"typedef signed char chy_i8_t;\n"
"typedef unsigned char chy_u8_t;\n"
@@ -216,7 +216,7 @@
);
}
if (has_16) {
- append_conf(
+ ModHand_append_conf(
"#define CHY_HAS_I16_T\n"
"typedef short chy_i16_t;\n"
"typedef unsigned short chy_u16_t;\n"
@@ -226,23 +226,23 @@
);
}
if (has_32) {
- append_conf("#define CHY_HAS_I32_T\n");
- append_conf("typedef %s chy_i32_t;\n", i32_t_type);
- append_conf("typedef unsigned %s chy_u32_t;\n", i32_t_type);
- append_conf("#define CHY_I32_MAX 0x7FFFFFFF%s\n", i32_t_postfix);
- append_conf("#define CHY_I32_MIN (-I32_MAX - 1)\n");
- append_conf("#define CHY_U32_MAX (I32_MAX * 2%s + 1%s)\n",
+ ModHand_append_conf("#define CHY_HAS_I32_T\n");
+ ModHand_append_conf("typedef %s chy_i32_t;\n", i32_t_type);
+ ModHand_append_conf("typedef unsigned %s chy_u32_t;\n", i32_t_type);
+ ModHand_append_conf("#define CHY_I32_MAX 0x7FFFFFFF%s\n", i32_t_postfix);
+ ModHand_append_conf("#define CHY_I32_MIN (-I32_MAX - 1)\n");
+ ModHand_append_conf("#define CHY_U32_MAX (I32_MAX * 2%s + 1%s)\n",
u32_t_postfix, u32_t_postfix);
}
if (has_64) {
- append_conf("#define CHY_HAS_I64_T\n");
- append_conf("typedef %s chy_i64_t;\n", i64_t_type);
- append_conf("typedef unsigned %s chy_u64_t;\n", i64_t_type);
- append_conf("#define CHY_I64_MAX 0x7FFFFFFFFFFFFFFF%s\n",
+ ModHand_append_conf("#define CHY_HAS_I64_T\n");
+ ModHand_append_conf("typedef %s chy_i64_t;\n", i64_t_type);
+ ModHand_append_conf("typedef unsigned %s chy_u64_t;\n", i64_t_type);
+ ModHand_append_conf("#define CHY_I64_MAX 0x7FFFFFFFFFFFFFFF%s\n",
i64_t_postfix);
- append_conf("#define CHY_I64_MIN (-I64_MAX - 1%s)\n",
+ ModHand_append_conf("#define CHY_I64_MIN (-I64_MAX - 1%s)\n",
i64_t_postfix);
- append_conf("#define CHY_U64_MAX (I64_MAX * 2%s + 1%s)\n",
+ ModHand_append_conf("#define CHY_U64_MAX (I64_MAX * 2%s + 1%s)\n",
u64_t_postfix, u64_t_postfix);
}

@@ -277,14 +277,14 @@
sprintf(format_64_code,
"%s\"%%%su\", 18446744073709551615%s%s", format_64_code_a,
options[i], u64_t_postfix, format_64_code_b);
- output = capture_output(format_64_code, strlen(format_64_code),
+ output = ModHand_capture_output(format_64_code, strlen(format_64_code),
&output_len);

if ( output_len != 0
&& strcmp(output, "18446744073709551615") == 0
) {
- append_conf("#define CHY_I64P \"%sd\"\n", options[i]);
- append_conf("#define CHY_U64P \"%su\"\n", options[i]);
+ ModHand_append_conf("#define CHY_I64P \"%sd\"\n", options[i]);
+ ModHand_append_conf("#define CHY_U64P \"%su\"\n", options[i]);
break;
}
}
@@ -294,33 +294,33 @@
/* write out the 32-bit and 64-bit literal macros */
if (has_32) {
if (strcmp(i32_t_postfix, "") == 0) {
- append_conf("#define CHY_I32_C(n) n\n");
- append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
+ ModHand_append_conf("#define CHY_I32_C(n) n\n");
+ ModHand_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
}
else {
- append_conf("#define CHY_I32_C(n) n##%s\n", i32_t_postfix);
- append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
+ ModHand_append_conf("#define CHY_I32_C(n) n##%s\n", i32_t_postfix);
+ ModHand_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
}
}
if (has_64) {
- append_conf("#define CHY_I64_C(n) n##%s\n", i64_t_postfix);
- append_conf("#define CHY_U64_C(n) n##%s\n", u64_t_postfix);
+ ModHand_append_conf("#define CHY_I64_C(n) n##%s\n", i64_t_postfix);
+ ModHand_append_conf("#define CHY_U64_C(n) n##%s\n", u64_t_postfix);
}

/* Create macro for promoting pointers to integers. */
if (has_64) {
if (sizeof_ptr == 8) {
- append_conf("#define CHY_PTR2I64(ptr) "
+ ModHand_append_conf("#define CHY_PTR2I64(ptr) "
"((chy_i64_t)(chy_u64_t)(ptr))\n");
}
else {
- append_conf("#define CHY_PTR2I64(ptr) "
+ ModHand_append_conf("#define CHY_PTR2I64(ptr) "
"((chy_i64_t)(chy_u32_t)(ptr))\n");
}
}

/* true and false */
- append_conf(
+ ModHand_append_conf(
"#ifndef true\n"
" #define true 1\n"
"#endif\n"
@@ -332,65 +332,65 @@
/* shorten */
START_SHORT_NAMES;
if ( S_machine_is_big_endian() ) {
- shorten_macro("BIG_END");
+ ModHand_shorten_macro("BIG_END");
}
else {
- shorten_macro("LITTLE_END");
+ ModHand_shorten_macro("LITTLE_END");
}
- shorten_macro("SIZEOF_CHAR");
- shorten_macro("SIZEOF_SHORT");
- shorten_macro("SIZEOF_LONG");
- shorten_macro("SIZEOF_INT");
- shorten_macro("SIZEOF_PTR");
+ ModHand_shorten_macro("SIZEOF_CHAR");
+ ModHand_shorten_macro("SIZEOF_SHORT");
+ ModHand_shorten_macro("SIZEOF_LONG");
+ ModHand_shorten_macro("SIZEOF_INT");
+ ModHand_shorten_macro("SIZEOF_PTR");
if (has_long_long) {
- shorten_macro("HAS_LONG_LONG");
- shorten_macro("SIZEOF_LONG_LONG");
+ ModHand_shorten_macro("HAS_LONG_LONG");
+ ModHand_shorten_macro("SIZEOF_LONG_LONG");
}
if (has___int64) {
- shorten_macro("HAS___INT64");
- shorten_macro("SIZEOF___INT64");
+ ModHand_shorten_macro("HAS___INT64");
+ ModHand_shorten_macro("SIZEOF___INT64");
}
if (has_inttypes)
- shorten_macro("HAS_INTTYPES_H");
- shorten_typedef("bool_t");
+ ModHand_shorten_macro("HAS_INTTYPES_H");
+ ModHand_shorten_typedef("bool_t");
if (has_8) {
- shorten_macro("HAS_I8_T");
- shorten_typedef("i8_t");
- shorten_typedef("u8_t");
- shorten_macro("I8_MAX");
- shorten_macro("I8_MIN");
- shorten_macro("U8_MAX");
+ ModHand_shorten_macro("HAS_I8_T");
+ ModHand_shorten_typedef("i8_t");
+ ModHand_shorten_typedef("u8_t");
+ ModHand_shorten_macro("I8_MAX");
+ ModHand_shorten_macro("I8_MIN");
+ ModHand_shorten_macro("U8_MAX");
}
if (has_16) {
- shorten_macro("HAS_I16_T");
- shorten_typedef("i16_t");
- shorten_typedef("u16_t");
- shorten_macro("I16_MAX");
- shorten_macro("I16_MIN");
- shorten_macro("U16_MAX");
+ ModHand_shorten_macro("HAS_I16_T");
+ ModHand_shorten_typedef("i16_t");
+ ModHand_shorten_typedef("u16_t");
+ ModHand_shorten_macro("I16_MAX");
+ ModHand_shorten_macro("I16_MIN");
+ ModHand_shorten_macro("U16_MAX");
}
if (has_32) {
- shorten_macro("HAS_I32_T");
- shorten_typedef("i32_t");
- shorten_typedef("u32_t");
- shorten_macro("I32_MAX");
- shorten_macro("I32_MIN");
- shorten_macro("U32_MAX");
- shorten_macro("I32_C");
- shorten_macro("U32_C");
+ ModHand_shorten_macro("HAS_I32_T");
+ ModHand_shorten_typedef("i32_t");
+ ModHand_shorten_typedef("u32_t");
+ ModHand_shorten_macro("I32_MAX");
+ ModHand_shorten_macro("I32_MIN");
+ ModHand_shorten_macro("U32_MAX");
+ ModHand_shorten_macro("I32_C");
+ ModHand_shorten_macro("U32_C");
}
if (has_64) {
- shorten_macro("HAS_I64_T");
- shorten_typedef("i64_t");
- shorten_typedef("u64_t");
- shorten_macro("I64_MAX");
- shorten_macro("I64_MIN");
- shorten_macro("U64_MAX");
- shorten_macro("I64P");
- shorten_macro("U64P");
- shorten_macro("I64_C");
- shorten_macro("U64_C");
- shorten_macro("PTR2I64");
+ ModHand_shorten_macro("HAS_I64_T");
+ ModHand_shorten_typedef("i64_t");
+ ModHand_shorten_typedef("u64_t");
+ ModHand_shorten_macro("I64_MAX");
+ ModHand_shorten_macro("I64_MIN");
+ ModHand_shorten_macro("U64_MAX");
+ ModHand_shorten_macro("I64P");
+ ModHand_shorten_macro("U64P");
+ ModHand_shorten_macro("I64_C");
+ ModHand_shorten_macro("U64_C");
+ ModHand_shorten_macro("PTR2I64");
}
END_SHORT_NAMES;


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c Thu Nov 26 19:32:00 2009
@@ -61,7 +61,7 @@
static char off64_type[10];

void
-chaz_LargeFiles_run(void)
+LargeFiles_run(void)
{
chaz_bool_t success = false;
unsigned i;
@@ -83,25 +83,25 @@

/* write the affirmations/definitions */
if (success) {
- append_conf("#define CHY_HAS_LARGE_FILE_SUPPORT\n");
+ ModHand_append_conf("#define CHY_HAS_LARGE_FILE_SUPPORT\n");
/* alias these only if they're not already provided and correct */
if (strcmp(off64_type, "off64_t") != 0) {
- append_conf("#define chy_off64_t %s\n", off64_type);
- append_conf("#define chy_fopen64 %s\n", fopen_command);
- append_conf("#define chy_ftello64 %s\n", ftell_command);
- append_conf("#define chy_fseeko64 %s\n", fseek_command);
+ ModHand_append_conf("#define chy_off64_t %s\n", off64_type);
+ ModHand_append_conf("#define chy_fopen64 %s\n", fopen_command);
+ ModHand_append_conf("#define chy_ftello64 %s\n", ftell_command);
+ ModHand_append_conf("#define chy_fseeko64 %s\n", fseek_command);
}
}

/* check for sparse files */
if (S_check_sparse_files()) {
- append_conf("#define CHAZ_HAS_SPARSE_FILES\n");
+ ModHand_append_conf("#define CHAZ_HAS_SPARSE_FILES\n");
/* see if we can create a 5 GB file without crashing */
if (success && S_can_create_big_files())
- append_conf("#define CHAZ_CAN_CREATE_BIG_FILES\n");
+ ModHand_append_conf("#define CHAZ_CAN_CREATE_BIG_FILES\n");
}
else {
- append_conf("#define CHAZ_NO_SPARSE_FILES\n");
+ ModHand_append_conf("#define CHAZ_NO_SPARSE_FILES\n");
}

/* test for unbuffered LFS commands */
@@ -112,14 +112,14 @@
/* short names */
if (success) {
START_SHORT_NAMES;
- shorten_macro("HAS_LARGE_FILE_SUPPORT");
+ ModHand_shorten_macro("HAS_LARGE_FILE_SUPPORT");

/* alias these only if they're not already provided and correct */
if (strcmp(off64_type, "off64_t") != 0) {
- shorten_typedef("off64_t");
- shorten_function("fopen64");
- shorten_function("ftello64");
- shorten_function("fseeko64");
+ ModHand_shorten_typedef("off64_t");
+ ModHand_shorten_function("fopen64");
+ ModHand_shorten_function("ftello64");
+ ModHand_shorten_function("fseeko64");
}
END_SHORT_NAMES;
}
@@ -165,7 +165,7 @@
combo->fseek_command);

/* verify compilation and that the offset type has 8 bytes */
- output = capture_output(code_buf, strlen(code_buf),
+ output = ModHand_capture_output(code_buf, strlen(code_buf),
&output_len);
if (output != NULL) {
long size = strtol(output, NULL, 10);
@@ -183,7 +183,7 @@
Stat st_a, st_b;

/* bail out if we can't stat() a file */
- if (!check_header("sys/stat.h"))
+ if (!HeadCheck_check_header("sys/stat.h"))
return false;

/* write and stat a 1 MB file and a 2 MB file, both of them sparse */
@@ -192,9 +192,9 @@
if (!(st_a.valid && st_b.valid))
return false;
if (st_a.size != 1000001)
- die ("Expected size of 1000001 but got %ld", (long)st_a.size);
+ Util_die("Expected size of 1000001 but got %ld", (long)st_a.size);
if (st_b.size != 2000001)
- die ("Expected size of 2000001 but got %ld", (long)st_b.size);
+ Util_die("Expected size of 2000001 but got %ld", (long)st_b.size);

/* see if two files with very different lengths have the same block size */
if (st_a.blocks == st_b.blocks)
@@ -209,17 +209,17 @@
FILE *sparse_fh;

/* make sure the file's not there, then open */
- remove_and_verify("_charm_sparse");
+ Util_remove_and_verify("_charm_sparse");
if ( (sparse_fh = fopen("_charm_sparse", "w+")) == NULL )
- die("Couldn't open file '_charm_sparse'");
+ Util_die("Couldn't open file '_charm_sparse'");

/* seek fh to [offset], write a byte, close file */
if ( (fseek(sparse_fh, offset, SEEK_SET)) == -1)
- die("seek failed: %s", strerror(errno));
+ Util_die("seek failed: %s", strerror(errno));
if ( (fprintf(sparse_fh, "X")) != 1 )
- die("fprintf failed");
+ Util_die("fprintf failed");
if (fclose(sparse_fh))
- die("Error closing file '_charm_sparse': %s", strerror(errno));
+ Util_die("Error closing file '_charm_sparse': %s", strerror(errno));

/* stat the file */
Stat_stat("_charm_sparse", st);
@@ -268,13 +268,13 @@
/* concat the source strings, compile the file, capture output */
sprintf(code_buf, "%s%s%s", create_bigfile_code_a, fseek_command,
create_bigfile_code_b);
- output = capture_output(code_buf, strlen(code_buf), &output_len);
+ output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);

/* truncate, just in case the call to remove fails */
truncating_fh = fopen("_charm_large_file_test", "w");
if (truncating_fh != NULL)
fclose(truncating_fh);
- remove_and_verify("_charm_large_file_test");
+ Util_remove_and_verify("_charm_large_file_test");

/* return true if the test app made it to the finish line */
free(code_buf);

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c Thu Nov 26 19:32:00 2009
@@ -8,18 +8,18 @@


void
-chaz_UnusedVars_run(void)
+UnusedVars_run(void)
{
START_RUN("UnusedVars");

/* write the macros (no test, these are the same everywhere) */
- append_conf("#define CHY_UNUSED_VAR(x) ((void)x)\n");
- append_conf("#define CHY_UNREACHABLE_RETURN(type) return (type)0\n");
+ ModHand_append_conf("#define CHY_UNUSED_VAR(x) ((void)x)\n");
+ ModHand_append_conf("#define CHY_UNREACHABLE_RETURN(type) return (type)0\n");

/* shorten */
START_SHORT_NAMES;
- shorten_macro("UNUSED_VAR");
- shorten_macro("UNREACHABLE_RETURN");
+ ModHand_shorten_macro("UNUSED_VAR");
+ ModHand_shorten_macro("UNREACHABLE_RETURN");
END_SHORT_NAMES;

END_RUN;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c Thu Nov 26 19:32:00 2009
@@ -32,7 +32,7 @@
METAQUOTE;

void
-chaz_VariadicMacros_run(void)
+VariadicMacros_run(void)
{
char *output;
size_t output_len;
@@ -43,33 +43,33 @@
START_RUN("VariadicMacros");

/* test for ISO-style variadic macros */
- output = capture_output(iso_code, strlen(iso_code), &output_len);
+ output = ModHand_capture_output(iso_code, strlen(iso_code), &output_len);
if (output != NULL) {
has_varmacros = true;
has_iso_varmacros = true;
- append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
- append_conf("#define CHY_HAS_ISO_VARIADIC_MACROS\n");
+ ModHand_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
+ ModHand_append_conf("#define CHY_HAS_ISO_VARIADIC_MACROS\n");
}

/* test for GNU-style variadic macros */
- output = capture_output(gnuc_code, strlen(gnuc_code), &output_len);
+ output = ModHand_capture_output(gnuc_code, strlen(gnuc_code), &output_len);
if (output != NULL) {
has_gnuc_varmacros = true;
if (has_varmacros == false) {
has_varmacros = true;
- append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
+ ModHand_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
}
- append_conf("#define CHY_HAS_GNUC_VARIADIC_MACROS\n");
+ ModHand_append_conf("#define CHY_HAS_GNUC_VARIADIC_MACROS\n");
}

/* shorten */
START_SHORT_NAMES;
if (has_varmacros)
- shorten_macro("HAS_VARIADIC_MACROS");
+ ModHand_shorten_macro("HAS_VARIADIC_MACROS");
if (has_iso_varmacros)
- shorten_macro("HAS_ISO_VARIADIC_MACROS");
+ ModHand_shorten_macro("HAS_ISO_VARIADIC_MACROS");
if (has_gnuc_varmacros)
- shorten_macro("HAS_GNUC_VARIADIC_MACROS");
+ ModHand_shorten_macro("HAS_GNUC_VARIADIC_MACROS");
END_SHORT_NAMES;

END_RUN;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h Thu Nov 26 19:32:00 2009
@@ -23,7 +23,7 @@
void chaz_VariadicMacros_run(void);

#ifdef CHAZ_USE_SHORT_NAMES
- #define VariadicMacros_run chaz_VaradicMacros_run
+ #define VariadicMacros_run chaz_VariadicMacros_run
#endif

#endif /* H_CHAZ_VARIADIC_MACROS */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.c Thu Nov 26 19:32:00 2009
@@ -19,7 +19,7 @@
printf("\n");

void
-chaz_Test_init(void) {
+Test_init(void) {
/* unbuffer stdout */
int check_val = setvbuf(stdout, NULL, _IONBF, 0);
if (check_val != 0)
@@ -27,7 +27,7 @@
}

TestBatch*
-chaz_Test_new_batch(const char *batch_name, unsigned num_tests,
+Test_new_batch(const char *batch_name, unsigned num_tests,
TestBatch_test_func_t test_func)
{
TestBatch *batch = (TestBatch*)malloc(sizeof(TestBatch));
@@ -49,7 +49,7 @@
}

void
-chaz_Test_plan(TestBatch *batch)
+Test_plan(TestBatch *batch)
{
printf("1..%u\n", batch->num_tests);
}
@@ -72,7 +72,7 @@
}

void
-chaz_Test_assert_true(TestBatch *batch, int value, const char *pat, ...)
+Test_assert_true(TestBatch *batch, int value, const char *pat, ...)
{
va_list args;

@@ -93,7 +93,7 @@
}

void
-chaz_Test_assert_false(TestBatch *batch, int value, const char *pat, ...)
+Test_assert_false(TestBatch *batch, int value, const char *pat, ...)
{
va_list args;

@@ -114,7 +114,7 @@
}

void
-chaz_Test_assert_str_eq(TestBatch *batch, const char *got,
+Test_assert_str_eq(TestBatch *batch, const char *got,
const char *expected, const char *pat, ...)
{
va_list args;
@@ -138,7 +138,7 @@


void
-chaz_Test_assert_str_neq(TestBatch *batch, const char *got,
+Test_assert_str_neq(TestBatch *batch, const char *got,
const char *expected, const char *pat, ...)
{
va_list args;
@@ -161,7 +161,7 @@
}

void
-chaz_Test_pass(TestBatch *batch, const char *pat, ...)
+Test_pass(TestBatch *batch, const char *pat, ...)
{
va_list args;

@@ -176,7 +176,7 @@
}

void
-chaz_Test_fail(TestBatch *batch, const char *pat, ...)
+Test_fail(TestBatch *batch, const char *pat, ...)
{
va_list args;

@@ -191,7 +191,7 @@
}

void
-chaz_Test_assert_int_eq(TestBatch *batch, long got, long expected,
+Test_assert_int_eq(TestBatch *batch, long got, long expected,
const char *pat, ...)
{
va_list args;
@@ -213,7 +213,7 @@
}

void
-chaz_Test_assert_float_eq(TestBatch *batch, double got,
+Test_assert_float_eq(TestBatch *batch, double got,
double expected, const char *pat, ...)
{
va_list args;
@@ -237,7 +237,7 @@
}

void
-chaz_Test_skip(TestBatch *batch, const char *pat, ...)
+Test_skip(TestBatch *batch, const char *pat, ...)
{
va_list args;

@@ -252,7 +252,7 @@
}

void
-chaz_Test_report_skip_remaining(TestBatch *batch, const char *pat, ...)
+Test_report_skip_remaining(TestBatch *batch, const char *pat, ...)
{
va_list args;
unsigned remaining = batch->num_tests - batch->test_num;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.h Thu Nov 26 19:32:00 2009
@@ -122,15 +122,25 @@
#define Test_new_batch chaz_Test_new_batch
#define Test_plan chaz_Test_plan
#define PLAN CHAZ_TEST_PLAN
+ #define Test_assert_true chaz_Test_assert_true
#define ASSERT_TRUE CHAZ_TEST_ASSERT_TRUE
+ #define Test_assert_false chaz_Test_assert_false
#define ASSERT_FALSE CHAZ_TEST_ASSERT_FALSE
+ #define Test_assert_str_eq chaz_Test_assert_str_eq
#define ASSERT_STR_EQ CHAZ_TEST_ASSERT_STR_EQ
+ #define Test_assert_str_neq chaz_Test_assert_str_neq
#define ASSERT_STR_NEQ CHAZ_TEST_ASSERT_STR_NEQ
+ #define Test_pass chaz_Test_pass
#define PASS CHAZ_TEST_PASS
+ #define Test_fail chaz_Test_fail
#define FAIL CHAZ_TEST_FAIL
+ #define Test_assert_int_eq chaz_Test_assert_int_eq
#define ASSERT_INT_EQ CHAZ_TEST_ASSERT_INT_EQ
+ #define Test_assert_float_eq chaz_Test_assert_float_eq
#define ASSERT_FLOAT_EQ CHAZ_TEST_ASSERT_FLOAT_EQ
+ #define Test_skip chaz_Test_skip
#define SKIP CHAZ_TEST_SKIP
+ #define Test_report_skip_remaining chaz_Test_report_skip_remaining
#define SKIP_REMAINING CHAZ_TEST_SKIP_REMAINING
#endif


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c Thu Nov 26 19:32:00 2009
@@ -7,24 +7,24 @@
static TestBatch **batches = NULL;

void
-chaz_AllTests_init()
+AllTests_init()
{
- chaz_Test_init();
+ Test_init();

/* create a null-terminated array of test batches to iterate over */
batches = malloc(8 * sizeof(TestBatch*));
- batches[0] = chaz_TDirManip_prepare();
- batches[1] = chaz_TFuncMacro_prepare();
- batches[2] = chaz_THeaders_prepare();
- batches[3] = chaz_TIntegers_prepare();
- batches[4] = chaz_TLargeFiles_prepare();
- batches[5] = chaz_TUnusedVars_prepare();
- batches[6] = chaz_TVariadicMacros_prepare();
+ batches[0] = TDirManip_prepare();
+ batches[1] = TFuncMacro_prepare();
+ batches[2] = THeaders_prepare();
+ batches[3] = TIntegers_prepare();
+ batches[4] = TLargeFiles_prepare();
+ batches[5] = TUnusedVars_prepare();
+ batches[6] = TVariadicMacros_prepare();
batches[7] = NULL;
}

void
-chaz_AllTests_run()
+AllTests_run()
{
int total_tests = 0;
int total_passed = 0;
@@ -40,7 +40,7 @@

/* loop through test functions, accumulating results */
for (i = 0; batches[i] != NULL; i++) {
- chaz_TestBatch *batch = batches[i];
+ TestBatch *batch = batches[i];
batch->run_test(batch);
total_tests += batch->num_tests;
total_passed += batch->num_passed;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h Thu Nov 26 19:32:00 2009
@@ -73,6 +73,7 @@

#ifdef CHAZ_USE_SHORT_NAMES
#define TDirManip_prepare chaz_TDirManip_prepare
+ #define TDirManip_run chaz_TDirManip_run
#define TFuncMacro_prepare chaz_TFuncMacro_prepare
#define THeaders_prepare chaz_THeaders_prepare
#define TIntegers_prepare chaz_TIntegers_prepare

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/DirManip.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/DirManip.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/DirManip.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/DirManip.c Thu Nov 26 19:32:00 2009
@@ -22,13 +22,13 @@
#endif

TestBatch*
-chaz_TDirManip_prepare()
+TDirManip_prepare()
{
- return Test_new_batch("Integers", 6, chaz_TDirManip_run);
+ return Test_new_batch("Integers", 6, TDirManip_run);
}

void
-chaz_TDirManip_run(TestBatch *batch)
+TDirManip_run(TestBatch *batch)
{
ASSERT_INT_EQ(batch, 0, makedir("_chaz_test_dir", 0777), "makedir");
ASSERT_INT_EQ(batch, 0, makedir("_chaz_test_dir" DIR_SEP "deep", 0777),

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/FuncMacro.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/FuncMacro.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/FuncMacro.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/FuncMacro.c Thu Nov 26 19:32:00 2009
@@ -6,9 +6,9 @@
#include "Charmonizer/Test/AllTests.h"

TestBatch*
-chaz_TFuncMacro_prepare()
+TFuncMacro_prepare()
{
- return Test_new_batch("FuncMacro", 4, chaz_TFuncMacro_run);
+ return Test_new_batch("FuncMacro", 4, TFuncMacro_run);
}

#ifdef INLINE
@@ -19,7 +19,7 @@
#endif

void
-chaz_TFuncMacro_run(TestBatch *batch)
+TFuncMacro_run(TestBatch *batch)
{

#ifdef HAS_FUNC_MACRO

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.c Thu Nov 26 19:32:00 2009
@@ -130,13 +130,13 @@
#endif

TestBatch*
-chaz_THeaders_prepare()
+THeaders_prepare()
{
- return Test_new_batch("Headers", 2, chaz_THeaders_run);
+ return Test_new_batch("Headers", 2, THeaders_run);
}

void
-chaz_THeaders_run(TestBatch *batch)
+THeaders_run(TestBatch *batch)
{
PASS(batch, "Compiled successfully with all detected headers");


Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.c Thu Nov 26 19:32:00 2009
@@ -10,13 +10,13 @@
#endif

TestBatch*
-chaz_TIntegers_prepare()
+TIntegers_prepare()
{
- return Test_new_batch("Integers", 37, chaz_TIntegers_run);
+ return Test_new_batch("Integers", 37, TIntegers_run);
}

void
-chaz_TIntegers_run(TestBatch *batch)
+TIntegers_run(TestBatch *batch)
{
{
long one= 1;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/LargeFiles.c Thu Nov 26 19:32:00 2009
@@ -11,13 +11,13 @@
#include "Charmonizer/Test/AllTests.h"

TestBatch*
-chaz_TLargeFiles_prepare()
+TLargeFiles_prepare()
{
- return Test_new_batch("LargeFiles", 10, chaz_TLargeFiles_run);
+ return Test_new_batch("LargeFiles", 10, TLargeFiles_run);
}

void
-chaz_TLargeFiles_run(TestBatch *batch)
+TLargeFiles_run(TestBatch *batch)
{
FILE *fh;
off64_t offset;

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/UnusedVars.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/UnusedVars.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/UnusedVars.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/UnusedVars.c Thu Nov 26 19:32:00 2009
@@ -5,12 +5,12 @@
#include "Charmonizer/Test/AllTests.h"

TestBatch*
-chaz_TUnusedVars_prepare()
+TUnusedVars_prepare()
{
- return Test_new_batch("UnusedVars", 2, chaz_TUnusedVars_run);
+ return Test_new_batch("UnusedVars", 2, TUnusedVars_run);
}
void
-chaz_TUnusedVars_run(TestBatch *batch)
+TUnusedVars_run(TestBatch *batch)
{
#ifdef UNUSED_VAR
PASS(batch, "UNUSED_VAR macro is defined");

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/VariadicMacros.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/VariadicMacros.c?rev=884674&r1=884673&r2=884674&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/VariadicMacros.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/VariadicMacros.c Thu Nov 26 19:32:00 2009
@@ -7,13 +7,13 @@
#include "Charmonizer/Test/AllTests.h"

TestBatch*
-chaz_TVariadicMacros_prepare()
+TVariadicMacros_prepare()
{
- return Test_new_batch("VariadicMacros", 4, chaz_TVariadicMacros_run);
+ return Test_new_batch("VariadicMacros", 4, TVariadicMacros_run);
}

void
-chaz_TVariadicMacros_run(TestBatch *batch)
+TVariadicMacros_run(TestBatch *batch)
{
char buf[10];
chaz_bool_t really_has_var_macs = false;
reply

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post

1 user in discussion

Marvin: 1 post