From: Matthew Fernandez Date: Wed, 13 Oct 2021 01:15:49 +0000 (-0700) Subject: lib/ast: replace header guards with more modern #pragma once X-Git-Tag: 2.49.2~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca3e0213c986a040a58777a6b0babd45d5af7c24;p=graphviz lib/ast: replace header guards with more modern #pragma once --- diff --git a/lib/ast/ast.h b/lib/ast/ast.h index 8a1a076ab..c6595850a 100644 --- a/lib/ast/ast.h +++ b/lib/ast/ast.h @@ -8,13 +8,12 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif -#ifndef AST_H -#define AST_H - #include #include #include @@ -85,8 +84,6 @@ extern "C" { extern int stresc(char *); extern char *strcopy(char *s, const char *t); -#endif - #ifdef __cplusplus } #endif diff --git a/lib/ast/compat_unistd.h b/lib/ast/compat_unistd.h index 76d9b9b64..36eba84a4 100644 --- a/lib/ast/compat_unistd.h +++ b/lib/ast/compat_unistd.h @@ -8,8 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#ifndef UNISTD_H -#define UNISTD_H +#pragma once #ifdef __cplusplus extern "C" { @@ -41,5 +40,3 @@ extern char* getcwd (char*, int); #ifdef __cplusplus } #endif - -#endif diff --git a/lib/ast/error.h b/lib/ast/error.h index 2b7714ae4..0f06bab21 100644 --- a/lib/ast/error.h +++ b/lib/ast/error.h @@ -8,6 +8,8 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif @@ -16,9 +18,6 @@ extern "C" { * standalone mini error interface */ -#ifndef _ERROR_H -#define _ERROR_H - #include #include @@ -68,8 +67,6 @@ extern "C" { #undef PRINTF_LIKE -#endif - #ifdef __cplusplus } #endif diff --git a/lib/ast/hashkey.h b/lib/ast/hashkey.h index ba1d798bb..adb41d42a 100644 --- a/lib/ast/hashkey.h +++ b/lib/ast/hashkey.h @@ -8,6 +8,8 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif @@ -20,9 +22,6 @@ extern "C" { * digit args passed as HASHKEYN('2') */ -#ifndef _HASHKEY_H -#define _HASHKEY_H - #define HASHKEYMAX 6 #define HASHKEYBIT 5 #define HASHKEYOFF ('a'-1) @@ -48,8 +47,6 @@ extern "C" { #undef extern -#endif - #ifdef __cplusplus } #endif diff --git a/lib/ast/sfstr.h b/lib/ast/sfstr.h index ee0cbb99c..3dc681ae9 100644 --- a/lib/ast/sfstr.h +++ b/lib/ast/sfstr.h @@ -8,6 +8,8 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#pragma once + #ifdef __cplusplus extern "C" { #endif @@ -16,9 +18,6 @@ extern "C" { * macro interface for sfio write strings */ -#ifndef _SFSTR_H -#define _SFSTR_H - #include #define sfstropen() sfnew((Sfio_t*)0,(char*)0,-1,-1,SF_WRITE|SF_STRING) @@ -26,8 +25,6 @@ extern "C" { #define sfstruse(f) (sfputc(f,0), (char*)((f)->next = (f)->data) ) -#endif - #ifdef __cplusplus } #endif