Revision: 42358
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42358&view=rev
Author:   starseeker
Date:     2011-01-17 05:34:00 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
Remainder of changes from itcl subdir - itcl/itk upstream applied changes made 
to itcl_methods.c, so they are no longer a local BRL-CAD mod.

Modified Paths:
--------------
    brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.decls
    brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.h
    brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_bicmds.c
    brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_cmds.c
    brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_ensemble.c
    brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_methods.c
    brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_parse.c
    brlcad/trunk/src/other/incrTcl/itcl/library/itcl.tcl
    brlcad/trunk/src/other/incrTcl/itcl/win/makefile.vc
    brlcad/trunk/src/other/incrTcl/itcl/win/rc/itcl.rc

Added Paths:
-----------
    brlcad/trunk/src/other/incrTcl/itcl/doc/Class.3
    brlcad/trunk/src/other/incrTcl/itcl/doc/List.3
    brlcad/trunk/src/other/incrTcl/itcl/doc/Object.3
    brlcad/trunk/src/other/incrTcl/itcl/doc/Preserve.3

Added: brlcad/trunk/src/other/incrTcl/itcl/doc/Class.3
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/doc/Class.3                             
(rev 0)
+++ brlcad/trunk/src/other/incrTcl/itcl/doc/Class.3     2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -0,0 +1,57 @@
+'\"
+'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id: Class.3,v 1.1 2007/09/06 21:48:31 davygrvy Exp $
+'\"
+.so man.macros
+.TH Itcl_CreateClass 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note:  do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_CreateClass, Itcl_DeleteClass, Itcl_FindClass, Itcl_IsClass, 
Itcl_IsClassNamespace \- Manipulate classes.
+.SH SYNOPSIS
+.nf
+\fB#include <itclInt.h>\fR
+.sp
+int
+\fBItcl_CreateClass\fR(\fIinterp, path, info, rPtr\fR)
+.sp
+int
+\fBItcl_DeleteClass\fR(\fIinterp, cdefnPtr\fR)
+.sp
+ItclClass *
+\fBItcl_FindClass\fR(\fIinterp, path, autoload\fR)
+.sp
+int
+\fBItcl_IsClass\fR(\fIcmd\fR)
+.sp
+int
+\fBItcl_IsClassNamespace\fR(\fInamesp\fR)
+.SH ARGUMENTS
+.AP Tcl_Interp *interp in
+Interpreter to modify.
+.AP "CONST char" *path in
+Path of the class.
+.AP ItclObjectInfo *info in
+TODO.
+.AP ItclClass **rPtr in/out
+The address of the pointer to modify.
+.AP ItclClass *cdefnPtr in
+Pointer to class info struct.
+.AP int autoload in
+Flag value for if the class should be autoloaded
+.AP Tcl_Command cmd in
+Command to check.
+.AP Tcl_Namespace *namesp in
+Namespace to check.
+.BE
+
+.SH DESCRIPTION
+.PP
+
+.SH KEYWORDS
+class, find
+


