Skip to content

Commit

Permalink
Merge pull request #784 from BenjamenMeyer/enhancement_header_guard_u…
Browse files Browse the repository at this point in the history
…pdates

Enhancement: Uniform Header Guards
  • Loading branch information
stephengtuggy authored Jun 9, 2023
2 parents 32ea757 + e37deb1 commit 989621b
Show file tree
Hide file tree
Showing 463 changed files with 1,969 additions and 2,451 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ext/
packages/
*.log
*.bak
*.sw?
*.kdev4
.vs/
.vscode/
Expand Down
2 changes: 1 addition & 1 deletion engine/cmake-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2001-2002 Daniel Horn
* Copyright (c) 2002-2019 pyramid3d and other Vega Strike Contributors
* Copyright (c) 2019-2021 Stephen G. Tuggy, and other Vega Strike Contributors
* Copyright (c) 2019-2023 Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike Contributors
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand Down
8 changes: 4 additions & 4 deletions engine/launcher/general.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, David Ranger, pyramid3d,
* Stephen G. Tuggy, and other Vega Strike contributors.
* Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand Down Expand Up @@ -28,8 +28,8 @@
// Mar 05, 2002: Fixed the FindFiles() so it now checks sub directories
// Mar 05, 2002: Fixed FindFiles() again

#ifndef GENERAL_H
#define GENERAL_H
#ifndef VEGA_STRIKE_LAUNCHER_GENERAL_H
#define VEGA_STRIKE_LAUNCHER_GENERAL_H

/* Don't forget, these defines can be set at compile time with the compile flag -D */

Expand Down Expand Up @@ -177,4 +177,4 @@ glob_t *FindFiles(char *path, char *extension);
glob_t *FindDirs(char *path);
#endif // _G_PATH

#endif // GENERAL_H
#endif // VEGA_STRIKE_LAUNCHER_GENERAL_H
2 changes: 1 addition & 1 deletion engine/launcher/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2001-2002 Daniel Horn
* Copyright (c) 2002-2019 pyramid3d and other Vega Strike Contributors
* Copyright (c) 2019-2021 Stephen G. Tuggy, and other Vega Strike Contributors
* Copyright (c) 2019-2023 Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike Contributors
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand Down
10 changes: 4 additions & 6 deletions engine/mission/include/central.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, David Ranger, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, David Ranger, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,10 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

// Check to see if we're already loaded
#ifndef CENTRAL_H
#define CENTRAL_H
#ifndef VEGA_STRIKE_ENGINE_MISSION_CENTRAL_H
#define VEGA_STRIKE_ENGINE_MISSION_CENTRAL_H

