Update of /cvsroot/compbench/CompBenchmarks++/System
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17511
Modified Files:
System-Unix.cpp
Log Message:
Last command and last command output can be get.
Index: System-Unix.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-Unix.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** System-Unix.cpp 1 Nov 2006 10:32:17 -0000 1.5
--- System-Unix.cpp 11 Dec 2006 18:09:59 -0000 1.6
***************
*** 1,3 ****
--- 1,5 ----
#include <System/System-Unix.h>
+ #include <UI/UI.h>
+
#include <sys/stat.h>
#include <sys/types.h>
***************
*** 41,48 ****
char line[256];
! result="";
if ( !(fpipe = (FILE*)popen(command.c_str(),"r")) ) {
! perror("Problems with pipe");
! exit(1);
}
--- 43,50 ----
char line[256];
! result="";
! lastCommand=command;
if ( !(fpipe = (FILE*)popen(command.c_str(),"r")) ) {
! UI->Fatal("Can't create pipe.");
}
***************
*** 50,53 ****
--- 52,56 ----
result+=line;
}
+ lastCommandOutput=result;
return(pclose(fpipe));
}
|