From 6fee970aee27e007cac1b1c7250d8a57f1a9f0a3 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 20 Oct 2021 17:22:53 -0700 Subject: [PATCH] lib/circogen: replace header guards with more modern #pragma once --- lib/circogen/block.h | 7 ++----- lib/circogen/blockpath.h | 7 ++----- lib/circogen/blocktree.h | 7 ++----- lib/circogen/circo.h | 4 +--- lib/circogen/circpos.h | 7 ++----- lib/circogen/circular.h | 4 +--- lib/circogen/deglist.h | 7 ++----- lib/circogen/edgelist.h | 7 ++----- lib/circogen/nodelist.h | 7 ++----- lib/circogen/nodeset.h | 7 ++----- 10 files changed, 18 insertions(+), 46 deletions(-) diff --git a/lib/circogen/block.h b/lib/circogen/block.h index 21cbebe47..fda78e06d 100644 --- a/lib/circogen/block.h +++ b/lib/circogen/block.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef BLOCK_H -#define BLOCK_H - #include typedef struct block block_t; @@ -57,8 +56,6 @@ extern "C" { #define COALESCED(b) (BLK_FLAGS(b)&COALESCED_F) #define SET_COALESCED(b) (BLK_FLAGS(b) |= COALESCED_F) -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/blockpath.h b/lib/circogen/blockpath.h index ba32be489..1fffe3785 100644 --- a/lib/circogen/blockpath.h +++ b/lib/circogen/blockpath.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef BLOCKPATH_H -#define BLOCKPATH_H - #include extern nodelist_t *layout_block(Agraph_t * g, block_t * sn, double); @@ -24,8 +23,6 @@ extern "C" { extern void prTree(Agraph_t * g); #endif -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/blocktree.h b/lib/circogen/blocktree.h index ae387c2cb..388c0b89e 100644 --- a/lib/circogen/blocktree.h +++ b/lib/circogen/blocktree.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef BLOCKTREE_H -#define BLOCKTREE_H - #include #include @@ -24,8 +23,6 @@ extern "C" { extern void print_blocktree(block_t * sn, int depth); #endif -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/circo.h b/lib/circogen/circo.h index a739fe550..259bc26bc 100644 --- a/lib/circogen/circo.h +++ b/lib/circogen/circo.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef CIRCO_H -#define CIRCO_H +#pragma once #include "render.h" @@ -25,4 +24,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif diff --git a/lib/circogen/circpos.h b/lib/circogen/circpos.h index a91ee3824..07c2cd9da 100644 --- a/lib/circogen/circpos.h +++ b/lib/circogen/circpos.h @@ -8,20 +8,17 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef CIRCPOS_H -#define CIRCPOS_H - #include #include extern void circPos(Agraph_t * g, block_t * sn, circ_state *); -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/circular.h b/lib/circogen/circular.h index b199cdeb2..1778c27f0 100644 --- a/lib/circogen/circular.h +++ b/lib/circogen/circular.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef CIRCULAR_H -#define CIRCULAR_H +#pragma once #include "render.h" #include @@ -136,4 +135,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif diff --git a/lib/circogen/deglist.h b/lib/circogen/deglist.h index 244d33252..342bd0ab4 100644 --- a/lib/circogen/deglist.h +++ b/lib/circogen/deglist.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef DEGLIST_H -#define DEGLIST_H - /* List of nodes sorted by increasing degree */ #include @@ -31,8 +30,6 @@ extern "C" { extern void printDeglist(deglist_t *); #endif -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/edgelist.h b/lib/circogen/edgelist.h index fc62380d3..4885e6db1 100644 --- a/lib/circogen/edgelist.h +++ b/lib/circogen/edgelist.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef EDGELIST_H -#define EDGELIST_H - #include typedef struct edgelistitem { @@ -33,8 +32,6 @@ extern "C" { extern void print_edge(edgelist *); #endif -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/nodelist.h b/lib/circogen/nodelist.h index 28fe6ba1c..c0f7dd242 100644 --- a/lib/circogen/nodelist.h +++ b/lib/circogen/nodelist.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef NODELIST_H -#define NODELIST_H - #include typedef struct nodelistitem nodelistitem_t; @@ -53,8 +52,6 @@ extern "C" { extern void printNodelist(nodelist_t * list); #endif -#endif - #ifdef __cplusplus } #endif diff --git a/lib/circogen/nodeset.h b/lib/circogen/nodeset.h index 2790cf2c9..447d6aea8 100644 --- a/lib/circogen/nodeset.h +++ b/lib/circogen/nodeset.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef NODESET_H -#define NODESET_H - #include typedef struct { @@ -35,8 +34,6 @@ extern "C" { extern void printNodeset(nodeset_t *); #endif -#endif - #ifdef __cplusplus } #endif -- 2.40.0