#define MISSION_VERSION "1.0.0.1"
#define MISSION_PROGRAM "Vega Strike"
Expand Down Expand Up @@ -67,4 +65,4 @@ struct mission_data {
extern glob_t *MISSIONS;
extern struct mission_data DATA;

#endif //CENTRAL_H
#endif //VEGA_STRIKE_ENGINE_MISSION_CENTRAL_H
10 changes: 4 additions & 6 deletions engine/mission/include/display_gtk.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, David Ranger, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, David Ranger, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,10 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

// Check to see if we're already loaded
#ifndef DISPLAY_GTK_H
#define DISPLAY_GTK_H
#ifndef VEGA_STRIKE_ENGINE_MISSION_DISPLAY_GTK_H
#define VEGA_STRIKE_ENGINE_MISSION_DISPLAY_GTK_H

#include "central.h"

Expand All @@ -41,4 +39,4 @@ void cb_unselect_child(GtkWidget *root_tree, GtkWidget *child, GtkWidget *subtre
void cb_select_child(GtkWidget *root_tree, GtkWidget *child, GtkWidget *subtree);
void cb_selection_changed(GtkWidget *tree);

#endif //DISPLAY_GTK_H
#endif //VEGA_STRIKE_ENGINE_MISSION_DISPLAY_GTK_H
10 changes: 5 additions & 5 deletions engine/mission/include/easydom.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Roy Falk,
* Stephen G. Tuggy, and other Vega Strike contributors.
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Roy Falk,
* Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -24,8 +24,8 @@
easyDom - easy DOM for expat - written by Alexander Rawass <[email protected]>
*/

#ifndef _EASYDOM_H_
#define _EASYDOM_H_
#ifndef VEGA_STRIKE_ENGINE_MISSION_EASYDOM_H
#define VEGA_STRIKE_ENGINE_MISSION_EASYDOM_H

#include <expat.h>
#include <string>
Expand Down Expand Up @@ -260,4 +260,4 @@ class easyDomFactory {
domNodeType *topnode;
};

#endif // _EASYDOM_H_
#endif //VEGA_STRIKE_ENGINE_MISSION_EASYDOM_H
12 changes: 5 additions & 7 deletions engine/mission/include/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, David Ranger, pyramid3d,
* Stephen G. Tuggy, and other Vega Strike contributors.
* Copyright (C) 2001-2023 Daniel Horn, David Ranger, pyramid3d,
* Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -19,10 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

// Check to see if we're already loaded
#ifndef FILE_H
#define FILE_H
#ifndef VEGA_STRIKE_ENGINE_MISSION_FILE_H
#define VEGA_STRIKE_ENGINE_MISSION_FILE_H

#include "central.h"
#include "easydom.h"
Expand Down Expand Up @@ -77,4 +75,4 @@ class missionNode : public tagDomNode {
struct script_t script;
};

#endif
#endif //VEGA_STRIKE_ENGINE_MISSION_FILE_H
12 changes: 5 additions & 7 deletions engine/mission/include/general.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, David Ranger, pyramid3d,
* Stephen G. Tuggy, and other Vega Strike contributors.
* Copyright (C) 2001-2023 Daniel Horn, David Ranger, pyramid3d,
* Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -19,11 +19,9 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

// Version 2.2

#ifndef GENERAL_H
#define GENERAL_H
#ifndef VEGA_STRIKE_ENGINE_MISSION_GENERAL_H
#define VEGA_STRIKE_ENGINE_MISSION_GENERAL_H

/* Don't forget, these defines can be set at compile time with the compile flag -D */

Expand Down Expand Up @@ -154,4 +152,4 @@ glob_t *FindFiles(char *path, char *extension);
glob_t *FindDirs(char *path);
#endif // _G_GLOB

#endif // GENERAL_H
#endif // VEGA_STRIKE_ENGINE_MISSION_GENERAL_H
12 changes: 5 additions & 7 deletions engine/mission/include/hashtable.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, Alan Shieh, pyramid3d,
* Stephen G. Tuggy, and other Vega Strike contributors.
* Copyright (C) 2001-2023 Daniel Horn, Alan Shieh, pyramid3d,
* Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -19,9 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef _HASHTABLE_H_
#define _HASHTABLE_H_
#ifndef VEGA_STRIKE_ENGINE_MISSION_HASHTABLE_H
#define VEGA_STRIKE_ENGINE_MISSION_HASHTABLE_H

#include <math.h>
#include <list>
Expand Down Expand Up @@ -111,5 +110,4 @@ class Hashtable {
*/
};

#endif

#endif //VEGA_STRIKE_ENGINE_MISSION_HASHTABLE_H
10 changes: 5 additions & 5 deletions engine/mission/include/xml_support.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,10 +19,9 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef VEGA_STRIKE_ENGINE_MISSION_XML_SUPPORT_H
#define VEGA_STRIKE_ENGINE_MISSION_XML_SUPPORT_H

#ifndef _XML_SUPPORT_H_

#define _XML_SUPPORT_H_
#include <stdio.h>
#include <string>
#ifndef WIN32
Expand Down Expand Up @@ -106,4 +105,5 @@ string inline tostring(float num) {
}
#endif*/
}
#endif

#endif //VEGA_STRIKE_ENGINE_MISSION_XML_SUPPORT_H
3 changes: 2 additions & 1 deletion engine/objconv/basemaker/base_maker_texture.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/
// NO HEADER GUARD

///A single OpenGL texture
#include "gldrv/gl_globals.h"
Expand Down
9 changes: 4 additions & 5 deletions engine/objconv/basemaker/sprite.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,9 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef SPRITE_H
#define SPRITE_H
#ifndef VEGA_STRIKE_ENGINE_OBJCONV_SPRITE_H
#define VEGA_STRIKE_ENGINE_OBJCONV_SPRITE_H

#include "gfx/quaternion.h"
#include "gfx/vec.h"
Expand Down Expand Up @@ -80,4 +79,4 @@ class VSSprite {
}
};

