Only in /src/users/damania/Pursuits/tcl: DIFF6.2TO6.4
Only in /src/users/damania/Pursuits/tcl: DIFF6.2TO6.4ORIG
Only in /src/users/damania/Pursuits/tcl: Makefile
Only in .: compat
Only in .: diff_unix_vms
Only in .: extendutil.c
Only in .: extendutil.obj
Only in .: handles.c
Only in .: handles.obj
Common subdirectories: ./library and /src/users/damania/Pursuits/tcl/library
Only in .: libtcl.olb
Only in .: makefile
Only in .: panic.obj
Only in .: readme.vms
diff -c ./regexp.c /src/users/damania/Pursuits/tcl/regexp.c
*** ./regexp.c	Mon Mar 29 14:50:50 1993
--- /src/users/damania/Pursuits/tcl/regexp.c	Tue Mar 30 07:44:06 1993
***************
*** 26,32 ****
   * *** The only change is to use ckalloc and ckfree instead of   ***
   * *** malloc and free.						 ***
   */
! #include "tclint.h"
  
  /*
   * The "internal use only" fields in regexp.h are present to pass info from
--- 26,32 ----
   * *** The only change is to use ckalloc and ckfree instead of   ***
   * *** malloc and free.						 ***
   */
! #include "tclInt.h"
  
  /*
   * The "internal use only" fields in regexp.h are present to pass info from
Only in .: regexp.obj
diff -c ./strerror.c /src/users/damania/Pursuits/tcl/strerror.c
*** ./strerror.c	Mon Mar 29 14:50:53 1993
--- /src/users/damania/Pursuits/tcl/strerror.c	Tue Mar 30 07:44:06 1993
***************
*** 17,24 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/compat/RCS/strerror.c,v 1.2 91/12/16 09:26:48 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include <tclint.h>
! #include <tclunix.h>
  
  /*
   *----------------------------------------------------------------------
--- 17,24 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/compat/RCS/strerror.c,v 1.2 91/12/16 09:26:48 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include <tclInt.h>
! #include <tclUnix.h>
  
  /*
   *----------------------------------------------------------------------
diff -c ./string.h /src/users/damania/Pursuits/tcl/string.h
*** ./string.h	Mon Mar 29 14:52:04 1993
--- /src/users/damania/Pursuits/tcl/string.h	Tue Mar 30 07:44:07 1993
***************
*** 32,38 ****
  #include <sys/types.h>
  #endif
  
- #ifndef VMS
  extern char *		memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
  extern int		memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
  			    size_t n));
--- 32,37 ----
***************
*** 67,72 ****
  extern char *		strstr _ANSI_ARGS_((CONST char *string,
  			    CONST char *substring));
  extern char *		strtok _ANSI_ARGS_((CONST char *s, CONST char *delim));
- #endif
  
  #endif /* _STRING */
--- 66,70 ----
diff -c ./strtoul.c /src/users/damania/Pursuits/tcl/strtoul.c
*** ./strtoul.c	Mon Mar 29 14:50:54 1993
--- /src/users/damania/Pursuits/tcl/strtoul.c	Tue Mar 30 07:44:07 1993
***************
*** 18,26 ****
  #endif /* not lint */
  
  #include <ctype.h>
