shithub: puzzles

Download patch

ref: 3c3468355f8cf3dd644058ab239b948f8facebfa
parent: d7b931824b452a6b70a599c69f4f1843f1b2daa5
author: Ben Harris <[email protected]>
date: Sat Feb 18 18:07:44 EST 2023

Use unreserved macro names for multiple-include protection

Some headers used macros named like _THING_H for multiple-include
protection.  That style of name is reserved in ISO C, though, so I've
replaced it with PUZZLES_THING_H which is my favourite of the other
styles in use.

--- a/loopgen.h
+++ b/loopgen.h
@@ -2,8 +2,8 @@
  * loopgen.h: interface file for loop generation functions for grid.[ch].
  */
 
-#ifndef _LOOPGEN_H
-#define _LOOPGEN_H
+#ifndef PUZZLES_LOOPGEN_H
+#define PUZZLES_LOOPGEN_H
 
 #include "puzzles.h"
 #include "grid.h"
--- a/penrose.h
+++ b/penrose.h
@@ -10,8 +10,8 @@
  * called with each tile in turn: you choose how many times to recurse.
  */
 
-#ifndef _PENROSE_H
-#define _PENROSE_H
+#ifndef PUZZLES_PENROSE_H
+#define PUZZLES_PENROSE_H
 
 #ifndef PHI
 #define PHI 1.6180339887