lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r930557 - in /lucene/lucy/trunk/core/Lucy/Store: CompoundFileReader.c CompoundFileWriter.c FSDirHandle.c FSFileHandle.c FSFolder.c FileHandle.bp FileHandle.c Folder.c InStream.c OutStream.c RAMFileHandle.c RAMFolder.c
Date Sat, 03 Apr 2010 18:16:01 GMT
Author: marvin
Date: Sat Apr  3 18:16:01 2010
New Revision: 930557

URL: http://svn.apache.org/viewvc?rev=930557&view=rev
Log:
Change over core/Lucy/Store to C99-style line comments.

Modified:
    lucene/lucy/trunk/core/Lucy/Store/CompoundFileReader.c
    lucene/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c
    lucene/lucy/trunk/core/Lucy/Store/FSDirHandle.c
    lucene/lucy/trunk/core/Lucy/Store/FSFileHandle.c
    lucene/lucy/trunk/core/Lucy/Store/FSFolder.c
    lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp
    lucene/lucy/trunk/core/Lucy/Store/FileHandle.c
    lucene/lucy/trunk/core/Lucy/Store/Folder.c
    lucene/lucy/trunk/core/Lucy/Store/InStream.c
    lucene/lucy/trunk/core/Lucy/Store/OutStream.c
    lucene/lucy/trunk/core/Lucy/Store/RAMFileHandle.c
    lucene/lucy/trunk/core/Lucy/Store/RAMFolder.c

