/* "Enziyyyme21" Text File digestion Tool:Ver1.021 ;*/ #include ; #include ; #include ; #include ; #include ; #include ; /*Outside Function, is 4 kinds, 1)discover1st(); 2)discoverend(); 3)closeend(); 4)between2linekw1st(); ;*/ int discover1st(char *buf,char *keyword){ /*char buf[257], keyword[257]; strcpy(buf,str1); strcpy(keyword,str2); int bufferlength,keywordlength; bufferlength=strlen(buf); keywordlength=strlen(keyword);*/ /*printf("%d\n",keywordlength); printf("%s%s\n",buf,keyword); exit(1);*/ int i,j; int keychar1st; keychar1st=-1; /* for(i=0;i<=bufferlength-1+1+1;i++)/*'+1+1'is '\n+\0' character No.; { if (buf[i]==keyword[0]) { for (j=0 ;j<=keywordlength-1;j++) { /*For example, 'abcde', keyword[0]='a' and keyword[4]='e';*/ /* if (buf[i+j]!=keyword[j] ) {keychar1st=-1; goto nomatchranaway; } } /*printf("atta!\n"); exit(1);*/ /* keychar1st=i; goto oncediscover; } nomatchranaway:; } oncediscover:;*/ /*first keyword's keyword[0] 's location sberch,*/ /*ignore after second keywords of one lines.;*/ /*printf("%d\n",keychar1st); exit(1);*/ for(i=0;*(buf+i)!='\0';i++) { if (*(buf+i)==*(keyword+0)){ for(j=0;*(keyword+j)!='\0';j++){ if(*(buf+i+j)!=*(keyword+j)){ keychar1st=-1; goto nomatchranaway; } } keychar1st=i; goto oncediscover; } nomatchranaway:; } oncediscover:; return(keychar1st); } int discoverend(char buf[],char keyword[]) { int keywordlength; keywordlength=strlen(keyword); /*;*/ return(discover1st(buf,keyword)+keywordlength); } void closeend(void) { /*;*/ exit(1); } int bitween2linekw1st(char chstr[],char keyword[]) { char newkeywordforserch[257]; int alpha,chno,kl,maincheck; /*kl=keywordlength;*/ for(alpha=1;alpha<=kl-1;alpha++)/*alpha,new keyword kinds No.;*/ { for(chno=1;chno<=kl;chno++) { if(chno