summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/check-boilerplate23
-rw-r--r--src/asset_list.h4
-rw-r--r--src/chromaticity.h4
-rw-r--r--src/colour_conversion.h4
-rw-r--r--src/dcp_time.h4
-rw-r--r--src/interop_subtitle_asset.h4
-rw-r--r--src/j2k_picture_asset_writer.h6
-rw-r--r--src/language_tag.h2
-rw-r--r--src/locale_convert.h2
-rw-r--r--src/mono_j2k_picture_asset.h4
-rw-r--r--src/mono_j2k_picture_frame.h6
-rw-r--r--src/name_format.h4
-rw-r--r--src/pkl.h2
-rw-r--r--src/reel.h2
-rw-r--r--src/reel_markers_asset.h2
-rw-r--r--src/reel_smpte_subtitle_asset.h4
-rw-r--r--src/rgb_xyz.h2
-rw-r--r--src/stereo_j2k_picture_asset.h6
-rw-r--r--src/stereo_j2k_picture_asset_reader.h6
-rw-r--r--src/stereo_j2k_picture_frame.h6
-rw-r--r--src/verify_j2k.h4
21 files changed, 62 insertions, 39 deletions
diff --git a/scripts/check-boilerplate b/scripts/check-boilerplate
new file mode 100755
index 00000000..311f95b8
--- /dev/null
+++ b/scripts/check-boilerplate
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import glob
+import os
+import sys
+
+for file in glob.glob('src/*.h'):
+ for line in open(file).readlines():
+ if line.find('@file') != -1:
+ filename = line.strip().split()[2]
+ if filename != file:
+ print(f'AWOOGA: {file} {filename}')
+ sys.exit(1)
+ elif line.find('ifndef') != -1:
+ guard = line.strip().split()[1]
+ if not guard.startswith('LIBDCP'):
+ print(f'AWOOGA: {file} {guard}')
+ sys.exit(1)
+ correct_guard = 'LIBDCP_' + os.path.basename(file).upper().replace('.', '_')
+ if guard != correct_guard:
+ print(f'AWOOGA: {file} {guard} {correct_guard}')
+ sys.exit(1)
+
diff --git a/src/asset_list.h b/src/asset_list.h
index 5c50495d..29563a8a 100644
--- a/src/asset_list.h
+++ b/src/asset_list.h
@@ -32,8 +32,8 @@
*/
-#ifndef DCP_ASSET_LIST_H
-#define DCP_ASSET_LIST_H
+#ifndef LIBDCP_ASSET_LIST_H
+#define LIBDCP_ASSET_LIST_H
#include "types.h"
diff --git a/src/chromaticity.h b/src/chromaticity.h
index 41bb8fda..52edd7bf 100644
--- a/src/chromaticity.h
+++ b/src/chromaticity.h
@@ -37,8 +37,8 @@
*/
-#ifndef DCP_CHROMATICITY_H
-#define DCP_CHROMATICITY_H
+#ifndef LIBDCP_CHROMATICITY_H
+#define LIBDCP_CHROMATICITY_H
#include <cmath>
diff --git a/src/colour_conversion.h b/src/colour_conversion.h
index 8501699a..29140541 100644
--- a/src/colour_conversion.h
+++ b/src/colour_conversion.h
@@ -37,8 +37,8 @@
*/
-#ifndef DCP_COLOUR_CONVERSION_H
-#define DCP_COLOUR_CONVERSION_H
+#ifndef LIBDCP_COLOUR_CONVERSION_H
+#define LIBDCP_COLOUR_CONVERSION_H
#include "chromaticity.h"
diff --git a/src/dcp_time.h b/src/dcp_time.h
index 506dafda..21b59921 100644
--- a/src/dcp_time.h
+++ b/src/dcp_time.h
@@ -37,8 +37,8 @@
*/
-#ifndef LIBDCP_TIME_H
-#define LIBDCP_TIME_H
+#ifndef LIBDCP_DCP_TIME_H
+#define LIBDCP_DCP_TIME_H
#include "types.h"
diff --git a/src/interop_subtitle_asset.h b/src/interop_subtitle_asset.h
index f63740d5..ad1c68a7 100644
--- a/src/interop_subtitle_asset.h
+++ b/src/interop_subtitle_asset.h
@@ -37,8 +37,8 @@
*/
-#ifndef DCP_INTEROP_SUBTITLE_ASSET_H
-#define DCP_INTEROP_SUBTITLE_ASSET_H
+#ifndef LIBDCP_INTEROP_SUBTITLE_ASSET_H
+#define LIBDCP_INTEROP_SUBTITLE_ASSET_H
#include "subtitle_asset.h"
diff --git a/src/j2k_picture_asset_writer.h b/src/j2k_picture_asset_writer.h
index d441c06d..a6f5b6d2 100644
--- a/src/j2k_picture_asset_writer.h
+++ b/src/j2k_picture_asset_writer.h
@@ -32,13 +32,13 @@
*/
-/** @file src/picture_asset_writer.h
+/** @file src/j2k_picture_asset_writer.h
* @brief J2KPictureAssetWriter and FrameInfo classes.
*/
-#ifndef LIBDCP_PICTURE_ASSET_WRITER_H
-#define LIBDCP_PICTURE_ASSET_WRITER_H
+#ifndef LIBDCP_J2K_PICTURE_ASSET_WRITER_H
+#define LIBDCP_J2K_PICTURE_ASSET_WRITER_H
#include "asset_writer.h"
diff --git a/src/language_tag.h b/src/language_tag.h
index 6f46c16b..3232dda9 100644
--- a/src/language_tag.h
+++ b/src/language_tag.h
@@ -32,7 +32,7 @@
*/
-/** @file src/language_tag.cc
+/** @file src/language_tag.h
* @brief LanguageTag class
*/
diff --git a/src/locale_convert.h b/src/locale_convert.h
index 37510a96..1323e704 100644
--- a/src/locale_convert.h
+++ b/src/locale_convert.h
@@ -32,7 +32,7 @@
*/
-/** @file src/locale_convert.cc
+/** @file src/locale_convert.h
* @brief Methods to convert to/from string using the current locale
*/
diff --git a/src/mono_j2k_picture_asset.h b/src/mono_j2k_picture_asset.h
index f7cae5dc..d716b8ff 100644
--- a/src/mono_j2k_picture_asset.h
+++ b/src/mono_j2k_picture_asset.h
@@ -37,8 +37,8 @@
*/
-#ifndef LIBDCP_J2K_MONO_PICTURE_ASSET_H
-#define LIBDCP_J2K_MONO_PICTURE_ASSET_H
+#ifndef LIBDCP_MONO_J2K_PICTURE_ASSET_H
+#define LIBDCP_MONO_J2K_PICTURE_ASSET_H
#include "j2k_picture_asset.h"
diff --git a/src/mono_j2k_picture_frame.h b/src/mono_j2k_picture_frame.h
index 4459a3ed..f08e7343 100644
--- a/src/mono_j2k_picture_frame.h
+++ b/src/mono_j2k_picture_frame.h
@@ -32,13 +32,13 @@
*/
-/** @file src/mono_picture_frame.h
+/** @file src/mono_j2k_picture_frame.h
* @brief MonoJ2KPictureFrame class
*/
-#ifndef LIBDCP_MONO_PICTURE_FRAME_H
-#define LIBDCP_MONO_PICTURE_FRAME_H
+#ifndef LIBDCP_MONO_J2K_PICTURE_FRAME_H
+#define LIBDCP_MONO_J2K_PICTURE_FRAME_H
#include "asset_reader.h"
diff --git a/src/name_format.h b/src/name_format.h
index 6401fe82..3eb0277b 100644
--- a/src/name_format.h
+++ b/src/name_format.h
@@ -37,8 +37,8 @@
*/
-#ifndef LIBDCP_NAME_FORMAT
-#define LIBDCP_NAME_FORMAT
+#ifndef LIBDCP_NAME_FORMAT_H
+#define LIBDCP_NAME_FORMAT_H
#include <string>
diff --git a/src/pkl.h b/src/pkl.h
index d0a11188..88443057 100644
--- a/src/pkl.h
+++ b/src/pkl.h
@@ -32,7 +32,7 @@
*/
-/** @file src/pkl.cc
+/** @file src/pkl.h
* @brief PKL class
*/
diff --git a/src/reel.h b/src/reel.h
index 52f41bfa..df6d12a9 100644
--- a/src/reel.h
+++ b/src/reel.h
@@ -32,7 +32,7 @@
*/
-/** @file src/reel.cc
+/** @file src/reel.h
* @brief Reel class
*/
diff --git a/src/reel_markers_asset.h b/src/reel_markers_asset.h
index 1e87957a..e2b65585 100644
--- a/src/reel_markers_asset.h
+++ b/src/reel_markers_asset.h
@@ -32,7 +32,7 @@
*/
-/** @file src/reel_markers_asset.cc
+/** @file src/reel_markers_asset.h
* @brief ReelMarkersAsset class
*/
diff --git a/src/reel_smpte_subtitle_asset.h b/src/reel_smpte_subtitle_asset.h
index 2a097309..49b6000b 100644
--- a/src/reel_smpte_subtitle_asset.h
+++ b/src/reel_smpte_subtitle_asset.h
@@ -32,8 +32,8 @@
*/
-/** @file src/reel_interop_subtitle_asset.h
- * @brief ReelInteropSubtitleAsset class
+/** @file src/reel_smpte_subtitle_asset.h
+ * @brief ReelSMPTESubtitleAsset class
*/
diff --git a/src/rgb_xyz.h b/src/rgb_xyz.h
index c41fdee0..315295ea 100644
--- a/src/rgb_xyz.h
+++ b/src/rgb_xyz.h
@@ -32,7 +32,7 @@
*/
-/** @file rgb_xyz.h
+/** @file src/rgb_xyz.h
* @brief Conversion between RGB and XYZ
*/
diff --git a/src/stereo_j2k_picture_asset.h b/src/stereo_j2k_picture_asset.h
index f4c5d9e0..7ef86ec5 100644
--- a/src/stereo_j2k_picture_asset.h
+++ b/src/stereo_j2k_picture_asset.h
@@ -32,13 +32,13 @@
*/
-/** @file src/stereo_picture_asset.h
+/** @file src/stereo_j2k_picture_asset.h
* @brief StereoJ2KPictureAsset class
*/
-#ifndef LIBDCP_STEREO_PICTURE_ASSET_H
-#define LIBDCP_STEREO_PICTURE_ASSET_H
+#ifndef LIBDCP_STEREO_J2K_PICTURE_ASSET_H
+#define LIBDCP_STEREO_J2K_PICTURE_ASSET_H
#include "j2k_picture_asset.h"
diff --git a/src/stereo_j2k_picture_asset_reader.h b/src/stereo_j2k_picture_asset_reader.h
index 5d1968e0..e4812a8e 100644
--- a/src/stereo_j2k_picture_asset_reader.h
+++ b/src/stereo_j2k_picture_asset_reader.h
@@ -32,13 +32,13 @@
*/
-/** @file src/stereo_picture_asset_reader.h
+/** @file src/stereo_j2k_picture_asset_reader.h
* @brief StereoJ2KPictureAssetReader typedef
*/
-#ifndef LIBDCP_STEREO_PICTURE_ASSET_READER_H
-#define LIBDCP_STEREO_PICTURE_ASSET_READER_H
+#ifndef LIBDCP_STEREO_J2K_PICTURE_ASSET_READER_H
+#define LIBDCP_STEREO_J2K_PICTURE_ASSET_READER_H
#include "asset_reader.h"
diff --git a/src/stereo_j2k_picture_frame.h b/src/stereo_j2k_picture_frame.h
index 0c171c66..193960f3 100644
--- a/src/stereo_j2k_picture_frame.h
+++ b/src/stereo_j2k_picture_frame.h
@@ -32,13 +32,13 @@
*/
-/** @file src/stereo_picture_frame.h
+/** @file src/stereo_j2k_picture_frame.h
* @brief StereoJ2KPictureFrame class
*/
-#ifndef LIBDCP_STEREO_PICTURE_FRAME_H
-#define LIBDCP_STEREO_PICTURE_FRAME_H
+#ifndef LIBDCP_STEREO_J2K_PICTURE_FRAME_H
+#define LIBDCP_STEREO_J2K_PICTURE_FRAME_H
#include "asset_reader.h"
diff --git a/src/verify_j2k.h b/src/verify_j2k.h
index 58c8f4b7..dbfc488b 100644
--- a/src/verify_j2k.h
+++ b/src/verify_j2k.h
@@ -37,8 +37,8 @@
*/
-#ifndef LIBDCP_VERIFY_J2K
-#define LIBDCP_VERIFY_J2K
+#ifndef LIBDCP_VERIFY_J2K_H
+#define LIBDCP_VERIFY_J2K_H
#include "verify.h"