Property changes on: brlcad/trunk/src/other/incrTcl/itcl/doc/Class.3
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/other/incrTcl/itcl/doc/List.3
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/doc/List.3                              
(rev 0)
+++ brlcad/trunk/src/other/incrTcl/itcl/doc/List.3      2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -0,0 +1,59 @@
+'\"
+'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id: List.3,v 1.1 2007/09/06 21:45:52 davygrvy Exp $
+'\"
+.so man.macros
+.TH Itcl_InitList 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note:  do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_InitList, Itcl_DeleteList, Itcl_CreateListElem, Itcl_DeleteListElem, 
Itcl_InsertList, Itcl_InsertListElem, Itcl_AppendList, Itcl_AppendListElem, 
Itcl_SetListValue \- Manipulate an Itcl list object.
+.SH SYNOPSIS
+.nf
+\fB#include <itcl.h>\fR
+.sp
+void
+\fBItcl_InitList\fR(\fIlist\fR)
+.sp
+void
+\fBItcl_DeleteList\fR(\fIlist\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_CreateListElem\fR(\fIlist\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_DeleteListElem\fR(\fIelem\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_InsertList\fR(\fIlist, clientData\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_InsertListElem\fR(\fIelem, clientData\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_AppendList\fR(\fIlist, clientData\fR)
+.sp
+Itcl_ListElem *
+\fBItcl_AppendListElem\fR(\fIelem, clientData\fR)
+.sp
+void
+\fBItcl_SetListValue\fR(\fIelem, clientData\fR)
+.SH ARGUMENTS
+.AP Itcl_List *list in
+List info structure.
+.AP Itcl_ListElem *elem in
+List element info structure.
+.AP ClientData clientData in
+Arbitrary one-word value to save in the list.
+.BE
+
+.SH DESCRIPTION
+.PP
+
+.SH KEYWORDS
+list
+


Property changes on: brlcad/trunk/src/other/incrTcl/itcl/doc/List.3
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/other/incrTcl/itcl/doc/Object.3
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/doc/Object.3                            
(rev 0)
+++ brlcad/trunk/src/other/incrTcl/itcl/doc/Object.3    2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -0,0 +1,39 @@
+'\"
+'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id: Object.3,v 1.1 2007/09/06 21:45:52 davygrvy Exp $
+'\"
+.so man.macros
+.TH Itcl_CreateObject 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note:  do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_CreateObject, Itcl_DeleteObject, Itcl_FindObject, Itcl_IsObject, 
Itcl_IsObjectIsa \- Manipulate an class instance.
+.SH SYNOPSIS
+.nf
+\fB#include <itclInt.h>\fR
+.sp
+void
+\fBItcl_PreserveData\fR(\fIcdata\fR)
+.sp
+void
+\fBItcl_ReleaseData\fR(\fIcdata\fR)
+.sp
+void
+\fBItcl_EventuallyFree\fR(\fIcdata, fproc\fR)
+.SH ARGUMENTS
+.AP Tcl_FreeProc *fproc in
+Address of function to call when the block is to be freed.
+.AP ClientData clientData in
+Arbitrary one-word value.
+.BE
+
+.SH DESCRIPTION
+.PP
+
+.SH KEYWORDS
+free, memory
+


Property changes on: brlcad/trunk/src/other/incrTcl/itcl/doc/Object.3
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/other/incrTcl/itcl/doc/Preserve.3
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/doc/Preserve.3                          
(rev 0)
+++ brlcad/trunk/src/other/incrTcl/itcl/doc/Preserve.3  2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -0,0 +1,39 @@
+'\"
+'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id: Preserve.3,v 1.1 2007/09/06 21:45:52 davygrvy Exp $
+'\"
+.so man.macros
+.TH Itcl_PreserveData 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note:  do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_PreserveData, Itcl_ReleaseData, Itcl_EventuallyFree \- Manipulate an Itcl 
list object.
+.SH SYNOPSIS
+.nf
+\fB#include <itcl.h>\fR
+.sp
+void
+\fBItcl_PreserveData\fR(\fIcdata\fR)
+.sp
+void
+\fBItcl_ReleaseData\fR(\fIcdata\fR)
+.sp
+void
+\fBItcl_EventuallyFree\fR(\fIcdata, fproc\fR)
+.SH ARGUMENTS
+.AP Tcl_FreeProc *fproc in
+Address of function to call when the block is to be freed.
+.AP ClientData clientData in
+Arbitrary one-word value.
+.BE
+
+.SH DESCRIPTION
+.PP
+
+.SH KEYWORDS
+free, memory
+


Property changes on: brlcad/trunk/src/other/incrTcl/itcl/doc/Preserve.3
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.decls
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.decls   2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.decls   2011-01-17 
05:34:00 UTC (rev 42358)
@@ -490,11 +490,11 @@
 #
 
 declare 112 generic {
-    Tcl_CallFrame* _Tcl_GetCallFrame (Tcl_Interp *interp, int level)
+    Itcl_CallFrame* _Tcl_GetCallFrame (Tcl_Interp *interp, int level)
 }
 declare 113 generic {
-    Tcl_CallFrame* _Tcl_ActivateCallFrame (Tcl_Interp *interp, \
-        Tcl_CallFrame *framePtr)
+    Itcl_CallFrame* _Tcl_ActivateCallFrame (Tcl_Interp *interp, \
+        Itcl_CallFrame *framePtr)
 }
 declare 114 generic {
     Var* _TclNewVar (void)

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.h
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.h       2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itclInt.h       2011-01-17 
05:34:00 UTC (rev 42358)
@@ -49,14 +49,6 @@
 #ifndef ITCLINT_H
 #define ITCLINT_H
 
-/* included so we avoid tcl's compat headers */
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#  include <fcntl.h>
-#  include <io.h>
-#endif
-#include "common.h"
-
 #include "tclInt.h"
 #include "itcl.h"
 
@@ -65,6 +57,15 @@
 # define TCL_STORAGE_CLASS DLLEXPORT
 #endif
 
+/*
+ * Handle hiding of errorLine in 8.6
+ */
+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
+#define ERRORLINE(interp) ((interp)->errorLine)
+#else
+#define ERRORLINE(interp) (Tcl_GetErrorLine(interp))
+#endif
+
 #define ITCL_TCL_PRE_8_5 (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5)
 
 #if !ITCL_TCL_PRE_8_5

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_bicmds.c
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_bicmds.c   2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_bicmds.c   2011-01-17 
05:34:00 UTC (rev 42358)
@@ -1692,7 +1692,8 @@
      *  then we got a "bad option" error message.  Add the options
      *  for the current ensemble to the error message.
      */
-    if (result != TCL_OK && strncmp(interp->result,"bad option",10) == 0) {
+    if (result != TCL_OK &&
+           strncmp(Tcl_GetStringResult(interp),"bad option",10) == 0) {
         resultPtr = Tcl_NewObj();
         Tcl_AppendToObj(resultPtr, "\nor", -1);
         Itcl_GetEnsembleUsageForObj(interp, objv[0], resultPtr);

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_cmds.c
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_cmds.c     2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_cmds.c     2011-01-17 
05:34:00 UTC (rev 42358)
@@ -913,7 +913,7 @@
     else if (result != TCL_OK) {
         char mesg[256], *name;
         name = Tcl_GetString(objv[0]);
-        sprintf(mesg, "\n    (%.100s body line %d)", name, interp->errorLine);
+        sprintf(mesg, "\n    (%.100s body line %d)", name, ERRORLINE(interp));
         Tcl_AddErrorInfo(interp, mesg);
     }
 

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_ensemble.c
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_ensemble.c 2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_ensemble.c 2011-01-17 
05:34:00 UTC (rev 42358)
@@ -1516,7 +1516,6 @@
     chainObj->bytes = NULL;
     chainObj->typePtr = &itclEnsInvocType;
     chainObj->internalRep.twoPtrValue.ptr1 = (VOID *) ensPart;
-    Tcl_IncrRefCount(objv[1]);
     chainObj->internalRep.twoPtrValue.ptr2 = (VOID *) objv[0];
     Tcl_IncrRefCount(objv[0]);
 
@@ -1707,7 +1706,7 @@
         if (objc == 3) {
             char msg[128];
             sprintf(msg, "\n    (\"ensemble\" body line %d)",
-                ensInfo->parser->errorLine);
+                   ERRORLINE(ensInfo->parser));
             Tcl_AddObjErrorInfo(interp, msg, -1);
         }
     }

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_methods.c
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_methods.c  2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_methods.c  2011-01-17 
05:34:00 UTC (rev 42358)
@@ -622,12 +622,7 @@
      *  Allocate some space to hold the implementation.
      */
     mcode = (ItclMemberCode*)ckalloc(sizeof(ItclMemberCode));
-    mcode->flags        = 0;
-    mcode->argcount     = 0;
-    mcode->arglist      = NULL;
-    mcode->procPtr      = NULL;
-    mcode->cfunc.objCmd = NULL;
-    mcode->clientData   = NULL;
+    memset(mcode, 0, sizeof(ItclMemberCode));
 
     if (arglist) {
         if (Itcl_CreateArgList(interp, arglist, &argc, &args)
@@ -656,6 +651,7 @@
     procPtr->iPtr = (Interp*)interp;
     procPtr->refCount = 1;
     procPtr->cmdPtr = (Command*)ckalloc(sizeof(Command));
+    memset(procPtr->cmdPtr, 0, sizeof(Command));
     procPtr->cmdPtr->nsPtr = (Namespace*)cdefn->namesp;
 
     if (body) {
@@ -2505,7 +2501,7 @@
 
             if ((mfunc->member->code->flags & ITCL_IMPLEMENT_TCL) != 0) {
                 Tcl_AppendToObj(objPtr, "body line ", -1);
-                sprintf(num, "%d", iPtr->errorLine);
+                sprintf(num, "%d", ERRORLINE(iPtr));
                 Tcl_AppendToObj(objPtr, num, -1);
                 Tcl_AppendToObj(objPtr, ")", -1);
             } else {

Modified: brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_parse.c
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_parse.c    2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/generic/itcl_parse.c    2011-01-17 
05:34:00 UTC (rev 42358)
@@ -267,7 +267,7 @@
     if (result != TCL_OK) {
         char msg[256];
         sprintf(msg, "\n    (class \"%.200s\" body line %d)",
-            className, interp->errorLine);
+            className, ERRORLINE(interp));
         Tcl_AddErrorInfo(interp, msg);
 
         Tcl_DeleteNamespace(cdefnPtr->namesp);
@@ -593,7 +593,7 @@
     else if (result != TCL_OK) {
         char mesg[256], *token;
         token = Tcl_GetStringFromObj(objv[0], (int*)NULL);
-        sprintf(mesg, "\n    (%.100s body line %d)", token, interp->errorLine);
+        sprintf(mesg, "\n    (%.100s body line %d)", token, ERRORLINE(interp));
         Tcl_AddErrorInfo(interp, mesg);
     }
 

Modified: brlcad/trunk/src/other/incrTcl/itcl/library/itcl.tcl
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/library/itcl.tcl        2011-01-17 
05:23:20 UTC (rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/library/itcl.tcl        2011-01-17 
05:34:00 UTC (rev 42358)
@@ -50,50 +50,58 @@
 # USAGE:  itcl::class name body
 # Adds an entry for the given class declaration.
 #
-auto_mkindex_parser::command itcl::class {name body} {
-    variable index
-    variable scriptFile
-    append index "set [list auto_index([fullname $name])]"
-    append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+foreach cmd {itcl::class class} {
+    auto_mkindex_parser::command $cmd {name body} {
+       variable index
+       variable scriptFile
+       append index "set [list auto_index([fullname $name])]"
+       append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
 
-    variable parser
-    variable contextStack
-    set contextStack [linsert $contextStack 0 $name]
-    $parser eval $body
-    set contextStack [lrange $contextStack 1 end]
+       variable parser
+       variable contextStack
+       set contextStack [linsert $contextStack 0 $name]
+       $parser eval $body
+       set contextStack [lrange $contextStack 1 end]
+    }
 }
 
 #
 # USAGE:  itcl::body name arglist body
 # Adds an entry for the given method/proc body.
 #
-auto_mkindex_parser::command itcl::body {name arglist body} {
-    variable index
-    variable scriptFile
-    append index "set [list auto_index([fullname $name])]"
-    append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+foreach cmd {itcl::body body} {
+    auto_mkindex_parser::command $cmd {name arglist body} {
+       variable index
+       variable scriptFile
+       append index "set [list auto_index([fullname $name])]"
+       append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+    }
 }
 
 #
 # USAGE:  itcl::configbody name arglist body
 # Adds an entry for the given method/proc body.
 #
-auto_mkindex_parser::command itcl::configbody {name body} {
-    variable index
-    variable scriptFile
-    append index "set [list auto_index([fullname $name])]"
-    append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+foreach cmd {itcl::configbody configbody} {
+    auto_mkindex_parser::command $cmd {name body} {
+       variable index
+       variable scriptFile
+       append index "set [list auto_index([fullname $name])]"
+       append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+    }
 }
 
 #
 # USAGE:  ensemble name ?body?
 # Adds an entry to the auto index list for the given ensemble name.
 #
-auto_mkindex_parser::command itcl::ensemble {name {body ""}} {
-    variable index
-    variable scriptFile
-    append index "set [list auto_index([fullname $name])]"
-    append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+foreach cmd {itcl::ensemble ensemble} {
+    auto_mkindex_parser::command $cmd {name {body ""}} {
+       variable index
+       variable scriptFile
+       append index "set [list auto_index([fullname $name])]"
+       append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+    }
 }
 
 #
@@ -140,3 +148,131 @@
         }
     }
 }
+
+# ----------------------------------------------------------------------
+# itcl_class, itcl_info
+# ----------------------------------------------------------------------
+# Compat handling for itcl_class/info, set for auto_index loading only
+#
+# Only need to convert public/protected usage.
+# Uses Tcl 8.4+ coding style
+#
+
+if {([llength [info commands itcl_class]] == 0)
+    && [package vsatisfies $::tcl_version 8.4]} {
+    proc ::itcl::CmdSplit {body} {
+       # DGP's command split
+       set commands {}
+       set chunk ""
+       foreach line [split $body "\n"] {
+           append chunk $line
+           if {[info complete "$chunk\n"]} {
+               # $chunk ends in a complete Tcl command, and none of the
+               # newlines within it end a complete Tcl command.  If there
+               # are multiple Tcl commands in $chunk, they must be
+               # separated by semi-colons.
+               set cmd ""
+               foreach part [split $chunk ";"] {
+                   append cmd $part
+                   if {[info complete "$cmd\n"]} {
+                       set cmd [string trimleft $cmd]
+                       # Drop empty commands and comments
+                       if {($cmd ne "") && ![string match #* $cmd]} {
+                           lappend commands $cmd
+                       }
+                       if {[string match #* $cmd]} {
+                           set cmd "#;"
+                       } else {
+                           set cmd ""
+                       }
+                   } else {
+                       # No complete command yet.
+                       # Replace semicolon and continue
+                       append cmd ";"
+                   }
+               }
+               set chunk ""
+           } else {
+               # No end of command yet.  Put the newline back and continue
+               append chunk "\n"
+           }
+       }
+       if {[string trim $chunk] ne ""} {
+           return -code error "Can't parse body into a\
+                sequence of commands.\n\tIncomplete command:\n$chunk"
+       }
+       return $commands
+    }
+
+    proc ::itcl::itcl_class {className body} {
+       # inherit baseClass ?baseClass...? ; # no change
+       # constructor args ?init? body     ; # no change
+       # destructor body                  ; # no change
+       # method name args body            ; # no change
+       # proc name args body              ; # no change
+       # common varName ?init?            ; # no change
+       # public varName ?init? ?config?   ; # variable ...
+       # protected varName ?init?         ; # variable ... (?)
+       set cmds [::itcl::CmdSplit $body]
+       set newcmds [list]
+       foreach cmd $cmds {
+           if {![catch {lindex $cmd 0} firstcmd]} {
+               if {$firstcmd eq "public" || $firstcmd eq "protected"} {
+                   set cmd [linsert $cmd 1 "variable"]
+               }
+           }
+           append newcmds "$cmd\n"
+       }
+       return [uplevel 1 [list ::itcl::class $className $newcmds]]
+    }
+    set ::auto_index(itcl_class) [list interp alias {} ::itcl_class {} 
::itcl::itcl_class]
+    set ::auto_index(itcl_info) [list interp alias {} ::itcl_info {} 
::itcl::find]
+}
+
+# ----------------------------------------------------------------------
+# [namespace inscope]
+# ----------------------------------------------------------------------
+# Modify [unknown] to handle Itcl's usage of [namespace inscope]
+#
+
+namespace eval ::itcl {
+    variable UNKNOWN_ADD_84 {
+       #######################################################################
+       # ADDED BY Itcl
+       # Itcl requires special handling for [namespace inscope]
+       #
+       set cmd [lindex $args 0]
+       if {[regexp "^:*namespace\[ \t\n\]+inscope" $cmd] && [llength $cmd] == 
4} {
+
+           set arglist [lrange $args 1 end]
+           set ret [catch {uplevel 1 ::$cmd $arglist} result]
+           if {$ret == 0} {
+               return $result
+           } else {
+               return -code $ret -errorcode $::errorCode $result
+           }
+       }
+       #######################################################################
+    }
+    variable UNKNOWN_ADD_85 {
+       #######################################################################
+       # ADDED BY Itcl
+       # Itcl requires special handling for [namespace inscope]
+       #
+       set cmd [lindex $args 0]
+       if {[regexp "^:*namespace\[ \t\n\]+inscope" $cmd] && [llength $cmd] == 
4} {
+           #return -code error "You need an {*}"
+           set arglist [lrange $args 1 end]
+           set ret [catch {uplevel 1 ::$cmd $arglist} result opts]
+           dict unset opts -errorinfo
+           dict incr opts -level
+           return -options $opts $result
+       }
+       #######################################################################
+    }
+    if {[package vsatisfies [package provide Tcl] 8.5]} {
+       proc ::unknown args "$UNKNOWN_ADD_85\n[info body ::unknown]"
+    } else {
+       proc ::unknown args "$UNKNOWN_ADD_84\n[info body ::unknown]"
+    }
+}

Modified: brlcad/trunk/src/other/incrTcl/itcl/win/makefile.vc
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/win/makefile.vc 2011-01-17 05:23:20 UTC 
(rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/win/makefile.vc 2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -67,7 +67,7 @@
 BIN_INSTALL_DIR                = $(_INSTALLDIR)\bin
 DOC_INSTALL_DIR                = $(_INSTALLDIR)\doc
 LIB_INSTALL_DIR                = $(_INSTALLDIR)\lib
-SCRIPT_INSTALL_DIR     = $(_INSTALLDIR)\lib\itcl$(ITCL_DOTVERSION)
+SCRIPT_INSTALL_DIR     = $(_INSTALLDIR)\lib\$(PROJECT)$(ITCL_DOTVERSION)
 INCLUDE_INSTALL_DIR    = $(_INSTALLDIR)\include
 
 ITCLOBJS = \
@@ -177,16 +177,17 @@
 
 ITCL_INCLUDES  = -I$(WINDIR) -I$(GENERICDIR)
 ITCL_DEFINES   = -DBUILD_itcl -DTCL_THREADS=1
-ITCL_EXE_CFLAGS        = $(cdebug) $(cflags) $(crt) $(ITCL_INCLUDES) 
$(ITCL_DEFINES) $(TCL_INCLUDES)
+ITCL_STUB_CFLAGS= $(cflags) $(cdebug) $(ITCL_INCLUDES) $(ITCL_DEFINES) 
$(TCL_INCLUDES)
+ITCL_DLL_CFLAGS        = $(cflags) $(cdebug) $(crt) $(ITCL_INCLUDES) 
$(ITCL_DEFINES) $(TCL_INCLUDES) $(OPTDEFINES)
 
 ### By convention, static builds do not use Stubs.  This is just a practice,
 ### not a technical limitation.
 !if $(STATIC_BUILD)
-ITCL_CFLAGS    = $(ITCL_EXE_CFLAGS) -DSTATIC_BUILD
+ITCL_CFLAGS    = $(ITCL_DLL_CFLAGS) -DSTATIC_BUILD
 !elseif $(TCL_DOES_STUBS)
-ITCL_CFLAGS    = $(ITCL_EXE_CFLAGS) -DUSE_TCL_STUBS
+ITCL_CFLAGS    = $(ITCL_DLL_CFLAGS) -DUSE_TCL_STUBS
 !else
-ITCL_CFLAGS    = $(ITCL_EXE_CFLAGS)
+ITCL_CFLAGS    = $(ITCL_DLL_CFLAGS)
 !endif
 
 #---------------------------------------------------------------------
@@ -284,14 +285,44 @@
 !endif
 
 #---------------------------------------------------------------------
+# Generate the source dependencies.
+#---------------------------------------------------------------------
+
+depend:
+!if !exist($(TCLSH))
+       @echo Build tclsh first!
+!else
+       $(TCLSH) $(TCLTOOLSDIR)\mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
+               -passthru:"-DBUILD_itcl $(ITCL_INCLUDES) $(TCL_INCLUDES)" 
$(GENERICDIR),$$(GENERICDIR) \
+               $(WINDIR),$$(WINDIR) @<<
+$(ITCLOBJS)
+<<
+!endif
+
+#---------------------------------------------------------------------
+# Dependency rules
+#---------------------------------------------------------------------
+
+!if exist("$(OUT_DIR)\depend.mk")
+!include "$(OUT_DIR)\depend.mk"
+!message *** Dependency rules in use.
+!else
+!message *** Dependency rules are not being used.
+!endif
+
+### add a spacer in the output
+!message
+
+#---------------------------------------------------------------------
 # Special case object file targets
 #---------------------------------------------------------------------
 
 # The following object is part of the stub library and should not
 # be built as DLL objects but none of the symbols should be exported
+# and without reference to any specific C-runtime.
 
 $(TMP_DIR)\itclStubLib.obj : $(GENERICDIR)\itclStubLib.c
-       $(cc32) -DSTATIC_BUILD $(ITCL_EXE_CFLAGS) -Zl -Fo$@ $?
+       $(cc32) -DSTATIC_BUILD $(ITCL_STUB_CFLAGS) -Zl -Fo$@ $?
 
 #---------------------------------------------------------------------
 # Inference rules.  Use batch-mode when supported.

Modified: brlcad/trunk/src/other/incrTcl/itcl/win/rc/itcl.rc
===================================================================
--- brlcad/trunk/src/other/incrTcl/itcl/win/rc/itcl.rc  2011-01-17 05:23:20 UTC 
(rev 42357)
+++ brlcad/trunk/src/other/incrTcl/itcl/win/rc/itcl.rc  2011-01-17 05:34:00 UTC 
(rev 42358)
@@ -1,56 +1,56 @@
-// RCS: @(#) $Id$
-//
-// Version resource script.
-//
-
-#include <winver.h>
-#include <itcl.h>
-
-//
-// build-up the name suffix that defines the type of build this is.
-//
-#if DEBUG && !UNCHECKED
-#define SUFFIX_DEBUG       "g"
-#else
-#define SUFFIX_DEBUG       ""
-#endif
-
-#define SUFFIX             SUFFIX_DEBUG
-
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION   
ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
- PRODUCTVERSION        
ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
- FILEFLAGSMASK 0x3fL
-#ifdef DEBUG
- FILEFLAGS     VS_FF_DEBUG
-#else
- FILEFLAGS     0x0L
-#endif
- FILEOS        VOS__WINDOWS32
- FILETYPE      VFT_DLL
- FILESUBTYPE   0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-       BLOCK "040904b0"
-       BEGIN
-           VALUE "FileDescription", "Itcl language extension for Tcl\0"
-           VALUE "Authors", "Michael McLennan\0"
-           VALUE "OriginalFilename", "itcl" STRINGIFY(ITCL_MAJOR_VERSION) 
STRINGIFY(ITCL_MINOR_VERSION) SUFFIX ".dll\0"
-           VALUE "CompanyName", "Bell Labs Innovations for Lucent 
Technologies\0"
-           VALUE "FileVersion", ITCL_PATCH_LEVEL
-           VALUE "LegalCopyright", "Copyright \251 1993-2004\0"
-           VALUE "ProductName", "[Incr Tcl] " ITCL_VERSION " for Windows\0"
-           VALUE "ProductVersion", ITCL_PATCH_LEVEL
-       END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-       VALUE "Translation", 0x409, 1200
-    END
-END
-
-
-
-
+// RCS: @(#) $Id$
+//
+// Version resource script.
+//
+
+#include <winver.h>
+#include <itcl.h>
+
+//
+// build-up the name suffix that defines the type of build this is.
+//
+#if DEBUG && !UNCHECKED
+#define SUFFIX_DEBUG       "g"
+#else
+#define SUFFIX_DEBUG       ""
+#endif
+
+#define SUFFIX             SUFFIX_DEBUG
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION   
ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
+ PRODUCTVERSION        
ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
+ FILEFLAGSMASK 0x3fL
+#ifdef DEBUG
+ FILEFLAGS     VS_FF_DEBUG
+#else
+ FILEFLAGS     0x0L
+#endif
+ FILEOS        VOS__WINDOWS32
+ FILETYPE      VFT_DLL
+ FILESUBTYPE   0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+       BLOCK "040904b0"
+       BEGIN
+           VALUE "FileDescription", "Itcl language extension for Tcl\0"
+           VALUE "Authors", "Michael McLennan\0"
+           VALUE "OriginalFilename", "itcl" STRINGIFY(ITCL_MAJOR_VERSION) 
STRINGIFY(ITCL_MINOR_VERSION) SUFFIX ".dll\0"
+           VALUE "CompanyName", "Bell Labs Innovations for Lucent 
Technologies\0"
+           VALUE "FileVersion", ITCL_PATCH_LEVEL
+           VALUE "LegalCopyright", "Copyright \251 1993-2004\0"
+           VALUE "ProductName", "[Incr Tcl] " ITCL_VERSION " for Windows\0"
+           VALUE "ProductVersion", ITCL_PATCH_LEVEL
+       END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+       VALUE "Translation", 0x409, 1200
+    END
+END
+
+
+
+


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to