#endif
#endif //VEGA_STRIKE_ENGINE_OBJCONV_SPRITE_H
10 changes: 4 additions & 6 deletions engine/objconv/mesher/Converter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,9 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __CONVERTER_API__INCLUDED__
#define __CONVERTER_API__INCLUDED__
#ifndef VEGA_STRIKE_ENGINE_OBJCONV_CONVERTER_H
#define VEGA_STRIKE_ENGINE_OBJCONV_CONVERTER_H

namespace Converter {
typedef std::vector<std::string> ParameterList;
Expand Down Expand Up @@ -209,5 +208,4 @@ class ConversionImplDeclaration {
};
}

#endif //__CONVERTER_API__INCLUDED__

#endif //VEGA_STRIKE_ENGINE_OBJCONV_CONVERTER_H
3 changes: 2 additions & 1 deletion engine/objconv/mesher/PrecompiledHeaders/Converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2001-2002 Daniel Horn
* Copyright (c) 2002-2019 pyramid3d and other Vega Strike Contributors
* Copyright (c) 2019-2021 Stephen G. Tuggy, and other Vega Strike Contributors
* Copyright (c) 2019-2023 Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike Contributors
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -22,6 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/
// NO HEADER GUARD

#ifdef HAVE_OGRE
#include <OgrePrerequisites.h>
Expand Down
10 changes: 4 additions & 6 deletions engine/objconv/mesher/PrecompiledHeaders/Standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2001-2002 Daniel Horn
* Copyright (c) 2002-2019 pyramid3d and other Vega Strike Contributors
* Copyright (c) 2019-2021 Stephen G. Tuggy, and other Vega Strike Contributors
* Copyright (c) 2019-2023 Stephen G. Tuggy, Benjamen R. Meyer, and other Vega Strike Contributors
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
*
Expand All @@ -22,9 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __PRECOMPILED_STANDARD_INCLUDED__
#define __PRECOMPILED_STANDARD_INCLUDED__
#ifndef VEGA_STRIKE_ENGINE_OBJCONV_PRECOMPILED_STANDARD_H
#define VEGA_STRIKE_ENGINE_OBJCONV_PRECOMPILED_STANDARD_H

#include <string>
#include <vector>
Expand All @@ -35,5 +34,4 @@
#include <iostream>
#include <iomanip>

#endif//__PRECOMPILED_STANDARD_INCLUDED__

#endif //VEGA_STRIKE_ENGINE_OBJCONV_PRECOMPILED_STANDARD_H
2 changes: 2 additions & 0 deletions engine/objconv/mesher/expat.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
* Copyright (c) 2023 Benjamen R. Meyer
* See the file COPYING for copying permission.
*/
// NO HEADER GUARD -- 3rd Party

#ifndef XmlParse_INCLUDED
#define XmlParse_INCLUDED 1
Expand Down
3 changes: 2 additions & 1 deletion engine/objconv/mesher/from_BFXM.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/
// NO HEADER GUARD

#include <string>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion engine/objconv/mesher/from_obj.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2022 Daniel Horn, pyramid3d, Stephen G. Tuggy,
* Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, Benjamen R. Meyer,
* and other Vega Strike contributors.
*
* https://github.com/vegastrike/Vega-Strike-Engine-Source
Expand All @@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.
*/
// NO HEADER GUARD

#include "mesh_io.h"
#include "to_BFXM.h"
Expand Down
Loading

0 comments on commit 989621b

Please sign in to comment.