Skip to content
Snippets Groups Projects
Commit ca9a7e33 authored by Christophe Junke's avatar Christophe Junke
Browse files

Merge branch 'build_cleanup' into 'master'

Cleanup build scripts and git repository

See merge request adacore/colibri!42
parents b49c3e13 38229eac
No related branches found
No related tags found
1 merge request!42Cleanup build scripts and git repository
Pipeline #63206 passed
Showing
with 3393 additions and 3510 deletions
......@@ -5,3 +5,6 @@
/compile_colibri
*.o
*.exe
*.so
*.dll
*.log
\ No newline at end of file
tests_without_recompilation:
#debian/stable
image: debian@sha256:7ceacc4462a98718b236cbdeb850d4b7603afe4bab791336a0ed1c030f769f02
script:
- apt-get update
- apt-get install -y ocaml-nox
#Eclipse Prolog compilation of COLIBRI
- ocamlopt -o compile_colibri unix.cmxa compile_colibri.ml
- ./compile_colibri
#Bundle in bundle directory
- ./bundle.sh bundle
- cp -ra Bin/ECLIPSE_V7.0_45/ bundle/ECLIPSE/
#Test
- apt-get update
- apt-get install -y parallel
- ./test.sh -j2
artifacts:
paths:
- logs
expire_in: 1 week
tags:
- docker
tests_with_recompilation:
#ocaml/opam:debian-10-ocaml-4.11
image: ocaml/opam@sha256:eaabdd3f42bd1ddfaa4b670b6bfb0acf3790a8927255d3fbc40576252798ce76
image: ocaml/opam@sha256:aabf10d76f588677f6ee8007aae3d4dd45d28000501abce5aabda9de50e88dc7
script:
- rm -f Src/COLIBRI/lib/v7/x86_64_linux/* Src/COLIBRI/simplex_ocaml.pl
#OCaml dependencies
- opam depext --install "dune.2.7.1" "ocplib-simplex.0.4" "zarith.1.9.1" "parsexp.v0.14.0" "menhir.20200624" "fmt.0.8.8" "spelll.0.3" "uutf.1.0.2" "gen.0.5.3"
#OCaml compilation
- make ECLIPSEBIN=$(pwd)/Bin/ECLIPSE_V7.0_45/
#Bundle in bundle directory
- ./bundle.sh bundle
- cp -ra Bin/ECLIPSE_V7.0_45/ bundle/ECLIPSE/
#Test
- sudo apt-get update
- sudo apt-get install -y parallel
- ./test.sh -j2
- sudo apt-get install -y make parallel libgmp-dev
- opam install dune.3.12.1 fmt.0.9.0 gen.1.1 menhir.20230608 ocplib-simplex.0.5 parsexp.v0.16.0 spelll.0.4 uutf.1.0.3 zarith.1.13
- make clean
- make clean_install
- make
- make install
- make test
artifacts:
paths:
- logs
- bundle
expire_in: 1 week
tags:
- docker
No preview for this file type
No preview for this file type
......@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tcl.h,v 1.254.2.16 2010/08/04 17:02:39 dgp Exp $
* RCS: @(#) $Id: tcl.h,v 1.254 2008/03/28 17:31:44 dgp Exp $
*/
#ifndef _TCL
......@@ -60,10 +60,10 @@ extern "C" {
#define TCL_MAJOR_VERSION 8
#define TCL_MINOR_VERSION 5
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TCL_RELEASE_SERIAL 9
#define TCL_RELEASE_SERIAL 2
#define TCL_VERSION "8.5"
#define TCL_PATCH_LEVEL "8.5.9"
#define TCL_PATCH_LEVEL "8.5.2"
/*
* The following definitions set up the proper options for Windows compilers.
......@@ -145,7 +145,7 @@ extern "C" {
*
* The following TCL_VARARGS* macros are to support old extensions
* written for older versions of Tcl where the macros permitted
* support for the varargs.h system as well as stdarg.h .
* support for the varargs.h system as well as stdarg.h .
*
* New code should just directly be written to use stdarg.h conventions.
*/
......@@ -167,32 +167,31 @@ extern "C" {
* Note: when building static but linking dynamically to MSVCRT we must still
* correctly decorate the C library imported function. Use CRTIMPORT
* for this purpose. _DLL is defined by the compiler when linking to
* MSVCRT.
* MSVCRT.
*/
#if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec))))
# define HAVE_DECLSPEC 1
# ifdef STATIC_BUILD
# define DLLIMPORT
# define DLLEXPORT
# ifdef _DLL
# define CRTIMPORT __declspec(dllimport)
# else
# define CRTIMPORT
# endif
#endif
#ifdef STATIC_BUILD
# define DLLIMPORT
# define DLLEXPORT
# if HAVE_DECLSPEC && defined(_DLL)
# define CRTIMPORT __declspec(dllimport)
# else
# define DLLIMPORT __declspec(dllimport)
# define DLLEXPORT __declspec(dllexport)
# define CRTIMPORT __declspec(dllimport)
# define CRTIMPORT
# endif
#else
# define DLLIMPORT
# if defined(__GNUC__) && __GNUC__ > 3
# define DLLEXPORT __attribute__ ((visibility("default")))
# if HAVE_DECLSPEC
# define DLLIMPORT __declspec(dllimport)
# define DLLEXPORT __declspec(dllexport)
# define CRTIMPORT __declspec(dllimport)
# else
# define DLLEXPORT
# define DLLIMPORT
# define DLLEXPORT
# define CRTIMPORT
# endif
# define CRTIMPORT
#endif
/*
......@@ -262,7 +261,7 @@ extern "C" {
#endif
/*
* Make sure EXTERN isn't defined elsewhere.
* Make sure EXTERN isn't defined elsewhere
*/
#ifdef EXTERN
......@@ -315,7 +314,7 @@ typedef long LONG;
#endif
/*
* Darwin specific configure overrides (to support fat compiles, where
* Darwin specifc configure overrides (to support fat compiles, where
* configure runs only once for multiple architectures):
*/
......@@ -359,7 +358,7 @@ typedef long LONG;
# if defined(__WIN32__) && !defined(__CYGWIN__)
# define TCL_LL_MODIFIER "I64"
# else
# define TCL_LL_MODIFIER "ll"
# define TCL_LL_MODIFIER "L"
# endif
typedef struct stat Tcl_StatBuf;
# elif defined(__WIN32__)
......@@ -514,10 +513,9 @@ typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
* given to Tcl_CreateThread.
*/
#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
* behaviour. */
#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack */
#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default behaviour */
#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable */
/*
* Flag values passed to Tcl_StringCaseMatch.
......@@ -529,20 +527,20 @@ typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
* Flag values passed to Tcl_GetRegExpFromObj.
*/
#define TCL_REG_BASIC 000000 /* BREs (convenience). */
#define TCL_REG_EXTENDED 000001 /* EREs. */
#define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
#define TCL_REG_QUOTE 000004 /* No special characters, none. */
#define TCL_REG_NOCASE 000010 /* Ignore case. */
#define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
#define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
* comments. */
#define TCL_REG_BASIC 000000 /* BREs (convenience) */
#define TCL_REG_EXTENDED 000001 /* EREs */
#define TCL_REG_ADVF 000002 /* advanced features in EREs */
#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs) */
#define TCL_REG_QUOTE 000004 /* no special characters, none */
#define TCL_REG_NOCASE 000010 /* ignore case */
#define TCL_REG_NOSUB 000020 /* don't care about subexpressions */
#define TCL_REG_EXPANDED 000040 /* expanded format, white space &
* comments */
#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
#define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
#define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
* matches. */
#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before */
#define TCL_REG_NEWLINE 000300 /* newlines are line terminators */
#define TCL_REG_CANMATCH 001000 /* report details on partial/limited
* matches */
/*
* Flags values passed to Tcl_RegExpExecObj.
......@@ -601,13 +599,13 @@ typedef struct stat *Tcl_OldStat_;
* interpreter's result is meaningless.
*/
#define TCL_OK 0
#define TCL_ERROR 1
#define TCL_RETURN 2
#define TCL_BREAK 3
#define TCL_CONTINUE 4
#define TCL_OK 0
#define TCL_ERROR 1
#define TCL_RETURN 2
#define TCL_BREAK 3
#define TCL_CONTINUE 4
#define TCL_RESULT_SIZE 200
#define TCL_RESULT_SIZE 200
/*
* Flags to control what substitutions are performed by Tcl_SubstObj():
......@@ -762,19 +760,19 @@ typedef struct Tcl_Obj {
* internal rep. NULL indicates the object has
* no internal rep (has no type). */
union { /* The internal representation: */
long longValue; /* - an long integer value. */
double doubleValue; /* - a double-precision floating value. */
VOID *otherValuePtr; /* - another, type-specific value. */
Tcl_WideInt wideValue; /* - a long long value. */
struct { /* - internal rep as two pointers. */
long longValue; /* - an long integer value */
double doubleValue; /* - a double-precision floating value */
VOID *otherValuePtr; /* - another, type-specific value */
Tcl_WideInt wideValue; /* - a long long value */
struct { /* - internal rep as two pointers */
VOID *ptr1;
VOID *ptr2;
} twoPtrValue;
struct { /* - internal rep as a wide int, tightly
* packed fields. */
VOID *ptr; /* Pointer to digits. */
* packed fields */
VOID *ptr; /* Pointer to digits */
unsigned long value;/* Alloc, used, and signum packed into a
* single word. */
* single word */
} ptrAndLongRep;
} internalRep;
} Tcl_Obj;
......@@ -860,17 +858,16 @@ typedef struct Tcl_CallFrame {
Tcl_Namespace *nsPtr;
int dummy1;
int dummy2;
VOID *dummy3;
VOID *dummy4;
VOID *dummy5;
char *dummy3;
char *dummy4;
char *dummy5;
int dummy6;
VOID *dummy7;
VOID *dummy8;
char *dummy7;
char *dummy8;
int dummy9;
VOID *dummy10;
VOID *dummy11;
VOID *dummy12;
VOID *dummy13;
char *dummy10;
char *dummy11;
char *dummy12;
} Tcl_CallFrame;
/*
......@@ -937,8 +934,8 @@ typedef struct Tcl_DString {
* buffer space required by Tcl_PrintDouble.
*/
#define TCL_MAX_PREC 17
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
#define TCL_MAX_PREC 17
#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
/*
* Definition for a number of bytes of buffer space sufficient to hold the
......@@ -995,9 +992,9 @@ typedef struct Tcl_DString {
* page for details):
*/
#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
#define TCL_STATIC ((Tcl_FreeProc *) 0)
#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
#define TCL_STATIC ((Tcl_FreeProc *) 0)
#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
/*
* Flag values passed to variable-related functions.
......@@ -1350,9 +1347,9 @@ typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf,
* indicate what sorts of events are of interest:
*/
#define TCL_READABLE (1<<1)
#define TCL_WRITABLE (1<<2)
#define TCL_EXCEPTION (1<<3)
#define TCL_READABLE (1<<1)
#define TCL_WRITABLE (1<<2)
#define TCL_EXCEPTION (1<<3)
/*
* Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition
......@@ -1370,15 +1367,15 @@ typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf,
* should be closed.
*/
#define TCL_CLOSE_READ (1<<1)
#define TCL_CLOSE_WRITE (1<<2)
#define TCL_CLOSE_READ (1<<1)
#define TCL_CLOSE_WRITE (1<<2)
/*
* Value to use as the closeProc for a channel that supports the close2Proc
* interface.
*/
#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *) 1)
#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *)1)
/*
* Channel version tag. This was introduced in 8.3.2/8.4.
......@@ -1391,7 +1388,7 @@ typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf,
#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
/*
* TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
* TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc
*/
#define TCL_CHANNEL_THREAD_INSERT (0)
......@@ -1487,7 +1484,7 @@ typedef struct Tcl_ChannelType {
/* Set blocking mode for the raw channel. May
* be NULL. */
/*
* Only valid in TCL_CHANNEL_VERSION_2 channels or later.
* Only valid in TCL_CHANNEL_VERSION_2 channels or later
*/
Tcl_DriverFlushProc *flushProc;
/* Function to call to flush a channel. May be
......@@ -1497,7 +1494,7 @@ typedef struct Tcl_ChannelType {
* This will be passed up the stacked channel
* chain. */
/*
* Only valid in TCL_CHANNEL_VERSION_3 channels or later.
* Only valid in TCL_CHANNEL_VERSION_3 channels or later
*/
Tcl_DriverWideSeekProc *wideSeekProc;
/* Function to call to seek on the channel
......@@ -1505,8 +1502,8 @@ typedef struct Tcl_ChannelType {
* NULL, and must be NULL if seekProc is
* NULL. */
/*
* Only valid in TCL_CHANNEL_VERSION_4 channels or later.
* TIP #218, Channel Thread Actions.
* Only valid in TCL_CHANNEL_VERSION_4 channels or later
* TIP #218, Channel Thread Actions
*/
Tcl_DriverThreadActionProc *threadActionProc;
/* Function to call to notify the driver of
......@@ -1514,8 +1511,8 @@ typedef struct Tcl_ChannelType {
* be NULL. */
/*
* Only valid in TCL_CHANNEL_VERSION_5 channels or later.
* TIP #208, File Truncation.
* Only valid in TCL_CHANNEL_VERSION_5 channels or later
* TIP #208, File Truncation
*/
Tcl_DriverTruncateProc *truncateProc;
/* Function to call to truncate the underlying
......@@ -1549,14 +1546,14 @@ typedef enum Tcl_PathType {
*/
typedef struct Tcl_GlobTypeData {
int type; /* Corresponds to bcdpfls as in 'find -t'. */
int perm; /* Corresponds to file permissions. */
Tcl_Obj *macType; /* Acceptable Mac type. */
Tcl_Obj *macCreator; /* Acceptable Mac creator. */
int type; /* Corresponds to bcdpfls as in 'find -t' */
int perm; /* Corresponds to file permissions */
Tcl_Obj *macType; /* Acceptable mac type */
Tcl_Obj *macCreator; /* Acceptable mac creator */
} Tcl_GlobTypeData;
/*
* Type and permission definitions for glob command.
* Type and permission definitions for glob command
*/
#define TCL_GLOB_TYPE_BLOCK (1<<0)
......@@ -1575,7 +1572,7 @@ typedef struct Tcl_GlobTypeData {
#define TCL_GLOB_PERM_X (1<<4)
/*
* Flags for the unload callback function.
* Flags for the unload callback function
*/
#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
......@@ -2159,9 +2156,9 @@ typedef unsigned short Tcl_UniChar;
typedef struct Tcl_Config {
CONST char *key; /* Configuration key to register. ASCII
* encoded, thus UTF-8. */
* encoded, thus UTF-8 */
CONST char *value; /* The value associated with the key. System
* encoding. */
* encoding */
} Tcl_Config;
/*
......@@ -2181,10 +2178,14 @@ typedef void (Tcl_LimitHandlerProc) _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp));
typedef void (Tcl_LimitHandlerDeleteProc) _ANSI_ARGS_((ClientData clientData));
#ifndef MP_INT_DECLARED
typedef struct mp_int mp_int;
#define MP_INT_DECLARED
typedef unsigned int mp_digit;
#endif
#ifndef MP_DIGIT_DECLARED
typedef unsigned long mp_digit;
#define MP_DIGIT_DECLARED
#endif
/*
* The following constant is used to test for older versions of Tcl in the
......@@ -2194,7 +2195,7 @@ typedef unsigned int mp_digit;
* value since the stubs tables don't match.
*/
#define TCL_STUB_MAGIC ((int) 0xFCA3BACF)
#define TCL_STUB_MAGIC ((int)0xFCA3BACF)
/*
* The following function is required to be defined in all stubs aware
......@@ -2299,7 +2300,7 @@ EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr));
# define Tcl_IncrRefCount(objPtr) \
++(objPtr)->refCount
/*
* Use do/while0 idiom for optimum correctness without compiler warnings.
* Use do/while0 idiom for optimum correctness without compiler warnings
* http://c2.com/cgi/wiki?TrivialDoWhileLoop
*/
# define Tcl_DecrRefCount(objPtr) \
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
* RCS: @(#) $Id: tclPlatDecls.h,v 1.27.2.2 2010/05/21 12:18:17 nijtmans Exp $
* RCS: @(#) $Id: tclPlatDecls.h,v 1.27 2007/12/13 15:23:20 dgp Exp $
*/
#ifndef _TCLPLATDECLS
......@@ -26,13 +26,19 @@
/*
* Pull in the typedef of TCHAR for windows.
*/
#if defined(__WIN32__) && !defined(_TCHAR_DEFINED)
#if defined(__CYGWIN__)
typedef char TCHAR;
#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
# include <tchar.h>
# ifndef _TCHAR_DEFINED
/* Borland seems to forget to set this. */
typedef _TCHAR TCHAR;
typedef _TCHAR TCHAR;
# define _TCHAR_DEFINED
# endif
# if defined(_MSC_VER) && defined(__STDC__)
/* MSVC++ misses this. */
typedef _TCHAR TCHAR;
# endif
#endif
/* !BEGIN!: Do not edit below this line. */
......@@ -45,32 +51,32 @@
#ifndef Tcl_WinUtfToTChar_TCL_DECLARED
#define Tcl_WinUtfToTChar_TCL_DECLARED
/* 0 */
EXTERN TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len,
Tcl_DString *dsPtr);
EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len,
Tcl_DString * dsPtr);
#endif
#ifndef Tcl_WinTCharToUtf_TCL_DECLARED
#define Tcl_WinTCharToUtf_TCL_DECLARED
/* 1 */
EXTERN char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len,
Tcl_DString *dsPtr);
EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len,
Tcl_DString * dsPtr);
#endif
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
/* 0 */
EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
CONST char *bundleName, int hasResourceFile,
int maxPathLen, char *libraryPath);
EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp,
CONST char * bundleName, int hasResourceFile,
int maxPathLen, char * libraryPath);
#endif
#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
/* 1 */
EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
Tcl_Interp *interp, CONST char *bundleName,
CONST char *bundleVersion,
int hasResourceFile, int maxPathLen,
char *libraryPath);
EXTERN int Tcl_MacOSXOpenVersionedBundleResources (
Tcl_Interp * interp, CONST char * bundleName,
CONST char * bundleVersion,
int hasResourceFile, int maxPathLen,
char * libraryPath);
#endif
#endif /* MACOSX */
......@@ -79,12 +85,12 @@ typedef struct TclPlatStubs {
struct TclPlatStubHooks *hooks;
#ifdef __WIN32__ /* WIN */
TCHAR * (*tcl_WinUtfToTChar) (CONST char *str, int len, Tcl_DString *dsPtr); /* 0 */
char * (*tcl_WinTCharToUtf) (CONST TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */
char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, CONST char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */
int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, CONST char *bundleName, CONST char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */
int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */
int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */
#endif /* MACOSX */
} TclPlatStubs;
......
......@@ -26,6 +26,8 @@
#include <ctype.h>
#include <limits.h>
#include <tommath_class.h>
#ifndef MIN
#define MIN(x,y) ((x)<(y)?(x):(y))
#endif
......@@ -838,6 +840,6 @@ MODULE_SCOPE const char *mp_s_rmap;
/* $Source: /cvsroot/tcl/tcl/generic/tclTomMath.h,v $ */
/* Based on Tom's version 1.8 */
/* $Revision: 1.10.4.1 $ */
/* $Date: 2009/10/06 16:30:39 $ */
/* $Revision: 1.10 $ */
/* $Date: 2007/02/14 17:59:21 $ */
......@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tk.h,v 1.109.2.13 2010/08/04 17:06:52 dgp Exp $
* RCS: @(#) $Id: tk.h,v 1.109 2008/03/28 18:13:39 dgp Exp $
*/
#ifndef _TK
......@@ -53,10 +53,10 @@ extern "C" {
#define TK_MAJOR_VERSION 8
#define TK_MINOR_VERSION 5
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TK_RELEASE_SERIAL 9
#define TK_RELEASE_SERIAL 2
#define TK_VERSION "8.5"
#define TK_PATCH_LEVEL "8.5.9"
#define TK_PATCH_LEVEL "8.5.2"
/*
* A special definition used to allow this header file to be included from
......@@ -627,15 +627,17 @@ typedef struct Tk_GeomMgr {
*---------------------------------------------------------------------------
*/
#define VirtualEvent (MappingNotify + 1)
#define ActivateNotify (MappingNotify + 2)
#define DeactivateNotify (MappingNotify + 3)
#define MouseWheelEvent (MappingNotify + 4)
#define TK_LASTEVENT (MappingNotify + 5)
#define VirtualEvent (LASTEvent)
#define ActivateNotify (LASTEvent + 1)
#define DeactivateNotify (LASTEvent + 2)
#define MouseWheelEvent (LASTEvent + 3)
#define TK_LASTEVENT (LASTEvent + 4)
#define MouseWheelMask (1L << 28)
#define ActivateMask (1L << 29)
#define VirtualEventMask (1L << 30)
#define TK_LASTEVENT (LASTEvent + 4)
/*
* A virtual event shares most of its fields with the XKeyEvent and
......@@ -722,8 +724,6 @@ typedef XActivateDeactivateEvent XDeactivateEvent;
(((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED)
#define Tk_TopWinHierarchy(tkwin) \
(((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY)
#define Tk_IsManageable(tkwin) \
(((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE)
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
/* Tk_InternalBorderWidth is deprecated */
......@@ -859,8 +859,6 @@ typedef struct Tk_FakeWin {
* TK_PROP_PROPCHANGE 1 means that PropertyNotify events in the
* window's children should propagate up to this
* window.
* TK_WM_MANAGEABLE 1 marks a window as capable of being converted
* into a toplevel using [wm manage].
*/
#define TK_MAPPED 1
......@@ -882,7 +880,6 @@ typedef struct Tk_FakeWin {
#define TK_WIN_MANAGED 0x10000
#define TK_TOP_HIERARCHY 0x20000
#define TK_PROP_PROPCHANGE 0x40000
#define TK_WM_MANAGEABLE 0x80000
/*
*--------------------------------------------------------------
......@@ -1489,7 +1486,7 @@ typedef struct Tk_ElementSpec {
const char * Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
const char *version, int exact));
EXTERN const char * Tk_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp,
const char * Tk_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp,
const char *version, int exact));
#ifndef USE_TK_STUBS
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tkPlatDecls.h,v 1.15.2.1 2010/02/07 23:24:13 nijtmans Exp $
* RCS: @(#) $Id: tkPlatDecls.h,v 1.15 2007/12/13 15:24:16 dgp Exp $
*/
#ifndef _TKPLATDECLS
......@@ -35,97 +35,97 @@
#ifndef Tk_AttachHWND_TCL_DECLARED
#define Tk_AttachHWND_TCL_DECLARED
/* 0 */
EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd);
EXTERN Window Tk_AttachHWND (Tk_Window tkwin, HWND hwnd);
#endif
#ifndef Tk_GetHINSTANCE_TCL_DECLARED
#define Tk_GetHINSTANCE_TCL_DECLARED
/* 1 */
EXTERN HINSTANCE Tk_GetHINSTANCE(void);
EXTERN HINSTANCE Tk_GetHINSTANCE (void);
#endif
#ifndef Tk_GetHWND_TCL_DECLARED
#define Tk_GetHWND_TCL_DECLARED
/* 2 */
EXTERN HWND Tk_GetHWND(Window window);
EXTERN HWND Tk_GetHWND (Window window);
#endif
#ifndef Tk_HWNDToWindow_TCL_DECLARED
#define Tk_HWNDToWindow_TCL_DECLARED
/* 3 */
EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd);
EXTERN Tk_Window Tk_HWNDToWindow (HWND hwnd);
#endif
#ifndef Tk_PointerEvent_TCL_DECLARED
#define Tk_PointerEvent_TCL_DECLARED
/* 4 */
EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y);
EXTERN void Tk_PointerEvent (HWND hwnd, int x, int y);
#endif
#ifndef Tk_TranslateWinEvent_TCL_DECLARED
#define Tk_TranslateWinEvent_TCL_DECLARED
/* 5 */
EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam,
LRESULT *result);
EXTERN int Tk_TranslateWinEvent (HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam,
LRESULT * result);
#endif
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
#ifndef Tk_MacOSXSetEmbedHandler_TCL_DECLARED
#define Tk_MacOSXSetEmbedHandler_TCL_DECLARED
/* 0 */
EXTERN void Tk_MacOSXSetEmbedHandler(
Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr,
Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr,
Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr,
Tk_MacOSXEmbedGetClipProc *getClipProc,
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc);
EXTERN void Tk_MacOSXSetEmbedHandler (
Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr,
Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr,
Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr,
Tk_MacOSXEmbedGetClipProc * getClipProc,
Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc);
#endif
#ifndef Tk_MacOSXTurnOffMenus_TCL_DECLARED
#define Tk_MacOSXTurnOffMenus_TCL_DECLARED
/* 1 */
EXTERN void Tk_MacOSXTurnOffMenus(void);
EXTERN void Tk_MacOSXTurnOffMenus (void);
#endif
#ifndef Tk_MacOSXTkOwnsCursor_TCL_DECLARED
#define Tk_MacOSXTkOwnsCursor_TCL_DECLARED
/* 2 */
EXTERN void Tk_MacOSXTkOwnsCursor(int tkOwnsIt);
EXTERN void Tk_MacOSXTkOwnsCursor (int tkOwnsIt);
#endif
#ifndef TkMacOSXInitMenus_TCL_DECLARED
#define TkMacOSXInitMenus_TCL_DECLARED
/* 3 */
EXTERN void TkMacOSXInitMenus(Tcl_Interp *interp);
EXTERN void TkMacOSXInitMenus (Tcl_Interp * interp);
#endif
#ifndef TkMacOSXInitAppleEvents_TCL_DECLARED
#define TkMacOSXInitAppleEvents_TCL_DECLARED
/* 4 */
EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp);
EXTERN void TkMacOSXInitAppleEvents (Tcl_Interp * interp);
#endif
#ifndef TkGenWMConfigureEvent_TCL_DECLARED
#define TkGenWMConfigureEvent_TCL_DECLARED
/* 5 */
EXTERN void TkGenWMConfigureEvent(Tk_Window tkwin, int x, int y,
EXTERN void TkGenWMConfigureEvent (Tk_Window tkwin, int x, int y,
int width, int height, int flags);
#endif
#ifndef TkMacOSXInvalClipRgns_TCL_DECLARED
#define TkMacOSXInvalClipRgns_TCL_DECLARED
/* 6 */
EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin);
EXTERN void TkMacOSXInvalClipRgns (Tk_Window tkwin);
#endif
#ifndef TkMacOSXGetDrawablePort_TCL_DECLARED
#define TkMacOSXGetDrawablePort_TCL_DECLARED
/* 7 */
EXTERN GWorldPtr TkMacOSXGetDrawablePort(Drawable drawable);
EXTERN GWorldPtr TkMacOSXGetDrawablePort (Drawable drawable);
#endif
#ifndef TkMacOSXGetRootControl_TCL_DECLARED
#define TkMacOSXGetRootControl_TCL_DECLARED
/* 8 */
EXTERN ControlRef TkMacOSXGetRootControl(Drawable drawable);
EXTERN ControlRef TkMacOSXGetRootControl (Drawable drawable);
#endif
#ifndef Tk_MacOSXSetupTkNotifier_TCL_DECLARED
#define Tk_MacOSXSetupTkNotifier_TCL_DECLARED
/* 9 */
EXTERN void Tk_MacOSXSetupTkNotifier(void);
EXTERN void Tk_MacOSXSetupTkNotifier (void);
#endif
#ifndef Tk_MacOSXIsAppInFront_TCL_DECLARED
#define Tk_MacOSXIsAppInFront_TCL_DECLARED
/* 10 */
EXTERN int Tk_MacOSXIsAppInFront(void);
EXTERN int Tk_MacOSXIsAppInFront (void);
#endif
#endif /* AQUA */
......@@ -139,14 +139,14 @@ typedef struct TkPlatStubs {
HWND (*tk_GetHWND) (Window window); /* 2 */
Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */
void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */
int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */
int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result); /* 5 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
void (*tk_MacOSXSetEmbedHandler) (Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); /* 0 */
void (*tk_MacOSXSetEmbedHandler) (Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacOSXEmbedGetClipProc * getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc); /* 0 */
void (*tk_MacOSXTurnOffMenus) (void); /* 1 */
void (*tk_MacOSXTkOwnsCursor) (int tkOwnsIt); /* 2 */
void (*tkMacOSXInitMenus) (Tcl_Interp *interp); /* 3 */
void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */
void (*tkMacOSXInitMenus) (Tcl_Interp * interp); /* 3 */
void (*tkMacOSXInitAppleEvents) (Tcl_Interp * interp); /* 4 */
void (*tkGenWMConfigureEvent) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */
void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */
GWorldPtr (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */
......
......@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: clock.tcl,v 1.47.2.9 2009/10/29 01:17:03 kennykb Exp $
# RCS: @(#) $Id: clock.tcl,v 1.47 2008/02/27 02:08:27 kennykb Exp $
#
#----------------------------------------------------------------------
......@@ -687,8 +687,7 @@ proc ::tcl::clock::format { args } {
# name in the 'FormatProc' array to avoid losing its internal
# representation, which contains the name resolution.
set procName formatproc'$format'$locale
set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName]
set procName ::tcl::clock::formatproc'$format'$locale
if {[info exists FormatProc($procName)]} {
set procName $FormatProc($procName)
} else {
......@@ -1369,7 +1368,7 @@ proc ::tcl::clock::FreeScan { string base timezone locale } {
[dict get $date dayOfMonth]
} result]
if { $status != 0 } {
return -code error "unable to convert date-time string \"$string\": $result"
return -code error "unable to convert date-time string \"$string\""
}
lassign $result parseDate parseTime parseZone parseRel \
......@@ -1532,8 +1531,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} {
# Check whether the format has been parsed previously, and return
# the existing recognizer if it has.
set procName scanproc'$formatString'$locale
set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName]
set procName [namespace current]::scanproc'$formatString'$locale
if { [namespace which $procName] != {} } {
return $procName
}
......@@ -1996,20 +1994,6 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} {
append procBody $postcode
append procBody [list set changeover [mc GREGORIAN_CHANGE_DATE]] \n
# Get time zone if needed
if { ![dict exists $fieldSet seconds]
&& ![dict exists $fieldSet starDate] } {
if { [dict exists $fieldSet tzName] } {
append procBody {
set timeZone [dict get $date tzName]
}
}
append procBody {
::tcl::clock::SetupTimeZone $timeZone
}
}
# Add code that gets Julian Day Number from the fields.
append procBody [MakeParseCodeFromFields $fieldSet $DateParseActions]
......@@ -2032,7 +2016,17 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} {
+ ( 86400 * wide([dict get $date julianDay]) )
+ [dict get $date secondOfDay] }]
}
}
if { ![dict exists $fieldSet seconds]
&& ![dict exists $fieldSet starDate] } {
if { [dict exists $fieldSet tzName] } {
append procBody {
set timeZone [dict get $date tzName]
}
}
append procBody {
::tcl::clock::SetupTimeZone $timeZone
set date [::tcl::clock::ConvertLocalToUTC $date[set date {}] \
$TZData($timeZone) \
$changeover]
......@@ -2563,28 +2557,25 @@ proc ::tcl::clock::LocalizeFormat { locale format } {
}
set inFormat $format
# Handle locale-dependent format groups by mapping them out of the format
# string. Note that the order of the [string map] operations is
# significant because later formats can refer to later ones; for example
# %c can refer to %X, which in turn can refer to %T.
# Handle locale-dependent format groups by mapping them out of
# the input string. Note that the order of the [string map]
# operations is significant because earlier formats can refer
# to later ones; for example %c can refer to %X, which in turn
# can refer to %T.
set list {
%% %%
%D %m/%d/%Y
%+ {%a %b %e %H:%M:%S %Z %Y}
}
lappend list %EY [string map $list [mc LOCALE_YEAR_FORMAT]]
lappend list %T [string map $list [mc TIME_FORMAT_24_SECS]]
lappend list %R [string map $list [mc TIME_FORMAT_24]]
lappend list %r [string map $list [mc TIME_FORMAT_12]]
lappend list %X [string map $list [mc TIME_FORMAT]]
lappend list %EX [string map $list [mc LOCALE_TIME_FORMAT]]
lappend list %x [string map $list [mc DATE_FORMAT]]
lappend list %Ex [string map $list [mc LOCALE_DATE_FORMAT]]
lappend list %c [string map $list [mc DATE_TIME_FORMAT]]
lappend list %Ec [string map $list [mc LOCALE_DATE_TIME_FORMAT]]
set format [string map $list $format]
set format [string map [list %c [mc DATE_TIME_FORMAT] \
%Ec [mc LOCALE_DATE_TIME_FORMAT]] $format]
set format [string map [list %x [mc DATE_FORMAT] \
%Ex [mc LOCALE_DATE_FORMAT] \
%X [mc TIME_FORMAT] \
%EX [mc LOCALE_TIME_FORMAT]] $format]
set format [string map [list %r [mc TIME_FORMAT_12] \
%R [mc TIME_FORMAT_24] \
%T [mc TIME_FORMAT_24_SECS]] $format]
set format [string map [list %D %m/%d/%Y \
%EY [mc LOCALE_YEAR_FORMAT]\
%+ {%a %b %e %H:%M:%S %Z %Y}] $format]
dict set McLoaded $locale FORMAT $inFormat $format
return $format
}
......@@ -3223,7 +3214,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } {
# again with a time zone file - this time without a colon
if { [catch { LoadTimeZoneFile $timezone }]
&& [catch { LoadZoneinfoFile $timezone } - opts] } {
&& [catch { ZoneinfoFile $timezone } - opts] } {
dict unset opts -errorinfo
return -options $opts "time zone $timezone not found"
}
......@@ -3892,50 +3883,23 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } {
* $dstSignum }]
}
# Fill in defaults for European or US DST rules
# US start time is the second Sunday in March
# EU start time is the last Sunday in March
# US end time is the first Sunday in November.
# EU end time is the last Sunday in October
# Fill in defaults for US DST rules
if { [dict get $z startDayOfYear] eq {}
&& [dict get $z startMonth] eq {} } {
if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} {
# EU
dict set z startWeekOfMonth 5
if {$stdHours>2} {
dict set z startHours 2
} else {
dict set z startHours [expr {$stdHours+1}]
}
} else {
# US
dict set z startWeekOfMonth 2
dict set z startHours 2
}
dict set z startMonth 3
dict set z startWeekOfMonth 2
dict set z startDayOfWeek 0
dict set z startHours 2
dict set z startMinutes 0
dict set z startSeconds 0
}
if { [dict get $z endDayOfYear] eq {}
&& [dict get $z endMonth] eq {} } {
if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} {
# EU
dict set z endMonth 10
dict set z endWeekOfMonth 5
if {$stdHours>2} {
dict set z endHours 3
} else {
dict set z endHours [expr {$stdHours+2}]
}
} else {
# US
dict set z endMonth 11
dict set z endWeekOfMonth 1
dict set z endHours 2
}
dict set z endMonth 11
dict set z endWeekOfMonth 1
dict set z endDayOfWeek 0
dict set z endHours 2
dict set z endMinutes 0
dict set z endSeconds 0
}
......@@ -4393,8 +4357,8 @@ proc ::tcl::clock::add { clockval args } {
}
default {
return -code error \
-errorcode [list CLOCK badSwitch $a] \
"bad switch \"$a\",\
-errorcode [list CLOCK badSwitch $flag] \
"bad switch \"$flag\",\
must be -gmt, -locale or -timezone"
}
}
......
......@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
# RCS: @(#) $Id: init.tcl,v 1.104.2.15 2010/08/04 17:02:39 dgp Exp $
# RCS: @(#) $Id: init.tcl,v 1.104 2008/03/28 17:31:44 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
......@@ -17,7 +17,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
package require -exact Tcl 8.5.9
package require -exact Tcl 8.5.2
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
......@@ -109,7 +109,6 @@ namespace eval tcl {
}
return $val
}
namespace export min max
}
}
......@@ -157,7 +156,7 @@ if {(![interp issafe]) && ($tcl_platform(platform) eq "windows")} {
if {[interp issafe]} {
package unknown {::tcl::tm::UnknownHandler ::tclPkgUnknown}
package unknown ::tclPkgUnknown
} else {
# Set up search for Tcl Modules (TIP #189).
# and setup platform specific unknown package handlers
......@@ -276,16 +275,8 @@ proc unknown args {
unset UnknownPending
}
if {$msg} {
if {[info exists savedErrorCode]} {
set ::errorCode $savedErrorCode
} else {
unset -nocomplain ::errorCode
}
if {[info exists savedErrorInfo]} {
set ::errorInfo $savedErrorInfo
} else {
unset -nocomplain ::errorInfo
}
catch {set ::errorCode $savedErrorCode}
catch {set ::errorInfo $savedErrorInfo}
set code [catch {uplevel 1 $args} msg opts]
if {$code == 1} {
#
......@@ -659,7 +650,7 @@ proc auto_execok name {
# Add an initial ; to have the {} extension check first.
set execExtensions [split ";$env(PATHEXT)" ";"]
} else {
set execExtensions [list {} .com .exe .bat .cmd]
set execExtensions [list {} .com .exe .bat]
}
if {$name in $shellBuiltins} {
......
......@@ -44,8 +44,8 @@ namespace eval ::tcl::clock {
"\u05e0\u05d5\u05d1\u05de\u05d1\u05e8"\
"\u05d3\u05e6\u05de\u05d1\u05e8"\
""]
::msgcat::mcset he BCE "\u05dc\u05e1\u05d4\u0022\u05e0"
::msgcat::mcset he CE "\u05dc\u05e4\u05e1\u05d4\u0022\u05e0"
::msgcat::mcset he BCE "\u05dc\u05e1\u05d4"\u05e0"
::msgcat::mcset he CE "\u05dc\u05e4\u05e1\u05d4"\u05e0"
::msgcat::mcset he DATE_FORMAT "%d/%m/%Y"
::msgcat::mcset he TIME_FORMAT "%H:%M:%S"
::msgcat::mcset he DATE_TIME_FORMAT "%d/%m/%Y %H:%M:%S %z"
......
......@@ -3,7 +3,7 @@
# utility procs formerly in init.tcl which can be loaded on demand
# for package management.
#
# RCS: @(#) $Id: package.tcl,v 1.35.4.1 2008/07/03 17:22:59 dgp Exp $
# RCS: @(#) $Id: package.tcl,v 1.35 2006/11/03 00:34:52 hobbs Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
......@@ -485,15 +485,8 @@ proc tclPkgUnknown {name args} {
foreach file [glob -directory $dir -join -nocomplain \
* pkgIndex.tcl] {
set dir [file dirname $file]
if {![info exists procdDirs($dir)]} {
set code [catch {source $file} msg opt]
if {$code == 1 &&
[lindex [dict get $opt -errorcode] 0] eq "POSIX" &&
[lindex [dict get $opt -errorcode] 1] eq "EACCES"} {
# $file was not readable; silently ignore
continue
}
if {$code} {
if {![info exists procdDirs($dir)] && [file readable $file]} {
if {[catch {source $file} msg]} {
tclLog "error reading package index file $file: $msg"
} else {
set procdDirs($dir) 1
......@@ -504,16 +497,10 @@ proc tclPkgUnknown {name args} {
set dir [lindex $use_path end]
if {![info exists procdDirs($dir)]} {
set file [file join $dir pkgIndex.tcl]
# safe interps usually don't have "file exists",
if {([interp issafe] || [file exists $file])} {
set code [catch {source $file} msg opt]
if {$code == 1 &&
[lindex [dict get $opt -errorcode] 0] eq "POSIX" &&
[lindex [dict get $opt -errorcode] 1] eq "EACCES"} {
# $file was not readable; silently ignore
continue
}
if {$code} {
# safe interps usually don't have "file readable",
# nor stderr channel
if {([interp issafe] || [file readable $file])} {
if {[catch {source $file} msg] && ![interp issafe]} {
tclLog "error reading package index file $file: $msg"
} else {
set procdDirs($dir) 1
......@@ -559,6 +546,8 @@ proc tclPkgUnknown {name args} {
# This procedure extends the "package unknown" function for MacOSX.
# It scans the Resources/Scripts directories of the immediate children
# of the auto_path directories for pkgIndex files.
# Only installed in interps that are not safe so we don't check
# for [interp issafe] as in tclPkgUnknown.
#
# Arguments:
# original - original [package unknown] procedure
......@@ -594,15 +583,8 @@ proc tcl::MacOSXPkgUnknown {original name args} {
foreach file [glob -directory $dir -join -nocomplain \
* Resources Scripts pkgIndex.tcl] {
set dir [file dirname $file]
if {![info exists procdDirs($dir)]} {
set code [catch {source $file} msg opt]
if {$code == 1 &&
[lindex [dict get $opt -errorcode] 0] eq "POSIX" &&
[lindex [dict get $opt -errorcode] 1] eq "EACCES"} {
# $file was not readable; silently ignore
continue
}
if {$code} {
if {![info exists procdDirs($dir)] && [file readable $file]} {
if {[catch {source $file} msg]} {
tclLog "error reading package index file $file: $msg"
} else {
set procdDirs($dir) 1
......
This diff is collapsed.
......@@ -27,6 +27,7 @@ set auto_index(::tcl::HistRedo) [list source [file join $dir history.tcl]]
set auto_index(::tcl::HistIndex) [list source [file join $dir history.tcl]]
set auto_index(::tcl::HistEvent) [list source [file join $dir history.tcl]]
set auto_index(::tcl::HistChange) [list source [file join $dir history.tcl]]
set auto_index(tclLdAout) [list source [file join $dir ldAout.tcl]]
set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]]
set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]]
set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]]
......
......@@ -214,11 +214,11 @@ proc ::tcl::tm::UnknownHandler {original name args} {
set satisfied 0
foreach path $paths {
if {![interp issafe] && ![file exists $path]} {
if {![file exists $path]} {
continue
}
set currentsearchpath [file join $path $pkgroot]
if {![interp issafe] && ![file exists $currentsearchpath]} {
if {![file exists $currentsearchpath]} {
continue
}
set strip [llength [file split $path]]
......@@ -254,18 +254,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# means something else without the namespace
# specifier.
# NOTE. When making changes to the format of the
# provide command generated below CHECK that the
# 'LOCATE' procedure in core file
# 'platform/shell.tcl' still understands it, or,
# if not, update its implementation appropriately.
#
# Right now LOCATE's implementation assumes that
# the path of the package file is the last element
# in the list.
package ifneeded $pkgname $pkgversion \
"[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]"
package ifneeded $pkgname $pkgversion [::list source -encoding utf-8 $file]
# We abort in this unknown handler only if we got
# a satisfying candidate for the requested
......@@ -363,13 +352,9 @@ proc ::tcl::tm::roots {paths} {
foreach pa $paths {
set p [file join $pa tcl$major]
for {set n $minor} {$n >= 0} {incr n -1} {
set px [file join $p ${major}.${n}]
if {![interp issafe]} { set px [file normalize $px] }
path add $px
path add [file normalize [file join $p ${major}.${n}]]
}
set px [file join $p site-tcl]
if {![interp issafe]} { set px [file normalize $px] }
path add $px
path add [file normalize [file join $p site-tcl]]
}
return
}
......@@ -377,4 +362,4 @@ proc ::tcl::tm::roots {paths} {
# Initialization. Set up the default paths, then insert the new
# handler into the chain.
if {![interp issafe]} { ::tcl::tm::Defaults }
::tcl::tm::Defaults
......@@ -9,19 +9,19 @@
#
# The information in this file is specific to a single platform.
#
# RCS: @(#) $Id: tclConfig.sh.in,v 1.21.10.1 2010/08/12 00:11:23 hobbs Exp $
# RCS: @(#) $Id: tclConfig.sh.in,v 1.21 2005/05/10 18:35:27 kennykb Exp $
# Tcl's version number.
TCL_VERSION='8.5'
TCL_MAJOR_VERSION='8'
TCL_MINOR_VERSION='5'
TCL_PATCH_LEVEL='.9'
TCL_PATCH_LEVEL='.2'
# C compiler to use for compilation.
TCL_CC='gcc'
# -D flags for use with the C compiler.
TCL_DEFS='-DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_BLKCNT_T=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 '
TCL_DEFS='-DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DPEEK_XCLOSEIM=1 -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 '
# TCL_DBGX used to be used to distinguish debug vs. non-debug builds.
# This was a righteous pain so the core doesn't do that any more.
......@@ -41,22 +41,31 @@ TCL_SHARED_BUILD=1
# The name of the Tcl library (may be either a .a file or a shared library):
TCL_LIB_FILE='libtcl8.5.so'
# Flag to indicate whether shared libraries need export files.
TCL_NEEDS_EXP_FILE=0
# String that can be evaluated to generate the part of the export file
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variables
# VERSION. On most UNIX systems this is ${VERSION}.exp.
TCL_EXPORT_FILE_SUFFIX=''
# Additional libraries to use when linking Tcl.
TCL_LIBS='-ldl -lieee -lm'
# Top-level directory in which Tcl's platform-independent files are
# installed.
TCL_PREFIX='/opt/shared/thirdparty/tcltk8.5/x86_64_linux'
TCL_PREFIX='/homes/kish/TclTk'
# Top-level directory in which Tcl's platform-specific files (e.g.
# executables) are installed.
TCL_EXEC_PREFIX='/opt/shared/thirdparty/tcltk8.5/x86_64_linux'
TCL_EXEC_PREFIX='/homes/kish/TclTk/x86_64_linux'
# Flags to pass to cc when compiling the components of a shared library:
TCL_SHLIB_CFLAGS='-fPIC'
# Flags to pass to cc to get warning messages
TCL_CFLAGS_WARNING='-Wall'
TCL_CFLAGS_WARNING='-Wall -Wno-implicit-int'
# Extra flags to pass to cc:
TCL_EXTRA_CFLAGS=' -pipe '
......@@ -102,15 +111,15 @@ TCL_LIB_FLAG='-ltcl8.5'
# String to pass to linker to pick up the Tcl library from its
# build directory.
TCL_BUILD_LIB_SPEC='-L/opt/shared/tools/src/tcl8.5.9/unix/x86_64_linux -ltcl8.5'
TCL_BUILD_LIB_SPEC='-L/homes/kish/TclTk/tcl8.5.2/unix/x86_64_linux -ltcl8.5'
# String to pass to linker to pick up the Tcl library from its
# installed directory.
TCL_LIB_SPEC='-L/opt/shared/thirdparty/tcltk8.5/x86_64_linux/lib -ltcl8.5'
TCL_LIB_SPEC='-L/homes/kish/TclTk/x86_64_linux/lib -ltcl8.5'
# String to pass to the compiler so that an extension can
# find installed Tcl headers.
TCL_INCLUDE_SPEC='-I/opt/shared/thirdparty/tcltk8.5/x86_64_linux/include'
TCL_INCLUDE_SPEC='-I/homes/kish/TclTk/include'
# Indicates whether a version numbers should be used in -l switches
# ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means
......@@ -137,12 +146,12 @@ TCL_UNSHARED_LIB_SUFFIX='${VERSION}.a'
# different place than the directory containing the source files, this
# points to the location of the sources, not the location where Tcl was
# compiled.
TCL_SRC_DIR='/opt/shared/tools/src/tcl8.5.9'
TCL_SRC_DIR='/homes/kish/TclTk/tcl8.5.2'
# List of standard directories in which to look for packages during
# "package require" commands. Contains the "prefix" directory plus also
# the "exec_prefix" directory, if it is different.
TCL_PACKAGE_PATH='/opt/shared/thirdparty/tcltk8.5/x86_64_linux/lib '
TCL_PACKAGE_PATH='/homes/kish/TclTk/x86_64_linux/lib /homes/kish/TclTk/lib '
# Tcl supports stub.
TCL_SUPPORTS_STUBS=1
......@@ -155,17 +164,17 @@ TCL_STUB_LIB_FLAG='-ltclstub8.5'
# String to pass to linker to pick up the Tcl stub library from its
# build directory.
TCL_BUILD_STUB_LIB_SPEC='-L/opt/shared/tools/src/tcl8.5.9/unix/x86_64_linux -ltclstub8.5'
TCL_BUILD_STUB_LIB_SPEC='-L/homes/kish/TclTk/tcl8.5.2/unix/x86_64_linux -ltclstub8.5'
# String to pass to linker to pick up the Tcl stub library from its
# installed directory.
TCL_STUB_LIB_SPEC='-L/opt/shared/thirdparty/tcltk8.5/x86_64_linux/lib -ltclstub8.5'
TCL_STUB_LIB_SPEC='-L/homes/kish/TclTk/x86_64_linux/lib -ltclstub8.5'
# Path to the Tcl stub library in the build directory.
TCL_BUILD_STUB_LIB_PATH='/opt/shared/tools/src/tcl8.5.9/unix/x86_64_linux/libtclstub8.5.a'
TCL_BUILD_STUB_LIB_PATH='/homes/kish/TclTk/tcl8.5.2/unix/x86_64_linux/libtclstub8.5.a'
# Path to the Tcl stub library in the install directory.
TCL_STUB_LIB_PATH='/opt/shared/thirdparty/tcltk8.5/x86_64_linux/lib/libtclstub8.5.a'
TCL_STUB_LIB_PATH='/homes/kish/TclTk/x86_64_linux/lib/libtclstub8.5.a'
# Flag, 1: we built Tcl with threads enables, 0 we didn't
TCL_THREADS=0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment