Put include guard to every header

* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Boris Barbulovski 2014-02-11 19:14:46 +01:00 committed by Dirk Hohndel
parent a3d82bf9b1
commit ccb1c33d02
54 changed files with 78 additions and 66 deletions

View file

@ -1,5 +1,5 @@
#ifndef COLORS_H #ifndef COLOR_H
#define COLORS_H #define COLOR_H
/* The colors are named by picking the closest match /* The colors are named by picking the closest match
from http://chir.ag/projects/name-that-color */ from http://chir.ag/projects/name-that-color */
@ -57,4 +57,4 @@
// Magentas // Magentas
#define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF( 0.7, 0.2, 0.7, 0.1 ) #define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF( 0.7, 0.2, 0.7, 0.1 )
#endif #endif // COLOR_H

2
deco.h
View file

@ -12,4 +12,4 @@ extern double buehlmann_N2_t_halflife[];
} }
#endif #endif
#endif #endif // DECO_H

View file

@ -1,5 +1,5 @@
#ifndef DEVICE_INFO_H #ifndef DEVICE_H
#define DEVICE_INFO_H #define DEVICE_H
#ifdef __cplusplus #ifdef __cplusplus
#include "dive.h" #include "dive.h"
@ -15,4 +15,4 @@ extern void call_for_each_dc(void *f, void (*callback)(void *, const char *, uin
} }
#endif #endif
#endif #endif // DEVICE_H

View file

@ -69,4 +69,4 @@ extern const char *default_dive_computer_device;
} }
#endif #endif
#endif #endif // DISPLAY_H

2
dive.h
View file

@ -823,4 +823,4 @@ extern fraction_t string_to_fraction(const char *str);
#include "pref.h" #include "pref.h"
#endif /* DIVE_H */ #endif // DIVE_H

View file

@ -41,4 +41,4 @@ extern void dump_trip_list(void);
} }
#endif #endif
#endif #endif // DIVELIST_H

2
file.h
View file

@ -19,4 +19,4 @@ extern timestamp_t parse_date(const char *date);
} }
#endif #endif
#endif #endif // FILE_H

4
flag.h
View file

@ -1,4 +1,6 @@
/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
#ifndef FLAG_H
#define FLAG_H
static const GdkPixdata flag_pixbuf = { static const GdkPixdata flag_pixbuf = {
0x47646b50, /* Pixbuf magic: 'GdkP' */ 0x47646b50, /* Pixbuf magic: 'GdkP' */
@ -73,4 +75,4 @@ static const GdkPixdata flag_pixbuf = {
"53>t44;'\226\377\377\377\0", "53>t44;'\226\377\377\377\0",
}; };
#endif // FLAG_H

View file

@ -4,8 +4,8 @@
* header file for random helper functions of Subsurface * header file for random helper functions of Subsurface
* *
*/ */
#ifndef HELPER_H #ifndef HELPERS_H
#define HELPER_H #define HELPERS_H
#include <QString> #include <QString>
#include "dive.h" #include "dive.h"
@ -42,4 +42,4 @@ extern DiveComputerList dcList;
#else #else
#define TITLE_OR_TEXT(_t,_m) _t, _m #define TITLE_OR_TEXT(_t,_m) _t, _m
#endif #endif
#endif /* HELPER_H */ #endif // HELPERS_H

View file

@ -42,4 +42,4 @@ extern char *dumpfile_name;
} }
#endif #endif
#endif #endif // LIBDIVECOMPUTER_H

View file

@ -24,4 +24,4 @@ extern double plangflow, plangfhigh;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* PLANNER_H */ #endif // PLANNER_H

2
pref.h
View file

@ -66,4 +66,4 @@ extern void save_preferences(void);
} }
#endif #endif
#endif /* PREF_H */ #endif // PREF_H

View file

@ -126,4 +126,4 @@ void setup_pp_limits(struct graphics_context *gc);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif // PROFILE_H

View file

@ -7,4 +7,4 @@ void init_qt_ui(int *argcp, char ***argvp, char *errormessage);
void run_ui(void); void run_ui(void);
void exit_ui(void); void exit_ui(void);
#endif #endif // QT_GUI_H

View file

@ -17,4 +17,4 @@ private:
Ui::SubsurfaceAbout ui; Ui::SubsurfaceAbout ui;
}; };
#endif #endif // ABOUT_H

View file

@ -33,4 +33,4 @@ public:
void updateModel(); void updateModel();
}; };
#endif #endif // COMPLETIONMODELS_H

View file

