summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--choices.c2
-rw-r--r--choices.h4
-rw-r--r--fzy.c2
-rw-r--r--fzytest.c2
-rw-r--r--match.c2
-rw-r--r--match.h (renamed from fzy.h)4
7 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index e997299..37f9b54 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ test: fzytest
fzy: fzy.o match.o tty.o choices.o
$(CC) $(CFLAGS) $(CCFLAGS) -o $@ $^
-%.o: %.c fzy.h
+%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
install: fzy
diff --git a/choices.c b/choices.c
index bd3f016..9681de9 100644
--- a/choices.c
+++ b/choices.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include "choices.h"
-#include "fzy.h"
+#include "match.h"
#define INITIAL_CAPACITY 1
diff --git a/choices.h b/choices.h
index d11fbac..e87d2b7 100644
--- a/choices.h
+++ b/choices.h
@@ -1,3 +1,6 @@
+#ifndef CHOICES_H
+#define CHOICES_H CHOICES_H
+
typedef struct {
size_t capacity;
size_t size;
@@ -20,3 +23,4 @@ double choices_getscore(choices_t *c, size_t n);
void choices_prev(choices_t *c);
void choices_next(choices_t *c);
+#endif
diff --git a/fzy.c b/fzy.c
index b1abd80..1168b2a 100644
--- a/fzy.c
+++ b/fzy.c
@@ -5,7 +5,7 @@
#include <ctype.h>
#include <getopt.h>
-#include "fzy.h"
+#include "match.h"
#include "tty.h"
#include "choices.h"
diff --git a/fzytest.c b/fzytest.c
index 3842920..cc20d0e 100644
--- a/fzytest.c
+++ b/fzytest.c
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "fzy.h"
+#include "match.h"
int testsrun = 0, testsfailed = 0, assertionsrun = 0;
diff --git a/match.c b/match.c
index 125106d..2721179 100644
--- a/match.c
+++ b/match.c
@@ -5,7 +5,7 @@
#include <float.h>
#include <math.h>
-#include "fzy.h"
+#include "match.h"
int has_match(const char *needle, const char *haystack){
while(*needle){
diff --git a/fzy.h b/match.h
index 67f182b..b6d19b1 100644
--- a/fzy.h
+++ b/match.h
@@ -1,5 +1,5 @@
-#ifndef FZY_H
-#define FZY_H FZY_H
+#ifndef MATCH_H
+#define MATCH_H MATCH_H
int has_match(const char *needle, const char *haystack);
double match_positions(const char *needle, const char *haystack, size_t *positions);