/[clhp]/clhp/mod_clhp.c
ViewVC logotype

Diff of /clhp/mod_clhp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by aventimiglia, Wed Oct 29 21:34:44 2003 UTC revision 1.2 by aventimiglia, Wed Nov 12 01:31:25 2003 UTC
# Line 29  Line 29 
29  #include "util_script.h"  #include "util_script.h"
30  #include <string.h>  #include <string.h>
31    
 #define DEBUG_CLHP 1  
   
32  #ifndef HUGE_STRING_LEN  #ifndef HUGE_STRING_LEN
33  #define HUGE_STRING_LEN 65000  #define HUGE_STRING_LEN 65000
34  #endif  #endif
# Line 47  static int run_lisp ( void *void_child_s Line 45  static int run_lisp ( void *void_child_s
45                                         child->req->subprocess_env );                                         child->req->subprocess_env );
46    int child_pid;    int child_pid;
47    
48  #ifdef DEBUG_CLHP    child->req->args = ap_pstrdup ( child->req->pool,
49    FILE *dbg = ap_pfopen ( child->req->pool, "/tmp/clhp.debug", "w" );                                    "-noinit -quiet -core /usr/lib/cmucl/clhp.core" );
   int i;  
 #endif  
50    
 #ifdef DEBUG_CLHP  
   fprintf ( dbg, "run_lisp: env:\n" );  
   for ( i = 0; env[i]; ++i )  
     fprintf ( dbg, "\t'%s'\n", env[i] );  
   fprintf ( dbg, "\nargs:\t\"%s\"\n", child->req->args );  
   ap_pfclose ( child->req->pool, dbg );  
 #endif  
   
   child->req->args = "-noinit -quiet -core /usr/lib/cmucl/clhp.core";  
51    ap_cleanup_for_exec ();    ap_cleanup_for_exec ();
52    child_pid = ap_call_exec ( child->req, pinfo, "/usr/bin/lisp", env, 1 );    child_pid = ap_call_exec ( child->req, pinfo, "/usr/bin/lisp", env, 1 );
53    
54    return (0);    return (0);
55  }  }
56    
# Line 96  static int Handler ( request_rec *req ) Line 83  static int Handler ( request_rec *req )
83    
84    ap_hard_timeout ( "Hard Timeout", req );    ap_hard_timeout ( "Hard Timeout", req );
85    
86      // Debugging output
87      ap_rputs ( "-----------------\n", child.req );
88      ap_rprintf ( child.req, "ARGS: %s\n-------------\n", child.req->args );
89    
90    
91      send_to_lisp ( lisp_out, "(mapcar #'print ext:*command-line-strings*)");
92      send_to_lisp ( lisp_out, "(progn (loop for f from 1 to 50 do (format t \"-\")) (terpri))" );
93    send_to_lisp ( lisp_out, "(mapcar #'print ext:*environment-list*)" );    send_to_lisp ( lisp_out, "(mapcar #'print ext:*environment-list*)" );
94    
95    
96    close_lisp ( lisp_out );    close_lisp ( lisp_out );
97    ap_bclose ( lisp_out );    ap_bclose ( lisp_out );
98    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.5