changeset 40:c25b75f764a7

add Regex.h
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Mon, 02 Mar 2015 22:18:37 +0900
parents 120c8116e831
children e1c5ecbf8836
files regex/Regex.h regex/main.cc
diffstat 2 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regex/Regex.h	Mon Mar 02 22:18:37 2015 +0900
@@ -0,0 +1,13 @@
+typedef struct result {
+    int matchNum;
+    int matchLineNum;
+    char* matchLine;
+} Result, *ResultPtr;
+
+typedef struct bmData {
+    int* skipTable;
+    char* readText;
+    int readTextLen;
+    char* searchWord;
+    int searchWordLen;
+} BMData, *BMDataPtr;
--- a/regex/main.cc	Mon Mar 02 22:15:55 2015 +0900
+++ b/regex/main.cc	Mon Mar 02 22:18:37 2015 +0900
@@ -7,23 +7,10 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <fcntl.h>
+#include "Regex.h"
 
 const char *usr_help_str = "Usage: ./regex [-file filename] [-sw SearchWord]\n";
 
-typedef struct result {
-    int matchNum;
-    int matchLineNum;
-    char* matchLine;
-} Result, *ResultPtr;
-
-typedef struct bmData {
-    int* skipTable;
-    char* readText;
-    int readTextLen;
-    char* searchWord;
-    int searchWordLen;
-} BMData, *BMDataPtr;
-
 //Boyer Moore法に使用するテーブルを作成
 int *
 createBMskiptable(BMDataPtr bmdata)