# HG changeset patch # User Nobuyasu Oshiro # Date 1340979542 -32400 # Node ID 30c56504824cb3c8bc62bebbee992ecce93182db # Parent a6f51c76dea819d4607921a31b579eef1158550c add screptTest diff -r a6f51c76dea8 -r 30c56504824c regen/src/a.out Binary file regen/src/a.out has changed diff -r a6f51c76dea8 -r 30c56504824c regen/src/grep/grep_jobs.c --- a/regen/src/grep/grep_jobs.c Tue Jun 28 16:25:37 2011 +0900 +++ b/regen/src/grep/grep_jobs.c Fri Jun 29 23:19:02 2012 +0900 @@ -6,10 +6,7 @@ #include #include #include -#include -#include "./include/task.h" -/* typedef unsigned char UCHAR; typedef unsigned char* UCHARP; @@ -24,21 +21,12 @@ int count; char *filename; } *ENVP; -*/ - void filter(UCHARP beg, UCHARP buf, UCHARP end, ENVP env); void predict(UCHARP beg, UCHARP buf, UCHARP end, ENVP env); void reject(UCHARP beg, UCHARP buf, UCHARP end, ENVP env); void accept(UCHARP beg, UCHARP buf, UCHARP end, ENVP env); void s0(UCHARP beg, UCHARP buf, UCHARP end, ENVP env); -void *s0p(void *p); -static void run_start(); -void regiTask(TASKP p, UCHARP beg, UCHARP end, ENVP env); -void *_read(); -void *_exec(); -void *_write(); - #define __REGEX__ "h.s" UCHARP get_line_beg(UCHARP p, UCHARP beg) { @@ -75,16 +63,7 @@ end = beg + size - 1; env->count = 0; - // s0(beg, beg, end, env); - - int iret; - TASK task; - pthread_t thread; - - createTask( &task, beg, buf, env, end); - iret = pthread_create( &thread, NULL, s0p, (void*)&task ); - pthread_join( thread, NULL); - + s0(beg, beg, end, env); munmap(file_mmap, size); return; @@ -178,12 +157,6 @@ return filter(beg, buf, end, env); } -void *s0p(void *p) { - THARGP tharg = (THARGP)p; - filter(tharg->beg, tharg->buf, tharg->end, tharg->env); - return; -} - void filter(UCHARP beg, UCHARP buf, UCHARP end, ENVP env) { static const UCHARP const key = (UCHARP)"h"; int i, len = 1; @@ -286,28 +259,3 @@ beg = buf = ret + 1; return s0(beg, buf, end, env); } - - -static int division = 16; // in kbyte -static void -run_start() { - - -} - -void regiTask(TASKP p, UCHARP beg, UCHARP end, ENVP env){ - - -} - -void *_read(){ - -} - -void *_exec(){ - -} - -void *_write(){ - -} diff -r a6f51c76dea8 -r 30c56504824c scriptTest/search.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scriptTest/search.py Fri Jun 29 23:19:02 2012 +0900 @@ -0,0 +1,17 @@ +#!/usr/bin/python + +import re + + +#f = open('~/testProgram/wiki/enwiki20110526.txt', 'r') +f = open('./test.txt', 'r') + +for line in f: + if re.search('include', line) : print line + + + + + + + diff -r a6f51c76dea8 -r 30c56504824c scriptTest/test.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scriptTest/test.txt Fri Jun 29 23:19:02 2012 +0900 @@ -0,0 +1,21 @@ +#include + +int func() { + return 3; +} + +int main(){ + + int a=3; + int b=4; + int c = a * b * 5; + a = 7; + a = printf("c = %d\n",c); + printf("a = %d\n",a); + printf("sizeof(int) = %ld\n",sizeof(int) ); + printf("sizeof(long) = %ld\n",sizeof(long) ); + printf("sizeof(double) = %ld\n",sizeof(double) ); + printf("sizeof(float) = %ld\n",sizeof(float) ); + return 0; +} +