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