You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2006/11/04 22:20:01 UTC

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

Author: marvin
Date: Sat Nov  4 13:20:00 2006
New Revision: 471262

URL: http://svn.apache.org/viewvc?view=rev&rev=471262
Log:
No functional changes.  Add comments.  Rename some variables.  Add some short
names.  Rework some whitespace.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.harm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.charm

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.harm Sat Nov  4 13:20:00 2006
@@ -6,8 +6,8 @@
 typedef int chaz_bool_t;
 
 #ifndef true
-# define true 1
-# define false 0
+  #define true 1
+  #define false 0
 #endif
 
 #endif /* H_CHAZ_DEFINES */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm Sat Nov  4 13:20:00 2006
@@ -238,25 +238,25 @@
 void
 chaz_ModHand_shorten_constant(const char *sym)
 {
-    append_conf("# define %s %s%s\n", sym, constant_prefix, sym); 
+    append_conf("  #define %s %s%s\n", sym, constant_prefix, sym); 
 }
 
 void
 chaz_ModHand_shorten_macro(const char *sym)
 {
-    append_conf("# define %s %s%s\n", sym, macro_prefix, sym); 
+    append_conf("  #define %s %s%s\n", sym, macro_prefix, sym); 
 }
 
 void
 chaz_ModHand_shorten_typedef(const char *sym)
 {
-    append_conf("# define %s %s%s\n", sym, typedef_prefix, sym); 
+    append_conf("  #define %s %s%s\n", sym, typedef_prefix, sym); 
 }
 
 void
 chaz_ModHand_shorten_function(const char *sym)
 {
-    append_conf("# define %s %s%s\n", sym, function_prefix, sym); 
+    append_conf("  #define %s %s%s\n", sym, function_prefix, sym); 
 }
 
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.charm Sat Nov  4 13:20:00 2006
@@ -37,6 +37,7 @@
     if (verbosity)
         printf("Cleaning up...\n");
 
+    /* dispatch ModHandler's clean up routines, destroy objects */
     ModHand_clean_up();
     os->destroy(os);
     compiler->destroy(compiler);

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.charm Sat Nov  4 13:20:00 2006
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-
+/* code for verifying ISO func macro */
 static char iso_func_code[] = METAQUOTE
     #include "_charm.h" 
     int main() {
@@ -17,6 +17,7 @@
     }
 METAQUOTE;
 
+/* code for verifying GNU func macro */
 static char gnuc_func_code[] = METAQUOTE
     #include "_charm.h" 
     int main() {
@@ -75,6 +76,7 @@
         append_conf("#define %sHAS_GNUC_FUNC_MACRO\n", constant_prefix);
     }
 
+	/* shorten */
     if (want_short_names) {
         START_SHORT_NAMES;
         if (has_iso_funcmac) 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.harm Sat Nov  4 13:20:00 2006
@@ -7,11 +7,24 @@
 #include <stdio.h>
 
 /* Run the FuncMacro module.
+ * 
+ * If __func__ successfully resolves, this will be defined:
+ *
+ * HAS_ISO_FUNC_MACRO
+ * 
+ * If __FUNCTION__ successfully resolves, this will be defined:
+ * 
+ * HAS_GNUC_FUNC_MACRO
+ * 
+ * If one or the other succeeds, these will be defined:
+ * 
+ * HAS_FUNC_MACRO
+ * Func_Macro
  */
 void chaz_FuncMacro_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define FuncMacro_run    chaz_FuncMacro_run
+  #define FuncMacro_run    chaz_FuncMacro_run
 #endif
 
 #endif /* H_CHAZ_FUNC_MACRO */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.charm Sat Nov  4 13:20:00 2006
@@ -104,6 +104,7 @@
         append_conf("#define %s%s\n", constant_prefix, aff_buf);
     }
 