- #ifdef VMS
- #define strtoul   tcl_strtoul
- #endif
  
  /*
   * The table below is used to convert from ASCII digits to a
--- 18,23 ----
Only in .: strtoul.obj
Only in /src/users/damania/Pursuits/tcl: tcl.h.orig
Only in /src/users/damania/Pursuits/tcl: tclUnix.h.bak
Only in /src/users/damania/Pursuits/tcl: tclUnix.h.orig
diff -c ./tclassem.c /src/users/damania/Pursuits/tcl/tclassem.c
*** ./tclassem.c	Mon Mar 29 14:50:55 1993
--- /src/users/damania/Pursuits/tcl/tclassem.c	Tue Mar 30 07:44:07 1993
***************
*** 19,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclAssem.c,v 1.13 93/01/29 10:14:45 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
  
  /*
   * The structure below is the internal representation for a command
--- 19,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclAssem.c,v 1.13 93/01/29 10:14:45 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
  
  /*
   * The structure below is the internal representation for a command
Only in .: tclassem.obj
diff -c ./tclbasic.c /src/users/damania/Pursuits/tcl/tclbasic.c
*** ./tclbasic.c	Mon Mar 29 14:50:58 1993
--- /src/users/damania/Pursuits/tcl/tclbasic.c	Tue Mar 30 07:44:08 1993
***************
*** 19,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclBasic.c,v 1.133 92/08/21 15:45:32 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * The following structure defines all of the commands in the Tcl core,
--- 19,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclBasic.c,v 1.133 92/08/21 15:45:32 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * The following structure defines all of the commands in the Tcl core,
Only in .: tclbasic.obj
Only in .: tclckalloc.obj
diff -c ./tclcmdah.c /src/users/damania/Pursuits/tcl/tclcmdah.c
*** ./tclcmdah.c	Mon Mar 29 14:51:04 1993
--- /src/users/damania/Pursuits/tcl/tclcmdah.c	Tue Mar 30 07:44:08 1993
***************
*** 19,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdAH.c,v 1.79 93/01/29 14:36:00 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  
  /*
--- 19,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdAH.c,v 1.79 93/01/29 14:36:00 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  
  /*
Only in .: tclcmdah.obj
diff -c ./tclcmdil.c /src/users/damania/Pursuits/tcl/tclcmdil.c
*** ./tclcmdil.c	Mon Mar 29 14:51:08 1993
--- /src/users/damania/Pursuits/tcl/tclcmdil.c	Tue Mar 30 07:44:09 1993
***************
*** 20,26 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdIL.c,v 1.89 93/01/22 15:17:42 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * Forward declarations for procedures defined in this file:
--- 20,26 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdIL.c,v 1.89 93/01/22 15:17:42 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * Forward declarations for procedures defined in this file:
Only in .: tclcmdil.obj
diff -c ./tclcmdmz.c /src/users/damania/Pursuits/tcl/tclcmdmz.c
*** ./tclcmdmz.c	Mon Mar 29 14:51:12 1993
--- /src/users/damania/Pursuits/tcl/tclcmdmz.c	Tue Mar 30 07:44:09 1993
***************
*** 20,26 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdMZ.c,v 1.18 93/01/29 09:40:49 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * Structure used to hold information about variable traces:
--- 20,26 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclCmdMZ.c,v 1.18 93/01/29 09:40:49 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * Structure used to hold information about variable traces:
Only in .: tclcmdmz.obj
diff -c ./tclenv.c /src/users/damania/Pursuits/tcl/tclenv.c
*** ./tclenv.c	Mon Mar 29 14:51:14 1993
--- /src/users/damania/Pursuits/tcl/tclenv.c	Tue Mar 30 07:44:09 1993
***************
*** 18,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclEnv.c,v 1.10 93/02/01 16:23:26 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
! #include "tclunix.h"
  
  /*
   * The structure below is used to keep track of all of the interpereters
--- 18,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclEnv.c,v 1.10 93/02/01 16:23:26 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
! #include "tclUnix.h"
  
  /*
   * The structure below is used to keep track of all of the interpereters
Only in .: tclenv.obj
diff -c ./tclexpr.c /src/users/damania/Pursuits/tcl/tclexpr.c
*** ./tclexpr.c	Mon Mar 29 14:51:17 1993
--- /src/users/damania/Pursuits/tcl/tclexpr.c	Tue Mar 30 07:44:10 1993
***************
*** 21,27 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclExpr.c,v 1.36 92/08/16 13:25:34 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * The stuff below is a bit of a hack so that this file can be used
--- 21,27 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclExpr.c,v 1.36 92/08/16 13:25:34 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * The stuff below is a bit of a hack so that this file can be used
***************
*** 30,36 ****
   */
  
  #ifndef TCL_GENERIC_ONLY
! #include "tclunix.h"
  #else
  int errno;
  #define ERANGE 34
--- 30,36 ----
   */
  
  #ifndef TCL_GENERIC_ONLY
! #include "tclUnix.h"
  #else
  int errno;
  #define ERANGE 34
Only in .: tclexpr.obj
Only in .: tclextdint.h
Only in .: tclextend.h
diff -c ./tclget.c /src/users/damania/Pursuits/tcl/tclget.c
*** ./tclget.c	Mon Mar 29 14:51:18 1993
--- /src/users/damania/Pursuits/tcl/tclget.c	Tue Mar 30 07:44:10 1993
***************
*** 19,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclGet.c,v 1.11 92/02/29 16:13:14 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
  
  /*
   *----------------------------------------------------------------------
--- 19,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclGet.c,v 1.11 92/02/29 16:13:14 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
  
  /*
   *----------------------------------------------------------------------
Only in .: tclget.obj
diff -c ./tclglob.c /src/users/damania/Pursuits/tcl/tclglob.c
*** ./tclglob.c	Mon Mar 29 14:51:21 1993
--- /src/users/damania/Pursuits/tcl/tclglob.c	Tue Mar 30 07:44:10 1993
***************
*** 18,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclGlob.c,v 1.26 92/12/23 11:33:18 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
! #include "tclunix.h"
  
  /*
   * The structure below is used to keep track of a globbing result
--- 18,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclGlob.c,v 1.26 92/12/23 11:33:18 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
! #include "tclUnix.h"
  
  /*
   * The structure below is used to keep track of a globbing result
***************
*** 139,198 ****
   *
   *----------------------------------------------------------------------
   */
