Tcl Source Code

Hex Artifact Content
Login

Artifact f37beb3009fbce181d3948da32325e9e9311e8236ab8397bf3d1b63a06276f23:


0000: 23 20 74 63 6c 49 6e 74 2e 64 65 63 6c 73 20 2d  # tclInt.decls -
0010: 2d 0a 23 0a 23 09 54 68 69 73 20 66 69 6c 65 20  -.#.#.This file 
0020: 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 64 65 63  contains the dec
0030: 6c 61 72 61 74 69 6f 6e 73 20 66 6f 72 20 61 6c  larations for al
0040: 6c 20 75 6e 73 75 70 70 6f 72 74 65 64 0a 23 09  l unsupported.#.
0050: 66 75 6e 63 74 69 6f 6e 73 20 74 68 61 74 20 61  functions that a
0060: 72 65 20 65 78 70 6f 72 74 65 64 20 62 79 20 74  re exported by t
0070: 68 65 20 54 63 6c 20 6c 69 62 72 61 72 79 2e 20  he Tcl library. 
0080: 20 54 68 69 73 20 66 69 6c 65 0a 23 09 69 73 20   This file.#.is 
0090: 75 73 65 64 20 74 6f 20 67 65 6e 65 72 61 74 65  used to generate
00a0: 20 74 68 65 20 74 63 6c 49 6e 74 44 65 63 6c 73   the tclIntDecls
00b0: 2e 68 2c 20 74 63 6c 49 6e 74 50 6c 61 74 44 65  .h, tclIntPlatDe
00c0: 63 6c 73 2e 68 0a 23 09 61 6e 64 20 74 63 6c 53  cls.h.#.and tclS
00d0: 74 75 62 49 6e 69 74 2e 63 20 66 69 6c 65 73 0a  tubInit.c files.
00e0: 23 0a 23 20 43 6f 70 79 72 69 67 68 74 20 c2 a9  #.# Copyright ©
00f0: 20 31 39 39 38 2d 31 39 39 39 20 53 63 72 69 70   1998-1999 Scrip
0100: 74 69 63 73 20 43 6f 72 70 6f 72 61 74 69 6f 6e  tics Corporation
0110: 2e 0a 23 20 43 6f 70 79 72 69 67 68 74 20 c2 a9  ..# Copyright ©
0120: 20 32 30 30 31 20 4b 65 76 69 6e 20 42 2e 20 4b   2001 Kevin B. K
0130: 65 6e 6e 79 2e 20 20 41 6c 6c 20 72 69 67 68 74  enny.  All right
0140: 73 20 72 65 73 65 72 76 65 64 2e 0a 23 20 43 6f  s reserved..# Co
0150: 70 79 72 69 67 68 74 20 c2 a9 20 32 30 30 37 20  pyright © 2007 
0160: 44 61 6e 69 65 6c 20 41 2e 20 53 74 65 66 66 65  Daniel A. Steffe
0170: 6e 20 3c 64 61 73 40 75 73 65 72 73 2e 73 6f 75  n <[email protected]
0180: 72 63 65 66 6f 72 67 65 2e 6e 65 74 3e 0a 23 0a  rceforge.net>.#.
0190: 23 20 53 65 65 20 74 68 65 20 66 69 6c 65 20 22  # See the file "
01a0: 6c 69 63 65 6e 73 65 2e 74 65 72 6d 73 22 20 66  license.terms" f
01b0: 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f  or information o
01c0: 6e 20 75 73 61 67 65 20 61 6e 64 20 72 65 64 69  n usage and redi
01d0: 73 74 72 69 62 75 74 69 6f 6e 0a 23 20 6f 66 20  stribution.# of 
01e0: 74 68 69 73 20 66 69 6c 65 2c 20 61 6e 64 20 66  this file, and f
01f0: 6f 72 20 61 20 44 49 53 43 4c 41 49 4d 45 52 20  or a DISCLAIMER 
0200: 4f 46 20 41 4c 4c 20 57 41 52 52 41 4e 54 49 45  OF ALL WARRANTIE
0210: 53 2e 0a 0a 6c 69 62 72 61 72 79 20 74 63 6c 0a  S...library tcl.
0220: 0c 0a 23 20 44 65 66 69 6e 65 20 74 68 65 20 75  ..# Define the u
0230: 6e 73 75 70 70 6f 72 74 65 64 20 67 65 6e 65 72  nsupported gener
0240: 69 63 20 69 6e 74 65 72 66 61 63 65 73 2e 0a 0a  ic interfaces...
0250: 69 6e 74 65 72 66 61 63 65 20 74 63 6c 49 6e 74  interface tclInt
0260: 0a 73 63 73 70 65 63 20 45 58 54 45 52 4e 0a 0a  .scspec EXTERN..
0270: 23 20 44 65 63 6c 61 72 65 20 65 61 63 68 20 6f  # Declare each o
0280: 66 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 73 20  f the functions 
0290: 69 6e 20 74 68 65 20 75 6e 73 75 70 70 6f 72 74  in the unsupport
02a0: 65 64 20 69 6e 74 65 72 6e 61 6c 20 54 63 6c 0a  ed internal Tcl.
02b0: 23 20 69 6e 74 65 72 66 61 63 65 2e 20 20 54 68  # interface.  Th
02c0: 65 73 65 20 69 6e 74 65 72 66 61 63 65 73 20 61  ese interfaces a
02d0: 72 65 20 61 6c 6c 6f 77 65 64 20 74 6f 20 63 68  re allowed to ch
02e0: 61 6e 67 65 64 20 62 65 74 77 65 65 6e 20 76 65  anged between ve
02f0: 72 73 69 6f 6e 73 2e 0a 23 20 55 73 65 20 61 74  rsions..# Use at
0300: 20 79 6f 75 72 20 6f 77 6e 20 72 69 73 6b 2e 20   your own risk. 
0310: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 20 70   Note that the p
0320: 6f 73 69 74 69 6f 6e 20 6f 66 20 66 75 6e 63 74  osition of funct
0330: 69 6f 6e 73 20 73 68 6f 75 6c 64 20 6e 6f 74 0a  ions should not.
0340: 23 20 62 65 20 63 68 61 6e 67 65 64 20 62 65 74  # be changed bet
0350: 77 65 65 6e 20 76 65 72 73 69 6f 6e 73 20 74 6f  ween versions to
0360: 20 61 76 6f 69 64 20 67 72 61 74 75 69 74 6f 75   avoid gratuitou
0370: 73 20 69 6e 63 6f 6d 70 61 74 69 62 69 6c 69 74  s incompatibilit
0380: 69 65 73 2e 0a 0a 64 65 63 6c 61 72 65 20 33 20  ies...declare 3 
0390: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 41 6c  {.    void TclAl
03a0: 6c 6f 63 61 74 65 46 72 65 65 4f 62 6a 65 63 74  locateFreeObject
03b0: 73 28 76 6f 69 64 29 0a 7d 0a 64 65 63 6c 61 72  s(void).}.declar
03c0: 65 20 35 20 7b 0a 20 20 20 20 69 6e 74 20 54 63  e 5 {.    int Tc
03d0: 6c 43 6c 65 61 6e 75 70 43 68 69 6c 64 72 65 6e  lCleanupChildren
03e0: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
03f0: 65 72 70 2c 20 54 63 6c 5f 53 69 7a 65 20 6e 75  erp, Tcl_Size nu
0400: 6d 50 69 64 73 2c 20 54 63 6c 5f 50 69 64 20 2a  mPids, Tcl_Pid *
0410: 70 69 64 50 74 72 2c 0a 09 20 20 20 20 54 63 6c  pidPtr,..    Tcl
0420: 5f 43 68 61 6e 6e 65 6c 20 65 72 72 6f 72 43 68  _Channel errorCh
0430: 61 6e 29 0a 7d 0a 64 65 63 6c 61 72 65 20 36 20  an).}.declare 6 
0440: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 43 6c  {.    void TclCl
0450: 65 61 6e 75 70 43 6f 6d 6d 61 6e 64 28 43 6f 6d  eanupCommand(Com
0460: 6d 61 6e 64 20 2a 63 6d 64 50 74 72 29 0a 7d 0a  mand *cmdPtr).}.
0470: 64 65 63 6c 61 72 65 20 37 20 7b 0a 20 20 20 20  declare 7 {.    
0480: 54 63 6c 5f 53 69 7a 65 20 54 63 6c 43 6f 70 79  Tcl_Size TclCopy
0490: 41 6e 64 43 6f 6c 6c 61 70 73 65 28 54 63 6c 5f  AndCollapse(Tcl_
04a0: 53 69 7a 65 20 63 6f 75 6e 74 2c 20 63 6f 6e 73  Size count, cons
04b0: 74 20 63 68 61 72 20 2a 73 72 63 2c 20 63 68 61  t char *src, cha
04c0: 72 20 2a 64 73 74 29 0a 7d 0a 23 20 54 63 6c 43  r *dst).}.# TclC
04d0: 72 65 61 74 65 50 69 70 65 6c 69 6e 65 20 75 6e  reatePipeline un
04e0: 6f 66 66 69 63 69 61 6c 6c 79 20 65 78 70 6f 72  officially expor
04f0: 74 65 64 20 66 6f 72 20 75 73 65 20 62 79 20 42  ted for use by B
0500: 4c 54 2e 0a 64 65 63 6c 61 72 65 20 39 20 7b 0a  LT..declare 9 {.
0510: 20 20 20 20 54 63 6c 5f 53 69 7a 65 20 54 63 6c      Tcl_Size Tcl
0520: 43 72 65 61 74 65 50 69 70 65 6c 69 6e 65 28 54  CreatePipeline(T
0530: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72  cl_Interp *inter
0540: 70 2c 20 54 63 6c 5f 53 69 7a 65 20 61 72 67 63  p, Tcl_Size argc
0550: 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 2a 61  , const char **a
0560: 72 67 76 2c 0a 09 20 20 20 20 54 63 6c 5f 50 69  rgv,..    Tcl_Pi
0570: 64 20 2a 2a 70 69 64 41 72 72 61 79 50 74 72 2c  d **pidArrayPtr,
0580: 20 54 63 6c 46 69 6c 65 20 2a 69 6e 50 69 70 65   TclFile *inPipe
0590: 50 74 72 2c 20 54 63 6c 46 69 6c 65 20 2a 6f 75  Ptr, TclFile *ou
05a0: 74 50 69 70 65 50 74 72 2c 0a 09 20 20 20 20 54  tPipePtr,..    T
05b0: 63 6c 46 69 6c 65 20 2a 65 72 72 46 69 6c 65 50  clFile *errFileP
05c0: 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 30  tr).}.declare 10
05d0: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 43 72   {.    int TclCr
05e0: 65 61 74 65 50 72 6f 63 28 54 63 6c 5f 49 6e 74  eateProc(Tcl_Int
05f0: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 4e 61 6d  erp *interp, Nam
0600: 65 73 70 61 63 65 20 2a 6e 73 50 74 72 2c 0a 09  espace *nsPtr,..
0610: 20 20 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a      const char *
0620: 70 72 6f 63 4e 61 6d 65 2c 0a 09 20 20 20 20 54  procName,..    T
0630: 63 6c 5f 4f 62 6a 20 2a 61 72 67 73 50 74 72 2c  cl_Obj *argsPtr,
0640: 20 54 63 6c 5f 4f 62 6a 20 2a 62 6f 64 79 50 74   Tcl_Obj *bodyPt
0650: 72 2c 20 50 72 6f 63 20 2a 2a 70 72 6f 63 50 74  r, Proc **procPt
0660: 72 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20  rPtr).}.declare 
0670: 31 31 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63  11 {.    void Tc
0680: 6c 44 65 6c 65 74 65 43 6f 6d 70 69 6c 65 64 4c  lDeleteCompiledL
0690: 6f 63 61 6c 56 61 72 73 28 49 6e 74 65 72 70 20  ocalVars(Interp 
06a0: 2a 69 50 74 72 2c 20 43 61 6c 6c 46 72 61 6d 65  *iPtr, CallFrame
06b0: 20 2a 66 72 61 6d 65 50 74 72 29 0a 7d 0a 64 65   *framePtr).}.de
06c0: 63 6c 61 72 65 20 31 32 20 7b 0a 20 20 20 20 76  clare 12 {.    v
06d0: 6f 69 64 20 54 63 6c 44 65 6c 65 74 65 56 61 72  oid TclDeleteVar
06e0: 73 28 49 6e 74 65 72 70 20 2a 69 50 74 72 2c 20  s(Interp *iPtr, 
06f0: 54 63 6c 56 61 72 48 61 73 68 54 61 62 6c 65 20  TclVarHashTable 
0700: 2a 74 61 62 6c 65 50 74 72 29 0a 7d 0a 64 65 63  *tablePtr).}.dec
0710: 6c 61 72 65 20 31 34 20 7b 0a 20 20 20 20 69 6e  lare 14 {.    in
0720: 74 20 54 63 6c 44 75 6d 70 4d 65 6d 6f 72 79 49  t TclDumpMemoryI
0730: 6e 66 6f 28 76 6f 69 64 20 2a 63 6c 69 65 6e 74  nfo(void *client
0740: 44 61 74 61 2c 20 69 6e 74 20 66 6c 61 67 73 29  Data, int flags)
0750: 0a 7d 0a 64 65 63 6c 61 72 65 20 31 36 20 7b 0a  .}.declare 16 {.
0760: 20 20 20 20 76 6f 69 64 20 54 63 6c 45 78 70 72      void TclExpr
0770: 46 6c 6f 61 74 45 72 72 6f 72 28 54 63 6c 5f 49  FloatError(Tcl_I
0780: 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 64  nterp *interp, d
0790: 6f 75 62 6c 65 20 76 61 6c 75 65 29 0a 7d 0a 64  ouble value).}.d
07a0: 65 63 6c 61 72 65 20 32 32 20 7b 0a 20 20 20 20  eclare 22 {.    
07b0: 69 6e 74 20 54 63 6c 46 69 6e 64 45 6c 65 6d 65  int TclFindEleme
07c0: 6e 74 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69  nt(Tcl_Interp *i
07d0: 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61  nterp, const cha
07e0: 72 20 2a 6c 69 73 74 53 74 72 2c 0a 09 20 20 20  r *listStr,..   
07f0: 20 54 63 6c 5f 53 69 7a 65 20 6c 69 73 74 4c 65   Tcl_Size listLe
0800: 6e 67 74 68 2c 20 63 6f 6e 73 74 20 63 68 61 72  ngth, const char
0810: 20 2a 2a 65 6c 65 6d 65 6e 74 50 74 72 2c 20 63   **elementPtr, c
0820: 6f 6e 73 74 20 63 68 61 72 20 2a 2a 6e 65 78 74  onst char **next
0830: 50 74 72 2c 0a 09 20 20 20 20 54 63 6c 5f 53 69  Ptr,..    Tcl_Si
0840: 7a 65 20 2a 73 69 7a 65 50 74 72 2c 20 69 6e 74  ze *sizePtr, int
0850: 20 2a 62 72 61 63 65 50 74 72 29 0a 7d 0a 64 65   *bracePtr).}.de
0860: 63 6c 61 72 65 20 32 33 20 7b 0a 20 20 20 20 50  clare 23 {.    P
0870: 72 6f 63 20 2a 54 63 6c 46 69 6e 64 50 72 6f 63  roc *TclFindProc
0880: 28 49 6e 74 65 72 70 20 2a 69 50 74 72 2c 20 63  (Interp *iPtr, c
0890: 6f 6e 73 74 20 63 68 61 72 20 2a 70 72 6f 63 4e  onst char *procN
08a0: 61 6d 65 29 0a 7d 0a 23 20 52 65 70 6c 61 63 65  ame).}.# Replace
08b0: 64 20 77 69 74 68 20 6d 61 63 72 6f 20 28 73 65  d with macro (se
08c0: 65 20 74 63 6c 49 6e 74 2e 68 29 20 69 6e 20 54  e tclInt.h) in T
08d0: 63 6c 20 38 2e 35 2e 30 2c 20 72 65 73 74 6f 72  cl 8.5.0, restor
08e0: 65 64 20 69 6e 20 38 2e 35 2e 31 30 0a 64 65 63  ed in 8.5.10.dec
08f0: 6c 61 72 65 20 32 34 20 7b 0a 20 20 20 20 54 63  lare 24 {.    Tc
0900: 6c 5f 53 69 7a 65 20 54 63 6c 46 6f 72 6d 61 74  l_Size TclFormat
0910: 49 6e 74 28 63 68 61 72 20 2a 62 75 66 66 65 72  Int(char *buffer
0920: 2c 20 54 63 6c 5f 57 69 64 65 49 6e 74 20 6e 29  , Tcl_WideInt n)
0930: 0a 7d 0a 64 65 63 6c 61 72 65 20 32 35 20 7b 0a  .}.declare 25 {.
0940: 20 20 20 20 76 6f 69 64 20 54 63 6c 46 72 65 65      void TclFree
0950: 50 61 63 6b 61 67 65 49 6e 66 6f 28 49 6e 74 65  PackageInfo(Inte
0960: 72 70 20 2a 69 50 74 72 29 0a 7d 0a 64 65 63 6c  rp *iPtr).}.decl
0970: 61 72 65 20 32 38 20 7b 0a 20 20 20 20 54 63 6c  are 28 {.    Tcl
0980: 5f 43 68 61 6e 6e 65 6c 20 54 63 6c 70 47 65 74  _Channel TclpGet
0990: 44 65 66 61 75 6c 74 53 74 64 43 68 61 6e 6e 65  DefaultStdChanne
09a0: 6c 28 69 6e 74 20 74 79 70 65 29 0a 7d 0a 64 65  l(int type).}.de
09b0: 63 6c 61 72 65 20 33 31 20 7b 0a 20 20 20 20 63  clare 31 {.    c
09c0: 6f 6e 73 74 20 63 68 61 72 20 2a 54 63 6c 47 65  onst char *TclGe
09d0: 74 45 78 74 65 6e 73 69 6f 6e 28 63 6f 6e 73 74  tExtension(const
09e0: 20 63 68 61 72 20 2a 6e 61 6d 65 29 0a 7d 0a 64   char *name).}.d
09f0: 65 63 6c 61 72 65 20 33 32 20 7b 0a 20 20 20 20  eclare 32 {.    
0a00: 69 6e 74 20 54 63 6c 47 65 74 46 72 61 6d 65 28  int TclGetFrame(
0a10: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65  Tcl_Interp *inte
0a20: 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a  rp, const char *
0a30: 73 74 72 2c 0a 09 20 20 20 20 43 61 6c 6c 46 72  str,..    CallFr
0a40: 61 6d 65 20 2a 2a 66 72 61 6d 65 50 74 72 50 74  ame **framePtrPt
0a50: 72 29 0a 7d 0a 23 20 52 65 6d 6f 76 65 64 20 69  r).}.# Removed i
0a60: 6e 20 39 2e 30 3a 0a 23 64 65 63 6c 61 72 65 20  n 9.0:.#declare 
0a70: 33 34 20 7b 0a 23 20 20 20 20 69 6e 74 20 54 63  34 {.#    int Tc
0a80: 6c 47 65 74 49 6e 74 46 6f 72 49 6e 64 65 78 28  lGetIntForIndex(
0a90: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65  Tcl_Interp *inte
0aa0: 72 70 2c 20 54 63 6c 5f 4f 62 6a 20 2a 6f 62 6a  rp, Tcl_Obj *obj
0ab0: 50 74 72 2c 0a 23 09 20 20 20 20 69 6e 74 20 65  Ptr,.#.    int e
0ac0: 6e 64 56 61 6c 75 65 2c 20 69 6e 74 20 2a 69 6e  ndValue, int *in
0ad0: 64 65 78 50 74 72 29 0a 23 7d 0a 23 64 65 63 6c  dexPtr).#}.#decl
0ae0: 61 72 65 20 33 37 20 7b 0a 23 20 20 20 20 69 6e  are 37 {.#    in
0af0: 74 20 54 63 6c 47 65 74 4c 6f 61 64 65 64 50 61  t TclGetLoadedPa
0b00: 63 6b 61 67 65 73 28 54 63 6c 5f 49 6e 74 65 72  ckages(Tcl_Inter
0b10: 70 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e 73 74  p *interp, const
0b20: 20 63 68 61 72 20 2a 74 61 72 67 65 74 4e 61 6d   char *targetNam
0b30: 65 29 0a 23 7d 0a 64 65 63 6c 61 72 65 20 33 38  e).#}.declare 38
0b40: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 47 65   {.    int TclGe
0b50: 74 4e 61 6d 65 73 70 61 63 65 46 6f 72 51 75 61  tNamespaceForQua
0b60: 6c 4e 61 6d 65 28 54 63 6c 5f 49 6e 74 65 72 70  lName(Tcl_Interp
0b70: 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20   *interp, const 
0b80: 63 68 61 72 20 2a 71 75 61 6c 4e 61 6d 65 2c 0a  char *qualName,.
0b90: 09 20 20 20 20 4e 61 6d 65 73 70 61 63 65 20 2a  .    Namespace *
0ba0: 63 78 74 4e 73 50 74 72 2c 20 69 6e 74 20 66 6c  cxtNsPtr, int fl
0bb0: 61 67 73 2c 20 4e 61 6d 65 73 70 61 63 65 20 2a  ags, Namespace *
0bc0: 2a 6e 73 50 74 72 50 74 72 2c 0a 09 20 20 20 20  *nsPtrPtr,..    
0bd0: 4e 61 6d 65 73 70 61 63 65 20 2a 2a 61 6c 74 4e  Namespace **altN
0be0: 73 50 74 72 50 74 72 2c 20 4e 61 6d 65 73 70 61  sPtrPtr, Namespa
0bf0: 63 65 20 2a 2a 61 63 74 75 61 6c 43 78 74 50 74  ce **actualCxtPt
0c00: 72 50 74 72 2c 0a 09 20 20 20 20 63 6f 6e 73 74  rPtr,..    const
0c10: 20 63 68 61 72 20 2a 2a 73 69 6d 70 6c 65 4e 61   char **simpleNa
0c20: 6d 65 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  mePtr).}.declare
0c30: 20 33 39 20 7b 0a 20 20 20 20 54 63 6c 5f 4f 62   39 {.    Tcl_Ob
0c40: 6a 43 6d 64 50 72 6f 63 20 2a 54 63 6c 47 65 74  jCmdProc *TclGet
0c50: 4f 62 6a 49 6e 74 65 72 70 50 72 6f 63 28 76 6f  ObjInterpProc(vo
0c60: 69 64 29 0a 7d 0a 64 65 63 6c 61 72 65 20 34 30  id).}.declare 40
0c70: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 47 65   {.    int TclGe
0c80: 74 4f 70 65 6e 4d 6f 64 65 28 54 63 6c 5f 49 6e  tOpenMode(Tcl_In
0c90: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 63 6f  terp *interp, co
0ca0: 6e 73 74 20 63 68 61 72 20 2a 73 74 72 2c 20 69  nst char *str, i
0cb0: 6e 74 20 2a 6d 6f 64 65 46 6c 61 67 73 50 74 72  nt *modeFlagsPtr
0cc0: 29 0a 7d 0a 64 65 63 6c 61 72 65 20 34 31 20 7b  ).}.declare 41 {
0cd0: 0a 20 20 20 20 54 63 6c 5f 43 6f 6d 6d 61 6e 64  .    Tcl_Command
0ce0: 20 54 63 6c 47 65 74 4f 72 69 67 69 6e 61 6c 43   TclGetOriginalC
0cf0: 6f 6d 6d 61 6e 64 28 54 63 6c 5f 43 6f 6d 6d 61  ommand(Tcl_Comma
0d00: 6e 64 20 63 6f 6d 6d 61 6e 64 29 0a 7d 0a 64 65  nd command).}.de
0d10: 63 6c 61 72 65 20 34 32 20 7b 0a 20 20 20 20 63  clare 42 {.    c
0d20: 6f 6e 73 74 20 63 68 61 72 20 2a 54 63 6c 70 47  onst char *TclpG
0d30: 65 74 55 73 65 72 48 6f 6d 65 28 63 6f 6e 73 74  etUserHome(const
0d40: 20 63 68 61 72 20 2a 6e 61 6d 65 2c 20 54 63 6c   char *name, Tcl
0d50: 5f 44 53 74 72 69 6e 67 20 2a 62 75 66 66 65 72  _DString *buffer
0d60: 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 34  Ptr).}.declare 4
0d70: 33 20 7b 0a 20 20 20 20 54 63 6c 5f 4f 62 6a 43  3 {.    Tcl_ObjC
0d80: 6d 64 50 72 6f 63 32 20 2a 54 63 6c 47 65 74 4f  mdProc2 *TclGetO
0d90: 62 6a 49 6e 74 65 72 70 50 72 6f 63 32 28 76 6f  bjInterpProc2(vo
0da0: 69 64 29 0a 7d 0a 23 20 52 65 6d 6f 76 65 64 20  id).}.# Removed 
0db0: 69 6e 20 39 2e 30 3a 0a 23 64 65 63 6c 61 72 65  in 9.0:.#declare
0dc0: 20 34 34 20 7b 0a 23 20 20 20 20 69 6e 74 20 54   44 {.#    int T
0dd0: 63 6c 47 75 65 73 73 50 61 63 6b 61 67 65 4e 61  clGuessPackageNa
0de0: 6d 65 28 63 6f 6e 73 74 20 63 68 61 72 20 2a 66  me(const char *f
0df0: 69 6c 65 4e 61 6d 65 2c 20 54 63 6c 5f 44 53 74  ileName, Tcl_DSt
0e00: 72 69 6e 67 20 2a 62 75 66 50 74 72 29 0a 23 7d  ring *bufPtr).#}
0e10: 0a 64 65 63 6c 61 72 65 20 34 35 20 7b 0a 20 20  .declare 45 {.  
0e20: 20 20 69 6e 74 20 54 63 6c 48 69 64 65 55 6e 73    int TclHideUns
0e30: 61 66 65 43 6f 6d 6d 61 6e 64 73 28 54 63 6c 5f  afeCommands(Tcl_
0e40: 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 29 0a  Interp *interp).
0e50: 7d 0a 64 65 63 6c 61 72 65 20 34 36 20 7b 0a 20  }.declare 46 {. 
0e60: 20 20 20 62 6f 6f 6c 20 54 63 6c 49 6e 45 78 69     bool TclInExi
0e70: 74 28 76 6f 69 64 29 0a 7d 0a 23 20 52 65 6d 6f  t(void).}.# Remo
0e80: 76 65 64 20 69 6e 20 39 2e 30 3a 0a 23 64 65 63  ved in 9.0:.#dec
0e90: 6c 61 72 65 20 35 30 20 7b 0a 23 20 20 20 20 76  lare 50 {.#    v
0ea0: 6f 69 64 20 54 63 6c 49 6e 69 74 43 6f 6d 70 69  oid TclInitCompi
0eb0: 6c 65 64 4c 6f 63 61 6c 73 28 54 63 6c 5f 49 6e  ledLocals(Tcl_In
0ec0: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 43 61  terp *interp, Ca
0ed0: 6c 6c 46 72 61 6d 65 20 2a 66 72 61 6d 65 50 74  llFrame *framePt
0ee0: 72 2c 0a 23 09 20 20 20 20 4e 61 6d 65 73 70 61  r,.#.    Namespa
0ef0: 63 65 20 2a 6e 73 50 74 72 29 0a 23 7d 0a 64 65  ce *nsPtr).#}.de
0f00: 63 6c 61 72 65 20 35 31 20 7b 0a 20 20 20 20 69  clare 51 {.    i
0f10: 6e 74 20 54 63 6c 49 6e 74 65 72 70 49 6e 69 74  nt TclInterpInit
0f20: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
0f30: 65 72 70 29 0a 7d 0a 23 20 52 65 6d 6f 76 65 64  erp).}.# Removed
0f40: 20 69 6e 20 39 2e 30 0a 23 64 65 63 6c 61 72 65   in 9.0.#declare
0f50: 20 35 33 20 7b 0a 23 20 20 20 20 69 6e 74 20 54   53 {.#    int T
0f60: 63 6c 49 6e 76 6f 6b 65 4f 62 6a 65 63 74 43 6f  clInvokeObjectCo
0f70: 6d 6d 61 6e 64 28 76 6f 69 64 20 2a 63 6c 69 65  mmand(void *clie
0f80: 6e 74 44 61 74 61 2c 20 54 63 6c 5f 49 6e 74 65  ntData, Tcl_Inte
0f90: 72 70 20 2a 69 6e 74 65 72 70 2c 0a 23 09 20 20  rp *interp,.#.  
0fa0: 20 20 54 63 6c 5f 53 69 7a 65 20 61 72 67 63 2c    Tcl_Size argc,
0fb0: 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 2a 61 72   const char **ar
0fc0: 67 76 29 0a 23 7d 0a 23 64 65 63 6c 61 72 65 20  gv).#}.#declare 
0fd0: 35 34 20 7b 0a 23 20 20 20 20 69 6e 74 20 54 63  54 {.#    int Tc
0fe0: 6c 49 6e 76 6f 6b 65 53 74 72 69 6e 67 43 6f 6d  lInvokeStringCom
0ff0: 6d 61 6e 64 28 76 6f 69 64 20 2a 63 6c 69 65 6e  mand(void *clien
1000: 74 44 61 74 61 2c 20 54 63 6c 5f 49 6e 74 65 72  tData, Tcl_Inter
1010: 70 20 2a 69 6e 74 65 72 70 2c 0a 23 09 20 20 20  p *interp,.#.   
1020: 20 54 63 6c 5f 53 69 7a 65 20 6f 62 6a 63 2c 20   Tcl_Size objc, 
1030: 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f  Tcl_Obj *const o
1040: 62 6a 76 5b 5d 29 0a 23 7d 0a 64 65 63 6c 61 72  bjv[]).#}.declar
1050: 65 20 35 35 20 7b 0a 20 20 20 20 50 72 6f 63 20  e 55 {.    Proc 
1060: 2a 54 63 6c 49 73 50 72 6f 63 28 43 6f 6d 6d 61  *TclIsProc(Comma
1070: 6e 64 20 2a 63 6d 64 50 74 72 29 0a 7d 0a 64 65  nd *cmdPtr).}.de
1080: 63 6c 61 72 65 20 35 38 20 7b 0a 20 20 20 20 56  clare 58 {.    V
1090: 61 72 20 2a 54 63 6c 4c 6f 6f 6b 75 70 56 61 72  ar *TclLookupVar
10a0: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
10b0: 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20  erp, const char 
10c0: 2a 70 61 72 74 31 2c 20 63 6f 6e 73 74 20 63 68  *part1, const ch
10d0: 61 72 20 2a 70 61 72 74 32 2c 0a 09 20 20 20 20  ar *part2,..    
10e0: 69 6e 74 20 66 6c 61 67 73 2c 20 63 6f 6e 73 74  int flags, const
10f0: 20 63 68 61 72 20 2a 6d 73 67 2c 20 69 6e 74 20   char *msg, int 
1100: 63 72 65 61 74 65 50 61 72 74 31 2c 20 69 6e 74  createPart1, int
1110: 20 63 72 65 61 74 65 50 61 72 74 32 2c 0a 09 20   createPart2,.. 
1120: 20 20 20 56 61 72 20 2a 2a 61 72 72 61 79 50 74     Var **arrayPt
1130: 72 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20  rPtr).}.declare 
1140: 36 30 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c  60 {.    int Tcl
1150: 4e 65 65 64 53 70 61 63 65 28 63 6f 6e 73 74 20  NeedSpace(const 
1160: 63 68 61 72 20 2a 73 74 61 72 74 2c 20 63 6f 6e  char *start, con
1170: 73 74 20 63 68 61 72 20 2a 65 6e 64 29 0a 7d 0a  st char *end).}.
1180: 64 65 63 6c 61 72 65 20 36 31 20 7b 0a 20 20 20  declare 61 {.   
1190: 20 54 63 6c 5f 4f 62 6a 20 2a 54 63 6c 4e 65 77   Tcl_Obj *TclNew
11a0: 50 72 6f 63 42 6f 64 79 4f 62 6a 28 50 72 6f 63  ProcBodyObj(Proc
11b0: 20 2a 70 72 6f 63 50 74 72 29 0a 7d 0a 64 65 63   *procPtr).}.dec
11c0: 6c 61 72 65 20 36 32 20 7b 0a 20 20 20 20 69 6e  lare 62 {.    in
11d0: 74 20 54 63 6c 4f 62 6a 43 6f 6d 6d 61 6e 64 43  t TclObjCommandC
11e0: 6f 6d 70 6c 65 74 65 28 54 63 6c 5f 4f 62 6a 20  omplete(Tcl_Obj 
11f0: 2a 63 6d 64 50 74 72 29 0a 7d 0a 64 65 63 6c 61  *cmdPtr).}.decla
1200: 72 65 20 36 34 20 7b 0a 20 20 20 20 69 6e 74 20  re 64 {.    int 
1210: 54 63 6c 4f 62 6a 49 6e 76 6f 6b 65 28 54 63 6c  TclObjInvoke(Tcl
1220: 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c  _Interp *interp,
1230: 20 54 63 6c 5f 53 69 7a 65 20 6f 62 6a 63 2c 20   Tcl_Size objc, 
1240: 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f  Tcl_Obj *const o
1250: 62 6a 76 5b 5d 2c 0a 09 20 20 20 20 69 6e 74 20  bjv[],..    int 
1260: 66 6c 61 67 73 29 0a 7d 0a 64 65 63 6c 61 72 65  flags).}.declare
1270: 20 36 39 20 7b 0a 20 20 20 20 76 6f 69 64 20 2a   69 {.    void *
1280: 54 63 6c 70 41 6c 6c 6f 63 28 73 69 7a 65 5f 74  TclpAlloc(size_t
1290: 20 73 69 7a 65 29 0a 7d 0a 64 65 63 6c 61 72 65   size).}.declare
12a0: 20 37 34 20 7b 0a 20 20 20 20 76 6f 69 64 20 54   74 {.    void T
12b0: 63 6c 70 46 72 65 65 28 76 6f 69 64 20 2a 70 74  clpFree(void *pt
12c0: 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 37 35 20  r).}.declare 75 
12d0: 7b 0a 20 20 20 20 75 6e 73 69 67 6e 65 64 20 6c  {.    unsigned l
12e0: 6f 6e 67 20 6c 6f 6e 67 20 54 63 6c 70 47 65 74  ong long TclpGet
12f0: 43 6c 69 63 6b 73 28 76 6f 69 64 29 0a 7d 0a 64  Clicks(void).}.d
1300: 65 63 6c 61 72 65 20 37 36 20 7b 0a 20 20 20 20  eclare 76 {.    
1310: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c 6f  unsigned long lo
1320: 6e 67 20 54 63 6c 70 47 65 74 53 65 63 6f 6e 64  ng TclpGetSecond
1330: 73 28 76 6f 69 64 29 0a 7d 0a 23 20 52 65 6d 6f  s(void).}.# Remo
1340: 76 65 64 20 69 6e 20 39 2e 30 3a 0a 23 64 65 63  ved in 9.0:.#dec
1350: 6c 61 72 65 20 37 37 20 7b 0a 23 20 20 20 20 76  lare 77 {.#    v
1360: 6f 69 64 20 54 63 6c 70 47 65 74 54 69 6d 65 28  oid TclpGetTime(
1370: 54 63 6c 5f 54 69 6d 65 20 2a 74 69 6d 65 29 0a  Tcl_Time *time).
1380: 23 7d 0a 64 65 63 6c 61 72 65 20 38 31 20 7b 0a  #}.declare 81 {.
1390: 20 20 20 20 76 6f 69 64 20 2a 54 63 6c 70 52 65      void *TclpRe
13a0: 61 6c 6c 6f 63 28 76 6f 69 64 20 2a 70 74 72 2c  alloc(void *ptr,
13b0: 20 73 69 7a 65 5f 74 20 73 69 7a 65 29 0a 7d 0a   size_t size).}.
13c0: 23 20 52 65 6d 6f 76 65 64 20 69 6e 20 39 2e 30  # Removed in 9.0
13d0: 3a 0a 23 64 65 63 6c 61 72 65 20 38 38 20 7b 0a  :.#declare 88 {.
13e0: 23 20 20 20 20 63 68 61 72 20 2a 54 63 6c 50 72  #    char *TclPr
13f0: 65 63 54 72 61 63 65 50 72 6f 63 28 76 6f 69 64  ecTraceProc(void
1400: 20 2a 63 6c 69 65 6e 74 44 61 74 61 2c 20 54 63   *clientData, Tc
1410: 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70  l_Interp *interp
1420: 2c 0a 23 09 20 20 20 20 63 6f 6e 73 74 20 63 68  ,.#.    const ch
1430: 61 72 20 2a 6e 61 6d 65 31 2c 20 63 6f 6e 73 74  ar *name1, const
1440: 20 63 68 61 72 20 2a 6e 61 6d 65 32 2c 20 69 6e   char *name2, in
1450: 74 20 66 6c 61 67 73 29 0a 23 7d 0a 64 65 63 6c  t flags).#}.decl
1460: 61 72 65 20 38 39 20 7b 0a 20 20 20 20 69 6e 74  are 89 {.    int
1470: 20 54 63 6c 50 72 65 76 65 6e 74 41 6c 69 61 73   TclPreventAlias
1480: 4c 6f 6f 70 28 54 63 6c 5f 49 6e 74 65 72 70 20  Loop(Tcl_Interp 
1490: 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 49 6e 74  *interp, Tcl_Int
14a0: 65 72 70 20 2a 63 6d 64 49 6e 74 65 72 70 2c 0a  erp *cmdInterp,.
14b0: 09 20 20 20 20 54 63 6c 5f 43 6f 6d 6d 61 6e 64  .    Tcl_Command
14c0: 20 63 6d 64 29 0a 7d 0a 64 65 63 6c 61 72 65 20   cmd).}.declare 
14d0: 39 31 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63  91 {.    void Tc
14e0: 6c 50 72 6f 63 43 6c 65 61 6e 75 70 50 72 6f 63  lProcCleanupProc
14f0: 28 50 72 6f 63 20 2a 70 72 6f 63 50 74 72 29 0a  (Proc *procPtr).
1500: 7d 0a 64 65 63 6c 61 72 65 20 39 32 20 7b 0a 20  }.declare 92 {. 
1510: 20 20 20 69 6e 74 20 54 63 6c 50 72 6f 63 43 6f     int TclProcCo
1520: 6d 70 69 6c 65 50 72 6f 63 28 54 63 6c 5f 49 6e  mpileProc(Tcl_In
1530: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 50 72  terp *interp, Pr
1540: 6f 63 20 2a 70 72 6f 63 50 74 72 2c 0a 09 20 20  oc *procPtr,..  
1550: 20 20 54 63 6c 5f 4f 62 6a 20 2a 62 6f 64 79 50    Tcl_Obj *bodyP
1560: 74 72 2c 20 4e 61 6d 65 73 70 61 63 65 20 2a 6e  tr, Namespace *n
1570: 73 50 74 72 2c 20 63 6f 6e 73 74 20 63 68 61 72  sPtr, const char
1580: 20 2a 64 65 73 63 72 69 70 74 69 6f 6e 2c 0a 09   *description,..
1590: 20 20 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a      const char *
15a0: 70 72 6f 63 4e 61 6d 65 29 0a 7d 0a 64 65 63 6c  procName).}.decl
15b0: 61 72 65 20 39 33 20 7b 0a 20 20 20 20 76 6f 69  are 93 {.    voi
15c0: 64 20 54 63 6c 50 72 6f 63 44 65 6c 65 74 65 50  d TclProcDeleteP
15d0: 72 6f 63 28 76 6f 69 64 20 2a 63 6c 69 65 6e 74  roc(void *client
15e0: 44 61 74 61 29 0a 7d 0a 64 65 63 6c 61 72 65 20  Data).}.declare 
15f0: 39 36 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c  96 {.    int Tcl
1600: 52 65 6e 61 6d 65 43 6f 6d 6d 61 6e 64 28 54 63  RenameCommand(Tc
1610: 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70  l_Interp *interp
1620: 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 6f 6c  , const char *ol
1630: 64 4e 61 6d 65 2c 0a 09 20 20 20 20 63 6f 6e 73  dName,..    cons
1640: 74 20 63 68 61 72 20 2a 6e 65 77 4e 61 6d 65 29  t char *newName)
1650: 0a 7d 0a 64 65 63 6c 61 72 65 20 39 37 20 7b 0a  .}.declare 97 {.
1660: 20 20 20 20 76 6f 69 64 20 54 63 6c 52 65 73 65      void TclRese
1670: 74 53 68 61 64 6f 77 65 64 43 6d 64 52 65 66 73  tShadowedCmdRefs
1680: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
1690: 65 72 70 2c 20 43 6f 6d 6d 61 6e 64 20 2a 6e 65  erp, Command *ne
16a0: 77 43 6d 64 50 74 72 29 0a 7d 0a 64 65 63 6c 61  wCmdPtr).}.decla
16b0: 72 65 20 39 38 20 7b 0a 20 20 20 20 69 6e 74 20  re 98 {.    int 
16c0: 54 63 6c 53 65 72 76 69 63 65 49 64 6c 65 28 76  TclServiceIdle(v
16d0: 6f 69 64 29 0a 7d 0a 23 20 52 65 6d 6f 76 65 64  oid).}.# Removed
16e0: 20 69 6e 20 39 2e 30 3a 0a 23 64 65 63 6c 61 72   in 9.0:.#declar
16f0: 65 20 31 30 31 20 7b 0a 23 20 20 20 20 63 6f 6e  e 101 {.#    con
1700: 73 74 20 63 68 61 72 20 2a 54 63 6c 53 65 74 50  st char *TclSetP
1710: 72 65 49 6e 69 74 53 63 72 69 70 74 28 63 6f 6e  reInitScript(con
1720: 73 74 20 63 68 61 72 20 2a 73 74 72 69 6e 67 29  st char *string)
1730: 0a 23 7d 0a 64 65 63 6c 61 72 65 20 31 30 32 20  .#}.declare 102 
1740: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 53 65  {.    void TclSe
1750: 74 75 70 45 6e 76 28 54 63 6c 5f 49 6e 74 65 72  tupEnv(Tcl_Inter
1760: 70 20 2a 69 6e 74 65 72 70 29 0a 7d 0a 64 65 63  p *interp).}.dec
1770: 6c 61 72 65 20 31 30 33 20 7b 0a 20 20 20 20 69  lare 103 {.    i
1780: 6e 74 20 54 63 6c 53 6f 63 6b 47 65 74 50 6f 72  nt TclSockGetPor
1790: 74 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e  t(Tcl_Interp *in
17a0: 74 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72  terp, const char
17b0: 20 2a 73 74 72 2c 20 63 6f 6e 73 74 20 63 68 61   *str, const cha
17c0: 72 20 2a 70 72 6f 74 6f 2c 0a 09 20 20 20 20 69  r *proto,..    i
17d0: 6e 74 20 2a 70 6f 72 74 50 74 72 29 0a 7d 0a 23  nt *portPtr).}.#
17e0: 20 52 65 6d 6f 76 65 64 20 69 6e 20 39 2e 30 3a   Removed in 9.0:
17f0: 0a 23 64 65 63 6c 61 72 65 20 31 30 34 20 7b 0a  .#declare 104 {.
1800: 23 20 20 20 20 69 6e 74 20 54 63 6c 53 6f 63 6b  #    int TclSock
1810: 4d 69 6e 69 6d 75 6d 42 75 66 66 65 72 73 4f 6c  MinimumBuffersOl
1820: 64 28 69 6e 74 20 73 6f 63 6b 2c 20 69 6e 74 20  d(int sock, int 
1830: 73 69 7a 65 29 0a 23 7d 0a 64 65 63 6c 61 72 65  size).#}.declare
1840: 20 31 30 38 20 7b 0a 20 20 20 20 76 6f 69 64 20   108 {.    void 
1850: 54 63 6c 54 65 61 72 64 6f 77 6e 4e 61 6d 65 73  TclTeardownNames
1860: 70 61 63 65 28 4e 61 6d 65 73 70 61 63 65 20 2a  pace(Namespace *
1870: 6e 73 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  nsPtr).}.declare
1880: 20 31 30 39 20 7b 0a 20 20 20 20 69 6e 74 20 54   109 {.    int T
1890: 63 6c 55 70 64 61 74 65 52 65 74 75 72 6e 49 6e  clUpdateReturnIn
18a0: 66 6f 28 49 6e 74 65 72 70 20 2a 69 50 74 72 29  fo(Interp *iPtr)
18b0: 0a 7d 0a 64 65 63 6c 61 72 65 20 31 31 30 20 7b  .}.declare 110 {
18c0: 0a 20 20 20 20 69 6e 74 20 54 63 6c 53 6f 63 6b  .    int TclSock
18d0: 4d 69 6e 69 6d 75 6d 42 75 66 66 65 72 73 28 76  MinimumBuffers(v
18e0: 6f 69 64 20 2a 73 6f 63 6b 2c 20 54 63 6c 5f 53  oid *sock, Tcl_S
18f0: 69 7a 65 20 73 69 7a 65 29 0a 7d 0a 0a 23 20 50  ize size).}..# P
1900: 72 6f 63 65 64 75 72 65 73 20 75 73 65 64 20 69  rocedures used i
1910: 6e 20 63 6f 6e 6a 75 6e 63 74 69 6f 6e 20 77 69  n conjunction wi
1920: 74 68 20 54 63 6c 20 6e 61 6d 65 73 70 61 63 65  th Tcl namespace
1930: 73 2e 20 54 68 65 79 20 61 72 65 0a 23 20 64 65  s. They are.# de
1940: 66 69 6e 65 64 20 68 65 72 65 20 69 6e 73 74 65  fined here inste
1950: 61 64 20 6f 66 20 69 6e 20 74 63 6c 2e 64 65 63  ad of in tcl.dec
1960: 6c 73 20 73 69 6e 63 65 20 74 68 65 79 20 61 72  ls since they ar
1970: 65 20 6e 6f 74 20 73 74 61 62 6c 65 20 79 65 74  e not stable yet
1980: 2e 0a 0a 64 65 63 6c 61 72 65 20 31 31 31 20 7b  ...declare 111 {
1990: 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 5f 41 64  .    void Tcl_Ad
19a0: 64 49 6e 74 65 72 70 52 65 73 6f 6c 76 65 72 73  dInterpResolvers
19b0: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
19c0: 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20  erp, const char 
19d0: 2a 6e 61 6d 65 2c 0a 09 20 20 20 20 54 63 6c 5f  *name,..    Tcl_
19e0: 52 65 73 6f 6c 76 65 43 6d 64 50 72 6f 63 20 2a  ResolveCmdProc *
19f0: 63 6d 64 50 72 6f 63 2c 20 54 63 6c 5f 52 65 73  cmdProc, Tcl_Res
1a00: 6f 6c 76 65 56 61 72 50 72 6f 63 20 2a 76 61 72  olveVarProc *var
1a10: 50 72 6f 63 2c 0a 09 20 20 20 20 54 63 6c 5f 52  Proc,..    Tcl_R
1a20: 65 73 6f 6c 76 65 43 6f 6d 70 69 6c 65 64 56 61  esolveCompiledVa
1a30: 72 50 72 6f 63 20 2a 63 6f 6d 70 69 6c 65 64 56  rProc *compiledV
1a40: 61 72 50 72 6f 63 29 0a 7d 0a 23 20 52 65 6d 6f  arProc).}.# Remo
1a50: 76 65 64 20 69 6e 20 39 2e 30 3a 0a 23 64 65 63  ved in 9.0:.#dec
1a60: 6c 61 72 65 20 31 31 32 20 7b 0a 23 20 20 20 20  lare 112 {.#    
1a70: 69 6e 74 20 54 63 6c 41 70 70 65 6e 64 45 78 70  int TclAppendExp
1a80: 6f 72 74 4c 69 73 74 28 54 63 6c 5f 49 6e 74 65  ortList(Tcl_Inte
1a90: 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f  rp *interp, Tcl_
1aa0: 4e 61 6d 65 73 70 61 63 65 20 2a 6e 73 50 74 72  Namespace *nsPtr
1ab0: 2c 0a 23 09 20 20 20 20 54 63 6c 5f 4f 62 6a 20  ,.#.    Tcl_Obj 
1ac0: 2a 6f 62 6a 50 74 72 29 0a 23 7d 0a 23 64 65 63  *objPtr).#}.#dec
1ad0: 6c 61 72 65 20 31 31 33 20 7b 0a 23 20 20 20 20  lare 113 {.#    
1ae0: 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65 20 2a 54  Tcl_Namespace *T
1af0: 63 6c 43 72 65 61 74 65 4e 61 6d 65 73 70 61 63  clCreateNamespac
1b00: 65 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e  e(Tcl_Interp *in
1b10: 74 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72  terp, const char
1b20: 20 2a 6e 61 6d 65 2c 0a 23 09 20 20 20 20 76 6f   *name,.#.    vo
1b30: 69 64 20 2a 63 6c 69 65 6e 74 44 61 74 61 2c 20  id *clientData, 
1b40: 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65 44 65 6c  Tcl_NamespaceDel
1b50: 65 74 65 50 72 6f 63 20 2a 64 65 6c 65 74 65 50  eteProc *deleteP
1b60: 72 6f 63 29 0a 23 7d 0a 23 64 65 63 6c 61 72 65  roc).#}.#declare
1b70: 20 31 31 34 20 7b 0a 23 20 20 20 20 76 6f 69 64   114 {.#    void
1b80: 20 54 63 6c 44 65 6c 65 74 65 4e 61 6d 65 73 70   TclDeleteNamesp
1b90: 61 63 65 28 54 63 6c 5f 4e 61 6d 65 73 70 61 63  ace(Tcl_Namespac
1ba0: 65 20 2a 6e 73 50 74 72 29 0a 23 7d 0a 23 64 65  e *nsPtr).#}.#de
1bb0: 63 6c 61 72 65 20 31 31 35 20 7b 0a 23 20 20 20  clare 115 {.#   
1bc0: 20 69 6e 74 20 54 63 6c 45 78 70 6f 72 74 28 54   int TclExport(T
1bd0: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72  cl_Interp *inter
1be0: 70 2c 20 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65  p, Tcl_Namespace
1bf0: 20 2a 6e 73 50 74 72 2c 0a 23 09 20 20 20 20 63   *nsPtr,.#.    c
1c00: 6f 6e 73 74 20 63 68 61 72 20 2a 70 61 74 74 65  onst char *patte
1c10: 72 6e 2c 20 69 6e 74 20 72 65 73 65 74 4c 69 73  rn, int resetLis
1c20: 74 46 69 72 73 74 29 0a 23 7d 0a 23 64 65 63 6c  tFirst).#}.#decl
1c30: 61 72 65 20 31 31 36 20 7b 0a 23 20 20 20 20 54  are 116 {.#    T
1c40: 63 6c 5f 43 6f 6d 6d 61 6e 64 20 54 63 6c 46 69  cl_Command TclFi
1c50: 6e 64 43 6f 6d 6d 61 6e 64 28 54 63 6c 5f 49 6e  ndCommand(Tcl_In
1c60: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 63 6f  terp *interp, co
1c70: 6e 73 74 20 63 68 61 72 20 2a 6e 61 6d 65 2c 0a  nst char *name,.
1c80: 23 09 20 20 20 20 54 63 6c 5f 4e 61 6d 65 73 70  #.    Tcl_Namesp
1c90: 61 63 65 20 2a 63 6f 6e 74 65 78 74 4e 73 50 74  ace *contextNsPt
1ca0: 72 2c 20 69 6e 74 20 66 6c 61 67 73 29 0a 23 7d  r, int flags).#}
1cb0: 0a 23 64 65 63 6c 61 72 65 20 31 31 37 20 7b 0a  .#declare 117 {.
1cc0: 23 20 20 20 20 54 63 6c 5f 4e 61 6d 65 73 70 61  #    Tcl_Namespa
1cd0: 63 65 20 2a 54 63 6c 46 69 6e 64 4e 61 6d 65 73  ce *TclFindNames
1ce0: 70 61 63 65 28 54 63 6c 5f 49 6e 74 65 72 70 20  pace(Tcl_Interp 
1cf0: 2a 69 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20 63  *interp, const c
1d00: 68 61 72 20 2a 6e 61 6d 65 2c 0a 23 09 20 20 20  har *name,.#.   
1d10: 20 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65 20 2a   Tcl_Namespace *
1d20: 63 6f 6e 74 65 78 74 4e 73 50 74 72 2c 20 69 6e  contextNsPtr, in
1d30: 74 20 66 6c 61 67 73 29 0a 23 7d 0a 64 65 63 6c  t flags).#}.decl
1d40: 61 72 65 20 31 31 38 20 7b 0a 20 20 20 20 69 6e  are 118 {.    in
1d50: 74 20 54 63 6c 5f 47 65 74 49 6e 74 65 72 70 52  t Tcl_GetInterpR
1d60: 65 73 6f 6c 76 65 72 73 28 54 63 6c 5f 49 6e 74  esolvers(Tcl_Int
1d70: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e  erp *interp, con
1d80: 73 74 20 63 68 61 72 20 2a 6e 61 6d 65 2c 0a 09  st char *name,..
1d90: 20 20 20 20 54 63 6c 5f 52 65 73 6f 6c 76 65 72      Tcl_Resolver
1da0: 49 6e 66 6f 20 2a 72 65 73 49 6e 66 6f 29 0a 7d  Info *resInfo).}
1db0: 0a 64 65 63 6c 61 72 65 20 31 31 39 20 7b 0a 20  .declare 119 {. 
1dc0: 20 20 20 69 6e 74 20 54 63 6c 5f 47 65 74 4e 61     int Tcl_GetNa
1dd0: 6d 65 73 70 61 63 65 52 65 73 6f 6c 76 65 72 73  mespaceResolvers
1de0: 28 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65 20 2a  (Tcl_Namespace *
1df0: 6e 61 6d 65 73 70 61 63 65 50 74 72 2c 0a 09 20  namespacePtr,.. 
1e00: 20 20 20 54 63 6c 5f 52 65 73 6f 6c 76 65 72 49     Tcl_ResolverI
1e10: 6e 66 6f 20 2a 72 65 73 49 6e 66 6f 29 0a 7d 0a  nfo *resInfo).}.
1e20: 64 65 63 6c 61 72 65 20 31 32 30 20 7b 0a 20 20  declare 120 {.  
1e30: 20 20 54 63 6c 5f 56 61 72 20 54 63 6c 5f 46 69    Tcl_Var Tcl_Fi
1e40: 6e 64 4e 61 6d 65 73 70 61 63 65 56 61 72 28 54  ndNamespaceVar(T
1e50: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72  cl_Interp *inter
1e60: 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 6e  p, const char *n
1e70: 61 6d 65 2c 0a 09 20 20 20 20 54 63 6c 5f 4e 61  ame,..    Tcl_Na
1e80: 6d 65 73 70 61 63 65 20 2a 63 6f 6e 74 65 78 74  mespace *context
1e90: 4e 73 50 74 72 2c 20 69 6e 74 20 66 6c 61 67 73  NsPtr, int flags
1ea0: 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 32 36 20  ).}.declare 126 
1eb0: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 5f 47  {.    void Tcl_G
1ec0: 65 74 56 61 72 69 61 62 6c 65 46 75 6c 6c 4e 61  etVariableFullNa
1ed0: 6d 65 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69  me(Tcl_Interp *i
1ee0: 6e 74 65 72 70 2c 20 54 63 6c 5f 56 61 72 20 76  nterp, Tcl_Var v
1ef0: 61 72 69 61 62 6c 65 2c 0a 09 20 20 20 20 54 63  ariable,..    Tc
1f00: 6c 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 29 0a 7d  l_Obj *objPtr).}
1f10: 0a 64 65 63 6c 61 72 65 20 31 32 38 20 7b 0a 20  .declare 128 {. 
1f20: 20 20 20 76 6f 69 64 20 54 63 6c 5f 50 6f 70 43     void Tcl_PopC
1f30: 61 6c 6c 46 72 61 6d 65 28 54 63 6c 5f 49 6e 74  allFrame(Tcl_Int
1f40: 65 72 70 20 2a 69 6e 74 65 72 70 29 0a 7d 0a 64  erp *interp).}.d
1f50: 65 63 6c 61 72 65 20 31 32 39 20 7b 0a 20 20 20  eclare 129 {.   
1f60: 20 69 6e 74 20 54 63 6c 5f 50 75 73 68 43 61 6c   int Tcl_PushCal
1f70: 6c 46 72 61 6d 65 28 54 63 6c 5f 49 6e 74 65 72  lFrame(Tcl_Inter
1f80: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 43  p *interp, Tcl_C
1f90: 61 6c 6c 46 72 61 6d 65 20 2a 66 72 61 6d 65 50  allFrame *frameP
1fa0: 74 72 2c 0a 09 20 20 20 20 54 63 6c 5f 4e 61 6d  tr,..    Tcl_Nam
1fb0: 65 73 70 61 63 65 20 2a 6e 73 50 74 72 2c 20 69  espace *nsPtr, i
1fc0: 6e 74 20 69 73 50 72 6f 63 43 61 6c 6c 46 72 61  nt isProcCallFra
1fd0: 6d 65 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 33  me).}.declare 13
1fe0: 30 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 5f  0 {.    int Tcl_
1ff0: 52 65 6d 6f 76 65 49 6e 74 65 72 70 52 65 73 6f  RemoveInterpReso
2000: 6c 76 65 72 73 28 54 63 6c 5f 49 6e 74 65 72 70  lvers(Tcl_Interp
2010: 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20   *interp, const 
2020: 63 68 61 72 20 2a 6e 61 6d 65 29 0a 7d 0a 64 65  char *name).}.de
2030: 63 6c 61 72 65 20 31 33 31 20 7b 0a 20 20 20 20  clare 131 {.    
2040: 76 6f 69 64 20 54 63 6c 5f 53 65 74 4e 61 6d 65  void Tcl_SetName
2050: 73 70 61 63 65 52 65 73 6f 6c 76 65 72 73 28 54  spaceResolvers(T
2060: 63 6c 5f 4e 61 6d 65 73 70 61 63 65 20 2a 6e 61  cl_Namespace *na
2070: 6d 65 73 70 61 63 65 50 74 72 2c 0a 09 20 20 20  mespacePtr,..   
2080: 20 54 63 6c 5f 52 65 73 6f 6c 76 65 43 6d 64 50   Tcl_ResolveCmdP
2090: 72 6f 63 20 2a 63 6d 64 50 72 6f 63 2c 20 54 63  roc *cmdProc, Tc
20a0: 6c 5f 52 65 73 6f 6c 76 65 56 61 72 50 72 6f 63  l_ResolveVarProc
20b0: 20 2a 76 61 72 50 72 6f 63 2c 0a 09 20 20 20 20   *varProc,..    
20c0: 54 63 6c 5f 52 65 73 6f 6c 76 65 43 6f 6d 70 69  Tcl_ResolveCompi
20d0: 6c 65 64 56 61 72 50 72 6f 63 20 2a 63 6f 6d 70  ledVarProc *comp
20e0: 69 6c 65 64 56 61 72 50 72 6f 63 29 0a 7d 0a 64  iledVarProc).}.d
20f0: 65 63 6c 61 72 65 20 31 33 38 20 7b 0a 20 20 20  eclare 138 {.   
2100: 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 54 63 6c   const char *Tcl
2110: 47 65 74 45 6e 76 28 63 6f 6e 73 74 20 63 68 61  GetEnv(const cha
2120: 72 20 2a 6e 61 6d 65 2c 20 54 63 6c 5f 44 53 74  r *name, Tcl_DSt
2130: 72 69 6e 67 20 2a 76 61 6c 75 65 50 74 72 29 0a  ring *valuePtr).
2140: 7d 0a 23 20 54 68 69 73 20 69 73 20 75 73 65 64  }.# This is used
2150: 20 62 79 20 54 63 6c 58 2c 20 62 75 74 20 73 68   by TclX, but sh
2160: 6f 75 6c 64 20 6f 74 68 65 72 77 69 73 65 20 62  ould otherwise b
2170: 65 20 63 6f 6e 73 69 64 65 72 65 64 20 70 72 69  e considered pri
2180: 76 61 74 65 0a 64 65 63 6c 61 72 65 20 31 34 31  vate.declare 141
2190: 20 7b 0a 20 20 20 20 63 6f 6e 73 74 20 63 68 61   {.    const cha
21a0: 72 20 2a 54 63 6c 70 47 65 74 43 77 64 28 54 63  r *TclpGetCwd(Tc
21b0: 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70  l_Interp *interp
21c0: 2c 20 54 63 6c 5f 44 53 74 72 69 6e 67 20 2a 63  , Tcl_DString *c
21d0: 77 64 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  wdPtr).}.declare
21e0: 20 31 34 32 20 7b 0a 20 20 20 20 69 6e 74 20 54   142 {.    int T
21f0: 63 6c 53 65 74 42 79 74 65 43 6f 64 65 46 72 6f  clSetByteCodeFro
2200: 6d 41 6e 79 28 54 63 6c 5f 49 6e 74 65 72 70 20  mAny(Tcl_Interp 
2210: 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f 62 6a  *interp, Tcl_Obj
2220: 20 2a 6f 62 6a 50 74 72 2c 0a 09 20 20 20 20 43   *objPtr,..    C
2230: 6f 6d 70 69 6c 65 48 6f 6f 6b 50 72 6f 63 20 2a  ompileHookProc *
2240: 68 6f 6f 6b 50 72 6f 63 2c 20 76 6f 69 64 20 2a  hookProc, void *
2250: 63 6c 69 65 6e 74 44 61 74 61 29 0a 7d 0a 64 65  clientData).}.de
2260: 63 6c 61 72 65 20 31 34 33 20 7b 0a 20 20 20 20  clare 143 {.    
2270: 69 6e 74 20 54 63 6c 41 64 64 4c 69 74 65 72 61  int TclAddLitera
2280: 6c 4f 62 6a 28 73 74 72 75 63 74 20 43 6f 6d 70  lObj(struct Comp
2290: 69 6c 65 45 6e 76 20 2a 65 6e 76 50 74 72 2c 20  ileEnv *envPtr, 
22a0: 54 63 6c 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 2c  Tcl_Obj *objPtr,
22b0: 0a 09 20 20 20 20 4c 69 74 65 72 61 6c 45 6e 74  ..    LiteralEnt
22c0: 72 79 20 2a 2a 6c 69 74 50 74 72 50 74 72 29 0a  ry **litPtrPtr).
22d0: 7d 0a 64 65 63 6c 61 72 65 20 31 34 34 20 7b 0a  }.declare 144 {.
22e0: 20 20 20 20 76 6f 69 64 20 54 63 6c 48 69 64 65      void TclHide
22f0: 4c 69 74 65 72 61 6c 28 54 63 6c 5f 49 6e 74 65  Literal(Tcl_Inte
2300: 72 70 20 2a 69 6e 74 65 72 70 2c 20 73 74 72 75  rp *interp, stru
2310: 63 74 20 43 6f 6d 70 69 6c 65 45 6e 76 20 2a 65  ct CompileEnv *e
2320: 6e 76 50 74 72 2c 0a 09 20 20 20 20 69 6e 74 20  nvPtr,..    int 
2330: 69 6e 64 65 78 29 0a 7d 0a 64 65 63 6c 61 72 65  index).}.declare
2340: 20 31 34 35 20 7b 0a 20 20 20 20 63 6f 6e 73 74   145 {.    const
2350: 20 73 74 72 75 63 74 20 41 75 78 44 61 74 61 54   struct AuxDataT
2360: 79 70 65 20 2a 54 63 6c 47 65 74 41 75 78 44 61  ype *TclGetAuxDa
2370: 74 61 54 79 70 65 28 63 6f 6e 73 74 20 63 68 61  taType(const cha
2380: 72 20 2a 74 79 70 65 4e 61 6d 65 29 0a 7d 0a 64  r *typeName).}.d
2390: 65 63 6c 61 72 65 20 31 34 36 20 7b 0a 20 20 20  eclare 146 {.   
23a0: 20 54 63 6c 48 61 6e 64 6c 65 20 54 63 6c 48 61   TclHandle TclHa
23b0: 6e 64 6c 65 43 72 65 61 74 65 28 76 6f 69 64 20  ndleCreate(void 
23c0: 2a 70 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20  *ptr).}.declare 
23d0: 31 34 37 20 7b 0a 20 20 20 20 76 6f 69 64 20 54  147 {.    void T
23e0: 63 6c 48 61 6e 64 6c 65 46 72 65 65 28 54 63 6c  clHandleFree(Tcl
23f0: 48 61 6e 64 6c 65 20 68 61 6e 64 6c 65 29 0a 7d  Handle handle).}
2400: 0a 64 65 63 6c 61 72 65 20 31 34 38 20 7b 0a 20  .declare 148 {. 
2410: 20 20 20 54 63 6c 48 61 6e 64 6c 65 20 54 63 6c     TclHandle Tcl
2420: 48 61 6e 64 6c 65 50 72 65 73 65 72 76 65 28 54  HandlePreserve(T
2430: 63 6c 48 61 6e 64 6c 65 20 68 61 6e 64 6c 65 29  clHandle handle)
2440: 0a 7d 0a 64 65 63 6c 61 72 65 20 31 34 39 20 7b  .}.declare 149 {
2450: 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 48 61 6e  .    void TclHan
2460: 64 6c 65 52 65 6c 65 61 73 65 28 54 63 6c 48 61  dleRelease(TclHa
2470: 6e 64 6c 65 20 68 61 6e 64 6c 65 29 0a 7d 0a 64  ndle handle).}.d
2480: 65 63 6c 61 72 65 20 31 35 30 20 7b 0a 20 20 20  eclare 150 {.   
2490: 20 69 6e 74 20 54 63 6c 52 65 67 41 62 6f 75 74   int TclRegAbout
24a0: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74  (Tcl_Interp *int
24b0: 65 72 70 2c 20 54 63 6c 5f 52 65 67 45 78 70 20  erp, Tcl_RegExp 
24c0: 72 65 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 35  re).}.declare 15
24d0: 31 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c  1 {.    void Tcl
24e0: 52 65 67 45 78 70 52 61 6e 67 65 55 6e 69 43 68  RegExpRangeUniCh
24f0: 61 72 28 54 63 6c 5f 52 65 67 45 78 70 20 72 65  ar(Tcl_RegExp re
2500: 2c 20 54 63 6c 5f 53 69 7a 65 20 69 6e 64 65 78  , Tcl_Size index
2510: 2c 20 54 63 6c 5f 53 69 7a 65 20 2a 73 74 61 72  , Tcl_Size *star
2520: 74 50 74 72 2c 0a 09 20 20 20 20 54 63 6c 5f 53  tPtr,..    Tcl_S
2530: 69 7a 65 20 2a 65 6e 64 50 74 72 29 0a 7d 0a 64  ize *endPtr).}.d
2540: 65 63 6c 61 72 65 20 31 35 36 20 7b 0a 20 20 20  eclare 156 {.   
2550: 20 76 6f 69 64 20 54 63 6c 52 65 67 45 72 72 6f   void TclRegErro
2560: 72 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e  r(Tcl_Interp *in
2570: 74 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72  terp, const char
2580: 20 2a 6d 73 67 2c 0a 09 20 20 20 20 69 6e 74 20   *msg,..    int 
2590: 73 74 61 74 75 73 29 0a 7d 0a 64 65 63 6c 61 72  status).}.declar
25a0: 65 20 31 35 37 20 7b 0a 20 20 20 20 56 61 72 20  e 157 {.    Var 
25b0: 2a 54 63 6c 56 61 72 54 72 61 63 65 45 78 69 73  *TclVarTraceExis
25c0: 74 73 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69  ts(Tcl_Interp *i
25d0: 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20 63 68 61  nterp, const cha
25e0: 72 20 2a 76 61 72 4e 61 6d 65 29 0a 7d 0a 64 65  r *varName).}.de
25f0: 63 6c 61 72 65 20 31 36 31 20 7b 0a 20 20 20 20  clare 161 {.    
2600: 69 6e 74 20 54 63 6c 43 68 61 6e 6e 65 6c 54 72  int TclChannelTr
2610: 61 6e 73 66 6f 72 6d 28 54 63 6c 5f 49 6e 74 65  ansform(Tcl_Inte
2620: 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f  rp *interp, Tcl_
2630: 43 68 61 6e 6e 65 6c 20 63 68 61 6e 2c 0a 09 20  Channel chan,.. 
2640: 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 63 6d 64 4f     Tcl_Obj *cmdO
2650: 62 6a 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  bjPtr).}.declare
2660: 20 31 36 32 20 7b 0a 20 20 20 20 76 6f 69 64 20   162 {.    void 
2670: 54 63 6c 43 68 61 6e 6e 65 6c 45 76 65 6e 74 53  TclChannelEventS
2680: 63 72 69 70 74 49 6e 76 6f 6b 65 72 28 76 6f 69  criptInvoker(voi
2690: 64 20 2a 63 6c 69 65 6e 74 44 61 74 61 2c 20 69  d *clientData, i
26a0: 6e 74 20 66 6c 61 67 73 29 0a 7d 0a 0a 23 20 41  nt flags).}..# A
26b0: 4c 45 52 54 3a 20 54 68 65 20 72 65 73 75 6c 74  LERT: The result
26c0: 20 6f 66 20 27 54 63 6c 47 65 74 49 6e 73 74 72   of 'TclGetInstr
26d0: 75 63 74 69 6f 6e 54 61 62 6c 65 27 20 69 73 20  uctionTable' is 
26e0: 61 63 74 75 61 6c 6c 79 20 61 0a 23 20 22 63 6f  actually a.# "co
26f0: 6e 73 74 20 49 6e 73 74 72 75 63 74 69 6f 6e 44  nst InstructionD
2700: 65 73 63 2a 22 20 62 75 74 20 77 65 20 64 6f 20  esc*" but we do 
2710: 6e 6f 74 20 77 61 6e 74 20 74 6f 20 64 65 73 63  not want to desc
2720: 72 69 62 65 20 74 68 69 73 20 73 74 72 75 63 74  ribe this struct
2730: 75 72 65 20 69 6e 0a 23 20 22 74 63 6c 49 6e 74  ure in.# "tclInt
2740: 2e 68 22 2e 20 49 74 20 69 73 20 64 65 73 63 72  .h". It is descr
2750: 69 62 65 64 20 69 6e 20 22 74 63 6c 43 6f 6d 70  ibed in "tclComp
2760: 69 6c 65 2e 68 22 2e 20 55 73 65 20 61 20 63 61  ile.h". Use a ca
2770: 73 74 20 74 6f 20 74 68 65 0a 23 20 63 6f 72 72  st to the.# corr
2780: 65 63 74 20 74 79 70 65 20 77 68 65 6e 20 63 61  ect type when ca
2790: 6c 6c 69 6e 67 20 74 68 69 73 20 70 72 6f 63 65  lling this proce
27a0: 64 75 72 65 2e 0a 0a 64 65 63 6c 61 72 65 20 31  dure...declare 1
27b0: 36 33 20 7b 0a 20 20 20 20 63 6f 6e 73 74 20 76  63 {.    const v
27c0: 6f 69 64 20 2a 54 63 6c 47 65 74 49 6e 73 74 72  oid *TclGetInstr
27d0: 75 63 74 69 6f 6e 54 61 62 6c 65 28 76 6f 69 64  uctionTable(void
27e0: 29 0a 7d 0a 0a 23 20 41 4c 45 52 54 3a 20 54 68  ).}..# ALERT: Th
27f0: 65 20 61 72 67 75 6d 65 6e 74 20 6f 66 20 27 54  e argument of 'T
2800: 63 6c 45 78 70 61 6e 64 43 6f 64 65 41 72 72 61  clExpandCodeArra
2810: 79 27 20 69 73 20 61 63 74 75 61 6c 6c 79 20 61  y' is actually a
2820: 0a 23 20 22 43 6f 6d 70 69 6c 65 45 6e 76 2a 22  .# "CompileEnv*"
2830: 20 62 75 74 20 77 65 20 64 6f 20 6e 6f 74 20 77   but we do not w
2840: 61 6e 74 20 74 6f 20 64 65 73 63 72 69 62 65 20  ant to describe 
2850: 74 68 69 73 20 73 74 72 75 63 74 75 72 65 20 69  this structure i
2860: 6e 0a 23 20 22 74 63 6c 49 6e 74 2e 68 22 2e 20  n.# "tclInt.h". 
2870: 49 74 20 69 73 20 64 65 73 63 72 69 62 65 64 20  It is described 
2880: 69 6e 20 22 74 63 6c 43 6f 6d 70 69 6c 65 2e 68  in "tclCompile.h
2890: 22 2e 0a 0a 64 65 63 6c 61 72 65 20 31 36 34 20  "...declare 164 
28a0: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 45 78  {.    void TclEx
28b0: 70 61 6e 64 43 6f 64 65 41 72 72 61 79 28 76 6f  pandCodeArray(vo
28c0: 69 64 20 2a 65 6e 76 50 74 72 29 0a 7d 0a 0a 23  id *envPtr).}..#
28d0: 20 54 68 65 73 65 20 66 75 6e 63 74 69 6f 6e 73   These functions
28e0: 20 61 72 65 20 76 66 73 20 61 77 61 72 65 2c 20   are vfs aware, 
28f0: 62 75 74 20 61 72 65 20 67 65 6e 65 72 61 6c 6c  but are generall
2900: 79 20 6f 6e 6c 79 20 75 73 65 66 75 6c 20 69 6e  y only useful in
2910: 74 65 72 6e 61 6c 6c 79 2e 0a 64 65 63 6c 61 72  ternally..declar
2920: 65 20 31 36 35 20 7b 0a 20 20 20 20 76 6f 69 64  e 165 {.    void
2930: 20 54 63 6c 70 53 65 74 49 6e 69 74 69 61 6c 45   TclpSetInitialE
2940: 6e 63 6f 64 69 6e 67 73 28 76 6f 69 64 29 0a 7d  ncodings(void).}
2950: 0a 0a 23 20 4e 65 77 20 66 75 6e 63 74 69 6f 6e  ..# New function
2960: 20 64 75 65 20 74 6f 20 54 49 50 20 23 33 33 0a   due to TIP #33.
2970: 64 65 63 6c 61 72 65 20 31 36 36 20 7b 0a 20 20  declare 166 {.  
2980: 20 20 69 6e 74 20 54 63 6c 4c 69 73 74 4f 62 6a    int TclListObj
2990: 53 65 74 45 6c 65 6d 65 6e 74 28 54 63 6c 5f 49  SetElement(Tcl_I
29a0: 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54  nterp *interp, T
29b0: 63 6c 5f 4f 62 6a 20 2a 6c 69 73 74 50 74 72 2c  cl_Obj *listPtr,
29c0: 0a 09 20 20 20 20 54 63 6c 5f 53 69 7a 65 20 69  ..    Tcl_Size i
29d0: 6e 64 65 78 2c 20 54 63 6c 5f 4f 62 6a 20 2a 76  ndex, Tcl_Obj *v
29e0: 61 6c 75 65 50 74 72 29 0a 7d 0a 0a 23 20 76 61  aluePtr).}..# va
29f0: 72 69 61 6e 74 20 6f 66 20 54 63 6c 5f 55 74 66  riant of Tcl_Utf
2a00: 4e 63 6d 70 20 74 68 61 74 20 74 61 6b 65 73 20  Ncmp that takes 
2a10: 6e 20 61 73 20 62 79 74 65 73 2c 20 6e 6f 74 20  n as bytes, not 
2a20: 63 68 61 72 73 0a 64 65 63 6c 61 72 65 20 31 36  chars.declare 16
2a30: 39 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 70  9 {.    int Tclp
2a40: 55 74 66 4e 63 6d 70 32 28 63 6f 6e 73 74 20 76  UtfNcmp2(const v
2a50: 6f 69 64 20 2a 73 31 2c 20 63 6f 6e 73 74 20 76  oid *s1, const v
2a60: 6f 69 64 20 2a 73 32 2c 20 73 69 7a 65 5f 74 20  oid *s2, size_t 
2a70: 6e 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 37 30  n).}.declare 170
2a80: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 43 68   {.    int TclCh
2a90: 65 63 6b 49 6e 74 65 72 70 54 72 61 63 65 73 28  eckInterpTraces(
2aa0: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65  Tcl_Interp *inte
2ab0: 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a  rp, const char *
2ac0: 63 6f 6d 6d 61 6e 64 2c 0a 09 20 20 20 20 54 63  command,..    Tc
2ad0: 6c 5f 53 69 7a 65 20 6e 75 6d 43 68 61 72 73 2c  l_Size numChars,
2ae0: 20 43 6f 6d 6d 61 6e 64 20 2a 63 6d 64 50 74 72   Command *cmdPtr
2af0: 2c 20 69 6e 74 20 72 65 73 75 6c 74 2c 20 69 6e  , int result, in
2b00: 74 20 74 72 61 63 65 46 6c 61 67 73 2c 0a 09 20  t traceFlags,.. 
2b10: 20 20 20 54 63 6c 5f 53 69 7a 65 20 6f 62 6a 63     Tcl_Size objc
2b20: 2c 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74  , Tcl_Obj *const
2b30: 20 6f 62 6a 76 5b 5d 29 0a 7d 0a 64 65 63 6c 61   objv[]).}.decla
2b40: 72 65 20 31 37 31 20 7b 0a 20 20 20 20 69 6e 74  re 171 {.    int
2b50: 20 54 63 6c 43 68 65 63 6b 45 78 65 63 75 74 69   TclCheckExecuti
2b60: 6f 6e 54 72 61 63 65 73 28 54 63 6c 5f 49 6e 74  onTraces(Tcl_Int
2b70: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e  erp *interp, con
2b80: 73 74 20 63 68 61 72 20 2a 63 6f 6d 6d 61 6e 64  st char *command
2b90: 2c 0a 09 20 20 20 20 54 63 6c 5f 53 69 7a 65 20  ,..    Tcl_Size 
2ba0: 6e 75 6d 43 68 61 72 73 2c 20 43 6f 6d 6d 61 6e  numChars, Comman
2bb0: 64 20 2a 63 6d 64 50 74 72 2c 20 69 6e 74 20 72  d *cmdPtr, int r
2bc0: 65 73 75 6c 74 2c 20 69 6e 74 20 74 72 61 63 65  esult, int trace
2bd0: 46 6c 61 67 73 2c 0a 09 20 20 20 20 54 63 6c 5f  Flags,..    Tcl_
2be0: 53 69 7a 65 20 6f 62 6a 63 2c 20 54 63 6c 5f 4f  Size objc, Tcl_O
2bf0: 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 6a 76 5b 5d  bj *const objv[]
2c00: 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 37 32 20  ).}.declare 172 
2c10: 7b 0a 20 20 20 20 62 6f 6f 6c 20 54 63 6c 49 6e  {.    bool TclIn
2c20: 54 68 72 65 61 64 45 78 69 74 28 76 6f 69 64 29  ThreadExit(void)
2c30: 0a 7d 0a 64 65 63 6c 61 72 65 20 31 37 33 20 7b  .}.declare 173 {
2c40: 0a 20 20 20 20 62 6f 6f 6c 20 54 63 6c 55 6e 69  .    bool TclUni
2c50: 43 68 61 72 4d 61 74 63 68 28 63 6f 6e 73 74 20  CharMatch(const 
2c60: 54 63 6c 5f 55 6e 69 43 68 61 72 20 2a 73 74 72  Tcl_UniChar *str
2c70: 69 6e 67 2c 20 54 63 6c 5f 53 69 7a 65 20 73 74  ing, Tcl_Size st
2c80: 72 4c 65 6e 2c 0a 09 20 20 20 20 63 6f 6e 73 74  rLen,..    const
2c90: 20 54 63 6c 5f 55 6e 69 43 68 61 72 20 2a 70 61   Tcl_UniChar *pa
2ca0: 74 74 65 72 6e 2c 20 54 63 6c 5f 53 69 7a 65 20  ttern, Tcl_Size 
2cb0: 70 74 6e 4c 65 6e 2c 20 69 6e 74 20 66 6c 61 67  ptnLen, int flag
2cc0: 73 29 0a 7d 0a 64 65 63 6c 61 72 65 20 31 37 35  s).}.declare 175
2cd0: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 43 61   {.    int TclCa
2ce0: 6c 6c 56 61 72 54 72 61 63 65 73 28 49 6e 74 65  llVarTraces(Inte
2cf0: 72 70 20 2a 69 50 74 72 2c 20 56 61 72 20 2a 61  rp *iPtr, Var *a
2d00: 72 72 61 79 50 74 72 2c 20 56 61 72 20 2a 76 61  rrayPtr, Var *va
2d10: 72 50 74 72 2c 0a 09 20 20 20 20 63 6f 6e 73 74  rPtr,..    const
2d20: 20 63 68 61 72 20 2a 70 61 72 74 31 2c 20 63 6f   char *part1, co
2d30: 6e 73 74 20 63 68 61 72 20 2a 70 61 72 74 32 2c  nst char *part2,
2d40: 20 69 6e 74 20 66 6c 61 67 73 2c 20 69 6e 74 20   int flags, int 
2d50: 6c 65 61 76 65 45 72 72 4d 73 67 29 0a 7d 0a 64  leaveErrMsg).}.d
2d60: 65 63 6c 61 72 65 20 31 37 36 20 7b 0a 20 20 20  eclare 176 {.   
2d70: 20 76 6f 69 64 20 54 63 6c 43 6c 65 61 6e 75 70   void TclCleanup
2d80: 56 61 72 28 56 61 72 20 2a 76 61 72 50 74 72 2c  Var(Var *varPtr,
2d90: 20 56 61 72 20 2a 61 72 72 61 79 50 74 72 29 0a   Var *arrayPtr).
2da0: 7d 0a 64 65 63 6c 61 72 65 20 31 37 37 20 7b 0a  }.declare 177 {.
2db0: 20 20 20 20 76 6f 69 64 20 54 63 6c 56 61 72 45      void TclVarE
2dc0: 72 72 4d 73 67 28 54 63 6c 5f 49 6e 74 65 72 70  rrMsg(Tcl_Interp
2dd0: 20 2a 69 6e 74 65 72 70 2c 20 63 6f 6e 73 74 20   *interp, const 
2de0: 63 68 61 72 20 2a 70 61 72 74 31 2c 20 63 6f 6e  char *part1, con
2df0: 73 74 20 63 68 61 72 20 2a 70 61 72 74 32 2c 0a  st char *part2,.
2e00: 09 20 20 20 20 63 6f 6e 73 74 20 63 68 61 72 20  .    const char 
2e10: 2a 6f 70 65 72 61 74 69 6f 6e 2c 20 63 6f 6e 73  *operation, cons
2e20: 74 20 63 68 61 72 20 2a 72 65 61 73 6f 6e 29 0a  t char *reason).
2e30: 7d 0a 64 65 63 6c 61 72 65 20 31 39 38 20 7b 0a  }.declare 198 {.
2e40: 20 20 20 20 69 6e 74 20 54 63 6c 4f 62 6a 47 65      int TclObjGe
2e50: 74 46 72 61 6d 65 28 54 63 6c 5f 49 6e 74 65 72  tFrame(Tcl_Inter
2e60: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f  p *interp, Tcl_O
2e70: 62 6a 20 2a 6f 62 6a 50 74 72 2c 0a 09 20 20 20  bj *objPtr,..   
2e80: 20 43 61 6c 6c 46 72 61 6d 65 20 2a 2a 66 72 61   CallFrame **fra
2e90: 6d 65 50 74 72 50 74 72 29 0a 7d 0a 23 20 32 30  mePtrPtr).}.# 20
2ea0: 30 2d 32 30 38 20 65 78 70 6f 72 74 65 64 20 66  0-208 exported f
2eb0: 6f 72 20 75 73 65 20 62 79 20 74 68 65 20 74 65  or use by the te
2ec0: 73 74 20 73 75 69 74 65 20 5b 42 75 67 20 31 30  st suite [Bug 10
2ed0: 35 34 37 34 38 5d 0a 64 65 63 6c 61 72 65 20 32  54748].declare 2
2ee0: 30 30 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c  00 {.    int Tcl
2ef0: 70 4f 62 6a 52 65 6d 6f 76 65 44 69 72 65 63 74  pObjRemoveDirect
2f00: 6f 72 79 28 54 63 6c 5f 4f 62 6a 20 2a 70 61 74  ory(Tcl_Obj *pat
2f10: 68 50 74 72 2c 20 69 6e 74 20 72 65 63 75 72 73  hPtr, int recurs
2f20: 69 76 65 2c 0a 09 54 63 6c 5f 4f 62 6a 20 2a 2a  ive,..Tcl_Obj **
2f30: 65 72 72 6f 72 50 74 72 29 0a 7d 0a 64 65 63 6c  errorPtr).}.decl
2f40: 61 72 65 20 32 30 31 20 7b 0a 20 20 20 20 69 6e  are 201 {.    in
2f50: 74 20 54 63 6c 70 4f 62 6a 43 6f 70 79 44 69 72  t TclpObjCopyDir
2f60: 65 63 74 6f 72 79 28 54 63 6c 5f 4f 62 6a 20 2a  ectory(Tcl_Obj *
2f70: 73 72 63 50 61 74 68 50 74 72 2c 20 54 63 6c 5f  srcPathPtr, Tcl_
2f80: 4f 62 6a 20 2a 64 65 73 74 50 61 74 68 50 74 72  Obj *destPathPtr
2f90: 2c 0a 09 54 63 6c 5f 4f 62 6a 20 2a 2a 65 72 72  ,..Tcl_Obj **err
2fa0: 6f 72 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  orPtr).}.declare
2fb0: 20 32 30 32 20 7b 0a 20 20 20 20 69 6e 74 20 54   202 {.    int T
2fc0: 63 6c 70 4f 62 6a 43 72 65 61 74 65 44 69 72 65  clpObjCreateDire
2fd0: 63 74 6f 72 79 28 54 63 6c 5f 4f 62 6a 20 2a 70  ctory(Tcl_Obj *p
2fe0: 61 74 68 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72  athPtr).}.declar
2ff0: 65 20 32 30 33 20 7b 0a 20 20 20 20 69 6e 74 20  e 203 {.    int 
3000: 54 63 6c 70 4f 62 6a 44 65 6c 65 74 65 46 69 6c  TclpObjDeleteFil
3010: 65 28 54 63 6c 5f 4f 62 6a 20 2a 70 61 74 68 50  e(Tcl_Obj *pathP
3020: 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 30  tr).}.declare 20
3030: 34 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 70  4 {.    int Tclp
3040: 4f 62 6a 43 6f 70 79 46 69 6c 65 28 54 63 6c 5f  ObjCopyFile(Tcl_
3050: 4f 62 6a 20 2a 73 72 63 50 61 74 68 50 74 72 2c  Obj *srcPathPtr,
3060: 20 54 63 6c 5f 4f 62 6a 20 2a 64 65 73 74 50 61   Tcl_Obj *destPa
3070: 74 68 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65  thPtr).}.declare
3080: 20 32 30 35 20 7b 0a 20 20 20 20 69 6e 74 20 54   205 {.    int T
3090: 63 6c 70 4f 62 6a 52 65 6e 61 6d 65 46 69 6c 65  clpObjRenameFile
30a0: 28 54 63 6c 5f 4f 62 6a 20 2a 73 72 63 50 61 74  (Tcl_Obj *srcPat
30b0: 68 50 74 72 2c 20 54 63 6c 5f 4f 62 6a 20 2a 64  hPtr, Tcl_Obj *d
30c0: 65 73 74 50 61 74 68 50 74 72 29 0a 7d 0a 64 65  estPathPtr).}.de
30d0: 63 6c 61 72 65 20 32 30 36 20 7b 0a 20 20 20 20  clare 206 {.    
30e0: 69 6e 74 20 54 63 6c 70 4f 62 6a 53 74 61 74 28  int TclpObjStat(
30f0: 54 63 6c 5f 4f 62 6a 20 2a 70 61 74 68 50 74 72  Tcl_Obj *pathPtr
3100: 2c 20 54 63 6c 5f 53 74 61 74 42 75 66 20 2a 62  , Tcl_StatBuf *b
3110: 75 66 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 30  uf).}.declare 20
3120: 37 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 70  7 {.    int Tclp
3130: 4f 62 6a 41 63 63 65 73 73 28 54 63 6c 5f 4f 62  ObjAccess(Tcl_Ob
3140: 6a 20 2a 70 61 74 68 50 74 72 2c 20 69 6e 74 20  j *pathPtr, int 
3150: 6d 6f 64 65 29 0a 7d 0a 64 65 63 6c 61 72 65 20  mode).}.declare 
3160: 32 30 38 20 7b 0a 20 20 20 20 54 63 6c 5f 43 68  208 {.    Tcl_Ch
3170: 61 6e 6e 65 6c 20 54 63 6c 70 4f 70 65 6e 46 69  annel TclpOpenFi
3180: 6c 65 43 68 61 6e 6e 65 6c 28 54 63 6c 5f 49 6e  leChannel(Tcl_In
3190: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 0a 09 20  terp *interp,.. 
31a0: 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 70 61 74 68     Tcl_Obj *path
31b0: 50 74 72 2c 20 69 6e 74 20 6d 6f 64 65 2c 20 69  Ptr, int mode, i
31c0: 6e 74 20 70 65 72 6d 69 73 73 69 6f 6e 73 29 0a  nt permissions).
31d0: 7d 0a 64 65 63 6c 61 72 65 20 32 31 32 20 7b 0a  }.declare 212 {.
31e0: 20 20 20 20 76 6f 69 64 20 54 63 6c 70 46 69 6e      void TclpFin
31f0: 64 45 78 65 63 75 74 61 62 6c 65 28 63 6f 6e 73  dExecutable(cons
3200: 74 20 63 68 61 72 20 2a 61 72 67 76 30 29 0a 7d  t char *argv0).}
3210: 0a 64 65 63 6c 61 72 65 20 32 31 33 20 7b 0a 20  .declare 213 {. 
3220: 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 54 63 6c 47     Tcl_Obj *TclG
3230: 65 74 4f 62 6a 4e 61 6d 65 4f 66 45 78 65 63 75  etObjNameOfExecu
3240: 74 61 62 6c 65 28 76 6f 69 64 29 0a 7d 0a 64 65  table(void).}.de
3250: 63 6c 61 72 65 20 32 31 34 20 7b 0a 20 20 20 20  clare 214 {.    
3260: 76 6f 69 64 20 54 63 6c 53 65 74 4f 62 6a 4e 61  void TclSetObjNa
3270: 6d 65 4f 66 45 78 65 63 75 74 61 62 6c 65 28 54  meOfExecutable(T
3280: 63 6c 5f 4f 62 6a 20 2a 6e 61 6d 65 2c 20 54 63  cl_Obj *name, Tc
3290: 6c 5f 45 6e 63 6f 64 69 6e 67 20 65 6e 63 6f 64  l_Encoding encod
32a0: 69 6e 67 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32  ing).}.declare 2
32b0: 31 35 20 7b 0a 20 20 20 20 76 6f 69 64 20 2a 54  15 {.    void *T
32c0: 63 6c 53 74 61 63 6b 41 6c 6c 6f 63 28 54 63 6c  clStackAlloc(Tcl
32d0: 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c  _Interp *interp,
32e0: 20 73 69 7a 65 5f 74 20 6e 75 6d 42 79 74 65 73   size_t numBytes
32f0: 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 31 36 20  ).}.declare 216 
3300: 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 53 74  {.    void TclSt
3310: 61 63 6b 46 72 65 65 28 54 63 6c 5f 49 6e 74 65  ackFree(Tcl_Inte
3320: 72 70 20 2a 69 6e 74 65 72 70 2c 20 76 6f 69 64  rp *interp, void
3330: 20 2a 66 72 65 65 50 74 72 29 0a 7d 0a 64 65 63   *freePtr).}.dec
3340: 6c 61 72 65 20 32 31 37 20 7b 0a 20 20 20 20 69  lare 217 {.    i
3350: 6e 74 20 54 63 6c 50 75 73 68 53 74 61 63 6b 46  nt TclPushStackF
3360: 72 61 6d 65 28 54 63 6c 5f 49 6e 74 65 72 70 20  rame(Tcl_Interp 
3370: 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 43 61 6c  *interp, Tcl_Cal
3380: 6c 46 72 61 6d 65 20 2a 2a 66 72 61 6d 65 50 74  lFrame **framePt
3390: 72 50 74 72 2c 0a 09 20 20 20 20 54 63 6c 5f 4e  rPtr,..    Tcl_N
33a0: 61 6d 65 73 70 61 63 65 20 2a 6e 61 6d 65 73 70  amespace *namesp
33b0: 61 63 65 50 74 72 2c 20 69 6e 74 20 69 73 50 72  acePtr, int isPr
33c0: 6f 63 43 61 6c 6c 46 72 61 6d 65 29 0a 7d 0a 64  ocCallFrame).}.d
33d0: 65 63 6c 61 72 65 20 32 31 38 20 7b 0a 20 20 20  eclare 218 {.   
33e0: 20 76 6f 69 64 20 54 63 6c 50 6f 70 53 74 61 63   void TclPopStac
33f0: 6b 46 72 61 6d 65 28 54 63 6c 5f 49 6e 74 65 72  kFrame(Tcl_Inter
3400: 70 20 2a 69 6e 74 65 72 70 29 0a 7d 0a 23 20 54  p *interp).}.# T
3410: 49 50 20 34 33 31 3a 20 74 65 6d 70 6f 72 61 72  IP 431: temporar
3420: 79 20 64 69 72 65 63 74 6f 72 79 20 63 72 65 61  y directory crea
3430: 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 0a 64 65  tion function.de
3440: 63 6c 61 72 65 20 32 31 39 20 7b 0a 20 20 20 20  clare 219 {.    
3450: 54 63 6c 5f 4f 62 6a 20 2a 54 63 6c 70 43 72 65  Tcl_Obj *TclpCre
3460: 61 74 65 54 65 6d 70 6f 72 61 72 79 44 69 72 65  ateTemporaryDire
3470: 63 74 6f 72 79 28 54 63 6c 5f 4f 62 6a 20 2a 64  ctory(Tcl_Obj *d
3480: 69 72 4f 62 6a 2c 0a 09 20 20 20 20 54 63 6c 5f  irObj,..    Tcl_
3490: 4f 62 6a 20 2a 62 61 73 65 6e 61 6d 65 4f 62 6a  Obj *basenameObj
34a0: 29 0a 7d 0a 0a 23 20 66 6f 72 20 75 73 65 20 69  ).}..# for use i
34b0: 6e 20 74 63 6c 54 65 73 74 2e 63 0a 0a 23 20 54  n tclTest.c..# T
34c0: 49 50 20 36 32 35 3a 20 66 6f 72 20 75 6e 69 74  IP 625: for unit
34d0: 20 74 65 73 74 69 6e 67 20 2d 20 63 72 65 61 74   testing - creat
34e0: 65 20 6c 69 73 74 20 6f 62 6a 65 63 74 73 20 77  e list objects w
34f0: 69 74 68 20 73 70 61 6e 0a 64 65 63 6c 61 72 65  ith span.declare
3500: 20 32 32 31 20 7b 0a 20 20 20 20 54 63 6c 5f 4f   221 {.    Tcl_O
3510: 62 6a 20 2a 54 63 6c 4c 69 73 74 54 65 73 74 4f  bj *TclListTestO
3520: 62 6a 28 73 69 7a 65 5f 74 20 6c 65 6e 67 74 68  bj(size_t length
3530: 2c 20 73 69 7a 65 5f 74 20 6c 65 61 64 69 6e 67  , size_t leading
3540: 53 70 61 63 65 2c 20 73 69 7a 65 5f 74 20 65 6e  Space, size_t en
3550: 64 53 70 61 63 65 29 0a 7d 0a 23 20 54 49 50 20  dSpace).}.# TIP 
3560: 36 32 35 3a 20 66 6f 72 20 75 6e 69 74 20 74 65  625: for unit te
3570: 73 74 69 6e 67 20 2d 20 63 68 65 63 6b 20 6c 69  sting - check li
3580: 73 74 20 69 6e 76 61 72 69 61 6e 74 73 0a 64 65  st invariants.de
3590: 63 6c 61 72 65 20 32 32 32 20 7b 0a 20 20 20 20  clare 222 {.    
35a0: 76 6f 69 64 20 54 63 6c 4c 69 73 74 4f 62 6a 56  void TclListObjV
35b0: 61 6c 69 64 61 74 65 28 54 63 6c 5f 49 6e 74 65  alidate(Tcl_Inte
35c0: 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f  rp *interp, Tcl_
35d0: 4f 62 6a 20 2a 6c 69 73 74 4f 62 6a 29 0a 7d 0a  Obj *listObj).}.
35e0: 23 20 42 75 67 20 37 33 37 31 62 36 32 37 30 62  # Bug 7371b6270b
35f0: 0a 64 65 63 6c 61 72 65 20 32 32 33 20 7b 0a 20  .declare 223 {. 
3600: 20 20 20 76 6f 69 64 20 2a 54 63 6c 47 65 74 43     void *TclGetC
3610: 53 74 61 63 6b 50 74 72 28 76 6f 69 64 29 0a 7d  StackPtr(void).}
3620: 0a 64 65 63 6c 61 72 65 20 32 32 34 20 7b 0a 20  .declare 224 {. 
3630: 20 20 20 54 63 6c 50 6c 61 74 66 6f 72 6d 54 79     TclPlatformTy
3640: 70 65 20 2a 54 63 6c 47 65 74 50 6c 61 74 66 6f  pe *TclGetPlatfo
3650: 72 6d 28 76 6f 69 64 29 0a 7d 0a 64 65 63 6c 61  rm(void).}.decla
3660: 72 65 20 32 32 35 20 7b 0a 20 20 20 20 54 63 6c  re 225 {.    Tcl
3670: 5f 4f 62 6a 20 2a 54 63 6c 54 72 61 63 65 44 69  _Obj *TclTraceDi
3680: 63 74 50 61 74 68 28 54 63 6c 5f 49 6e 74 65 72  ctPath(Tcl_Inter
3690: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f  p *interp, Tcl_O
36a0: 62 6a 20 2a 72 6f 6f 74 50 74 72 2c 0a 09 20 20  bj *rootPtr,..  
36b0: 20 20 54 63 6c 5f 53 69 7a 65 20 6b 65 79 63 2c    Tcl_Size keyc,
36c0: 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20   Tcl_Obj *const 
36d0: 6b 65 79 76 5b 5d 2c 20 69 6e 74 20 66 6c 61 67  keyv[], int flag
36e0: 73 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 32 36  s).}.declare 226
36f0: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 4f 62   {.    int TclOb
3700: 6a 42 65 69 6e 67 44 65 6c 65 74 65 64 28 54 63  jBeingDeleted(Tc
3710: 6c 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 29 0a 7d  l_Obj *objPtr).}
3720: 0a 64 65 63 6c 61 72 65 20 32 32 37 20 7b 0a 20  .declare 227 {. 
3730: 20 20 20 76 6f 69 64 20 54 63 6c 53 65 74 4e 73     void TclSetNs
3740: 50 61 74 68 28 4e 61 6d 65 73 70 61 63 65 20 2a  Path(Namespace *
3750: 6e 73 50 74 72 2c 20 54 63 6c 5f 53 69 7a 65 20  nsPtr, Tcl_Size 
3760: 70 61 74 68 4c 65 6e 67 74 68 2c 0a 09 20 20 20  pathLength,..   
3770: 20 54 63 6c 5f 4e 61 6d 65 73 70 61 63 65 20 2a   Tcl_Namespace *
3780: 70 61 74 68 41 72 79 5b 5d 29 0a 7d 0a 64 65 63  pathAry[]).}.dec
3790: 6c 61 72 65 20 32 32 39 20 7b 0a 20 20 20 20 69  lare 229 {.    i
37a0: 6e 74 09 54 63 6c 50 74 72 4d 61 6b 65 55 70 76  nt.TclPtrMakeUpv
37b0: 61 72 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69  ar(Tcl_Interp *i
37c0: 6e 74 65 72 70 2c 20 56 61 72 20 2a 6f 74 68 65  nterp, Var *othe
37d0: 72 50 31 50 74 72 2c 0a 09 20 20 20 20 63 6f 6e  rP1Ptr,..    con
37e0: 73 74 20 63 68 61 72 20 2a 6d 79 4e 61 6d 65 2c  st char *myName,
37f0: 20 69 6e 74 20 6d 79 46 6c 61 67 73 2c 20 54 63   int myFlags, Tc
3800: 6c 5f 53 69 7a 65 20 69 6e 64 65 78 29 0a 7d 0a  l_Size index).}.
3810: 64 65 63 6c 61 72 65 20 32 33 30 20 7b 0a 20 20  declare 230 {.  
3820: 20 20 56 61 72 20 2a 54 63 6c 4f 62 6a 4c 6f 6f    Var *TclObjLoo
3830: 6b 75 70 56 61 72 28 54 63 6c 5f 49 6e 74 65 72  kupVar(Tcl_Inter
3840: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f  p *interp, Tcl_O
3850: 62 6a 20 2a 70 61 72 74 31 50 74 72 2c 0a 09 20  bj *part1Ptr,.. 
3860: 20 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 70     const char *p
3870: 61 72 74 32 2c 20 69 6e 74 20 66 6c 61 67 73 2c  art2, int flags,
3880: 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 6d 73 67   const char *msg
3890: 2c 0a 09 20 20 20 20 69 6e 74 20 63 72 65 61 74  ,..    int creat
38a0: 65 50 61 72 74 31 2c 20 69 6e 74 20 63 72 65 61  ePart1, int crea
38b0: 74 65 50 61 72 74 32 2c 20 56 61 72 20 2a 2a 61  tePart2, Var **a
38c0: 72 72 61 79 50 74 72 50 74 72 29 0a 7d 0a 64 65  rrayPtrPtr).}.de
38d0: 63 6c 61 72 65 20 32 33 31 20 7b 0a 20 20 20 20  clare 231 {.    
38e0: 69 6e 74 09 54 63 6c 47 65 74 4e 61 6d 65 73 70  int.TclGetNamesp
38f0: 61 63 65 46 72 6f 6d 4f 62 6a 28 54 63 6c 5f 49  aceFromObj(Tcl_I
3900: 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54  nterp *interp, T
3910: 63 6c 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 2c 0a  cl_Obj *objPtr,.
3920: 09 20 20 20 20 54 63 6c 5f 4e 61 6d 65 73 70 61  .    Tcl_Namespa
3930: 63 65 20 2a 2a 6e 73 50 74 72 50 74 72 29 0a 7d  ce **nsPtrPtr).}
3940: 0a 0a 23 20 42 69 74 73 20 61 6e 64 20 70 69 65  ..# Bits and pie
3950: 63 65 73 20 6f 66 20 54 49 50 23 32 38 30 27 73  ces of TIP#280's
3960: 20 67 75 74 73 0a 64 65 63 6c 61 72 65 20 32 33   guts.declare 23
3970: 32 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 45  2 {.    int TclE
3980: 76 61 6c 4f 62 6a 45 78 28 54 63 6c 5f 49 6e 74  valObjEx(Tcl_Int
3990: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c  erp *interp, Tcl
39a0: 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 2c 20 69 6e  _Obj *objPtr, in
39b0: 74 20 66 6c 61 67 73 2c 0a 09 20 20 20 20 63 6f  t flags,..    co
39c0: 6e 73 74 20 43 6d 64 46 72 61 6d 65 20 2a 69 6e  nst CmdFrame *in
39d0: 76 6f 6b 65 72 2c 20 54 63 6c 5f 53 69 7a 65 20  voker, Tcl_Size 
39e0: 77 6f 72 64 29 0a 7d 0a 64 65 63 6c 61 72 65 20  word).}.declare 
39f0: 32 33 33 20 7b 0a 20 20 20 20 76 6f 69 64 20 54  233 {.    void T
3a00: 63 6c 47 65 74 53 72 63 49 6e 66 6f 46 6f 72 50  clGetSrcInfoForP
3a10: 63 28 43 6d 64 46 72 61 6d 65 20 2a 63 6f 6e 74  c(CmdFrame *cont
3a20: 65 78 74 50 74 72 29 0a 7d 0a 0a 23 20 45 78 70  extPtr).}..# Exp
3a30: 6f 72 74 73 20 66 6f 72 20 56 61 72 52 65 66 6f  orts for VarRefo
3a40: 72 6d 20 63 6f 6d 70 61 74 3a 20 49 74 63 6c 2c  rm compat: Itcl,
3a50: 20 58 4f 54 63 6c 20 6c 69 6b 65 20 74 6f 20 70   XOTcl like to p
3a60: 65 65 6b 20 69 6e 74 6f 20 6f 75 72 20 76 61 72  eek into our var
3a70: 54 61 62 6c 65 73 20 3a 28 0a 64 65 63 6c 61 72  Tables :(.declar
3a80: 65 20 32 33 34 20 7b 0a 20 20 20 20 56 61 72 20  e 234 {.    Var 
3a90: 2a 54 63 6c 56 61 72 48 61 73 68 43 72 65 61 74  *TclVarHashCreat
3aa0: 65 56 61 72 28 54 63 6c 56 61 72 48 61 73 68 54  eVar(TclVarHashT
3ab0: 61 62 6c 65 20 2a 74 61 62 6c 65 50 74 72 2c 20  able *tablePtr, 
3ac0: 63 6f 6e 73 74 20 63 68 61 72 20 2a 6b 65 79 2c  const char *key,
3ad0: 0a 09 20 20 20 20 69 6e 74 20 2a 6e 65 77 50 74  ..    int *newPt
3ae0: 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 33 35  r).}.declare 235
3af0: 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 49   {.    void TclI
3b00: 6e 69 74 56 61 72 48 61 73 68 54 61 62 6c 65 28  nitVarHashTable(
3b10: 54 63 6c 56 61 72 48 61 73 68 54 61 62 6c 65 20  TclVarHashTable 
3b20: 2a 74 61 62 6c 65 50 74 72 2c 20 4e 61 6d 65 73  *tablePtr, Names
3b30: 70 61 63 65 20 2a 6e 73 50 74 72 29 0a 7d 0a 0a  pace *nsPtr).}..
3b40: 23 20 54 49 50 20 23 32 38 35 3a 20 53 63 72 69  # TIP #285: Scri
3b50: 70 74 20 63 61 6e 63 65 6c 6c 61 74 69 6f 6e 20  pt cancellation 
3b60: 73 75 70 70 6f 72 74 2e 0a 64 65 63 6c 61 72 65  support..declare
3b70: 20 32 33 37 20 7b 0a 20 20 20 20 69 6e 74 20 54   237 {.    int T
3b80: 63 6c 52 65 73 65 74 43 61 6e 63 65 6c 6c 61 74  clResetCancellat
3b90: 69 6f 6e 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a  ion(Tcl_Interp *
3ba0: 69 6e 74 65 72 70 2c 20 69 6e 74 20 66 6f 72 63  interp, int forc
3bb0: 65 29 0a 7d 0a 0a 23 20 4e 52 45 20 66 75 6e 63  e).}..# NRE func
3bc0: 74 69 6f 6e 73 20 66 6f 72 20 22 72 6f 67 75 65  tions for "rogue
3bd0: 22 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 6f 20  " extensions to 
3be0: 65 78 70 6c 6f 69 74 20 4e 52 45 3b 20 74 68 65  exploit NRE; the
3bf0: 79 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 0a 23  y will need to.#
3c00: 20 69 6e 63 6c 75 64 65 20 4e 52 45 2e 68 20 74   include NRE.h t
3c10: 6f 6f 2e 0a 64 65 63 6c 61 72 65 20 32 33 38 20  oo..declare 238 
3c20: 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 4e 52 49  {.    int TclNRI
3c30: 6e 74 65 72 70 50 72 6f 63 28 76 6f 69 64 20 2a  nterpProc(void *
3c40: 63 6c 69 65 6e 74 44 61 74 61 2c 20 54 63 6c 5f  clientData, Tcl_
3c50: 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 0a  Interp *interp,.
3c60: 09 20 20 20 20 54 63 6c 5f 53 69 7a 65 20 6f 62  .    Tcl_Size ob
3c70: 6a 63 2c 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e  jc, Tcl_Obj *con
3c80: 73 74 20 6f 62 6a 76 5b 5d 29 0a 7d 0a 64 65 63  st objv[]).}.dec
3c90: 6c 61 72 65 20 32 33 39 20 7b 0a 20 20 20 20 69  lare 239 {.    i
3ca0: 6e 74 20 54 63 6c 4e 52 49 6e 74 65 72 70 50 72  nt TclNRInterpPr
3cb0: 6f 63 43 6f 72 65 28 54 63 6c 5f 49 6e 74 65 72  ocCore(Tcl_Inter
3cc0: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 4f  p *interp, Tcl_O
3cd0: 62 6a 20 2a 70 72 6f 63 4e 61 6d 65 4f 62 6a 2c  bj *procNameObj,
3ce0: 0a 09 20 20 20 20 54 63 6c 5f 53 69 7a 65 20 73  ..    Tcl_Size s
3cf0: 6b 69 70 2c 20 50 72 6f 63 45 72 72 6f 72 50 72  kip, ProcErrorPr
3d00: 6f 63 20 2a 65 72 72 6f 72 50 72 6f 63 29 0a 7d  oc *errorProc).}
3d10: 0a 64 65 63 6c 61 72 65 20 32 34 30 20 7b 0a 20  .declare 240 {. 
3d20: 20 20 20 69 6e 74 20 54 63 6c 4e 52 52 75 6e 43     int TclNRRunC
3d30: 61 6c 6c 62 61 63 6b 73 28 54 63 6c 5f 49 6e 74  allbacks(Tcl_Int
3d40: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 69 6e 74  erp *interp, int
3d50: 20 72 65 73 75 6c 74 2c 0a 09 20 20 20 20 4e 52   result,..    NR
3d60: 45 5f 63 61 6c 6c 62 61 63 6b 20 2a 72 6f 6f 74  E_callback *root
3d70: 50 74 72 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32  Ptr).}.declare 2
3d80: 34 31 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c  41 {.    int Tcl
3d90: 4e 52 45 76 61 6c 4f 62 6a 45 78 28 54 63 6c 5f  NREvalObjEx(Tcl_
3da0: 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20  Interp *interp, 
3db0: 54 63 6c 5f 4f 62 6a 20 2a 6f 62 6a 50 74 72 2c  Tcl_Obj *objPtr,
3dc0: 20 69 6e 74 20 66 6c 61 67 73 2c 0a 09 20 20 20   int flags,..   
3dd0: 20 63 6f 6e 73 74 20 43 6d 64 46 72 61 6d 65 20   const CmdFrame 
3de0: 2a 69 6e 76 6f 6b 65 72 2c 20 54 63 6c 5f 53 69  *invoker, Tcl_Si
3df0: 7a 65 20 77 6f 72 64 29 0a 7d 0a 64 65 63 6c 61  ze word).}.decla
3e00: 72 65 20 32 34 32 20 7b 0a 20 20 20 20 69 6e 74  re 242 {.    int
3e10: 20 54 63 6c 4e 52 45 76 61 6c 4f 62 6a 76 28 54   TclNREvalObjv(T
3e20: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72  cl_Interp *inter
3e30: 70 2c 20 54 63 6c 5f 53 69 7a 65 20 6f 62 6a 63  p, Tcl_Size objc
3e40: 2c 0a 09 20 20 20 20 54 63 6c 5f 4f 62 6a 20 2a  ,..    Tcl_Obj *
3e50: 63 6f 6e 73 74 20 6f 62 6a 76 5b 5d 2c 20 69 6e  const objv[], in
3e60: 74 20 66 6c 61 67 73 2c 20 43 6f 6d 6d 61 6e 64  t flags, Command
3e70: 20 2a 63 6d 64 50 74 72 29 0a 7d 0a 0a 23 20 54   *cmdPtr).}..# T
3e80: 63 6c 5f 4f 62 6a 20 6c 65 61 6b 20 64 65 74 65  cl_Obj leak dete
3e90: 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 2e 0a 64  ction support..d
3ea0: 65 63 6c 61 72 65 20 32 34 33 20 7b 0a 20 20 20  eclare 243 {.   
3eb0: 20 76 6f 69 64 20 54 63 6c 44 62 44 75 6d 70 41   void TclDbDumpA
3ec0: 63 74 69 76 65 4f 62 6a 65 63 74 73 28 46 49 4c  ctiveObjects(FIL
3ed0: 45 20 2a 6f 75 74 46 69 6c 65 29 0a 7d 0a 0a 23  E *outFile).}..#
3ee0: 20 46 75 6e 63 74 69 6f 6e 73 20 74 6f 20 6d 61   Functions to ma
3ef0: 6b 65 20 74 68 69 6e 67 73 20 62 65 74 74 65 72  ke things better
3f00: 20 66 6f 72 20 69 74 63 6c 0a 64 65 63 6c 61 72   for itcl.declar
3f10: 65 20 32 34 34 20 7b 0a 20 20 20 20 54 63 6c 5f  e 244 {.    Tcl_
3f20: 48 61 73 68 54 61 62 6c 65 20 2a 54 63 6c 47 65  HashTable *TclGe
3f30: 74 4e 61 6d 65 73 70 61 63 65 43 68 69 6c 64 54  tNamespaceChildT
3f40: 61 62 6c 65 28 54 63 6c 5f 4e 61 6d 65 73 70 61  able(Tcl_Namespa
3f50: 63 65 20 2a 6e 73 50 74 72 29 0a 7d 0a 64 65 63  ce *nsPtr).}.dec
3f60: 6c 61 72 65 20 32 34 35 20 7b 0a 20 20 20 20 54  lare 245 {.    T
3f70: 63 6c 5f 48 61 73 68 54 61 62 6c 65 20 2a 54 63  cl_HashTable *Tc
3f80: 6c 47 65 74 4e 61 6d 65 73 70 61 63 65 43 6f 6d  lGetNamespaceCom
3f90: 6d 61 6e 64 54 61 62 6c 65 28 54 63 6c 5f 4e 61  mandTable(Tcl_Na
3fa0: 6d 65 73 70 61 63 65 20 2a 6e 73 50 74 72 29 0a  mespace *nsPtr).
3fb0: 7d 0a 64 65 63 6c 61 72 65 20 32 34 36 20 7b 0a  }.declare 246 {.
3fc0: 20 20 20 20 69 6e 74 20 54 63 6c 49 6e 69 74 52      int TclInitR
3fd0: 65 77 72 69 74 65 45 6e 73 65 6d 62 6c 65 28 54  ewriteEnsemble(T
3fe0: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72  cl_Interp *inter
3ff0: 70 2c 20 54 63 6c 5f 53 69 7a 65 20 6e 75 6d 52  p, Tcl_Size numR
4000: 65 6d 6f 76 65 64 2c 0a 09 20 20 20 20 54 63 6c  emoved,..    Tcl
4010: 5f 53 69 7a 65 20 6e 75 6d 49 6e 73 65 72 74 65  _Size numInserte
4020: 64 2c 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73  d, Tcl_Obj *cons
4030: 74 20 2a 6f 62 6a 76 29 0a 7d 0a 64 65 63 6c 61  t *objv).}.decla
4040: 72 65 20 32 34 37 20 7b 0a 20 20 20 20 76 6f 69  re 247 {.    voi
4050: 64 20 54 63 6c 52 65 73 65 74 52 65 77 72 69 74  d TclResetRewrit
4060: 65 45 6e 73 65 6d 62 6c 65 28 54 63 6c 5f 49 6e  eEnsemble(Tcl_In
4070: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 69 6e  terp *interp, in
4080: 74 20 69 73 52 6f 6f 74 45 6e 73 65 6d 62 6c 65  t isRootEnsemble
4090: 29 0a 7d 0a 0a 64 65 63 6c 61 72 65 20 32 34 38  ).}..declare 248
40a0: 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 43 6f   {.    int TclCo
40b0: 70 79 43 68 61 6e 6e 65 6c 28 54 63 6c 5f 49 6e  pyChannel(Tcl_In
40c0: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63  terp *interp, Tc
40d0: 6c 5f 43 68 61 6e 6e 65 6c 20 69 6e 43 68 61 6e  l_Channel inChan
40e0: 2c 0a 09 20 20 20 20 54 63 6c 5f 43 68 61 6e 6e  ,..    Tcl_Chann
40f0: 65 6c 20 6f 75 74 43 68 61 6e 2c 20 6c 6f 6e 67  el outChan, long
4100: 20 6c 6f 6e 67 20 74 6f 52 65 61 64 2c 20 54 63   long toRead, Tc
4110: 6c 5f 4f 62 6a 20 2a 63 6d 64 50 74 72 29 0a 7d  l_Obj *cmdPtr).}
4120: 0a 0a 64 65 63 6c 61 72 65 20 32 34 39 20 7b 0a  ..declare 249 {.
4130: 20 20 20 20 63 68 61 72 20 2a 54 63 6c 44 6f 75      char *TclDou
4140: 62 6c 65 44 69 67 69 74 73 28 64 6f 75 62 6c 65  bleDigits(double
4150: 20 64 76 2c 20 69 6e 74 20 6e 64 69 67 69 74 73   dv, int ndigits
4160: 2c 20 69 6e 74 20 66 6c 61 67 73 2c 0a 09 20 20  , int flags,..  
4170: 20 20 69 6e 74 20 2a 64 65 63 70 74 2c 20 69 6e    int *decpt, in
4180: 74 20 2a 73 69 67 6e 75 6d 2c 20 63 68 61 72 20  t *signum, char 
4190: 2a 2a 65 6e 64 50 74 72 29 0a 7d 0a 23 20 54 49  **endPtr).}.# TI
41a0: 50 20 23 32 38 35 3a 20 53 63 72 69 70 74 20 63  P #285: Script c
41b0: 61 6e 63 65 6c 6c 61 74 69 6f 6e 20 73 75 70 70  ancellation supp
41c0: 6f 72 74 2e 0a 64 65 63 6c 61 72 65 20 32 35 30  ort..declare 250
41d0: 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63 6c 53   {.    void TclS
41e0: 65 74 43 68 69 6c 64 43 61 6e 63 65 6c 46 6c 61  etChildCancelFla
41f0: 67 73 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69  gs(Tcl_Interp *i
4200: 6e 74 65 72 70 2c 20 69 6e 74 20 66 6c 61 67 73  nterp, int flags
4210: 2c 20 69 6e 74 20 66 6f 72 63 65 29 0a 7d 0a 0a  , int force).}..
4220: 23 20 41 6c 6c 6f 77 20 65 78 74 65 6e 73 69 6f  # Allow extensio
4230: 6e 73 20 66 6f 72 20 6f 70 74 69 6d 69 7a 61 74  ns for optimizat
4240: 69 6f 6e 0a 64 65 63 6c 61 72 65 20 32 35 31 20  ion.declare 251 
4250: 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c 52 65 67  {.    int TclReg
4260: 69 73 74 65 72 4c 69 74 65 72 61 6c 28 76 6f 69  isterLiteral(voi
4270: 64 20 2a 65 6e 76 50 74 72 2c 0a 09 20 20 20 20  d *envPtr,..    
4280: 63 6f 6e 73 74 20 63 68 61 72 20 2a 62 79 74 65  const char *byte
4290: 73 2c 20 54 63 6c 5f 53 69 7a 65 20 6c 65 6e 67  s, Tcl_Size leng
42a0: 74 68 2c 20 69 6e 74 20 66 6c 61 67 73 29 0a 7d  th, int flags).}
42b0: 0a 0a 23 20 45 78 70 6f 72 74 69 6e 67 20 6f 66  ..# Exporting of
42c0: 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 41 50   the internal AP
42d0: 49 20 74 6f 20 76 61 72 69 61 62 6c 65 73 2e 0a  I to variables..
42e0: 0a 64 65 63 6c 61 72 65 20 32 35 32 20 7b 0a 20  .declare 252 {. 
42f0: 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 54 63 6c 50     Tcl_Obj *TclP
4300: 74 72 47 65 74 56 61 72 28 54 63 6c 5f 49 6e 74  trGetVar(Tcl_Int
4310: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c  erp *interp, Tcl
4320: 5f 56 61 72 20 76 61 72 50 74 72 2c 0a 09 20 20  _Var varPtr,..  
4330: 20 20 54 63 6c 5f 56 61 72 20 61 72 72 61 79 50    Tcl_Var arrayP
4340: 74 72 2c 20 54 63 6c 5f 4f 62 6a 20 2a 70 61 72  tr, Tcl_Obj *par
4350: 74 31 50 74 72 2c 20 54 63 6c 5f 4f 62 6a 20 2a  t1Ptr, Tcl_Obj *
4360: 70 61 72 74 32 50 74 72 2c 0a 09 20 20 20 20 69  part2Ptr,..    i
4370: 6e 74 20 66 6c 61 67 73 29 0a 7d 0a 64 65 63 6c  nt flags).}.decl
4380: 61 72 65 20 32 35 33 20 7b 0a 20 20 20 20 54 63  are 253 {.    Tc
4390: 6c 5f 4f 62 6a 20 2a 54 63 6c 50 74 72 53 65 74  l_Obj *TclPtrSet
43a0: 56 61 72 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a  Var(Tcl_Interp *
43b0: 69 6e 74 65 72 70 2c 20 54 63 6c 5f 56 61 72 20  interp, Tcl_Var 
43c0: 76 61 72 50 74 72 2c 0a 09 20 20 20 20 54 63 6c  varPtr,..    Tcl
43d0: 5f 56 61 72 20 61 72 72 61 79 50 74 72 2c 20 54  _Var arrayPtr, T
43e0: 63 6c 5f 4f 62 6a 20 2a 70 61 72 74 31 50 74 72  cl_Obj *part1Ptr
43f0: 2c 20 54 63 6c 5f 4f 62 6a 20 2a 70 61 72 74 32  , Tcl_Obj *part2
4400: 50 74 72 2c 0a 09 20 20 20 20 54 63 6c 5f 4f 62  Ptr,..    Tcl_Ob
4410: 6a 20 2a 6e 65 77 56 61 6c 75 65 50 74 72 2c 20  j *newValuePtr, 
4420: 69 6e 74 20 66 6c 61 67 73 29 0a 7d 0a 64 65 63  int flags).}.dec
4430: 6c 61 72 65 20 32 35 34 20 7b 0a 20 20 20 20 54  lare 254 {.    T
4440: 63 6c 5f 4f 62 6a 20 2a 54 63 6c 50 74 72 49 6e  cl_Obj *TclPtrIn
4450: 63 72 4f 62 6a 56 61 72 28 54 63 6c 5f 49 6e 74  crObjVar(Tcl_Int
4460: 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c  erp *interp, Tcl
4470: 5f 56 61 72 20 76 61 72 50 74 72 2c 0a 09 20 20  _Var varPtr,..  
4480: 20 20 54 63 6c 5f 56 61 72 20 61 72 72 61 79 50    Tcl_Var arrayP
4490: 74 72 2c 20 54 63 6c 5f 4f 62 6a 20 2a 70 61 72  tr, Tcl_Obj *par
44a0: 74 31 50 74 72 2c 20 54 63 6c 5f 4f 62 6a 20 2a  t1Ptr, Tcl_Obj *
44b0: 70 61 72 74 32 50 74 72 2c 0a 09 20 20 20 20 54  part2Ptr,..    T
44c0: 63 6c 5f 4f 62 6a 20 2a 69 6e 63 72 50 74 72 2c  cl_Obj *incrPtr,
44d0: 20 69 6e 74 20 66 6c 61 67 73 29 0a 7d 0a 64 65   int flags).}.de
44e0: 63 6c 61 72 65 20 32 35 35 20 7b 0a 20 20 20 20  clare 255 {.    
44f0: 69 6e 74 09 54 63 6c 50 74 72 4f 62 6a 4d 61 6b  int.TclPtrObjMak
4500: 65 55 70 76 61 72 28 54 63 6c 5f 49 6e 74 65 72  eUpvar(Tcl_Inter
4510: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 56  p *interp, Tcl_V
4520: 61 72 20 6f 74 68 65 72 50 74 72 2c 0a 09 20 20  ar otherPtr,..  
4530: 20 20 54 63 6c 5f 4f 62 6a 20 2a 6d 79 4e 61 6d    Tcl_Obj *myNam
4540: 65 50 74 72 2c 20 69 6e 74 20 6d 79 46 6c 61 67  ePtr, int myFlag
4550: 73 29 0a 7d 0a 64 65 63 6c 61 72 65 20 32 35 36  s).}.declare 256
4560: 20 7b 0a 20 20 20 20 69 6e 74 09 54 63 6c 50 74   {.    int.TclPt
4570: 72 55 6e 73 65 74 56 61 72 28 54 63 6c 5f 49 6e  rUnsetVar(Tcl_In
4580: 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63  terp *interp, Tc
4590: 6c 5f 56 61 72 20 76 61 72 50 74 72 2c 20 54 63  l_Var varPtr, Tc
45a0: 6c 5f 56 61 72 20 61 72 72 61 79 50 74 72 2c 0a  l_Var arrayPtr,.
45b0: 09 20 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 70 61  .    Tcl_Obj *pa
45c0: 72 74 31 50 74 72 2c 20 54 63 6c 5f 4f 62 6a 20  rt1Ptr, Tcl_Obj 
45d0: 2a 70 61 72 74 32 50 74 72 2c 20 69 6e 74 20 66  *part2Ptr, int f
45e0: 6c 61 67 73 29 0a 7d 0a 64 65 63 6c 61 72 65 20  lags).}.declare 
45f0: 32 35 37 20 7b 0a 20 20 20 20 76 6f 69 64 20 54  257 {.    void T
4600: 63 6c 53 74 61 74 69 63 4c 69 62 72 61 72 79 28  clStaticLibrary(
4610: 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65  Tcl_Interp *inte
4620: 72 70 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a  rp, const char *
4630: 70 72 65 66 69 78 2c 0a 09 20 20 20 20 54 63 6c  prefix,..    Tcl
4640: 5f 4c 69 62 72 61 72 79 49 6e 69 74 50 72 6f 63  _LibraryInitProc
4650: 20 2a 69 6e 69 74 50 72 6f 63 2c 20 54 63 6c 5f   *initProc, Tcl_
4660: 4c 69 62 72 61 72 79 49 6e 69 74 50 72 6f 63 20  LibraryInitProc 
4670: 2a 73 61 66 65 49 6e 69 74 50 72 6f 63 29 0a 7d  *safeInitProc).}
4680: 0a 64 65 63 6c 61 72 65 20 32 35 38 20 7b 0a 20  .declare 258 {. 
4690: 20 20 20 69 6e 74 20 54 63 6c 4d 53 42 28 75 6e     int TclMSB(un
46a0: 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c 6f 6e 67  signed long long
46b0: 20 6e 29 0a 7d 0a 0a 64 65 63 6c 61 72 65 20 32   n).}..declare 2
46c0: 36 31 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63  61 {.    void Tc
46d0: 6c 55 6e 75 73 65 64 53 74 75 62 45 6e 74 72 79  lUnusedStubEntry
46e0: 28 76 6f 69 64 29 0a 7d 0a 0c 0a 23 23 23 23 23  (void).}...#####
46f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4730: 23 23 23 23 23 23 23 23 23 0a 0a 23 20 44 65 66  #########..# Def
4740: 69 6e 65 20 74 68 65 20 70 6c 61 74 66 6f 72 6d  ine the platform
4750: 20 73 70 65 63 69 66 69 63 20 69 6e 74 65 72 6e   specific intern
4760: 61 6c 20 54 63 6c 20 69 6e 74 65 72 66 61 63 65  al Tcl interface
4770: 2e 20 54 68 65 73 65 20 66 75 6e 63 74 69 6f 6e  . These function
4780: 73 20 61 72 65 0a 23 20 6f 6e 6c 79 20 61 76 61  s are.# only ava
4790: 69 6c 61 62 6c 65 20 6f 6e 20 74 68 65 20 64 65  ilable on the de
47a0: 73 69 67 6e 61 74 65 64 20 70 6c 61 74 66 6f 72  signated platfor
47b0: 6d 2e 0a 0a 69 6e 74 65 72 66 61 63 65 20 74 63  m...interface tc
47c0: 6c 49 6e 74 50 6c 61 74 0a 0a 23 23 23 23 23 23  lIntPlat..######
47d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
47e0: 23 23 23 23 23 23 23 23 23 23 0a 23 20 50 6c 61  ##########.# Pla
47f0: 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 66  tform specific f
4800: 75 6e 63 74 69 6f 6e 73 0a 0a 64 65 63 6c 61 72  unctions..declar
4810: 65 20 31 20 7b 0a 20 20 20 20 69 6e 74 20 54 63  e 1 {.    int Tc
4820: 6c 70 43 6c 6f 73 65 46 69 6c 65 28 54 63 6c 46  lpCloseFile(TclF
4830: 69 6c 65 20 66 69 6c 65 29 0a 7d 0a 64 65 63 6c  ile file).}.decl
4840: 61 72 65 20 32 20 7b 0a 20 20 20 20 54 63 6c 5f  are 2 {.    Tcl_
4850: 43 68 61 6e 6e 65 6c 20 54 63 6c 70 43 72 65 61  Channel TclpCrea
4860: 74 65 43 6f 6d 6d 61 6e 64 43 68 61 6e 6e 65 6c  teCommandChannel
4870: 28 54 63 6c 46 69 6c 65 20 72 65 61 64 46 69 6c  (TclFile readFil
4880: 65 2c 0a 09 20 20 20 20 54 63 6c 46 69 6c 65 20  e,..    TclFile 
4890: 77 72 69 74 65 46 69 6c 65 2c 20 54 63 6c 46 69  writeFile, TclFi
48a0: 6c 65 20 65 72 72 6f 72 46 69 6c 65 2c 20 73 69  le errorFile, si
48b0: 7a 65 5f 74 20 6e 75 6d 50 69 64 73 2c 20 54 63  ze_t numPids, Tc
48c0: 6c 5f 50 69 64 20 2a 70 69 64 50 74 72 29 0a 7d  l_Pid *pidPtr).}
48d0: 0a 64 65 63 6c 61 72 65 20 33 20 7b 0a 20 20 20  .declare 3 {.   
48e0: 20 69 6e 74 20 54 63 6c 70 43 72 65 61 74 65 50   int TclpCreateP
48f0: 69 70 65 28 54 63 6c 46 69 6c 65 20 2a 72 65 61  ipe(TclFile *rea
4900: 64 50 69 70 65 2c 20 54 63 6c 46 69 6c 65 20 2a  dPipe, TclFile *
4910: 77 72 69 74 65 50 69 70 65 29 0a 7d 0a 64 65 63  writePipe).}.dec
4920: 6c 61 72 65 20 34 20 7b 0a 20 20 20 20 76 6f 69  lare 4 {.    voi
4930: 64 20 2a 54 63 6c 57 69 6e 47 65 74 54 63 6c 49  d *TclWinGetTclI
4940: 6e 73 74 61 6e 63 65 28 76 6f 69 64 29 0a 7d 0a  nstance(void).}.
4950: 64 65 63 6c 61 72 65 20 35 20 7b 0a 20 20 20 20  declare 5 {.    
4960: 69 6e 74 20 54 63 6c 55 6e 69 78 57 61 69 74 46  int TclUnixWaitF
4970: 6f 72 46 69 6c 65 28 69 6e 74 20 66 64 2c 20 69  orFile(int fd, i
4980: 6e 74 20 6d 61 73 6b 2c 20 69 6e 74 20 74 69 6d  nt mask, int tim
4990: 65 6f 75 74 29 0a 7d 0a 64 65 63 6c 61 72 65 20  eout).}.declare 
49a0: 36 20 7b 0a 20 20 20 20 54 63 6c 46 69 6c 65 20  6 {.    TclFile 
49b0: 54 63 6c 70 4d 61 6b 65 46 69 6c 65 28 54 63 6c  TclpMakeFile(Tcl
49c0: 5f 43 68 61 6e 6e 65 6c 20 63 68 61 6e 6e 65 6c  _Channel channel
49d0: 2c 20 69 6e 74 20 64 69 72 65 63 74 69 6f 6e 29  , int direction)
49e0: 0a 7d 0a 64 65 63 6c 61 72 65 20 37 20 7b 0a 20  .}.declare 7 {. 
49f0: 20 20 20 54 63 6c 46 69 6c 65 20 54 63 6c 70 4f     TclFile TclpO
4a00: 70 65 6e 46 69 6c 65 28 63 6f 6e 73 74 20 63 68  penFile(const ch
4a10: 61 72 20 2a 66 6e 61 6d 65 2c 20 69 6e 74 20 6d  ar *fname, int m
4a20: 6f 64 65 29 0a 7d 0a 64 65 63 6c 61 72 65 20 38  ode).}.declare 8
4a30: 20 7b 0a 20 20 20 20 54 63 6c 5f 53 69 7a 65 20   {.    Tcl_Size 
4a40: 54 63 6c 70 47 65 74 50 69 64 28 54 63 6c 5f 50  TclpGetPid(Tcl_P
4a50: 69 64 20 70 69 64 29 0a 7d 0a 64 65 63 6c 61 72  id pid).}.declar
4a60: 65 20 39 20 7b 0a 20 20 20 20 54 63 6c 46 69 6c  e 9 {.    TclFil
4a70: 65 20 54 63 6c 70 43 72 65 61 74 65 54 65 6d 70  e TclpCreateTemp
4a80: 46 69 6c 65 28 63 6f 6e 73 74 20 63 68 61 72 20  File(const char 
4a90: 2a 63 6f 6e 74 65 6e 74 73 29 0a 7d 0a 64 65 63  *contents).}.dec
4aa0: 6c 61 72 65 20 31 31 20 7b 0a 20 20 20 20 76 6f  lare 11 {.    vo
4ab0: 69 64 20 54 63 6c 47 65 74 41 6e 64 44 65 74 61  id TclGetAndDeta
4ac0: 63 68 50 69 64 73 28 54 63 6c 5f 49 6e 74 65 72  chPids(Tcl_Inter
4ad0: 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f 43  p *interp, Tcl_C
4ae0: 68 61 6e 6e 65 6c 20 63 68 61 6e 29 0a 7d 0a 64  hannel chan).}.d
4af0: 65 63 6c 61 72 65 20 31 35 20 7b 0a 20 20 20 20  eclare 15 {.    
4b00: 69 6e 74 20 54 63 6c 70 43 72 65 61 74 65 50 72  int TclpCreatePr
4b10: 6f 63 65 73 73 28 54 63 6c 5f 49 6e 74 65 72 70  ocess(Tcl_Interp
4b20: 20 2a 69 6e 74 65 72 70 2c 20 73 69 7a 65 5f 74   *interp, size_t
4b30: 20 61 72 67 63 2c 0a 09 20 20 20 20 63 6f 6e 73   argc,..    cons
4b40: 74 20 63 68 61 72 20 2a 2a 61 72 67 76 2c 20 54  t char **argv, T
4b50: 63 6c 46 69 6c 65 20 69 6e 70 75 74 46 69 6c 65  clFile inputFile
4b60: 2c 20 54 63 6c 46 69 6c 65 20 6f 75 74 70 75 74  , TclFile output
4b70: 46 69 6c 65 2c 0a 09 20 20 20 20 54 63 6c 46 69  File,..    TclFi
4b80: 6c 65 20 65 72 72 6f 72 46 69 6c 65 2c 20 54 63  le errorFile, Tc
4b90: 6c 5f 50 69 64 20 2a 70 69 64 50 74 72 29 0a 7d  l_Pid *pidPtr).}
4ba0: 0a 64 65 63 6c 61 72 65 20 31 36 20 7b 0a 20 20  .declare 16 {.  
4bb0: 20 20 62 6f 6f 6c 20 54 63 6c 70 49 73 41 74 74    bool TclpIsAtt
4bc0: 79 28 69 6e 74 20 66 64 29 0a 7d 0a 64 65 63 6c  y(int fd).}.decl
4bd0: 61 72 65 20 31 37 20 7b 0a 20 20 20 20 69 6e 74  are 17 {.    int
4be0: 20 54 63 6c 55 6e 69 78 43 6f 70 79 46 69 6c 65   TclUnixCopyFile
4bf0: 28 63 6f 6e 73 74 20 63 68 61 72 20 2a 73 72 63  (const char *src
4c00: 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 64 73  , const char *ds
4c10: 74 2c 0a 09 20 20 20 20 63 6f 6e 73 74 20 54 63  t,..    const Tc
4c20: 6c 5f 53 74 61 74 42 75 66 20 2a 73 74 61 74 42  l_StatBuf *statB
4c30: 75 66 50 74 72 2c 20 69 6e 74 20 64 6f 6e 74 43  ufPtr, int dontC
4c40: 6f 70 79 41 74 74 73 29 0a 7d 0a 64 65 63 6c 61  opyAtts).}.decla
4c50: 72 65 20 32 30 20 7b 0a 20 20 20 20 76 6f 69 64  re 20 {.    void
4c60: 20 54 63 6c 57 69 6e 41 64 64 50 72 6f 63 65 73   TclWinAddProces
4c70: 73 28 76 6f 69 64 20 2a 68 50 72 6f 63 65 73 73  s(void *hProcess
4c80: 2c 20 54 63 6c 5f 53 69 7a 65 20 69 64 29 0a 7d  , Tcl_Size id).}
4c90: 0a 64 65 63 6c 61 72 65 20 32 34 20 7b 0a 20 20  .declare 24 {.  
4ca0: 20 20 63 68 61 72 20 2a 54 63 6c 57 69 6e 4e 6f    char *TclWinNo
4cb0: 42 61 63 6b 73 6c 61 73 68 28 63 68 61 72 20 2a  Backslash(char *
4cc0: 70 61 74 68 29 0a 7d 0a 64 65 63 6c 61 72 65 20  path).}.declare 
4cd0: 32 37 20 7b 0a 20 20 20 20 76 6f 69 64 20 54 63  27 {.    void Tc
4ce0: 6c 57 69 6e 46 6c 75 73 68 44 69 72 74 79 43 68  lWinFlushDirtyCh
4cf0: 61 6e 6e 65 6c 73 28 76 6f 69 64 29 0a 7d 0a 64  annels(void).}.d
4d00: 65 63 6c 61 72 65 20 32 39 20 7b 0a 20 20 20 20  eclare 29 {.    
4d10: 69 6e 74 20 54 63 6c 57 69 6e 43 50 55 49 44 28  int TclWinCPUID(
4d20: 69 6e 74 20 69 6e 64 65 78 2c 20 69 6e 74 20 2a  int index, int *
4d30: 72 65 67 73 29 0a 7d 0a 64 65 63 6c 61 72 65 20  regs).}.declare 
4d40: 33 30 20 7b 0a 20 20 20 20 69 6e 74 20 54 63 6c  30 {.    int Tcl
4d50: 55 6e 69 78 4f 70 65 6e 54 65 6d 70 6f 72 61 72  UnixOpenTemporar
4d60: 79 46 69 6c 65 28 54 63 6c 5f 4f 62 6a 20 2a 64  yFile(Tcl_Obj *d
4d70: 69 72 4f 62 6a 2c 20 54 63 6c 5f 4f 62 6a 20 2a  irObj, Tcl_Obj *
4d80: 62 61 73 65 6e 61 6d 65 4f 62 6a 2c 0a 09 20 20  basenameObj,..  
4d90: 20 20 54 63 6c 5f 4f 62 6a 20 2a 65 78 74 65 6e    Tcl_Obj *exten
4da0: 73 69 6f 6e 4f 62 6a 2c 20 54 63 6c 5f 4f 62 6a  sionObj, Tcl_Obj
4db0: 20 2a 72 65 73 75 6c 74 69 6e 67 4e 61 6d 65 4f   *resultingNameO
4dc0: 62 6a 29 0a 7d 0a 0c 0a 23 20 4c 6f 63 61 6c 20  bj).}...# Local 
4dd0: 56 61 72 69 61 62 6c 65 73 3a 0a 23 20 6d 6f 64  Variables:.# mod
4de0: 65 3a 20 74 63 6c 0a 23 20 45 6e 64 3a 0a        e: tcl.# End:.