From b2b9ef8dafbb807fbc8a834445a5ccb1ae8e9f21 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 18 Mar 2026 12:19:31 +0100 Subject: Use #pragma once --- src/antcc.h | 5 +---- src/c.h | 2 ++ src/c_lex.h | 2 ++ src/c_type.h | 6 ++---- src/ir.h | 2 ++ src/obj.h | 2 ++ src/u_endian.h | 5 +---- src/version.h | 5 ----- 8 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/antcc.h b/src/antcc.h index 1a059c7..4cd8f5d 100644 --- a/src/antcc.h +++ b/src/antcc.h @@ -1,5 +1,4 @@ -#ifndef COMMON_H_ -#define COMMON_H_ +#pragma once #include #include @@ -366,6 +365,4 @@ ushort *utf8to16(uint *ulen, Arena **, const uchar *s, size_t len); uint *utf8to32(uint *ulen, Arena **, const uchar *s, size_t len); int utf8enc(char out[4], uint cp); -#endif /* COMMON_H_ */ - /* vim:set ts=3 sw=3 expandtab: */ diff --git a/src/c.h b/src/c.h index 1d185cb..ddb6832 100644 --- a/src/c.h +++ b/src/c.h @@ -1,3 +1,5 @@ +#pragma once + #include "antcc.h" #include "c_type.h" diff --git a/src/c_lex.h b/src/c_lex.h index ba3e3b5..57226ab 100644 --- a/src/c_lex.h +++ b/src/c_lex.h @@ -1,3 +1,5 @@ +#pragma once + #include "antcc.h" #include "c_type.h" diff --git a/src/c_type.h b/src/c_type.h index df04740..8171366 100644 --- a/src/c_type.h +++ b/src/c_type.h @@ -1,5 +1,5 @@ -#ifndef TYPE_H_ -#define TYPE_H_ +#pragma once + #include "antcc.h" enum qualifier { @@ -173,6 +173,4 @@ extern uchar targ_primalign[]; extern enum typetag targ_sizetype, targ_ptrdifftype, targ_wchartype; extern bool targ_charsigned, targ_bigendian, targ_64bit; -#endif - /* vim:set ts=3 sw=3 expandtab: */ diff --git a/src/ir.h b/src/ir.h index b104b1e..f54c2fb 100644 --- a/src/ir.h +++ b/src/ir.h @@ -1,3 +1,5 @@ +#pragma once + #include "antcc.h" #include "c_type.h" diff --git a/src/obj.h b/src/obj.h index 0dd6f2d..bd34c8a 100644 --- a/src/obj.h +++ b/src/obj.h @@ -1,3 +1,5 @@ +#pragma once + #include "antcc.h" typedef struct ObjFile { diff --git a/src/u_endian.h b/src/u_endian.h index bf4b008..49bbcc2 100644 --- a/src/u_endian.h +++ b/src/u_endian.h @@ -1,5 +1,4 @@ -#ifndef ENDIAN_H_ -#define ENDIAN_H_ +#pragma once #include "antcc.h" extern bool targ_bigendian; @@ -184,6 +183,4 @@ wrf64targ(uchar *p, double x) wr64targ(p, u.i); } -#endif /* ENDIAN_H_ */ - /* vim:set ts=3 sw=3 expandtab: */ diff --git a/src/version.h b/src/version.h index 3abd4a1..24f8aa2 100644 --- a/src/version.h +++ b/src/version.h @@ -1,6 +1,3 @@ -#ifndef VERSION_H_ -#define VERSION_H_ - /* 0.1.10 */ #define ANTCC_VERSION_MAJOR 0 #define ANTCC_VERSION_MINOR 1 @@ -9,5 +6,3 @@ #define XSTR_(...) #__VA_ARGS__ #define XSTR(...) XSTR_(__VA_ARGS__) #define ANTCC_VERSION_STR XSTR(ANTCC_VERSION_MAJOR) "." XSTR(ANTCC_VERSION_MINOR) "." XSTR(ANTCC_VERSION_PATCH) - -#endif -- cgit v1.2.3