! #ifdef VMS
! #include	<rms.h>
!  
!   static int
! vmsGlob(interp, mask)
!     Tcl_Interp *interp;
!     char *mask;
! {
!     char		resultantString[NAM$C_MAXRSS];
!     char		expandedString[NAM$C_MAXRSS];
!     char		filename[256];
!     int			status, l;
!     struct		FAB fab;
!     struct		NAM nam;
! 
!     /*
!     	Initialize fab and nam blocks from prototypes
!     */
!     fab = cc$rms_fab;
!     nam = cc$rms_nam;
! 
!     /*
! 	Set up the FAB
!     */
!     fab.fab$l_fop = FAB$M_NAM;
!     fab.fab$l_nam = &nam;
!     fab.fab$l_fna = mask;
!     fab.fab$b_fns = strlen(mask);
! 
!     /*
! 	Set up the NAM block
!     */
!     nam.nam$b_rss = NAM$C_MAXRSS;
!     nam.nam$l_rsa = resultantString;
!     nam.nam$b_ess = NAM$C_MAXRSS;
!     nam.nam$l_esa = expandedString;
! 
!     status = sys$parse(&fab);
!     if (status != RMS$_NORMAL) {
! 	Tcl_ResetResult(interp);
! 	Tcl_AppendResult(interp, strerror(EVMSERR, status), ": ", mask, 0);
! 	return TCL_ERROR;
!     }
!     else {
! 	while ((status = sys$search(&fab)) == RMS$_NORMAL) {
! 	    l = nam.nam$b_rsl;
! 	    resultantString[l] = 0;
! 	    Tcl_AppendElement(interp, resultantString, 0);
! 	}
! 	status = sys$close(&fab);
! 	return TCL_OK;
!     }
! }
! #else
  static int
  DoGlob(interp, dir, rem)
      Tcl_Interp *interp;			/* Interpreter to use for error
--- 139,145 ----
   *
   *----------------------------------------------------------------------
   */
