Commit c45f6b37 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

Remove leading double underscores from include guard defines

A symbol starting with two leading underscores is reserved for
the compiler/standard library implementation.

Also remove the trailing two double underscores for consistency
and symmetry.
parent 53025a2b
Pipeline #4590 passed with stages
in 7 minutes and 58 seconds
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_ATTRIBUTES_H__
#define __DAV1D_COMMON_ATTRIBUTES_H__
#ifndef DAV1D_COMMON_ATTRIBUTES_H
#define DAV1D_COMMON_ATTRIBUTES_H
#include "config.h"
......@@ -139,4 +139,4 @@ static inline int clzll(const unsigned long long mask) {
}
#endif /* !_MSC_VER */
#endif /* __DAV1D_COMMON_ATTRIBUTES_H__ */
#endif /* DAV1D_COMMON_ATTRIBUTES_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_BITDEPTH_H__
#define __DAV1D_COMMON_BITDEPTH_H__
#ifndef DAV1D_COMMON_BITDEPTH_H
#define DAV1D_COMMON_BITDEPTH_H
#include <stdint.h>
#include <string.h>
......@@ -77,4 +77,4 @@ static inline void pixel_set(pixel *const dst, const int val, const int num) {
name##_8bpc(__VA_ARGS__); \
name##_16bpc(__VA_ARGS__)
#endif /* __DAV1D_COMMON_BITDEPTH_H__ */
#endif /* DAV1D_COMMON_BITDEPTH_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_DUMP_H__
#define __DAV1D_COMMON_DUMP_H__
#ifndef DAV1D_COMMON_DUMP_H
#define DAV1D_COMMON_DUMP_H
#include <stddef.h>
#include <stdint.h>
......@@ -83,4 +83,4 @@ static inline void ac_dump(const int16_t *buf, int w, int h, const char *what)
}
}
#endif /* __DAV1D_COMMON_DUMP_H__ */
#endif /* DAV1D_COMMON_DUMP_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_INTOPS_H__
#define __DAV1D_COMMON_INTOPS_H__
#ifndef DAV1D_COMMON_INTOPS_H
#define DAV1D_COMMON_INTOPS_H
#include <stdint.h>
......@@ -73,4 +73,4 @@ static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
return r - ((v + 1) >> 1);
}
#endif /* __DAV1D_COMMON_INTOPS_H__ */
#endif /* DAV1D_COMMON_INTOPS_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_MEM_H__
#define __DAV1D_COMMON_MEM_H__
#ifndef DAV1D_COMMON_MEM_H
#define DAV1D_COMMON_MEM_H
#include <assert.h>
#include <stdlib.h>
......@@ -80,4 +80,4 @@ static inline void freep(void *ptr) {
}
}
#endif /* __DAV1D_COMMON_MEM_H__ */
#endif /* DAV1D_COMMON_MEM_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_VALIDATE_H__
#define __DAV1D_COMMON_VALIDATE_H__
#ifndef DAV1D_COMMON_VALIDATE_H
#define DAV1D_COMMON_VALIDATE_H
#include <stdio.h>
#include <stdlib.h>
......@@ -56,4 +56,4 @@
#define validate_input(x) validate_input_or_ret(x, )
#endif /* __DAV1D_COMMON_VALIDATE_H__ */
#endif /* DAV1D_COMMON_VALIDATE_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_COMMON_H__
#define __DAV1D_COMMON_H__
#ifndef DAV1D_COMMON_H
#define DAV1D_COMMON_H
#include <stddef.h>
#include <stdint.h>
......@@ -67,4 +67,4 @@ typedef struct Dav1dDataProps {
struct Dav1dUserData user_data; ///< user-configurable data, default NULL members
} Dav1dDataProps;
#endif /* __DAV1D_COMMON_H__ */
#endif /* DAV1D_COMMON_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_DATA_H__
#define __DAV1D_DATA_H__
#ifndef DAV1D_DATA_H
#define DAV1D_DATA_H
#include <stddef.h>
#include <stdint.h>
......@@ -106,4 +106,4 @@ DAV1D_API int dav1d_data_wrap_user_data(Dav1dData *data,
*/
DAV1D_API void dav1d_data_unref(Dav1dData *data);
#endif /* __DAV1D_DATA_H__ */
#endif /* DAV1D_DATA_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_H__
#define __DAV1D_H__
#ifndef DAV1D_H
#define DAV1D_H
#ifdef __cplusplus
extern "C" {
......@@ -201,4 +201,4 @@ DAV1D_API void dav1d_flush(Dav1dContext *c);
}
# endif
#endif /* __DAV1D_H__ */
#endif /* DAV1D_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_HEADERS_H__
#define __DAV1D_HEADERS_H__
#ifndef DAV1D_HEADERS_H
#define DAV1D_HEADERS_H
// Constants from Section 3. "Symbols and abbreviated terms"
#define DAV1D_MAX_CDEF_STRENGTHS 8
......@@ -382,4 +382,4 @@ typedef struct Dav1dFrameHeader {
Dav1dWarpedMotionParams gmv[DAV1D_REFS_PER_FRAME];
} Dav1dFrameHeader;
#endif /* __DAV1D_HEADERS_H__ */
#endif /* DAV1D_HEADERS_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_PICTURE_H__
#define __DAV1D_PICTURE_H__
#ifndef DAV1D_PICTURE_H
#define DAV1D_PICTURE_H
#include <stddef.h>
#include <stdint.h>
......@@ -108,4 +108,4 @@ typedef struct Dav1dPicAllocator {
*/
DAV1D_API void dav1d_picture_unref(Dav1dPicture *p);
#endif /* __DAV1D_PICTURE_H__ */
#endif /* DAV1D_PICTURE_H */
......@@ -26,8 +26,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef __DAVID_SRC_ARM_32_UTIL_S__
#define __DAVID_SRC_ARM_32_UTIL_S__
#ifndef DAVID_SRC_ARM_32_UTIL_S
#define DAVID_SRC_ARM_32_UTIL_S
#include "config.h"
#include "src/arm/asm.S"
......@@ -63,4 +63,4 @@
#endif
.endm
#endif /* __DAVID_SRC_ARM_32_UTIL_S__ */
#endif /* DAVID_SRC_ARM_32_UTIL_S */
......@@ -26,8 +26,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef __DAVID_SRC_ARM_64_UTIL_S__
#define __DAVID_SRC_ARM_64_UTIL_S__
#ifndef DAVID_SRC_ARM_64_UTIL_S
#define DAVID_SRC_ARM_64_UTIL_S
#include "config.h"
#include "src/arm/asm.S"
......@@ -59,4 +59,4 @@
#endif
.endm
#endif /* __DAVID_SRC_ARM_64_UTIL_S__ */
#endif /* DAVID_SRC_ARM_64_UTIL_S */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_ARM_ASM_S__
#define __DAV1D_SRC_ARM_ASM_S__
#ifndef DAV1D_SRC_ARM_ASM_S
#define DAV1D_SRC_ARM_ASM_S
#include "config.h"
......@@ -134,4 +134,4 @@ EXTERN\name:
#define X(x) CONCAT(EXTERN, x)
#endif /* __DAV1D_SRC_ARM_ASM_S__ */
#endif /* DAV1D_SRC_ARM_ASM_S */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_ARM_CPU_H__
#define __DAV1D_SRC_ARM_CPU_H__
#ifndef DAV1D_SRC_ARM_CPU_H
#define DAV1D_SRC_ARM_CPU_H
enum CpuFlags {
DAV1D_ARM_CPU_FLAG_NEON = 1 << 0,
......@@ -34,4 +34,4 @@ enum CpuFlags {
unsigned dav1d_get_cpu_flags_arm(void);
#endif /* __DAV1D_SRC_ARM_CPU_H__ */
#endif /* DAV1D_SRC_ARM_CPU_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_CDEF_H__
#define __DAV1D_SRC_CDEF_H__
#ifndef DAV1D_SRC_CDEF_H
#define DAV1D_SRC_CDEF_H
#include <stddef.h>
#include <stdint.h>
......@@ -69,4 +69,4 @@ bitfn_decls(void dav1d_cdef_dsp_init, Dav1dCdefDSPContext *c);
bitfn_decls(void dav1d_cdef_dsp_init_arm, Dav1dCdefDSPContext *c);
bitfn_decls(void dav1d_cdef_dsp_init_x86, Dav1dCdefDSPContext *c);
#endif /* __DAV1D_SRC_CDEF_H__ */
#endif /* DAV1D_SRC_CDEF_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_CDEF_APPLY_H__
#define __DAV1D_SRC_CDEF_APPLY_H__
#ifndef DAV1D_SRC_CDEF_APPLY_H
#define DAV1D_SRC_CDEF_APPLY_H
#include "common/bitdepth.h"
......@@ -35,4 +35,4 @@
void bytefn(dav1d_cdef_brow)(Dav1dFrameContext *f, pixel *const p[3],
const Av1Filter *lflvl, int by_start, int by_end);
#endif /* __DAV1D_SRC_CDEF_APPLY_H__ */
#endif /* DAV1D_SRC_CDEF_APPLY_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_CDF_H__
#define __DAV1D_SRC_CDF_H__
#ifndef DAV1D_SRC_CDF_H
#define DAV1D_SRC_CDF_H
#include <stdint.h>
......@@ -148,4 +148,4 @@ void dav1d_cdf_thread_update(const Dav1dFrameHeader *hdr, CdfContext *dst,
void dav1d_cdf_thread_wait(CdfThreadContext *cdf);
void dav1d_cdf_thread_signal(CdfThreadContext *cdf);
#endif /* __DAV1D_SRC_CDF_H__ */
#endif /* DAV1D_SRC_CDF_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_CPU_H__
#define __DAV1D_SRC_CPU_H__
#ifndef DAV1D_SRC_CPU_H
#define DAV1D_SRC_CPU_H
#include "config.h"
......@@ -41,4 +41,4 @@
unsigned dav1d_get_cpu_flags(void);
DAV1D_API void dav1d_set_cpu_flags_mask(const unsigned mask);
#endif /* __DAV1D_SRC_CPU_H__ */
#endif /* DAV1D_SRC_CPU_H */
......@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __DAV1D_SRC_CTX_H__
#define __DAV1D_SRC_CTX_H__
#ifndef DAV1D_SRC_CTX_H
#define DAV1D_SRC_CTX_H
#include <stdint.h>
......@@ -88,4 +88,4 @@ union alias8 { uint8_t u8; } ATTR_ALIAS;
default: default_memset(dir, diridx, off, var); break; \
}
#endif /* __DAV1D_SRC_CTX_H__ */
#endif /* DAV1D_SRC_CTX_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment