Diff for /parser3/src/main/pa_common.C between versions 1.38 and 1.39

version 1.38, 2001/04/03 07:54:25 version 1.39, 2001/04/03 17:01:03
Line 53  char *file_read_text(Pool& pool, const S Line 53  char *file_read_text(Pool& pool, const S
 bool file_read(Pool& pool, const String& file_spec,   bool file_read(Pool& pool, const String& file_spec, 
                            void*& data, size_t& size, bool as_text,                             void*& data, size_t& size, bool as_text,
                            bool fail_on_read_problem) {                             bool fail_on_read_problem) {
         char *fname=file_spec.cstr();          char *fname=file_spec.cstr(String::UL_FILE_NAME);
         int f;          int f;
     struct stat finfo;      struct stat finfo;
   
Line 100  void file_write(Pool& pool, Line 100  void file_write(Pool& pool,
                                 const void *data, size_t size,                                   const void *data, size_t size, 
                                 bool as_text/*,                                   bool as_text/*, 
                                 bool exclusive*/) {                                  bool exclusive*/) {
         char *fname=file_spec.cstr();          char *fname=file_spec.cstr(String::UL_FILE_NAME);
         int f;          int f;
         if(access(fname, F_OK)!=0) {/*no*/          if(access(fname, F_OK)!=0) {/*no*/
                 if((f=open(fname, O_WRONLY|O_CREAT|_O_BINARY, 0666))>0)                  if((f=open(fname, O_WRONLY|O_CREAT|_O_BINARY, 0666))>0)
Line 132  void file_write(Pool& pool, Line 132  void file_write(Pool& pool,
 }  }
   
 void file_delete(Pool& pool, const String& file_spec) {  void file_delete(Pool& pool, const String& file_spec) {
         if(unlink(file_spec.cstr())!=0)          if(unlink(file_spec.cstr(String::UL_FILE_NAME))!=0)
                 PTHROW(0, 0,                   PTHROW(0, 0, 
                         &file_spec,                           &file_spec, 
                         "unlink failed: %s (#%d)", strerror(errno), errno);                          "unlink failed: %s (#%d)", strerror(errno), errno);
 }  }
   
 bool file_readable(const String& file_spec) {  bool file_readable(const String& file_spec) {
     return access(file_spec.cstr(), R_OK)==0;      return access(file_spec.cstr(String::UL_FILE_NAME), R_OK)==0;
 }  }
   
 char *getrow(char **row_ref, char delim) {  char *getrow(char **row_ref, char delim) {

Removed from v.1.38  
changed lines
  Added in v.1.39


E-mail: