faubackup2/src/filesystem cleanup.cpp,1.5,1.6 dir_parser.cpp,1.6,1.7 r_inodes.cpp,1.6,1.7 r_inodes.hpp,1.3,1.4

Erik Merkel <[email protected]> Sun, 10 Jul 2005 16:33:25 +0000
Newsgroups gmane.comp.sysutils.backup.faubackup.cvs
Message-ID <[email protected]>
Update of /cvsroot/faubackup/faubackup2/src/filesystem
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7750/filesystem

Modified Files:
	cleanup.cpp dir_parser.cpp r_inodes.cpp r_inodes.hpp 
Log Message:
using references instead of byval


Index: r_inodes.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/filesystem/r_inodes.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** r_inodes.cpp	22 Jun 2005 23:09:05 -0000	1.6
--- r_inodes.cpp	10 Jul 2005 16:33:23 -0000	1.7
***************
*** 27,35 ****
  {
  
! struct stat getStat(string pathName)
  {
- 	//char temp[1024];
  	int state;
- 	struct stat st;
  	if ((state = lstat(pathName.c_str(), &st)))
  	{
--- 27,33 ----
  {
  
! void getStat(string pathName, struct stat &st)
  {
  	int state;
  	if ((state = lstat(pathName.c_str(), &st)))
  	{
***************
*** 40,45 ****
  	st.st_mtime = time2posix(st.st_mtime);
  #endif
- 
- 	return st;
  }
  
--- 38,41 ----

Index: r_inodes.hpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/filesystem/r_inodes.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** r_inodes.hpp	22 Jun 2005 23:09:05 -0000	1.3
--- r_inodes.hpp	10 Jul 2005 16:33:23 -0000	1.4
***************
*** 18,22 ****
  struct stat MakeInodeFromRaw(char * rawdata);
  
! struct stat getStat(string pathName);
  
  bool existFile(string filename);
--- 18,22 ----
  struct stat MakeInodeFromRaw(char * rawdata);
  
! void getStat(string pathName, struct stat &st);
  
  bool existFile(string filename);

Index: cleanup.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/filesystem/cleanup.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** cleanup.cpp	21 Jun 2005 09:16:45 -0000	1.5
--- cleanup.cpp	10 Jul 2005 16:33:23 -0000	1.6
***************
*** 134,138 ****
  			}
  
! 		struct stat st = getStat(filename.c_str());
  
  		//Directory
--- 134,139 ----
  			}
  
! 		struct stat st;
! 		getStat(filename.c_str(), st);
  
  		//Directory
***************
*** 185,191 ****
  	struct stat actual_dir_st;
  	if(dirName != "")
! 		actual_dir_st	= getStat(dirName);
  	else
! 		actual_dir_st = getStat(".");
  
  	if (existFile(dirName +  string(CFG_FILENAME))) {
--- 186,192 ----
  	struct stat actual_dir_st;
  	if(dirName != "")
! 		getStat(dirName, actual_dir_st);
  	else
! 		getStat(".", actual_dir_st);
  
  	if (existFile(dirName +  string(CFG_FILENAME))) {
***************
*** 228,232 ****
  			}
  
! 		struct stat st = getStat(filename.c_str());
  
  		/*is Directory*/
--- 229,234 ----
  			}
  
! 		struct stat st;
! 		getStat(filename.c_str(), st);
  
  		/*is Directory*/

Index: dir_parser.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/filesystem/dir_parser.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dir_parser.cpp	22 Jun 2005 22:56:30 -0000	1.6
--- dir_parser.cpp	10 Jul 2005 16:33:23 -0000	1.7
***************
*** 41,47 ****
  	struct stat actual_dir_st;
  	if (dirName != "")
! 		actual_dir_st	= getStat(prefix + dirName);
  	else
! 		actual_dir_st = getStat(prefix + ".");
  	output.information(prefix + dirName + string(CFG_FILENAME) , DEBUG_OUTPUT);
  
--- 41,47 ----
  	struct stat actual_dir_st;
  	if (dirName != "")
! 		getStat(prefix + dirName, actual_dir_st);
  	else
! 		getStat(prefix + ".", actual_dir_st);
  	output.information(prefix + dirName + string(CFG_FILENAME) , DEBUG_OUTPUT);
  
***************
*** 84,88 ****
  			}
  
! 		struct stat st = getStat(filename.c_str());
  
  		/*is Directory*/
--- 84,89 ----
  			}
  
! 		struct stat st;
! 		getStat(filename.c_str(), st);
  
  		/*is Directory*/



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar