]> granicus.if.org Git - graphviz/commitdiff
replace header guards in lib/common with more modern #pragma once
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 29 Aug 2021 22:38:10 +0000 (15:38 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 4 Sep 2021 02:26:35 +0000 (19:26 -0700)
20 files changed:
lib/common/arith.h
lib/common/color.h
lib/common/colorprocs.h
lib/common/const.h
lib/common/geom.h
lib/common/geomprocs.h
lib/common/globals.h
lib/common/htmllex.h
lib/common/htmltable.h
lib/common/intset.h
lib/common/logic.h
lib/common/macros.h
lib/common/memory.h
lib/common/pointset.h
lib/common/render.h
lib/common/textspan.h
lib/common/timing.h
lib/common/types.h
lib/common/usershape.h
lib/common/utils.h

index 58b3176c8cbc43ed73c881ed33ad2621fa2abf5a..b125f92d26ed38df974830925837c877958f8e9d 100644 (file)
@@ -11,8 +11,7 @@
 /* geometric functions (e.g. on points and boxes) with application to, but
  * no specific dependence on graphs */
 
-#ifndef GV_ARITH_H
-#define GV_ARITH_H
+#pragma once
 
 /* for sincos */
 #ifndef _GNU_SOURCE
@@ -88,5 +87,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index a87864a1273cf8d24126a8cfee25ad1449713c5d..e5d8a8014b5c5df9885bcbc594f983f230d900cc 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_COLOR_H
-#define GV_COLOR_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,4 +45,3 @@ typedef struct color_s {
 #ifdef __cplusplus
 }
 #endif
-#endif
index a574fe0e8012afc46dd67500c7d7192a1cd48a91..7a375ac3270dc377e6ede25c6e9e7b7be735cefb 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_COLORPROCS_H
-#define GV_COLORPROCS_H
+#pragma once
 
 #include "color.h"
 
@@ -25,4 +24,3 @@ extern int colorCvt(gvcolor_t *ocolor, gvcolor_t *ncolor);
 #ifdef __cplusplus
 }
 #endif
-#endif
index dc8117e0805656daf239fef7e24e77ce5876ee37..91fb980977b25d2de23c4b6b6f405083df78e99e 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_CONST_H
-#define GV_CONST_H
+#pragma once
 
 #define SMALLBUF       128
 #define LPAREN         '('
 #define FONTSIZE_MUCH_TOO_SMALL 0.15
 /* fontsize at which text is rendered by a simple line */
 #define FONTSIZE_TOO_SMALL 1.5
-
-#endif
index baf6e884e0ccdcbd516eb3f9ff498161a1aae85a..07487bbc610bae297dbbc778c76cf4424d0c8afb 100644 (file)
@@ -11,8 +11,7 @@
 /* geometric types and macros (e.g. points and boxes) with application to, but
  * no specific dependence on graphs */
 
-#ifndef GV_GEOM_H
-#define GV_GEOM_H
+#pragma once
 
 #include "arith.h"
 
@@ -76,5 +75,3 @@ typedef struct { pointf LL, UR; } boxf;
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index dcbe390effdea4198b4329addfd65bdc24f174c6..245f488d2b0d770726af24932ab3965272513ffb 100644 (file)
@@ -11,8 +11,7 @@
 /* geometric functions (e.g. on points and boxes) with application to, but
  * no specific dependence on graphs */
 
-#ifndef GV_GEOMPROCS_H
-#define GV_GEOMPROCS_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -192,5 +191,3 @@ static inline pointf scale (double c, pointf p)
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index 6b94ea3ca738f77ec7f38febac7000904df41cd1..5cb7be8ef47b8a6b682c7e25e738fbe78a542d37 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GLOBALS_H
-#define GLOBALS_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -112,4 +111,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-#endif
index b71fa97ed5ff2f1d2aa52196f17ca5faf24bd8f9..39dec8da8605283261dc4a81b0ae48b7a8c5e0a9 100644 (file)
@@ -8,13 +8,12 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#pragma once
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef HTMLLEX_H
-#define HTMLLEX_H
-
 #include <agxbuf.h>
 
     extern int initHTMLlexer(char *, agxbuf *, htmlenv_t *);
