CEBAF Extensions to itcl and Tcl_LinkVar

	By default Tcl_LinkVar is "hard wired" to generate global 
variables. I have modified the file tclLink.c in src7.4 so that
Tcl_LinkVar no longer generates global variables but instead
generates variables in the current itcl namespace.

Consider an itcl class...
 class junk {
        public variable aa 
        method bb {arg} @fred
        method cc {} @fred2
}

where fred and fred2 are symbols registred with Itcl_RegisterC or
the names of globally declared C functions (must be Tcl command
handler).

char *trial = 0;

int fred(clientData,interp,argc,argv)
    ClientData clientData;   /* class/object info */
    Tcl_Interp *interp;      /* current interpreter */
    int argc;                /* number of arguments */
    char **argv;             /* argument strings */
{
  Tcl_LinkVar(interp,argv[1],(char *) &trial, TCL_LINK_STRING);
  return TCL_OK;
}

int fred2(clientData,interp,argc,argv)
    ClientData clientData;   /* class/object info */
    Tcl_Interp *interp;      /* current interpreter */
    int argc;                /* number of arguments */
    char **argv;             /* argument strings */
{
  char string[100];
  if (trial != NULL) {
    printf("Value of C variable %s\n",trial);
  } else {
    printf("Value of C variable (NULL)\n");
  }
  return TCL_OK;
}

If the first argument of method bb (which invokes C function
fred) is the name of an itcl variable, in this case junk::aa
then Tcl_LinkVar will link the C variable to the itcl public
(or private) variable aa.

%junk try
try
%try cc
Value of C variable (NULL)
%try bb junk::aa
%try  configure -aa 1234
%try cc
Value of C variable 1234
%

The same effect can be achieved via a patch to itcl_objects.c
which looks at the initial value of a public variable, if the 
value starts with '@' it is assumed to be either a symbol
registered with a call to Itcl_RegisterC or the name of a 
global symbol in the symbol table of the current process.

class junk {
        public variable aa @trial
        method cc {} @fred2
}

% junk try
try
% try configure -aa 1234
1234
% try cc
Value of C variable 1234
%

Files Modified...

itcl/itcl_methods.c
itcl/itcl_objects.c
tcl7.4/tclLink.c

