lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r467752 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer/Core: OperSys.charm OperSys.harm
Date Wed, 25 Oct 2006 20:23:46 GMT
Author: marvin
Date: Wed Oct 25 13:23:45 2006
New Revision: 467752

URL: http://svn.apache.org/viewvc?view=rev&rev=467752
Log:
Simplify OperSys.charm using join_strings.  Remove a comment from
OperSys.harm that's about to become untrue.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.harm

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.charm?view=diff&rev=467752&r1=467751&r2=467752
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.charm Wed Oct 25 13:23:45 2006
@@ -18,11 +18,6 @@
 static void
 remove_obj(OperSys *self, char *name);
 
-/* Concatenate [ext] onto the end of [name] and try to remove it.
- */
-static void
-concat_and_remove(OperSys *self, char *name, char *ext);
-
 chaz_OperSys*
 chaz_OS_new(const char *name) 
 {
@@ -92,21 +87,14 @@
 static void
 remove_exe(OperSys *self, char *name)
 {
-    concat_and_remove(self, name, self->exe_ext);
+    join_strings(&(self->buf), self->buf_len, name, self->exe_ext, NULL);
+    remove(self->buf);
 }
 
 static void
 remove_obj(OperSys *self, char *name)
 {
-    concat_and_remove(self, name, self->obj_ext);
-}
-
-static void
-concat_and_remove(OperSys *self, char *name, char *ext)
-{
-    self->buf_len = grow_buf(&self->buf, self->buf_len, 
-        strlen(name) + strlen(ext));
-    sprintf(self->buf, "%s%s", name, ext);
+    join_strings(&(self->buf), self->buf_len, name, self->obj_ext, NULL);
     remove(self->buf);
 }
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.harm?view=diff&rev=467752&r1=467751&r2=467752
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/OperSys.harm Wed Oct 25 13:23:45 2006
@@ -38,8 +38,6 @@
 /** Constructor. 
  * 
  * @param name A string representing the name of the operating system.
- *             Currently, "mswin32" causes one set of behaviors and everything
- *             else is treated as a generic Unix.
  */
 chaz_OperSys*
 chaz_OS_new(const char *name);



Mime
View raw message