lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r896277 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer/Core: Util.c Util.h
Date Tue, 05 Jan 2010 23:47:32 GMT
Author: marvin
Date: Tue Jan  5 23:47:30 2010
New Revision: 896277

URL: http://svn.apache.org/viewvc?rev=896277&view=rev
Log:
Add const qualifiers to several arguments in Charmonizer/Core/Util.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c?rev=896277&r1=896276&r2=896277&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c Tue Jan  5 23:47:30 2010
@@ -24,7 +24,7 @@
 }
 
 char*
-Util_slurp_file(char *file_path, size_t *len_ptr) 
+Util_slurp_file(const char *file_path, size_t *len_ptr) 
 {
     FILE   *const file = fopen(file_path, "r");
     char   *contents;
@@ -89,7 +89,7 @@
 }
 
 void 
-Util_die(char* format, ...) 
+Util_die(const char* format, ...) 
 {
     va_list args;
     va_start(args, format);
@@ -100,7 +100,7 @@
 }
 
 void 
-Util_warn(char* format, ...) 
+Util_warn(const char* format, ...) 
 {
     va_list args;
     va_start(args, format);
@@ -110,7 +110,7 @@
 }
 
 int
-Util_remove_and_verify(char *file_path) 
+Util_remove_and_verify(const char *file_path) 
 {
     /* Try to remove the file. */
     remove(file_path);
@@ -120,7 +120,7 @@
 }
 
 int
-Util_can_open_file(char *file_path) 
+Util_can_open_file(const char *file_path) 
 {
     FILE *garbage_fh;
 

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h?rev=896277&r1=896276&r2=896277&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h Tue Jan  5 23:47:30 2010
@@ -23,7 +23,7 @@
 /* Read an entire file into memory.
  */
 char* 
-chaz_Util_slurp_file(char *file_path, size_t *len_ptr);
+chaz_Util_slurp_file(const char *file_path, size_t *len_ptr);
 
 /* Get the length of a file (may overshoot on text files under DOS).
  */
@@ -33,12 +33,12 @@
 /* Print an error message to stderr and exit.
  */
 void  
-chaz_Util_die(char *format, ...);
+chaz_Util_die(const char *format, ...);
 
 /* Print an error message to stderr.
  */
 void
-chaz_Util_warn(char *format, ...);
+chaz_Util_warn(const char *format, ...);
 
 /* Attept to delete a file.  Don't error if the file wasn't there to begin
  * with.  Return 1 if it seems like the file is gone because an attempt to
@@ -47,12 +47,12 @@
  * read the file.
  */
 int
-chaz_Util_remove_and_verify(char *file_path);
+chaz_Util_remove_and_verify(const char *file_path);
 
 /* Attempt to open a file for reading, then close it immediately.
  */
 int
-chaz_Util_can_open_file(char *file_path);
+chaz_Util_can_open_file(const char *file_path);
 
 #ifdef CHAZ_USE_SHORT_NAMES
   #define Util_verbosity              chaz_Util_verbosity 



Mime
View raw message