]> granicus.if.org Git - graphviz/commitdiff
lib/ast: replace header guards with more modern #pragma once
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 13 Oct 2021 01:15:49 +0000 (18:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 14 Oct 2021 01:28:13 +0000 (18:28 -0700)
lib/ast/ast.h
lib/ast/compat_unistd.h
lib/ast/error.h
lib/ast/hashkey.h
lib/ast/sfstr.h

index 8a1a076ab0a89b54e92b12f55a6e129d1fd26043..c6595850a0ae0cbdac05a1ce20c778ef59e1e673 100644 (file)
@@ -8,13 +8,12 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#pragma once
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef AST_H
-#define AST_H
-
 #include <sfio/sfio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -85,8 +84,6 @@ extern "C" {
     extern int stresc(char *);
     extern char *strcopy(char *s, const char *t);
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index 76d9b9b64bb36db9da81f92d0759bf6dc99f38e4..36eba84a438f70a630d8769ea5b18eec11e29e6b 100644 (file)
@@ -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
index 2b7714ae4c0fc331a9283f0b6f0b174ed0875bdc..0f06bab21c72e7733f33b27c8dba571f9517074a 100644 (file)
@@ -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 <stdarg.h>
 #include <errno.h>
 
@@ -68,8 +67,6 @@ extern "C" {
 
 #undef PRINTF_LIKE
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index ba1d798bb849acd1f311e1b22df7e25f7b13088b..adb41d42a6b080c799124779c643b9b18a04da1d 100644 (file)
@@ -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
index ee0cbb99cc1b2b80555165bdbafd1c4fda8f6b4e..3dc681ae9f02bd6e17de9e2f8586bfd3d86c9666 100644 (file)
@@ -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 <sfio/sfio.h>
 
 #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