[Smipl-devel] SF.net SVN: smipl:[40] smipl-devel/src
Brought to you by:
the_student
From: <the...@us...> - 2009-08-15 20:27:57
|
Revision: 40 http://smipl.svn.sourceforge.net/smipl/?rev=40&view=rev Author: the_student Date: 2009-08-15 20:27:45 +0000 (Sat, 15 Aug 2009) Log Message: ----------- * Fixed bug in strdup(char*,char*) * Fixed bug PrintFile * Fixed Console not Splashing Modified Paths: -------------- smipl-devel/src/Console.h smipl-devel/src/FS/FS.h smipl-devel/src/String.h Modified: smipl-devel/src/Console.h =================================================================== --- smipl-devel/src/Console.h 2009-08-15 19:37:23 UTC (rev 39) +++ smipl-devel/src/Console.h 2009-08-15 20:27:45 UTC (rev 40) @@ -9,6 +9,7 @@ SMIPL_String cmd; int Lib_start; char *str, *str2; + PrintFile("/Console/Splash"); for(;;) { for(int a=0;a<=10;a++) strcpy(cmd.argv[0], ""); cout<<"? "; Modified: smipl-devel/src/FS/FS.h =================================================================== --- smipl-devel/src/FS/FS.h 2009-08-15 19:37:23 UTC (rev 39) +++ smipl-devel/src/FS/FS.h 2009-08-15 20:27:45 UTC (rev 40) @@ -40,18 +40,11 @@ char* str; if(PHYSFS_exists(FileName)) { if(!PHYSFS_isDirectory(FileName)) { - IFileStream *thefile=new IFileStream(FileName); - str=new char[80]; - int c=0; - while(!thefile->eof()){ - thefile->getline(str, 80); - cout<<str; - c++; - if(c==24) {cin.get();sys_clearscreen();c=0;} - } - cout<<endl<<endl; - delete[]str; - delete thefile; + sys_clearscreen(); + PHYSFS_file *thefile=PHYSFS_openRead(FileName); + str=new char[PHYSFS_fileLength(thefile)/sizeof(char)]; + PHYSFS_read (thefile, str, 1, PHYSFS_fileLength(thefile)); + delete[]str; } } else cout<<"\""<<FileName<<"\": not found"<<endl; Modified: smipl-devel/src/String.h =================================================================== --- smipl-devel/src/String.h 2009-08-15 19:37:23 UTC (rev 39) +++ smipl-devel/src/String.h 2009-08-15 20:27:45 UTC (rev 40) @@ -3,7 +3,7 @@ char *strdup(char *a, char* b) { char* str=new char[strlen(a)+strlen(b)]; strcpy(str,a); - strcat(str,a); + strcat(str,b); return str; } bool isDelim(char a, bool disallow_spaces=true, bool disallow_comparison=true) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |