Peter Karman wrote on 11/20/09 10:23 PM:
> Marvin Humphrey wrote on 11/20/09 10:19 PM:
> 
>> The two tasks I'd suggest are superficial style changes which will serve to
>> familiarize you with most of Charmonizer's modules.
>>
>> Task #1:
>>
>>     The core Lucy code base has adopted a naming convention taken from the 
>> Perl
>>     code base: the names of all static functions are prepended with "S_".
>>     Charmonizer predates the adoption of this convention; we should switch
>>     over to it:
>>
>>      /* Write the "_charm.h" file used by every probe.
>>       */
>>      static void
>>     -write_charm_h();
>>     +S_write_charm_h();
> 
> I'll work on this first. Boring is fine if it moves us all along. :)
> 

Patch attached.

Or would you prefer I create a JIRA ticket, etc.?



-- 
Peter Karman  .  http://peknet.com/  .  [email protected]
Index: charmonizer/src/Charmonizer/Test/FuncMacro.charm
===================================================================
--- charmonizer/src/Charmonizer/Test/FuncMacro.charm    (revision 882833)
+++ charmonizer/src/Charmonizer/Test/FuncMacro.charm    (working copy)
@@ -12,7 +12,7 @@
 }
 
 #ifdef INLINE
-static INLINE char* inline_function()
+static INLINE char* S_inline_function()
 {
     return "inline works";
 }
@@ -44,7 +44,7 @@
 #endif
 
 #ifdef INLINE
-    PASS(batch, inline_function());
+    PASS(batch, S_inline_function());
 #else
     SKIP(batch, "no INLINE functions");
 #endif
Index: charmonizer/src/Charmonizer/Probe/Headers.charm
===================================================================
--- charmonizer/src/Charmonizer/Probe/Headers.charm     (revision 882833)
+++ charmonizer/src/Charmonizer/Probe/Headers.charm     (working copy)
@@ -18,7 +18,7 @@
 /* Add a header to the keepers array.
  */
 static void
-keep(const char *header_name);
+S_keep(const char *header_name);
 
 static size_t aff_buf_size = 0;
 static char *aff_buf = NULL;
@@ -27,7 +27,7 @@
  * [aff_buf].
  */
 static void
-encode_affirmation(const char *header_name);
+S_encode_affirmation(const char *header_name);
 
 #define NUM_C89_HEADERS 15
 char *c89_headers[] = {
@@ -98,14 +98,14 @@
         has_posix = true;
         append_conf("#define CHY_HAS_POSIX\n");
         for (i = 0; posix_headers[i] != NULL; i++) {
-            keep(posix_headers[i]);
+            S_keep(posix_headers[i]);
         }
     }
     /* Test one-at-a-time. */
     else {
         for (i = 0; posix_headers[i] != NULL; i++) {
             if (check_header(posix_headers[i])) {
-                keep(posix_headers[i]);
+                S_keep(posix_headers[i]);
             }
         }
     }
@@ -116,14 +116,14 @@
         append_conf("#define CHY_HAS_C89\n");
         append_conf("#define CHY_HAS_C90\n");
         for (i = 0; c89_headers[i] != NULL; i++) {
-            keep(c89_headers[i]);
+            S_keep(c89_headers[i]);
         }
     }
     /* Test one-at-a-time. */
     else {
         for (i = 0; c89_headers[i] != NULL; i++) {
             if (check_header(c89_headers[i])) {
-                keep(c89_headers[i]);
+                S_keep(c89_headers[i]);
             }
         }
     }
@@ -131,21 +131,21 @@
     /* Test for all Windows headers in one blast */
     if (check_many_headers((const char**)win_headers)) {
         for (i = 0; win_headers[i] != NULL; i++) {
-            keep(win_headers[i]);
+            S_keep(win_headers[i]);
         }
     }
     /* Test one-at-a-time. */
     else {
         for (i = 0; win_headers[i] != NULL; i++) {
             if (check_header(win_headers[i])) {
-                keep(win_headers[i]);
+                S_keep(win_headers[i]);
             }
         }
     }
 
     /* append the config with every header detected so far */
     for (i = 0; keepers[i] != NULL; i++) {
-        encode_affirmation(keepers[i]);
+        S_encode_affirmation(keepers[i]);
         append_conf("#define CHY_%s\n", aff_buf);
     }
 