@ -25,4 +25,4 @@ private:
DiveComputerModel *model; DiveComputerModel *model;
}; };
#endif #endif // DIVECOMPUTERMANAGEMENTDIALOG_H

View file

@ -241,4 +241,4 @@ private:
Ui::DivePlanner ui; Ui::DivePlanner ui;
}; };
#endif #endif // DIVEPLANNER_H

View file

@ -78,4 +78,4 @@ public:
}; };
#endif #endif // DOWNLOADFROMDIVECOMPUTER_H

View file

@ -49,8 +49,8 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __EXIF_H #ifndef EXIF_H
#define __EXIF_H #define EXIF_H
#include <string> #include <string>
@ -140,4 +140,4 @@ class EXIFInfo {
// EXIF header was found, but data was corrupted. // EXIF header was found, but data was corrupted.
#define PARSE_EXIF_ERROR_CORRUPT 1985 #define PARSE_EXIF_ERROR_CORRUPT 1985
#endif #endif // EXIF_H

View file

@ -39,4 +39,4 @@ public slots:
}; };
#endif #endif // GLOBE_H

View file

@ -43,4 +43,4 @@ struct text_render_options {
}; };
typedef text_render_options text_render_options_t; typedef text_render_options text_render_options_t;
#endif #endif // GRAPHICSVIEW_COMMON_H

View file

@ -27,8 +27,8 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#ifndef __GROUPEDLINEEDIT_H__ #ifndef GROUPEDLINEEDIT_H
#define __GROUPEDLINEEDIT_H__ #define GROUPEDLINEEDIT_H
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QStringList> #include <QStringList>
@ -69,4 +69,4 @@ private:
struct Private; struct Private;
Private *d; Private *d;
}; };
#endif #endif // GROUPEDLINEEDIT_H

View file

@ -236,4 +236,4 @@ public:
int bestContentHeight() const; int bestContentHeight() const;
}; };
#endif /* KMESSAGEWIDGET_H */ #endif // KMESSAGEWIDGET_H

View file

@ -114,4 +114,4 @@ private:
void updateGpsCoordinates(const struct dive *dive); void updateGpsCoordinates(const struct dive *dive);
}; };
#endif #endif // MAINTAB_H

View file

@ -148,4 +148,4 @@ private:
MainWindow *mainWindow(); MainWindow *mainWindow();
#endif #endif // MAINWINDOW_H

View file

@ -79,4 +79,4 @@ public:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
}; };
#endif #endif // MODELDELEGATES_H

View file

@ -325,4 +325,4 @@ private:
QStringList languages; QStringList languages;
}; };
#endif #endif // MODELS_H

View file

@ -1,5 +1,5 @@
#ifndef PREFERENCES_DIALOG_H #ifndef PREFERENCES_H
#define PREFERENCES_DIALOG_H #define PREFERENCES_H
#include <QDialog> #include <QDialog>
#include "../dive.h" #include "../dive.h"
@ -34,4 +34,4 @@ private:
struct preferences oldPrefs; struct preferences oldPrefs;
}; };
#endif #endif // PREFERENCES_H

View file

@ -29,4 +29,4 @@ private slots:
void onPaintRequested(QPrinter *); void onPaintRequested(QPrinter *);
}; };
#endif #endif // PRINTDIALOG_H

View file

@ -46,4 +46,4 @@ signals:
void signalProgress(int); void signalProgress(int);
}; };
#endif #endif // PRINTLAYOUT_H

View file

@ -36,4 +36,4 @@ private slots:
void profileOnTopClicked(bool check); void profileOnTopClicked(bool check);
}; };
#endif #endif // PRINTOPTIONS_H

View file

@ -13,4 +13,4 @@ namespace Animations{
void animDelete(QObject *obj); void animDelete(QObject *obj);
} }
#endif #endif // ANIMATIONFUNCTIONS_H

View file

@ -115,4 +115,4 @@ private:
qreal verticalSize; qreal verticalSize;
qreal horizontalSize; qreal horizontalSize;
}; };
#endif #endif // DIVECARTESIANAXIS_H

View file

@ -26,4 +26,4 @@ private:
struct event* internalEvent; struct event* internalEvent;
}; };
#endif #endif // DIVEEVENTITEM_H

View file

@ -14,4 +14,4 @@ public:
void animateMoveTo(qreal x, qreal y); void animateMoveTo(qreal x, qreal y);
}; };
#endif #endif // DIVELINEITEM_H

View file