! 
  static int
  DoGlob(interp, dir, rem)
      Tcl_Interp *interp;			/* Interpreter to use for error
***************
*** 425,431 ****
      }
      return TCL_OK;
  }
- #endif    /* VMS */
  
  /*
   *----------------------------------------------------------------------
--- 372,377 ----
***************
*** 464,494 ****
      static int curSize = STATIC_BUF_SIZE;
      static char *curBuf = staticBuf;
      char *dir;
- #ifdef VMS
-     static char vmsName[512];
- #endif
      int length;
      int fromPw = 0;
      register char *p;
  
      if (name[0] != '~') {
! #ifdef VMS
! 	/*
! 	    If it's a Unix format name, convert it to VMS.
! 	*/
! 	if (strchr(name, '/')) {
! 	    if (Tcl_Cvt2Vms(name, vmsName))
! 		return vmsName;
! 	    else {
! 		Tcl_ResetResult(interp);
! 		Tcl_AppendResult(interp, "Illegal filename: \"",
! 			name, "\"", (char *) NULL);
! 		return NULL;
! 	    }
! 	}
! 	else
! #endif	
!         return name;
      }
  
      /*
--- 410,421 ----
      static int curSize = STATIC_BUF_SIZE;
      static char *curBuf = staticBuf;
      char *dir;
      int length;
      int fromPw = 0;
      register char *p;
  
      if (name[0] != '~') {
! 	return name;
      }
  
      /*
***************
*** 496,506 ****
       */
  
      if ((name[1] == '/') || (name[1] == '\0')) {
! #ifdef VMS
! 	dir = "/sys$login/";
! #else
! 		dir = getenv("HOME");
! #endif
  	if (dir == NULL) {
  	    Tcl_ResetResult(interp);
  	    Tcl_AppendResult(interp, "couldn't find HOME environment ",
--- 423,429 ----
       */
  
      if ((name[1] == '/') || (name[1] == '\0')) {
! 	dir = getenv("HOME");
  	if (dir == NULL) {
  	    Tcl_ResetResult(interp);
  	    Tcl_AppendResult(interp, "couldn't find HOME environment ",
***************
*** 509,515 ****
  	}
  	p = name+1;
      } else {
- #ifndef VMS
  	struct passwd *pwPtr;
  
  	for (p = &name[1]; (*p != 0) && (*p != '/'); p++) {
--- 432,437 ----
***************
*** 524,539 ****
  	pwPtr = getpwnam(curBuf);
  	if (pwPtr == NULL) {
  	    endpwent();
- #endif
  	    Tcl_ResetResult(interp);
  	    Tcl_AppendResult(interp, "user \"", curBuf,
  		    "\" doesn't exist", (char *) NULL);
  	    return NULL;
- #ifndef VMS
  	}
  	dir = pwPtr->pw_dir;
  	fromPw = 1;
- #endif
      }
  
      /*
--- 446,458 ----
***************
*** 557,567 ****
  
      strcpy(curBuf, dir);
      strcat(curBuf, p);
- #ifndef VMS
      if (fromPw) {
  	endpwent();
      }
- #endif
      return curBuf;
  }
  
--- 476,484 ----
***************
*** 615,639 ****
  	 */
  
  	thisName = argv[i];
- #ifdef VMS
- 	if (*thisName == '~' || strchr(thisName, '/')) {
- #else
  	if (*thisName == '~') {
- #endif
  	    thisName = Tcl_TildeSubst(interp, thisName);
  	    if (thisName == NULL) {
  		return TCL_ERROR;
  	    }
  	}
- #ifdef VMS
- 	result = vmsGlob(interp, thisName);
- #else
  	if (*thisName == '/') {
  	    result = DoGlob(interp, "/", thisName+1);
  	} else {
  	    result = DoGlob(interp, "", thisName);
  	}
- #endif
  	if (result != TCL_OK) {
  	    return result;
  	}
--- 532,548 ----
Only in .: tclglob.obj
diff -c ./tclhash.c /src/users/damania/Pursuits/tcl/tclhash.c
*** ./tclhash.c	Mon Mar 29 14:51:23 1993
--- /src/users/damania/Pursuits/tcl/tclhash.c	Tue Mar 30 07:44:11 1993
***************
*** 18,24 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclHash.c,v 1.10 92/08/21 14:13:20 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
  
  /*
   * Imported library procedures for which there are no header files:
--- 18,24 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclHash.c,v 1.10 92/08/21 14:13:20 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
  
  /*
   * Imported library procedures for which there are no header files:
Only in .: tclhash.obj
diff -c ./tclhistory.c /src/users/damania/Pursuits/tcl/tclhistory.c
*** ./tclhistory.c	Mon Mar 29 14:51:26 1993
--- /src/users/damania/Pursuits/tcl/tclhistory.c	Tue Mar 30 07:44:11 1993
***************
*** 20,26 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclHistory.c,v 1.24 92/12/09 16:54:52 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
  
  /*
   * This history stuff is mostly straightforward, except for one thing
--- 20,26 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclHistory.c,v 1.24 92/12/09 16:54:52 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
  
  /*
   * This history stuff is mostly straightforward, except for one thing
Only in .: tclhistory.obj
diff -c ./tclint.h /src/users/damania/Pursuits/tcl/tclint.h
*** ./tclint.h	Mon Mar 29 14:52:14 1993
--- /src/users/damania/Pursuits/tcl/tclint.h	Tue Mar 30 07:44:12 1993
***************
*** 34,40 ****
  #include "tcl.h"
  #endif
  #ifndef _TCLHASH
! #include "tclhash.h"
  #endif
  #ifndef _REGEXP
  #include "regexp.h"
--- 34,40 ----
  #include "tcl.h"
  #endif
  #ifndef _TCLHASH
! #include "tclHash.h"
  #endif
  #ifndef _REGEXP
  #include "regexp.h"
***************
*** 45,56 ****
  #include <string.h>
  #include <varargs.h>
  
- #ifdef VMS
- #ifndef strtoul
- #define strtoul tcl_strtoul
- #endif
- #endif
- 
  /*
   * At present (12/91) not all stdlib.h implementations declare strtod.
   * The declaration below is here to ensure that it's declared, so that
--- 45,50 ----
diff -c ./tclparse.c /src/users/damania/Pursuits/tcl/tclparse.c
*** ./tclparse.c	Mon Mar 29 14:51:29 1993
--- /src/users/damania/Pursuits/tcl/tclparse.c	Tue Mar 30 07:44:12 1993
***************
*** 19,25 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclParse.c,v 1.25 93/01/06 15:23:03 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * The following table assigns a type to each character.  Only types
--- 19,25 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclParse.c,v 1.25 93/01/06 15:23:03 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * The following table assigns a type to each character.  Only types
Only in .: tclparse.obj
diff -c ./tclproc.c /src/users/damania/Pursuits/tcl/tclproc.c
*** ./tclproc.c	Mon Mar 29 14:51:31 1993
--- /src/users/damania/Pursuits/tcl/tclproc.c	Tue Mar 30 07:44:12 1993
***************
*** 18,24 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclProc.c,v 1.60 92/09/14 15:42:07 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * Forward references to procedures defined later in this file:
--- 18,24 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclProc.c,v 1.60 92/09/14 15:42:07 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * Forward references to procedures defined later in this file:
Only in .: tclproc.obj
diff -c ./tcltest.c /src/users/damania/Pursuits/tcl/tcltest.c
*** ./tcltest.c	Mon Mar 29 14:51:32 1993
--- /src/users/damania/Pursuits/tcl/tcltest.c	Tue Mar 30 07:44:12 1993
***************
*** 30,42 ****
  char dumpFile[100];
  int quitFlag = 0;
  
- #ifdef VMS
  char initCmd[] =
-     "if [file exists [info library]init.tcl] {source [info library]init.tcl}";
- #else
- char initCmd[] =
      "if [file exists [info library]/init.tcl] {source [info library]/init.tcl}";
- #endif
  
  	/* ARGSUSED */
  int
--- 30,37 ----
Only in .: tcltest.exe
Only in .: tcltest.obj
diff -c ./tclunix.h /src/users/damania/Pursuits/tcl/tclunix.h
*** ./tclunix.h	Mon Mar 29 14:52:16 1993
--- /src/users/damania/Pursuits/tcl/tclunix.h	Tue Mar 30 07:44:13 1993
***************
*** 57,100 ****
   */
  
  #define TCL_GETTOD 1
- #define TCL_SYS_ERRLIST 1
- #ifndef VMS
  #define TCL_GETWD 1
  #define TCL_SYS_TIME_H 1
  #define TCL_SYS_WAIT_H 1
  #define TCL_UNION_WAIT 1
  #define TCL_PID_T 1
  #define TCL_UID_T 1
- #endif
  
  #include <errno.h>
- #ifndef VMS
  #include <fcntl.h>
  #include <limits.h>
  #include <pwd.h>
- #endif
  #include <signal.h>
- #ifdef VMS
- #include <types.h>
- #include <file.h>
- #include <stat.h>
- #include <time.h>
-     struct timeval {
-       long tv_sec;
-       long tv_usec;
-     };
- #define unlink    delete
- #define fork vfork
- #ifndef strtoul
- #define strtoul   tcl_strtoul
- #endif    /* strtoul */
- #else
  #include <sys/param.h>
  #include <sys/types.h>
  #include <dirent.h>
  #include <sys/file.h>
  #include <sys/stat.h>
- #endif
  #if TCL_SYS_TIME_H
  #   include <sys/time.h>
  #else
--- 57,80 ----
   */
  
  #define TCL_GETTOD 1
  #define TCL_GETWD 1
+ #define TCL_SYS_ERRLIST 1
  #define TCL_SYS_TIME_H 1
  #define TCL_SYS_WAIT_H 1
  #define TCL_UNION_WAIT 1
  #define TCL_PID_T 1
  #define TCL_UID_T 1
  
  #include <errno.h>
  #include <fcntl.h>
  #include <limits.h>
  #include <pwd.h>
  #include <signal.h>
  #include <sys/param.h>
  #include <sys/types.h>
  #include <dirent.h>
  #include <sys/file.h>
  #include <sys/stat.h>
  #if TCL_SYS_TIME_H
  #   include <sys/time.h>
  #else
***************
*** 110,120 ****
   * isn't generally declared in a header file anywhere.
   */
  
- #ifndef VMS
  extern int errno;
  extern int sys_nerr;
  extern char *sys_errlist[];
- #endif /* VMS */
  
  /*
   * The type of the status returned by wait varies from UNIX system
--- 90,98 ----
***************
*** 182,193 ****
   */
  
  #if ! TCL_GETTOD
- #ifndef VMS
- #include <time.h>
- #else
  #   include <sys/times.h>
  #   include <sys/param.h>
- #endif
  #   ifndef CLK_TCK
  #       ifdef HZ
  #           define CLK_TCK HZ
--- 160,167 ----
***************
*** 308,317 ****
  #if defined(_sgi) || defined(__sgi)
  #define environ _environ
  #endif
- #ifdef VMS
- #include <unixlib.h>
  extern char **environ;
- #endif
  
  /*
   * Library procedures used by Tcl but not declared in a header file:
--- 282,288 ----
***************
*** 322,336 ****
  extern int	chdir	   _ANSI_ARGS_((CONST char *path));
  extern int	close	   _ANSI_ARGS_((int fd));
  extern int	dup2	   _ANSI_ARGS_((int src, int dst));
- #ifndef VMS
  extern void	endpwent   _ANSI_ARGS_((void));
- #endif
  extern int	execvp	   _ANSI_ARGS_((CONST char *name, char **argv));
  extern void	_exit 	   _ANSI_ARGS_((int status));
  extern pid_t	fork	   _ANSI_ARGS_((void));
- #ifndef VMS
  extern uid_t	geteuid	   _ANSI_ARGS_((void));
- #endif
  extern pid_t	getpid	   _ANSI_ARGS_((void));
  extern char *	getcwd 	   _ANSI_ARGS_((char *buffer, int size));
  extern char *	getwd  	   _ANSI_ARGS_((char *buffer));
--- 293,303 ----
diff -c ./tclunixaz.c /src/users/damania/Pursuits/tcl/tclunixaz.c
*** ./tclunixaz.c	Mon Mar 29 14:51:37 1993
--- /src/users/damania/Pursuits/tcl/tclunixaz.c	Tue Mar 30 07:44:13 1993
***************
*** 21,31 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixAZ.c,v 1.40 93/01/28 16:06:35 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
! #include "tclunix.h"
! #ifdef VMS
! #include <clidef.h>
! #endif
  
  /*
   * The variable below caches the name of the current working directory
--- 21,28 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixAZ.c,v 1.40 93/01/28 16:06:35 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
! #include "tclUnix.h"
  
  /*
   * The variable below caches the name of the current working directory
***************
*** 239,314 ****
      int argc;				/* Number of arguments. */
      char **argv;			/* Argument strings. */
  {
- #ifdef VMS 
-      char		*cmd;
-      char		buffer[256];
-      char		outname[256];
-      int			status, result;
-      int			i;
-      int			flags;
-      FILE		*out;
-      struct {
-      	int	l;
-      	char	*a;
-      } cmdDesc, outDesc;
- #else	/* !VMS */
      int outputId;			/* File id for output pipe.  -1
  					 * means command overrode. */
      int errorId;			/* File id for temporary file
  					 * containing error output. */
      int *pidPtr;
      int numPids, result;
- #endif
  
- #ifdef VMS
-       /*
-      	An attempt at asynchronous processes
-      */
-      if ((argv[argc-1][0] == '&') && (argv[argc-1][1] == 0)) {
-  	argc--;
-  	argv[argc] = NULL;
-  	flags = CLI$M_NOWAIT;
-      }
-      else
-      	flags = 0;
-  
-      /*
-      	Create a one liner from all the argv's
-      */
-      cmd = Tcl_Concat(argc-1, argv+1);
-      cmdDesc.l = strlen(cmd);
-      cmdDesc.a = cmd;
-      
-      strcpy(outname, "sys$scratch:tcl-out.XXXXXX");
-      mktemp(outname);
-      outDesc.l = strlen(outname);
-      outDesc.a = outname;
-      status = lib$spawn(&cmdDesc, 0, &outDesc, &flags, 0, 0, &result);
-      if ((status & 1) && ((status = result) & 1)) {
-  	out = fopen(outname, "r");
-  	if (out) {
-      	    while (fgets(buffer, sizeof(buffer), out))		
-  		Tcl_AppendResult(interp, buffer, (char *) NULL);
-  	    fclose(out);
-  	    result = TCL_OK;
-      	}
-     	else {
-  	    Tcl_AppendResult(interp, "error opening output file: ",
-  	    		     Tcl_UnixError(interp), (char *) NULL);
-  	    result = TCL_ERROR;
-      	}
-      }
-      else {
-          errno = EVMSERR;
-          vaxc$errno = status;
-  	Tcl_ResetResult(interp);
-  	Tcl_AppendResult(interp,
-  		"error running command: ", Tcl_UnixError(interp), (char *) NULL);
-  	result = TCL_ERROR;
-      }
-      delete(outname);
-      ckfree(cmd);
- #else	/* !VMS */
      /*
       * See if the command is to be run in background;  if so, create
       * the command, detach it, and return.
--- 236,248 ----
***************
*** 370,376 ****
      if (CleanupChildren(interp, numPids, pidPtr, errorId) != TCL_OK) {
  	result = TCL_ERROR;
      }
- #endif     /* VMS */
      return result;
  }
  
--- 304,309 ----
***************
*** 407,417 ****
  	return TCL_ERROR;
      }
      if (argc == 1) {
! #ifdef VMS
!       exit(1);
! #else /* !VMS */
!       exit(0);
! #endif
      }
      if (Tcl_GetInt(interp, argv[1], &value) != TCL_OK) {
  	return TCL_ERROR;
--- 340,346 ----
  	return TCL_ERROR;
      }
      if (argc == 1) {
! 	exit(0);
      }
      if (Tcl_GetInt(interp, argv[1], &value) != TCL_OK) {
  	return TCL_ERROR;
***************
*** 446,454 ****
      char **argv;			/* Argument strings. */
  {
      char *p;
- #ifdef VMS
-     char piece[256];
- #endif	/* VMS */        
      int length, statOp;
      int mode = 0;			/* Initialized only to prevent
  					 * compiler warning message. */
--- 375,380 ----
***************
*** 479,494 ****
  		    " ", argv[1], " name\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
! #ifdef VMS
!  	interp->result[0] = 0;
!  	if (Tcl_VmsParseFileName(fileName, "node", piece))
!  	    strcat(interp->result, piece);
! 	if (Tcl_VmsParseFileName(fileName, "device", piece))
!  	    strcat(interp->result, piece);
!  	if (Tcl_VmsParseFileName(fileName, "directory", piece))
!  	    strcat(interp->result, piece);
! #else	/* !VMS */
!   	p = strrchr(fileName, '/');
  	if (p == NULL) {
  	    interp->result = ".";
  	} else if (p == fileName) {
--- 405,411 ----
  		    " ", argv[1], " name\"", (char *) NULL);
  	    return TCL_ERROR;
  	}
! 	p = strrchr(fileName, '/');
  	if (p == NULL) {
  	    interp->result = ".";
  	} else if (p == fileName) {
***************
*** 498,504 ****
  	    Tcl_SetResult(interp, fileName, TCL_VOLATILE);
  	    *p = '/';
  	}
- #endif
  	return TCL_OK;
      } else if ((c == 'r') && (strncmp(argv[1], "rootname", length) == 0)
  	    && (length >= 2)) {
--- 415,420 ----
***************
*** 508,517 ****
  	    argv[1] = "rootname";
  	    goto not3Args;
  	}
! #ifdef VMS
!  	Tcl_VmsParseFileName(fileName, "name", interp->result);
! #else	/* !VMS */
!  	p = strrchr(fileName, '.');
  	lastSlash = strrchr(fileName, '/');
  	if ((p == NULL) || ((lastSlash != NULL) && (lastSlash > p))) {
  	    Tcl_SetResult(interp, fileName, TCL_VOLATILE);
--- 424,430 ----
  	    argv[1] = "rootname";
  	    goto not3Args;
  	}
! 	p = strrchr(fileName, '.');
  	lastSlash = strrchr(fileName, '/');
  	if ((p == NULL) || ((lastSlash != NULL) && (lastSlash > p))) {
  	    Tcl_SetResult(interp, fileName, TCL_VOLATILE);
***************
*** 520,526 ****
  	    Tcl_SetResult(interp, fileName, TCL_VOLATILE);
  	    *p = '.';
  	}
- #endif         /* VMS */
  	return TCL_OK;
      } else if ((c == 'e') && (strncmp(argv[1], "extension", length) == 0)
  	    && (length >= 3)) {
--- 433,438 ----
***************
*** 530,544 ****
  	    argv[1] = "extension";
  	    goto not3Args;
  	}
! #ifdef VMS
!  	Tcl_VmsParseFileName(fileName, "extension", interp->result);
! #else	/* !VMS */
!  	p = strrchr(fileName, '.');
  	lastSlash = strrchr(fileName, '/');
  	if ((p != NULL) && ((lastSlash == NULL) || (lastSlash < p))) {
  	    Tcl_SetResult(interp, p, TCL_VOLATILE);
  	}
- #endif
  	return TCL_OK;
      } else if ((c == 't') && (strncmp(argv[1], "tail", length) == 0)
  	    && (length >= 2)) {
--- 442,452 ----
  	    argv[1] = "extension";
  	    goto not3Args;
  	}
! 	p = strrchr(fileName, '.');
  	lastSlash = strrchr(fileName, '/');
  	if ((p != NULL) && ((lastSlash == NULL) || (lastSlash < p))) {
  	    Tcl_SetResult(interp, p, TCL_VOLATILE);
  	}
  	return TCL_OK;
      } else if ((c == 't') && (strncmp(argv[1], "tail", length) == 0)
  	    && (length >= 2)) {
***************
*** 1639,1647 ****
      double timePer;
  #if TCL_GETTOD
      struct timeval start, stop;
- #ifndef VMS
      struct timezone tz;
- #endif
      int micros;
  #else
      struct tms dummy2;
--- 1547,1553 ----
***************
*** 1660,1670 ****
  	return TCL_ERROR;
      }
  #if TCL_GETTOD
- #ifdef VMS
-     gettimeofday(&start, (struct timezone *)NULL);
- #else
      gettimeofday(&start, &tz);
- #endif
  #else
      start = times(&dummy2);
  #endif
--- 1566,1572 ----
***************
*** 1681,1691 ****
  	}
      }
  #if TCL_GETTOD
