Commits

Matt Bone committed 114fa02

header file

Comments (0)

Files changed (3)

  * Simple regex matcher from chapter 1 of Beautiful Code by Kernighan
  * and Pike.
  */
-
-int match(char *regexp, char *text);
-int match_here(char *regexp, char *text);
-int match_star(char c, char *regexp, char *text);
-
+#include "regex.h"
 
 int match(char *regexp, char *text) {
   if (regexp[0] == '^') {
+int match(char *regexp, char *text);
+int match_here(char *regexp, char *text);
+int match_star(char c, char *regexp, char *text);

regex/regex_driver.c

 #include <stdio.h>
-
-int match(char *regexp, char *text);
+#include "regex.h"
 
 int main(void) {
   printf("%d\n", match("fuck", "fuck"));