@@ -23,8 +22,6 @@ extern "C" {
     extern int clearHTMLlexer(void);
     void htmlerror(const char *);
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index 9a4e3493a2ab6af28368591856910a6ba6d92056..6c652a31d0c774be89808c0e19d026aa2f4d2c20 100644 (file)
@@ -8,13 +8,12 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#pragma once
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef TABLE_H
-#define TABLE_H
-
 #define FIXED_FLAG 1
 #define HALIGN_RIGHT (1 << 1)
 #define HALIGN_LEFT (1 << 2)
@@ -173,8 +172,6 @@ extern "C" {
     extern int html_path(node_t * n, port* p, int side, boxf * rv, int *k);
     extern int html_inside(node_t * n, pointf p, edge_t * e);
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index e00e8550ad8ea8f2592932f8612a6aa80428f2f4..5b47bb8cb866f81d659b0898f5fd11efd3926ebd 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef INTSET_H
-#define INTSET_H
+#pragma once
 
 #include <cdt.h>
 
@@ -21,4 +20,3 @@ typedef struct {
 extern Dt_t* openIntSet (void);
 extern void addIntSet (Dt_t*, int);
 extern int inIntSet (Dt_t*, int);
-#endif
index 17f48f77f3558d58244c21e2098a8678c721912d..f5e119f2a0a6bf07f8d1929bde8472dcb684b780 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_LOGIC_H
-#define GV_LOGIC_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -39,6 +38,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif
-
index c0cfd6ac37ff999599be0d4b8b410fc6bb1de90f..a8e73bc33c2b493dc77bad2ecfafc38c296efc00 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_MACROS_H
-#define GV_MACROS_H
+#pragma once
 
 #ifndef NOTUSED
 #define NOTUSED(var) (void) var
@@ -36,5 +35,3 @@
 #define XPAD(d) ((d).x += 4*GAP)
 #define YPAD(d) ((d).y += 2*GAP)
 #define PAD(d)  {XPAD(d); YPAD(d);}
-
-#endif
index a00a308824fbb89ecb003e12b369267fe6eb58f8..15b08e44160f36be24074ac97e669e0d6a8c5b64 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_MEMORY_H
-#define GV_MEMORY_H
+#pragma once
 
 #include <stdlib.h>
 
@@ -50,5 +49,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index 8e8d49b4a0196a4f97ab127cacfbe88efcaf3488..f31412773a654d44597b6b24132e6bffe2404e0f 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef _POINTSET_H
-#define _POINTSET_H 1
+#pragma once
 
 #include <cdt.h>
 #include <geom.h>
@@ -57,5 +56,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* _POINTSET_H */
index 62fe5bfb8debff04dc511f42b725ff7382eb587d..1750b633152cd56cea57ffd970f25ed6354757f2 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_RENDER_H
-#define GV_RENDER_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -161,5 +160,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index c3eebd2d2b8468bdd5422d6f7352e1e7b9d06a15..22deeb45c3faef62467bcd61b9a2efbbe8b4208c 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef TEXTSPAN_H
-#define TEXTSPAN_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -65,4 +64,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-#endif
index a4395db81c4a5d5a880cd333ee8194ce543f2c46..c830fdda77effd52b8259bfcb3e21d78d1e239ba 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_TIMING_H
-#define GV_TIMING_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -21,5 +20,3 @@ extern double elapsed_sec(void);
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index 5c1016bbfd66fdb5f63819ca288ac2843ec76680..5c5d0cb0f69a6131ce2cf686ad50f02cd24f20f2 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GV_TYPES_H
-#define GV_TYPES_H
+#pragma once
 
 /* Define if you want CGRAPH */
 #define WITH_CGRAPH 1
@@ -617,4 +616,3 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 #ifdef __cplusplus
 }
 #endif
-#endif
index 2a7ecced8248f9e167dbf3945212f024b810d0b2..19d48d34d2026479d368af681574d03b81719f5f 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef USERSHAPE_H
-#define USERSHAPE_H
+#pragma once
 
 #include "cdt.h"
 
@@ -63,4 +62,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-#endif
index 2f05868474f06bcf2eee47a05c1e961b1c5deda5..272439b497c89be2ce627dae1b9fc3287103208e 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef _UTILS_H
-#define _UTILS_H 1
+#pragma once
 
 #include "config.h"
 
@@ -121,5 +120,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* _UTILS_H */