From: Chris S. <san...@us...> - 2005-07-14 08:47:05
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328/scripts Modified Files: stackUnix.php stackUtility.php stackWin.php Log Message: Moved the documentation Index: stackUnix.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUnix.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** stackUnix.php 14 Jul 2005 07:34:56 -0000 1.13 --- stackUnix.php 14 Jul 2005 08:46:53 -0000 1.14 *************** *** 75,79 **** 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ! 2 => array('file', $stack_logfiles."cas_errors.txt", 'a')); $CASProcess = proc_open($stack_cas['command'],$descriptors, $pipes); --- 75,79 ---- 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ! 2 => array('pipe', 'w')); $CASProcess = proc_open($stack_cas['command'],$descriptors, $pipes); *************** *** 131,134 **** --- 131,141 ---- $ret .=' The CAS timed out. ] ] ] ]'; } + + // Error trapping + $err = ''; + while (!feof($pipes[2])) { + $err .= fgets($pipes[2], 1024); + } + fclose($pipes[2]); } else { *************** *** 138,142 **** } ! $ret = trim($ret); return $ret; --- 145,153 ---- } ! if ($errstr = strstr($err,'Error')) { ! $ret = "<p>TtH error: <font color='orange'><tt>$errstr</tt></font></p>"; ! } else { ! $ret = trim($ret); ! } return $ret; Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** stackUtility.php 14 Jul 2005 07:27:04 -0000 1.25 --- stackUtility.php 14 Jul 2005 08:46:53 -0000 1.26 *************** *** 750,754 **** $html =''; ! if (substr('<hint>',$strin)) { // We have something to do. preg_match_all('|<hint>(.*)</hint>|U',$strin,$html_match); --- 750,754 ---- $html =''; ! if (strstr($strin,'<hint>')) { // We have something to do. preg_match_all('|<hint>(.*)</hint>|U',$strin,$html_match); *************** *** 767,771 **** $html =''; $html_no = 0; ! if (substr('<html>',$strin)) { // We have something to do. preg_match_all('|<html>(.*)</html>|U',$strin,$html_match); --- 767,771 ---- $html =''; $html_no = 0; ! if (strstr($strin,'<html>')) { // We have something to do. preg_match_all('|<html>(.*)</html>|U',$strin,$html_match); Index: stackWin.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackWin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stackWin.php 14 Jul 2005 07:27:04 -0000 1.4 --- stackWin.php 14 Jul 2005 08:46:53 -0000 1.5 *************** *** 30,34 **** 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ! 2 => array('file', $stack_logfiles."/tex_errors.txt", 'a')); $TeXProcess = proc_open($stack_latex['command'],$descriptors, $pipes); --- 30,34 ---- 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ! 2 => array('pipe', 'w')); $TeXProcess = proc_open($stack_latex['command'],$descriptors, $pipes); *************** *** 46,54 **** $ret .= fgets($pipes[1], 1024); } - fclose($pipes[1]); - } ! $ret = trim($ret); //$ret = '<pre>'.$strin."</pre>\n"; --- 46,64 ---- $ret .= fgets($pipes[1], 1024); } fclose($pipes[1]); ! $err = ''; ! while (!feof($pipes[2])) { ! $err .= fgets($pipes[2], 1024); ! } ! fclose($pipes[2]); ! ! } ! ! if ($errstr = strstr($err,'Error')) { ! $ret = "<p>TtH error: <font color='orange'><tt>$errstr</tt></font></p>"; ! } else { ! $ret = trim($ret); ! } //$ret = '<pre>'.$strin."</pre>\n"; |