Browse code

Move some score definitions into header

John Hawthorn authored on 21/09/2014 21:12:47
Showing 2 changed files

  • match.c index 7e56072..5635895 100644
  • match.h index b6d19b1..941b62e 100644
... ...
@@ -24,9 +24,6 @@ int has_match(const char *needle, const char *haystack){
24 24
 }
25 25
 
26 26
 #define max(a, b) (((a) > (b)) ? (a) : (b))
27
-typedef double score_t;
28
-#define SCORE_MAX INFINITY
29
-#define SCORE_MIN -INFINITY
30 27
 
31 28
 /* print one of the internal matrices */
32 29
 void mat_print(score_t *mat, const char *needle, const char *haystack){
... ...
@@ -1,8 +1,12 @@
1 1
 #ifndef MATCH_H
2 2
 #define MATCH_H MATCH_H
3 3
 
4
+typedef double score_t;
5
+#define SCORE_MAX INFINITY
6
+#define SCORE_MIN -INFINITY
7
+
4 8
 int has_match(const char *needle, const char *haystack);
5
-double match_positions(const char *needle, const char *haystack, size_t *positions);
6
-double match(const char *needle, const char *haystack);
9
+score_t match_positions(const char *needle, const char *haystack, size_t *positions);
10
+score_t match(const char *needle, const char *haystack);
7 11
 
8 12
 #endif