! #ifdef VMS
!     gettimeofday(&start, (struct timezone *)NULL);
! #else
!     gettimeofday(&start, &tz);
! #endif
      micros = (stop.tv_sec - start.tv_sec)*1000000
  	    + (stop.tv_usec - start.tv_usec);
      timePer = micros;
--- 1583,1589 ----
  	}
      }
  #if TCL_GETTOD
!     gettimeofday(&stop, &tz);
      micros = (stop.tv_sec - start.tv_sec)*1000000
  	    + (stop.tv_usec - start.tv_usec);
      timePer = micros;
***************
*** 1824,1842 ****
  
      return result;
  }
- 
- #ifdef VMS
- gettimeofday(struct timeval *tv, struct timezone *timezone)
-  {
-      /*
-      	Emulate unix's gettimeofday call
-      */
-      long	quadTime[2];
-      time_t	shell$fix_time();
-  
-      sys$gettim(quadTime);
-      tv->tv_sec = shell$fix_time(quadTime);
-      tv->tv_usec = 0;
-  }
- #endif	/* VMS */eturn result;
- 
--- 1722,1724 ----
Only in .: tclunixaz.obj
diff -c ./tclunixstr.c /src/users/damania/Pursuits/tcl/tclunixstr.c
*** ./tclunixstr.c	Mon Mar 29 14:51:39 1993
--- /src/users/damania/Pursuits/tcl/tclunixstr.c	Tue Mar 30 07:44:14 1993
***************
*** 19,26 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixStr.c,v 1.14 93/01/29 14:42:51 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
! #include "tclunix.h"
  
  /*
   *----------------------------------------------------------------------
--- 19,26 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixStr.c,v 1.14 93/01/29 14:42:51 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
! #include "tclUnix.h"
  
  /*
   *----------------------------------------------------------------------
Only in .: tclunixstr.obj
diff -c ./tclunixutil.c /src/users/damania/Pursuits/tcl/tclunixutil.c
*** ./tclunixutil.c	Mon Mar 29 14:51:43 1993
--- /src/users/damania/Pursuits/tcl/tclunixutil.c	Tue Mar 30 07:44:14 1993
***************
*** 24,31 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixUtil.c,v 1.19 93/01/08 08:41:00 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclint.h"
! #include "tclunix.h"
  
  /*
   * Data structures of the following type are used by Tcl_Fork and
--- 24,31 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUnixUtil.c,v 1.19 93/01/08 08:41:00 ouster Exp $ SPRITE (Berkeley)";
  #endif /* not lint */
  
