Copy Of Ajarn Program

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Copy Of Ajarn Program as PDF for free.

More details

  • Words: 141
  • Pages: 2
#include<stdio.h> #include<string.h> #define size 100 int compare(char *line); int main() { file *codefile, *list; //file *codefile; char chset[size], *codeline, filename[size]; //char *chset, *codeline; int i=0, counter=0; /*introduction message*/ printf("\t================================================================ ============\n"); printf("\tthis is the program of counting number of webpage wroted in thai language.\n"); printf("\tauthored by aesah hayeemad 3coe prince of songkhla university\n"); printf("\tsupervisor : dr. aree theerapaabsearee\n"); printf("\tenjoy this program now! (hope you like it!)\n"); printf("\t================================================================ ============\n"); list=fopen("list.txt","r"); if(list!=null) { fscanf(list,"%s",filename); while(!feof(list)) { if(filename==null) { printf("error"); exit(1); } if(filename!=null) { codefile=fopen(filename,"r"); if(codefile==null) printf("error read file!"); else { fscanf(codefile,"%s",chset); while(!feof(codefile)) { if(compare(chset)) counter++; fscanf(codefile,"%s",chset); } } }

fclose(codefile); //if filename

fscanf(list,"%s",filename); }//while fclose(list); printf("\n\tthis is counter = %d\n\n",counter);

}

} return 0;

int compare(char *line) { /*char c_line[size]; c_line=line;*/ if (strstr(line,"tis-620")!=null) return 1; else if (strstr(line,"windows-874")!=null) return 1; //else if (strstr(line,"utf-8")) //return 1; else if (strstr(line,"iso-8859-11")!=null) return 1; else return 0; }

Related Documents

Copy Of Ajarn Program
November 2019 2
Copy Of Copy Of Flip
November 2019 71
Copy Of Copy Of Report...
October 2019 72
Ajarn Somjate Srirabai
November 2019 2