Skip to content

Commit

Permalink
Fix header guards to be compliant with C standard
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiecohen committed Nov 12, 2013
1 parent 53dc98d commit 69dff6e
Show file tree
Hide file tree
Showing 258 changed files with 799 additions and 736 deletions.
6 changes: 3 additions & 3 deletions Include/Android-Arm/OniPlatformAndroid-Arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_ANDROID_ARM_H_
#define _ONI_PLATFORM_ANDROID_ARM_H_
#ifndef ONIPLATFORMANDROID_ARM_H
#define ONIPLATFORMANDROID_ARM_H

// Start with Linux-x86, and override what's different
#include "../Linux-x86/OniPlatformLinux-x86.h"
Expand All @@ -40,4 +40,4 @@
#define ONI_PLATFORM_STRING "AndroidOS-Arm"
#endif

#endif //_ONI_PLATFORM_LINUX_ARM_H_
#endif // ONIPLATFORMANDROID_ARM_H
6 changes: 3 additions & 3 deletions Include/Driver/OniDriverAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_DRIVER_API_H_
#define _ONI_DRIVER_API_H_
#ifndef ONIDRIVERAPI_H
#define ONIDRIVERAPI_H

#include "OniPlatform.h"
#include "OniCTypes.h"
Expand Down Expand Up @@ -375,4 +375,4 @@ ONI_C_API_EXPORT void oniDriverDisableFrameSync(void* frameSyncGroup)
return g_pDriver->disableFrameSync(frameSyncGroup); \
} \

#endif // _ONI_DRIVER_API_H_
#endif // ONIDRIVERAPI_H
6 changes: 3 additions & 3 deletions Include/Driver/OniDriverTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_DRIVER_TYPES_H_
#define _ONI_DRIVER_TYPES_H_
#ifndef ONIDRIVERTYPES_H
#define ONIDRIVERTYPES_H

#include <OniCTypes.h>
#include <stdarg.h>
Expand Down Expand Up @@ -51,4 +51,4 @@ struct OniStreamServices
};


#endif // _ONI_DRIVER_TYPES_H_
#endif // ONIDRIVERTYPES_H
6 changes: 3 additions & 3 deletions Include/KinectProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _KINECT_PROPERTIES_H_
#define _KINECT_PROPERTIES_H_
#ifndef KINECTPROPERTIES_H
#define KINECTPROPERTIES_H

#include <OniCTypes.h>

Expand Down Expand Up @@ -101,4 +101,4 @@ typedef struct
float z;
} KinectVector3f;

#endif // _KINECT_PROPERTIES_H_
#endif // KINECTPROPERTIES_H
6 changes: 3 additions & 3 deletions Include/Linux-Arm/OniPlatformLinux-Arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_LINUX_ARM_H_
#define _ONI_PLATFORM_LINUX_ARM_H_
#ifndef ONIPLATFORMLINUX_ARM_H
#define ONIPLATFORMLINUX_ARM_H

// Start with Linux-x86, and override what's different
#include "../Linux-x86/OniPlatformLinux-x86.h"
Expand All @@ -32,5 +32,5 @@
#define ONI_PLATFORM ONI_PLATFORM_LINUX_ARM
#define ONI_PLATFORM_STRING "Linux-Arm"

#endif //_ONI_PLATFORM_LINUX_ARM_H_
#endif // ONIPLATFORMLINUX_ARM_H

6 changes: 3 additions & 3 deletions Include/Linux-x86/OniPlatformLinux-x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_LINUX_X86_H_
#define _ONI_PLATFORM_LINUX_X86_H_
#ifndef ONIPLATFORMLINUX_X86_H
#define ONIPLATFORMLINUX_X86_H

//---------------------------------------------------------------------------
// Prerequisites
Expand Down Expand Up @@ -98,5 +98,5 @@
/** Indicates a deprecated function */
#define ONI_API_DEPRECATED(msg) __attribute__((warning("This function is deprecated: " msg)))

#endif //_ONI_PLATFORM_LINUX_X86_H_
#endif // ONIPLATFORMLINUX_X86_H

6 changes: 3 additions & 3 deletions Include/MacOSX/OniPlatformMacOSX.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_MACOSX_H_
#define _ONI_PLATFORM_MACOSX_H_
#ifndef ONIPLATFORMMACOSX_H
#define ONIPLATFORMMACOSX_H

