faubackup2/src/common common.cpp,1.4,1.5 fileinfo.cpp,1.2,1.3 int_handler.cpp,1.2,1.3 output_handling.cpp,1.3,1.4 registration.cpp,1.4,1.5 system_calls.cpp,1.4,1.5
Martin Waitz <[email protected]> Tue, 14 Jun 2005 20:23:35 +0000
| Newsgroups | gmane.comp.sysutils.backup.faubackup.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/faubackup/faubackup2/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21140/src/common
Modified Files:
common.cpp fileinfo.cpp int_handler.cpp output_handling.cpp
registration.cpp system_calls.cpp
Log Message:
cleanup include files.
use #include "foo" for our own headers
use #include <bar> for system headers
the header declaring the api for the current file is included first
to make sure that the header file is self-contained
all other headers are sorted: <sys/> is first, then <netinet/>
and other subdirectory includes, then standard C and C++ headers.
internal headers come last.
Index: int_handler.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/int_handler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** int_handler.cpp 8 Jun 2005 19:29:04 -0000 1.2
--- int_handler.cpp 14 Jun 2005 20:23:33 -0000 1.3
***************
*** 1,12 ****
#include "support.h"
- #include "common/common.hpp"
#include "common/int_handler.hpp"
#include <signal.h>
#include <cstdlib>
#include <cstring>
! #include <stdio.h>
! #include <sys/types.h>
! #include <sys/wait.h>
#include "common/registration.hpp"
#include "common/system_calls.hpp"
--- 1,14 ----
#include "support.h"
#include "common/int_handler.hpp"
+
+ #include <sys/types.h>
+ #include <sys/wait.h>
#include <signal.h>
+ #include <stdio.h>
#include <cstdlib>
#include <cstring>
!
! #include "common/common.hpp"
#include "common/registration.hpp"
#include "common/system_calls.hpp"
Index: system_calls.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/system_calls.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** system_calls.cpp 9 Jun 2005 15:39:53 -0000 1.4
--- system_calls.cpp 14 Jun 2005 20:23:33 -0000 1.5
***************
*** 2,33 ****
#include <common/system_calls.hpp>
! #include "regexp/regexp.hpp"
! #include <cstdio>
! #include <errno.h>
! #include <iostream>
! #include <string>
! #include <utime.h>
! #include <sys/types.h>
! #define BUFFSIZE 1024
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>
- #include "filesystem/r_inodes.hpp"
- #include <sys/types.h>
- #include <sstream>
- #include <dirent.h>
- #include <netinet/in.h>
#include <utime.h>
! #include <unistd.h>
#include <iostream>
#include <list>
! #include <utime.h>
! #include <errno.h>
! #include <cstdlib>
! #include <sys/stat.h>
! #include <sys/mman.h>
! #include <fcntl.h>
! #include <stdint.h>
#define MAXDATE 256
--- 2,29 ----
#include <common/system_calls.hpp>
!
! #include <sys/stat.h>
! #include <sys/mman.h>
#include <sys/types.h>
#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <dirent.h>
+ #include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <utime.h>
! #include <fcntl.h>
! #include <stdint.h>
! #include <cstdio>
! #include <cstdlib>
#include <iostream>
#include <list>
! #include <sstream>
! #include <string>
!
! #include "filesystem/r_inodes.hpp"
! #include "regexp/regexp.hpp"
!
! #define BUFFSIZE 1024
#define MAXDATE 256
Index: output_handling.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/output_handling.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** output_handling.cpp 14 Jun 2005 20:01:17 -0000 1.3
--- output_handling.cpp 14 Jun 2005 20:23:33 -0000 1.4
***************
*** 1,13 ****
#include "support.h"
! #include <common/output_handling.hpp>
! #include "common/system_calls.hpp"
! #include <errno.h>
! #include "common/int_handler.hpp"
! #include "common/registration.hpp"
#include <iostream>
#include <string>
using std::cerr;
--- 1,15 ----
#include "support.h"
! #include "common/output_handling.hpp"
#include <iostream>
#include <string>
+ #include <errno.h>
+
+ #include "common/system_calls.hpp"
+ #include "common/int_handler.hpp"
+ #include "common/registration.hpp"
+
using std::cerr;
Index: common.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/common.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** common.cpp 8 Jun 2005 19:29:04 -0000 1.4
--- common.cpp 14 Jun 2005 20:23:33 -0000 1.5
***************
*** 10,16 ****
******************************************************************************/
#include "support.h"
! #include <netinet/in.h>
#include "common/common.hpp"
namespace faubackup
{
--- 10,19 ----
******************************************************************************/
#include "support.h"
!
#include "common/common.hpp"
+ #include <netinet/in.h>
+
+
namespace faubackup
{
Index: registration.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/registration.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** registration.cpp 8 Jun 2005 19:29:04 -0000 1.4
--- registration.cpp 14 Jun 2005 20:23:33 -0000 1.5
***************
*** 2,7 ****
#include "common/registration.hpp"
! #include <signal.h>
#include <sys/wait.h>
namespace faubackup
--- 2,8 ----
#include "common/registration.hpp"
!
#include <sys/wait.h>
+ #include <signal.h>
namespace faubackup
Index: fileinfo.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/fileinfo.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fileinfo.cpp 8 Jun 2005 19:29:04 -0000 1.2
--- fileinfo.cpp 14 Jun 2005 20:23:33 -0000 1.3
***************
*** 1,11 ****
#include "support.h"
! #include <string>
#include <sys/types.h>
#include <sys/stat.h>
- #include <unistd.h>
#include <netinet/in.h>
-
- #include "common/fileinfo.hpp"
#include "filesystem/r_inodes.hpp"
--- 1,12 ----
#include "support.h"
!
! #include "common/fileinfo.hpp"
!
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
+ #include <unistd.h>
+ #include <string>
#include "filesystem/r_inodes.hpp"
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click