aboutsummaryrefslogtreecommitdiff
path: root/findloop.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-11-13 21:44:02 +0000
committerSimon Tatham <anakin@pobox.com>2018-11-13 21:48:24 +0000
commita550ea0a47374705a37f36b0f05ffe9e4c8161fb (patch)
treea4664ac4d90cdeb581ddd2bf41ccda7b0d45855c /findloop.c
parent064da876828ea3079d5d7be5849b693f4d55364b (diff)
downloadpuzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.zip
puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.gz
puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.bz2
puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.xz
Replace TRUE/FALSE with C99 true/false throughout.
This commit removes the old #defines of TRUE and FALSE from puzzles.h, and does a mechanical search-and-replace throughout the code to replace them with the C99 standard lowercase spellings.
Diffstat (limited to 'findloop.c')
-rw-r--r--findloop.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/findloop.c b/findloop.c
index 30c128c..501c3f9 100644
--- a/findloop.c
+++ b/findloop.c
@@ -80,7 +80,7 @@ bool findloop_run(struct findloopstate *pv, int nvertices,
pv[v].parent = root;
pv[v].child = -2;
pv[v].sibling = -1;
- pv[v].visited = FALSE;
+ pv[v].visited = false;
}
pv[root].child = -1;
nedges = 0;
@@ -98,7 +98,7 @@ bool findloop_run(struct findloopstate *pv, int nvertices,
u = v;
while (1) {
if (!pv[u].visited) {
- pv[u].visited = TRUE;
+ pv[u].visited = true;
/*
* Enumerate the neighbours of u, and any that are
@@ -169,12 +169,12 @@ bool findloop_run(struct findloopstate *pv, int nvertices,
debug(("--- begin indexing pass\n"));
index = 0;
for (v = 0; v < nvertices; v++)
- pv[v].visited = FALSE;
- pv[root].visited = TRUE;
+ pv[v].visited = false;
+ pv[root].visited = true;
u = pv[root].child;
while (1) {
if (!pv[u].visited) {
- pv[u].visited = TRUE;
+ pv[u].visited = true;
/*
* Index this node.
@@ -239,12 +239,12 @@ bool findloop_run(struct findloopstate *pv, int nvertices,
debug(("--- begin min-max pass\n"));
nbridges = 0;
for (v = 0; v < nvertices; v++)
- pv[v].visited = FALSE;
+ pv[v].visited = false;
u = pv[root].child;
- pv[root].visited = TRUE;
+ pv[root].visited = true;
while (1) {
if (!pv[u].visited) {
- pv[u].visited = TRUE;
+ pv[u].visited = true;
/*
* Look for vertices reachable directly from u, including