Make lib/pattern.c a stand-alone library
authorTomohiro Kusumi <tkusumi@tuxera.com>
Fri, 14 Apr 2017 21:06:21 +0000 (00:06 +0300)
committerJens Axboe <axboe@fb.com>
Wed, 26 Apr 2017 18:43:10 +0000 (12:43 -0600)
lib/pattern.c not having dependency on fio.h enables it to be
a stand-alone library, which is useful for debugging purpose.
In fact, most of the files under lib/ directory do things this way.

This requires the previous commit.

--
 # cat ./test6.c
 #include <stdio.h>
 #include "lib/pattern.h"
 int main(void) {
         /* just to see if it compiles */
         paste_format_inplace(NULL, 0, NULL, 0, NULL);
         return 0;
 }
 # gcc -Wall -g ./test6.c ./lib/pattern.c ./lib/strntol.c

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
lib/pattern.c

index b8ae8090f2a66ab3f7ab7ec5ccde9c6f0a15f510..0aeb935266fa129d2995a4c49f94b0f0c76b1bc2 100644 (file)
@@ -1,6 +1,13 @@
-#include "fio.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+
 #include "strntol.h"
 #include "pattern.h"
 #include "strntol.h"
 #include "pattern.h"
+#include "../minmax.h"
 #include "../oslib/strcasestr.h"
 
 /**
 #include "../oslib/strcasestr.h"
 
 /**