! #include "tclInt.h"
! #include "tclUnix.h"
  
  /*
   * Data structures of the following type are used by Tcl_Fork and
***************
*** 111,158 ****
  	goto error;
      }
      cmdBuffer = (char *) ckalloc((unsigned) statBuf.st_size+1);
! #ifdef VMS
!      {
! 	char		aBuffer[512];
!  	int		l;
!  	int		cLen = 0;
!  	int		maxLen = statBuf.st_size+1;
!  
!  	cmdBuffer[0] = 0;
!  	while ((l = read(fileId, aBuffer, sizeof(aBuffer))) > 0) {
!  	    aBuffer[l] = 0;
!  	    if (cLen + l + 1 > maxLen) {
!  		cmdBuffer = realloc(cmdBuffer, 2 * maxLen);
!  		maxLen *= 2;
!  	    }
!  	    strcat(cmdBuffer, aBuffer);
!  	    cLen += l+1;
!  	}
!  	if (l < 0) {
!  	    Tcl_AppendResult(interp, "error in reading file \"", fileName,
!  		"\": ", Tcl_UnixError(interp), (char *) NULL);
!  	    close(fileId);
!  	    goto error;
!  	}
!      }
! #else
!   if (read(fileId, cmdBuffer, (int) statBuf.st_size) != statBuf.st_size) {
  	Tcl_AppendResult(interp, "error in reading file \"", fileName,
  		"\": ", Tcl_UnixError(interp), (char *) NULL);
  	close(fileId);
  	ckfree(cmdBuffer);
  	goto error;
      }
- #endif
      if (close(fileId) != 0) {
  	Tcl_AppendResult(interp, "error closing file \"", fileName,
  		"\": ", Tcl_UnixError(interp), (char *) NULL);
  	ckfree(cmdBuffer);
  	goto error;
      }
- #ifndef VMS
      cmdBuffer[statBuf.st_size] = 0;
- #endif
      result = Tcl_Eval(interp, cmdBuffer, 0, &end);
      if (result == TCL_RETURN) {
  	result = TCL_OK;
--- 111,130 ----
  	goto error;
      }
      cmdBuffer = (char *) ckalloc((unsigned) statBuf.st_size+1);
!     if (read(fileId, cmdBuffer, (int) statBuf.st_size) != statBuf.st_size) {
  	Tcl_AppendResult(interp, "error in reading file \"", fileName,
  		"\": ", Tcl_UnixError(interp), (char *) NULL);
  	close(fileId);
  	ckfree(cmdBuffer);
  	goto error;
      }
      if (close(fileId) != 0) {
  	Tcl_AppendResult(interp, "error closing file \"", fileName,
  		"\": ", Tcl_UnixError(interp), (char *) NULL);
  	ckfree(cmdBuffer);
  	goto error;
      }
      cmdBuffer[statBuf.st_size] = 0;
      result = Tcl_Eval(interp, cmdBuffer, 0, &end);
      if (result == TCL_RETURN) {
  	result = TCL_OK;
***************
*** 590,600 ****
  	     * Immediate data in command.  Create temporary file and
  	     * put data into file.
  	     */
