aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-03-18 12:19:31 +0100
committerlemon <lsof@mailbox.org>2026-03-18 12:19:31 +0100
commitb2b9ef8dafbb807fbc8a834445a5ccb1ae8e9f21 (patch)
tree393887847fe653602b018b7a95e6f20ef6546a7d /src
parent3692c5caa02f1865cf66ce5640734310e42d51c9 (diff)
Use #pragma once
Diffstat (limited to 'src')
-rw-r--r--src/antcc.h5
-rw-r--r--src/c.h2
-rw-r--r--src/c_lex.h2
-rw-r--r--src/c_type.h6
-rw-r--r--src/ir.h2
-rw-r--r--src/obj.h2
-rw-r--r--src/u_endian.h5
-rw-r--r--src/version.h5
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 <stdarg.h>
#include <stddef.h>
@@ -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