source: liacs/da/fibo_queue/leestekst.cc@ 22

Last change on this file since 22 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 2.3 KB
Line 
1#include "leestekst.h"
2bool sf36(ifstream&sv23,char*sv35,int sv101){int sv82;char sv26;sv82=0;
3sv26=sv23.get();while((!sv23.eof())&&(sv82<sv101-1)&&(sv26!=EOL))
4{sv35[sv82]=sv26;sv82++;sv26=sv23.get();}sv35[sv82]=EOS;
5if((sv82>0)||(!sv23.eof()))return true;else return false;}
6bool sf37(char*sv102,int sv103,char*sv35,int&sv104){int sv109,pos;bool sv53,
7sv110;sv109=strlen(sv35);sv53=false;while(!sv53&&(sv104<=sv109-sv103)){
8sv110=true;pos=0;while(sv110&&(pos<sv103)){if(sv102[pos]==sv35[sv104+pos])pos++;
9else sv110=false;}if(sv110)sv53=true;else sv104++;}return sv53;}
10int sf38(ifstream&sv23,char*sv102,int sv103,char*sv35,
11int sv101,int&sv105,int&sv104){bool sv53,sv65;sv53=sf37(sv102,sv103,sv35,sv104);
12while(!sv53&&(sv65=sf36(sv23,sv35,sv101))){sv105++;sv104=0;
13sv53=sf37(sv102,sv103,sv35,sv104);}return sv53;}bool sf39(char*sv106)
14{ifstream sv23;bool sv111;char sv26;sv23.open(sv106);if(sv23){sv26=sv23.get();
15if(!sv23.eof())sv111=true;else sv111=false;sv23.close();}else sv111=false;
16return sv111;}bool sf40(char*sv107,char*sv108){ifstream sv23;ofstream sv66;
17char sv26;sv23.open(sv108);if(sv23){sv66.open(sv107);sv26=sv23.get();
18while(!sv23.eof()){sv66.put(sv26);sv26=sv23.get();}sv66.close();sv23.close();
19return true;}else return false;}void sf41(char*sv106){ofstream sv66;
20sv66.open(sv106);sv66.close();}void sf22(ifstream&sv23){char sv26=' ';
21while((!sv23.eof())&&(sv26!=EOL))sv26=sv23.get();}
22void sf2(ifstream&sv23,char*sv28){int sv29,i;char sv27;sv29=strlen(sv28);
23for(i=0;i<sv29;i++)if((sv28[i]!=' ')&&(sv28[i]!='\t')&&(sv28[i]!='\r')&&
24(sv28[i]!='\n'))sv23>>sv27;}bool sf27(char*sv24,char*sv25){bool sv43;int sv112,
25sv36,sv37;ifstream sv38,sv39;sv38.open(sv24,ios::in);sv39.open(sv25,ios::in);
26if(!sv38){cout<<"We konden "<<sv24<<" bij de controle niet openen\n";cout<<EOL;
27sv43=false;}else if(!sv39)
28{cout<<"We konden "<<sv25<<" bij de controle niet openen\n";cout<<EOL;
29sv43=false;}else{sv43=true;sv112=1;sv38>>sv36;sv39>>sv37;sf22(sv38);sf22(sv39);
30while((!sv38.eof())&&(!sv39.eof())&&sv43){if(sv36!=sv37)sv43=false;else{sv112++;
31sv38>>sv36;sv39>>sv37;sf22(sv38);sf22(sv39);}}if(!sv43)
32cout<<"Verschil in regel "<<sv112<<EOL;else if(!sv38.eof())
33{cout<<"Het uitvoerbestand is langer dan het controlebestand\n";sv43=false;}else
34if(!sv39.eof()){cout<<"Het controlebestand is langer dan het uitvoerbestand\n";
35sv43=false;}}if(sv38)sv38.close();if(sv39)sv39.close();return sv43;}
Note: See TracBrowser for help on using the repository browser.