]> granicus.if.org Git - graphviz/commitdiff
tools: replace header guards with more modern #pragma once
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 20 Oct 2021 04:21:07 +0000 (21:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 21 Oct 2021 01:41:45 +0000 (18:41 -0700)
cmd/tools/convert.h
cmd/tools/graph_generator.h
cmd/tools/matrix_market.h
cmd/tools/mmio.h

index 391efd42fd17080621d8b2962a0a35e9bac385f0..15878ea29152b22a08c2ab767d5befa8f3e5cf53 100644 (file)
@@ -8,13 +8,12 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#pragma once
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef CONVERT_H
-#define CONVERT_H
-
 #include "config.h"
 
 #include <stdio.h>
@@ -29,8 +28,6 @@ extern "C" {
     extern Agraph_t *gxl_to_gv(FILE *);
 #endif
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index f964f015a7faade65ff9badc8be7460817007ca1..dce4f3f45d8afa5b2c1a37ea68b08f807a85f58d 100644 (file)
@@ -8,8 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
-#ifndef GRAPH_GENERATOR_H
-#define GRAPH_GENERATOR_H
+#pragma once
 
 typedef void (*edgefn)(int, int);
 
@@ -36,4 +35,3 @@ typedef struct treegen_s treegen_t;
 extern treegen_t* makeTreeGen (int);
 extern void makeRandomTree (treegen_t*, edgefn);
 extern void freeTreeGen(treegen_t*);
-#endif
index 6b2ab723854570f04cb75318c1838c17224f6d70..c21d9441db1d2617f4a932de687166d2ed7fda97 100644 (file)
@@ -7,8 +7,8 @@
  *
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
-#ifndef MATRIX_MARKET_H
-#define MATRIX_MARKET_H
+
+#pragma once
 
 #include "mmio.h"
 #include <sparse/SparseMatrix.h>
@@ -16,5 +16,3 @@ int mm_get_type(MM_typecode typecode);
 void SparseMatrix_export_matrix_market(FILE * file, SparseMatrix A,
                                       char *comment);
 SparseMatrix SparseMatrix_import_matrix_market(FILE * f, int format);
-
-#endif
index 6ba35a2d3755c7bc68866a7e6777ff4c1a6585a3..bd8ae939363d89afc0c89bb12de84f2b671f45af 100644 (file)
@@ -15,8 +15,7 @@
 *
 */
 
-#ifndef MM_IO_H
-#define MM_IO_H
+#pragma once
 
 #define MM_MAX_LINE_LENGTH 100025
 #define MatrixMarketBanner "%%MatrixMarket"
@@ -137,7 +136,3 @@ int mm_read_mtx_crd_entry(FILE * f, int *I, int *J, double *realpart,
 int mm_read_unsymmetric_sparse(const char *fname, int *M_, int *N_,
                               int *nz_, double **val_, int **I_,
                               int **J_);
-
-
-
-#endif