+    /* shorten */
     if (want_short_names) {
         START_SHORT_NAMES;
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.harm Sat Nov  4 13:20:00 2006
@@ -65,7 +65,7 @@
 chaz_Headers_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define Headers_run        chaz_Headers_run
+  #define Headers_run        chaz_Headers_run
 #endif
 
 #endif /* H_CHAZ_HEADERS */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.charm Sat Nov  4 13:20:00 2006
@@ -329,13 +329,14 @@
     /* true and false */
     append_conf(
         "#ifndef true\n"
-        "# define true 1\n"
+        "  #define true 1\n"
         "#endif\n"
         "#ifndef false\n"
-        "# define false 0\n"
+        "  #define false 0\n"
         "#endif\n"
     );
 
+    /* shorten */
     if (want_short_names) {
         START_SHORT_NAMES;
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.harm Sat Nov  4 13:20:00 2006
@@ -98,7 +98,7 @@
 void chaz_Integers_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define Integers_run    chaz_Integers_run
+  #define Integers_run    chaz_Integers_run
 #endif
 
 #endif /* H_CHAZ_INTEGERS */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm Sat Nov  4 13:20:00 2006
@@ -10,13 +10,13 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+/* sets of symbols which might provide large file support */
 typedef struct off64_combo {
     const char *includes;
-    const char *ftell_com;
-    const char *fseek_com;
-    const char *type;
+    const char *ftell_command;
+    const char *fseek_command;
+    const char *offset64_type;
 } off64_combo;
-
 static off64_combo off64_combos[] = {
     { "#include <sys/types.h>\n", "ftello64", "fseeko64", "off64_t" },
     { "#include <sys/types.h>\n", "ftello", "fseeko", "off_t" },
@@ -48,9 +48,11 @@
 
 static char* code_buf = NULL;
 static size_t code_buf_len = 0;
+
+/* vars for holding lfs commands, once they're discovered */
 static char fseek_command[10];
 static char ftell_command[10];
-static char loff_type[10];
+static char off64_type[10];
 
 void
 chaz_LargeFiles_run(void) 
@@ -65,9 +67,9 @@
         off64_combo combo = off64_combos[i];
         success = probe_off64(&combo);
         if (success) {
-            strcpy(fseek_command, combo.fseek_com);
-            strcpy(ftell_command, combo.ftell_com);
-            strcpy(loff_type, combo.type);
+            strcpy(fseek_command, combo.fseek_command);
+            strcpy(ftell_command, combo.ftell_command);
+            strcpy(off64_type, combo.offset64_type);
             break;
         }
     }
@@ -76,12 +78,12 @@
     if (success) {
         append_conf("#define %sHAS_LARGE_FILE_SUPPORT\n", constant_prefix );
         /* alias these only if they're not already provided and correct */
-        if (strcmp(loff_type, "off64_t") != 0) {
+        if (strcmp(off64_type, "off64_t") != 0) {
             append_conf(
                 "#define %soff64_t %s\n"
                 "#define %sftello64 %s\n" 
                 "#define %sfseeko64 %s\n",
-                constant_prefix, loff_type,
+                constant_prefix, off64_type,
                 function_prefix, ftell_command,
                 function_prefix, fseek_command
             );
@@ -105,7 +107,7 @@
         shorten_constant("HAS_LARGE_FILE_SUPPORT");
 
         /* alias these only if they're not already provided and correct */
-        if (strcmp(loff_type, "off64_t") != 0) {
+        if (strcmp(off64_type, "off64_t") != 0) {
             shorten_constant("off64_t");
             shorten_function("ftello64");
             shorten_function("fseeko64");
@@ -137,18 +139,19 @@
 {
     char *output = NULL;
     size_t output_len;
-    size_t needed = sizeof(off64_code) + (2 * strlen(combo->type)) 
-        + strlen(combo->ftell_com) + strlen(combo->fseek_com) + 20;
+    size_t needed = sizeof(off64_code) + (2 * strlen(combo->offset64_type)) 
+        + strlen(combo->ftell_command) + strlen(combo->fseek_command) + 20;
     chaz_bool_t success = false;
 
+    /* allocate buffer as necessary and prepare the source code */
     if (code_buf_len < needed) {
         code_buf = (char*)realloc(code_buf, needed);
         code_buf_len = needed;
     }
+    sprintf(code_buf, off64_code, combo->includes, combo->offset64_type, 
+        combo->offset64_type, combo->ftell_command, combo->fseek_command);
 
-    sprintf(code_buf, off64_code, combo->includes, combo->type, combo->type, 
-        combo->ftell_com, combo->fseek_com);
-
+    /* verify compilation and that the offset type has 8 bytes */
     output = capture_output(code_buf, strlen(code_buf), 
         &output_len);
     if (output != NULL) {
@@ -197,7 +200,7 @@
     if ( (sparse_fh = fopen("_charm_sparse", "w+")) == NULL )
         die("Couldn't open file '_charm_sparse'");
 
-    /* seek fh to [offset], write a byte, close file, check for errors */
+    /* seek fh to [offset], write a byte, close file */
     if ( (fseek(sparse_fh, offset, SEEK_SET)) == -1)
         die("seek failed: %s", strerror(errno));
     if ( (fprintf(sparse_fh, "X")) != 1 )

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.harm Sat Nov  4 13:20:00 2006
@@ -22,7 +22,7 @@
 void chaz_LargeFiles_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define LargeFiles_run    chaz_LargeFiles_run
+  #define LargeFiles_run    chaz_LargeFiles_run
 #endif
 
 #endif /* H_CHAZ_LARGE_FILES */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.charm Sat Nov  4 13:20:00 2006
@@ -12,12 +12,14 @@
 {
     START_RUN("UnusedVars");
     
+    /* write the macros (no test, these are the same everywhere) */
     append_conf(
         "#define %sUnused_Var(x) ((void)x)\n"
         "#define %sUnreachable_Return(type) return (type)0\n",
         macro_prefix, macro_prefix 
     );
 
+    /* shorten */
     if (want_short_names) {
         START_SHORT_NAMES;
         shorten_macro("Unused_Var");

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.harm Sat Nov  4 13:20:00 2006
@@ -7,11 +7,17 @@
 #include <stdio.h>
 
 /* Run the UnusedVars module.
+ *
+ * These symbols are exported:
+ * 
+ * Unused_Var(var)
+ * Unreachable_Return(type)
+ * 
  */
 void chaz_UnusedVars_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define UnusedVars_run    chaz_UnusedVars_run
+  #define UnusedVars_run    chaz_UnusedVars_run
 #endif
 
 #endif /* H_CHAZ_UNUSED_VARS */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.charm Sat Nov  4 13:20:00 2006
@@ -7,6 +7,7 @@
 #include <stdio.h>
 
 
+/* code for verifying ISO-style variadic macros */
 static char iso_code[] = METAQUOTE
     #include "_charm.h"
     #define ISO_TEST(fmt, ...) \
@@ -18,6 +19,7 @@
     }
 METAQUOTE;
 
+/* code for verifying GNU-style variadic macros */
 static char gnuc_code[] = METAQUOTE
     #include "_charm.h"
     #define GNU_TEST(fmt, args...) \
@@ -64,6 +66,7 @@
             constant_prefix);
     }
 
+	/* shorten */
     if (want_short_names) {
         START_SHORT_NAMES;
         if (has_varmacros)

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.harm Sat Nov  4 13:20:00 2006
@@ -7,11 +7,23 @@
 #include <stdio.h>
 
 /* Run the VariadicMacros module.
+ *
+ * If your compiler supports ISO-style variadic macros, this will be defined:
+ * 
+ * HAS_ISO_VARIADIC_MACROS
+ * 
+ * If your compiler supports GNU-style variadic macros, this will be defined:
+ * 
+ * HAS_GNUC_VARIADIC_MACROS
+ * 
+ * If you have at least one of the above, this will be defined:
+ * 
+ * HAS_VARIADIC_MACROS
  */
 void chaz_VariadicMacros_run(void);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define VariadicMacros_run    chaz_VaradicMacros_run
+  #define VariadicMacros_run    chaz_VaradicMacros_run
 #endif
 
 #endif /* H_CHAZ_VARIADIC_MACROS */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.charm Sat Nov  4 13:20:00 2006
@@ -14,6 +14,7 @@
 
 void
 chaz_Test_init(void) {
+	/* unbuffer stdout */
 	int check_val = setvbuf(stdout, NULL, _IONBF, 0);
 	if (check_val != 0)
 		fprintf(stderr, "Failed when trying to unbuffer stdout\n");

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test.harm Sat Nov  4 13:20:00 2006
@@ -14,12 +14,12 @@
 (*chaz_TestBatch_destroy_t)(chaz_TestBatch *batch);
 
 /* This function, which is unique to each TestBatch, actually runs the test
- * script.
+ * sequence.
  */
 typedef void
 (*chaz_TestBatch_test_func_t)(chaz_TestBatch *batch);
 
-/* Print a header, execute the test script, print a report.
+/* Print a header, execute the test sequence, print a report.
  */
 typedef void
 (*chaz_TestBatch_run_test_t)(chaz_TestBatch *batch);
@@ -111,22 +111,22 @@
                                     const char *pat, ...);
 
 #ifdef CHAZ_USE_SHORT_NAMES
-# define TestBatch_destroy_t          chaz_TestBatch_destroy_t
-# define TestBatch_test_func_t        chaz_TestBatch_test_func_t
-# define TestBatch_run_test_t         chaz_TestBatch_run_test_t
-# define TestBatch                    chaz_TestBatch
-# define Test_init                    chaz_Test_init
-# define Test_new_batch               chaz_Test_new_batch
-# define ASSERT_TRUE                  CHAZ_TEST_ASSERT_TRUE
-# define ASSERT_FALSE                 CHAZ_TEST_ASSERT_FALSE
-# define ASSERT_STR_EQ                CHAZ_TEST_ASSERT_STR_EQ
-# define ASSERT_STR_NEQ               CHAZ_TEST_ASSERT_STR_NEQ
-# define PASS                         CHAZ_TEST_PASS
-# define FAIL                         CHAZ_TEST_FAIL
-# define ASSERT_INT_EQ                CHAZ_TEST_ASSERT_INT_EQ
-# define ASSERT_FLOAT_EQ              CHAZ_TEST_ASSERT_FLOAT_EQ
-# define SKIP                         CHAZ_TEST_SKIP
-# define SKIP_REMAINING               CHAZ_TEST_SKIP_REMAINING
+  #define TestBatch_destroy_t          chaz_TestBatch_destroy_t
+  #define TestBatch_test_func_t        chaz_TestBatch_test_func_t
+  #define TestBatch_run_test_t         chaz_TestBatch_run_test_t
+  #define TestBatch                    chaz_TestBatch
+  #define Test_init                    chaz_Test_init
+  #define Test_new_batch               chaz_Test_new_batch
+  #define ASSERT_TRUE                  CHAZ_TEST_ASSERT_TRUE
+  #define ASSERT_FALSE                 CHAZ_TEST_ASSERT_FALSE
+  #define ASSERT_STR_EQ                CHAZ_TEST_ASSERT_STR_EQ
+  #define ASSERT_STR_NEQ               CHAZ_TEST_ASSERT_STR_NEQ
+  #define PASS                         CHAZ_TEST_PASS
+  #define FAIL                         CHAZ_TEST_FAIL
+  #define ASSERT_INT_EQ                CHAZ_TEST_ASSERT_INT_EQ
+  #define ASSERT_FLOAT_EQ              CHAZ_TEST_ASSERT_FLOAT_EQ
+  #define SKIP                         CHAZ_TEST_SKIP
+  #define SKIP_REMAINING               CHAZ_TEST_SKIP_REMAINING
 #endif
 
 #endif /* H_CHAZ_TEST */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.charm Sat Nov  4 13:20:00 2006
@@ -11,8 +11,8 @@
 {
     chaz_Test_init();
 
+    /* create a null-terminated array of test batches to iterate over */
     batches = malloc(7 * sizeof(TestBatch*));
-
     batches[0] = chaz_TFuncMacro_prepare();
     batches[1] = chaz_THeaders_prepare();
     batches[2] = chaz_TIntegers_prepare();
@@ -31,6 +31,7 @@
     int total_skipped = 0;
     int i;
     
+    /* sanity check */
     if (batches == NULL) {
         fprintf(stderr, "Must call AllTests_init() first.");
         exit(1);
@@ -52,7 +53,6 @@
     printf("TOTAL TESTS:   %d\nTOTAL PASSED:  %d\nTOTAL FAILED:  %d\n"
         "TOTAL SKIPPED: %d\n", 
         total_tests, total_passed, total_failed, total_skipped);
-
 }
 
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.harm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.harm Sat Nov  4 13:20:00 2006
@@ -65,6 +65,18 @@
 chaz_TVariadicMacros_run(chaz_TestBatch *batch);
 
 #ifdef CHAZ_USE_SHORT_NAMES
+  #define TFuncMacro_prepare           chaz_TFuncMacro_prepare
+  #define THeaders_prepare             chaz_THeaders_prepare
+  #define TIntegers_prepare            chaz_TIntegers_prepare
+  #define TLargeFiles_prepare          chaz_TLargeFiles_prepare
+  #define TUnusedVars_prepare          chaz_TUnusedVars_prepare
+  #define TVariadicMacros_prepare      chaz_TVariadicMacros_prepare
+  #define TFuncMacro_run               chaz_TFuncMacro_run
+  #define THeaders_run                 chaz_THeaders_run
+  #define TIntegers_run                chaz_TIntegers_run
+  #define TLargeFiles_run              chaz_TLargeFiles_run
+  #define TUnusedVars_run              chaz_TUnusedVars_run
+  #define TVariadicMacros_run          chaz_TVariadicMacros_run
 #endif
 
 #endif /* H_CHAZ_TEST */

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.charm?view=diff&rev=471262&r1=471261&r2=471262
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Integers.charm Sat Nov  4 13:20:00 2006
@@ -89,7 +89,7 @@
         ASSERT_TRUE(batch, (sizeof(i32_t) == 4), "i32_t is 4 bytes");
         ASSERT_TRUE(batch, (sizeof(u32_t) == 4), "u32_t is 4 bytes");
         ASSERT_TRUE(batch, (I32_MAX == I32_C(2147483647)), "I32_MAX");
-        /* The (-2147483647 - 1) avoids a compiler warning */
+        /* the (-2147483647 - 1) avoids a compiler warning */
         ASSERT_TRUE(batch, (I32_MIN == I32_C(-2147483647 - 1)), "I32_MIN");
         ASSERT_TRUE(batch, (U32_MAX == U32_C(4294967295)), "U32_MAX");
     }