You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2002/02/07 11:53:12 UTC
cvs commit: tcl-rivet/src TclWeb.h TclWebapache.c make.tcl mod_rivet.c rivetCore.c
davidw 02/02/07 02:53:11
Modified: . ChangeLog
src TclWeb.h TclWebapache.c make.tcl mod_rivet.c
rivetCore.c
Log:
* src/TclWebapache.c (TclWebMakeURL): New command, extracted out of
rivetCore.c.
Revision Changes Path
1.32 +5 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ChangeLog 1 Feb 2002 18:59:20 -0000 1.31
+++ ChangeLog 7 Feb 2002 10:53:11 -0000 1.32
@@ -1,3 +1,8 @@
+2002-02-07 David N. Welton <da...@dedasys.com>
+
+ * src/TclWebapache.c (TclWebMakeURL): New command, extracted out
+ of rivetCore.c.
+
2002-02-01 David N. Welton <da...@dedasys.com>
* src/rivetCore.c: Deleted rivet_info command.
1.8 +3 -1 tcl-rivet/src/TclWeb.h
Index: TclWeb.h
===================================================================
RCS file: /home/cvs/tcl-rivet/src/TclWeb.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TclWeb.h 27 Jan 2002 02:40:31 -0000 1.7
+++ TclWeb.h 7 Feb 2002 10:53:11 -0000 1.8
@@ -5,7 +5,7 @@
* Common API layer.
*/
-/* $Id: TclWeb.h,v 1.7 2002/01/27 02:40:31 davidw Exp $ */
+/* $Id: TclWeb.h,v 1.8 2002/02/07 10:53:11 davidw Exp $ */
/* Error wrappers */
#define ER1 "<hr><p><code><pre>\n"
@@ -77,6 +77,8 @@
*/
int TclWeb_SetStatus(int status, TclWebRequest *req);
+
+int TclWeb_MakeURL(Tcl_Obj *result, char *filename, TclWebRequest *req);
int TclWeb_GetVar(Tcl_Obj *result, char *varname, TclWebRequest *req);
1.10 +8 -2 tcl-rivet/src/TclWebapache.c
Index: TclWebapache.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/TclWebapache.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TclWebapache.c 1 Feb 2002 18:59:20 -0000 1.9
+++ TclWebapache.c 7 Feb 2002 10:53:11 -0000 1.10
@@ -7,7 +7,7 @@
* operations.
*/
-/* $Id: TclWebapache.c,v 1.9 2002/02/01 18:59:20 davidw Exp $ */
+/* $Id: TclWebapache.c,v 1.10 2002/02/07 10:53:11 davidw Exp $ */
#include <tcl.h>
@@ -33,7 +33,7 @@
return TCL_OK;
}
-int
+INLINE int
TclWeb_SendHeaders(TclWebRequest *req)
{
ap_send_http_header(req->req);
@@ -107,6 +107,12 @@
return TCL_OK;
}
+int
+TclWeb_MakeURL(Tcl_Obj *result, char *filename, TclWebRequest *req)
+{
+ result = Tcl_NewStringObj(ap_construct_url(TCLWEBPOOL, filename, req->req), -1);
+ return TCL_OK;
+}
int
TclWeb_GetVar(Tcl_Obj *result, char *varname, TclWebRequest *req)
1.16 +3 -3 tcl-rivet/src/make.tcl
Index: make.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/make.tcl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- make.tcl 27 Jan 2002 15:43:43 -0000 1.15
+++ make.tcl 7 Feb 2002 10:53:11 -0000 1.16
@@ -2,7 +2,7 @@
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
-# $Id: make.tcl,v 1.15 2002/01/27 15:43:43 davidw Exp $
+# $Id: make.tcl,v 1.16 2002/02/07 10:53:11 davidw Exp $
# this file actually runs things, making use of the aardvark build
# system.
@@ -169,8 +169,8 @@
AddNode install {
depends "$MOD_SHLIB $LIB_SHLIB"
tclcommand "file copy -force $MOD_SHLIB $LIBEXECDIR"
- tclcommand "file copy -force ../rivet $PREFIX"
- tclcommand "file copy -force $LIB_SHLIB ../rivet/packages/rivet"
+ tclcommand "file copy -force [file join .. rivet] $PREFIX"
+ tclcommand "file copy -force $LIB_SHLIB [file join .. rivet packages rivet]"
}
Run
1.30 +2 -2 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mod_rivet.c 1 Feb 2002 18:59:20 -0000 1.29
+++ mod_rivet.c 7 Feb 2002 10:53:11 -0000 1.30
@@ -55,7 +55,7 @@
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign. */
-/* $Id: mod_rivet.c,v 1.29 2002/02/01 18:59:20 davidw Exp $ */
+/* $Id: mod_rivet.c,v 1.30 2002/02/07 10:53:11 davidw Exp $ */
/* mod_rivet.c by David Welton <da...@apache.org>
* and Damon Courtney <da...@unreality.com>
@@ -502,7 +502,7 @@
/* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
if( Tcl_EvalFile( interp, ap_server_root_relative(p, RIVET_INIT) )
== TCL_ERROR ) {
- ap_log_error( APLOG_MARK, APLOG_ERR, s, Tcl_GetStringResult(interp) );
+ ap_log_error( APLOG_MARK, APLOG_ERR, s, "init.tcl must be installed correctly for Apache Rivet to function: %s", Tcl_GetStringResult(interp) );
exit(1);
}
1.14 +4 -4 tcl-rivet/src/rivetCore.c
Index: rivetCore.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/rivetCore.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- rivetCore.c 1 Feb 2002 18:59:20 -0000 1.13
+++ rivetCore.c 7 Feb 2002 10:53:11 -0000 1.14
@@ -2,7 +2,7 @@
* rivetCore.c - Core commands which are compiled into mod_rivet itself.
*/
-/* $Id: rivetCore.c,v 1.13 2002/02/01 18:59:20 davidw Exp $ */
+/* $Id: rivetCore.c,v 1.14 2002/02/07 10:53:11 davidw Exp $ */
#include "httpd.h"
#include "http_config.h"
@@ -40,6 +40,7 @@
int objc,
Tcl_Obj *CONST objv[])
{
+ Tcl_Obj *result;
rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL);
if (objc != 2)
@@ -47,9 +48,8 @@
Tcl_WrongNumArgs(interp, 1, objv, "filename");
return TCL_ERROR;
}
- Tcl_SetObjResult( interp, Tcl_NewStringObj(
- ap_construct_url(POOL, Tcl_GetString(objv[1]), globals->r),
- -1 ) );
+ TclWeb_MakeURL(result, Tcl_GetString(objv[1]), globals->req);
+ Tcl_SetObjResult(interp, result);
return TCL_OK;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org