Update of /cvsroot/aimmath/AIM/WEB-INF/java
In directory sc8-pr-cvs1:/tmp/cvs-serv20625/java
Modified Files:
Maple.java
Log Message:
The earlier changes to exec in Maple.java added a 3rd argument: "html".
Without it check was always failing, and so processes were being condemned
after one use. - GG
Index: Maple.java
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Maple.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Maple.java 30 Aug 2003 22:40:55 -0000 1.4
--- Maple.java 5 Sep 2003 09:13:48 -0000 1.5
***************
*** 192,199 ****
try {
! exec("2+2",p);
return( s.toString().trim().equals("4") );
} catch (Exception e) {
return(false);
}
}
--- 192,211 ----
try {
! exec("2+2",p,"html","");
return( s.toString().trim().equals("4") );
} catch (Exception e) {
return(false);
+ }
+ }
+
+ public synchronized String checkout() {
+ StringWriter s = new StringWriter();
+ PrintWriter p = new PrintWriter(s);
+
+ try {
+ exec("2+2",p,"html","");
+ return( s.toString().trim() );
+ } catch (Exception e) {
+ return("Aargh!");
}
}
|