lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r895493 - in /lucene/lucy/trunk/charmonizer: ./ src/Charmonizer/ src/Charmonizer/Core/ src/Charmonizer/Probe/
Date Sun, 03 Jan 2010 22:20:19 GMT
Author: marvin
Date: Sun Jan  3 22:20:16 2010
New Revision: 895493

URL: http://svn.apache.org/viewvc?rev=895493&view=rev
Log:
Rename some charmonizer core modules for clarity.  (LUCY-93)

Added:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.h
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h
      - copied, changed from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.h
Removed:
    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/OperSys.h
Modified:
    lucene/lucy/trunk/charmonizer/charmonize.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c
    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

Modified: lucene/lucy/trunk/charmonizer/charmonize.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/charmonize.c?rev=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/charmonize.c (original)
+++ lucene/lucy/trunk/charmonizer/charmonize.c Sun Jan  3 22:20:16 2010
@@ -14,8 +14,8 @@
 #include "Charmonizer/Probe/LargeFiles.h"
 #include "Charmonizer/Probe/UnusedVars.h"
 #include "Charmonizer/Probe/VariadicMacros.h"
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 
 int main(int argc, char **argv) 
 {
@@ -48,7 +48,7 @@
 
     /* Write custom postamble. */
     if (chaz_HeadCheck_check_header("sys/mman.h")) {
-        chaz_ModHand_append_conf("#define CHY_HAS_SYS_MMAN_H\n\n");
+        chaz_ConfWriter_append_conf("#define CHY_HAS_SYS_MMAN_H\n\n");
     }
 
     /* Clean up. */

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c Sun Jan  3 22:20:16 2010
@@ -5,8 +5,8 @@
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Core/Compiler.h"
 #include "Charmonizer/Core/CompilerSpec.h"
-#include "Charmonizer/Core/ModHandler.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 
 static void
 S_destroy(Compiler *self);
@@ -119,7 +119,7 @@
     (void)code_len; /* Unused. */
     
     /* Prepare the compiler command. */
-    if (Util_verbosity < 2 && chaz_ModHand_charm_run_available) {
+    if (Util_verbosity < 2 && chaz_ConfWriter_charm_run_available) {
         sprintf(command, "%s%s %s %s %s%s %s %s",
             os->local_command_start, "_charm_run ", 
             self->cc_command, source_path, 
@@ -170,7 +170,7 @@
     (void)code_len; /* Unused. */
     
     /* Prepare the compiler command. */
-    if (Util_verbosity < 2 && chaz_ModHand_charm_run_available) {
+    if (Util_verbosity < 2 && chaz_ConfWriter_charm_run_available) {
         sprintf(command, "%s%s %s %s %s%s %s %s",
             os->local_command_start, "_charm_run ", 
             self->cc_command, source_path, 

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c Sun Jan  3 22:20:16 2010
@@ -1,8 +1,8 @@
 #define CHAZ_USE_SHORT_NAMES
 
 #include "Charmonizer/Core/Util.h"
-#include "Charmonizer/Core/ModHandler.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 #include "Charmonizer/Core/Compiler.h"
 #include <errno.h>
 #include <stdarg.h>
@@ -27,27 +27,27 @@
 S_clean_up_try();
 
 /* Global vars. */
-struct OperSys  *ModHand_os = NULL;
-struct Compiler *ModHand_compiler = NULL;
-chaz_bool_t chaz_ModHand_charm_run_available = false;
-FILE* ModHand_charmony_fh = NULL;
+struct OperSys  *ConfWriter_os = NULL;
+struct Compiler *ConfWriter_compiler = NULL;
+chaz_bool_t chaz_ConfWriter_charm_run_available = false;
+FILE* ConfWriter_charmony_fh = NULL;
 
 /* Static vars. */
 static char *try_app_path = NULL;
 static char *try_app_command = NULL;
 
 void
-ModHand_init()
+ConfWriter_init()
 {
     /* Set the name of the application which we "try" to execute. */
-    size_t len = strlen(TRY_APP_BASENAME) + strlen(ModHand_os->exe_ext) + 1;
+    size_t len = strlen(TRY_APP_BASENAME) + strlen(ConfWriter_os->exe_ext) + 1;
     try_app_path = (char*)malloc(len);
-    sprintf(try_app_path, "%s%s", TRY_APP_BASENAME, ModHand_os->exe_ext);
+    sprintf(try_app_path, "%s%s", TRY_APP_BASENAME, ConfWriter_os->exe_ext);
 
     /* Set the invocation string for the "try" application. */
-    len = strlen(ModHand_os->local_command_start) + strlen(try_app_path) + 1;
+    len = strlen(ConfWriter_os->local_command_start) + strlen(try_app_path) + 1;
     try_app_command = (char*)malloc(len);
-    sprintf(try_app_command, "%s%s", ModHand_os->local_command_start, try_app_path);
+    sprintf(try_app_command, "%s%s", ConfWriter_os->local_command_start, try_app_path);
 
     /* Write files needed by this module and others. */
     S_build_charm_run();
@@ -55,19 +55,19 @@
 }
 
 void
-ModHand_open_charmony_h(const char *charmony_start)
+ConfWriter_open_charmony_h(const char *charmony_start)
 {
     /* Open the filehandle. */
-    ModHand_charmony_fh = fopen("charmony.h", "w+");
-    if (ModHand_charmony_fh == NULL) {
+    ConfWriter_charmony_fh = fopen("charmony.h", "w+");
+    if (ConfWriter_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(ModHand_charmony_fh, charmony_start);
+        fprintf(ConfWriter_charmony_fh, charmony_start);
     }
-    fprintf(ModHand_charmony_fh,
+    fprintf(ConfWriter_charmony_fh,
         "/* Header file auto-generated by Charmonizer. \n"
         " * DO NOT EDIT THIS FILE!!\n"
         " */\n\n"
@@ -77,16 +77,16 @@
 }
 
 void
-ModHand_clean_up(void)
+ConfWriter_clean_up(void)
 {
     /* Clean up some temp files. */
     remove("_charm.h");
-    ModHand_os->remove_exe(ModHand_os, "_charm_run");
-    ModHand_os->remove_exe(ModHand_os, "_charm_stat");
+    ConfWriter_os->remove_exe(ConfWriter_os, "_charm_run");
+    ConfWriter_os->remove_exe(ConfWriter_os, "_charm_stat");
 
     /* Write the last bit of charmony.h and close. */
-    fprintf(ModHand_charmony_fh, "#endif /* H_CHARMONY */\n\n");
-    if (fclose(ModHand_charmony_fh)) {
+    fprintf(ConfWriter_charmony_fh, "#endif /* H_CHARMONY */\n\n");
+    if (fclose(ConfWriter_charmony_fh)) {
         Util_die("Couldn't close 'charmony.h': %s", strerror(errno));
     }
 }
@@ -162,9 +162,9 @@
     chaz_bool_t compile_succeeded = false;
     size_t needed = sizeof(charm_run_code_a)
                   + sizeof(charm_run_code_b)
-                  + strlen(ModHand_os->devnull)
+                  + strlen(ConfWriter_os->devnull)
                   + sizeof(charm_run_code_c)
-                  + strlen(ModHand_os->devnull)
+                  + strlen(ConfWriter_os->devnull)
                   + sizeof(charm_run_code_d)
                   + 20;
     char *code = (char*)malloc(needed);
@@ -172,11 +172,11 @@
     sprintf(code, "%s%s \"%s\" %s \"%s\" %s", 
         charm_run_code_a, 
         charm_run_code_b,
-        ModHand_os->devnull,
+        ConfWriter_os->devnull,
         charm_run_code_c,
-        ModHand_os->devnull,
+        ConfWriter_os->devnull,
         charm_run_code_d);
-    compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler, 
+    compile_succeeded = ConfWriter_compiler->compile_exe(ConfWriter_compiler, 
         "_charm_run.c", "_charm_run", code, strlen(code));
     if (!compile_succeeded) {
         Util_die("failed to compile _charm_run helper utility");
@@ -184,11 +184,11 @@
 
     remove("_charm_run.c");
     free(code);
-    chaz_ModHand_charm_run_available = true;
+    chaz_ConfWriter_charm_run_available = true;
 }
 
 chaz_bool_t
-ModHand_test_compile(char *source, size_t source_len)
+ConfWriter_test_compile(char *source, size_t source_len)
 {
     chaz_bool_t compile_succeeded;
 
@@ -196,7 +196,7 @@
         Util_die("Failed to delete file '%s'", try_app_path);
     }
 
-    compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler, 
+    compile_succeeded = ConfWriter_compiler->compile_exe(ConfWriter_compiler, 
         TRY_SOURCE_PATH, TRY_APP_BASENAME, source, source_len);
 
     S_clean_up_try();
@@ -205,7 +205,7 @@
 }
 
 char*
-ModHand_capture_output(char *source, size_t source_len, 
+ConfWriter_capture_output(char *source, size_t source_len, 
                             size_t *output_len) 
 {
     char *captured_output = NULL;
@@ -220,7 +220,7 @@
     }
 
     /* Attempt compilation; if successful, run app and slurp output. */
-    compile_succeeded = ModHand_compiler->compile_exe(ModHand_compiler, 
+    compile_succeeded = ConfWriter_compiler->compile_exe(ConfWriter_compiler, 
         TRY_SOURCE_PATH, TRY_APP_BASENAME, source, source_len);
     if (compile_succeeded) {
         system(try_app_command);
@@ -237,12 +237,12 @@
 }
 
 void
-ModHand_append_conf(const char *fmt, ...)
+ConfWriter_append_conf(const char *fmt, ...)
 {
     va_list args;
 
     va_start(args, fmt);
-    vfprintf(ModHand_charmony_fh, fmt, args);
+    vfprintf(ConfWriter_charmony_fh, fmt, args);
     va_end(args);
 }
 
@@ -250,26 +250,26 @@
 S_clean_up_try()
 {
     remove(TRY_SOURCE_PATH);
-    ModHand_os->remove_exe(ModHand_os, TRY_APP_BASENAME);
+    ConfWriter_os->remove_exe(ConfWriter_os, TRY_APP_BASENAME);
     remove(TARGET_PATH);
 }
 
 void
-ModHand_shorten_macro(const char *sym)
+ConfWriter_shorten_macro(const char *sym)
 {
-    ModHand_append_conf("  #define %s CHY_%s\n", sym, sym); 
+    ConfWriter_append_conf("  #define %s CHY_%s\n", sym, sym); 
 }
 
 void
-ModHand_shorten_typedef(const char *sym)
+ConfWriter_shorten_typedef(const char *sym)
 {
-    ModHand_append_conf("  #define %s chy_%s\n", sym, sym); 
+    ConfWriter_append_conf("  #define %s chy_%s\n", sym, sym); 
 }
 
 void
-ModHand_shorten_function(const char *sym)
+ConfWriter_shorten_function(const char *sym)
 {
-    ModHand_append_conf("  #define %s chy_%s\n", sym, sym); 
+    ConfWriter_append_conf("  #define %s chy_%s\n", sym, sym); 
 }
 
 

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.h (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.h?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.h&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.h Sun Jan  3 22:20:16 2010
@@ -1,9 +1,8 @@
-/* Chaz/Core/ModHandler.h -- symbols used by modules in the Charmonizer 
- * core distro.
+/* Chaz/Core/ConfWriter.h -- Write to a config file.
  */
 
-#ifndef H_CHAZ_MOD_HAND
-#define H_CHAZ_MOD_HAND 1
+#ifndef H_CHAZ_CONFWRITER
+#define H_CHAZ_CONFWRITER 1
 
 #ifdef __cplusplus
 extern "C" {
@@ -18,40 +17,40 @@
 
 /* Temporary files used by Charmonizer. 
  */
-#define CHAZ_MOD_HAND_TRY_SOURCE_PATH  "_charmonizer_try.c"
-#define CHAZ_MOD_HAND_TRY_APP_BASENAME "_charmonizer_try"
-#define CHAZ_MOD_HAND_TARGET_PATH      "_charmonizer_target"
+#define CHAZ_CONFWRITER_TRY_SOURCE_PATH  "_charmonizer_try.c"
+#define CHAZ_CONFWRITER_TRY_APP_BASENAME "_charmonizer_try"
+#define CHAZ_CONFWRITER_TARGET_PATH      "_charmonizer_target"
 
 /* Global variables.
  */
-extern struct chaz_OperSys  *chaz_ModHand_os;
-extern struct chaz_Compiler *chaz_ModHand_compiler;
-extern chaz_bool_t chaz_ModHand_charm_run_available;
-extern FILE* chaz_ModHand_charmony_fh;
+extern struct chaz_OperSys  *chaz_ConfWriter_os;
+extern struct chaz_Compiler *chaz_ConfWriter_compiler;
+extern chaz_bool_t chaz_ConfWriter_charm_run_available;
+extern FILE* chaz_ConfWriter_charmony_fh;
 
-/* Initialize elements needed by ModHandler.  Must be called before anything 
+/* Initialize elements needed by ConfWriter.  Must be called before anything 
  * else, but after os and compiler are created.
  */
 void
-chaz_ModHand_init();
+chaz_ConfWriter_init();
 
 /* Open the charmony.h file handle.  Print supplied text to it, if non-null.
  * Print an explanatory comment and open the include guard.
  */
 void
-chaz_ModHand_open_charmony_h(const char *charmony_start);
+chaz_ConfWriter_open_charmony_h(const char *charmony_start);
 
 /* Close the include guard on charmony.h, then close the file.  Delete temp
  * files and perform any other needed cleanup.
  */
 void
-chaz_ModHand_clean_up(void);
+chaz_ConfWriter_clean_up(void);
 
 /* Attempt to compile the supplied source code and return true if the
  * effort succeeds.
  */
 chaz_bool_t
-chaz_ModHand_test_compile(char *source, size_t source_len);
+chaz_ConfWriter_test_compile(char *source, size_t source_len);
 
 /* Attempt to compile the supplied source code.  If successful, capture the 
  * output of the program and return a pointer to a newly allocated buffer.
@@ -59,43 +58,43 @@
  * output will be placed into the integer pointed to by [output_len].
  */
 char*
-chaz_ModHand_capture_output(char *source, size_t source_len, 
+chaz_ConfWriter_capture_output(char *source, size_t source_len, 
                             size_t *output_len);
 
 /* Print output to charmony.h.
  */
 void
-chaz_ModHand_append_conf(const char *fmt, ...);
+chaz_ConfWriter_append_conf(const char *fmt, ...);
 
 /* Print bookends delimiting a short names block.
  */
-#define CHAZ_MODHAND_START_SHORT_NAMES \
-  chaz_ModHand_append_conf( \
+#define CHAZ_CONFWRITER_START_SHORT_NAMES \
+  chaz_ConfWriter_append_conf( \
     "\n#if defined(CHY_USE_SHORT_NAMES) || defined(CHAZ_USE_SHORT_NAMES)\n")
 
-#define CHAZ_MODHAND_END_SHORT_NAMES \
-    chaz_ModHand_append_conf("#endif /* USE_SHORT_NAMES */\n")
+#define CHAZ_CONFWRITER_END_SHORT_NAMES \
+    chaz_ConfWriter_append_conf("#endif /* USE_SHORT_NAMES */\n")
 
 /* Define a shortened version of a macro symbol (minus the "CHY_" prefix);
  */
 void
-chaz_ModHand_shorten_macro(const char *symbol);
+chaz_ConfWriter_shorten_macro(const char *symbol);
 
 /* Define a shortened version of a typedef symbol (minus the "chy_" prefix);
  */
 void
-chaz_ModHand_shorten_typedef(const char *symbol);
+chaz_ConfWriter_shorten_typedef(const char *symbol);
 
 /* Define a shortened version of a function symbol (minus the "chy_" prefix);
  */
 void
-chaz_ModHand_shorten_function(const char *symbol);
+chaz_ConfWriter_shorten_function(const char *symbol);
 
 /* Print a "chapter heading" when starting a module. 
  */
-#define CHAZ_MODHAND_START_RUN(module_name) \
+#define CHAZ_CONFWRITER_START_RUN(module_name) \
     do { \
-        chaz_ModHand_append_conf("\n/* %s */\n", module_name); \
+        chaz_ConfWriter_append_conf("\n/* %s */\n", module_name); \
         if (chaz_Util_verbosity > 0) { \
             printf("Running %s module...\n", module_name); \
         } \
@@ -103,38 +102,38 @@
 
 /* Leave a little whitespace at the end of each module.
  */
-#define CHAZ_MODHAND_END_RUN chaz_ModHand_append_conf("\n")
+#define CHAZ_CONFWRITER_END_RUN chaz_ConfWriter_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 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
+  #define TRY_SOURCE_PATH                   CHAZ_CONFWRITER_TRY_SOURCE_PATH
+  #define TRY_APP_BASENAME                  CHAZ_CONFWRITER_TRY_APP_BASENAME
+  #define TARGET_PATH                       CHAZ_CONFWRITER_TARGET_PATH
+  #define ConfWriter_os                     chaz_ConfWriter_os
+  #define ConfWriter_compiler               chaz_ConfWriter_compiler
+  #define ConfWriter_charm_run_available    chaz_ConfWriter_charm_run_available
+  #define ConfWriter_charmony_fh            chaz_ConfWriter_charmony_fh
+  #define ConfWriter_init                   chaz_ConfWriter_init
+  #define ConfWriter_open_charmony_h        chaz_ConfWriter_open_charmony_h
+  #define ConfWriter_clean_up               chaz_ConfWriter_clean_up
+  #define ConfWriter_write_charm_h          chaz_ConfWriter_write_charm_h
+  #define ConfWriter_build_charm_run        chaz_ConfWriter_build_charm_run
+  #define START_SHORT_NAMES                 CHAZ_CONFWRITER_START_SHORT_NAMES
+  #define END_SHORT_NAMES                   CHAZ_CONFWRITER_END_SHORT_NAMES
+  #define ConfWriter_test_compile           chaz_ConfWriter_test_compile
+  #define ConfWriter_capture_output         chaz_ConfWriter_capture_output 
+  #define ConfWriter_append_conf            chaz_ConfWriter_append_conf
+  #define ConfWriter_shorten_macro          chaz_ConfWriter_shorten_macro
+  #define ConfWriter_shorten_typedef        chaz_ConfWriter_shorten_typedef
+  #define ConfWriter_shorten_function       chaz_ConfWriter_shorten_function
+  #define START_RUN                         CHAZ_CONFWRITER_START_RUN
+  #define END_RUN                           CHAZ_CONFWRITER_END_RUN
 #endif
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* H_CHAZ_MOD_HAND */
+#endif /* H_CHAZ_CONFWRITER */
 
 /**
  * Copyright 2006 The Apache Software Foundation

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c Sun Jan  3 22:20:16 2010
@@ -6,9 +6,9 @@
 #include "Charmonizer/Core/Dir.h"
 
 #include "Charmonizer/Core/Compiler.h"
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 #include "Charmonizer/Core/Util.h"
 
 static chaz_bool_t mkdir_available = false;
@@ -56,7 +56,7 @@
 
     /* Attempt compilation. */
     sprintf(code_buf, posix_mkdir_code, header);
-    mkdir_available = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_mkdir.c",
+    mkdir_available = ConfWriter_compiler->compile_exe(ConfWriter_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 = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_mkdir.c",
+    mkdir_available = ConfWriter_compiler->compile_exe(ConfWriter_compiler, "_charm_mkdir.c",
         "_charm_mkdir", win_mkdir_code, strlen(win_mkdir_code));
     if (mkdir_available) {
         strcpy(mkdir_command, "_mkdir");
@@ -107,7 +107,7 @@
     size_t needed = sizeof(posix_mkdir_code) + 30;
     char *code_buf = (char*)malloc(needed);
     sprintf(code_buf, rmdir_code, header);
-    rmdir_available = ModHand_compiler->compile_exe(ModHand_compiler, "_charm_rmdir.c",
+    rmdir_available = ConfWriter_compiler->compile_exe(ConfWriter_compiler, "_charm_rmdir.c",
         "_charm_rmdir", code_buf, strlen(code_buf));
     free(code_buf);
     return rmdir_available;
@@ -139,14 +139,14 @@
 Dir_mkdir(const char *filepath)
 {
     if (!initialized) { Dir_init(); }
-    return ModHand_os->run_local(ModHand_os, "_charm_mkdir ", filepath, NULL);
+    return ConfWriter_os->run_local(ConfWriter_os, "_charm_mkdir ", filepath, NULL);
 }
 
 chaz_bool_t
 Dir_rmdir(const char *filepath)
 {
     if (!initialized) { Dir_init(); }
-    return ModHand_os->run_local(ModHand_os, "_charm_rmdir ", filepath, NULL);
+    return ConfWriter_os->run_local(ConfWriter_os, "_charm_rmdir ", filepath, NULL);
 }
 
 /**

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c Sun Jan  3 22:20:16 2010
@@ -1,8 +1,8 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
-#include "Charmonizer/Core/HeadCheck.h"
+#include "Charmonizer/Core/HeaderChecker.h"
 #include <string.h>
 #include <stdlib.h>
 
@@ -104,7 +104,7 @@
     strcat(code_buf, test_code);
 
     /* If the code compiles, bulk add all header names to the cache. */
-    success = ModHand_test_compile(code_buf, strlen(code_buf));
+    success = ConfWriter_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);
@@ -130,7 +130,7 @@
     char *buf = (char*)malloc(needed);
     chaz_bool_t retval;
     sprintf(buf, contains_code, includes, struct_name, member);
-    retval = ModHand_test_compile(buf, strlen(buf));
+    retval = ConfWriter_test_compile(buf, strlen(buf));
     free(buf);
     return retval;
 }
@@ -158,7 +158,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 = ModHand_test_compile(include_test, strlen(include_test));
+    header->exists = ConfWriter_test_compile(include_test, strlen(include_test));
 
     free(include_test);
     return header;

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeadCheck.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h Sun Jan  3 22:20:16 2010
@@ -1,4 +1,4 @@
-/* Charmonizer/Probe/HeadCheck.h
+/* Charmonizer/Probe/HeaderChecker.h
  */
 
 #ifndef H_CHAZ_HEAD_CHECK

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c Sun Jan  3 22:20:16 2010
@@ -5,7 +5,7 @@
 #include <stdarg.h>
 
 #include "Charmonizer/Core/Util.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 
 static void
 S_probe_devnull(OperSys *self);

Copied: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h (from r894760, lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.h)
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h?p2=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h&p1=lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.h&r1=894760&r2=895493&rev=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h Sun Jan  3 22:20:16 2010
@@ -1,4 +1,4 @@
-/* Charmonizer/Core/OperSys.h - abstract an operating system down to a few
+/* Charmonizer/Core/OperatingSystem.h - abstract an operating system down to a few
  * variables.
  */
 

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c Sun Jan  3 22:20:16 2010
@@ -6,9 +6,9 @@
 #include "Charmonizer/Core/Stat.h"
 
 #include "Charmonizer/Core/Compiler.h"
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 #include "Charmonizer/Core/Util.h"
 
 static chaz_bool_t initialized    = false;
@@ -35,7 +35,7 @@
 
     /* Run _charm_stat. */
     Util_remove_and_verify("_charm_statout");
-    ModHand_os->run_local(ModHand_os, "_charm_stat ", filepath, NULL);
+    ConfWriter_os->run_local(ConfWriter_os, "_charm_stat ", filepath, NULL);
     stat_output = Util_slurp_file("_charm_statout", &output_len);
     Util_remove_and_verify("_charm_statout");
 
@@ -79,7 +79,7 @@
 
 
     /* If the compile succeeds, open up for business. */
-    stat_available = ModHand_compiler->compile_exe(ModHand_compiler, 
+    stat_available = ConfWriter_compiler->compile_exe(ConfWriter_compiler, 
         "_charm_stat.c", "_charm_stat", charm_stat_code, strlen(charm_stat_code));
     remove("_charm_stat.c");
 }

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c?rev=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c Sun Jan  3 22:20:16 2010
@@ -4,24 +4,24 @@
 #include <stdlib.h>
 #include <string.h>
 #include "Charmonizer/Probe.h"
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Core/Compiler.h"
-#include "Charmonizer/Core/OperSys.h"
+#include "Charmonizer/Core/OperatingSystem.h"
 
 void
 Probe_init(const char *cc_command, const char *cc_flags, 
            const char *charmony_start)
 {
     /* Create os and compiler objects. */
-    ModHand_os       = OS_new();
-    ModHand_compiler = CC_new(ModHand_os, cc_command, cc_flags);
+    ConfWriter_os       = OS_new();
+    ConfWriter_compiler = CC_new(ConfWriter_os, cc_command, cc_flags);
 
     /* Dispatch other tasks. */
-    ModHand_init();
+    ConfWriter_init();
     HeadCheck_init();
-    ModHand_open_charmony_h(charmony_start);
+    ConfWriter_open_charmony_h(charmony_start);
 
     if (Util_verbosity) { printf("Initialization complete.\n"); }
 }
@@ -31,10 +31,10 @@
 {
     if (Util_verbosity) { printf("Cleaning up...\n"); }
 
-    /* Dispatch ModHandler's clean up routines, destroy objects. */
-    ModHand_clean_up();
-    ModHand_os->destroy(ModHand_os);
-    ModHand_compiler->destroy(ModHand_compiler);
+    /* Dispatch ConfWriter's clean up routines, destroy objects. */
+    ConfWriter_clean_up();
+    ConfWriter_os->destroy(ConfWriter_os);
+    ConfWriter_compiler->destroy(ConfWriter_compiler);
 
     if (Util_verbosity) { printf("Cleanup complete.\n"); }
 }
@@ -48,7 +48,7 @@
 FILE*
 Probe_get_charmony_fh(void)
 {
-    return ModHand_charmony_fh;
+    return ConfWriter_charmony_fh;
 }
 
 /**

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c?rev=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c Sun Jan  3 22:20:16 2010
@@ -1,7 +1,7 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/AtomicOps.h"
 #include <string.h>
@@ -19,29 +19,29 @@
 
     if (HeadCheck_check_header("libkern/OSAtomic.h")) {
         has_libkern_osatomic_h = true;
-        ModHand_append_conf("#define CHY_HAS_LIBKERN_OSATOMIC_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_LIBKERN_OSATOMIC_H\n");
     }
     if (HeadCheck_check_header("sys/atomic.h")) {
         has_sys_atomic_h = true;
-        ModHand_append_conf("#define CHY_HAS_SYS_ATOMIC_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_SYS_ATOMIC_H\n");
     }
     if (   HeadCheck_check_header("windows.h")
         && HeadCheck_check_header("intrin.h")
     ) {
         has_intrin_h = true;
-        ModHand_append_conf("#define CHY_HAS_INTRIN_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_INTRIN_H\n");
     }
     
     /* Shorten */
     START_SHORT_NAMES;
     if (has_libkern_osatomic_h) {
-        ModHand_shorten_macro("HAS_LIBKERN_OSATOMIC_H");
+        ConfWriter_shorten_macro("HAS_LIBKERN_OSATOMIC_H");
     }
     if (has_sys_atomic_h) {
-        ModHand_shorten_macro("HAS_SYS_ATOMIC_H");
+        ConfWriter_shorten_macro("HAS_SYS_ATOMIC_H");
     }
     if (has_intrin_h) {
-        ModHand_shorten_macro("HAS_INTRIN_H");
+        ConfWriter_shorten_macro("HAS_INTRIN_H");
     }
     END_SHORT_NAMES;
 

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c Sun Jan  3 22:20:16 2010
@@ -1,9 +1,9 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Dir.h"
 #include "Charmonizer/Core/Util.h"
-#include "Charmonizer/Core/HeadCheck.h"
+#include "Charmonizer/Core/HeaderChecker.h"
 #include "Charmonizer/Probe/DirManip.h"
 #include <string.h>
 #include <stdio.h>
@@ -26,10 +26,10 @@
 
     /* Header checks. */
     if (has_dirent_h) {
-        ModHand_append_conf("#define CHY_HAS_DIRENT_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_DIRENT_H\n");
     }
     if (has_direct_h) {
-        ModHand_append_conf("#define CHY_HAS_DIRECT_H\n");
+        ConfWriter_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) {
-            ModHand_append_conf("#define CHY_HAS_DIRENT_D_NAMLEN\n", dir_sep);
+            ConfWriter_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) {
-            ModHand_append_conf("#define CHY_HAS_DIRENT_D_TYPE\n", dir_sep);
+            ConfWriter_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". */
-        ModHand_append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n",
+        ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n",
             Dir_mkdir_command);
-        ModHand_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 0\n");
+        ConfWriter_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. */
-        ModHand_append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n",
+        ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n",
             Dir_mkdir_command);
-        ModHand_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 1\n");
+        ConfWriter_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) {
-        ModHand_append_conf("#define CHY_DIR_SEP \"%s\"\n", dir_sep);
+        ConfWriter_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;
-        ModHand_append_conf("#define CHY_REMOVE_ZAPS_DIRS\n");
+        ConfWriter_append_conf("#define CHY_REMOVE_ZAPS_DIRS\n");
     }
     Dir_rmdir("_charm_test_remove_me");
 
     /* Shorten. */
     START_SHORT_NAMES;
-    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"); }
+    if (dir_sep_is_valid) { ConfWriter_shorten_macro("DIR_SEP"); }
+    if (has_dirent_h)     { ConfWriter_shorten_macro("HAS_DIRENT_H"); }
+    if (has_direct_h)     { ConfWriter_shorten_macro("HAS_DIRECT_H"); }
+    if (has_dirent_d_namlen) { ConfWriter_shorten_macro("HAS_DIRENT_D_NAMLEN"); }
+    if (has_dirent_d_type)   { ConfWriter_shorten_macro("HAS_DIRENT_D_TYPE"); }
+    ConfWriter_shorten_function("makedir");
+    ConfWriter_shorten_macro("MAKEDIR_MODE_IGNORED");
+    if (remove_zaps_dirs) { ConfWriter_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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c Sun Jan  3 22:20:16 2010
@@ -1,7 +1,7 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/Floats.h"
 #include <string.h>
@@ -13,14 +13,14 @@
 {
     START_RUN("Floats");
 
-    ModHand_append_conf(
+    ConfWriter_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"
     );
 
-    ModHand_append_conf(
+    ConfWriter_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;
-    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");
+    ConfWriter_shorten_typedef("f32_t");
+    ConfWriter_shorten_typedef("f64_t");
+    ConfWriter_shorten_macro("HAS_F32_T");
+    ConfWriter_shorten_macro("HAS_F64_T");
+    ConfWriter_shorten_macro("F32_INF");
+    ConfWriter_shorten_macro("F32_NEGINF");
+    ConfWriter_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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c Sun Jan  3 22:20:16 2010
@@ -1,6 +1,6 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/FuncMacro.h"
 #include <string.h>
@@ -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 ModHand_capture_output(code, strlen(code), output_len);
+    return ConfWriter_capture_output(code, strlen(code), output_len);
 }
 
 static const char* inline_options[] = {
@@ -66,7 +66,7 @@
     START_RUN("FuncMacro");
     
     /* check for ISO func macro */
-    output = ModHand_capture_output(iso_func_code, strlen(iso_func_code), 
+    output = ConfWriter_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 = ModHand_capture_output(gnuc_func_code, strlen(gnuc_func_code), 
+    output = ConfWriter_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 @@
         const char *macro_text = has_iso_funcmac 
             ? "__func__"
             : "__FUNCTION__";
-        ModHand_append_conf(
+        ConfWriter_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) {
-       ModHand_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
+       ConfWriter_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
     }
     if (has_gnuc_funcmac) {
-        ModHand_append_conf("#define CHY_HAS_GNUC_FUNC_MACRO\n");
+        ConfWriter_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;
-            ModHand_append_conf("#define CHY_INLINE %s\n", inline_option);
+            ConfWriter_append_conf("#define CHY_INLINE %s\n", inline_option);
             free(output);
             break;
         }
     }
     if (!has_inline) {
-        ModHand_append_conf("#define CHY_INLINE\n");
+        ConfWriter_append_conf("#define CHY_INLINE\n");
     }
 
     /* shorten */
     START_SHORT_NAMES;
     if (has_iso_funcmac) 
-        ModHand_shorten_macro("HAS_ISO_FUNC_MACRO");
+        ConfWriter_shorten_macro("HAS_ISO_FUNC_MACRO");
     if (has_gnuc_funcmac)
-        ModHand_shorten_macro("HAS_GNUC_FUNC_MACRO");
+        ConfWriter_shorten_macro("HAS_GNUC_FUNC_MACRO");
     if (has_iso_funcmac || has_gnuc_funcmac) {
-        ModHand_shorten_macro("HAS_FUNC_MACRO");
-        ModHand_shorten_macro("FUNC_MACRO");
+        ConfWriter_shorten_macro("HAS_FUNC_MACRO");
+        ConfWriter_shorten_macro("FUNC_MACRO");
     }
-    ModHand_shorten_macro("INLINE");
+    ConfWriter_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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c Sun Jan  3 22:20:16 2010
@@ -1,7 +1,7 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/Headers.h"
 #include <ctype.h>
@@ -96,7 +96,7 @@
     /* Try for all POSIX headers in one blast. */
     if (HeadCheck_check_many_headers((const char**)posix_headers)) {
         has_posix = true;
-        ModHand_append_conf("#define CHY_HAS_POSIX\n");
+        ConfWriter_append_conf("#define CHY_HAS_POSIX\n");
         for (i = 0; posix_headers[i] != NULL; i++) {
             S_keep(posix_headers[i]);
         }
@@ -113,8 +113,8 @@
     /* test for all c89 headers in one blast */
     if (HeadCheck_check_many_headers((const char**)c89_headers)) {
         has_c89 = true;
-        ModHand_append_conf("#define CHY_HAS_C89\n");
-        ModHand_append_conf("#define CHY_HAS_C90\n");
+        ConfWriter_append_conf("#define CHY_HAS_C89\n");
+        ConfWriter_append_conf("#define CHY_HAS_C90\n");
         for (i = 0; c89_headers[i] != NULL; i++) {
             S_keep(c89_headers[i]);
         }
@@ -151,20 +151,20 @@
     /* append the config with every header detected so far */
     for (i = 0; keepers[i] != NULL; i++) {
         S_encode_affirmation(keepers[i]);
-        ModHand_append_conf("#define CHY_%s\n", aff_buf);
+        ConfWriter_append_conf("#define CHY_%s\n", aff_buf);
     }
 
     /* shorten */
     START_SHORT_NAMES;
     if (has_posix)
-        ModHand_shorten_macro("HAS_POSIX");
+        ConfWriter_shorten_macro("HAS_POSIX");
     if (has_c89) {
-        ModHand_shorten_macro("HAS_C89");
-        ModHand_shorten_macro("HAS_C90");
+        ConfWriter_shorten_macro("HAS_C89");
+        ConfWriter_shorten_macro("HAS_C90");
     }
     for (i = 0; keepers[i] != NULL; i++) {
         S_encode_affirmation(keepers[i]);
-        ModHand_shorten_macro(aff_buf);
+        ConfWriter_shorten_macro(aff_buf);
     }
     END_SHORT_NAMES;
 

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c Sun Jan  3 22:20:16 2010
@@ -1,7 +1,7 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/Integers.h"
 #include <string.h>
@@ -81,12 +81,12 @@
 
     /* document endian-ness */
     if (S_machine_is_big_endian())
-        ModHand_append_conf("#define CHY_BIG_END\n");
+        ConfWriter_append_conf("#define CHY_BIG_END\n");
     else 
-        ModHand_append_conf("#define CHY_LITTLE_END\n");
+        ConfWriter_append_conf("#define CHY_LITTLE_END\n");
 
     /* Record sizeof() for several common integer types. */
-    output = ModHand_capture_output(sizes_code, strlen(sizes_code), &output_len);
+    output = ConfWriter_capture_output(sizes_code, strlen(sizes_code), &output_len);
     if (output != NULL) {
         char *end_ptr = output;
         
@@ -103,7 +103,7 @@
 
     /* determine whether long longs are available */
     sprintf(code_buf, type64_code, "long long");
-    output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+    output = ConfWriter_capture_output(code_buf, strlen(code_buf), &output_len);
     if (output != NULL) {
         has_long_long    = true;
         sizeof_long_long = strtol(output, NULL, 10);
@@ -111,7 +111,7 @@
 
     /* determine whether the __int64 type is available */
     sprintf(code_buf, type64_code, "__int64");
-    output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+    output = ConfWriter_capture_output(code_buf, strlen(code_buf), &output_len);
     if (output != NULL) {
         has___int64 = true;
         sizeof___int64 = strtol(output, NULL, 10);
@@ -156,26 +156,26 @@
     }
     else if (has_64) {
         sprintf(code_buf, literal64_code, "LL");
-        output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+        output = ConfWriter_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 = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+            output = ConfWriter_capture_output(code_buf, strlen(code_buf), &output_len);
             if (output != NULL)
                 strcpy(i64_t_postfix, "i64");
             else
                 Util_die("64-bit types, but no literal syntax found");
         }
         sprintf(code_buf, literal64_code, "ULL");
-        output = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+        output = ConfWriter_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 = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+            output = ConfWriter_capture_output(code_buf, strlen(code_buf), &output_len);
             if (output != NULL)
                 strcpy(u64_t_postfix, "Ui64");
             else
@@ -185,31 +185,31 @@
 
     /* write out some conditional defines */
     if (has_inttypes)
-        ModHand_append_conf("#define CHY_HAS_INTTYPES_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_INTTYPES_H\n");
     if (has_stdint)
-        ModHand_append_conf("#define CHY_HAS_STDINT_H\n");
+        ConfWriter_append_conf("#define CHY_HAS_STDINT_H\n");
     if (has_long_long)
-        ModHand_append_conf("#define CHY_HAS_LONG_LONG\n");
+        ConfWriter_append_conf("#define CHY_HAS_LONG_LONG\n");
     if (has___int64)
-        ModHand_append_conf("#define CHY_HAS___INT64\n");
+        ConfWriter_append_conf("#define CHY_HAS___INT64\n");
 
     /* write out sizes */
-    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);
+    ConfWriter_append_conf("#define CHY_SIZEOF_CHAR %d\n",  sizeof_char);
+    ConfWriter_append_conf("#define CHY_SIZEOF_SHORT %d\n", sizeof_short);
+    ConfWriter_append_conf("#define CHY_SIZEOF_INT %d\n",   sizeof_int);
+    ConfWriter_append_conf("#define CHY_SIZEOF_LONG %d\n",  sizeof_long);
+    ConfWriter_append_conf("#define CHY_SIZEOF_PTR %d\n",   sizeof_ptr);
     if (has_long_long) {
-        ModHand_append_conf("#define CHY_SIZEOF_LONG_LONG %d\n", sizeof_long_long);
+        ConfWriter_append_conf("#define CHY_SIZEOF_LONG_LONG %d\n", sizeof_long_long);
     }
     if (has___int64) {
-        ModHand_append_conf("#define CHY_SIZEOF___INT64 %d\n", sizeof___int64);
+        ConfWriter_append_conf("#define CHY_SIZEOF___INT64 %d\n", sizeof___int64);
     }
 
     /* write affirmations, typedefs and maximums/minimums */
-    ModHand_append_conf("typedef int chy_bool_t;\n");
+    ConfWriter_append_conf("typedef int chy_bool_t;\n");
     if (has_stdint) {
-        ModHand_append_conf("#include <stdint.h>\n");
+        ConfWriter_append_conf("#include <stdint.h>\n");
     }
     else {
     /* we support only the following subset of stdint.h
@@ -223,36 +223,36 @@
      *   uint64_t
      */
         if (has_8) {
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef signed char int8_t;\n"
                 "typedef unsigned char uint8_t;\n"
             );
         }
         if (has_16) {
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef short int16_t;\n"
                 "typedef unsigned short uint16_t;\n"
             );
         }
         if (has_32) {
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef %s int32_t;\n", i32_t_type
             );
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef unsigned %s uint32_t;\n", i32_t_type
             );
         }
         if (has_64) {
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef %s int64_t;\n", i64_t_type
             );
-            ModHand_append_conf(
+            ConfWriter_append_conf(
                 "typedef unsigned %s uint64_t;\n", i64_t_type
             );
         }
     }
     if (has_8) {
-        ModHand_append_conf(
+        ConfWriter_append_conf(
             "#define CHY_HAS_I8_T\n"
             "typedef signed char chy_i8_t;\n"
             "typedef unsigned char chy_u8_t;\n"
@@ -262,7 +262,7 @@
         );
     }
     if (has_16) {
-        ModHand_append_conf(
+        ConfWriter_append_conf(
             "#define CHY_HAS_I16_T\n"
             "typedef short chy_i16_t;\n"
             "typedef unsigned short chy_u16_t;\n"
@@ -272,23 +272,23 @@
         );
     }
     if (has_32) {
-        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",
+        ConfWriter_append_conf("#define CHY_HAS_I32_T\n");
+        ConfWriter_append_conf("typedef %s chy_i32_t;\n", i32_t_type);
+        ConfWriter_append_conf("typedef unsigned %s chy_u32_t;\n", i32_t_type);
+        ConfWriter_append_conf("#define CHY_I32_MAX 0x7FFFFFFF%s\n", i32_t_postfix);
+        ConfWriter_append_conf("#define CHY_I32_MIN (-I32_MAX - 1)\n");
+        ConfWriter_append_conf("#define CHY_U32_MAX (I32_MAX * 2%s + 1%s)\n",
             u32_t_postfix, u32_t_postfix);
     }
     if (has_64) {
-        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",
+        ConfWriter_append_conf("#define CHY_HAS_I64_T\n");
+        ConfWriter_append_conf("typedef %s chy_i64_t;\n", i64_t_type);
+        ConfWriter_append_conf("typedef unsigned %s chy_u64_t;\n", i64_t_type);
+        ConfWriter_append_conf("#define CHY_I64_MAX 0x7FFFFFFFFFFFFFFF%s\n",
             i64_t_postfix);
-        ModHand_append_conf("#define CHY_I64_MIN (-I64_MAX - 1%s)\n",
+        ConfWriter_append_conf("#define CHY_I64_MIN (-I64_MAX - 1%s)\n",
             i64_t_postfix);
-        ModHand_append_conf("#define CHY_U64_MAX (I64_MAX * 2%s + 1%s)\n",
+        ConfWriter_append_conf("#define CHY_U64_MAX (I64_MAX * 2%s + 1%s)\n",
             u64_t_postfix, u64_t_postfix);
     }
 
@@ -323,14 +323,14 @@
             sprintf(format_64_code, 
                 "%s\"%%%su\", 18446744073709551615%s%s", format_64_code_a, 
                     options[i], u64_t_postfix, format_64_code_b);
-            output = ModHand_capture_output(format_64_code, strlen(format_64_code),
+            output = ConfWriter_capture_output(format_64_code, strlen(format_64_code),
                 &output_len);
 
             if (   output_len != 0 
                 && strcmp(output, "18446744073709551615") == 0
             ) {
-                ModHand_append_conf("#define CHY_I64P \"%sd\"\n", options[i]);
-                ModHand_append_conf("#define CHY_U64P \"%su\"\n", options[i]);
+                ConfWriter_append_conf("#define CHY_I64P \"%sd\"\n", options[i]);
+                ConfWriter_append_conf("#define CHY_U64P \"%su\"\n", options[i]);
                 break;
             }
         }
@@ -340,33 +340,33 @@
     /* write out the 32-bit and 64-bit literal macros */
     if (has_32) {
         if (strcmp(i32_t_postfix, "") == 0) {
-            ModHand_append_conf("#define CHY_I32_C(n) n\n");
-            ModHand_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
+            ConfWriter_append_conf("#define CHY_I32_C(n) n\n");
+            ConfWriter_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
         }
         else {
-            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);
+            ConfWriter_append_conf("#define CHY_I32_C(n) n##%s\n", i32_t_postfix);
+            ConfWriter_append_conf("#define CHY_U32_C(n) n##%s\n", u32_t_postfix);
         }
     }
     if (has_64) {
-        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);
+        ConfWriter_append_conf("#define CHY_I64_C(n) n##%s\n", i64_t_postfix);
+        ConfWriter_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) {
-            ModHand_append_conf("#define CHY_PTR2I64(ptr) "
+            ConfWriter_append_conf("#define CHY_PTR2I64(ptr) "
                 "((chy_i64_t)(chy_u64_t)(ptr))\n");
         }
         else {
-            ModHand_append_conf("#define CHY_PTR2I64(ptr) "
+            ConfWriter_append_conf("#define CHY_PTR2I64(ptr) "
                 "((chy_i64_t)(chy_u32_t)(ptr))\n");
         }
     }
 
     /* true and false */
-    ModHand_append_conf(
+    ConfWriter_append_conf(
         "#ifndef true\n"
         "  #define true 1\n"
         "#endif\n"
@@ -378,65 +378,65 @@
     /* shorten */
     START_SHORT_NAMES;
     if ( S_machine_is_big_endian() ) {
-        ModHand_shorten_macro("BIG_END");
+        ConfWriter_shorten_macro("BIG_END");
     }
     else {
-        ModHand_shorten_macro("LITTLE_END");
+        ConfWriter_shorten_macro("LITTLE_END");
     }
-    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");
+    ConfWriter_shorten_macro("SIZEOF_CHAR");
+    ConfWriter_shorten_macro("SIZEOF_SHORT");
+    ConfWriter_shorten_macro("SIZEOF_LONG");
+    ConfWriter_shorten_macro("SIZEOF_INT");
+    ConfWriter_shorten_macro("SIZEOF_PTR");
     if (has_long_long) {
-        ModHand_shorten_macro("HAS_LONG_LONG");
-        ModHand_shorten_macro("SIZEOF_LONG_LONG");
+        ConfWriter_shorten_macro("HAS_LONG_LONG");
+        ConfWriter_shorten_macro("SIZEOF_LONG_LONG");
     }
     if (has___int64) {
-        ModHand_shorten_macro("HAS___INT64");
-        ModHand_shorten_macro("SIZEOF___INT64");
+        ConfWriter_shorten_macro("HAS___INT64");
+        ConfWriter_shorten_macro("SIZEOF___INT64");
     }
     if (has_inttypes)
-        ModHand_shorten_macro("HAS_INTTYPES_H");
-    ModHand_shorten_typedef("bool_t");
+        ConfWriter_shorten_macro("HAS_INTTYPES_H");
+    ConfWriter_shorten_typedef("bool_t");
     if (has_8) {
-        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");
+        ConfWriter_shorten_macro("HAS_I8_T");
+        ConfWriter_shorten_typedef("i8_t");
+        ConfWriter_shorten_typedef("u8_t");
+        ConfWriter_shorten_macro("I8_MAX");
+        ConfWriter_shorten_macro("I8_MIN");
+        ConfWriter_shorten_macro("U8_MAX");
     }
     if (has_16) {
-        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");
+        ConfWriter_shorten_macro("HAS_I16_T");
+        ConfWriter_shorten_typedef("i16_t");
+        ConfWriter_shorten_typedef("u16_t");
+        ConfWriter_shorten_macro("I16_MAX");
+        ConfWriter_shorten_macro("I16_MIN");
+        ConfWriter_shorten_macro("U16_MAX");
     }
     if (has_32) {
-        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");
+        ConfWriter_shorten_macro("HAS_I32_T");
+        ConfWriter_shorten_typedef("i32_t");
+        ConfWriter_shorten_typedef("u32_t");
+        ConfWriter_shorten_macro("I32_MAX");
+        ConfWriter_shorten_macro("I32_MIN");
+        ConfWriter_shorten_macro("U32_MAX");
+        ConfWriter_shorten_macro("I32_C");
+        ConfWriter_shorten_macro("U32_C");
     }
     if (has_64) {
-        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");
+        ConfWriter_shorten_macro("HAS_I64_T");
+        ConfWriter_shorten_typedef("i64_t");
+        ConfWriter_shorten_typedef("u64_t");
+        ConfWriter_shorten_macro("I64_MAX");
+        ConfWriter_shorten_macro("I64_MIN");
+        ConfWriter_shorten_macro("U64_MAX");
+        ConfWriter_shorten_macro("I64P");
+        ConfWriter_shorten_macro("U64P");
+        ConfWriter_shorten_macro("I64_C");
+        ConfWriter_shorten_macro("U64_C");
+        ConfWriter_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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c Sun Jan  3 22:20:16 2010
@@ -1,7 +1,7 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/HeadCheck.h"
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Stat.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/LargeFiles.h"
@@ -103,13 +103,13 @@
 
     /* write the affirmations/definitions */
     if (success) {
-        ModHand_append_conf("#define CHY_HAS_LARGE_FILE_SUPPORT\n");
+        ConfWriter_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) {
-            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);
+            ConfWriter_append_conf("#define chy_off64_t %s\n",  off64_type);
+            ConfWriter_append_conf("#define chy_fopen64 %s\n",  fopen_command);
+            ConfWriter_append_conf("#define chy_ftello64 %s\n", ftell_command);
+            ConfWriter_append_conf("#define chy_fseeko64 %s\n", fseek_command);
         }
     }
 
@@ -120,7 +120,7 @@
             found_lseek = S_probe_lseek(&combo);
             if (found_lseek) {
                 strcpy(lseek_command, combo.lseek_command);
-                ModHand_append_conf("#define chy_lseek64 %s\n", lseek_command);
+                ConfWriter_append_conf("#define chy_lseek64 %s\n", lseek_command);
                 break;
             }
         }
@@ -129,7 +129,7 @@
             found_pread64 = S_probe_pread64(&combo);
             if (found_pread64) {
                 strcpy(pread64_command, combo.pread64_command);
-                ModHand_append_conf("#define chy_pread64 %s\n", pread64_command);
+                ConfWriter_append_conf("#define chy_pread64 %s\n", pread64_command);
                 found_pread64 = true;
                 break;
             }
@@ -138,32 +138,32 @@
 
     /* check for sparse files */
     if (S_check_sparse_files()) {
-        ModHand_append_conf("#define CHAZ_HAS_SPARSE_FILES\n");
+        ConfWriter_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())
-            ModHand_append_conf("#define CHAZ_CAN_CREATE_BIG_FILES\n");
+            ConfWriter_append_conf("#define CHAZ_CAN_CREATE_BIG_FILES\n");
     }
     else {
-        ModHand_append_conf("#define CHAZ_NO_SPARSE_FILES\n");
+        ConfWriter_append_conf("#define CHAZ_NO_SPARSE_FILES\n");
     }
 
     /* short names */
     if (success) {
         START_SHORT_NAMES;
-        ModHand_shorten_macro("HAS_LARGE_FILE_SUPPORT");
+        ConfWriter_shorten_macro("HAS_LARGE_FILE_SUPPORT");
 
         /* alias these only if they're not already provided and correct */
         if (strcmp(off64_type, "off64_t") != 0) {
-            ModHand_shorten_typedef("off64_t");
-            ModHand_shorten_function("fopen64");
-            ModHand_shorten_function("ftello64");
-            ModHand_shorten_function("fseeko64");
+            ConfWriter_shorten_typedef("off64_t");
+            ConfWriter_shorten_function("fopen64");
+            ConfWriter_shorten_function("ftello64");
+            ConfWriter_shorten_function("fseeko64");
         }
         if (found_lseek && strcmp(lseek_command, "lseek64") != 0) {
-            ModHand_shorten_function("lseek64");
+            ConfWriter_shorten_function("lseek64");
         }
         if (found_pread64 && strcmp(pread64_command, "pread64") != 0) {
-            ModHand_shorten_function("pread64");
+            ConfWriter_shorten_function("pread64");
         }
         END_SHORT_NAMES;
     }
@@ -209,7 +209,7 @@
         combo->fseek_command);
 
     /* verify compilation and that the offset type has 8 bytes */
-    output = ModHand_capture_output(code_buf, strlen(code_buf), 
+    output = ConfWriter_capture_output(code_buf, strlen(code_buf), 
         &output_len);
     if (output != NULL) {
         long size = strtol(output, NULL, 10);
@@ -249,7 +249,7 @@
 
     /* Verify compilation. */
     sprintf(code_buf, lseek_code, combo->includes, combo->lseek_command);
-    output = ModHand_capture_output(code_buf, strlen(code_buf), 
+    output = ConfWriter_capture_output(code_buf, strlen(code_buf), 
         &output_len);
     if (output != NULL) {
         success = true;
@@ -287,7 +287,7 @@
 
     /* Verify compilation. */
     sprintf(code_buf, pread64_code, combo->includes, combo->pread64_command);
-    output = ModHand_capture_output(code_buf, strlen(code_buf), 
+    output = ConfWriter_capture_output(code_buf, strlen(code_buf), 
         &output_len);
     if (output != NULL) {
         success = true;
@@ -389,7 +389,7 @@
     /* 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 = ModHand_capture_output(code_buf, strlen(code_buf), &output_len);
+    output = ConfWriter_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");

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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c Sun Jan  3 22:20:16 2010
@@ -1,6 +1,6 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/UnusedVars.h"
 #include <string.h>
@@ -13,13 +13,13 @@
     START_RUN("UnusedVars");
     
     /* write the macros (no test, these are the same everywhere) */
-    ModHand_append_conf("#define CHY_UNUSED_VAR(x) ((void)x)\n");
-    ModHand_append_conf("#define CHY_UNREACHABLE_RETURN(type) return (type)0\n");
+    ConfWriter_append_conf("#define CHY_UNUSED_VAR(x) ((void)x)\n");
+    ConfWriter_append_conf("#define CHY_UNREACHABLE_RETURN(type) return (type)0\n");
 
     /* shorten */
     START_SHORT_NAMES;
-    ModHand_shorten_macro("UNUSED_VAR");
-    ModHand_shorten_macro("UNREACHABLE_RETURN");
+    ConfWriter_shorten_macro("UNUSED_VAR");
+    ConfWriter_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=895493&r1=895492&r2=895493&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c Sun Jan  3 22:20:16 2010
@@ -1,6 +1,6 @@
 #define CHAZ_USE_SHORT_NAMES
 
-#include "Charmonizer/Core/ModHandler.h"
+#include "Charmonizer/Core/ConfWriter.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Probe/VariadicMacros.h"
 #include <string.h>
@@ -43,33 +43,33 @@
     START_RUN("VariadicMacros");
 
     /* test for ISO-style variadic macros */
-    output = ModHand_capture_output(iso_code, strlen(iso_code), &output_len);
+    output = ConfWriter_capture_output(iso_code, strlen(iso_code), &output_len);
     if (output != NULL) {
         has_varmacros = true;
         has_iso_varmacros = true;
-        ModHand_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
-        ModHand_append_conf("#define CHY_HAS_ISO_VARIADIC_MACROS\n");
+        ConfWriter_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
+        ConfWriter_append_conf("#define CHY_HAS_ISO_VARIADIC_MACROS\n");
     }
 
     /* test for GNU-style variadic macros */
-    output = ModHand_capture_output(gnuc_code, strlen(gnuc_code), &output_len);
+    output = ConfWriter_capture_output(gnuc_code, strlen(gnuc_code), &output_len);
     if (output != NULL) {
         has_gnuc_varmacros = true;
         if (has_varmacros == false) {
             has_varmacros = true;
-            ModHand_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
+            ConfWriter_append_conf("#define CHY_HAS_VARIADIC_MACROS\n");
         }
-        ModHand_append_conf("#define CHY_HAS_GNUC_VARIADIC_MACROS\n");
+        ConfWriter_append_conf("#define CHY_HAS_GNUC_VARIADIC_MACROS\n");
     }
 
     /* shorten */
     START_SHORT_NAMES;
     if (has_varmacros)
-        ModHand_shorten_macro("HAS_VARIADIC_MACROS");
+        ConfWriter_shorten_macro("HAS_VARIADIC_MACROS");
     if (has_iso_varmacros)
-        ModHand_shorten_macro("HAS_ISO_VARIADIC_MACROS");
+        ConfWriter_shorten_macro("HAS_ISO_VARIADIC_MACROS");
     if (has_gnuc_varmacros)
-        ModHand_shorten_macro("HAS_GNUC_VARIADIC_MACROS");
+        ConfWriter_shorten_macro("HAS_GNUC_VARIADIC_MACROS");
     END_SHORT_NAMES;
 
     END_RUN;



Mime
View raw message