summaryrefslogtreecommitdiffstats
path: root/library/demos/rmt
Commit message (Expand)AuthorAgeFilesLines
* [Bug 1945073]: Demo square.tcl cannot run; need package tktestjan.nijtmans2011-11-221-1/+1
|\
| * [Bug 1945073]: Demo square.tcl cannot run; need package tktestjan.nijtmans2011-11-221-1/+1
* | Purge RCS Keywords.dgp2011-06-081-2/+0
|\ \ | |/
| * Purge RCS Keywords.dgp2011-06-081-2/+0
* | merge stable branch onto HEADdgp2007-12-131-1/+1
* | * tests/listbox.test, tests/panedwindow.test, tests/scrollbar.test:hobbs2007-10-301-2/+2
* | Added [package require] to demos. [FRQ 815118]dkf2003-09-301-25/+28
|/
* Improvements to the demo scripts, mostly up-ported from 8.3.4dkf2001-10-291-15/+20
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
* Initial revisionrjohnson1998-04-011-0/+205
_cleanup'>mig_tailcall_cleanup 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