Modified: lucene/lucy/trunk/core/Lucy/Store/CompoundFileReader.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/CompoundFileReader.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/CompoundFileReader.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/CompoundFileReader.c Sat Apr  3 18:16:01 2010
@@ -27,7 +27,7 @@ CFReader_do_open(CompoundFileReader *sel
 
     Folder_init((Folder*)self, Folder_Get_Path(folder));
 
-    /* Parse metadata file. */
+    // Parse metadata file. 
     if (!metadata || !Hash_Is_A(metadata, HASH)) {
         error = Err_new(CB_newf("Can't read '%o' in '%o'", cfmeta_file,
             Folder_Get_Path(folder)));
@@ -58,7 +58,7 @@ CFReader_do_open(CompoundFileReader *sel
         return NULL;
     }
 
-    /* Open an instream which we'll clone over and over. */
+    // Open an instream which we'll clone over and over. 
     CharBuf *cf_file = (CharBuf*)ZCB_WRAP_STR("cf.dat", 6);
     self->instream = Folder_Open_In(folder, cf_file);
     if(!self->instream) {
@@ -67,10 +67,10 @@ CFReader_do_open(CompoundFileReader *sel
         return NULL;
     }
 
-    /* Assign. */
+    // Assign. 
     self->real_folder = (Folder*)INCREF(folder);
 
-    /* Strip directory name from filepaths for old format. */
+    // Strip directory name from filepaths for old format. 
     if (self->format == 1) {
         VArray *files = Hash_Keys(self->records);
         ZombieCharBuf *filename = ZCB_BLANK();
@@ -145,8 +145,8 @@ CFReader_local_delete(CompoundFileReader
         return Folder_Local_Delete(self->real_folder, name);
     }
     else { 
-        /* Once the number of virtual files falls to 0, remove the compound 
-         * files. */
+        // Once the number of virtual files falls to 0, remove the compound 
+        // files.
         if (Hash_Get_Size(self->records) == 0) {
             CharBuf *cf_file = (CharBuf*)ZCB_WRAP_STR("cf.dat", 6);
             if (!Folder_Delete(self->real_folder, cf_file)) {
@@ -265,7 +265,7 @@ CFReaderDH_init(CFReaderDirHandle *self,
     self->elems  = Hash_Keys(self->cf_reader->records);
     self->tick   = -1;
     {
-        /* Accumulate entries from real Folder. */
+        // Accumulate entries from real Folder. 
         DirHandle *dh = Folder_Local_Open_Dir(self->cf_reader->real_folder);
         CharBuf *entry = DH_Get_Entry(dh);
         while (DH_Next(dh)) {

Modified: lucene/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c Sat Apr  3 18:16:01 2010
@@ -10,11 +10,11 @@
 
 int32_t CFWriter_current_file_format = 2;
 
-/* Helper which does the heavy lifting for CFWriter_consolidate. */
+// Helper which does the heavy lifting for CFWriter_consolidate. 
 static void
 S_do_consolidate(CompoundFileWriter *self);
 
-/* Clean up files which may be left over from previous merge attempts. */
+// Clean up files which may be left over from previous merge attempts. 
 static void
 S_clean_up_old_temp_files(CompoundFileWriter *self);
 
@@ -88,7 +88,7 @@ S_do_consolidate(CompoundFileWriter *sel
 
     if (!outstream) { RETHROW(INCREF(Err_get_error())); }
 
-    /* Start metadata. */
+    // Start metadata. 
     Hash_Store_Str(metadata, "files", 5, INCREF(sub_files));
     Hash_Store_Str(metadata, "format", 6, 
         (Obj*)CB_newf("%i32", CFWriter_current_file_format) );
@@ -106,12 +106,12 @@ S_do_consolidate(CompoundFileWriter *sel
 
             if (!instream) { RETHROW(INCREF(Err_get_error())); }
 
-            /* Absorb the file. */
+            // Absorb the file. 
             offset = OutStream_Tell(outstream);
             OutStream_Absorb(outstream, instream);
             len = OutStream_Tell(outstream) - offset;
 
-            /* Record offset and length. */
+            // Record offset and length. 
             Hash_Store_Str(file_data, "offset", 6, 
                 (Obj*)CB_newf("%i64", offset) );
             Hash_Store_Str(file_data, "length", 6, 
@@ -121,8 +121,8 @@ S_do_consolidate(CompoundFileWriter *sel
             Hash_Store(sub_files, (Obj*)infilepath, (Obj*)file_data);
             VA_Push(merged, INCREF(infilename));
 
-            /* Add filler NULL bytes so that every sub-file begins on a file
-             * position multiple of 8. */
+            // Add filler NULL bytes so that every sub-file begins on a file
+            // position multiple of 8.
             OutStream_Align(outstream, 8);
 
             InStream_Close(instream);
@@ -131,14 +131,14 @@ S_do_consolidate(CompoundFileWriter *sel
     }
     DECREF(infilepath);
 
-    /* Write metadata to cfmeta file. */
+    // Write metadata to cfmeta file. 
     CharBuf *cfmeta_temp = (CharBuf*)ZCB_WRAP_STR("cfmeta.json.temp", 16);
     CharBuf *cfmeta_file = (CharBuf*)ZCB_WRAP_STR("cfmeta.json", 11);
     Json_spew_json((Obj*)metadata, (Folder*)self->folder, cfmeta_temp);
     rename_success = Folder_Rename(self->folder, cfmeta_temp, cfmeta_file);
     if (!rename_success) { RETHROW(INCREF(Err_get_error())); }
 
-    /* Clean up. */
+    // Clean up. 
     OutStream_Close(outstream);
     DECREF(outstream);
     DECREF(files);

Modified: lucene/lucy/trunk/core/Lucy/Store/FSDirHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FSDirHandle.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FSDirHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FSDirHandle.c Sat Apr  3 18:16:01 2010
@@ -25,7 +25,7 @@ FSDH_open(const CharBuf *dir)
 void
 FSDH_destroy(FSDirHandle *self)
 {
-    /* Throw away saved error -- it's too late to call Close() now. */
+    // Throw away saved error -- it's too late to call Close() now. 
     DECREF(self->saved_error);
     self->saved_error = NULL;
     SUPER_DESTROY(self, FSDIRHANDLE);
@@ -115,7 +115,7 @@ FSDH_entry_is_dir(FSDirHandle *self)
         }
         return false;
     }
-    #endif /* CHY_HAS_DIRENT_D_TYPE */
+    #endif // CHY_HAS_DIRENT_D_TYPE 
 }
 
 bool_t
@@ -139,7 +139,7 @@ FSDH_entry_is_symlink(FSDirHandle *self)
         }
         return false;
     }
-    #endif /* CHY_HAS_DIRENT_D_TYPE */
+    #endif // CHY_HAS_DIRENT_D_TYPE 
 }
 
 bool_t
@@ -180,30 +180,30 @@ FSDH_do_open(FSDirHandle *self, const Ch
     self->saved_error      = NULL;
     
     if (dir_path_size >= MAX_PATH - 2) {
-        /* Deal with Windows ceiling on file path lengths. */
+        // Deal with Windows ceiling on file path lengths. 
         Err_set_error(Err_new(CB_newf("Directory path is too long: %o", 
             dir)));
         DECREF(self);
         return NULL;
     }
 
-    /* Append trailing wildcard so Windows lists dir contents rather than just
-     * the dir name itself. */
+    // Append trailing wildcard so Windows lists dir contents rather than just
+    // the dir name itself.
     memcpy(path_ptr, dir_path_ptr, dir_path_size);
     memcpy(path_ptr + dir_path_size, "\\*\0", 3);
 
     self->sys_dirhandle = FindFirstFile(search_string, 
         (WIN32_FIND_DATA*)self->sys_dir_entry);
     if (INVALID_HANDLE_VALUE == self->sys_dirhandle) {
-        /* Directory inaccessible or doesn't exist. */
+        // Directory inaccessible or doesn't exist. 
         Err_set_error(Err_new(CB_newf("Failed to open dir '%o'", dir)));
         DECREF(self);
         return NULL;
     }
     else {
-        /* Compensate for the fact that FindFirstFile has already returned the
-         * first entry but DirHandle's API requires that you call Next() to
-         * start the iterator. */
+        // Compensate for the fact that FindFirstFile has already returned the
+        // first entry but DirHandle's API requires that you call Next() to
+        // start the iterator.
         self->delayed_iter = true;
     }
 
@@ -254,7 +254,7 @@ FSDH_close(FSDirHandle *self)
         self->sys_dir_entry = NULL;
     }
 
-    /* If we encountered an error condition previously, report it now. */
+    // If we encountered an error condition previously, report it now. 
     if (self->saved_error) {
         Err_set_error((Err*)INCREF(self->saved_error));
         return false;
@@ -270,7 +270,7 @@ FSDH_next(FSDirHandle *self)
     HANDLE           dirhandle = (HANDLE)self->sys_dirhandle;
     WIN32_FIND_DATA *find_data = (WIN32_FIND_DATA*)self->sys_dir_entry;
 
-    /* Attempt to move forward or absorb cached iter. */
+    // Attempt to move forward or absorb cached iter. 
     if (!dirhandle || dirhandle == INVALID_HANDLE_VALUE) {
         return false;
     }
@@ -278,7 +278,7 @@ FSDH_next(FSDirHandle *self)
         self->delayed_iter = false;
     }
     else if ((FindNextFile(dirhandle, find_data) == 0)) {
-        /* Iterator exhausted.  Verify that no errors were encountered. */
+        // Iterator exhausted.  Verify that no errors were encountered. 
         CB_Set_Size(self->entry, 0);
         if (GetLastError() != ERROR_NO_MORE_FILES) {
             char *win_error = Err_win_error();
@@ -289,7 +289,7 @@ FSDH_next(FSDirHandle *self)
         return false;
     }
 
-    /* Process the results of the iteration. */
+    // Process the results of the iteration. 
     {
         size_t len = strlen(find_data->cFileName);
         if (SI_is_updir(find_data->cFileName, len)) {
@@ -302,7 +302,7 @@ FSDH_next(FSDirHandle *self)
     }
 }
 
-#endif /* CHY_HAS_DIRENT_H vs. CHY_HAS_WINDOWS_H */
+#endif // CHY_HAS_DIRENT_H vs. CHY_HAS_WINDOWS_H 
 
 /* Copyright 2009 The Apache Software Foundation
  *

Modified: lucene/lucy/trunk/core/Lucy/Store/FSFileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FSFileHandle.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FSFileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FSFileHandle.c Sat Apr  3 18:16:01 2010
@@ -4,11 +4,11 @@
 
 #include <errno.h>
 #include <stdio.h>
-#include <fcntl.h> /* open, POSIX flags */
+#include <fcntl.h> // open, POSIX flags 
 #include <stdarg.h>
 
 #ifdef CHY_HAS_UNISTD_H 
-  #include <unistd.h> /* close */
+  #include <unistd.h> // close 
 #endif
 
 #ifdef CHY_HAS_SYS_MMAN_H
@@ -23,7 +23,7 @@
 #include "Lucy/Store/FSFileHandle.h"
 #include "Lucy/Store/FileWindow.h"
 
-/* Convert FileHandle flags to POSIX flags. */
+// Convert FileHandle flags to POSIX flags. 
 static INLINE int
 SI_posix_flags(uint32_t fh_flags)
 {
@@ -43,28 +43,25 @@ SI_posix_flags(uint32_t fh_flags)
 
 #define IS_64_BIT (SIZEOF_PTR == 8 ? true : false)
 
-/* Memory map a region of the file with shared (read-only) permissions.  If
- * the requested length is 0, return NULL.  If an error occurs, return NULL
- * and set Err_error.
- */
+// Memory map a region of the file with shared (read-only) permissions.  If
+// the requested length is 0, return NULL.  If an error occurs, return NULL
+// and set Err_error.
 static INLINE void*
 SI_map(FSFileHandle *self, int64_t offset, int64_t len);
 
-/* Release a memory mapped region assigned by SI_map. 
- */
+// Release a memory mapped region assigned by SI_map. 
 static INLINE bool_t
 SI_unmap(FSFileHandle *self, char *ptr, int64_t len);
 
-/* 32-bit or 64-bit inlined helpers for FSFH_window. */
+// 32-bit or 64-bit inlined helpers for FSFH_window. 
 static INLINE bool_t
 SI_window(FSFileHandle *self, FileWindow *window, int64_t offset, int64_t len);
 
-/* Architecture- and OS- specific initialization for a read-only FSFileHandle.
- */
+// Architecture- and OS- specific initialization for a read-only FSFileHandle.
 static INLINE bool_t 
 SI_init_read_only(FSFileHandle *self);
 
-/* Windows-specific routine needed for closing read-only handles. */
+// Windows-specific routine needed for closing read-only handles. 
 #ifdef CHY_HAS_WINDOWS_H
 static INLINE bool_t 
 SI_close_win_handles(FSFileHandle *self);
@@ -87,7 +84,7 @@ FSFH_do_open(FSFileHandle *self, const C
         return NULL;
     }
 
-    /* Attempt to open file. */
+    // Attempt to open file. 
     if (flags & FH_WRITE_ONLY) {
         self->fd = open((char*)CB_Get_Ptr8(path), SI_posix_flags(flags), 0666);
         if (self->fd == -1) { 
@@ -101,7 +98,7 @@ FSFH_do_open(FSFileHandle *self, const C
             self->len = 0;
         }
         else {
-            /* Derive length. */
+            // Derive length. 
             self->len = lseek64(self->fd, I64_C(0), SEEK_END);
             if (self->len == -1) {
                 Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", 
@@ -122,12 +119,12 @@ FSFH_do_open(FSFileHandle *self, const C
     }
     else if (flags & FH_READ_ONLY) {
         if (SI_init_read_only(self)) {
-            /* On 64-bit systems, map the whole file up-front. */
+            // On 64-bit systems, map the whole file up-front. 
             if (IS_64_BIT && self->len) {
                 self->buf = (char*)SI_map(self, 0, self->len);
                 if (!self->buf) { 
-                    /* An error occurred during SI_map, which has set
-                     * Err_error for us already. */
+                    // An error occurred during SI_map, which has set
+                    // Err_error for us already.
                     DECREF(self);
                     return NULL;
                 }
@@ -152,13 +149,13 @@ FSFH_do_open(FSFileHandle *self, const C
 bool_t
 FSFH_close(FSFileHandle *self)
 {
-    /* On 64-bit systems, cancel the whole-file mapping. */
+    // On 64-bit systems, cancel the whole-file mapping. 
     if (IS_64_BIT && (self->flags & FH_READ_ONLY)) {
         if ( !SI_unmap(self, self->buf, self->len) ) { return false; }
         self->buf = NULL;
     }
     
-    /* Close system-specific handles. */
+    // Close system-specific handles. 
     if (self->fd) {
         if (close(self->fd)) {
             Err_set_error(Err_new(CB_newf("Failed to close file: %s", 
@@ -180,7 +177,7 @@ bool_t
 FSFH_write(FSFileHandle *self, const void *data, size_t len) 
 {
     if (len) { 
-        /* Write data, track file length, check for errors. */
+        // Write data, track file length, check for errors. 
         int64_t check_val = write(self->fd, data, len);
         self->len += check_val;
         if (check_val != len) {
@@ -282,13 +279,13 @@ FSFH_read(FSFileHandle *self, char *dest
 static INLINE bool_t
 SI_window(FSFileHandle *self, FileWindow *window, int64_t offset, int64_t len)
 {
-	/* Release the previously mmap'd region, if any. */
+	// Release the previously mmap'd region, if any. 
 	FSFH_release_window(self, window);
 
 	{
-		/* Start map on a page boundary.  Ensure that the window is at
-		 * least wide enough to view all the data spec'd in the original
-		 * request. */
+		// Start map on a page boundary.  Ensure that the window is at
+		// least wide enough to view all the data spec'd in the original
+		// request.
 		const int64_t remainder       = offset % self->page_size;
 		const int64_t adjusted_offset = offset - remainder;
 		const int64_t adjusted_len    = len + remainder;
@@ -314,7 +311,7 @@ FSFH_release_window(FSFileHandle *self, 
     return true;
 }
 
-#endif /* IS_64_BIT vs. 32-bit */
+#endif // IS_64_BIT vs. 32-bit 
 
 /********************************* UNIXEN *********************************/
 
@@ -323,7 +320,7 @@ FSFH_release_window(FSFileHandle *self, 
 static INLINE bool_t 
 SI_init_read_only(FSFileHandle *self)
 {
-    /* Open. */
+    // Open. 
     self->fd = open((char*)CB_Get_Ptr8(self->path), 
         SI_posix_flags(self->flags), 0666);
     if (self->fd == -1) {
@@ -333,7 +330,7 @@ SI_init_read_only(FSFileHandle *self)
         return false;
     }
 
-    /* Derive len. */
+    // Derive len. 
     self->len = lseek64(self->fd, I64_C(0), SEEK_END);
     if (self->len == -1) {
         Err_set_error(Err_new(CB_newf("lseek64 on %o failed: %s", self->path,
@@ -349,7 +346,7 @@ SI_init_read_only(FSFileHandle *self)
         }
     }
 
-    /* Get system page size. */
+    // Get system page size. 
 #if defined(_SC_PAGESIZE)
     self->page_size = sysconf(_SC_PAGESIZE);
 #elif defined(_SC_PAGE_SIZE)
@@ -367,7 +364,7 @@ SI_map(FSFileHandle *self, int64_t offse
     void *buf = NULL;
 
     if (len) {
-        /* Read-only memory mapping. */
+        // Read-only memory mapping. 
         buf = mmap(NULL, len, PROT_READ, MAP_SHARED, self->fd, offset);
         if (buf == (void*)-1) {
             Err_set_error(Err_new(CB_newf(
@@ -400,14 +397,14 @@ FSFH_read(FSFileHandle *self, char *dest
 {
     int64_t check_val;
     
-    /* Sanity check. */
+    // Sanity check. 
     if (offset < 0) {
         Err_set_error(Err_new(CB_newf(
             "Can't read from an offset less than 0 (%i64)", offset)));
         return false;
     }
 
-    /* Read. */
+    // Read. 
     check_val = pread64(self->fd, dest, len, offset);
     if (check_val != (int64_t)len) {
         if (check_val == -1) {
@@ -425,7 +422,7 @@ FSFH_read(FSFileHandle *self, char *dest
 
     return true;
 }
-#endif /* !IS_64_BIT */
+#endif // !IS_64_BIT 
 
 /********************************* WINDOWS **********************************/
 
@@ -438,11 +435,11 @@ SI_init_read_only(FSFileHandle *self)
     char *filepath = (char*)CB_Get_Ptr8(self->path);
     SYSTEM_INFO sys_info;
 
-    /* Get system page size. */
+    // Get system page size. 
     GetSystemInfo(&sys_info);
     self->page_size = sys_info.dwAllocationGranularity;
 
-    /* Open. */
+    // Open. 
     self->win_fhandle = CreateFile(
         filepath,
         GENERIC_READ,
@@ -460,7 +457,7 @@ SI_init_read_only(FSFileHandle *self)
         return false;
     }
 
-    /* Derive len. */
+    // Derive len. 
     GetFileSizeEx(self->win_fhandle, &large_int);
     self->len = large_int.QuadPart;
     if (self->len < 0) {
@@ -470,7 +467,7 @@ SI_init_read_only(FSFileHandle *self)
         return false;
     }
 
-    /* Init mapping handle. */
+    // Init mapping handle. 
     self->buf = NULL;
     if (self->len) {
         self->win_maphandle = CreateFileMapping(self->win_fhandle, NULL,
@@ -494,7 +491,7 @@ SI_map(FSFileHandle *self, int64_t offse
     void *buf = NULL;
 
     if (len) {
-        /* Read-only memory map. */
+        // Read-only memory map. 
         uint64_t offs = (uint64_t)offset;
         DWORD file_offset_hi = offs >> 32;
         DWORD file_offset_lo = offs & 0xFFFFFFFF;
@@ -536,7 +533,7 @@ SI_unmap(FSFileHandle *self, char *buf, 
 static INLINE bool_t 
 SI_close_win_handles(FSFileHandle *self)
 {
-    /* Close both standard handle and mapping handle. */
+    // Close both standard handle and mapping handle. 
     if (self->win_maphandle) {
         if (!CloseHandle(self->win_maphandle)) {
             char *win_error = Err_win_error();
@@ -574,32 +571,32 @@ FSFH_read(FSFileHandle *self, char *dest
     read_op_state.OffsetHigh = offs >> 32;
     read_op_state.Offset     = offs & 0xFFFFFFFF;
     
-    /* Sanity check. */
+    // Sanity check. 
     if (offset < 0) {
         Err_set_error(Err_new(CB_newf(
             "Can't read from an offset less than 0 (%i64)", offset)));
         return false;
     }
 
-    /* ReadFile() takes a DWORD (unsigned 32-bit integer) as a length
-     * argument, so throw a sensible error rather than wrap around. */
+    // ReadFile() takes a DWORD (unsigned 32-bit integer) as a length
+    // argument, so throw a sensible error rather than wrap around. 
     if (len > U32_MAX) {
         Err_set_error(Err_new(CB_newf(
             "Can't read more than 4 GB (%u64)", (uint64_t)len))); 
         return false;
     }
 
-    /* Read. */
+    // Read. 
     check_val = ReadFile(self->win_fhandle, dest, len, &got, &read_op_state);
     if (!check_val && GetLastError() == ERROR_IO_PENDING) {
-        /* Read has been queued by the OS and will soon complete.  Wait for
-         * it, since this is a blocking IO call from the point of the rest of
-         * the library. */
+        // Read has been queued by the OS and will soon complete.  Wait for
+        // it, since this is a blocking IO call from the point of the rest of
+        // the library.
         check_val = GetOverlappedResult(self->win_fhandle, &read_op_state,
            &got, TRUE);
     }
 
-    /* Verify that the read has succeeded by now. */
+    // Verify that the read has succeeded by now. 
     if (!check_val) {
         char *win_error = Err_win_error();
         Err_set_error(Err_new(CB_newf("Failed to read %u64 bytes: %s",
@@ -610,9 +607,9 @@ FSFH_read(FSFileHandle *self, char *dest
 
     return true;
 }
-#endif /* !IS_64_BIT */
+#endif // !IS_64_BIT 
 
-#endif /* CHY_HAS_SYS_MMAN_H vs. CHY_HAS_WINDOWS_H */
+#endif // CHY_HAS_SYS_MMAN_H vs. CHY_HAS_WINDOWS_H 
 
 /* Copyright 2009 The Apache Software Foundation
  *

Modified: lucene/lucy/trunk/core/Lucy/Store/FSFolder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FSFolder.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FSFolder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FSFolder.c Sat Apr  3 18:16:01 2010
@@ -11,17 +11,17 @@
   #include <sys/types.h>
 #endif
 
-/* For rmdir, (hard) link. */
+// For rmdir, (hard) link. 
 #ifdef CHY_HAS_UNISTD_H
   #include <unistd.h>
 #endif
 
-/* For CreateHardLink. */
+// For CreateHardLink. 
 #ifdef CHY_HAS_WINDOWS_H
   #include <windows.h>
 #endif
 
-/* For mkdir, rmdir. */
+// For mkdir, rmdir. 
 #ifdef CHY_HAS_DIRECT_H
   #include <direct.h>
 #endif
@@ -35,8 +35,8 @@
 #include "Lucy/Store/OutStream.h"
 #include "Lucy/Util/IndexFileNames.h"
 
-/* Return a ZombieCharBuf (cast to CharBuf) containing a platform-specific
- * absolute filepath. */
+// Return a ZombieCharBuf (cast to CharBuf) containing a platform-specific
+// absolute filepath.
 static CharBuf*
 S_fullpath(FSFolder *self, const CharBuf *path, void *allocation, 
            size_t alloc_size);
@@ -45,15 +45,15 @@ S_fullpath(FSFolder *self, const CharBuf
         ZCB_size() + CB_Get_Size(self->path) + CB_Get_Size(_path) + 10), \
         ZCB_size() + CB_Get_Size(self->path) + CB_Get_Size(_path) + 10)
 
-/* Return true if the supplied path is a directory. */
+// Return true if the supplied path is a directory. 
 static bool_t
 S_dir_ok(const CharBuf *path);
 
-/* Create a directory, or set Err_error and return false. */
+// Create a directory, or set Err_error and return false. 
 bool_t
 S_create_dir(const CharBuf *path);
 
-/* Return true unless the supplied path contains a slash. */
+// Return true unless the supplied path contains a slash. 
 bool_t
 S_is_local_entry(const CharBuf *path);
 
@@ -141,7 +141,7 @@ FSFolder_local_exists(FSFolder *self, co
 bool_t
 FSFolder_local_is_directory(FSFolder *self, const CharBuf *name)
 {
-    /* Check for a cached object, then fall back to a system call. */
+    // Check for a cached object, then fall back to a system call. 
     Obj *elem = Hash_Fetch(self->entries, (Obj*)name);
     if (elem && Obj_Is_A(elem, FOLDER)) { 
         return true; 
@@ -224,7 +224,7 @@ FSFolder_local_find_folder(FSFolder *sel
 {
     Folder *subfolder = NULL;
     if (!name || !CB_Get_Size(name)) {
-        /* No entity can be identified by NULL or empty string. */
+        // No entity can be identified by NULL or empty string. 
         return NULL;
     }
     else if (!S_is_local_entry(name)) {
@@ -250,8 +250,8 @@ FSFolder_local_find_folder(FSFolder *sel
             if (!subfolder) {
                 THROW(ERR, "Failed to open FSFolder at '%o'", fullpath);
             }
-            /* Try to open a CompoundFileReader. On failure, just use the
-             * existing folder. */
+            // Try to open a CompoundFileReader. On failure, just use the
+            // existing folder.
             CharBuf *cfmeta_file = (CharBuf*)ZCB_WRAP_STR("cfmeta.json", 11);
             if (Folder_Local_Exists(subfolder, cfmeta_file)) {
                 CompoundFileReader *cf_reader = CFReader_open(subfolder);

Modified: lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp Sat Apr  3 18:16:01 2010
@@ -122,8 +122,7 @@ __C__
  */
 extern int32_t lucy_FH_object_count; 
 
-/* Default size for the memory buffer used by both InStream and OutStream.
- */
+// Default size for the memory buffer used by both InStream and OutStream.
 #define LUCY_IO_STREAM_BUF_SIZE 1024
 
 #ifdef LUCY_USE_SHORT_NAMES

Modified: lucene/lucy/trunk/core/Lucy/Store/FileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FileHandle.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FileHandle.c Sat Apr  3 18:16:01 2010
@@ -13,7 +13,7 @@ FH_do_open(FileHandle *self, const CharB
     self->path    = path ? CB_Clone(path) : CB_new(0);
     self->flags   = flags;
 
-    /* Track number of live FileHandles released into the wild. */
+    // Track number of live FileHandles released into the wild. 
     FH_object_count++;
 
     ABSTRACT_CLASS_CHECK(self, FILEHANDLE);
@@ -27,7 +27,7 @@ FH_destroy(FileHandle *self)
     DECREF(self->path);
     SUPER_DESTROY(self, FILEHANDLE);
 
-    /* Decrement count of FileHandle objects in existence. */
+    // Decrement count of FileHandle objects in existence. 
     FH_object_count--;
 }
 

Modified: lucene/lucy/trunk/core/Lucy/Store/Folder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/Folder.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/Folder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/Folder.c Sat Apr  3 18:16:01 2010
@@ -19,15 +19,15 @@
 Folder*
 Folder_init(Folder *self, const CharBuf *path)
 {
-    /* Init. */
+    // Init. 
     self->entries = Hash_new(16);
 
-    /* Copy. */
+    // Copy. 
     if (path == NULL) {
         self->path = CB_new_from_trusted_utf8("", 0);
     }
     else {
-        /* Copy path, strip trailing slash or equivalent. */
+        // Copy path, strip trailing slash or equivalent. 
         self->path = CB_Clone(path);
         if (CB_Ends_With_Str(self->path, DIR_SEP, strlen(DIR_SEP))) {
             CB_Chop(self->path, 1);
@@ -146,7 +146,7 @@ Folder_delete_tree(Folder *self, const C
 {
     Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
 
-    /* Don't allow Folder to delete itself. */
+    // Don't allow Folder to delete itself. 
     if (!path || !CB_Get_Size(path)) { return false; }
 
     if (enclosing_folder) {
@@ -187,7 +187,7 @@ Folder_delete_tree(Folder *self, const C
         return Folder_Local_Delete(enclosing_folder, (CharBuf*)local);
     }
     else {
-        /* Return failure if the entry wasn't there in the first place. */
+        // Return failure if the entry wasn't there in the first place. 
         return false;
     }
 }
@@ -215,7 +215,7 @@ S_add_to_file_list(Folder *self, VArray 
     }
 
     entry = DH_Get_Entry(dh);
-    while (DH_Next(dh)) { /* Updates entry */
+    while (DH_Next(dh)) { // Updates entry 
         if (!S_is_updir(entry)) {
             CharBuf *relpath = CB_newf("%o%o", prefix, entry);
             if (VA_Get_Size(list) == VA_Get_Capacity(list)) {
@@ -228,7 +228,7 @@ S_add_to_file_list(Folder *self, VArray 
                                 ? CB_newf("%o/%o", dir, entry)
                                 : CB_Clone(entry);
                 CB_catf(prefix, "%o/", entry);
-                S_add_to_file_list(self, list, subdir, prefix); /* recurse */
+                S_add_to_file_list(self, list, subdir, prefix); // recurse 
                 CB_Set_Size(prefix, orig_prefix_size);
                 DECREF(subdir);
             }
@@ -419,10 +419,10 @@ S_enclosing_folder(Folder *self, ZombieC
     size_t path_component_len = 0;
     uint32_t code_point;
 
-    /* Strip trailing slash. */
+    // Strip trailing slash. 
     if (ZCB_Code_Point_From(path, 0) == '/') { ZCB_Chop(path, 1); }
 
-    /* Find first component of the file path. */
+    // Find first component of the file path. 
     ZombieCharBuf *scratch        = ZCB_WRAP((CharBuf*)path);
     ZombieCharBuf *path_component = ZCB_WRAP((CharBuf*)path);
     while (0 != (code_point = ZCB_Nip_One(scratch))) {
@@ -434,7 +434,7 @@ S_enclosing_folder(Folder *self, ZombieC
         path_component_len++;
     }
 
-    /** If we've eaten up the entire filepath, self is enclosing folder. */
+    // If we've eaten up the entire filepath, self is enclosing folder.
     if (ZCB_Get_Size(scratch) == 0) { return self; }
 
     {
@@ -448,7 +448,7 @@ S_enclosing_folder(Folder *self, ZombieC
             return NULL;
         }
 
-        /* This file path component is a folder.  Recurse into it. */
+        // This file path component is a folder.  Recurse into it. 
         return S_enclosing_folder(local_folder, path);
     }
 }

Modified: lucene/lucy/trunk/core/Lucy/Store/InStream.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/InStream.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/InStream.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/InStream.c Sat Apr  3 18:16:01 2010
@@ -9,25 +9,25 @@
 #include "Lucy/Store/RAMFile.h"
 #include "Lucy/Store/RAMFileHandle.h"
 
-/* Inlined version of InStream_Tell. */
+// Inlined version of InStream_Tell. 
 static INLINE int64_t
 SI_tell(InStream *self);
 
-/* Inlined version of InStream_Read_Bytes. */
+// Inlined version of InStream_Read_Bytes. 
 static INLINE void
 SI_read_bytes(InStream *self, char* buf, size_t len);
 
-/* Inlined version of InStream_Read_U8. */
+// Inlined version of InStream_Read_U8. 
 static INLINE uint8_t
 SI_read_u8(InStream *self);
 
-/* Ensure that the buffer contains exactly the specified amount of data. */
+// Ensure that the buffer contains exactly the specified amount of data. 
 static void
 S_fill(InStream *self, int64_t amount);
 
-/* Refill the buffer, with either IO_STREAM_BUF_SIZE bytes or all remaining
- * file content -- whichever is smaller. Throw an error if we're at EOF and
- * can't load at least one byte. */
+// Refill the buffer, with either IO_STREAM_BUF_SIZE bytes or all remaining
+// file content -- whichever is smaller. Throw an error if we're at EOF and
+// can't load at least one byte.
 static int64_t
 S_refill(InStream *self);
 
@@ -41,13 +41,13 @@ InStream_open(Obj *file)
 InStream*
 InStream_do_open(InStream *self, Obj *file)
 {
-    /* Init. */
+    // Init. 
     self->buf           = NULL;
     self->limit         = NULL;
     self->offset        = 0;
     self->window        = FileWindow_new();
 
-    /* Obtain a FileHandle. */
+    // Obtain a FileHandle. 
     if (Obj_Is_A(file, FILEHANDLE)) {
         self->file_handle = (FileHandle*)INCREF(file);
     }
@@ -71,7 +71,7 @@ InStream_do_open(InStream *self, Obj *fi
         return NULL;
     }
 
-    /* Get length and filename from the FileHandle. */ 
+    // Get length and filename from the FileHandle.  
     self->filename      = CB_Clone(FH_Get_Path(self->file_handle));
     self->len           = FH_Length(self->file_handle);
     if (self->len == -1) {
@@ -88,8 +88,8 @@ InStream_close(InStream *self)
 {
     if (self->file_handle) {
         FH_Release_Window(self->file_handle, self->window);
-        /* Note that we don't close the FileHandle, because it's probably
-         * shared. */
+        // Note that we don't close the FileHandle, because it's probably
+        // shared.
         DECREF(self->file_handle);
         self->file_handle = NULL;
     }
@@ -143,7 +143,7 @@ InStream_get_filename(InStream *self) { 
 static int64_t 
 S_refill(InStream *self) 
 {
-    /* Determine the amount to request. */
+    // Determine the amount to request. 
     const int64_t sub_file_pos = SI_tell(self);
     const int64_t remaining    = self->len - sub_file_pos;
     const int64_t amount       = remaining < IO_STREAM_BUF_SIZE 
@@ -154,7 +154,7 @@ S_refill(InStream *self) 
             self->filename, self->offset, self->len);
     }
 
-    /* Make the request. */
+    // Make the request. 
     S_fill(self, amount);
 
     return amount;
@@ -174,19 +174,19 @@ S_fill(InStream *self, int64_t amount) 
     const int64_t real_file_pos    = virtual_file_pos + self->offset;
     const int64_t remaining        = self->len - virtual_file_pos;
 
-    /* Throw an error if the requested amount would take us beyond EOF. */
+    // Throw an error if the requested amount would take us beyond EOF. 
     if (amount > remaining) {
         THROW(ERR,  "Read past EOF of %o (pos: %u64 len: %u64 request: %u64)",
             self->filename, virtual_file_pos, self->len, amount);
     }
 
-    /* Make the request. */
+    // Make the request. 
     if (FH_Window(self->file_handle, window, real_file_pos, amount) ) {
         char *const window_limit = window->buf + window->len;
         self->buf = window->buf 
-                  - window->offset    /* theoretical start of real file */
-                  + self->offset      /* top of virtual file */
-                  + virtual_file_pos; /* position within virtual file */
+                  - window->offset    // theoretical start of real file 
+                  + self->offset      // top of virtual file 
+                  + virtual_file_pos; // position within virtual file 
         self->limit = window_limit - self->buf > remaining
                     ? self->buf + remaining
                     : window_limit;
@@ -215,7 +215,7 @@ InStream_seek(InStream *self, int64_t ta
         THROW(ERR, "Can't Seek '%o' to negative target %i64", self->filename,
             target);
     }
-    /* Seek within window if possible. */
+    // Seek within window if possible. 
     else if (   target >= virtual_window_top
              && target <= virtual_window_end
     ) {
@@ -226,9 +226,9 @@ InStream_seek(InStream *self, int64_t ta
             target, self->len);
     }
     else {
-        /* Target is outside window.  Set all buffer and limit variables to
-         * NULL to trigger refill on the next read.  Store the file position
-         * in the FileWindow's offset. */
+        // Target is outside window.  Set all buffer and limit variables to
+        // NULL to trigger refill on the next read.  Store the file position
+        // in the FileWindow's offset.
         FH_Release_Window(self->file_handle, window);
         self->buf   = NULL;
         self->limit = NULL;
@@ -270,14 +270,14 @@ InStream_buf(InStream *self, size_t requ
         const int64_t remaining_in_file = self->len - SI_tell(self);
         int64_t amount = request;
 
-        /* Try to bump up small requests. */
+        // Try to bump up small requests. 
         if (amount < IO_STREAM_BUF_SIZE) { amount = IO_STREAM_BUF_SIZE; }
 
-        /* Don't read past EOF. */
+        // Don't read past EOF. 
         if (remaining_in_file < amount) { amount = remaining_in_file; }
 
-        /* Only fill if the recalculated, possibly smaller request exceeds the
-         * amount available in the buffer. */
+        // Only fill if the recalculated, possibly smaller request exceeds the
+        // amount available in the buffer.
         if (amount > bytes_in_buf) { 
             S_fill(self, amount); 
         }
@@ -314,12 +314,12 @@ SI_read_bytes(InStream *self, char* buf,
 {
     const int64_t available = PTR2I64(self->limit) - PTR2I64(self->buf);
     if (available >= (int64_t)len) {
-        /* Request is entirely within buffer, so copy. */
+        // Request is entirely within buffer, so copy. 
         memcpy(buf, self->buf, len);
         self->buf += len;
     }
     else { 
-        /* Pass along whatever we've got in the buffer. */
+        // Pass along whatever we've got in the buffer. 
         if (available > 0) {
             memcpy(buf, self->buf, (size_t)available);
             buf += available;
@@ -328,7 +328,7 @@ SI_read_bytes(InStream *self, char* buf,
         }
 
         if (len < IO_STREAM_BUF_SIZE) {
-            /* Ensure that we have enough mapped, then copy the rest. */
+            // Ensure that we have enough mapped, then copy the rest. 
             int64_t got = S_refill(self);
             if (got < len) {
                 int64_t orig_pos = SI_tell(self) - available;
@@ -341,8 +341,8 @@ SI_read_bytes(InStream *self, char* buf,
             self->buf += len;
         }
         else {
-            /* Too big to handle via the buffer, so resort to a brute-force
-             * read. */
+            // Too big to handle via the buffer, so resort to a brute-force
+            // read.
             const int64_t sub_file_pos  = SI_tell(self);
             const int64_t real_file_pos = sub_file_pos + self->offset;
             bool_t success 

Modified: lucene/lucy/trunk/core/Lucy/Store/OutStream.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/OutStream.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/OutStream.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/OutStream.c Sat Apr  3 18:16:01 2010
@@ -9,15 +9,15 @@
 #include "Lucy/Store/RAMFile.h"
 #include "Lucy/Store/RAMFileHandle.h"
 
-/* Inlined version of OutStream_Write_Bytes. */
+// Inlined version of OutStream_Write_Bytes. 
 static INLINE void
 SI_write_bytes(OutStream *self, const void *bytes, size_t len);
 
-/* Inlined version of OutStream_Write_C32. */
+// Inlined version of OutStream_Write_C32. 
 static INLINE void
 SI_write_c32(OutStream *self, uint32_t value);
 
-/* Flush content in the buffer to the FileHandle. */
+// Flush content in the buffer to the FileHandle. 
 static void
 S_flush(OutStream *self);
 
@@ -31,12 +31,12 @@ OutStream_open(Obj *file) 
 OutStream*
 OutStream_do_open(OutStream *self, Obj *file)
 {
-    /* Init. */
+    // Init. 
     self->buf = (char*)MALLOCATE(IO_STREAM_BUF_SIZE);
     self->buf_start   = 0;
     self->buf_pos     = 0;
 
-    /* Obtain a FileHandle. */
+    // Obtain a FileHandle. 
     if (Obj_Is_A(file, FILEHANDLE)) {
         self->file_handle = (FileHandle*)INCREF(file);
     }
@@ -60,7 +60,7 @@ OutStream_do_open(OutStream *self, Obj *
         return NULL;
     }
 
-    /* Derive filepath from FileHandle. */
+    // Derive filepath from FileHandle. 
     self->path = CB_Clone(FH_Get_Path(self->file_handle));
 
     return self;
@@ -70,7 +70,7 @@ void
 OutStream_destroy(OutStream *self) 
 {
     if (self->file_handle != NULL) {
-        /* Inlined flush, ignoring errors. */
+        // Inlined flush, ignoring errors. 
         if (self->buf_pos) {
             FH_Write(self->file_handle, self->buf, self->buf_pos); 
         }
@@ -90,12 +90,11 @@ OutStream_absorb(OutStream *self, InStre
     char buf[IO_STREAM_BUF_SIZE];
     int64_t  bytes_left = InStream_Length(instream);
 
-    /* Read blocks of content into an intermediate buffer, than write them to
-     * the OutStream. 
-     * 
-     * TODO: optimize by utilizing OutStream's buffer directly, while still
-     * not flushing too frequently and keeping code complexity under control.
-     * */
+    // Read blocks of content into an intermediate buffer, than write them to
+    // the OutStream. 
+    // 
+    // TODO: optimize by utilizing OutStream's buffer directly, while still
+    // not flushing too frequently and keeping code complexity under control.
     OutStream_Grow(self, OutStream_Tell(self) + bytes_left);
     while (bytes_left) {
         const size_t bytes_this_iter = bytes_left < IO_STREAM_BUF_SIZE
@@ -164,7 +163,7 @@ OutStream_write_bytes(OutStream *self, c
 static INLINE void
 SI_write_bytes(OutStream *self, const void *bytes, size_t len) 
 {
-    /* If this data is larger than the buffer size, flush and write. */
+    // If this data is larger than the buffer size, flush and write. 
     if (len >= IO_STREAM_BUF_SIZE) {
         S_flush(self);
         if ( !FH_Write(self->file_handle, bytes, len) ) {
@@ -172,13 +171,13 @@ SI_write_bytes(OutStream *self, const vo
         }
         self->buf_start += len;
     }
-    /* If there's not enough room in the buffer, flush then add. */
+    // If there's not enough room in the buffer, flush then add. 
     else if (self->buf_pos + len >= IO_STREAM_BUF_SIZE) {
         S_flush(self);
         memcpy((self->buf + self->buf_pos), bytes, len);
         self->buf_pos += len;
     }
-    /* If there's room, just add these bytes to the buffer. */
+    // If there's room, just add these bytes to the buffer. 
     else {
         memcpy((self->buf + self->buf_pos), bytes, len);
         self->buf_pos += len;
@@ -286,12 +285,12 @@ SI_write_c32(OutStream *self, uint32_t v
     uint8_t buf[C32_MAX_BYTES];
     uint8_t *ptr = buf + sizeof(buf) - 1;
 
-    /* Write last byte first, which has no continue bit. */
+    // Write last byte first, which has no continue bit. 
     *ptr = value & 0x7f;
     value >>= 7;
     
     while (value) {
-        /* Work backwards, writing bytes with continue bits set. */
+        // Work backwards, writing bytes with continue bits set. 
         *--ptr = ((value & 0x7f) | 0x80);
         value >>= 7;
     }
@@ -305,12 +304,12 @@ OutStream_write_c64(OutStream *self, uin
     uint8_t buf[C64_MAX_BYTES];
     uint8_t *ptr = buf + sizeof(buf) - 1;
 
-    /* Write last byte first, which has no continue bit. */
+    // Write last byte first, which has no continue bit. 
     *ptr = value & 0x7f;
     value >>= 7;
     
     while (value) {
-        /* Work backwards, writing bytes with continue bits set. */
+        // Work backwards, writing bytes with continue bits set. 
         *--ptr = ((value & 0x7f) | 0x80);
         value >>= 7;
     }

Modified: lucene/lucy/trunk/core/Lucy/Store/RAMFileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/RAMFileHandle.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/RAMFileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/RAMFileHandle.c Sat Apr  3 18:16:01 2010
@@ -27,7 +27,7 @@ RAMFH_do_open(RAMFileHandle *self, const
 
     FH_do_open((FileHandle*)self, path, flags);
 
-    /* Obtain a RAMFile. */
+    // Obtain a RAMFile. 
     if (file) {
         if (must_create) {
             Err_set_error(Err_new(CB_newf(
@@ -47,7 +47,7 @@ RAMFH_do_open(RAMFileHandle *self, const
         return NULL;
     }
 
-    /* Prevent writes to to the RAMFile if FH_READ_ONLY was specified. */
+    // Prevent writes to to the RAMFile if FH_READ_ONLY was specified. 
     if (flags & FH_READ_ONLY) { 
         RAMFile_Set_Read_Only(self->ram_file, true);
     }

Modified: lucene/lucy/trunk/core/Lucy/Store/RAMFolder.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/RAMFolder.c?rev=930557&r1=930556&r2=930557&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/RAMFolder.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/RAMFolder.c Sat Apr  3 18:16:01 2010
@@ -10,7 +10,7 @@
 #include "Lucy/Store/RAMFileHandle.h"
 #include "Lucy/Util/IndexFileNames.h"
 
-/* Return the concatenation of the Folder's path and the supplied path. */
+// Return the concatenation of the Folder's path and the supplied path. 
 static CharBuf*
 S_fullpath(RAMFolder *self, const CharBuf *path);
 
@@ -69,8 +69,8 @@ RAMFolder_local_open_filehandle(RAMFolde
                               == (FH_WRITE_ONLY | FH_CREATE)
                               ? true : false;
 
-    /* Make sure the filepath isn't a directory, and that it either exists
-     * or we have permission to create it. */
+    // Make sure the filepath isn't a directory, and that it either exists
+    // or we have permission to create it.
     if (file) {
         if (!RAMFile_Is_A(file, RAMFILE)) {
             Err_set_error(Err_new(CB_newf("Not a file: '%o'", fullpath)));
@@ -84,7 +84,7 @@ RAMFolder_local_open_filehandle(RAMFolde
         return NULL;
     }
 
-    /* Open the file and store it if it was just created. */
+    // Open the file and store it if it was just created. 
     fh = RAMFH_open(fullpath, flags, file);
     if (fh) {
         if (!file) {
@@ -138,7 +138,7 @@ S_rename_or_hard_link(RAMFolder *self, c
     RAMFolder *inner_to_folder   = NULL;
     UNUSED_VAR(self);
 
-    /* Make sure the source and destination folders exist. */
+    // Make sure the source and destination folders exist. 
     if (!from_folder) {
         Err_set_error(Err_new(CB_newf("File not found: '%o'", from)));
         return false;
@@ -149,7 +149,7 @@ S_rename_or_hard_link(RAMFolder *self, c
         return false;
     }
 
-    /* Extract RAMFolders from compound reader wrappers, if necessary. */
+    // Extract RAMFolders from compound reader wrappers, if necessary. 
     if (Folder_Is_A(from_folder, COMPOUNDFILEREADER)) {
         inner_from_folder = (RAMFolder*)CFReader_Get_Real_Folder(
             (CompoundFileReader*)from_folder);
@@ -175,7 +175,7 @@ S_rename_or_hard_link(RAMFolder *self, c
         return false;
     }
 
-    /* Find the original element. */
+    // Find the original element. 
     elem = Hash_Fetch(inner_from_folder->entries, (Obj*)from_name);
     if (!elem) {
         if (   Folder_Is_A(from_folder, COMPOUNDFILEREADER)
@@ -190,20 +190,20 @@ S_rename_or_hard_link(RAMFolder *self, c
         return false;
     }
 
-    /* Execute the rename/hard-link. */
+    // Execute the rename/hard-link. 
     if (op == OP_RENAME) {
         Obj *existing = Hash_Fetch(inner_to_folder->entries, (Obj*)to_name);
         if (existing) {
             bool_t conflict = false;
 
-            /* Return success fast if file is copied on top of itself. */
+            // Return success fast if file is copied on top of itself. 
             if (   inner_from_folder == inner_to_folder 
                 && ZCB_Equals(from_name, (Obj*)to_name)
             ) {
                 return true;
             }
 
-            /* Don't allow clobbering of different entry type. */
+            // Don't allow clobbering of different entry type. 
             if (Obj_Is_A(elem, RAMFILE)) {
                 if (!Obj_Is_A(existing, RAMFILE)) {
                     conflict = true;
@@ -221,8 +221,8 @@ S_rename_or_hard_link(RAMFolder *self, c
             }
         }
 
-        /* Perform the store first, then the delete. Inform Folder objects
-         * about the relocation. */
+        // Perform the store first, then the delete. Inform Folder objects
+        // about the relocation.
         Hash_Store(inner_to_folder->entries, (Obj*)to_name, INCREF(elem));
         DECREF(Hash_Delete(inner_from_folder->entries, (Obj*)from_name));
         if (Obj_Is_A(elem, FOLDER)) {
@@ -302,7 +302,7 @@ RAMFolder_local_delete(RAMFolder *self, 
                 inner_folder = (RAMFolder*)CERTIFY(entry, RAMFOLDER);
             }
             if (Hash_Get_Size(inner_folder->entries)) {
-                /* Can't delete non-empty dir. */
+                // Can't delete non-empty dir. 
                 return false;
             }
         }



Mime
View raw message