! #ifdef VMS
! #	    define TMP_STDIN_NAME "/sys$scratch/tclin.XXXXXX"
! #else
  #	    define TMP_STDIN_NAME "/tmp/tcl.in.XXXXXX"
- #endif
  	    char inName[sizeof(TMP_STDIN_NAME) + 1];
  	    int length;
  
--- 562,569 ----
  	     * Immediate data in command.  Create temporary file and
  	     * put data into file.
  	     */
! 
  #	    define TMP_STDIN_NAME "/tmp/tcl.in.XXXXXX"
  	    char inName[sizeof(TMP_STDIN_NAME) + 1];
  	    int length;
  
***************
*** 614,624 ****
  			Tcl_UnixError(interp), (char *) NULL);
  		goto error;
  	    }
- #ifdef VMS
-  	    if ((lseek(inputId, 0L, 0) == -1)) {
- #else
  	    if ((lseek(inputId, 0L, 0) == -1) || (unlink(inName) == -1)) {
- #endif
  		Tcl_AppendResult(interp,
  			"couldn't reset or remove input file for command: ",
  			Tcl_UnixError(interp), (char *) NULL);
--- 583,589 ----
***************
*** 692,702 ****
       */
  
      if (errFilePtr != NULL) {
- #ifdef VMS
- #	define TMP_STDERR_NAME "/sys$scratch/tclerr.XXXXXX"
- #else
  #	define TMP_STDERR_NAME "/tmp/tcl.err.XXXXXX"
- #endif
  	char errName[sizeof(TMP_STDERR_NAME) + 1];
  
  	strcpy(errName, TMP_STDERR_NAME);
--- 657,663 ----
***************
*** 875,885 ****
      char *id, *msg;
  
      id = Tcl_ErrnoId();
- #ifdef VMS
-      if (errno == EVMSERR)
-  	msg = strerror(errno, vaxc$errno);
-      else
- #endif
      msg = strerror(errno);
      Tcl_SetErrorCode(interp, "UNIX", id, msg, (char *) NULL);
      return msg;
--- 836,841 ----
Only in .: tclunixutil.obj
diff -c ./tclutil.c /src/users/damania/Pursuits/tcl/tclutil.c
*** ./tclutil.c	Mon Mar 29 14:51:46 1993
--- /src/users/damania/Pursuits/tcl/tclutil.c	Tue Mar 30 07:44:14 1993
***************
*** 18,24 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUtil.c,v 1.66 92/10/21 16:12:01 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * The following values are used in the flags returned by Tcl_ScanElement
--- 18,24 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclUtil.c,v 1.66 92/10/21 16:12:01 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * The following values are used in the flags returned by Tcl_ScanElement
Only in .: tclutil.obj
diff -c ./tclvar.c /src/users/damania/Pursuits/tcl/tclvar.c
*** ./tclvar.c	Mon Mar 29 14:51:51 1993
--- /src/users/damania/Pursuits/tcl/tclvar.c	Tue Mar 30 07:44:16 1993
***************
*** 22,28 ****
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclVar.c,v 1.29 93/01/29 11:33:05 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclint.h"
  
  /*
   * The strings below are used to indicate what went wrong when a
--- 22,28 ----
  static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/tclVar.c,v 1.29 93/01/29 11:33:05 ouster Exp $ SPRITE (Berkeley)";
  #endif
  
! #include "tclInt.h"
  
  /*
   * The strings below are used to indicate what went wrong when a
Only in .: tclvar.obj
Only in .: tclvms.c
Only in .: tclvms.obj
Only in .: tests
Only in .: vaxcrtl.opt