@ -14,4 +14,4 @@ public:
DivePixmapItem(QObject* parent = 0); DivePixmapItem(QObject* parent = 0);
}; };
#endif #endif // DIVEPIXMAPITEM_H

View file

@ -36,4 +36,4 @@ private:
int dcNr; int dcNr;
}; };
#endif #endif // DIVEPLOTDATAMODEL_H

View file

@ -158,4 +158,4 @@ private:
QColor normalColor; QColor normalColor;
QColor alertColor; QColor alertColor;
}; };
#endif #endif // DIVEPROFILEITEM_H

View file

@ -14,4 +14,4 @@ public:
DiveRectItem(QObject *parent = 0, QGraphicsItem *parentItem = 0); DiveRectItem(QObject *parent = 0, QGraphicsItem *parentItem = 0);
}; };
#endif #endif // DIVERECTITEM_H

View file

@ -29,4 +29,4 @@ private:
QBrush brush; QBrush brush;
}; };
#endif #endif // DIVETEXTITEM_H

View file

@ -58,4 +58,4 @@ private:
plot_info pInfo; plot_info pInfo;
}; };
#endif #endif // DIVETOOLTIPITEM_H

View file

@ -99,4 +99,4 @@ private:
PartialPressureGasItem *po2GasItem; PartialPressureGasItem *po2GasItem;
}; };
#endif #endif // PROFILEWIDGET2_H

View file

@ -172,4 +172,4 @@ private:
enum Mode mode; enum Mode mode;
}; };
#endif #endif // PROFILEGRAPHICS_H

View file

@ -69,4 +69,4 @@ private:
bool isGnome3Session(); bool isGnome3Session();
#endif #endif // SIMPLEWIDGETS_H

View file

@ -91,4 +91,4 @@ private:
bool uploadMode; bool uploadMode;
}; };
#endif #endif // SUBSURFACEWEBSERVICES_H

View file

@ -41,4 +41,4 @@ private:
QPushButton *plusBtn; QPushButton *plusBtn;
}; };
#endif #endif // TABLEVIEW_H

View file

@ -1,5 +1,5 @@
#ifndef __TAGWIDGET_H #ifndef TAGWIDGET_H
#define __TAGWIDGET_H #define TAGWIDGET_H
#include "groupedlineedit.h" #include "groupedlineedit.h"
#include <QCompleter> #include <QCompleter>
@ -26,4 +26,4 @@ private:
QCompleter *m_completer; QCompleter *m_completer;
}; };
#endif /* __TAGWIDGET_H */ #endif // TAGWIDGET_H

4
sha1.h
View file

@ -5,6 +5,8 @@
* This was initially based on the Mozilla SHA1 implementation, although * This was initially based on the Mozilla SHA1 implementation, although
* none of the original Mozilla code remains. * none of the original Mozilla code remains.
*/ */
#ifndef SHA1_H
#define SHA1_H
typedef struct { typedef struct {
unsigned long long size; unsigned long long size;
@ -31,3 +33,5 @@ static inline void SHA1(const void *dataIn, unsigned long len, unsigned char has
SHA1_Update(&ctx, dataIn, len); SHA1_Update(&ctx, dataIn, len);
SHA1_Final(hashout, &ctx); SHA1_Final(hashout, &ctx);
} }
#endif // SHA1_H

View file

@ -51,4 +51,4 @@ extern void process_selected_dives(void);
} }
#endif #endif
#endif #endif // STATISTICS_H

View file

@ -1,4 +1,6 @@
/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
#ifndef SUBSURFACE_ICON_H
#define SUBSURFACE_ICON_H
static const GdkPixdata subsurface_icon_pixbuf = { static const GdkPixdata subsurface_icon_pixbuf = {
0x47646b50, /* Pixbuf magic: 'GdkP' */ 0x47646b50, /* Pixbuf magic: 'GdkP' */
@ -5239,4 +5241,4 @@ static const GdkPixdata subsurface_icon_pixbuf = {
"\316\377\323\332\317\377\233!H\211\0", "\316\377\323\332\317\377\233!H\211\0",
}; };
#endif // SUBSURFACE_ICON_H

View file

@ -20,4 +20,4 @@ void parse_argument(const char *arg);
} }
#endif #endif
#endif #endif // SUBSURFACESTARTUP_H

View file

@ -49,4 +49,4 @@ typedef struct {
} }
#endif #endif
#endif /* UEMIS_H */ #endif // UEMIS_H

View file

@ -1,3 +1,6 @@
#ifndef WEBSERVICE_H
#define WEBSERVICE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -18,3 +21,4 @@ enum {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // WEBSERVICE_H