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/10/28 22:42:08 UTC

cvs commit: tcl-rivet/src rivetCore.c

davidw      2002/10/28 13:42:08

  Modified:    .        ChangeLog
               src      rivetCore.c
  Log:
  * src/rivetCore.c (Rivet_Include): Changed Tcl_Channel name to
    tclstdout to avoid any conflicts with the real stdout.
  
  Revision  Changes    Path
  1.78      +5 -0      tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- ChangeLog	23 Oct 2002 18:42:28 -0000	1.77
  +++ ChangeLog	28 Oct 2002 21:42:08 -0000	1.78
  @@ -1,3 +1,8 @@
  +2002-10-28  David N. Welton  <da...@dedasys.com>
  +
  +	* src/rivetCore.c (Rivet_Include): Changed Tcl_Channel name to
  +	tclstdout to avoid any conflicts with the real stdout.
  +
   2002-10-23  David N. Welton  <da...@dedasys.com>
   
   	* doc/rivet.xsl: Use <pre> tag for source code examples.
  
  
  
  1.29      +10 -10    tcl-rivet/src/rivetCore.c
  
  Index: rivetCore.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/rivetCore.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- rivetCore.c	22 Oct 2002 18:21:47 -0000	1.28
  +++ rivetCore.c	28 Oct 2002 21:42:08 -0000	1.29
  @@ -111,7 +111,7 @@
   {
       int sz;
       Tcl_Channel fd;
  -    Tcl_Channel stdout;
  +    Tcl_Channel tclstdout;
       Tcl_Obj *outobj;
       char *filename;
       Tcl_DString transoptions;
  @@ -157,13 +157,13 @@
        * previous settings. */
       Tcl_DStringInit(&transoptions);
       Tcl_DStringInit(&encoptions);
  -    stdout = Tcl_GetChannel(interp, "stdout", NULL);
  -    Tcl_GetChannelOption(interp, stdout, "-translation", &transoptions);
  -    Tcl_GetChannelOption(interp, stdout, "-encoding", &encoptions);
  -    Tcl_SetChannelOption(interp, stdout, "-translation", "binary");
  -    Tcl_WriteObj(stdout, outobj);
  -    Tcl_SetChannelOption(interp, stdout, "-translation", Tcl_DStringValue(&transoptions));
  -    Tcl_SetChannelOption(interp, stdout, "-encoding", Tcl_DStringValue(&encoptions));
  +    tclstdout = Tcl_GetChannel(interp, "stdout", NULL);
  +    Tcl_GetChannelOption(interp, tclstdout, "-translation", &transoptions);
  +    Tcl_GetChannelOption(interp, tclstdout, "-encoding", &encoptions);
  +    Tcl_SetChannelOption(interp, tclstdout, "-translation", "binary");
  +    Tcl_WriteObj(tclstdout, outobj);
  +    Tcl_SetChannelOption(interp, tclstdout, "-translation", Tcl_DStringValue(&transoptions));
  +    Tcl_SetChannelOption(interp, tclstdout, "-encoding", Tcl_DStringValue(&encoptions));
       Tcl_DStringFree(&transoptions);
       Tcl_DStringFree(&encoptions);
       return Tcl_Close(interp, fd);
  @@ -346,7 +346,7 @@
   	key = Tcl_GetStringFromObj(objv[2], NULL);
   	if (objc == 4)
   	{
  -	    deflt = Tcl_GetStringFromObj(objv[3], NULL);
  +	    deflt = Tcl_GetString(objv[3]);
   	}
   
   	if (TclWeb_GetVar(result, key, globals->req) != TCL_OK)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org