0001 #include <stdlib.h> 0002 #include <stdio.h> 0003 #include <string.h> 0004 0005 #define printString(s) { for (size_t m = strlen(s), k = 0; k < m; k++) printf("%4c", (s)[k]); } 0006 0007 void showProgress ( char*, char*, int, int ); //显示算法进程 0008 void printNext ( int*, int, int ); //打印Next表 0009 int* buildNext ( char* ); //构造Next表 0010 void printBC ( int* ); //打印BC表 0011 int* buildBC ( char* ); //构造BC表 0012 void printGS ( char*, int* ); //打印GS表 0013 int* buildGS ( char* ); //构造GS表