// Start with Linux-x86, and override what's different
#include "../Linux-x86/OniPlatformLinux-x86.h"
Expand Down Expand Up @@ -54,4 +54,4 @@
#undef ONI_THREAD_STATIC
#define ONI_THREAD_STATIC

#endif //_ONI_PLATFORM_MACOSX_H_
#endif // ONIPLATFORMMACOSX_H
6 changes: 3 additions & 3 deletions Include/OniCAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_C_API_H_
#define _ONI_C_API_H_
#ifndef ONICAPI_H
#define ONICAPI_H

#include "OniPlatform.h"
#include "OniCTypes.h"
Expand Down Expand Up @@ -256,4 +256,4 @@ ONI_C_API OniStatus oniSetLogFileOutput(OniBool bFileOutput);
*/
ONI_C_API OniStatus oniSetLogAndroidOutput(OniBool bAndroidOutput);
#endif
#endif // _ONI_C_API_H_
#endif // ONICAPI_H
6 changes: 3 additions & 3 deletions Include/OniCEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_C_ENUMS_H_
#define _ONI_C_ENUMS_H_
#ifndef ONICENUMS_H
#define ONICENUMS_H

/** Possible failure values */
typedef enum
Expand Down Expand Up @@ -81,4 +81,4 @@ enum
ONI_TIMEOUT_FOREVER = -1,
};

#endif // _ONI_C_ENUMS_H_
#endif // ONICENUMS_H
6 changes: 3 additions & 3 deletions Include/OniCProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_C_PROPERTIES_H_
#define _ONI_C_PROPERTIES_H_
#ifndef ONICPROPERTIES_H
#define ONICPROPERTIES_H

// Device properties
enum
Expand Down Expand Up @@ -65,4 +65,4 @@ enum
ONI_DEVICE_COMMAND_SEEK = 1, // OniSeek
};

#endif // _ONI_C_PROPERTIES_H_
#endif // ONICPROPERTIES_H
6 changes: 3 additions & 3 deletions Include/OniCTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_TYPES_H_
#define _ONI_TYPES_H_
#ifndef ONICTYPES_H
#define ONICTYPES_H

#include "OniPlatform.h"
#include "OniCEnums.h"
Expand Down Expand Up @@ -208,4 +208,4 @@ typedef struct
OniStreamHandle stream;
} OniSeek;

#endif // _ONI_TYPES_H_
#endif // ONICTYPES_H
6 changes: 3 additions & 3 deletions Include/OniEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_ENUMS_H_
#define _ONI_ENUMS_H_
#ifndef ONIENUMS_H
#define ONIENUMS_H

namespace openni
{
Expand Down Expand Up @@ -83,4 +83,4 @@ static const int TIMEOUT_FOREVER = -1;

} // namespace openni

#endif // _ONI_ENUMS_H_
#endif // ONIENUMS_H
6 changes: 3 additions & 3 deletions Include/OniPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_H_
#define _ONI_PLATFORM_H_
#ifndef ONIPLATFORM_H
#define ONIPLATFORM_H

// Supported platforms
#define ONI_PLATFORM_WIN32 1
Expand Down Expand Up @@ -69,4 +69,4 @@
#endif // OPENNI2_EXPORT


#endif // _ONI_PLATFORM_H_
#endif // ONIPLATFORM_H
6 changes: 3 additions & 3 deletions Include/OniProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PROPERTIES_H_
#define _ONI_PROPERTIES_H_
#ifndef ONIPROPERTIES_H
#define ONIPROPERTIES_H

namespace openni
{
Expand Down Expand Up @@ -70,4 +70,4 @@ enum
};

} // namespace openni
#endif // _ONI_PROPERTIES_H_
#endif // ONIPROPERTIES_H
6 changes: 3 additions & 3 deletions Include/OniTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_TEST_H_
#define _ONI_TEST_H_
#ifndef ONITEST_H
#define ONITEST_H

#define TEST_DEVICE_NAME "Test" // use with device.open() to create a test device

Expand All @@ -37,4 +37,4 @@ typedef struct TestCommandIssueFrame
void* data;
} TestCommandIssueFrame;