@@ -158,7 +158,7 @@
         shorten_macro("HAS_C90");
     }
     for (i = 0; keepers[i] != NULL; i++) {
-        encode_affirmation(keepers[i]);
+        S_encode_affirmation(keepers[i]);
         shorten_macro(aff_buf);
     }
     END_SHORT_NAMES;
@@ -167,7 +167,7 @@
 }
 
 static void
-keep(const char *header_name)
+S_keep(const char *header_name)
 {
     if (keeper_count >= MAX_KEEPER_COUNT)
         die("Too many keepers -- increase MAX_KEEPER_COUNT");
@@ -176,7 +176,7 @@
 }
 
 static void
-encode_affirmation(const char *header_name) {
+S_encode_affirmation(const char *header_name) {
     char *buf, *buf_end;
     size_t len = strlen(header_name) + sizeof("HAS_");
     
Index: charmonizer/src/Charmonizer/Probe/LargeFiles.charm
===================================================================
--- charmonizer/src/Charmonizer/Probe/LargeFiles.charm  (revision 882833)
+++ charmonizer/src/Charmonizer/Probe/LargeFiles.charm  (working copy)
@@ -36,23 +36,23 @@
 /* Check what name 64-bit ftell, fseek go by.
  */
 static chaz_bool_t
-probe_off64(off64_combo *combo);
+S_probe_off64(off64_combo *combo);
 
 /* Determine whether we can use sparse files.
  */
 static chaz_bool_t 
-check_sparse_files();
+S_check_sparse_files();
 
 /* Helper for check_sparse_files().  
  */
 static void
-test_sparse_file(long offset, Stat *st);
+S_test_sparse_file(long offset, Stat *st);
 
 /* See if trying to write a 5 GB file in a subprocess bombs out.  If it
  * doesn't, then the test suite can safely verify large file support.
  */
 static chaz_bool_t
-can_create_big_files();
+S_can_create_big_files();
 
 static char* code_buf = NULL;
 static size_t code_buf_len = 0;
@@ -74,7 +74,7 @@
     /* see if off64_t and friends exist or have synonyms */
     for (i = 0; off64_combos[i].includes != NULL; i++) {
         off64_combo combo = off64_combos[i];
-        success = probe_off64(&combo);
+        success = S_probe_off64(&combo);
         if (success) {
             strcpy(fopen_command, combo.fopen_command);
             strcpy(fseek_command, combo.fseek_command);
@@ -97,10 +97,10 @@
     }
 
     /* check for sparse files */
-    if (check_sparse_files()) {
+    if (S_check_sparse_files()) {
         append_conf("#define CHAZ_HAS_SPARSE_FILES\n");
         /* see if we can create a 5 GB file without crashing */
-        if (success && can_create_big_files())
+        if (success && S_can_create_big_files())
             append_conf("#define CHAZ_CAN_CREATE_BIG_FILES\n");
     }
     else {
@@ -150,7 +150,7 @@
 
 
 static chaz_bool_t
-probe_off64(off64_combo *combo)
+S_probe_off64(off64_combo *combo)
 {
     char *output = NULL;
     size_t output_len;
@@ -182,7 +182,7 @@
 }
 
 static chaz_bool_t 
-check_sparse_files()
+S_check_sparse_files()
 {
     Stat st_a, st_b;
 
@@ -191,8 +191,8 @@
         return false;
 
     /* write and stat a 1 MB file and a 2 MB file, both of them sparse */
-    test_sparse_file(1000000, &st_a);
-    test_sparse_file(2000000, &st_b);
+    S_test_sparse_file(1000000, &st_a);
+    S_test_sparse_file(2000000, &st_b);
     if (!(st_a.valid && st_b.valid))
         return false;
     if (st_a.size != 1000001)
@@ -208,7 +208,7 @@
 } 
 
 static void
-test_sparse_file(long offset, Stat *st)
+S_test_sparse_file(long offset, Stat *st)
 {
     FILE *sparse_fh;
 
@@ -258,7 +258,7 @@
 METAQUOTE;
 
 static chaz_bool_t
-can_create_big_files()
+S_can_create_big_files()
 {
     char *output;
     size_t output_len;
Index: charmonizer/src/Charmonizer/Probe/FuncMacro.charm
===================================================================
--- charmonizer/src/Charmonizer/Probe/FuncMacro.charm   (revision 882833)
+++ charmonizer/src/Charmonizer/Probe/FuncMacro.charm   (working copy)
@@ -39,7 +39,7 @@
 METAQUOTE;
 
 static char*
-try_inline(const char *keyword, size_t *output_len) {
+S_try_inline(const char *keyword, size_t *output_len) {
     char code[ sizeof(inline_code) + 30 ];
     sprintf(code, inline_code, keyword);
     return capture_output(code, strlen(code), output_len);
@@ -107,7 +107,7 @@
     
     for (i = 0; i < num_inline_options; i++) {
         const char *inline_option = inline_options[i];
-        output = try_inline(inline_option, &output_len);
+        output = S_try_inline(inline_option, &output_len);
         if (output != NULL) {
             has_inline = true;
             append_conf("#define CHY_INLINE %s\n", inline_option);
Index: charmonizer/src/Charmonizer/Probe/Integers.charm
===================================================================
--- charmonizer/src/Charmonizer/Probe/Integers.charm    (revision 882833)
+++ charmonizer/src/Charmonizer/Probe/Integers.charm    (working copy)
@@ -14,7 +14,7 @@
 /* Determine endian-ness of this machine.
  */
 static chaz_bool_t
-machine_is_big_endian();
+S_machine_is_big_endian();
 
 static char sizes_code[] = METAQUOTE
     #include "_charm.h"
@@ -81,7 +81,7 @@
     START_RUN("Integers");
 
     /* document endian-ness */
-    if (machine_is_big_endian())
+    if (S_machine_is_big_endian())
         append_conf("#define CHY_BIG_END\n");
     else 
         append_conf("#define CHY_LITTLE_END\n");
@@ -335,7 +335,7 @@
 
     /* shorten */
     START_SHORT_NAMES;
-    if ( machine_is_big_endian() ) {
+    if ( S_machine_is_big_endian() ) {
         shorten_macro("BIG_END");
     }
     else {
@@ -402,7 +402,7 @@
 }
 
 static chaz_bool_t
-machine_is_big_endian()
+S_machine_is_big_endian()
 {
     long one = 1;
     return !(*((char *)(&one)));
Index: charmonizer/src/Charmonizer/Core/HeadCheck.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/HeadCheck.charm    (revision 882833)
+++ charmonizer/src/Charmonizer/Core/HeadCheck.charm    (working copy)
@@ -26,24 +26,24 @@
 /* Comparison function to feed to qsort, bsearch, etc.
  */
 static int
-compare_headers(const void *vptr_a, const void *vptr_b);
+S_compare_headers(const void *vptr_a, const void *vptr_b);
 
 /* Run a test compilation and return a new Header object encapsulating the
  * results.
  */
 static Header* 
-discover_header(const char *header_name);
+S_discover_header(const char *header_name);
 
 /* Extend the cache, add this Header object to it, and sort.
  */
 static void
-add_to_cache(Header *header);
+S_add_to_cache(Header *header);
 
 /* Like add_to_cache, but takes a individual elements instead of a Header* and
  * checks if header exists in array first.
  */
 static void
-maybe_add_to_cache(const char *header_name, chaz_bool_t exists);
+S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists);
 
 void
 chaz_HeadCheck_init()
@@ -70,12 +70,12 @@
     key.name = (char*)header_name;
     key.exists = false;
     header_ptr = bsearch(&fake, header_cache, cache_size, sizeof(void*),
-        compare_headers);
+        S_compare_headers);
     
     /* if it's not there, go try a test compile */
     if (header_ptr == NULL) {
-        header = discover_header(header_name);
-        add_to_cache(header);
+        header = S_discover_header(header_name);
+        S_add_to_cache(header);
     }
     else {
         header = *header_ptr;
@@ -102,7 +102,7 @@
     success = test_compile(code_buf, strlen(code_buf));
     if (success) {
         for (i = 0; header_names[i] != NULL; i++) {
-            maybe_add_to_cache(header_names[i], true);
+            S_maybe_add_to_cache(header_names[i], true);
         }
     }
 
@@ -131,7 +131,7 @@
 }
 
 static int
-compare_headers(const void *vptr_a, const void *vptr_b) {
+S_compare_headers(const void *vptr_a, const void *vptr_b) {
     Header **const a = (Header**)vptr_a;
     Header **const b = (Header**)vptr_b;
 
@@ -144,7 +144,7 @@
 }
 
 static Header* 
-discover_header(const char *header_name) {
+S_discover_header(const char *header_name) {
     Header* header = (Header*)malloc(sizeof(Header));
     
     /* assign */
@@ -160,7 +160,7 @@
 }
 
 static void
-add_to_cache(Header *header)
+S_add_to_cache(Header *header)
 {
     /* realloc array -- inefficient, but this isn't a bottleneck */
     cache_size++;
@@ -168,11 +168,11 @@
     header_cache[ cache_size - 1 ] = header;
 
     /* keep the list of headers sorted */
-    qsort(header_cache, cache_size, sizeof(*header_cache), compare_headers);
+    qsort(header_cache, cache_size, sizeof(*header_cache), S_compare_headers);
 }
 
 static void
-maybe_add_to_cache(const char *header_name, chaz_bool_t exists)
+S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists)
 {
     Header *header;
     Header  key;
@@ -182,14 +182,14 @@
     key.name   = (char*)header_name;
     key.exists = exists;
     header = bsearch(&fake, header_cache, cache_size, sizeof(void*),
-        compare_headers);
+        S_compare_headers);
     
     /* we've already done the test compile, so skip that step and add it */
     if (header == NULL) {
         header = (Header*)malloc(sizeof(Header));
         header->name   = strdup(header_name);
         header->exists = exists;
-        add_to_cache(header);
+        S_add_to_cache(header);
     }
 }
 
Index: charmonizer/src/Charmonizer/Core/OperSys.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/OperSys.charm      (revision 882833)
+++ charmonizer/src/Charmonizer/Core/OperSys.charm      (working copy)
@@ -8,19 +8,19 @@
 #include "Charmonizer/Core/OperSys.h"
 
 static void
-probe_devnull(OperSys *self);
+S_probe_devnull(OperSys *self);
 
 static void
-destroy(OperSys *self);
+S_destroy(OperSys *self);
 
 static void
-remove_exe(OperSys *self, char *name);
+S_remove_exe(OperSys *self, char *name);
 
 static void
-remove_obj(OperSys *self, char *name);
+S_remove_obj(OperSys *self, char *name);
 
 static int 
-run_local(OperSys *self, ...);
+S_run_local(OperSys *self, ...);
 
 chaz_OperSys*
 chaz_OS_new(const char *name) 
@@ -36,10 +36,10 @@
     /* init */
     self->buf        = NULL;
     self->buf_len    = 0;
-    self->remove_obj = remove_obj;
-    self->remove_exe = remove_exe;
-    self->run_local  = run_local;
-    self->destroy    = destroy;
+    self->remove_obj = S_remove_obj;
+    self->remove_exe = S_remove_exe;
+    self->run_local  = S_run_local;
+    self->destroy    = S_destroy;
 
     /* derive */
     if (strcmp(name, "mswin32") == 0) {
@@ -52,14 +52,14 @@
         self->obj_ext = strdup("");
         self->exe_ext = strdup("");
         self->local_command_start = strdup("./");
-        probe_devnull(self);
+        S_probe_devnull(self);
     }
 
     return self;
 }
 
 static void
-probe_devnull(OperSys *self)
+S_probe_devnull(OperSys *self)
 {
     char *const devnull_options[] = {
         "/dev/null", 
@@ -84,7 +84,7 @@
 }
 
 static void
-destroy(OperSys *self)
+S_destroy(OperSys *self)
 {
     free(self->buf);
     free(self->name);
@@ -96,7 +96,7 @@
 }
 
 static void
-remove_exe(OperSys *self, char *name)
+S_remove_exe(OperSys *self, char *name)
 {
     self->buf_len = join_strings(&(self->buf), self->buf_len, name, 
         self->exe_ext, NULL);
@@ -104,7 +104,7 @@
 }
 
 static void
-remove_obj(OperSys *self, char *name)
+S_remove_obj(OperSys *self, char *name)
 {
     self->buf_len = join_strings(&(self->buf), self->buf_len, name, 
         self->obj_ext, NULL);
@@ -112,7 +112,7 @@
 }
 
 static int
-run_local(OperSys *self, ...)
+S_run_local(OperSys *self, ...)
 {
     va_list args;
 
Index: charmonizer/src/Charmonizer/Core/Compiler.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/Compiler.charm     (revision 882833)
+++ charmonizer/src/Charmonizer/Core/Compiler.charm     (working copy)
@@ -10,21 +10,21 @@
 extern chaz_bool_t chaz_ModHand_charm_run_available;
 
 static void
-destroy(Compiler *self);
+S_destroy(Compiler *self);
 
 static chaz_bool_t
-compile_exe(Compiler *self, const char *source_path, const char *exe_path, 
+S_compile_exe(Compiler *self, const char *source_path, const char *exe_path, 
             const char *code, size_t code_len);
 
 static chaz_bool_t
-compile_obj(Compiler *self, const char *source_path, const char *obj_path, 
+S_compile_obj(Compiler *self, const char *source_path, const char *obj_path, 
             const char *code, size_t code_len);
 
 static void
-add_inc_dir(Compiler *self, const char *dir);
+S_add_inc_dir(Compiler *self, const char *dir);
 
 static void
-do_test_compile(Compiler *self);
+S_do_test_compile(Compiler *self);
 
 chaz_Compiler*
 chaz_CC_new(OperSys *oper_sys, const char *cc_command, const char *cc_flags)
@@ -43,10 +43,10 @@
     /* init */
     self->buf             = NULL;
     self->buf_len         = 0;
-    self->compile_exe     = compile_exe;
-    self->compile_obj     = compile_obj;
-    self->add_inc_dir     = add_inc_dir;
-    self->destroy         = destroy;
+    self->compile_exe     = S_compile_exe;
+    self->compile_obj     = S_compile_obj;
+    self->add_inc_dir     = S_add_inc_dir;
+    self->destroy         = S_destroy;
     self->inc_dirs        = (char**)calloc(sizeof(char*), 1);
 
     /* set compiler-specific vars */
@@ -58,13 +58,13 @@
     self->add_inc_dir(self, ".");
 
     /* if we can't compile anything, game over */
-    do_test_compile(self);
+    S_do_test_compile(self);
 
     return self;
 }
 
 static void
-destroy(Compiler *self)
+S_destroy(Compiler *self)
 {
     char **inc_dirs;
 
@@ -83,7 +83,7 @@
 }
 
 static chaz_bool_t
-compile_exe(Compiler *self, const char *source_path, const char *exe_path, 
+S_compile_exe(Compiler *self, const char *source_path, const char *exe_path, 
             const char *code, size_t code_len)
 {
     chaz_bool_t successful;
@@ -124,7 +124,7 @@
 }
 
 static chaz_bool_t
-compile_obj(Compiler *self, const char *source_path, const char *obj_path, 
+S_compile_obj(Compiler *self, const char *source_path, const char *obj_path, 
             const char *code, size_t code_len)
 {
     chaz_bool_t successful;
@@ -160,7 +160,7 @@
 }
 
 static void
-do_test_compile(Compiler *self)
+S_do_test_compile(Compiler *self)
 {
     char *code = "int main() { return 0; }\n";
     chaz_bool_t success;
@@ -180,7 +180,7 @@
 }
 
 static void
-add_inc_dir(Compiler *self, const char *dir)
+S_add_inc_dir(Compiler *self, const char *dir)
 {
     size_t num_dirs = 0; 
     char **dirs = self->inc_dirs;
Index: charmonizer/src/Charmonizer/Core/Stat.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/Stat.charm (revision 882833)
+++ charmonizer/src/Charmonizer/Core/Stat.charm (working copy)
@@ -16,7 +16,7 @@
 
 /* lazily compile _charm_stat */
 static void
-init();
+S_init();
 
 void
 chaz_Stat_stat(const char *filepath, chaz_Stat *target)
@@ -29,7 +29,7 @@
 
     /* lazy init */
     if (!initialized)
-        init();
+        S_init();
 
     /* bail out if we didn't succeed in compiling/using _charm_stat */
     if (!stat_available)
@@ -70,7 +70,7 @@
 METAQUOTE;
 
 static void
-init()
+S_init()
 {
     /* only try this once */
     initialized = true;
Index: charmonizer/src/Charmonizer/Core/ModHandler.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/ModHandler.charm   (revision 882833)
+++ charmonizer/src/Charmonizer/Core/ModHandler.charm   (working copy)
@@ -13,18 +13,18 @@
 /* Write the "_charm.h" file used by every probe.
  */
 static void
-write_charm_h();
+S_write_charm_h();
 
 /* Compile a small wrapper application which is used to redirect error output
  * to devnull.
  */
 static void
-build_charm_run();
+S_build_charm_run();
 
 /* Clean up the files associated with capture_output().
  */
 static void
-clean_up_try();
+S_clean_up_try();
 
 /* global vars */
 struct chaz_OperSys  *chaz_ModHand_os = NULL;
@@ -47,8 +47,8 @@
         try_app_path, NULL);
 
     /* write files needed by this module and others */
-    build_charm_run();
-    write_charm_h();
+    S_build_charm_run();
+    S_write_charm_h();
 }
 
 void
@@ -98,7 +98,7 @@
 METAQUOTE;
 
 static void
-write_charm_h()
+S_write_charm_h()
 {
     write_file("_charm.h", charm_h_code, strlen(charm_h_code));
 }
@@ -151,7 +151,7 @@
 METAQUOTE;
 
 static void
-build_charm_run()
+S_build_charm_run()
 {
     char *code = NULL;
     chaz_bool_t compile_succeeded = false;
@@ -181,7 +181,7 @@
     compile_succeeded = compiler->compile_exe(compiler, TRY_SOURCE_PATH, 
         TRY_APP_BASENAME, source, source_len);
 
-    clean_up_try();
+    S_clean_up_try();
 
     return compile_succeeded;
 }
@@ -211,7 +211,7 @@
     }
 
     /* remove all the files we just created */
-    clean_up_try();
+    S_clean_up_try();
 
     return captured_output;
 }
@@ -227,7 +227,7 @@
 }
 
 static void
-clean_up_try()
+S_clean_up_try()
 {
     remove(TRY_SOURCE_PATH);
     os->remove_exe(os, TRY_APP_BASENAME);
Index: charmonizer/src/Charmonizer/Core/Dir.charm
===================================================================
--- charmonizer/src/Charmonizer/Core/Dir.charm  (revision 882833)
+++ charmonizer/src/Charmonizer/Core/Dir.charm  (working copy)
@@ -49,7 +49,7 @@
 METAQUOTE;
 
 static chaz_bool_t
-try_init_posix_mkdir(char *header)
+S_try_init_posix_mkdir(char *header)
 {
     size_t needed = sizeof(posix_mkdir_code) + 30;
     char *code_buf = malloc(needed);
@@ -75,7 +75,7 @@
 }
 
 static chaz_bool_t
-try_init_win_mkdir()
+S_try_init_win_mkdir()
 {
     mkdir_available = compiler->compile_exe(compiler, "_charm_mkdir.c",
         "_charm_mkdir", win_mkdir_code, strlen(win_mkdir_code));
@@ -87,18 +87,18 @@
 }
 
 static void
-init_mkdir()
+S_init_mkdir()
 {
     if (verbosity) {
         printf("Attempting to compile _charm_mkdir utility...\n");
     }
-    if (try_init_win_mkdir())               { return; }
-    if (try_init_posix_mkdir("sys/stat.h")) { return; }
-    if (try_init_posix_mkdir("direct.h"))   { return; }
+    if (S_try_init_win_mkdir())               { return; }
+    if (S_try_init_posix_mkdir("sys/stat.h")) { return; }
+    if (S_try_init_posix_mkdir("direct.h"))   { return; }
 }
 
 static chaz_bool_t
-try_init_rmdir(char *header) 
+S_try_init_rmdir(char *header) 
 {
     size_t needed = sizeof(posix_mkdir_code) + 30;
     char *code_buf = malloc(needed);
@@ -110,14 +110,14 @@
 }
 
 static void
-init_rmdir()
+S_init_rmdir()
 {
     if (verbosity) {
         printf("Attempting to compile _charm_rmdir utility...\n");
     }
-    if (try_init_rmdir("unistd.h"))   { return; }
-    if (try_init_rmdir("dirent.h"))   { return; }
-    if (try_init_rmdir("direct.h"))   { return; }
+    if (S_try_init_rmdir("unistd.h"))   { return; }
+    if (S_try_init_rmdir("dirent.h"))   { return; }
+    if (S_try_init_rmdir("direct.h"))   { return; }
 }
 
 /* Compile _charm_mkdir and _charm_rmdir. */
@@ -126,8 +126,8 @@
 {
     if (!initialized) { 
         initialized = true;
-        init_mkdir();
-        init_rmdir();
+        S_init_mkdir();
+        S_init_rmdir();
     }
 }
 
Index: charmonizer/src/Charmonizer/Test.charm
===================================================================
--- charmonizer/src/Charmonizer/Test.charm      (revision 882833)
+++ charmonizer/src/Charmonizer/Test.charm      (working copy)
@@ -7,10 +7,10 @@
 #include "Charmonizer/Test.h"
 
 static void
-TestBatch_destroy(TestBatch *batch);
+S_TestBatch_destroy(TestBatch *batch);
 
 static void
-TestBatch_run_test(TestBatch *batch);
+S_TestBatch_run_test(TestBatch *batch);
 
 #define PRINT_SUPPLIED_MESS(_pattern, _args) \
     va_start(args, pat); \
@@ -42,8 +42,8 @@
     batch->num_passed      = 0;
     batch->num_failed      = 0;
     batch->num_skipped     = 0;
-    batch->destroy         = TestBatch_destroy;
-    batch->run_test        = TestBatch_run_test;
+    batch->destroy         = S_TestBatch_destroy;
+    batch->run_test        = S_TestBatch_run_test;
 
     return batch;
 }
@@ -55,14 +55,14 @@
 }
 
 static void
-TestBatch_destroy(TestBatch *batch)
+S_TestBatch_destroy(TestBatch *batch)
 {
     free(batch->name);
     free(batch);
 }
 
 static void
-TestBatch_run_test(TestBatch *batch) 
+S_TestBatch_run_test(TestBatch *batch) 
 {
     /* print start */
     PLAN(batch);

Reply via email to