From 640d091b45b196cc586fbc6a7bec71c5c7d75544 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 21 Oct 2012 16:03:08 +0200 Subject: [PATCH] Fix #include guards. - Add missing #include guards. - Fix incorrect #endif comments for some #include guards. - Use consistent naming for them, as per HACKING. --- extdef.h | 6 +++--- pv/about.h | 6 +++--- pv/datasnapshot.h | 5 +++++ pv/logicdata.h | 5 +++++ pv/logicdatasnapshot.h | 5 +++++ pv/logicsignal.h | 5 +++++ pv/mainwindow.h | 6 +++--- pv/samplingbar.h | 6 +++--- pv/signal.h | 5 +++++ pv/signaldata.h | 5 +++++ pv/sigsession.h | 6 +++--- pv/view/header.h | 6 +++--- pv/view/ruler.h | 6 +++--- pv/view/view.h | 6 +++--- pv/view/viewport.h | 6 +++--- 15 files changed, 57 insertions(+), 27 deletions(-) diff --git a/extdef.h b/extdef.h index c2a0f16c..8af615c0 100644 --- a/extdef.h +++ b/extdef.h @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _EXTDEF_H -#define _EXTDEF_H +#ifndef PULSEVIEW_EXTDEF_H +#define PULSEVIEW_EXTDEF_H #define countof(x) (sizeof(x)/sizeof(x[0])) #define begin_element(x) (&x[0]) #define end_element(x) (&x[countof(x)]) -#endif /* _EXTDEF_H */ +#endif // PULSEVIEW_EXTDEF_H diff --git a/pv/about.h b/pv/about.h index 31392b2b..5b845cb4 100644 --- a/pv/about.h +++ b/pv/about.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef ABOUT_H -#define ABOUT_H +#ifndef PULSEVIEW_PV_ABOUT_H +#define PULSEVIEW_PV_ABOUT_H #include @@ -48,4 +48,4 @@ private: } // namespace pv -#endif // ABOUT_H +#endif // PULSEVIEW_PV_ABOUT_H diff --git a/pv/datasnapshot.h b/pv/datasnapshot.h index 221ebcd3..9c0866d4 100644 --- a/pv/datasnapshot.h +++ b/pv/datasnapshot.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_DATASNAPSHOT_H +#define PULSEVIEW_PV_DATASNAPSHOT_H + extern "C" { #include } @@ -43,3 +46,5 @@ protected: }; } // namespace pv + +#endif // PULSEVIEW_PV_DATASNAPSHOT_H diff --git a/pv/logicdata.h b/pv/logicdata.h index b21d50ad..11e5f9a3 100644 --- a/pv/logicdata.h +++ b/pv/logicdata.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_LOGICDATA_H +#define PULSEVIEW_PV_LOGICDATA_H + #include "signaldata.h" #include @@ -51,3 +54,5 @@ private: }; } // namespace pv + +#endif // PULSEVIEW_PV_LOGICDATA_H diff --git a/pv/logicdatasnapshot.h b/pv/logicdatasnapshot.h index 8e494bed..2a18835f 100644 --- a/pv/logicdatasnapshot.h +++ b/pv/logicdatasnapshot.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_LOGICDATASNAPSHOT_H +#define PULSEVIEW_PV_LOGICDATASNAPSHOT_H + #include "datasnapshot.h" #include @@ -99,3 +102,5 @@ private: }; } // namespace pv + +#endif // PULSEVIEW_PV_LOGICDATASNAPSHOT_H diff --git a/pv/logicsignal.h b/pv/logicsignal.h index 42acee83..54145a8c 100644 --- a/pv/logicsignal.h +++ b/pv/logicsignal.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_LOGICSIGNAL_H +#define PULSEVIEW_PV_LOGICSIGNAL_H + #include "signal.h" #include @@ -77,3 +80,5 @@ private: }; } // namespace pv + +#endif // PULSEVIEW_PV_LOGICSIGNAL_H diff --git a/pv/mainwindow.h b/pv/mainwindow.h index 88cbd6fd..8b813afb 100644 --- a/pv/mainwindow.h +++ b/pv/mainwindow.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#ifndef PULSEVIEW_PV_MAINWINDOW_H +#define PULSEVIEW_PV_MAINWINDOW_H #include @@ -88,4 +88,4 @@ private slots: } // namespace pv -#endif // MAINWINDOW_H +#endif // PULSEVIEW_PV_MAINWINDOW_H diff --git a/pv/samplingbar.h b/pv/samplingbar.h index 170379e0..e6204dfa 100644 --- a/pv/samplingbar.h +++ b/pv/samplingbar.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef SAMPLINGBAR_H -#define SAMPLINGBAR_H +#ifndef PULSEVIEW_PV_SAMPLINGBAR_H +#define PULSEVIEW_PV_SAMPLINGBAR_H #include @@ -71,4 +71,4 @@ private: } // namespace pv -#endif // SAMPLINGBAR_H +#endif // PULSEVIEW_PV_SAMPLINGBAR_H diff --git a/pv/signal.h b/pv/signal.h index 18ff4b4d..789b4360 100644 --- a/pv/signal.h +++ b/pv/signal.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_SIGNAL_H +#define PULSEVIEW_PV_SIGNAL_H + #include #include @@ -111,3 +114,5 @@ protected: }; } // namespace pv + +#endif // PULSEVIEW_PV_SIGNAL_H diff --git a/pv/signaldata.h b/pv/signaldata.h index 57cd543b..94268aec 100644 --- a/pv/signaldata.h +++ b/pv/signaldata.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_SIGNALDATA_H +#define PULSEVIEW_PV_SIGNALDATA_H + #include namespace pv { @@ -37,3 +40,5 @@ protected: }; } // namespace pv + +#endif // PULSEVIEW_PV_SIGNALDATA_H diff --git a/pv/sigsession.h b/pv/sigsession.h index 40fce89f..b6e5a568 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef SIGSESSION_H -#define SIGSESSION_H +#ifndef PULSEVIEW_PV_SIGSESSION_H +#define PULSEVIEW_PV_SIGSESSION_H #include @@ -81,4 +81,4 @@ private: } // namespace pv -#endif // SIGSESSION_H +#endif // PULSEVIEW_PV_SIGSESSION_H diff --git a/pv/view/header.h b/pv/view/header.h index a92d1173..6b97c4af 100644 --- a/pv/view/header.h +++ b/pv/view/header.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PV_VIEW_HEADER_H -#define PV_VIEW_HEADER_H +#ifndef PULSEVIEW_PV_VIEW_HEADER_H +#define PULSEVIEW_PV_VIEW_HEADER_H #include @@ -65,4 +65,4 @@ private: } // namespace view } // namespace pv -#endif // PV_VIEW_HEADER_H +#endif // PULSEVIEW_PV_VIEW_HEADER_H diff --git a/pv/view/ruler.h b/pv/view/ruler.h index 18b565eb..f855185b 100644 --- a/pv/view/ruler.h +++ b/pv/view/ruler.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PV_VIEW_RULER_H -#define PV_VIEW_RULER_H +#ifndef PULSEVIEW_PV_VIEW_RULER_H +#define PULSEVIEW_PV_VIEW_RULER_H #include @@ -52,4 +52,4 @@ private: } // namespace view } // namespace pv -#endif // PV_VIEW_HEADER_H +#endif // PULSEVIEW_PV_VIEW_RULER_H diff --git a/pv/view/view.h b/pv/view/view.h index d2abbf00..c87be369 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PV_VIEW_VIEW_H -#define PV_VIEW_VIEW_H +#ifndef PULSEVIEW_PV_VIEW_VIEW_H +#define PULSEVIEW_PV_VIEW_VIEW_H #include @@ -98,4 +98,4 @@ private: } // namespace view } // namespace pv -#endif // PV_VIEW_VIEW_H +#endif // PULSEVIEW_PV_VIEW_VIEW_H diff --git a/pv/view/viewport.h b/pv/view/viewport.h index e2517fa7..a33d4045 100644 --- a/pv/view/viewport.h +++ b/pv/view/viewport.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PV_VIEW_VIEWPORT_H -#define PV_VIEW_VIEWPORT_H +#ifndef PULSEVIEW_PV_VIEW_VIEWPORT_H +#define PULSEVIEW_PV_VIEW_VIEWPORT_H #include #include @@ -61,4 +61,4 @@ private: } // namespace view } // namespace pv -#endif // PV_VIEW_VIEWPORT_H +#endif // PULSEVIEW_PV_VIEW_VIEWPORT_H -- 2.30.2