#endif //_ONI_TEST_H_
#endif // ONITEST_H
5 changes: 5 additions & 0 deletions Include/OniVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef ONIVERSION_H
#define ONIVERSION_H

#include "OniPlatform.h"

#define ONI_VERSION_MAJOR 2
Expand All @@ -41,3 +44,5 @@
#define ONI_VERSION_STRING \
ONI_BRIEF_VERSION_STRING "-" \
ONI_PLATFORM_STRING " (" ONI_TIMESTAMP ")"

#endif // ONIVERSION_H
6 changes: 3 additions & 3 deletions Include/OpenNI.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _OPENNI_H_
#define _OPENNI_H_
#ifndef OPENNI_H
#define OPENNI_H

#include "OniPlatform.h"
#include "OniProperties.h"
Expand Down Expand Up @@ -2762,4 +2762,4 @@ void Device::close()

}

#endif // _OPEN_NI_HPP_
#endif // OPENNI_H
6 changes: 3 additions & 3 deletions Include/PS1080.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _PS1080_H_
#define _PS1080_H_
#ifndef PS1080_H
#define PS1080_H

#include <OniCTypes.h>

Expand Down Expand Up @@ -635,4 +635,4 @@ typedef struct XnBist

#pragma pack (pop)

#endif //_PS1080_H_
#endif // PS1080_H
6 changes: 3 additions & 3 deletions Include/PSLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef __XN_PRIME_CLIENT_PROPS_H__
#define __XN_PRIME_CLIENT_PROPS_H__
#ifndef PSLINK_H
#define PSLINK_H

#include <PrimeSense.h>

Expand Down Expand Up @@ -236,4 +236,4 @@ typedef struct XnCommandSetProjectorPulse

#pragma pack (pop)

#endif //__XN_PRIME_CLIENT_PROPS_H__
#endif // PSLINK_H
6 changes: 3 additions & 3 deletions Include/PrimeSense.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _PRIME_SENSE_H_
#define _PRIME_SENSE_H_
#ifndef PRIMESENSE_H
#define PRIMESENSE_H

#include <OniCTypes.h>

Expand Down Expand Up @@ -257,4 +257,4 @@ typedef struct XnCommandDebugData

#pragma pack (pop)

#endif //_PRIME_SENSE_H_
#endif // PRIMESENSE_H
6 changes: 3 additions & 3 deletions Include/Win32/OniPlatformWin32.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_PLATFORM_WIN32_H_
#define _ONI_PLATFORM_WIN32_H_
#ifndef ONIPLATFORMWIN32_H
#define ONIPLATFORMWIN32_H

//---------------------------------------------------------------------------
// Prerequisites
Expand Down Expand Up @@ -136,4 +136,4 @@ typedef unsigned __int64 uint64_t;
#define ONI_API_DEPRECATED(msg) __declspec(deprecated(msg))
#endif

#endif //_ONI_PLATFORM_WIN32_H_
#endif // ONIPLATFORMWIN32_H
6 changes: 3 additions & 3 deletions Samples/ClosestPointViewer/Viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_SAMPLE_VIEWER_H_
#define _ONI_SAMPLE_VIEWER_H_
#ifndef VIEWER_H
#define VIEWER_H

#include "MWClosestPoint/MWClosestPoint.h"
#include <OpenNI.h>
Expand Down Expand Up @@ -98,4 +98,4 @@ class SampleViewer
};


#endif // _ONI_SAMPLE_VIEWER_H_
#endif // VIEWER_H
6 changes: 3 additions & 3 deletions Samples/Common/OniSampleUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* limitations under the License. *
* *
*****************************************************************************/
#ifndef _ONI_SAMPLE_UTILITIES_H_
#define _ONI_SAMPLE_UTILITIES_H_
#ifndef ONISAMPLEUTILITIES_H
#define ONISAMPLEUTILITIES_H

#include <stdio.h>
#include <OpenNI.h>
Expand Down Expand Up @@ -116,4 +116,4 @@ void calculateHistogram(float* pHistogram, int histogramSize, const openni::Vide



#endif // _ONI_SAMPLE_UTILITIES_H_
#endif // ONISAMPLEUTILITIES_H
Loading

0 comments on commit 69dff6e

Please sign in to comment.