Artifact e18245158228dae1059e7de02a88339ec593b4be:
- File generic/tclPlatStubs.c — part of check-in [f989579c4c] at 1999-03-12 23:29:11 on branch core-8-1-branch-old — Summary ------- 1) Broke the initialization of memory and finding the encodings file into seprarate routines. 2) Added wrapper hooks for locating files and initialization. 3) Modified the library path lookup algorithm. What I Changed -------------- 1) Modified generic/tclInt.h a) Added cache of the tclNativeExecutable name so the variable does not have be recomputed on subsequent calls to TclpFindExecutable. a) Added variable tclDefaultEncoding dir to store the path to the encoding files. b) Added prototype for TclpFindExecutable & TclpFindEncodings. 2) Modified generic/tclInitScript.h a) Added the TclSetPreInitScript proc and pointer to the script. 3) Modified generic/tclUtil.c a) Added initialization of the tclNativeExecutableName. 4) Modified generic/tclEvent.c a) Added boolean that indicates if the encodings have been initialized. b) Modified TclInitSubsystems so it only initializes "in-memory" subsystems, and not the encoding sub system. c) Added TclFindEncodigs procedure to initialize the encoding subsystem. d) Tcl_Finallize cleans up memory allocated for tclNativeExecutableName and tclDefaultEncodingDir. 5) Modified generic/tclEncoding.c a) Added intialization of the tclDefaultEncodingDir variable. b) Added two accessor functions, Tcl_GetDefaultEncodingDir and Tcl_SetDefaultEncodingDir. c) Made Tcl_FindExecutable platform independent, and moved to this file. 6) Modified unix/tclUnixFile.c and win/tclWinFile.c a) Added TclpFindExecutable(argv0) to compute a native string. c) Tcl_FindExecutable calls TclpFindExecutable to get the native string. d) Modified the TclpInitLibraryPath lookup algorithm (see below) 7) Modified unix/tclUnixInit.c and win/tclWinInit.c a) Added the call evaluate to the pre-init script b) Modified TclpInitLibraryPath to take a native path to the executable so it does not have to call Tcl_FindExecutable. c) On windows, the AppendRegistry routine was removed. 8) Modified unix/tclUnixTest.c a) Modified TestfindexecutableCmd to reset the cached value of tclNativeExecutable name. (user: surles, size: 2538) [annotate] [blame] [check-ins using]
/* * tclPlatStubs.c -- * * This file contains the wrapper functions for the platform independent * unsupported Tcl API. * * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * * RCS: @(#) $Id: tclPlatStubs.c,v 1.3.2.2 1999/03/12 23:29:18 surles Exp $ */ #include "tcl.h" /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made * in the generic/tclInt.decls script. */ /* !BEGIN!: Do not edit below this line. */ /* * Exported stub functions: */ #ifdef MAC_TCL /* Slot 0 */ void Tcl_MacSetEventProc(procPtr) Tcl_MacConvertEventPtr procPtr; { (tclPlatStubsPtr->tcl_MacSetEventProc)(procPtr); } /* Slot 1 */ char * Tcl_MacConvertTextResource(resource) Handle resource; { return (tclPlatStubsPtr->tcl_MacConvertTextResource)(resource); } /* Slot 2 */ int Tcl_MacEvalResource(interp, resourceName, resourceNumber, fileName) Tcl_Interp * interp; char * resourceName; int resourceNumber; char * fileName; { return (tclPlatStubsPtr->tcl_MacEvalResource)(interp, resourceName, resourceNumber, fileName); } /* Slot 3 */ Handle Tcl_MacFindResource(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt) Tcl_Interp * interp; long resourceType; char * resourceName; int resourceNumber; char * resFileRef; int * releaseIt; { return (tclPlatStubsPtr->tcl_MacFindResource)(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt); } /* Slot 4 */ int Tcl_GetOSTypeFromObj(interp, objPtr, osTypePtr) Tcl_Interp * interp; Tcl_Obj * objPtr; OSType * osTypePtr; { return (tclPlatStubsPtr->tcl_GetOSTypeFromObj)(interp, objPtr, osTypePtr); } /* Slot 5 */ void Tcl_SetOSTypeObj(objPtr, osType) Tcl_Obj * objPtr; OSType osType; { (tclPlatStubsPtr->tcl_SetOSTypeObj)(objPtr, osType); } /* Slot 6 */ Tcl_Obj * Tcl_NewOSTypeObj(osType) OSType osType; { return (tclPlatStubsPtr->tcl_NewOSTypeObj)(osType); } /* Slot 7 */ int strncasecmp(s1, s2, n) CONST char * s1; CONST char * s2; size_t n; { return (tclPlatStubsPtr->strncasecmp)(s1, s2, n); } /* Slot 8 */ int strcasecmp(s1, s2) CONST char * s1; CONST char * s2; { return (tclPlatStubsPtr->strcasecmp)(s1, s2); } #endif /* MAC_TCL */ /* !END!: Do not edit above this line. */