diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-09-14 19:42:43 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-09-14 20:53:52 -0700 |
commit | 854c2bdd159b5ca1d10db2603fcb448ebe8fdcba (patch) | |
tree | fcbbcded7368dd6bfbfefcc79031914245ead7fb | |
parent | eef1eb52777c21e55ebc030b3ac6eb25fb4411ba (diff) |
Cleanup headers
-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); |