diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | choices.c | 2 | ||||
-rw-r--r-- | choices.h | 4 | ||||
-rw-r--r-- | fzy.c | 2 | ||||
-rw-r--r-- | fzytest.c | 2 | ||||
-rw-r--r-- | match.c | 2 | ||||
-rw-r--r-- | match.h (renamed from fzy.h) | 4 |
7 files changed, 11 insertions, 7 deletions
@@ -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 @@ -2,7 +2,7 @@ #include <stdlib.h> #include "choices.h" -#include "fzy.h" +#include "match.h" #define INITIAL_CAPACITY 1 @@ -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 @@ -5,7 +5,7 @@ #include <ctype.h> #include <getopt.h> -#include "fzy.h" +#include "match.h" #include "tty.h" #include "choices.h" @@ -1,5 +1,5 @@ #include <stdio.h> -#include "fzy.h" +#include "match.h" int testsrun = 0, testsfailed = 0, assertionsrun = 0; @@ -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){ @@ -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); |