From 53af51b44a03c9ddd26fb5806ad047c51eb0e022 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 9 Oct 2021 21:12:10 -0700 Subject: [PATCH] libgvc: replace header guards with more modern #pragma once --- lib/gvc/gvc.h | 5 +---- lib/gvc/gvcext.h | 7 +------ lib/gvc/gvcint.h | 4 +--- lib/gvc/gvcjob.h | 4 +--- lib/gvc/gvcommon.h | 4 +--- lib/gvc/gvconfig.h | 4 +--- lib/gvc/gvcproc.h | 5 +---- lib/gvc/gvio.h | 5 +---- lib/gvc/gvplugin.h | 4 +--- lib/gvc/gvplugin_device.h | 4 +--- lib/gvc/gvplugin_layout.h | 4 +--- lib/gvc/gvplugin_loadimage.h | 4 +--- lib/gvc/gvplugin_render.h | 4 +--- lib/gvc/gvplugin_textlayout.h | 4 +--- 14 files changed, 14 insertions(+), 48 deletions(-) diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h index 2a085fba0..b8cec4553 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVC_H -#define GVC_H +#pragma once #include @@ -128,5 +127,3 @@ GVC_API int gvToolTred(graph_t *g); #ifdef __cplusplus } #endif - -#endif /* GVC_H */ diff --git a/lib/gvc/gvcext.h b/lib/gvc/gvcext.h index 0f7029b42..9a6b77612 100644 --- a/lib/gvc/gvcext.h +++ b/lib/gvc/gvcext.h @@ -10,8 +10,7 @@ /* Common header used by both clients and plugins */ -#ifndef GVCEXT_H -#define GVCEXT_H +#pragma once #ifdef __cplusplus extern "C" { @@ -67,7 +66,3 @@ extern lt_symlist_t lt_preloaded_symbols[]; #ifdef __cplusplus } #endif - - - -#endif diff --git a/lib/gvc/gvcint.h b/lib/gvc/gvcint.h index 86ec3404f..ed48b153d 100644 --- a/lib/gvc/gvcint.h +++ b/lib/gvc/gvcint.h @@ -10,8 +10,7 @@ /* Common header used by both clients and plugins */ -#ifndef GVCINT_H -#define GVCINT_H +#pragma once #ifdef __cplusplus extern "C" { @@ -153,4 +152,3 @@ extern void gvFreeCloneGVC (GVC_t *); #ifdef __cplusplus } #endif -#endif /* GVCINT_H */ diff --git a/lib/gvc/gvcjob.h b/lib/gvc/gvcjob.h index 934ccea00..c9b3690ac 100644 --- a/lib/gvc/gvcjob.h +++ b/lib/gvc/gvcjob.h @@ -10,8 +10,7 @@ /* Common header used by both clients and plugins */ -#ifndef GVCJOB_H -#define GVCJOB_H +#pragma once #ifdef __cplusplus extern "C" { @@ -371,4 +370,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVCJOB_H */ diff --git a/lib/gvc/gvcommon.h b/lib/gvc/gvcommon.h index c0db6191a..0edb4edea 100644 --- a/lib/gvc/gvcommon.h +++ b/lib/gvc/gvcommon.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVCOMMON_H -#define GVCOMMON_H +#pragma once #ifdef __cplusplus extern "C" { @@ -34,4 +33,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVCOMMON_H */ diff --git a/lib/gvc/gvconfig.h b/lib/gvc/gvconfig.h index 7e9a95b67..9db1e802d 100644 --- a/lib/gvc/gvconfig.h +++ b/lib/gvc/gvconfig.h @@ -10,8 +10,7 @@ /* Header used by plugins */ -#ifndef GVCONFIG_H -#define GVCONFIG_H +#pragma once #include "gvplugin.h" @@ -24,4 +23,3 @@ extern void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplug #ifdef __cplusplus } #endif -#endif /* GVCONFIG_H */ diff --git a/lib/gvc/gvcproc.h b/lib/gvc/gvcproc.h index 04ba2195f..d3ce7feab 100644 --- a/lib/gvc/gvcproc.h +++ b/lib/gvc/gvcproc.h @@ -10,8 +10,7 @@ /* This is the public header for the callers of libgvc */ -#ifndef GVCPROC_H -#define GVCPROC_H +#pragma once /* these are intended to be private entry points - see gvc.h for the public ones */ @@ -119,5 +118,3 @@ void gv_argvlist_set_item(gv_argvlist_t *list, int index, char *item); void gv_argvlist_reset(gv_argvlist_t *list); void gv_argvlist_free(gv_argvlist_t *list); - -#endif /* GVCPROC_H */ diff --git a/lib/gvc/gvio.h b/lib/gvc/gvio.h index fadc431f7..1be27c037 100644 --- a/lib/gvc/gvio.h +++ b/lib/gvc/gvio.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVDEVICE_H -#define GVDEVICE_H +#pragma once #include "gvcjob.h" @@ -54,5 +53,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* GVDEVICE_H */ diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index 2dc00d08b..4aa2871e9 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -10,8 +10,7 @@ /* Header used by plugins */ -#ifndef GVPLUGIN_H -#define GVPLUGIN_H +#pragma once #ifdef __cplusplus extern "C" { @@ -57,4 +56,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVPLUGIN_H */ diff --git a/lib/gvc/gvplugin_device.h b/lib/gvc/gvplugin_device.h index e10ab2c7e..60c4ea346 100644 --- a/lib/gvc/gvplugin_device.h +++ b/lib/gvc/gvplugin_device.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVDEVICE_PLUGIN_H -#define GVDEVICE_PLUGIN_H +#pragma once #include "types.h" #include "gvplugin.h" @@ -28,4 +27,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVDEVICE_PLUGIN_H */ diff --git a/lib/gvc/gvplugin_layout.h b/lib/gvc/gvplugin_layout.h index 84d37610c..9bbb155ee 100644 --- a/lib/gvc/gvplugin_layout.h +++ b/lib/gvc/gvplugin_layout.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVPLUGIN_LAYOUT_H -#define GVPLUGIN_LAYOUT_H +#pragma once #include "types.h" #include "gvplugin.h" @@ -27,4 +26,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVPLUGIN_LAYOUT_H */ diff --git a/lib/gvc/gvplugin_loadimage.h b/lib/gvc/gvplugin_loadimage.h index a73f9aea2..227b93610 100644 --- a/lib/gvc/gvplugin_loadimage.h +++ b/lib/gvc/gvplugin_loadimage.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVPLUGIN_IMAGELOAD_H -#define GVPLUGIN_IMAGELOAD_H +#pragma once #include "types.h" #include "gvplugin.h" @@ -47,4 +46,3 @@ GVPLUGIN_LOADIMAGE_API void gvusershape_file_release(usershape_t *us); #ifdef __cplusplus } #endif -#endif /* GVPLUGIN_IMAGELOAD_H */ diff --git a/lib/gvc/gvplugin_render.h b/lib/gvc/gvplugin_render.h index 232c895c6..342adbf39 100644 --- a/lib/gvc/gvplugin_render.h +++ b/lib/gvc/gvplugin_render.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVPLUGIN_RENDER_H -#define GVPLUGIN_RENDER_H +#pragma once #include "types.h" #include "gvplugin.h" @@ -58,4 +57,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVPLUGIN_RENDER_H */ diff --git a/lib/gvc/gvplugin_textlayout.h b/lib/gvc/gvplugin_textlayout.h index 645a0b0ec..47c40c543 100644 --- a/lib/gvc/gvplugin_textlayout.h +++ b/lib/gvc/gvplugin_textlayout.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef GVPLUGIN_TEXTLAYOUT_H -#define GVPLUGIN_TEXTLAYOUT_H +#pragma once #include "types.h" #include "gvplugin.h" @@ -27,4 +26,3 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* GVPLUGIN_TEXTLAYOUT_H */ -- 2.40.0