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 2001/11/21 19:19:07 UTC

cvs commit: tcl-rivet/src channel.c mod_rivet.c mod_rivet.h tcl_commands.c

damonc      01/11/21 10:19:07

  Modified:    .        ChangeLog
               src      channel.c mod_rivet.c mod_rivet.h tcl_commands.c
  Log:
          * src/mod_rivet.c
              Renamed more commands into the Rivet_ naming scheme.
  
  Revision  Changes    Path
  1.7       +5 -0      tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ChangeLog	2001/11/21 03:38:22	1.6
  +++ ChangeLog	2001/11/21 18:19:06	1.7
  @@ -1,3 +1,8 @@
  +2001-11-21  Damon J. Courtney <da...@unreality.com>
  +
  +	* src/mod_rivet.c
  +	    Renamed more commands into the Rivet_ naming scheme.
  +
   2001-11-20  Damon J. Courtney <da...@unreality.com>
   
   	* src/tcl_commands.c
  
  
  
  1.4       +0 -2      tcl-rivet/src/channel.c
  
  Index: channel.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/channel.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- channel.c	2001/11/21 16:51:17	1.3
  +++ channel.c	2001/11/21 18:19:07	1.4
  @@ -72,7 +72,5 @@
       watchproc,
       gethandleproc,
       NULL,
  -    NULL,
  -    NULL,
       NULL
   };
  
  
  
  1.12      +16 -18    tcl-rivet/src/mod_rivet.c
  
  Index: mod_rivet.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_rivet.c	2001/11/21 16:51:17	1.11
  +++ mod_rivet.c	2001/11/21 18:19:07	1.12
  @@ -57,7 +57,7 @@
    * originally written at the National Center for Supercomputing Applications,
    * University of Illinois, Urbana-Champaign.  */
   
  -/* $Id: mod_rivet.c,v 1.11 2001/11/21 16:51:17 davidw Exp $  */
  +/* $Id: mod_rivet.c,v 1.12 2001/11/21 18:19:07 damonc Exp $  */
   
   /* mod_rivet.c by David Welton <da...@apache.org>
    *            and Damon Courtney <da...@unreality.com>
  @@ -106,7 +106,7 @@
   /* Set up the content type header */
   
   int
  -set_header_type(request_rec *r, char *header)
  +Rivet_SetHeaderType(request_rec *r, char *header)
   {
       rivet_server_conf *rsc = Rivet_GetConf(r);
   
  @@ -119,14 +119,14 @@
   
   /* Printer headers if they haven't been printed yet */
   int
  -print_headers(request_rec *r)
  +Rivet_PrintHeaders(request_rec *r)
   {
       rivet_server_conf *rsc = Rivet_GetConf(r);
   
       if( *(rsc->headers_printed) ) return 0;
   
       if (*(rsc->headers_set) == 0)
  -	set_header_type(r, DEFAULT_HEADER_TYPE);
  +	Rivet_SetHeaderType(r, DEFAULT_HEADER_TYPE);
   
       ap_send_http_header(r);
       *(rsc->headers_printed) = 1;
  @@ -135,10 +135,10 @@
   
   /* Print nice HTML formatted errors */
   int
  -print_error(request_rec *r, int htmlflag, char *errstr)
  +Rivet_PrintError(request_rec *r, int htmlflag, char *errstr)
   {
  -    set_header_type(r, DEFAULT_HEADER_TYPE);
  -    print_headers(r);
  +    Rivet_SetHeaderType(r, DEFAULT_HEADER_TYPE);
  +    Rivet_PrintHeaders(r);
   
       if (htmlflag != 1)
   	ap_rputs(ER1, r);
  @@ -321,24 +321,22 @@
   	Tcl_Obj *errscript =
   	    conf->rivet_error_script ? conf->rivet_error_script : NULL;
   
  -        print_headers(r);
  +        Rivet_PrintHeaders(r);
   	Tcl_Flush(*(conf->outchannel));
           if (errscript)
           {
   	    if (Tcl_EvalObj(interp, errscript) == TCL_ERROR)
  -                print_error(r, 1, "<b>Tcl_ErrorScript failed!</b>");
  +                Rivet_PrintError(r, 1, "<b>Tcl_ErrorScript failed!</b>");
           } else {
               /* default action  */
               errorinfo = Tcl_GetVar(interp, "errorInfo", 0);
  -            print_error(r, 0, errorinfo);
  -            print_error(r, 1, "<p><b>OUTPUT BUFFER:</b></p>");
  -            print_error(r, 0, Tcl_GetStringFromObj(outbuf, (int *)NULL));
  +            Rivet_PrintError(r, 0, errorinfo);
  +            Rivet_PrintError(r, 1, "<p><b>OUTPUT BUFFER:</b></p>");
  +            Rivet_PrintError(r, 0, Tcl_GetStringFromObj(outbuf, (int *)NULL));
           }
  -/*                  "</pre><b>OUTPUT BUFFER</b><pre>\n",
  -                    Tcl_GetStringFromObj(outbuf, (int *)NULL));  */
       } else {
           /* Make sure to flush the output if buffer_add was the only output */
  -        print_headers(r);
  +        Rivet_PrintHeaders(r);
   	Tcl_Flush(*(conf->outchannel));
       }
       return OK;
  @@ -466,8 +464,8 @@
   
       if (r->header_only)
       {
  -	set_header_type(r, DEFAULT_HEADER_TYPE);
  -	print_headers(r);
  +	Rivet_SetHeaderType(r, DEFAULT_HEADER_TYPE);
  +	Rivet_PrintHeaders(r);
   
   	return OK;
       }
  @@ -620,7 +618,7 @@
   
       Tcl_SetStdChannel(*(rsc->outchannel), TCL_STDOUT);
   /*     Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffering", "none");  */
  -     Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffersize", "1000000");
  +    Tcl_SetChannelOption(interp, *(rsc->outchannel), "-buffersize", "1000000");
   
       Tcl_RegisterChannel(interp, *(rsc->outchannel));
       if (interp == NULL)
  
  
  
  1.7       +3 -3      tcl-rivet/src/mod_rivet.h
  
  Index: mod_rivet.h
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/mod_rivet.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_rivet.h	2001/11/21 16:51:17	1.6
  +++ mod_rivet.h	2001/11/21 18:19:07	1.7
  @@ -81,9 +81,9 @@
   } rivet_interp_globals;
   
   int get_parse_exec_file(request_rec *r, rivet_server_conf *rsc, char *filename, int toplevel);
  -int set_header_type(request_rec *, char *);
  -int print_headers(request_rec *);
  -int print_error(request_rec *, int, char *);
  +int Rivet_SetHeaderType(request_rec *, char *);
  +int Rivet_PrintHeaders(request_rec *);
  +int Rivet_PrintError(request_rec *, int, char *);
   char *StringToUtf(char *input, ap_pool *pool);
   rivet_server_conf *Rivet_GetConf(request_rec *r);
   
  
  
  
  1.12      +4 -3      tcl-rivet/src/tcl_commands.c
  
  Index: tcl_commands.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/tcl_commands.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- tcl_commands.c	2001/11/21 16:51:18	1.11
  +++ tcl_commands.c	2001/11/21 18:19:07	1.12
  @@ -155,7 +155,7 @@
   {
       char *opt;
       rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL);
  -    rivet_server_conf *rsc = (rivet_server_conf *)
  +    rivet_server_conf *rsc =
   	RIVET_SERVER_CONF( globals->r->server->module_config );
   
       if (objc < 2)
  @@ -235,7 +235,8 @@
   	    Tcl_WrongNumArgs(interp, 2, objv, "mime/type");
   	    return TCL_ERROR;
   	}
  -	set_header_type(globals->r, Tcl_GetStringFromObj(objv[2],(int *)NULL));
  +	Rivet_SetHeaderType(globals->r,
  +				Tcl_GetStringFromObj(objv[2],(int *)NULL));
       } else if (!strcmp("numeric", opt)) /* ### numeric ### */
       {
   	int st = 200;
  @@ -663,7 +664,7 @@
       Tcl_Obj *result = NULL;
       ApacheUpload *upload;
       rivet_interp_globals *globals = Tcl_GetAssocData(interp, "rivet", NULL);
  -    rivet_server_conf *rsc = (rivet_server_conf *)
  +    rivet_server_conf *rsc =
   	RIVET_SERVER_CONF( globals->r->server->module_config );
   
       if (objc < 2 || objc > 5)