/* * tlm.h * * Squarefish for C++ * * Contributors: * Tim Ballance and Louis Goddard * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * v.1.4 */ #include #include #include #include void in2(char bufr2[100]); void in(char bufr[100]); void sc(char syscalltxt[100]); void author(); void out(char scrtext[100]); void out(int scrtext); void out(float scrtext); void out(double scrtext); void wait(int seconds); void n(int nol); void fin(char finame[100]); void fout(char foutname[100], char foutext[100]); void ran(); void ran() { rand(); } void fout(char foutname[100], char foutext[100]) { ofstream examplefile (foutname); if (examplefile.is_open()) { examplefile << foutext; examplefile.close(); } } void fin(char finame[100], char fbuffer[100]) {; ifstream examplefile (finame); if (! examplefile.is_open()) { cout << "Error opening file"; exit (1); } while (! examplefile.eof() ) { examplefile.getline (fbuffer,100); } } void in(char bufr[100]) { cin >> bufr; } void in2(char bufr2[100]) { cin.get(bufr2, 100); } void sc(char syscalltxt[100]) { system(syscalltxt); } void author() { cout << "Tim Ballance and Louis Goddard, 2003"; } void out(int scrtext) { cout << scrtext; } void out(float scrtext) { cout << scrtext; } void out(double scrtext) { cout << scrtext; } void out(char scrtext[100]) { cout << scrtext; } void wait(int seconds) { int mili; mili=seconds*1000; Sleep(mili); } void n(int nol) { switch(nol) { case 1: cout << "\n"; break; case 2: cout << "\n\n"; break; case 3: cout << "\n\n\n"; break; case 4: cout << "\n\n\n\n"; break; case 5: cout << "\n\n\n\n\n"; break; case 6: cout << "\n\n\n\n\n\n"; break; case 7: cout << "\n\n\n\n\n\n\n"; break; case 8: cout << "\n\n\n\n\n\n\n\n"; break; case 9: cout << "\n\n\n\n\n\n\n\n\n"; break; default: cout << "\n"; } }