From 12e726c4b94f770d4ffb30bb62e669a0c04ce46b Mon Sep 17 00:00:00 2001 From: Max Bowsher Date: Mon, 7 Jul 2003 23:19:49 +0000 Subject: [PATCH] 2003-07-08 Max Bowsher * LogFile.h, cistring.h, dialog.h, diskfull.h, filemanip.h, geturl.h, hash.h, log.h, mkdir.h, mklink2.h, mount.h, msg.h, netio.h, nio-file.h, nio-ftp.h, nio-http.h, nio-ie5.h, port.h, simpsock.h, state.h, version.h: Add inclusion guard. * root.h: Standardize naming of inclusion guard. --- ChangeLog | 8 ++++++++ LogFile.h | 5 +++++ cistring.h | 5 +++++ dialog.h | 5 +++++ diskfull.h | 5 +++++ filemanip.h | 5 +++++ geturl.h | 5 +++++ hash.h | 5 +++++ log.h | 5 +++++ mkdir.h | 5 +++++ mklink2.h | 4 ++++ mount.h | 5 +++++ msg.h | 5 +++++ netio.h | 5 +++++ nio-file.h | 5 +++++ nio-ftp.h | 5 +++++ nio-http.h | 5 +++++ nio-ie5.h | 5 +++++ port.h | 5 +++++ root.h | 6 +++--- simpsock.h | 5 +++++ state.h | 5 +++++ version.h | 5 +++++ 23 files changed, 115 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 297cb34b..06a15584 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-07-08 Max Bowsher + + * LogFile.h, cistring.h, dialog.h, diskfull.h, filemanip.h, geturl.h, + hash.h, log.h, mkdir.h, mklink2.h, mount.h, msg.h, netio.h, nio-file.h, + nio-ftp.h, nio-http.h, nio-ie5.h, port.h, simpsock.h, state.h, + version.h: Add inclusion guard. + * root.h: Standardize naming of inclusion guard. + 2003-06-23 Max Bowsher * AntiVirus.h, Exception.h, FilterVisitor.h, FindVisitor.h, diff --git a/LogFile.h b/LogFile.h index b241fe68..ada3f119 100644 --- a/LogFile.h +++ b/LogFile.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_LOGFILE_H +#define SETUP_LOGFILE_H + #include "LogSingleton.h" #include @@ -41,3 +44,5 @@ protected: private: void log_save (int babble, String const &filename, bool append); }; + +#endif /* SETUP_LOGFILE_H */ diff --git a/cistring.h b/cistring.h index 72ca49b5..8ab99f56 100644 --- a/cistring.h +++ b/cistring.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_CISTRING_H +#define SETUP_CISTRING_H + // Yep, another string class #include @@ -39,3 +42,5 @@ public: DWORD Format (UINT i, ...); }; + +#endif /* SETUP_CISTRING_H */ diff --git a/dialog.h b/dialog.h index 31651376..6e0204c3 100644 --- a/dialog.h +++ b/dialog.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_DIALOG_H +#define SETUP_DIALOG_H + #include "win32.h" #include "String++.h" @@ -78,3 +81,5 @@ void rbset (HWND h, int *ids, int id); format a suitable error message. Similar to perror() */ void fatal (const char *msg) __attribute__ ((noreturn)); + +#endif /* SETUP_DIALOG_H */ diff --git a/diskfull.h b/diskfull.h index e95afe93..22972f96 100644 --- a/diskfull.h +++ b/diskfull.h @@ -13,7 +13,12 @@ * */ +#ifndef SETUP_DISKFULL_H +#define SETUP_DISKFULL_H + #include "String++.h" /* returns 0..100 (percent) */ int diskfull (String const &path); + +#endif /* SETUP_DISKFULL_H */ diff --git a/filemanip.h b/filemanip.h index 5ccbd0a7..2192cb90 100644 --- a/filemanip.h +++ b/filemanip.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_FILEMANIP_H +#define SETUP_FILEMANIP_H + #include "String++.h" extern int find_tar_ext (const char *path); @@ -31,3 +34,5 @@ String base (String const &); size_t get_file_size (String const &); String backslash (String const &); const char * trail (const char *, const char *); + +#endif /* SETUP_FILEMANIP_H */ diff --git a/geturl.h b/geturl.h index c4f9e1af..3c6868c0 100644 --- a/geturl.h +++ b/geturl.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_GETURL_H +#define SETUP_GETURL_H + /* Download files from the Internet. These pop up a progress dialog; don't forget to dismiss it when you're done downloading for a while */ @@ -28,3 +31,5 @@ String get_url_to_string (String const&, HWND owner); int get_url_to_file (String const &_url, String const &_filename, int expected_size, HWND owner, BOOL allow_ftp_auth = FALSE); void dismiss_url_status_dialog (); + +#endif /* SETUP_GETURL_H */ diff --git a/hash.h b/hash.h index 079e7247..86e27475 100644 --- a/hash.h +++ b/hash.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_HASH_H +#define SETUP_HASH_H + /* Simple hash class for install.cc */ #include "String++.h" @@ -36,3 +39,5 @@ public: char *enumerate (char const *prev = 0); }; + +#endif /* SETUP_HASH_H */ diff --git a/log.h b/log.h index 365ed728..9404746b 100644 --- a/log.h +++ b/log.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_LOG_H +#define SETUP_LOG_H + /* This is for "printf"-like logging. Messages are stored in memory until they're written out. "babble" means the message is just idle babbling; it can be ignored for shorter logs. */ @@ -23,3 +26,5 @@ void log (enum log_level level, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); void log (enum log_level level, String const &); + +#endif /* SETUP_LOG_H */ diff --git a/mkdir.h b/mkdir.h index 7b5b28ee..e9975715 100644 --- a/mkdir.h +++ b/mkdir.h @@ -13,9 +13,14 @@ * */ +#ifndef SETUP_MKDIR_H +#define SETUP_MKDIR_H + /* Create a directory, and any needed parent directories. If "isadir" is non-zero, "path" is the name of a directory. If "isadir" is zero, "path" is the name of a *file* that we need a directory for. */ extern int mkdir_p (int isadir, const char *path); + +#endif /* SETUP_MKDIR_H */ diff --git a/mklink2.h b/mklink2.h index 8414d8ba..d5393eec 100644 --- a/mklink2.h +++ b/mklink2.h @@ -1,3 +1,5 @@ +#ifndef SETUP_MKLINK2_H +#define SETUP_MKLINK2_H /* This part of the code must be in C because the C++ interface to COM doesn't work. */ @@ -13,3 +15,5 @@ extern "C" #ifdef __cplusplus }; #endif + +#endif /* SETUP_MKLINK2_H */ diff --git a/mount.h b/mount.h index 7116b393..fec11614 100644 --- a/mount.h +++ b/mount.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_MOUNT_H +#define SETUP_MOUNT_H + /* Finds the existing root mount, or returns NULL. istext is set to nonzero if the existing mount is a text mount, else zero for binary. */ @@ -35,3 +38,5 @@ void set_cygdrive_flags (int istext, int issystem); String cygpath (String const &); void set_root_dir (String const); String const get_root_dir (); + +#endif /* SETUP_MOUNT_H */ diff --git a/msg.h b/msg.h index 9657dba6..b06eb73a 100644 --- a/msg.h +++ b/msg.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_MSG_H +#define SETUP_MSG_H + /* This is for "printf"-like debugging. Messages go to OutputDebugString, which can be seen while debugging under GDB or via a debug message monitor. */ @@ -31,3 +34,5 @@ void note (HWND owner, int id, ...); /* returns IDYES or IDNO, otherwise same as note() */ int yesno (HWND owner, int id, ...); + +#endif /* SETUP_MSG_H */ diff --git a/netio.h b/netio.h index 304913dd..01d39d26 100644 --- a/netio.h +++ b/netio.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_NETIO_H +#define SETUP_NETIO_H + /* This is the parent class for all the access methods known to setup (i.e. ways to download files from the internet or other sources */ @@ -54,3 +57,5 @@ public: int get_proxy_auth (HWND owner); int get_ftp_auth (HWND owner); }; + +#endif /* SETUP_NETIO_H */ diff --git a/nio-file.h b/nio-file.h index b03b9f67..fe5e8e0e 100644 --- a/nio-file.h +++ b/nio-file.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_NIO_FILE_H +#define SETUP_NIO_FILE_H + /* see nio-file.cc */ class NetIO_File:public NetIO @@ -24,3 +27,5 @@ public: virtual int ok (); virtual int read (char *buf, int nbytes); }; + +#endif /* SETUP_NIO_FILE_H */ diff --git a/nio-ftp.h b/nio-ftp.h index 15954ce6..f30030c2 100644 --- a/nio-ftp.h +++ b/nio-ftp.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_NIO_FTP_H +#define SETUP_NIO_FTP_H + /* Direct FTP (without proxy) */ class SimpleSocket; @@ -32,3 +35,5 @@ public: is complete. */ virtual int read (char *buf, int nbytes); }; + +#endif /* SETUP_NIO_FTP_H */ diff --git a/nio-http.h b/nio-http.h index d47afe73..6d23873e 100644 --- a/nio-http.h +++ b/nio-http.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_NIO_HTTP_H +#define SETUP_NIO_HTTP_H + /* Direct HTTP (with or without proxy) */ class SimpleSocket; @@ -32,3 +35,5 @@ public: is complete. */ virtual int read (char *buf, int nbytes); }; + +#endif /* SETUP_NIO_HTTP_H */ diff --git a/nio-ie5.h b/nio-ie5.h index 0706730f..bdb3f5c1 100644 --- a/nio-ie5.h +++ b/nio-ie5.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_NIO_IE5_H +#define SETUP_NIO_IE5_H + /* see nio-ie5.cc */ class NetIO_IE5:public NetIO @@ -25,3 +28,5 @@ public: virtual int read (char *buf, int nbytes); void flush_io (); }; + +#endif /* SETUP_NIO_IE5_H */ diff --git a/port.h b/port.h index 890dd313..a143aaf0 100644 --- a/port.h +++ b/port.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_PORT_H +#define SETUP_PORT_H + /* I prefer building a cygwin version of setup for debugging, as I find that gdb can debug those programs (and the exceptions they cause) better. This file handles the slight differences between @@ -25,3 +28,5 @@ #define _access access #define _strdup error dont use strdup #endif + +#endif /* SETUP_PORT_H */ diff --git a/root.h b/root.h index 85304984..c4ef123a 100644 --- a/root.h +++ b/root.h @@ -1,5 +1,5 @@ -#ifndef CINSTALL_ROOT_H -#define CINSTALL_ROOT_H +#ifndef SETUP_ROOT_H +#define SETUP_ROOT_H #include "proppage.h" @@ -21,4 +21,4 @@ public: virtual long OnUnattended (); }; -#endif // CINSTALL_ROOT_H +#endif /* SETUP_ROOT_H */ diff --git a/simpsock.h b/simpsock.h index 6f678ec1..76bb02be 100644 --- a/simpsock.h +++ b/simpsock.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_SIMPSOCK_H +#define SETUP_SIMPSOCK_H + /* Simplified socket access functions */ class SimpleSocket @@ -36,3 +39,5 @@ public: char *gets (); int read (char *buf, int len); }; + +#endif /* SETUP_SIMPSOCK_H */ diff --git a/state.h b/state.h index 3f107be9..af3538bf 100644 --- a/state.h +++ b/state.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_STATE_H +#define SETUP_STATE_H + /* The purpose of this file is to contain all the global variables that define the "state" of the install, that is, all the information that the user has provided so far. These are set by @@ -50,3 +53,5 @@ extern char *net_proxy_passwd; extern char *net_ftp_user; extern char *net_ftp_passwd; + +#endif /* SETUP_STATE_H */ diff --git a/version.h b/version.h index 33e7ff4f..f89cd875 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,9 @@ * */ +#ifndef SETUP_VERSION_H +#define SETUP_VERSION_H + /* misc version-related things */ #include "String++.h" @@ -20,3 +23,5 @@ extern char *version; extern String canonicalize_version (String const &); + +#endif /* SETUP_VERSION_H */ -- 2.43.5