summaryrefslogtreecommitdiffstats
path: root/wintools
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2012-06-10 09:29:31 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2012-06-10 09:29:31 (GMT)
commitebe3e096190d80dca16d3c25755682fbdda37d14 (patch)
tree6709ddc7b1764dc3b20bbac7eb36c05edcc91e03 /wintools
parentf397aa6aa3e425c97c7bff085ea1aff7b479d7e8 (diff)
downloadDoxygen-Release_1_8_1_1.zip
Doxygen-Release_1_8_1_1.tar.gz
Doxygen-Release_1_8_1_1.tar.bz2
Release-1.8.1.1Release_1_8_1_1
Diffstat (limited to 'wintools')
0 files changed, 0 insertions, 0 deletions
option> Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--ChangeLog68
-rw-r--r--compat/strtoll.c106
-rw-r--r--compat/strtoull.c245
-rw-r--r--doc/Access.37
-rw-r--r--doc/FileSystem.325
-rw-r--r--doc/GetIndex.34
-rw-r--r--doc/IntObj.391
-rw-r--r--doc/LinkVar.321
-rw-r--r--doc/binary.n54
-rw-r--r--doc/expr.n23
-rw-r--r--doc/format.n7
-rw-r--r--doc/scan.n56
-rw-r--r--doc/tclvars.n12
-rw-r--r--generic/tcl.decls460
-rw-r--r--generic/tcl.h292
-rw-r--r--generic/tclBasic.c5
-rw-r--r--generic/tclBinary.c78
-rw-r--r--generic/tclCmdAH.c191
-rw-r--r--generic/tclCmdIL.c28
-rw-r--r--generic/tclCmdMZ.c12
-rw-r--r--generic/tclCompile.h7
-rw-r--r--generic/tclDecls.h95
-rw-r--r--generic/tclExecute.c1299
-rw-r--r--generic/tclFCmd.c16
-rw-r--r--generic/tclFileName.c28
-rw-r--r--generic/tclIO.c103
-rw-r--r--generic/tclIOCmd.c13
-rw-r--r--generic/tclIOGT.c41
-rw-r--r--generic/tclIOUtil.c86
-rw-r--r--generic/tclIndexObj.c227
-rw-r--r--generic/tclInt.decls191
-rw-r--r--generic/tclInt.h18
-rw-r--r--generic/tclIntDecls.h10
-rw-r--r--generic/tclInterp.c4
-rw-r--r--generic/tclLink.c234
-rw-r--r--generic/tclObj.c424
-rw-r--r--generic/tclParseExpr.c6
-rw-r--r--generic/tclPipe.c4
-rw-r--r--generic/tclPort.h22
-rw-r--r--generic/tclScan.c123
-rw-r--r--generic/tclStubInit.c13
-rw-r--r--generic/tclTest.c169
-rw-r--r--generic/tclTestObj.c29
-rw-r--r--generic/tclVar.c118
-rw-r--r--mac/tclMacChan.c30
-rw-r--r--mac/tclMacFile.c8
-rw-r--r--tests/binary.test30
-rw-r--r--tests/execute.test145
-rw-r--r--tests/format.test19
-rw-r--r--tests/get.test12
-rw-r--r--tests/info.test6
-rw-r--r--tests/io.test34
-rw-r--r--tests/link.test232
-rw-r--r--tests/platform.test24
-rw-r--r--tests/safe.test16
-rw-r--r--tests/scan.test11
-rw-r--r--tests/string.test4
-rw-r--r--unix/Makefile.in8
-rwxr-xr-xunix/configure1168
-rw-r--r--unix/configure.in81
-rw-r--r--unix/mkLinks14
-rw-r--r--unix/tcl.m4250
-rw-r--r--unix/tclLoadAout.c11
-rw-r--r--unix/tclUnixChan.c31
-rw-r--r--unix/tclUnixFCmd.c56
-rw-r--r--unix/tclUnixFile.c44
-rw-r--r--unix/tclUnixPipe.c8
-rw-r--r--unix/tclUnixPort.h35
-rw-r--r--unix/tclUnixThrd.c8
-rw-r--r--win/Makefile.in4
-rw-r--r--win/makefile.bc2
-rw-r--r--win/makefile.vc4
-rw-r--r--win/tclWinChan.c36
-rw-r--r--win/tclWinFile.c30
-rw-r--r--win/tclWinMtherr.c8
-rw-r--r--win/tclWinPort.h13
76 files changed, 5280 insertions, 2167 deletions
diff --git a/ChangeLog b/ChangeLog
index 3684a32..8145081 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,71 @@
+2002-02-15 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ +----------------------+
+ | TIP #72 IMPLEMENTED. |
+ +----------------------+
+
+ There are a lot of changes from this TIP, so please see
+ http://purl.org/tcl/tip/72.html for discussion of
+ backward-compatability issues, but the main ones modifications are
+ in:
+
+ * generic/tcl.h: New types.
+ * generic/tcl.decls: New public functions.
+ * generic/tclExecute.c: 64-bit aware bytecode engine.
+ * generic/tclBinary.c: 64-bit handling in [binary] command.
+ * generic/tclScan.c: 64-bit handling in [scan] command.
+ * generic/tclCmdAH.c: 64-bit handling in [file] and [format]
+ commands.
+ * generic/tclBasic.c: New "wordSize" entry in ::tcl_platform.
+ * generic/tclFCmd.c: Large-file support (with many consequences.)
+ * generic/tclIO.c: Large-file support (with many consequences.)
+ * compat/strtoll.c, compat/strtoull.c: New support functions.
+ * unix/tcl.m4, unix/configure: 64-bit support and greatly enhanced
+ cacheing.
+
+ Most other changes, including all those in doc/* and test/* as
+ well as the majority in the platform directories, follow on from
+ these.
+
+ Also coming out of the woodwork:
+ * generic/tclIndex.c: Better support for Cray PVP.
+ * win/tclWinMtherr.c: Better Borland support.
+
+ Note that, in a number of places through the Unix part of the
+ platform support, there are Tcl_Platform* references. These are
+ expanded into the correct way to call that particular underlying
+ function, i.e. with or without a '64' suffix, and should be used
+ by people working on the core in preference to the API functions
+ they overlay so that the code remains portable depending on the
+ presence or absence of 64-bit support on the underlying platform.
+
+ ***POTENTIAL INCOMPATIBILITY***: Extracted from the TIP
+
+ SUMMARY OF INCOMPATIBILITIES AND FIXES
+ ======================================
+
+ The behaviour of expressions containing constants that appear
+ positive but which have a negative internal representation will
+ change, as these will now usually be interpreted as wide
+ integers. This is always fixable by replacing the constant with
+ int(constant).
+
+ Extensions creating new channel types will need to be altered as
+ different types are now in use in those areas. The change to the
+ declaration of Tcl_FSStat and Tcl_FSLstat (which are the new
+ preferred API in any case) are less serious as no non-alpha
+ releases have been made yet with those API functions.
+
+ Scripts that are lax about the use of the l modifier in format and
+ scan will probably need to be rewritten. This should be very
+ uncommon though as previously it had absolutely no effect.
+
+ Extensions that create new math functions that take more than one
+ argument will need to be recompiled (the size of Tcl_Value
+ changes), and functions that accept arguments of any type
+ (TCL_EITHER) will need to be rewritten to handle wide integer
+ values. (I do not expect this to affect many extensions at all.)
+
2002-02-14 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tclIOCmd.c (Tcl_GetsObjCmd): Trivial fix for bug
diff --git a/compat/strtoll.c b/compat/strtoll.c
new file mode 100644
index 0000000..2872006
--- /dev/null
+++ b/compat/strtoll.c
@@ -0,0 +1,106 @@
+/*
+ * strtoll.c --
+ *
+ * Source code for the "strtoll" library procedure.
+ *
+ * Copyright (c) 1988 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: strtoll.c,v 1.2 2002/02/15 14:28:47 dkf Exp $
+ */
+
+#include "tcl.h"
+#include "tclPort.h"
+#include <ctype.h>
+
+#define TCL_WIDEINT_MAX (((Tcl_WideUInt)Tcl_LongAsWide(-1))>>1)
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtol --
+ *
+ * Convert an ASCII string into an integer.
+ *
+ * Results:
+ * The return value is the integer equivalent of string. If endPtr
+ * is non-NULL, then *endPtr is filled in with the character
+ * after the last one that was part of the integer. If string
+ * doesn't contain a valid integer value, then zero is returned
+ * and *endPtr is set to string.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_WideInt
+strtoll(string, endPtr, base)
+ char *string; /* String of ASCII digits, possibly
+ * preceded by white space. For bases
+ * greater than 10, either lower- or
+ * upper-case digits may be used.
+ */
+ char **endPtr; /* Where to store address of terminating
+ * character, or NULL. */
+ int base; /* Base for conversion. Must be less
+ * than 37. If 0, then the base is chosen
+ * from the leading characters of string:
+ * "0x" means hex, "0" means octal, anything
+ * else means decimal.
+ */
+{
+ register char *p;
+ Tcl_WideInt result;
+ Tcl_WideUInt uwResult;
+
+ /*
+ * Skip any leading blanks.
+ */
+
+ p = string;
+ while (isspace(*p)) {
+ p += 1;
+ }
+
+ /*
+ * Check for a sign.
+ */
+
+ if (*p == '-') {
+ p += 1;
+ uwResult = strtoull(p, endPtr, base);
+ if (errno != ERANGE) {
+ if (uwResult > TCL_WIDEINT_MAX+1) {
+ errno = ERANGE;
+ return Tcl_LongAsWide(-1);
+ } else if (uwResult > TCL_WIDEINT_MAX) {
+ return ~((Tcl_WideInt)TCL_WIDEINT_MAX);
+ } else {
+ result = -uwResult;
+ }
+ }
+ } else {
+ if (*p == '+') {
+ p += 1;
+ }
+ uwResult = strtoull(p, endPtr, base);
+ if (errno != ERANGE) {
+ if (uwResult > TCL_WIDEINT_MAX) {
+ errno = ERANGE;
+ return Tcl_LongAsWide(-1);
+ } else {
+ result = uwResult;
+ }
+ }
+ }
+ if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
+ *endPtr = string;
+ }
+ return result;
+}
diff --git a/compat/strtoull.c b/compat/strtoull.c
new file mode 100644
index 0000000..8658eb0
--- /dev/null
+++ b/compat/strtoull.c
@@ -0,0 +1,245 @@
+/*
+ * strtoull.c --
+ *
+ * Source code for the "strtoull" library procedure.
+ *
+ * Copyright (c) 1988 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: strtoull.c,v 1.2 2002/02/15 14:28:47 dkf Exp $
+ */
+
+#include "tcl.h"
+#include "tclPort.h"
+#include <ctype.h>
+
+/*
+ * The table below is used to convert from ASCII digits to a
+ * numerical equivalent. It maps from '0' through 'z' to integers
+ * (100 for non-digit characters).
+ */
+
+static char cvtIn[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */
+ 100, 100, 100, 100, 100, 100, 100, /* punctuation */
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35,
+ 100, 100, 100, 100, 100, 100, /* punctuation */
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'a' - 'z' */
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35};
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtoull --
+ *
+ * Convert an ASCII string into an integer.
+ *
+ * Results:
+ * The return value is the integer equivalent of string. If endPtr
+ * is non-NULL, then *endPtr is filled in with the character
+ * after the last one that was part of the integer. If string
+ * doesn't contain a valid integer value, then zero is returned
+ * and *endPtr is set to string.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_WideUInt
+strtoull(string, endPtr, base)
+ char *string; /* String of ASCII digits, possibly
+ * preceded by white space. For bases
+ * greater than 10, either lower- or
+ * upper-case digits may be used.
+ */
+ char **endPtr; /* Where to store address of terminating
+ * character, or NULL. */
+ int base; /* Base for conversion. Must be less
+ * than 37. If 0, then the base is chosen
+ * from the leading characters of string:
+ * "0x" means hex, "0" means octal, anything
+ * else means decimal.
+ */
+{
+ register char *p;
+ register Tcl_WideUInt result = 0;
+ register unsigned digit;
+ register Tcl_WideUInt shifted;
+ int anyDigits = 0, negative = 0;
+
+ /*
+ * Skip any leading blanks.
+ */
+
+ p = string;
+ while (isspace(*p)) { /* INTL: locale-dependent */
+ p += 1;
+ }
+
+ /*
+ * Check for a sign.
+ */
+
+ if (*p == '-') {
+ p += 1;
+ negative = 1;
+ } else {
+ if (*p == '+') {
+ p += 1;
+ }
+ }
+
+ /*
+ * If no base was provided, pick one from the leading characters
+ * of the string.
+ */
+
+ if (base == 0) {
+ if (*p == '0') {
+ p += 1;
+ if (*p == 'x' || *p == 'X') {
+ p += 1;
+ base = 16;
+ } else {
+
+ /*
+ * Must set anyDigits here, otherwise "0" produces a
+ * "no digits" error.
+ */
+
+ anyDigits = 1;
+ base = 8;
+ }
+ } else {
+ base = 10;
+ }
+ } else if (base == 16) {
+
+ /*
+ * Skip a leading "0x" from hex numbers.
+ */
+
+ if ((p[0] == '0') && (p[1] == 'x' || *p == 'X')) {
+ p += 2;
+ }
+ }
+
+ /*
+ * Sorry this code is so messy, but speed seems important. Do
+ * different things for base 8, 10, 16, and other.
+ */
+
+ if (base == 8) {
+ for ( ; ; p += 1) {
+ digit = *p - '0';
+ if (digit > 7) {
+ break;
+ }
+ shifted = result << 3;
+ if ((shifted >> 3) != result) {
+ goto overflow;
+ }
+ result = shifted + digit;
+ anyDigits = 1;
+ }
+ } else if (base == 10) {
+ for ( ; ; p += 1) {
+ digit = *p - '0';
+ if (digit > 9) {
+ break;
+ }
+ shifted = 10 * result;
+ if ((shifted / 10) != result) {
+ goto overflow;
+ }
+ result = shifted + digit;
+ anyDigits = 1;
+ }
+ } else if (base == 16) {
+ for ( ; ; p += 1) {
+ digit = *p - '0';
+ if (digit > ('z' - '0')) {
+ break;
+ }
+ digit = cvtIn[digit];
+ if (digit > 15) {
+ break;
+ }
+ shifted = result << 4;
+ if ((shifted >> 4) != result) {
+ goto overflow;
+ }
+ result = shifted + digit;
+ anyDigits = 1;
+ }
+ } else {
+ for ( ; ; p += 1) {
+ digit = *p - '0';
+ if (digit > ('z' - '0')) {
+ break;
+ }
+ digit = cvtIn[digit];
+ if (digit >= base) {
+ break;
+ }
+ shifted = result * base;
+ if ((shifted/base) != result) {
+ goto overflow;
+ }
+ result = shifted + digit;
+ anyDigits = 1;
+ }
+ }
+
+ /*
+ * Negate if we found a '-' earlier.
+ */
+
+ if (negative) {
+ result = (Tcl_WideUInt)(-((Tcl_WideInt)result));
+ }
+
+ /*
+ * See if there were any digits at all.
+ */
+
+ if (!anyDigits) {
+ p = string;
+ }
+
+ if (endPtr != 0) {
+ *endPtr = p;
+ }
+
+ return result;
+
+ /*
+ * On overflow generate the right output
+ */
+
+ overflow:
+ errno = ERANGE;
+ if (endPtr != 0) {
+ for ( ; ; p += 1) {
+ digit = *p - '0';
+ if (digit > ('z' - '0')) {
+ break;
+ }
+ digit = cvtIn[digit];
+ if (digit >= base) {
+ break;
+ }
+ }
+ *endPtr = p;
+ }
+ return (Tcl_WideUInt)Tcl_LongAsWide(-1);
+}
diff --git a/doc/Access.3 b/doc/Access.3
index c603a1c..6830694 100644
--- a/doc/Access.3
+++ b/doc/Access.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Access.3,v 1.6 2002/01/29 02:28:20 hobbs Exp $
+'\" RCS: @(#) $Id: Access.3,v 1.7 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures"
@@ -21,7 +21,7 @@ int
int
\fBTcl_Stat\fR(\fIpath\fR, \fIstatPtr\fR)
.SH ARGUMENTS
-.AS stat *statPtr in
+.AS "struct stat" *statPtr in
.AP char *path in
Native name of the file to check the attributes of.
.AP int mode in
@@ -29,7 +29,7 @@ Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK,
W_OK and X_OK request checking whether the file exists and has read,
write and execute permissions, respectively. F_OK just requests
checking for the existence of the file.
-.AP stat *statPtr out
+.AP "struct stat" *statPtr out
The structure that contains the result.
.BE
@@ -73,3 +73,4 @@ given.
.SH KEYWORDS
stat, access
+
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 21ef533..cbfa25b 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: FileSystem.3,v 1.18 2002/01/30 17:33:48 vincentdarley Exp $
+'\" RCS: @(#) $Id: FileSystem.3,v 1.19 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH Filesystem 3 8.4 Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSLoadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo \- procedures to interact with any filesystem
+Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSLoadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo, Tcl_AllocStatBuf \- procedures to interact with any filesystem
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -134,6 +134,9 @@ CONST char*
.sp
Tcl_Obj*
\fBTcl_FSFileSystemInfo\fR(\fIpathPtr\fR)
+.sp
+Tcl_StatBuf*
+\fBTcl_AllocStatBuf\fR()
.SH ARGUMENTS
.AS Tcl_Filesystem *fsPtr in
.AP Tcl_Filesystem *fsPtr in
@@ -187,7 +190,7 @@ Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK,
W_OK and X_OK request checking whether the file exists and has read,
write and execute permissions, respectively. F_OK just requests
checking for the existence of the file.
-.AP stat *statPtr out
+.AP Tcl_StatBuf *statPtr out
The structure that contains the result of a stat or lstat operation.
.AP "CONST char" *sym1 in
Name of a procedure to look up in the file's symbol table
@@ -243,6 +246,10 @@ registered, the 'files' may, to give two examples, be remote (e.g.
situated on a remote ftp server) or archived (e.g. lying inside a .zip
archive). Such registered filesystems provide a lookup table of
functions to implement all or some of the functionality listed here.
+Finally, the \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR calls abstract
+away from what the 'struct stat' buffer buffer is actually declared to
+be, allowing the same code to be used both on systems with and systems
+without support for files larger than 2GB in size.
.PP
The \fBTcl_FS...\fR are objectified and may cache internal
representations and other path-related strings (e.g. the current
@@ -565,6 +572,12 @@ absolute.
It returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
TCL_PATH_VOLUME_RELATIVE
.PP
+\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system
+heap (which may be deallocated by being passed to \fBckfree\fR.) This
+allows extensions to invoke \fBTcl_FSStat\fR and \fBTcl_FSLStat\fR
+without being dependent on the size of the buffer. That in turn
+depends on the flags used to build Tcl.
+.PP
.SH TCL_FILESYSTEM
.PP
A filesystem provides a \fBTcl_Filesystem\fR structure that contains
@@ -809,7 +822,7 @@ upon it (e.g. \fBfile atime\fR, \fBfile isdirectory\fR, \fBfile size\fR,
.CS
typedef int Tcl_FSStatProc(
Tcl_Obj *\fIpathPtr\fR,
- struct stat *\fIstatPtr\fR);
+ Tcl_StatBuf *\fIstatPtr\fR);
.CE
.PP
The \fBTcl_FSStatProc\fR fills the stat structure \fIstatPtr\fR with
@@ -1082,7 +1095,7 @@ it need only be implemented if a filesystem can differentiate between
.CS
typedef int Tcl_FSLstatProc(
Tcl_Obj *\fIpathPtr\fR,
- struct stat *\fIstatPtr\fR);
+ Tcl_StatBuf *\fIstatPtr\fR);
.CE
.PP
The behavior of this function is very similar to that of the
@@ -1225,5 +1238,3 @@ directory to the value specified in \fIpathPtr\fR. The function returns
-1 on error or 0 on success.
.SH KEYWORDS
stat access filesystem vfs
-
-
diff --git a/doc/GetIndex.3 b/doc/GetIndex.3
index 06b5ed7..79d3a1e 100644
--- a/doc/GetIndex.3
+++ b/doc/GetIndex.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetIndex.3,v 1.8 2002/01/17 04:37:32 dgp Exp $
+'\" RCS: @(#) $Id: GetIndex.3,v 1.9 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
@@ -34,7 +34,7 @@ The string value of this object is used to search through \fItablePtr\fR.
The internal representation is modified to hold the index of the matching
table entry.
.AP "CONST char" **tablePtr in
-An array of null-terminated strings. The end of the array is marked
+An array of null-terminated ASCII strings. The end of the array is marked
by a NULL string pointer.
.VS
.AP int offset in
diff --git a/doc/IntObj.3 b/doc/IntObj.3
index 6222498..1dc5b0e 100644
--- a/doc/IntObj.3
+++ b/doc/IntObj.3
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: IntObj.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
+'\" RCS: @(#) $Id: IntObj.3,v 1.3 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH Tcl_IntObj 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_NewIntObj, Tcl_NewLongObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_GetIntFromObj, Tcl_GetLongFromObj \- manipulate Tcl objects as integers
+Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj \- manipulate Tcl objects as integers and wide integers
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -21,29 +21,51 @@ Tcl_Obj *
Tcl_Obj *
\fBTcl_NewLongObj\fR(\fIlongValue\fR)
.sp
+.VS 8.4
+Tcl_Obj *
+\fBTcl_NewWideIntObj\fR(\fIwideValue\fR)
+.VE 8.4
+.sp
\fBTcl_SetIntObj\fR(\fIobjPtr, intValue\fR)
.sp
\fBTcl_SetLongObj\fR(\fIobjPtr, longValue\fR)
.sp
+.VS 8.4
+\fBTcl_SetWideIntObj\fR(\fIobjPtr, wideValue\fR)
+.VE 8.4
+.sp
int
\fBTcl_GetIntFromObj\fR(\fIinterp, objPtr, intPtr\fR)
.sp
int
\fBTcl_GetLongFromObj\fR(\fIinterp, objPtr, longPtr\fR)
+.sp
+.VS 8.4
+int
+\fBTcl_GetWideIntFromObj\fR(\fIinterp, objPtr, widePtr\fR)
+.VE 8.4
.SH ARGUMENTS
-.AS Tcl_Interp *interp
+.AS Tcl_WideInt *interp
.AP int intValue in
Integer value used to initialize or set an integer object.
.AP long longValue in
Long integer value used to initialize or set an integer object.
+.AP Tcl_WideInt wideValue in
+.VS 8.4
+Wide integer value (minimum 64-bits wide where supported by the
+compiler) used to initialize or set a wide integer object.
+.VE 8.4
.AP Tcl_Obj *objPtr in/out
-For \fBTcl_SetIntObj\fR and \fBTcl_SetLongObj\fR,
-this points to the object to be converted to integer type.
-For \fBTcl_GetIntFromObj\fR and \fBTcl_GetLongFromObj\fR,
-this refers to the object
-from which to get an integer or long integer value;
-if \fIobjPtr\fR does not already point to an integer object,
-an attempt will be made to convert it to one.
+For \fBTcl_SetIntObj\fR, \fBTcl_SetLongObj\fR, and
+.VS 8.4
+\fBTcl_SetWideIntObj\fR, this points to the object to be converted to
+integer type. For \fBTcl_GetIntFromObj\fR, \fBTcl_GetLongFromObj\fR,
+and \fBTcl_GetWideIntFromObj\fR, this refers to the object from which
+to get an integer or long integer value; if \fIobjPtr\fR does not
+already point to an integer object (or a wide integer object in the
+case of \fBTcl_SetWideIntObj\fR and \fBTcl_GetWideIntFromObj\fR,) an
+.VE 8.4
+attempt will be made to convert it to one.
.AP Tcl_Interp *interp in/out
If an error occurs during conversion,
an error message is left in the interpreter's result object
@@ -54,34 +76,54 @@ obtained by \fBTcl_GetIntFromObj\fR from \fIobjPtr\fR.
.AP long *longPtr out
Points to place to store the long integer value
obtained by \fBTcl_GetLongFromObj\fR from \fIobjPtr\fR.
+.AP Tcl_WideInt *widePtr out
+.VS 8.4
+Points to place to store the wide integer value
+obtained by \fBTcl_GetWideIntFromObj\fR from \fIobjPtr\fR.
+.VE 8.4
.BE
.SH DESCRIPTION
.PP
These procedures are used to create, modify, and read
-integer Tcl objects from C code.
+integer and wide integer Tcl objects from C code.
\fBTcl_NewIntObj\fR, \fBTcl_NewLongObj\fR,
\fBTcl_SetIntObj\fR, and \fBTcl_SetLongObj\fR
create a new object of integer type
-or modify an existing object to have integer type.
+or modify an existing object to have integer type,
+.VS 8.4
+and \fBTcl_NewWideIntObj\fR and \fBTcl_SetWideIntObj\fR create a new
+object of wide integer type or modify an existing object to have wide
+integer type.
+.VE 8.4
\fBTcl_NewIntObj\fR and \fBTcl_SetIntObj\fR set the object to have the
integer value given by \fIintValue\fR,
-while \fBTcl_NewLongObj\fR and \fBTcl_SetLongObj\fR
+\fBTcl_NewLongObj\fR and \fBTcl_SetLongObj\fR
set the object to have the
-long integer value given by \fIlongValue\fR.
-\fBTcl_NewIntObj\fR and \fBTcl_NewLongObj\fR
+long integer value given by \fIlongValue\fR,
+.VS 8.4
+and \fBTcl_NewWideIntObj\fR and \fBTcl_SetWideIntObj\fR set the object
+to have the wide integer value given by \fIwideValue\fR.
+\fBTcl_NewIntObj\fR, \fBTcl_NewLongObj\fR and \fBTcl_NewWideIntObj\fR
return a pointer to a newly created object with reference count zero.
These procedures set the object's type to be integer
and assign the integer value to the object's internal representation
-\fIlongValue\fR member.
-\fBTcl_SetIntObj\fR and \fBTcl_SetLongObj\fR
+\fIlongValue\fR or \fIwideValue\fR member (as appropriate).
+\fBTcl_SetIntObj\fR, \fBTcl_SetLongObj\fR
+and \fBTcl_SetWideIntObj\fR
+.VE 8.4
invalidate any old string representation and,
if the object is not already an integer object,
free any old internal representation.
.PP
\fBTcl_GetIntFromObj\fR and \fBTcl_GetLongFromObj\fR
-attempt to return an integer value from the Tcl object \fIobjPtr\fR.
+attempt to return an integer value from the Tcl object \fIobjPtr\fR,
+.VS 8.4
+and \fBTcl_GetWideIntFromObj\fR attempts to return a wide integer
+value from the Tcl object \fIobjPtr\fR.
If the object is not already an integer object,
+or a wide integer object in the case of \fBTcl_GetWideIntFromObj\fR
+.VE 8.4
they will attempt to convert it to one.
If an error occurs during conversion, they return \fBTCL_ERROR\fR
and leave an error message in the interpreter's result object
@@ -91,11 +133,14 @@ Also, if the long integer held in the object's internal representation
\fBTcl_GetIntFromObj\fR returns \fBTCL_ERROR\fR
and leaves an error message in the interpreter's result object
unless \fIinterp\fR is NULL.
-Otherwise, both procedures return \fBTCL_OK\fR and
-store the integer or the long integer value
-in the address given by \fIintPtr\fR and \fIlongPtr\fR respectively.
-If the object is not already an integer object,
-the conversion will free any old internal representation.
+Otherwise, all three procedures return \fBTCL_OK\fR and
+store the integer, long integer value
+.VS 8.4
+or wide integer in the address given by \fIintPtr\fR, \fIlongPtr\fR
+and \fIwidePtr\fR
+.VE 8.4
+respectively. If the object is not already an integer or wide integer
+object, the conversion will free any old internal representation.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index 0a4a58f..48d4f9e 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: LinkVar.3,v 1.3 2000/04/14 23:01:51 hobbs Exp $
+'\" RCS: @(#) $Id: LinkVar.3,v 1.4 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
@@ -34,6 +34,9 @@ temporary modifications to it while parsing the variable name.
Address of C variable that is to be linked to \fIvarName\fR.
.AP int type in
Type of C variable. Must be one of TCL_LINK_INT, TCL_LINK_DOUBLE,
+.VS 8.4
+TCL_LINK_WIDE_INT,
+.VE 8.4
TCL_LINK_BOOLEAN, or TCL_LINK_STRING, optionally OR'ed with
TCL_LINK_READ_ONLY to make Tcl variable read-only.
.BE
@@ -58,17 +61,27 @@ TCL_LINK_READ_ONLY:
\fBTCL_LINK_INT\fR
The C variable is of type \fBint\fR.
Any value written into the Tcl variable must have a proper integer
-form acceptable to \fBTcl_GetInt\fR; attempts to write
+form acceptable to \fBTcl_GetIntFromObj\fR; attempts to write
non-integer values into \fIvarName\fR will be rejected with
Tcl errors.
.TP
\fBTCL_LINK_DOUBLE\fR
The C variable is of type \fBdouble\fR.
Any value written into the Tcl variable must have a proper real
-form acceptable to \fBTcl_GetDouble\fR; attempts to write
+form acceptable to \fBTcl_GetDoubleFromObj\fR; attempts to write
non-real values into \fIvarName\fR will be rejected with
Tcl errors.
.TP
+\fBTCL_LINK_WIDE_INT\fR
+.VS 8.4
+The C variable is of type \fBTcl_WideInt\fR (which is an integer type
+at least 64-bits wide on all platforms that can support it.)
+Any value written into the Tcl variable must have a proper integer
+form acceptable to \fBTcl_GetWideIntFromObj\fR; attempts to write
+non-integer values into \fIvarName\fR will be rejected with
+Tcl errors.
+.VE 8.4
+.TP
\fBTCL_LINK_BOOLEAN\fR
The C variable is of type \fBint\fR.
If its value is zero then it will read from Tcl as ``0'';
@@ -76,7 +89,7 @@ otherwise it will read from Tcl as ``1''.
Whenever \fIvarName\fR is
modified, the C variable will be set to a 0 or 1 value.
Any value written into the Tcl variable must have a proper boolean
-form acceptable to \fBTcl_GetBoolean\fR; attempts to write
+form acceptable to \fBTcl_GetBooleanFromObj\fR; attempts to write
non-boolean values into \fIvarName\fR will be rejected with
Tcl errors.
.TP
diff --git a/doc/binary.n b/doc/binary.n
index 0369457..19fed15 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: binary.n,v 1.7 2001/10/04 08:31:52 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.8 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -199,6 +199,30 @@ For example,
will return a string equivalent to
\fB\\x00\\x00\\x00\\x03\\xff\\xff\\xff\\xfd\\x00\\x01\\x00\\x00\fR
.RE
+.IP \fBw\fR 5
+.VS 8.4
+This form is the same as \fBw\fR except that it stores one or more
+64-bit integers in little-endian byte order in the output string. The
+low-order 64-bits of each integer are stored as an eight-byte value at
+the cursor position with the least significant byte stored first. For
+example,
+.RS
+.CS
+\fBbinary format w 7810179016327718216\fR
+.CE
+will return the string \fBHelloTcl\fR
+.RE
+.IP \fBW\fR 5
+This form is the same as \fBw\fR except that it stores one or more one
+or more 64-bit integers in big-endian byte order in the output string.
+For example,
+.RS
+.CS
+\fBbinary format W 4785469626960341345\fR
+.CE
+will return the string \fBBigEndian\fR
+.VE
+.RE
.IP \fBf\fR 5
This form is the same as \fBc\fR except that it stores one or more one
or more single-precision floating in the machine's native
@@ -463,6 +487,34 @@ order. For example,
will return \fB2\fR with \fB5 7\fR stored in \fBvar1\fR and \fB-16\fR
stored in \fBvar2\fR.
.RE
+.IP \fBw\fR 5
+.VS 8.4
+The data is interpreted as \fIcount\fR 64-bit signed integers
+represented in little-endian byte order. The integers are stored in
+the corresponding variable as a list. If \fIcount\fR is \fB*\fR, then
+all of the remaining bytes in \fBstring\fR will be scanned. If
+\fIcount\fR is omitted, then one 64-bit integer will be scanned. For
+example,
+.RS
+.CS
+\fBbinary scan \\x05\\x00\\x00\\x00\\x07\\x00\\x00\\x00\\xf0\\xff\\xff\\xff wi* var1 var2\fR
+.CE
+will return \fB2\fR with \fB30064771077\fR stored in \fBvar1\fR and
+\fB-16\fR stored in \fBvar2\fR. Note that the integers returned are
+signed and cannot be represented by Tcl as unsigned values.
+.RE
+.IP \fBW\fR 5
+This form is the same as \fBw\fR except that the data is interpreted
+as \fIcount\fR 64-bit signed integers represented in big-endian byte
+order. For example,
+.RS
+.CS
+\fBbinary scan \\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x07\\xff\\xff\\xff\\xf0 WI* var1 var2\fR
+.CE
+will return \fB2\fR with \fB21474836487\fR stored in \fBvar1\fR and \fB-16\fR
+stored in \fBvar2\fR.
+.VE
+.RE
.IP \fBf\fR 5
The data is interpreted as \fIcount\fR single-precision floating point
numbers in the machine's native representation. The floating point
diff --git a/doc/expr.n b/doc/expr.n
index abf760a..41db0fe 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: expr.n,v 1.6 2001/12/03 10:42:47 dkf Exp $
+'\" RCS: @(#) $Id: expr.n,v 1.7 2002/02/15 14:28:47 dkf Exp $
'\"
.so man.macros
.TH expr n 8.4 Tcl "Tcl Built-In Commands"
@@ -55,6 +55,13 @@ If no numeric interpretation is possible, then an operand is left
as a string (and only a limited set of operators may be applied to
it).
.PP
+.VS 8.4
+On 32-bit systems, integer values MAX_INT (0x7FFFFFFF) and MIN_INT
+(-0x80000000) will be represented as 32-bit values, and integer values
+outside that range will be represented as 64-bit values (if that is
+possible at all.)
+.VE 8.4
+.PP
Operands may be specified in any of the following ways:
.IP [1]
As an numeric value, either integer or floating-point.
@@ -251,8 +258,12 @@ Computes the length of the hypotenuse of a right-angled triangle
\fBsqrt(\fIx\fR*\fIx\fR+\fIy\fR*\fIy\fB)\fR.
.TP
\fBint(\fIarg\fB)\fR
-If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts
-\fIarg\fR to integer by truncation and returns the converted value.
+.VS 8.4
+If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise
+converts \fIarg\fR to an integer (of the same size as a machine word,
+i.e. 32-bits on 32-bit systems, and 64-bits on 64-bit systems) by
+truncation and returns the converted value.
+.VE 8.4
.TP
\fBlog(\fIarg\fB)\fR
Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a
@@ -296,6 +307,12 @@ Returns the tangent of \fIarg\fR, measured in radians.
.TP
\fBtanh(\fIarg\fB)\fR
Returns the hyperbolic tangent of \fIarg\fR.
+.TP
+\fBwide(\fIarg\fB)\fR
+.VS 8.4
+Converts \fIarg\fR to a value at least 64-bits wide (by sign-extension
+if \fIarg\fR is a 32-bit number.)
+.VE 8.4
.PP
In addition to these predefined functions, applications may
define additional functions using \fBTcl_CreateMathFunc\fR().
diff --git a/doc/format.n b/doc/format.n