#include #include #include #include #include #include #include #include #include #include #include #include "rabincarp.h" int file_open( const char *fname ) { int fd; fd = open( fname, O_RDONLY ); if ( fd == -1 ) { printf("Couldn open file %s\n", fname); return -1; } return fd; } int file_read( int fd, char *buf, int size ) { int ret; if ( size < 1 ) return -1; ret = (int)read( fd, buf, size ); return ret; } int file_seek( int fd, off_t pos ) { off_t rc; if (fd<1) { return -1; } rc = lseek( fd, pos, SEEK_SET ); if (rc == -1) return -1; return 0; } int file_close( int fd ) { close( fd ); return 0; } typedef struct match_params { char *fname; char *match_str; int verbose; } match_params; void helper( char *progname ) { printf("Usage: %s [OPTS]\n\n" " -f - input file\n" " -m - match string\n" " -v - more extra info in output\n" "Version: 0.0.1 \n" "\n" , progname); } int main(int argc, const char *argv[]) { return 0; }