diff options
37 files changed, 0 insertions, 13010 deletions
diff --git a/itcl/CHANGES b/itcl/CHANGES deleted file mode 100644 index b0cbdafe85d..00000000000 --- a/itcl/CHANGES +++ /dev/null @@ -1,2041 +0,0 @@ - - [incr Tcl] - CHANGE LOG -========================================================================== - ----------------------- CHANGES FROM itcl-1.5 -------------------------- -========================================================================== - - Release itcl-2.0 provides a new syntax for defining classes. The - new syntax is accessed using the new "itcl::class" command. For the - time being, the old syntax will be supported via the old "itcl_class" - command, but support for this will be phased out over time. - - Because both syntaxes are supported, the new version is "backward - compatible" with the previous itcl-1.5 release. However, there are - some semantic changes that may break existing scripts. These are - listed in detail in the section "INCOMPATIBLE CHANGES". - - - CATALOG OF NEW COMMANDS --------------------------------------------------------------------------- - Following is a brief catalog of new commands available in this release. - - == Tcl with Namespaces ================================================= - - delete namespace name ?name...? - - Deletes one or more namespaces, destroying all commands, variables, - and child namespaces within it. - - - ensemble name { - option optName arglist body - option optName arglist body - ... - ensemble optName { - option subOptName arglist body - option subOptName arglist body - ... - } - } - - Adds options to an ensemble called "name". If the ensemble does - not already exist, it is created automatically. An "ensemble" is - a toplevel command that groups a collection of sub-commands. For - example, the usual Tcl "info" command is an ensemble with options - like "globals", "level", "tclversion", etc. - - Ensembles are good for two reasons. First, new options can be - integrated in without modifying any source code or "switch" - statements. For example, [incr Tcl] adds the "info classes" - and "info objects" commands simply by adding options to the - "info" ensemble. Second, error messages are generated automatically - by the ensemble mechanism. Try invoking "info" with no options - and see the result. - - Each option declaration is just like a Tcl proc declaration, - with an option name, arglist and body. Ensembles can also - contain sub-ensembles with more options. - - - import add name ?name...? ?-where pos...? - import all ?name? - import list ?importList? - import remove name ?name...? - - Used to manipulate the "import" list for the current namespace. - When one namespace imports another, it gains access to all of - its public commands/variables as if they were part of the - same namespace. In other words, one namespace can be integrated - seamlessly into another by adding it to the import list of the - other namespace. By default, each namespace imports its parent, - so most namespaces import the global scope in some fashion. - - The form "import list" is used to query or set the import list - for the current namespace. The form "import all" returns the - namespace search path that is consulted when commands/variables - are accessed. - - - info context - - Returns the current namespace context. The global namespace - context is reported here as "", so it is easy to build - namespace paths like this: - - set path "[info context]::name" - - - info namespace all ?pattern? - - Returns a list of namespaces found in the current namespace - context, whose names match an optional string pattern. This - includes children of the current namespace, and children of - all imported namespaces. - - - info namespace children ?name? - - Returns a list of child namespaces for namespace "name", - or for the current namespace if "name" is not specified. - - - info namespace parent ?name? - - Returns the parent namespace for namespace "name", or - for the current namespace if "name" is not specified. - - - info namespace qualifiers string - - Parses a string of the form "namesp::namesp::name", and returns - the leading "namesp::namesp" scope qualifiers. - - - info namespace tail string - - Parses a string of the form "namesp::namesp::name", and returns - the trailing "name" element. - - - info protection ?-command? ?-variable? name - - Returns the protection level for an element. By default, "name" - is treated as a command name, but the "-command" or "-variable" - flags can be used to request a specific treatment. - - - info which ?-command? ?-variable? ?-namespace? name - - Reports the full namespace path (e.g., "::namesp::namesp::name") - for an element. By default, "name" is treated as a command name, - but the "-command", "-variable" and "-namespace" flags can be - used to request a specific treatment. - - - namespace name ?-local? ?-enforced val? ?--? ?commands? - - This is the usual mechanism for creating a namespace and defining - elements within it. - - If namespace "name" does not exist, it is created automatically. - The namespace name may include a full namespace path (e.g., - "namesp::namesp::namesp"). During the search for this namespace, - all imported namespaces are consulted. If the "-local" flag is - specified, then the search is restricted to the local namespace; - this prevents against accidentally importing a namespace if the - intent is to create a child namespace. - - If the "-enforced" flag is specified, then "val" is treated as a - boolean value; if true, then command/variable enforcement is - turned on for this namespace. Each time a new command is - referenced within the namespace, Tcl automatically calls a - procedure: - - enforce_cmd <name> - - with the <name> of the command that is about to be executed. The - "enforce_cmd" proc can return an error, and access to that command - will be denied. It can return another command name, or a more - specific namespace path, and that command will be used instead. - Or it can return "", and command lookup will continue via the - normal namespace rules (i.e., in local scope, imported namespaces, - etc.). - - Each time a new variable is referenced within an enforced - namespace, Tcl automatically calls a procedure: - - enforce_var <name> - - with the <name> of a global variable that is being referenced. - The "enforce_var" proc can return an error, and access to that - variable will be denied. It can return another variable name, - or a more specific namespace path, and that variable will be - used instead. Or it can return "", and variable lookup will - continue via the normal namespace rules (i.e., in local scope, - imported namespaces, etc.). - - Note that command/variable enforcement done at the Tcl language - level can be slow. There is also a C language interface for - the same functionality, which offers much better performance. - - The namespace is first found and updated with whatever flags were - specified. After that, if a "commands" string was specified, it - is executed in the context of the namespace. - - - public command ?arg arg...? - protected command ?arg arg...? - private command ?arg arg...? - - These commands attach a particular protection level to whatever - commands or variables are created while executing the specified - command. They are used in conjunction with commands like - "proc" and "variable" to create public/protected/private elements. - - - scope string - code ?-namespace name? command ?arg arg ...? - @scope namespace value - - The "scope" command takes a string and encodes it into an "@scope" - declaration. The "code" command performs a similar function, - but accepts multiple arguments and is usually used to wrap up - code fragments. The "@scope" declaration keeps a value (like a - variable name or code fragment) together with its context - namespace. It can be executed like an ordinary command: - - set cmd {@scope :: puts} - $cmd "hello world!" - - or used as an ordinary variable name: - - set var {@scope :: auto_path} - lappend $var /usr/local/mylib - - The difference, however, is that an "@scope" value bypasses the - usual access protections and guarantees that values have the - proper scope. - - Ordinary variable names refer to variables in the global - namespace. Ordinary code fragments are usually interpreted - by extensions like Tk in the global namespace. The "scope" - and "code" commands are used to wrap up variable names and - code fragments to preserve the namespace context. For example: - - namespace foo { - private variable state 0 - private proc show_state {mesg} { - global state - puts "$mesg: $state" - } - - checkbutton .cb -text "Toggle" \ - -variable [scope state] \ - -command [code show_state "current state"] - - pack .cb - } - - In this example, the checkbutton is tied to the variable - "foo::state" and executes the command "foo::show_state" - whenever it is pressed. - - When a Tk widget uses commands and variables within a - namespace, these names should be wrapped up as scoped - values, as shown above. - - - variable name ?value? - Creates a variable called "name" and initializes it to an optional - value. This is normally used in conjunction with public, protected - and private commands to declare variables within a namespace: - - namespace foo { - public variable x 0 - private variable y 1 - } - - If the variable "name" already exists, it updated to have - the protection level that is currently active. - - - == Tk with Namespaces ================================================== - - bind... - - Recognizes and expands the following fields within command - strings: - - %q => Replaced with the fully-qualified access command - for the widget receiving the event. For example, - - namespace foo { - namespace bar { - button .b -text "Hello World!" - } - } - - The fully-qualified access command for this widget - is "::foo::bar::.b". The "%q" field should be used - instead of "%W" as the widget access command: - - bind Button <Key-Return> "%q flash; %q invoke" - - - %M => Replaced with the window path name of the mega-widget - containing the window receiving the event. For example, - if an "entryfield" mega-widget ".x" contains an entry - widget ".x.entry", bindings added to ".x.entry" will - replace "%M" with ".x". This allows generic bindings - to be added to component widgets which affect the - mega-widget as a whole. - - For this to work properly, mega-widget packages must - register their component widgets using Itk_SetMegaWidget(). - - - winfo command window - - Returns the fully-qualified access command for the widget "window". - This is equivalent to the "%q" field in bindings, and is useful - in procedures where the only the window name is known: - - foreach kid [winfo children $win] { - [winfo command $kid] configure -bg blue - } - - - winfo megawidget window - - Returns the window path name of the mega-widget containing "window" - as a component. This is equivalent to the "%M" field in bindings, - and is useful in procedures where only the component window name - is known. For this to work properly, mega-widget packages must - register their component widgets using Itk_SetMegaWidget(). - - - == [incr Tcl] ========================================================== - - delete class name ?name...? - - Deletes one or more object classes. Deleting a class also - causes all derived classes, and all objects belonging to the - class, to be deleted as well. - - - delete object name ?name...? - - Deletes one or more objects. If the access command for an - object resides in another namespace, then the full namespace - path should be used: - - delete object foo::bar::x - - - info classes ?pattern? - - Returns a list of all classes in the current namespace - whose names match an optional string pattern. - - - info objects ?-class className? ?-isa className? ?pattern? - - Returns a list of all objects whose names match an optional - string pattern. If the "-class" option is specified, then - the list is further restricted to those objects whose - most-specific class is "className". If the "-isa" option - is specified, then the list is further restricted to those - objects who belong to class "className". - - - itcl::class name { definition } - - Used to create define a new class "name". The "definition" - commands include: - - inherit baseClass ?baseClass...? - - constructor arglist ?init? body - destructor body - - method name ?arglist? ?body? - proc name ?arglist? ?body? - variable name ?init? ?config? - common name ?init? - - public command ?arg arg...? - protected command ?arg arg...? - private command ?arg arg...? - - Note that the constructor statement has changed to include an - optional "init" argument. This is an initialization statement - that can be used to call out base class constructors. If it - is not included, base classes are constructors are invoked - automatically without any arguments. - - The "variable" statement is now used to create object-specific - data members. The "common" statement is used to create "common" - variables, which are global within the class namespace. Both - types of variables can be designated public, protected or - private. - - - itcl::body class::func arglist body - - Used to define the body of a class member function outside of - the class definition. If "body" declarations are kept in a - separate file, they can be sourced again and again to test - changes as bugs are fixed. If an "arglist" is specified in - the class definition, then the "arglist" for the body definition - must have the same meaning. - - - itcl::configbody class::option body - - Similar to the "body" command, but used to define the configuration - code for a public variable. - - - itcl_class name { old-style-definition } \__ backward compatibility - itcl_info option ?arg arg...? / - - - == [incr Tk] =========================================================== - - itcl::class name { - ... - itk_option define -switch resName resClass initVal ?configCode? - } - - The "itk_option define" command is recognized at the level of - the class definition. It defines a new mega-widget option with - the given switch name and X11 resource database names. The - "initVal" is used as a last resort to initialize the option - if no other value can be queried from the X11 resource database. - If "configCode" is specified, it is executed whenever the option - is modified via the "configure" method. The "configCode" can - also be specified outside of the class definition via the - "itcl::configbody" command. - - - Methods provided by itk::Archetype base class: - - component - component name - component name command ?arg arg...? - - Used to query or access components within a mega-widget. With - no arguments, this returns a list of component widgets that - are accessible in the current scope. Note that component - widgets obey any public/protected/private access restriction - that is in force when the component is created. - - With one argument, this returns the window path name for a - component with the symbolic name "name". - - In any other case, the remaining arguments are invoked as a - method on the component with the symbolic name "name". - - - configure - configure option - configure option value ?-switch value...? - - Works just like the usual Tk configure method, but for mega-widgets. - Here options are really composite widget options. When set, they - trigger changes to many different internal components, and may - invoke many bits of "configCode" for options defined by "itk_option - define". However, there is only one value for the composite option. - - - cget option - - Works just like the usual Tk cget method, but for mega-widgets. - Returns the current value for a composite widget option. - - - itk_component add name {create-commands} ?{option-commands}? - - Adds a new mega-widget component with the symbolic name "name". - Invokes the "create-commands" to create the component, and - invokes "option-commands" to integrate its options into the - composite list. By default, no options are integrated. Options - may be added using the following commands: - - keep option ?option...? - ignore option ?option...? - rename oldswitch newswitch resname resclass - usual ?tag? - - - itk_component delete name ?name...? - - Deletes an existing mega-widget component with the symbolic - name "name". The component will still exist as a widget, - but it will no longer be accessible as a component for this - mega-widget. Any options associated with the component are - removed from the composite list. - - Note that you can destroy a component like any ordinary widget: - - destroy .foo.bar.b - - Components automatically detach themselves from their mega-widget - parent when destroyed, so "itk_component delete" is not used - very often. - - - itk_option add option ?option...? \__ class::option - itk_option remove option ?option...? / component.option - - Adds or removes an option from the composite option list for - a mega-widget. These commands cannot be used at the level of - the class definition; they must be invoked for a particular - mega-widget. They usually appear in the constructor for a - mega-widget class, to add or redefine options in components - created by a base class. For example, the base classes - itk::Toplevel and itk::Widget keep only the bare minimum - options for their "hull" component: -background and -cursor. - If you want your mega-widget to have a border around it, you - can add the hull options back in: - - itcl::class MyWidget { - inherit itk::Widget - - constructor {args} { - itk_option add hull.borderwidth hull.relief - } - } - - - itk_initialize ?option value option value...? - - Initializes the composite option list for a mega-widget. - This method should be invoked within the constructor for each - mega-widget class. It is usually included the end of the - constructor, below the component creation code. It integrates - all "itk_option" options defined in the current class into - the composite configuration list, and includes "-option value" - settings usually received as arguments to the constructor. - When this is executed in the most-specific class, it scans - through the composite option list and makes sure that all - options have been properly initialized. - - itk::usual tag ?commands? - - Used outside of a mega-widget class definition to declare - the "usual" option-handling commands for the mega-widget. - These commands suggest how the configuration options should - be handled if the mega-widget becomes a component of an even - larger mega-widget. They include commands like "keep" and - "rename". - - - INCOMPATIBLE CHANGES --------------------------------------------------------------------------- - - >> Object construction/destruction now follows C++ model. - - In the previous release, object construction started at the - most-specific constructor. Base class constructors could - be called out explicitly within the body of a constructor. - If they were not, they were invoked implicitly when the - constructor finished executing. This led to a construction - model that was backward from C++, and contrary to what most - people expected. Destructors were backwards in a similar - manner. - - In the current release, object construction starts at the - least-specific class in the hierarchy, and proceeds to the - most-specific class. Therefore, each base class is fully - constructed before the derived class constructor is executed. - - Arguments are now passed to base class constructors through - an optional "initialization" statement. This statement is - included between the argument list and the body of the - constructor, so the syntax is reminiscent of C++: - - class Base { - constructor {x y} { - ...constructor body... - } - } - class Derived { - inherit Base - constructor {x y z} { - Base::constructor $x $y << "initialization" - } { - ...constructor body... - } - } - - Note that variables from the argument list (e.g., $x and $y) - can be referenced within the initialization statement. With - multiple inheritance, each of the base class constructors - can be called out individually. - - Object destruction is the exact opposite of construction. - It proceeds from most-specific to least-specific class. - - - >> All class methods are now implicitly virtual - - In the previous release, all method names were interpreted - with respect to the current class scope and its base classes. - If you wanted a method to act virtual, you had to explicitly - preface it with the "virtual" command each time you used it. - This proved to be error prone. - - In the new release, all methods are virtual by default. If - you invoke a method with a simple name, the most-specific - method with that name will be invoked, regardless of your - class scope: - - class Base { - constructor {} {show} - method show {} {puts "Base::show"} - } - class Derived { - inherit Base - constructor {} {show} - method show {} {puts "Derived::show"} - } - - The method "show" called out in the constructors for both of - these classes is virtual. When Base::constructor is executed - it finds the most-specific "show" method and prints - "Derived::show". When Derived::constructor is executed, it - finds the most-specific "show" method and prints "Derived::show" - again. - - If you want to invoke a particular method, you have to scope - it explicity: - - class Base { - constructor {} {Base::show} - method show {} {puts "Base::show"} - } - class Derived { - inherit Base - constructor {} {Derived::show} - method show {} {puts "Derived::show"} - } - - - >> Within class methods/procs the "global" command now refers to - variables within the class namespace. - - In the previous release, the "global" command was used to - access variables at the global scope. The "global" command - now refers to variables that are "global" within the current - namespace context. Within the scope of a class, this refers - to "global" class variables. Note that common data members - are global variables, but they can be accessed transparently, - without any special "global" declaration. You can also create - ordinary global variables within a class, but you will have to - declare them each time they are used with a "global" statement. - The new scheme will allow classes to have their own private - global variables (e.g., for interacting with widgets) without - flooding the global namespace. - - If you really want to access a variable at the "::" global - scope, use its complete path name: - - itcl::class Foo { - method getenv {name} { - global ::env - return $env($name) - } - } - - - >> "this" variable used to be included in every class scope - - In the previous release, each class scope included a separate - "this" variable containing the object name. There is now only - one "this" variable, kept in the most-specific class scope. - It can still be referenced as if it belongs to all classes, - e.g., "Base::this", "Derived::this". - - This change is probably not important to most applications. - But it did break my test suite, which expected to find many - different "this" variables coming back from the "info" command. - - - >> "this" variable now contains complete namespace path for the - object access command - - This change will break many scripts written for mega-widgets. - In the previous release, mega-widgets had a window name and an - access command name that were interchangeable. For example, - you would create a widget ".dialog" and configure it using - the ".dialog" command. Inside of this widget there was a - "this" variable containing the name ".dialog". - - In the current release, an object can exist in any namespace, - so the complete namespace path is a part of the object's - identity. Instead of just ".dialog", the "this" variable will - now contain a name like "::.dialog" or "::foo::.dialog". But - the window name is still just ".dialog". - - Scripts that used to use "$this" as a window name: - - wm title $this "Dialog" - - must now use the [incr Tk] "hull" component instead: - - wm title $itk_component(hull) "Dialog" - - If for some other reason you need the simple object name at the - end of the namespace path, you can get at it using the - "info namespace tail" command: - - set oldthis [info namespace tail $this] - - - >> "#auto" generated names now start with lower-case letter - - In the previous release, "#auto" could be used in place of - an object name to produce an automatically generated name: - - Toaster #auto -heat light - - The names were generated by adding a unique number onto the - class name: "Toaster0", "Toaster1", etc. - - The current release supports the same functionality, except - that the names generated are guaranteed to start with a - lowercase letter: "toaster0", "toaster1", etc. This helps - out in the mega-widget arena, where window names must start - with lowercase letters. - - - >> "config" argument used to allow multiple default values - - The magic "config" argument used to allow multiple default - values, which were simply concatenated into a single value - before processing. For example, in the previous release - you could say: - - itcl_class Foo { - method test {x y {config -foo 0 -bar 0}} { - ... - } - } - - and if the "test" method was used without extra configuration - arguments, they would default to "-foo 0 -bar 0". - - In the current release, you must make the default value for - a "config" argument a single string: - - itcl::class Foo { - method test {x y {config "-foo 0 -bar 0"}} { - ... - } - } - - >> "info class" now acts "virtual" - - In the previous release, the "info class" command would report - the current class context. In a base class method, it would - report the base class name, and in a derived class method, it - would report the derived class name. If you wanted to know - the most-specific class for an object, you would have to use - the "virtual" command explicitly: - - itcl_class Base { - method whatAmI {} { - return [virtual info class] - } - } - - The "info" command is now virtual by default, as long as an - object context is present. This means that you can drop the - "virtual" command: - - itcl::class Base { - method whatAmI {} { - return [info class] - } - } - - If you really want to know the current class scope, use the - "info context" command instead to query the current namespace - context. - - If an object context is not present (i.e., in the body of a - common class "proc"), the "info class" command reverts to - the current class context, the same as the "info context" command. - - - >> Library procedures "itcl_unload" and "itcl_reload" have been removed - - In the previous release, the library procedure "itcl_unload" - provided a way of deleting a class. You can now do the same - thing using the "delete class" command: - - delete class Toaster - - This deletes the specified class, all derived classes, and all - objects belonging to this class. If autoloading is set up, - you can reload a deleted class just by invoking its name. - The old "itcl_reload" function is now trivial: - - proc itcl_reload {class} { - delete class $class - $class - } - - - >> Class definition no longer recognizes ordinary Tcl commands. - - As an undocumented "feature" of the previous release, you could - include ordinary Tcl commands in the body of your class definition. - For example: - - itcl_class Foo { - ... - if {$somevar} { - public foo - } - } - - In the new release, only class definition commands are allowed - within the body of a class definition. You can, however, use Tcl - commands outside of the class definition to modify the class - definition as a string, and then define the class: - - set defn { - method test {} {return "test"} - } - if {$somevar} { - append defn "public variable foo" - } - class Foo $defn - - - IMPROVEMENTS --------------------------------------------------------------------------- - - >> an object can be renamed by renaming its access command - - In the previous release, an object's identity was fixed when - it was created. In the new release, the object is tied - directly to its access command. If you rename the access - command, you have renamed the object. The "this" variable - automatically keeps in sync with name changes. If you delete - the access command, you automatically delete the object. - - Toaster new -heat light - rename new fred << rename Toaster - fred toast 2 - fred toast 1 - rename fred "" << delete Toaster - - - >> Bodies of methods, procs and public variables can be defined - outside of the class definition, and can be redefined on the fly. - - In the previous release, all of the code related to a class was - defined within the class definition. This kept everything - together in one place, but it made it difficult to get an overview - of the class interface. - - In the new release, bodies can be defined outside of the class - definition, perhaps in a separate file. When debugging, the - implementations can be fixed and sourced again and again, without - having to delete existing objects and classes. - - Use the "itcl::body" command to redefine the body of a class - method or proc. Use "itcl::configbody" to redefine the configuration - code associated with a public variable. For example: - - itcl::class Toaster { - constructor {args} { - eval configure $args - } - destructor { - if {$crumbs > 0} { - error "cannot destroy dirty toaster: clean first" - } - } - - method toast {nslices} - method clean {} - - public variable heat 3 - protected variable crumbs 0 - } - - itcl::body Toaster::toast {nslices} { - if {$nslices < 1 || $nslices > 2} { - error "bad number of slices: should be 1 or 2" - } - set crumbs [expr $crumbs+$heat*$nslices] - if {$crumbs >= 50} { - puts stderr "== FIRE! FIRE! ==" - } - } - - itcl::body Toaster::clean {} { - set crumbs 0 - } - - itcl::configbody Toaster::heat { - if {$heat < 1 || $heat > 5} { - error "invalid setting \"$heat\": should be 1-5" - } - } - - If an argument list is specified in the class definition, then - the same argument list must be used when the implementation is - redefined. The variable names can change, but the meaning of - the arguments must be the same. If you leave the argument - list out of the class definition, or if you include the "args" - argument, the argument list can change. - - - >> C procedures can be integrated into class definitions - - Any method body that is specified as "@symbol" is treated as a - reference to a C procedure with the symbolic name "symbol". - Symbolic names are established by registering C procedures - via the Itcl_RegisterC() procedure. This is usually done - when the interpreter starts up in the Tcl_AppInit() procedure: - - if (Itcl_RegisterC(interp, "foo", My_FooCmd) != TCL_OK) { - return TCL_ERROR; - } - - This registers a procedure My_FooCmd() with the symbolic name - "foo". It can be used as the implementation for a class method, - proc, or bit of configuration code simply by specifying "@foo" - in place of the Tcl code body. - - These C procedures are just like ordinary Tcl command handlers. - They take the usual arguments: - - int My_FooCmd(ClientData cdata, Tcl_Interp *interp, - int argc, char** argv) - { - ... - return TCL_OK; - } - - including the (argc,argv) arguments from the command line. But - before these procedures are invoked, the proper class scope is - established so that object data members can be accessed as if - they were ordinary variables via Tcl_GetVar() and Tcl_SetVar(). - - Look at the [incr Tk] base class itk::Archetype as an example - for integrating C code. - - - >> "#auto" can be buried within an object name: ".x.y.z.#auto" - - In the previous release, "#auto" was a keyword that could be - used in place of an object name. It can now be used as a - part of the object name, making it easier to generate automatic - names for mega-widgets. - - - >> Every object now has built-in "configure" and "cget" methods - that follow the Tk paradigm. For [incr Tk] widgets, they follow - the paradigm exactly. The ordinary [incr Tcl] objects, the - X11 resource values are missing. - - - >> There is no longer a built-in "delete" method, so classes can - define their own "delete" operations. - - Instead of "objName delete", use the new "delete object" command: - - Toaster fred -heat dark - delete object fred - - - >> All data members can be declared public, protected or private. - - Private data members can only be accessed in the class where - they are defined. Protected data members can be accessed in - the defining class and all derived classes. Public data members - can be accessed like protected data members, but are also - recognized as configuration options by the built-in "configure" - and "cget" methods. - - - >> In [incr Tk], options are now defined outside of the constructor, - at the level of the class definition. - - - >> In [incr Tk], configuration options belonging to components - created in a base class can be added or removed in derived - classes. - - The base classes "itk::Toplevel" and "itk::Widget" are now stripped - down to the bare minimum options. For example, if you want to add - "-width" and "-height" options for the hull component, do this using - the "itk_option" command in the body of the constructor: - - class MyWidget { - inherit itk::Widget - - constructor {args} { - itk_option add hull.widget hull.height - ... - } - } - - Options can be added and removed on-the-fly during normal operation, - but this is not recommended, since it could lead to a confusing - interface. - - - >> In [incr Tk], components can now be added or removed on-the-fly. - - The "itk_component" method now supports "add" and "delete" - operations that are used to add/delete components. - - - >> All [incr Tk] widgets can be destroyed like normal Tk widgets. - - If you destroy a component widget, for example, it will automatically - remove itself from its parent via "itk_component delete". Likewise, - when a parent widget is destroyed, it will automatically destroy - all component widgets. - - - >> In [incr Tk], the "itk::Archetype::component" method now provides - access to mega-widget components. - - In the previous [incr Tk] prototype, the "component" method had - a different syntax and only supported query operations. You can - now access an internal component via the "component" method using - its symbolic name: - - .dialog component hull configure -width 450 -height 500 - - This example accesses the "hull" component of the ".dialog" - mega-widget, and sets the width and height options. - -========================================================================== - ---------------------- RELEASE 2.0beta - 9/6/95 ------------------------ -========================================================================== - -9/8/95 (bug fix) - Fixed menus to work properly within namespaces. Menu library code - now recognizes the proper namespace context for all "-menu" options. - -9/8/95 (new feature) - Added "winfo command name" option to report the scoped access command - for a given window. - -9/8/95 (configuration changes) - - fixed "sed" invocation in iwidgets Makefile - - added configuration guesses for Tadpole Sparcbook - - added George Howlett's test for "gcc", so that "-fwritable-strings" - is added even if gcc is masquerading as "cc" - - fixed tcl/tk configure scripts to have default prefix "/usr/local/itcl" - or wherever itclsh/itkwish is installed - - fixed makefiles to use $(MAKE) instead of "make" - -9/9/95 (bug fix) - Protected references to obj->accessCmd to avoid seg faults when - an object is being destroyed. - -9/9/95 (new features) - Changed the syntax of the "namespace" command: - - namespace name ?-local? ?-hidden val? ?-enforced val? ?--? ?commands? - - Flags now follow the namespace name, and the "commands" body is - optional. The "-hidden" option allows a namespace to be hidden - during "info namespace all" queries. The "-enforced" option turns - command/variable enforcement on or off. - - Update "info namespaces all" command to allow for display of hidden - namespaces: info namespaces all ?-hidden? ?pattern? - -9/10/95 (bug fix) - Fixed "auto_mkindex" to work properly for procs defined within - namespaces. Added support for itcl::class, itcl::body and - itcl::configbody as well. Added tests for tclIndex file generation. - -9/11/95 (configuration changes) - Fixed makefiles to reference sources and libraries properly, so - it should be possible to build different object trees for - different platforms with "gmake". - -9/13/95 (configuration changes) - Added "AC_C_CROSS" to configure files, so configuration should work - properly on Solaris 2.4. - -9/13/95 (bug fix) - Changed option configuration to work synchronously, and added - "itk_initialize" command to initialize the configuration options - for each mega-widget class. The original behavior of handling - option changes via "do-when-idle" has been removed. - -9/13/95 (bug fix) - Changed all structure members called "namespace" to "namesp". - This allows the code to compile correctly under C++. - -9/13/95 (configuration changes) - - added support for "i[34]86:BSD/OS" in "config/config.guess" - - fixed "test" target for iwidgets - -9/13/95 (bug fix) - Fixed "global" command and other places where namespace paths - are parsed to allow for a single ":" in command/variable names. - -9/13/95 (bug fix) - Fixed a problem which caused class-based options to be lost when - a widget class was defined within a proc. - -9/14/95 (bug fix) - Fixed class access command so that when it is deleted, it - automatically destroys the class. This also fixed a seg fault - that occurred when an object's access command stomped on the - class access command. - -9/14/95 (enhancement) - Fixed "scope" command and the @scope facility so that null strings - can be passed around without all of the extra scoping info. - -========================================================================== - ----------------------- RELEASE 2.0b2 - 9/14/95 ------------------------ -========================================================================== - -9/15/95 (enhancement) - Changed error messages reported when a class method/proc gets the - wrong number of arguments to report the usage information, like: - {wrong # args: should be "obj foo x y ?arg arg...?"} - -9/18/95 (bug fix) - Fixed a seg fault that occurred when the "cget" method was called - with no args. - -9/18/95 (bug fix) - Fixed a bug that caused private variables in a base class to be - uninitialized, even if an initial value was specified in the - class definition. - -9/22/95 (configuration changes) - Added the "SHELL=/bin/sh" statement to the main makefile. This - fixes build problems on SGI machines. - -10/9/95 (paradigm shift) - Removed the implicit scoping from any facility that takes a command - or variable name. Implicit scoping made it difficult to pass a - command string or variable name into a wrapper proc and yet preserve - the scope that it came from. All scoping is now explicit. All - commands and variables are interpreted in the global "::" scope - unless they are wrapped in an "@scope" declaration. Commands can - be wrapped up like this: - - button .b -text "Push Me" -command [code .b configure -bg red] - - Variable names can be wrapped up like this: - - radiobutton .rb1 -text "Choice #1" -variable [scope mode] -value 1 - - The "code" and "scope" commands wrap up strings with an "@scope" - specification which preserves the namespace context. - -10/17/95 (paradigm shift) - Changed the "%C" option of the "bind" command to return a scoped - command of the form "@scope namespace widget" that can be used to - access the widget. "%C" should be used instead of the usual "%W" - window name when attempting to access the widget. Bindings should - be written like this: - - bind Entry <FocusIn> {%C configure -bg white} - bind Entry <FocusOut> {%C configure -bg gray} - - The command "%C" can be used to access the widget regardless which - namespace it belongs to. - -10/31/95 (enhancement) - Fixed "unknown" command to support a general facility for adding - unknown command handlers. The "unknown_handler" proc is used to - register new handlers. Each time an unknown command is encountered, - each of the handlers is invoked to attempt to handle the command. - If a handler returns "-code continue", control passes to the next - handler on the list. Handlers are invoked in the order opposite to - the way they were registered. Extensions can use this facility to - add their own handlers into the "unknown" scheme. - -11/7/95 (enhancement) - Added a "backward-compatibility" mode to [incr Tcl]. By default, - widget names can now be used as access commands in any namespace, - even if the widget access command exists in another namespace. - This emulates the normal Tk behavior that widgets are global resources - in the application that can be accessed anywhere. This behavior can - be disabled by setting the global variable "itcl_purist" to "1". When - this variable is set non-zero, care must be used to use "%C" or - "[winfo command %W]" as an access command when the widget is used - outside of the namespace that contains it. From the standpoint of - the object-oriented paradigm, the "purist" mode is better since it - supports encapsulation. The "backward-compatible" mode, however, - allows [incr Tcl] to work better with existing Tk applications and - extensions. - -11/22/95 (bug fix and enhancement) - Fixed the built-in "info" command for classes to include the "info - classes" and "info objects" queries. These were initially overlooked - in a hard-wired list of "info" queries. - - Fixed the ensemble facility in general to support unknown options - via an "@error" handler. Any option registered with the name "@error" - is treated as an error handler for the ensemble. Arguments passed - to the option include the ensemble name, the unknown option, and all - remaining arguments. For the built-in "info" command, the "@error" - handler passes any unknown options to the usual Tcl "info" command, - so all of the standard options are automatically available. - -11/23/95 (bug fix) - Fixed usual tkerror dialog to truncate error messages at 5 lines. - The usage information returned by an ensemble or itcl object can - be much longer, causing the "Stack Trace" button to get lost in - many cases. - -11/27/95 (bug fix) - Removed the constructor/destructor from the list of public methods - returned as usage information when an unknown method is encountered - on an object. - -12/2/95 (bug fix) - Fixed error reporting for object construction. Used to say - something like "object constructor x y z" which made it look - like a method invocation. Now says "class object x y z" which - looks more like the call that the user made to trigger the error. - -12/4/95 (bug fix) - Fixed class creation and object creation to avoid clobbering - existing commands with new class/object access commands. This - prevents all hell from breaking loose when a command like - "class set {...}" is invoked. - -12/6/95 (configuration changes) - Fixed parsing of namespace paths to use local storage instead of - assuming that strings are writable. This means that the - "-fwritable-strings" option is no longer necessary for GCC and - other compilers that store static strings in the program text - segment. This option has been removed from all "configure.in" - files. Linux users will no longer see core dumps on start-up. - -12/8/95 (bug fix) - Fixed "upvar" so that class data members can be accessed from - another calling procedure. This fixed a problem with using - "parray" from within class methods. - -12/9/95 (bug fix) - Fixed "@scope" variable references so that variables can be created - using "@scope" in any context and referenced later. - -12/9/95 (feature change) - Removed "-hidden" option from namespaces. It seemed to complicated - and quirky to explain on the man page. Instead, all parser - namespaces like "scope-parser" and "mkindex-parser" are grouped - into a "::tcl" namespace. This keeps them somewhat hidden even - without any special treatment. - -12/9/95 (minor enhancement) - Added "array" command to class definition parser, so it can be - used along with "set" to initialize common arrays. - -12/10/95 (paradigm shift) - Removed the "%C" pattern from the expansions recognized by the - "bind" command, in favor of the following scheme: - %W ........ name of widget receiving event - %M ........ name of mega-widget containing widget receiving event - %q ........ fully-qualified command name of widget receiving event - %Q ........ fully-qualified command name of mega-widget receiving event - Fixed "winfo command" to return the fully-qualified command name of - a widget (instead of a scoped access command) to be consistent with - the "%q" bind pattern. - -12/10/95 (bug fix) - Fixed Tk library code to use "%q" and "winfo command", so that the - default widget behaviors will work even in "itcl_purist" mode. - -12/11/95 (minor enhancement) - Added "winfo megawidget" query, which will return the name of the - mega-widget containing a specified component widget. In order for - this to work, a mega-widget package must use the procedure - Itcl_SetMegaWidget() to register each component as it is added - to a mega-widget. - -12/12/95 (bug fix) - Fixed Archetype base class to keep all options sorted in alphabetical - order. This way they can be reported back by the "configure" method - in alphabetical order. Options are now initialized by "itk_initialize" - in alphabetical order as well. - -12/12/95 (bug fix) - Fixed the Archetype base class to register each component widget with - Tk via Itk_SetMegaWidget(). This means that "winfo megawidget" and - "%Q" can be used to reference the containing mega-widget for any component. - -12/12/95 (bug fix) - Fixed the "configure" method in the Archetype base class so that when - an error is encountered while setting a configuration option, the option - is set back to its previous value. - -12/12/95 (bug fix) - Fixed the "itk_component add" method to find access commands for - components even if they are created in the global scope. Components - that are meant to be shared can be created using "uplevel #0". The - access command for this component will be installed in the global scope, - and therefore available to all other namespaces. - - Syntactic sugar like a "-global" option would be nice, but references - like $itk_component(...) must be substituted in the calling scope, and - it is not possible to get these properly substituted and still maintain - the boundaries around arguments. - -12/12/95 (bug fix) - Fixed Archetype base class to handle public/protected/private components - properly. The usual public/protected/private commands can be used in - conjunction with "itk_component add" to set the protection level of a - component. The protection level affects the action of the "component" - method. Public components are reported in any namespace, and are - accessible from any namespace. Protected components are accessible - within a base class and derived classes. Private components are - accessible only within the class where they are defined. This feature - can be used to keep unimportant components (such as frames) off of the - component list that a client would see. - -12/13/95 (enhancement) - Added "usual" and "ignore" commands for processing component widget - configuration options. The "usual" command finds the usual code fragment - for the widget class of the component, and executes it. The command - "itk::usual" can be used to register option code for new widget classes. - - The "ignore" command can be used to override previous "keep" and "rename" - commands. This is useful for removing options that the "usual" code - keeps or renames. - - Fixed the "itk_component add" command so that if the option handling code - is not specified, the "usual" command is invoked automatically. - -12/13/95 (bug fix) - Fixed the Archetype base class to handle the immutable Tk options - properly. Options like -class, -colormap, -screen and -visual can only - be set at creation time. The itk_option array is now properly - initialized to report their creation value. - -12/14/95 (bug fix) - Fixed "itk_option add" command to report errors properly for unknown - options. - -12/14/95 (bug fix) - Fixed "body" command to report errors properly for unknown functions. - -12/14/95 (bug fix) - Fixed a bug in the handling of TCL_GLOBAL_ONLY flag when looking up - class variables. Previously, this was ignored, so object-specific - variables could be accessed in a "global" context by Tk widgets. - This caused some strange behavior when object-specific variables - were used in conjunction with widget options like "-textvariable". - Tk widgets now properly interact with classes via global variables. - -12/14/95 (bug fix) - Fixed "auto_mkindex" to recognize procs within class definitions and - add them to the "tclIndex" file. - -12/15/95 (bug fix) - Fixed "body" command to find functions only in the specified class. - The bug caused a base class method to be redefined whenever a "body" - command was issued for a derived class if the method was not declared - in the derived class. Made a corresponding fix to the "configbody" - command for public variables. - -12/15/95 (enhancement) - Added the following commands to the class definition parser: bind, - scope and code. This allows generic class bindings to be included - in the body of a class definition. - -12/15/95 (enhancement) - Added "-clientdata" option in itk::Archetype base class so that - all widgets will have an extra field for client data. For application - developers, this may come in handy. - -12/16/95 (bug fix) - Fixed the itk::Archetype base class so that if "itk_option add" or - "itk_option remove" is called for ordinary class-based options before - "itk_initialize" (which normally integrates them in) it does not cause - a problem. - -12/17/95 (bug fix) - Fixed namespace resolution so that a command/variable with a - specific path like "itk::body" will not be found in another - imported namespace. For the import list to be followed, the - command name must be generic like "body". - -12/19/95 (configuration changes) - Changed from generic directories like "tcl" and "tk" to directory - names with version numbers like "tcl7.4" and "tk4.0". - -12/19/95 (bug fix) - Changed names like "itcl_library" and "itcl_purist" to "itcl::library" - and "itcl::purist". This makes more sense in the documentation, since - the underbar stuff is no longer needed with namespaces, and extension - writers are discouraged from using it. - -12/21/95 (bug fix) - Changed handling of argument lists for functions with Tcl or C - implementations. All argument lists are now treated as Tcl - argument specifications. For Tcl implementations, this determines - what arguments are available in the body of the procedure; for C - implementations, this merely gives the intended usage information - for the function (the C implementation may choose to ignore this - and do something else). This fix makes it easier to override - C implementations with Tcl procedure bodies. - -12/25/95 (bug fix) - Split the usual TCL_GLOBAL_ONLY flag into two meanings: TCL_GLOBAL_ONLY - now means "a global variable in the global namespace", and ITCL_GLOBAL_VAR - means "a global variable in the current namespace". This enhancement - fixes Tk (and many other extensions) which request global variables. - A plain variable name together with TCL_GLOBAL_ONLY is now interpreted - as an ordinary Tcl global variable, so the behavior is backward-compatible. - A scoped variable reference will work properly with namespaces. If - extension writers get more ambitious, they can start using the - ITCL_GLOBAL_VAR flag, which will make their extensions namespace-friendly. - -12/26/95 (bug fix) - Fixed "@scope" command so that extra arguments added at the end are - kept as proper list elements when added to the command string. This - makes sure that boundaries around Tcl words are not lost when the - scoped command is interpreted. - -12/28/95 (minor enhancement) - Added "config" method to the Archetype base class as an alias for - the usual "configure" method. Many Tk applications use "config" - as an abbreviation for "configure", so this fix improves compatibility - with other packages. - -12/28/95 (bug fix) - Fixed Itcl_SaveInterpState() and Itcl_RestoreInterpState() to - properly save/restore the interp state even for commands like - Tcl_SetCmd(), which are sloppy about setting the interpreter - result. This fixed bad memory references that were encountered - in enforced namespaces. - -12/28/95 (bug fix) - Fixed Itcl_DeleteNamesp() to allow variable traces to be fired - off properly when a namespace is destroyed. - -12/30/95 (bug fix) - Fixed the Archetype base class to do the "ignore" operation - properly for mega-widget options. A bug was causing a single - "ignore" request not only to eliminate the desired option, but - to eliminate options that were renamed to the "ignore" name - as well. - -========================================================================== - ------------------------ RELEASE 2.0 - 12/31/95 ------------------------ -========================================================================== - -1/2/96 (cleanup) - Fixed some compiler warnings reported by Christopher Hylands - (cxh@EECS.Berkeley.EDU) - -1/4/96 (cleanup) - Fixed the description of the last test in itk/tests/option.test. - -1/4/96 (cleanup) - Fixed code examples in man pages. Lines starting with "." now - start with the null character "\&", to avoid errors with troff. - -1/5/96 (bug fix) - Fixed a bug in tkMenuUnpost. Popup menus associated with something - other than a menubutton can now be unposted properly. - -1/10/96 (bug fix) - If an error occurs during construction, all destructors are now - invoked--even if an error is encountered. All destructor errors - are completely ignored. This fixed a core dump reported by - Christopher Hylands (cxh@EECS.Berkeley.EDU). - -2/5/96 (cleanup) - Fixed memory leaks reported by Forest Rouse (rouse@flash.icemcfd.com). - Also fixed a problem in Itcl_DeleteNamesp() with the way that - the variable cache was destroyed. This caused a core dump on Solaris - systems when a namespace was deleted. - -2/8/96 (cleanup) - Fixed itk tests to ignore any resources that the user might have - on the desktop (e.g., *background: red) - -2/11/96 (bug fix) - Fixed auto_mkindex so that the "proc" command accepts arglist and - body as optional arguments. Within class definitions, these - parameters may not be specified. Also, fixed the "source" command - so that it is ignored within the file being indexed. Otherwise, - it brought in program elements that confused the index. - -2/15/96 (bug fix) - Fixed the unknown command to save errorInfo and restore it before - invoking each handler. This fixed an irritating bug that caused - the first error message to be lost as "tkerror" was autoloaded. - -2/20/96 (bug fix) - Fixed a bug in variable lookup that allowed private/protected - variables to be set from outside the normal context. On initial - lookup variables were being passed over, but since they did not - appear to exist, they were being created. Variables are now - protected from being set or redeclared from an improper context. - -3/1/96 (enhancement) - Changed namespaces to import from their parent in "protected" - mode instead of "public" mode. This is a better default, since - it emphasizes the strong relationship between a parent and a - child. They can share variables that are hidden from anyone else. - -3/5/96 (bug fix) - Fixed the "info objects" to autoload any classes referenced by - "-isa" or "-class" that are not yet defined. - -3/12/96 (enhancement) - Fixed class parser to recognize commands at the global scope. - This makes it possible to embed normal Tcl commands like an - "if" statement within a class definition. It also makes it - easy to extend the class parser by defining procs in the - ::itcl::parser namespace. - -3/17/96 (enhancement) - Fixed "usual" command so that with no arguments, it returns a - list of all known tags. Each tag name can be used to query its - associated code. - -3/19/96 (enhancement) - Fixed the "configure" method for mega-widgets to include public - variables as configuration options. Normally, mega-widget - classes use "itk_option define" to define configuration options. - However, if a mega-widget includes an ordinary itcl class as - a base class, it should provide access to the base class options. - Public variables are now integrated into the composite option - list by "itk_initialize". - -4/2/96 (enhancement) - Added a "chain" command to the built-ins available in each class. - A command like "chain 1 2 3" invokes the next implementation of - the current method/proc found looking up the inheritance hierarchy - toward base classes. This can be used to invoke a base class method - in a generic way, without hard-coding the base class name. - -4/10/96 (bug fix) - Fixed "configure" operation for mega-widgets. Previously, if an - error was encountered during configuration, the value in itk_option - was set back to the previous value, but some parts of the mega-widget - might be left in a partially configured state. Now, if an error is - encountered and the option is set back to its previous value, the - change is propagated down to all parts, so the widget remains in a - consistent state. - -4/15/96 (bug fix) - Fixed a bug reported by Karel Zuiderveld (karel.zuiderveld@cv.ruu.nl) - related to virtual method selection in "itcl_methods.c". If for some - reason a method name was not found in the virtual table, the table - access caused a core dump. This is now fixed. - -5/13/96 (bug fix) - Fixed "itk_initialize" to recognize errors when executing the "config" - code associated with configuration options. Any error immediately - causes itk_initialize to abort, which usually aborts construction. - -5/13/96 (bug fix) - Fixed a bug in Itcl_SaveInterpState() and Itcl_RestoreInterpState() - which caused error information to get lost during object construction - when errors were encountered. The new iPtr->appendResult buffer was - being ignored, and results in this buffer were getting lost. - -6/1/96 (bug fix) - Changed the internal Interp and TkWindow data structures so that all - of the extra [incr Tcl] data members are at the bottom of the structure. - This should prevent errors when modules that have been compiled against - vanilla Tcl/Tk are dynamically loaded into [incr Tcl]. - -6/12/96 (enhancement) - Integrated changes for "itcl2.0+3" release by Karel Zuiderveld, - Jan Nijtmans and Vince Darley. This added support for tcl7.5/tk4.1, - dynamic loading, canvas improvements, and support for Macintosh - environments. Many thanks to these guys for all of their hard - work! - -6/22/96 (installation) - Changed the way things are installed: - - the startup file "init.itcl" is now called "itcl.tcl" - - the startup file "init.itk" is now called "itk.tcl" - - libraries, include files and man pages are now installed under - a special "itcl" directory to avoid conflicts with a vanilla - Tcl/Tk installation. For example, if your --prefix is set - to /usr/local, things would be installed as follows: - - /usr/local/bin ............ executables: - ish = tclsh with namespaces - iwish = wish with namespaces - itclwish = tclsh with namespaces and classes - itkwish = wish with namespaces and classes - - /usr/local/include/itcl ... include files - /usr/local/lib/itcl ....... libraries - /usr/local/man/itcl ....... manual pages - -6/24/96 (bug fix) - Fixed "itkwish" so that it requires the Iwidgets package automatically - during initialization. For all other shells, you must specifically - request Iwidgets with a statement like "package require Iwidgets" - -6/26/96 (bug fix) - Fixed Tk_CanvasTagsParseProc to avoid dumping core when an item - is configured with a null tag string. - -6/26/96 (bug fix) - Fixed PolygonToPoint() in tkCanvPoly.c so that invisible polygons - (with no outline and no fill) are still considered when picking - the closest item. Without this fix, programs like the "floor plan" - in the Tk widget demo will not work. - -6/26/96 (bug fix) - Fixed the [incr Widgets] "feedback" widget to do a full update on - each step. Without this, changes appear from time to time, but - the bar does not grow smoothly. - -6/26/96 (bug fix) - Fixed fileselectiondialog and fileselectionbox to update directory - list properly when "-directory" option is configured. - -6/28/96 (bug fix) - Fixed "itk_option define" to properly preserve a "config" code - body so that it can be released if it is redefined later. - -========================================================================== - ------------------------ RELEASE 2.1 - 6/28/96 ------------------------- -========================================================================== - -7/22/96 (bug fix) - Fixed C-level variable access so flags like ITCL_FIND_LOCAL_ONLY - can be passed into Tcl_GetVar() and Tcl_SetVar(). - -7/25/96 (bug fix) - Fixed the "notebook" widget in the [incr Widgets] set. The "index" - method now supports pattern matching and index names with spaces in - them. - -8/1/96 (bug fix) - Fixed destructor invocation so that if an object is being - destructed and you try to delete it again, it will report an - error. - -8/7/96 (bug fix) - Fixed the "inherit" command to make sure all names are really - valid classes. Previously, trying to inherit from a proc would - dump core. - -8/29/96 (enhancement) - Integrated with itcl2.1+2 (tcl7.5p1/tk4.1p1). - -9/1/96 (bug fix) - Fixed the Itcl_RegisterC() procedure so that the same name can be - registered more than once, as long as it has the same function - pointer. - -9/7/96 (bug fix) - Fixed a bug in method access for protected methods. There was a - problem when a base class defined a method, and a derived class - overloaded the method, and the method was accessed from the base - class namespace. Added function Itcl_CanAccessMethod() to check - for overloaded methods and allow access accordingly. - -9/13/96 (bug fix) - Fixed the Itcl_RestoreInterpState() procedure so that the "errorCode" - variable is restored properly. There was a problem when the - error code contained a list of elements. - -9/20/96 (bug fix) - Fixed a bug in the way namespaces were deleted. The hash table of - child namespaces was being traversed while elements within it were - being deleted. This caused a core dump when you tried to exit - the application with a command like "destroy .". - -9/28/96 (bug fix) - Fixed the way that errors are reported when a base class is constructed - with the wrong arguments. Previously, the error message showed the - object creation command like "wrong # args: should be Foo name val1 val2". - Now, it shows the base class constructor name, so it is more obvious - where the error is coming from. - -10/5/96 (bug fix) - Fixed a bug in constructor invocations. All base class constructors - are now invoked properly, even if a derived class does not have a - constructor. - -10/9/96 (enhancement) - Added proper support for safe interpreters. You can now use namespace - commands in a safe interpreter, and you can load Itcl as a safe package. - -10/11/96 (bug fix) - Fixed a core dump with "namespace foo {info locals}". The namespace - call frame was not being set up properly, so the local variable table - was garbage. Normally, you don't access local variables at the - namespace level. But now it is fixed. - -10/14/96 (bug fix) - Fixed the Itcl_RegisterC() procedure so that each interpreter has - its own list of symbolic function names. This avoids global data - and makes more sense for people using multiple interpreters. - -10/20/96 (bug fix) - Fixed variable lookup so that when you try to access a variable - like "::foo::x" inside of a procedure, you get an error instead - of a local variable named "::foo::x". Variables like this need - to be declared global. - -10/22/96 (enhancement) - Fixed the built-in "isa" method to autoload class definitions as - needed for each "isa" test. If a class is not defined and cannot - be autoloaded, it is an error. - -10/26/96 (enhancement) - Fixed "delete object" command so that objects can be deleted - using scoped values for the object name. - -10/29/96 (enhancement) - Integrated with itcl2.1+5 (tcl7.6/tk4.2). - -11/1/96 (porting) - Removed "plus" and "dash" patches to allow for porting to Windows95 - and Macintosh platforms. Simplified configuration and makefiles - for Unix platforms. - -11/4/96 (installation) - Fixed configuration and makefiles to support building in a - separate directory. There is a bug in "autoconf" which prevents - this from going smoothly. You have to copy all of the configure - scripts to a separate tree (e.g., using a tar file), and then build. - -11/5/96 (bug fix) - Fixed a bug in the way variables were reported by the built-in - "info" command for classes and objects. Private variables in - a base class were incorrectly reported as "<undefined>". They - are now reported properly. - -11/10/96 (bug fix) - Fixed the "this" variable so that if an object is deleted while it - is still in use, its name is properly reported as the null string. - -11/10/96 (bug fix) - Fixed the way namespaces are deleted so that the "::errorInfo" and - "::errorCode" variables remain intact until everything else has been - destroyed. These variables are needed if any errors are encountered - as an interpreter is being destroyed. - -11/11/96 (installation) - Split the "itclConfig.sh" file into separate "itclConfig.sh" and - "itkConfig.sh" files. - -11/11/96 (installation) - Fixed the package installation to conform to tcl7.6/tk4.2. The - pkgIndex.tcl files are now stored in the library directory for - each package. - -11/13/96 (enhancement) - Overhauled the scrolledcanvas widget. It is now about an order of - magnitude faster. - -11/14/96 (enhancement) - Overhauled the [incr Widgets] "catalog" demo. When you pick any - mega-widget class, the demo displays an example widget, the code - used to build it, the class hierarchy, and the man page. - -11/23/96 (bug fix) - Fixed the way the "inherit" command autoloads class definitions. - Previously, it invoked the class name as a command. Now, it uses - the "auto_load" command. - -11/23/96 (installation) - Fixed the "configure" files to use "mkinstalldirs" instead of "mkdir" - so that the entire distribution can be built in a separate directory - starting with a single "configure" file. Fixed the way the distribution - is created to make this patch for each new distribution. - -11/23/96 (installation) - Fixed the iwidgets installation so that the installed files (instead - of the source files) are chmod'd to have the proper permissions. - -11/29/96 (installation) - Fixed iwidgets (combobox, optionmenu, shell) so that they don't rely - on "tkwait visibility" before doing a grab. On the Macintosh, this - only works the first time a window is mapped. After that, this - command does not return control, even when a window is remapped. - -11/30/96 (bug fix) - Fixed "tk4.2/library/menu.tcl", moving a comment in a switch statement - above the default case into the default case. When the comment is - above the case, it is treated as a list element and a parsing error - occurs. You can trigger the error with a command like "tkMenuFind . x". - When the comment is inside the case, everything works fine. - -11/30/96 (bug fix) - Fixed a memory error that occured when an interpreter was destroyed. - One namespace (e.g., base class) caused another (e.g., derived class) - to be destroyed. Then the namespace was destroyed again later on. - Now, as we iteration through the safeCopy list, we check to make - sure the namespace still exists. - -11/30/96 (bug fix) - Fixed entryfield mega-widget to avoid using the "%s" state field - for key presses. It was using it to find out whether or not Control, - Shift, or Alt keys were being held down during a key press. But this - field confuses Alt with NumLock when you go between Unix and Windows - platforms. The entryfield appeared to be broken when NumLock was - turned on. Nothing is lost if we simply ignore it and let all - keypresses through. - -12/1/96 (installation) - Fixed the way that "pkgIndex.tcl" files are built for Itcl/Itk. - When you build with "--enable-shared", the package files load the - shared library, but when you build without, the package files - use {load "" Itcl} to get the static package. This lets you - do "package require" commands in slave interpreters, even if - things were built with static packages. - -12/1/96 (bug fix) - Fixed how namespaces are deleted when an interpreter is deleted. - Previously, namespaces were deleted after the assocData for the - interp. If any background errors occurred while the namespace - was being deleted, they caused seg faults later on. Now, the - global namespace is cleared (but not deleted) *before* deleting - the assocData. Any background errors are deleted, and the global - namespace is finally deleted at that point. - -12/2/96 (enhancement) JCI - Defined "tkOpenDocument" in tk.tcl so that Macintosh users can - double-click on an [incr Tcl] source file, and itkwish will be - invoked to execute it. - -12/2/96 (bug fix) - Fixed the entryfield widget so that characters like: " [ ] { } \ & - are substituted properly into the "%c" field when doing character - validation. - -12/2/96 (enhancement) **POTENTIAL INCOMPATIBILITY** - Changed the HTML parsing in the scrolledhtml widget to speed it up. - Also, changed the "-feedback" option so that it appends two numbers - on the end of the feedback command: the current position and the - maximum position. This frees the caller from having to figure out - the maximum position. - -12/2/96 (enhancement) - Added "-borderwidth", "-relief" and "-elementborderwidth" options - to the feedback widget, so you can control its appearance a little - better. - -========================================================================== - ------------------------ RELEASE 2.2 - 12/3/96 ------------------------- -========================================================================== - -12/12/96 (installation) - Fixed "iwidgets.tcl" initialization file to rely on the environment - variable IWIDGETS_LIBRARY (if it exists), and use the compiled-in - path as a last resort. That way, the user can override the iwidgets - library with an environment variable setting. - -12/12/96 (installation) - Fixed the "catalog" demo for [incr Widgets] to help support Windows3.1. - The code is now arranged to make it easy to translate between the - real demo names and DOS 8.3 file names. - -12/13/96 (bug fix) - Added a "usual" test for all of the [incr Widgets]. This checks to - make sure that there is a bit of "usual" code for each widget, that - the options in the "usual" code are valid, and that all of the - widgets mix together without errors. - -4/11/97 (enhancement) - Merged in patches for tcl7.6p2/tk4.2p2 (jingham) - -5/17/97 (bug fix) - Fixed itk::Toplevel to have the hull keep the -takefocus option. - This fixed a problem with the tab ring in iwidget dialogs. - -6/1/98 (complete rewrite) - Rewrote the entire package to work with Tcl8.0 namespaces and the - new byte code compiler. - -========================================================================== - ----------------------- RELEASE 3.0a1 - 6/16/98 ------------------------ -========================================================================== - -7/23/98 (bug fix) - Removed references to Tcl internal macros such as TclDecrRefCount. - This was causing problems under Windows, since those macros use - global variables that are not available outside of tcl80.dll. - -7/23/98 (bug fix) - Added my own definition of the assert macro. Since Tcl/Tk doesn't - use assert, the default version was causing build problems with - gcc. - -7/27/98 (configuration change) - Changed all "configure" scripts to rely on tclConfig.sh and tkConfig.sh - for compile options. - -7/27/98 (configuration change) - Changed the initialization process for Itcl/Itk. Both packages now - key off of tcl_library to find their initialization scripts. - -7/27/98 (configuration change) - Removed IWIDGETS_LIBRARY environment variable from the Iwidgets - package. If Iwidgets is installed properly, this variable is not - needed. - -7/29/98 (configuration change) - Added Scott Stanton's patch to the initialization process. The - last-ditch installation directory is no longer compiled into the - itcl sources. Instead, itcl searches for the installation directory - starting from $tcl_library. Also, if the variable itcl::library is - set before loading itcl, then itcl aborts the search and uses that - as its library directory. - -7/30/98 (Macintosh) - Added Jim Ingham's patches for the Mac. - -7/30/98 (configuration) - Fixed Makefiles for Iwidgets 2.2/3.0 to avoid a problem while - installing the demo images/html. The INSTALL_DATA program may - have a relative name (../../config/install-sh) so we must be - careful to "cd" into library, demos, etc., but not into other - directories below them. - -8/8/98 (bug fix) - Fixed "namespace import" to work with autoloading. If you - execute "namespace import iwidgets::*", the auto_import proc - will create stubs for all of the iwidgets commands. Executing - one of the stubs triggers autoloading for the appropriate command. - -8/10/98 (bug fix) - Integrated changes from Scriptics team to work seamlessly with - Tcl 8.0.3. - -8/10/98 (bug fix) - Fixed the iwidgets::optionmenu to work properly under Windows 95/NT. - Extended the "get" method in iwidgets3.0 so that you can query - existing elements from an optionmenu. - -========================================================================== - ------------------------ RELEASE 3.0 - 8/11/98 ------------------------- -========================================================================== - -8/16/98 (bug fix) - Fixed the windows pkgIndex.tcl files for Itcl and Itk to properly - load their .dll. Also fixed iwidgets/catalog to package require - Itcl, Itk, and to import ::itcl::* to get "class" defined. (BW) - -12/21/99 (bug fix) - Fixed tests for auto_mkindex to work properly outside of itkwish. - Tests now include "namespace import itcl::*" instead of assuming that - this behavior is built into the wish. - -4/18/00 (feature enhancement) - Fixed itcl::find to find classes and objects in *all* namespaces - in the interpreter. Until this fix, the itcl::find command would - report only the objects in the active namespace or the global - namespace. Being able to find classes/objects in all namespaces - makes debugging easier. Thanks to Chad Smith for pushing to make - this change happen. - -6/26/00 (bug fix) - Fixed Itcl_ClassVarResolver so that the formal parameters in a - method/proc take precedence over class data members. - -6/30/00 (bug fix) - Fixed all itcl/itk/iwidgets3.0.0 tests to run cleanly with the new - tcltest package. - -7/1/00 (bug fix) - Fixed "itk_component delete" so that the composite option list is - cleaned up whenever a component is deleted. For example, suppose - a component is the sole contributor of -font. When that component - is removed via "itk_component delete", the -font option goes away - as well. Also fixed the handling of the itk-delete-* binding for - the component. When the component is removed, the binding tag - is also removed by itk::remove_destroy_hook. - -7/5/00 (bug fix) - Fixed the check done during object creation to avoid clobbering - existing commands. Previously, itcl would look for any command-- - in the local *and* global namespace--that might be clobbered. - Now, it looks for commands only in the local namespace, since - those are the only ones that could truly be clobbered. - -7/5/00 (cleanup) - Removed obsolete Makefile/configure files in the various "unix" - directories. Makefiles and configure files now reside one level - above, in the standard TEA place. - -7/11/00 (stubs cleanup) <welch@ajubasolutions.com> - Fix the build so static links do not use the stubs library. - -8/1/00 (stubs cleanup) <davygrvy@ajubasolutions.com> - Added missing declarations for Itcl_InitStubs and Itk_InitStubs - and simplified how Itcl Stubs are set in Initialize() of itk_cmds.c - -8/1/00 (Makefile) <welch@ajubasolutions.com> - Added config/installFiles.tcl and changed the various Makefile.in - files to use this instead of install-sh. installFiles.tcl can - optimize out a copy if the target file is already up-to-date. - This eliminates conflicts from parallel builds on different platforms - where one build is zipping up the installed files while another platform - is copying platform-independent files (i.e., the iwidgets demos). - -8/4/00 (stubs cleanup) <davygrvy@ajubasolutions.com> - Fixed dll linkage problem with the prototypes of the 2 XX_InitStubs - functions use. I copied the core too literally. Stubs libraries are - always static, so there's no need to play games with __declspec on - windows. - -8/7/00 (stubs cleanup) <welch@ajubasolutions.com> - Cleaned up use of Itcl_InitStubs by Itk. Finally got it right after - much flailing about. itcl.h has the correct definitions, and - itclStubLib.c has the correct #ifdefs. - Also nuked extra definitions of itclStubsPtr from the itk_cmds.c file. - -8/17/00 (more stubs cleanup) <davygrvy@ajubasolutions.com> - Tcl_InitStubs in itcl/generic/itcl_cmds.c was using the TCL_VERSION macro - set by the tcl.h header. Changed it to be "8.1" instead as it doesn't - matter unless Itcl needs special/new features of the core it's header is - from. But it doesn't.. so hard code it for an 8.1 minimum to make the - Itcl library have a better version range with the core as specific - version tracking with the core isn't needed (at this time). - -========================================================================== - ------------------------ RELEASE 3.2 - 08/18/00 ------------------------ -========================================================================== - -9/22/00 (stubs cleanup) <davygrvy@ajubasolutions.com> - Itcl_InitStub prototype in itcl/generic/itcl.h was getting name mangled - by c++ compilers. Fixed with an 'extern "C"' appropriately applied. - -4/07/01 (bug fix) <davygrvy@pobox.com> - Tcl's internal header, tclInt.h, in 8.4a2 got a small change in the Command - structure that needed 2 changes in Itcl to resolve. 1) #if/#else/#endif blocks - added in itcl_class.c and itc_ensemble.c allowing Itcl to compile. 2) added - a global variable called itclCompatFlags that's sets a flag in Itcl_Init() - that will modify the logic around access to cmdPtr->flags/deleted. This - way, any core compile will yield a fully forward/backward compatible - binary (correct logic set at runtime). - -5/22/01 (bug fixes) <davygrvy@pobox.com> - makefile.vc lives again! Brought back from it's death to conquere windows - once again for users who prefer to avoid (or can't understand or get the tools - installed for) the TEA build system. - - Also, numerous fixes relating to Kevin Kenny's Tcl API mods for better CONST - support. The latest headers for Tcl where throwing warnings all over the place - about type errors. I fixed the sources, but haven't checked against older - headers yet.
\ No newline at end of file diff --git a/itcl/ChangeLog b/itcl/ChangeLog deleted file mode 100644 index c6782351a3a..00000000000 --- a/itcl/ChangeLog +++ /dev/null @@ -1,1242 +0,0 @@ -2001-09-06 David Gravereaux <davygrvy@pobox.com> - - * itcl/generic/itcl_util.c: Threading patch from "Haneef Mohammed" - <haneef@mindspringx.com>. - [Patch: 445670] - - -=[ Incr Tcl/Tk 3.2.1 tagged as done. ]=- - -2001-06-22 David Gravereaux <davygrvy@pobox.com> - - * tcl.m4: Added support for MacOS X [#435256] - - * itk/win/makefile.vc: fixed a bad macro use in the genstubs target. - - * itk/generic/itk_cmds.c: Added Itk_SafeInit(). - - * itk/generic/itk.decls: - * itk/generic/itkDecls.h: - * itk/generic/itkStubInit.c: Needed to add Itk_SafeInit() to the Stubs table. - Regen'd Stubs table. - -2001-05-28 Andreas Kupries <andreas_kupries@users.sourceforge.net> - - * itcl/Makefile.in: - * itk/Makefile.in: - * iwidgets/Makefile.in: Fixed installation of manpages, added - invocations of "basename" to create the correct paths into the - installation directories. Fixes [#427118]. - -2001-05-25 davygrvy - * ChangeLog (new): - Auto-generated this from the output of `cvs log`. This will be the - day-to-day reference of per-commits. CHANGES will now be the digest - of the data in here. Just like how Tcl does it. Information from - iwidgets was not used. - - * itk/generic/itk.h: - * itk/generic/itkStubLib.c: - * itk/generic/itk_cmds.c: - added CONST to return type for Itk_InitStubs() to match what Kevin Kenny - is doing to Tcl. Along with a little lint cleaning regarding Stubs. - - * itcl/generic/itcl.h: - * itcl/generic/itclStubLib.c: - added CONST to return type for Itcl_InitStubs() to match what - Kevin Kenny is doing to Tcl - -2001-05-24 davygrvy - * README.vc.txt: - instructions how to use makefile.vc to build the package - - * itcl/configure: - * itcl/configure.in: - * itcl/itclConfig.sh.in: - * itk/configure: - * itk/configure.in: - * itk/itkConfig.sh.in: - Bug #427113 - -2001-05-23 davygrvy - * itcl/win/makefile.vc: - added missing quotes around include paths. - - * .cvsignore: - * configure: - * configure.in: - changed configure.in to the new iwidgets subdir. Removed the older - references to iwidgets3.0.0 and iwidgets2.2.0 - - * configure: - this could be useful. - - * itcl/.cvsignore: - * itcl/configure: - * itcl/configure.in: - * itk/.cvsignore: - * itk/configure: - * itk/configure.in: - Updated patch level to 3.2.1 in prep for a release. - - * itcl/win/makefile.vc: - * itcl/win/rc/itcl.rc: - yet another rc problem repaired - - * itcl/win/makefile.vc: - rc problem repaired - -2001-05-22 davygrvy - * itcl/generic/itcl_objects.c: - * itcl/tests/interp.test: - patch #426205, self deleting class caused core dump. - - * itk/generic/itk_archetype.c: - * itk/generic/itk_cmds.c: - Fix for Tcl_GetCommandName() now returning a CONST char * - from the changes Kevin Kenny is doing to the HEAD tcl code. - This hasn't been tested with older header files, yet. - - * config.vc: - * itcl/win/makefile.vc: - * itk/win/makefile.vc: - * itk/win/rc/itk.rc: - * makefile.vc: - makefile.vc actually works again. - - * itk/win/rc/cursor00.cur: - * itk/win/rc/cursor02.cur: - * itk/win/rc/cursor04.cur: - * itk/win/rc/cursor06.cur: - * itk/win/rc/cursor08.cur: - * itk/win/rc/cursor0a.cur: - * itk/win/rc/cursor0c.cur: - * itk/win/rc/cursor0e.cur: - * itk/win/rc/cursor10.cur: - * itk/win/rc/cursor12.cur: - * itk/win/rc/cursor14.cur: - * itk/win/rc/cursor16.cur: - * itk/win/rc/cursor18.cur: - * itk/win/rc/cursor1a.cur: - * itk/win/rc/cursor1c.cur: - * itk/win/rc/cursor1e.cur: - * itk/win/rc/cursor20.cur: - * itk/win/rc/cursor22.cur: - * itk/win/rc/cursor24.cur: - * itk/win/rc/cursor26.cur: - * itk/win/rc/cursor28.cur: - * itk/win/rc/cursor2a.cur: - * itk/win/rc/cursor2c.cur: - * itk/win/rc/cursor2e.cur: - * itk/win/rc/cursor30.cur: - * itk/win/rc/cursor32.cur: - * itk/win/rc/cursor34.cur: - * itk/win/rc/cursor36.cur: - * itk/win/rc/cursor38.cur: - * itk/win/rc/cursor3a.cur: - * itk/win/rc/cursor3c.cur: - * itk/win/rc/cursor3e.cur: - * itk/win/rc/cursor40.cur: - * itk/win/rc/cursor42.cur: - * itk/win/rc/cursor44.cur: - * itk/win/rc/cursor46.cur: - * itk/win/rc/cursor48.cur: - * itk/win/rc/cursor4a.cur: - * itk/win/rc/cursor4c.cur: - * itk/win/rc/cursor4e.cur: - * itk/win/rc/cursor50.cur: - * itk/win/rc/cursor52.cur: - * itk/win/rc/cursor54.cur: - * itk/win/rc/cursor56.cur: - * itk/win/rc/cursor58.cur: - * itk/win/rc/cursor5a.cur: - * itk/win/rc/cursor5c.cur: - * itk/win/rc/cursor5e.cur: - * itk/win/rc/cursor60.cur: - * itk/win/rc/cursor62.cur: - * itk/win/rc/cursor64.cur: - * itk/win/rc/cursor66.cur: - * itk/win/rc/cursor68.cur: - * itk/win/rc/cursor6a.cur: - * itk/win/rc/cursor6c.cur: - * itk/win/rc/cursor6e.cur: - * itk/win/rc/cursor70.cur: - * itk/win/rc/cursor72.cur: - * itk/win/rc/cursor74.cur: - * itk/win/rc/cursor76.cur: - * itk/win/rc/cursor78.cur: - * itk/win/rc/cursor7a.cur: - * itk/win/rc/cursor7c.cur: - * itk/win/rc/cursor7e.cur: - * itk/win/rc/cursor80.cur: - * itk/win/rc/cursor82.cur: - * itk/win/rc/cursor84.cur: - * itk/win/rc/cursor86.cur: - * itk/win/rc/cursor88.cur: - * itk/win/rc/cursor8a.cur: - * itk/win/rc/cursor8c.cur: - * itk/win/rc/cursor8e.cur: - * itk/win/rc/cursor90.cur: - * itk/win/rc/cursor92.cur: - * itk/win/rc/cursor94.cur: - * itk/win/rc/cursor96.cur: - * itk/win/rc/cursor98.cur: - * itk/win/rc/itkwish.rc: - * itk/win/winMain.c: - Removing of old cruft. itkwishXX.exe is no longer needed as itkXX.dll is a - pure extension and loads in a vanilla wish just fine. - - * itcl/win/pkgIndex.tcl: - * itk/win/pkgIndex.tcl: - we'll auto gen these from the makefile - - * itcl/win/makefile.vc: - * itk/win/makefile.vc: - fixed include paths to make sure paths to itcl.h and itk.h in the source tree - are mentioned first to avoid a possible bug during building. - - * itcl/configure: - * itcl/configure.in: - * itk/configure: - * itk/configure.in: - patch #426203 - - * itk/win/makefile.vc: - Mostly working. Not fully tested, but lots closer. - - * itk/win/makefile.vc: - more closer, but not yet perfect. - - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_methods.c: - Fix for Tcl_GetCommandName() now returning a CONST char * - from the changes Kevein Kenny is doing to the HEAD tcl code. - This hasn't been tested with older header files, yet. - - * itk/generic/itk_cmds.c: - Removed old reference to external ItkStubs structure. - Old cruft left from before Itk_InitStubs existed. - - * itcl/win/itcl.rc: - * itcl/win/rc/itcl.rc: - moving the resource script - - * itcl/win/rc/itcl.rc: - subtle changes. - - * itcl/win/itclsh.rc: - * itcl/win/tclAppInit.c: - Removing of old cruft. itclshXX.exe is no longer needed as itclXX.dll is a - pure extension and loads in a vanilla shell just fine. - - * itcl/generic/itcl_methods.c: - * itcl/generic/itcl_util.c: - removed #include "tclCompile.h"! - It wasn't needed. Those source files made no reference to anything in it. - - * itk/win/makefile.vc: - closer to perfection. - - * itk/win/rc/itk.rc: - This is now the resource script for the dll. - - * itcl/generic/itcl_methods.c: - whoops.. doh! - - * itk/win/dllEntryPoint.c: - Stubs bug logic fix. Same as itcl/win/dllEntryPoint.c. This help build a debug - version of itcl/itk from the standard tclstubXX.lib by removing the link - requirement to msvcrt.lib which should never have been there. - - * itcl/win/makefile.vc: - adapted for new location of itcl.rc - - * itk/win/rc/itk.rc: - subtle changes to infere the correct filename and support more - complete versioning info. - - * itcl/generic/itcl.h: - * itk/generic/itk.h: - changed RESOURCE_INCLUDED to RC_INVOKED. The windows resource - compiler to preset to define this already. - - * itcl/generic/itclInt.decls: - * itcl/generic/itclIntDecls.h: - * itcl/generic/itcl_class.c: - Fix for Itcl_ClassCmdResolver() not being of type Tcl_ResolveCmdProc with - the CONST type added to param 2 in the lastest headers. I haven't tested - this with an older tcl.h yet. Hopefully, this won't get messy. - - * itcl/win/makefile.vc: - small $(RCDIR) change. - - * itcl/generic/itcl_bicmds.c: - patch #426207, contextNs ptr can be NULL in Itcl_BiInfoClassCmd - ). - -2001-05-18 andreas_kupries - * itcl/generic/itcl_class.c: - [Fix 227811] Check for any command with the given name, not only - objects. - -2001-05-17 andreas_kupries - * itcl/generic/itcl_class.c: - * itcl/generic/itcl_cmds.c: - Fixed bug 227804. - -2001-05-11 andreas_kupries - * itk/generic/itk_archetype.c: - 2001-05-11 Andreas Kupries <a.kupries@westend.com> - - * itk/generic/itk_archetype.c: Fixed bug 227876. - - * itcl/generic/itcl_objects.c: - 2001-05-11 Andreas Kupries <a.kupries@westend.com> - - * itk/generic/itk_archetype.c: Fixed bug 227824 (and several duplicates). - - * itk/generic/itk_archetype.c: - 2001-05-11 Andreas Kupries <a.kupries@westend.com> - - * itk/generic/itk_archetype.c: Fixed bug 227814 - -2001-04-25 davygrvy - * pkg.vc: - moved the info about the iwidget version for makefile.vc - -2001-04-18 davygrvy - * itcl/win/dllEntryPoint.c: - whoops... removed C++ style comment from this .c file :) - -2001-04-14 davygrvy - * itcl/library/itcl.tcl: - Patch ID #227860 - - * rules.vc: - added an $Id$ keyword - - * .cvsignore: - just testing loginfo mailing... - - * .cvsignore: - only making a change to see the history file get an entry... - -2001-04-12 davygrvy - * itcl/win/makefile.vc: - progress is happening - -2001-04-08 davygrvy - * itcl/win/.cvsignore: - * itk/win/.cvsignore: - no need to have CVS bother itself with the build directories - - * itcl/win/makefile.vc: - a large rewrite - - * makefile.vc: - todays work progress. I'm not done yet. - - * itcl/generic/itcl_ensemble.c: - * itcl/generic/itcl_util.c: - Added mutex locking around the ItclPreservedList global hash table. This - appears to be the only work needed to support multithreading. - - * config.vc: - * pkg.vc: - * rules.vc: - new build files for VC++ compiles - - * .cvsignore: - ignore MSVC++ project artifacts - -2001-04-07 davygrvy - * itcl/win/dllEntryPoint.c: - a small windows specific fix against Tcl's Stubs library. - - * itcl/generic/itclInt.h: - * itcl/generic/itclStubLib.c: - * itcl/generic/itcl_class.c: - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_ensemble.c: - 4/07/01 (bug fix) <davygrvy@pobox.com> - Tcl's internal header, tclInt.h, in 8.4a2 got a small change in the Command - structure that needed 2 changes in Itcl to resolve. 1) #if/#else/#endif blocks - added in itcl_class.c and itc_ensemble.c allowing Itcl to compile. 2) added - a global variable called itclCompatFlags that's sets a flag in Itcl_Init() - that will modify the logic around access to cmdPtr->flags/deleted. This - way, any core compile will yeild a fully forward/backward compatible - binary (correct logic set at runtime). - -2000-12-21 smithc - * itk/win/makefile.vc: - Patch #102914. - -2000-12-12 smithc - * itcl/generic/itcl_ensemble.c: - Patch #102774 - - * itcl/generic/itcl_class.c: - Patch #100274 - -2000-09-23 davidg - * CHANGES: - added a note about the 3.2 release - - * itcl/generic/itcl.h: - 9/22/00 (stubs cleanup) <davygrvy@ajubasolutions.com> - Itcl_InitStub prototype in itcl/generic/itcl.h was getting name mangled - by c++ compilers. Fixed with an 'extern "C"' appropriately applied. - -2000-08-18 davidg - * itcl/generic/itcl_cmds.c: - Tcl_InitStubs was using the TCL_VERSION macro set by the tcl.h header. - Changed it to be "8.1" instead as it doesn't matter unless Itcl needs - special/new features of the core it's header is from. But it doesn't.. so hard - code it for an 8.1 minimum. - -2000-08-07 welch - * itcl/Makefile.in: - * itcl/generic/itcl.h: - * itcl/generic/itclStubLib.c: - Final iteration, really, on getting Itcl_StubInit correctly set - up. - - * itk/generic/itk_cmds.c: - Removed redundant definitions of itclStubsPtr and - itclIntStubsPtr. - - * itcl/Makefile.in: - Added Itcl_InitStubs to the main Itcl library as well as the stubs - library for those applications (like Itk) that call Itcl_InitStub - but are linked against the main library. - - * CHANGES: - * CHANGES: - *** empty log message *** - -2000-08-04 davidg - * itcl/generic/itcl.decls: - * itcl/generic/itclDecls.h: - * itcl/generic/itclIntDecls.h: - * itcl/generic/itclStubInit.c: - * itk/generic/itk.decls: - * itk/generic/itkDecls.h: - * itk/generic/itkStubInit.c: - * itk/generic/itkStubLib.c: - added missing RCS $Id$ strings - - * itcl/generic/itcl.h: - * itcl/generic/itclStubLib.c: - * itk/generic/itk.h: - * itk/generic/itkStubLib.c: - yanked ugly linkage cruft from the StubLib functions. It's - always static. - -2000-08-02 davidg - * itk/generic/itk_cmds.c: - simplified how Itcl Stubs are set - - * itcl/generic/itcl.h: - * itk/generic/itk.h: - added missing Itcl_InitStubs and Itk_InitStubs declarations. - -2000-08-02 welch - * itk/generic/itkStubLib.c: - Fixed this new function - - * itcl/Makefile.in: - * itk/Makefile.in: - Changed this to use installFiles.tcl instead of install-sh - - * itcl/generic/itclStubLib.c: - Fix for new Itcl_InitStubs.c - - * config/installFile.tcl: - Added a Tcl version of install-sh that avoids copying a file if - the target has the same size and date stamp as the source file already. - This helps parallel builds on different platforms avoid changing - files out from one another. - - * CHANGES: - *** empty log message *** - -2000-07-29 welch - * itcl/configure: - * itk/configure: - Ran autoconf - - * tcl.m4: - Fixed this with respect to recent changes in windows def of TCL_SRC_DIR - -2000-07-23 wart - * itcl/Makefile.in: - * itk/Makefile.in: - Use INSTALL_PROGRAM instead of INSTALL_DATA to install libraries so - they get execute permission on HPUX - -2000-07-14 welch - * itcl/configure: - * itk/configure: - Updated configure - - * config/install-sh: - Nuked debug echo statement - -2000-07-12 welch - * config/install-sh: - Added -f to MV command - - * CHANGES: - * Makefile.in: - Added some feedback to the top-level makefile loops - - * itcl/configure.in: - * itk/Makefile.in: - * itk/configure.in: - Disable stubs in the case of static builds. - -2000-07-07 csmith - * itcl/tests/info.test: - patch submitted by David Cuthbert, 7/7/00 - - * itcl/generic/itcl_bicmds.c: - patch submitted by David Cuthbert, 7/7/00 to fix segfault caused by the - following code: - - itcl::class X { } - namespace eval X { info class } - -2000-07-06 mmc - * Makefile.in: - * README: - - Touched up README for itcl3.2 release. Fixed master Makefile to - avoid testing iwidgets2.2.0, which is an older release provided - only for backward-compatibility. Bug fixes and improvements are - made and tested in the newer iwidgets3.0.0 release. - - * CHANGES: - * itcl/generic/itcl.h: - * itcl/generic/itcl_class.c: - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_objects.c: - * itcl/tests/all: - * itcl/tests/all.tcl: - * itcl/tests/basic.test: - * itcl/tests/defs: - * itcl/tests/inherit.test: - * itcl/tests/methods.test: - * itcl/tests/namespace.test: - * itcl/unix/Makefile.in: - * itcl/unix/configure.in: - * itcl/unix/itclConfig.sh.in: - * itcl/unix/pkgIndex.tcl.in: - * itcl/unix/test.tcl: - * itk/Makefile.in: - * itk/generic/itk_archetype.c: - * itk/library/itk.tcl: - * itk/tests/all: - * itk/tests/all.tcl: - * itk/tests/defs: - * itk/tests/widget.test: - * itk/unix/Makefile.in: - * itk/unix/configure.in: - * itk/unix/itkConfig.sh: - * itk/unix/itkConfig.sh.in: - * itk/unix/pkgIndex.tcl.in: - - 6/26/00 (bug fix) - Fixed Itcl_ClassVarResolver so that the formal parameters in a - method/proc take precedence over class data members. - - 6/30/00 (bug fix) - Fixed all itcl/itk/iwidgets3.0.0 tests to run cleanly with the new - tcltest package. - - 7/1/00 (bug fix) - Fixed "itk_component delete" so that the composite option list is - cleaned up whenever a component is deleted. For example, suppose - a component is the sole contributor of -font. When that component - is removed via "itk_component delete", the -font option goes away - as well. Also fixed the handling of the itk-delete-* binding for - the component. When the component is removed, the binding tag - is also removed by itk::remove_destroy_hook. - - 7/5/00 (bug fix) - Fixed the check done during object creation to avoid clobbering - existing commands. Previously, itcl would look for any command-- - in the local *and* global namespace--that might be clobbered. - Now, it looks for commands only in the local namespace, since - those are the only ones that could truly be clobbered. - - 7/5/00 (cleanup) - Removed obsolete Makefile/configure files in the various "unix" - directories. Makefiles and configure files now reside one level - above, in the standard TEA place. - -2000-06-22 wart - * itcl/Makefile.in: - Added itclDecls.h to list of header files to install. - -2000-06-22 welch - * itk/Makefile.in: - Installing stub table tkDecls.h - - * itcl/Makefile.in: - Installing all header files, not just public ones. - -2000-06-16 matt - * itcl/generic/itcl_util.c: - Moved #ifndef NDEBUG inside Itcl_Assert routine otherwise it may not get inclued - BUT it is specified in the Stubs Table..... - -2000-06-06 wart - * itk/tests/all.tcl: - Added missing file for running test suite. - - * itcl/tests/all.tcl: - Added missing file for running test suite - -2000-06-01 wart - * itcl/Makefile.in: - * itcl/tests/basic.test: - * itcl/tests/body.test: - * itcl/tests/chain.test: - * itcl/tests/delete.test: - * itcl/tests/ensemble.test: - * itcl/tests/import.test: - * itcl/tests/info.test: - * itcl/tests/inherit.test: - * itcl/tests/interp.test: - * itcl/tests/local.test: - * itcl/tests/methods.test: - * itcl/tests/mkindex.test: - * itcl/tests/namespace.test: - * itcl/tests/protection.test: - * itcl/tests/scope.test: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - * itk/tests/interp.test: - * itk/tests/option.test: - * itk/tests/privacy.test: - * itk/tests/public.test: - * itk/tests/toplevel.test: - * itk/tests/widget.test: - Tests modified to work with TEA Makefile. - -2000-04-19 mmc - * CHANGES: - * itcl/Makefile.in: - * itcl/configure: - * itcl/configure.in: - * itcl/doc/find.n: - * itcl/generic/itcl.h: - * itcl/generic/itcl_cmds.c: - * itcl/tests/basic.test: - * itcl/tests/body.test: - * itcl/tests/chain.test: - * itcl/tests/defs: - * itcl/tests/delete.test: - * itcl/tests/ensemble.test: - * itcl/tests/info.test: - * itcl/tests/inherit.test: - * itcl/tests/local.test: - * itcl/tests/methods.test: - * itcl/tests/mkindex.itcl: - * itcl/tests/namespace.test: - * itcl/tests/protection.test: - * itcl/tests/scope.test: - * itcl/tests/tclIndex: - * itcl/unix/configure.in: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - * itk/tests/defs: - * itk/tests/option.test: - * itk/tests/widget.test: - * license.terms: - - - fixed itcl::find to find classes/objects in *all* namespaces - - fixed tests to run cleanly - -2000-03-28 csmith - * itcl/generic/itcl_cmds.c: - Patch for Ticket 4111, submitted by David Cuthbert: - - *** itcl3.1.0/itcl/generic/itcl_cmds.c.orig Tue Feb 1 16:37:53 2000 - --- itcl3.1.0/itcl/generic/itcl_cmds.c.new Tue Feb 1 - 16:38:06 2000 - *************** - *** 94,100 **** - static char safeInitScript[] = - "proc ::itcl::local {class name args} {\n\ - ! set ptr [uplevel eval [list $class $name] $args]\n\ - uplevel [list set itcl-local-$ptr $ptr]\n\ - set cmd [uplevel namespace which -command $ptr]\n\ - uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n\ - - --- 94,100 ---- - static char safeInitScript[] = - "proc ::itcl::local {class name args} {\n\ - ! set ptr [uplevel [list $class $name] $args]\n\ - uplevel [list set itcl-local-$ptr $ptr]\n\ - set cmd [uplevel namespace which -command $ptr]\n\ - uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n\ - - * itcl/library/itcl.tcl: - Patch for ticket 4111, submitted by David Cuthbert: - - *** itcl3.1.0/itcl/library/itcl.tcl.orig Tue Feb 1 16:38:24 2000 - --- itcl3.1.0/itcl/library/itcl.tcl.new Tue Feb 1 16:38:30 2000 - *************** - *** 27,33 **** - # alive until a procedure exits. - # ---------------------------------------------------------------------- - proc ::itcl::local {class name args} { - ! set ptr [uplevel eval [list $class $name] $args] - uplevel [list set itcl-local-$ptr $ptr] - set cmd [uplevel namespace which -command $ptr] - uplevel [list trace variable itcl-local-$ptr u \ - - --- 27,33 ---- - # alive until a procedure exits. - # ---------------------------------------------------------------------- - proc ::itcl::local {class name args} { - ! set ptr [uplevel [list $class $name] $args] - uplevel [list set itcl-local-$ptr $ptr] - set cmd [uplevel namespace which -command $ptr] - uplevel [list trace variable itcl-local-$ptr u \ - -2000-03-20 wart - * itk/configure: - * itk/configure.in: - Fixed typo in variable name - -2000-03-17 wart - * itcl/Makefile.in: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - Added TCL_EXTRA_CFLAGS to compile line to fix build problems on Irix - -2000-02-04 wart - * itk/configure: - * itk/configure.in: - Fixed typo that was causing builds on CYGWIN_NT platforms not to pick up - the Tcl stub library (TCL_STUB_LIB_SPEC was not being substituted in the - Makefile) - -2000-01-28 wart - * itcl/configure: - * itcl/configure.in: - * itk/configure: - * itk/configure.in: - Fixed a few more places where the configure wasn't checking for cygwin on - Windows 95/98 - -2000-01-24 wart - * itcl/configure: - * itk/configure: - Regenerated configure scripts to pick up changes to tcl.m4 - - * itcl/configure: - * itk/configure: - Regenerated configure scripts to pick up recent changes to tcl.m4 - - * tcl.m4: - * tcl.m4: - Updated to reflect recent TEA changes - -2000-01-18 wart - * tcl.m4: - Updated to reflect recent TEA changes - -2000-01-03 csmith - * itcl/unix/Makefile.in: - Patch submitted by Mo Dejong needed so Itcl will link to the Tcl libs - when Tcl is compiled with debugging on. - - * itcl/generic/itcl_parse.c: - Patch by Mo Dejong to fix a Windows NT/95 crashing problem where you can - build with debugging on, load the Itcl package, and press the X in the - upper right corner. Note that I'm unable to test this on Windows and - that this patch introduces a compiler warning. - - * itcl/generic/itcl_parse.c: - Duuuuhhhh.... - - This is the patch from Mo Dejong regarding the Windows NT/95 crashing - problem. My previous checkin of itcl_parse.c did not include all of - the patch - got in a hurry. Disregard the compiler warning mentioned - in my previous checkin. - - * itcl/tests/defs: - Patch submitted by Mo Dejong: needed to add "-force" option to the - namespace import command so fix a bug with 'make test'. - - * itcl/generic/itcl_parse.c: - *** empty log message *** - -1999-11-24 wart - * itcl/configure: - * itk/configure: - regenerated configure scripts to pick up tcl.m4 changes - - * itcl/configure: - * itk/configure: - * tcl.m4: - tcl.m4: Updated to reflect recent TEA changes - - */configure: Regnereated with new tcl.m4 - - iwidgets2.2.0/Makefile.in: Don't copy nonexistent files - - * tcl.m4: - Updated to reflect recent TEA changes - -1999-09-21 wart - * itk/Makefile.in: - Itk now installs appropriate library files. - -1999-09-20 wart - * itcl/configure: - * itcl/configure.in: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - pkgIndex on Windows now looks in the correct directory for the - .dll files. - -1999-09-17 wart - * tcl.m4: - Updated to reflect recent changes - -1999-09-15 wart - * itcl/configure: - * itcl/configure.in: - * itcl/pkgIndex.tcl.in: - * itk/configure: - * itk/configure.in: - * itk/pkgIndex.tcl.in: - Better pkgIndex.tcl files that should now work on solaris. - -1999-09-14 wart - * itcl/Makefile.in: - * itcl/configure: - * itcl/configure.in: - * itcl/mkIndex.tcl.in: - * itcl/pkgIndex.tcl.in: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - * itk/mkIndex.tcl.in: - * itk/pkgIndex.tcl.in: - Fixed installation of pkgIndex.tcl file. We have to install a pre-made - pkgIndex.tcl file since pkg_mkIndex can't seem to make a usable one. - -1999-09-10 wart - * itk/Makefile.in: - Fixed bug when calling mkIndex.tcl for itk - - reduced amount of output from "make install" in iwidgets - - * itcl/Makefile.in: - * itk/Makefile.in: - Removed Makefiles rules to regenerate the configure scripts. This was - causing problems when building on Windows and Unix simultaneoulsy. - -1999-09-09 wart - * itcl/configure: - * itcl/configure.in: - * itk/configure: - * itk/configure.in: - configure scripts now look for tclsh82d.exe executable when searching - for valid tcl interpreter. - - * Makefile.in: - Added pkgIndex files for Iwidgets - - Top level Makefile should no longer loop endlessly if the configure went bad. - - * itcl/configure: - * itcl/configure.in: - * itk/configure: - * itk/configure.in: - * tcl.m4: - Look for tclsh82d.exe before tclsh82.exe. - - configure scripts for itcl and itk now use the tcl.m4 macro SC_PROG_TCLSH. - -1999-09-07 wart - * itcl/Makefile.in: - * itcl/configure: - * itcl/configure.in: - * itk/Makefile.in: - * itk/configure: - * itk/configure.in: - configure now searches for tclsh82 shell in exec-prefix, then prefix, then - relative to tclConfig.sh, then in the users path. - -1999-09-04 wart - * configure.in: - * itcl/Makefile.in: - * itcl/aclocal.m4: - * itcl/configure: - * itcl/configure.in: - * itcl/mkIndex.tcl.in: - * itk/Makefile.in: - * itk/aclocal.m4: - * itk/configure: - * itk/configure.in: - * itk/mkIndex.tcl.in: - * tcl.m4: - TEA changes. Itcl now uses the same Makefiles and configure scripts for - both Windows and Unix. - - Note that static shells are not yet done in this TEA implementation. - - * itcl/Makefile.in: - * itk/Makefile.in: - Temporarily removed pkg_mkIndex step from Makefile since it causes a - crash on Windows. - -1999-08-21 matt - * itcl/unix/Makefile.in: - Fixed mismatch between configure script and makefile for stub - enabled builds - - * itk/unix/Makefile.in: - Fixed mismatch between conifgure script and Makefile for stub - enabled builds. - -1999-06-28 hershey - * itk/unix/configure.in: - * itk/unix/itkConfig.sh: - remove version number from comments - -1999-06-26 wart - * itcl/mac/itclMacLibrary.r: - * itcl/mac/pkgIndex.tcl: - * itcl/unix/configure.in: - * itk/mac/itkMacLibrary.r: - * itk/mac/pkgIndex.tcl: - * itk/unix/configure.in: - * itk/win/pkgIndex.tcl: - Version numbers changed from 3.0.1 to 3.1.0 - -1999-05-25 redman - * itcl/generic/itcl.h: - * itcl/win/makefile.vc: - * itk/win/makefile.vc: - * itk/win/winMain.c: - * makefile.vc: - Fixed the use of Tcl & Tk stubs on Windows. - - Now the extra shells (itclsh31.exe and itkwish31.exe) are being - created and run properly. - - * itcl/generic/itcl_cmds.c: - * itcl/unix/Makefile.in: - * itcl/unix/configure.in: - * itcl/unix/itclConfig.sh.in: - * itk/generic/itk_cmds.c: - * itk/unix/Makefile.in: - * itk/unix/configure.in: - * itk/unix/itkConfig.sh: - * itk/unix/itkConfig.sh.in: - Fix the makefile and configure files, etc., for Unix - in order to compile with Tcl/Tk 8.1 with stubs. - - Builds itclsh and itkwish properly. - -1999-05-24 redman - * itcl/generic/itcl.decls: - * itcl/generic/itcl.h: - * itcl/generic/itclDecls.h: - * itcl/generic/itclInt.decls: - * itcl/generic/itclInt.h: - * itcl/generic/itclIntDecls.h: - * itcl/generic/itclStubInit.c: - * itcl/generic/itclStubLib.c: - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_ensemble.c: - * itcl/tests/defs: - * itcl/tests/tclIndex: - * itcl/win/itcl.rc: - * itcl/win/makefile.vc: - * itcl/win/pkgIndex.tcl: - * itk/generic/itk.decls: - * itk/generic/itk.h: - * itk/generic/itkDecls.h: - * itk/generic/itkStubInit.c: - * itk/generic/itkStubLib.c: - * itk/generic/itk_cmds.c: - * itk/win/makefile.vc: - * itk/win/rc/itk.rc: - * makefile.vc: - Applied patches from David Gravereaux to update Itcl and Itk to - use Tcl/Tk 8.1 stubs and provide it's own stubs interface, on - Windows only. - - Changes have not been made to support I18N (if needed) or MT-safety. - - Version number has been changed to 3.1.0 (from 3.0.1) by - David to coincide with the shift to Tcl/Tk 8.1. - - Building of itclsh31.exe and iwish31.exe have been disabled - until someone else makes them work properly. Test suites - have been modified to work with tclsh81.exe instead. - -1999-02-05 stanton - * itk/unix/itkConfig.sh: - updated version to itcl3.0.1 - -1999-01-15 rjohnson - * itcl/tests/mkindex.itcl: - - Fixed typo in tcl file. - -1998-10-29 stanton - * itcl/doc/itcl_info.n: - Cleaned up some out of date references to 2.2 syntax. - -1998-09-14 stanton - * itk/win/rc/cursor00.cur: - * itk/win/rc/cursor02.cur: - * itk/win/rc/cursor04.cur: - * itk/win/rc/cursor06.cur: - * itk/win/rc/cursor08.cur: - * itk/win/rc/cursor0a.cur: - * itk/win/rc/cursor0c.cur: - * itk/win/rc/cursor0e.cur: - * itk/win/rc/cursor10.cur: - * itk/win/rc/cursor12.cur: - * itk/win/rc/cursor14.cur: - * itk/win/rc/cursor16.cur: - * itk/win/rc/cursor18.cur: - * itk/win/rc/cursor1a.cur: - * itk/win/rc/cursor1c.cur: - * itk/win/rc/cursor1e.cur: - * itk/win/rc/cursor20.cur: - * itk/win/rc/cursor22.cur: - * itk/win/rc/cursor24.cur: - * itk/win/rc/cursor26.cur: - * itk/win/rc/cursor28.cur: - * itk/win/rc/cursor2a.cur: - * itk/win/rc/cursor2c.cur: - * itk/win/rc/cursor2e.cur: - * itk/win/rc/cursor30.cur: - * itk/win/rc/cursor32.cur: - * itk/win/rc/cursor34.cur: - * itk/win/rc/cursor36.cur: - * itk/win/rc/cursor38.cur: - * itk/win/rc/cursor3a.cur: - * itk/win/rc/cursor3c.cur: - * itk/win/rc/cursor3e.cur: - * itk/win/rc/cursor40.cur: - * itk/win/rc/cursor42.cur: - * itk/win/rc/cursor44.cur: - * itk/win/rc/cursor46.cur: - * itk/win/rc/cursor48.cur: - * itk/win/rc/cursor4a.cur: - * itk/win/rc/cursor4c.cur: - * itk/win/rc/cursor4e.cur: - * itk/win/rc/cursor50.cur: - * itk/win/rc/cursor52.cur: - * itk/win/rc/cursor54.cur: - * itk/win/rc/cursor56.cur: - * itk/win/rc/cursor58.cur: - * itk/win/rc/cursor5a.cur: - * itk/win/rc/cursor5c.cur: - * itk/win/rc/cursor5e.cur: - * itk/win/rc/cursor60.cur: - * itk/win/rc/cursor62.cur: - * itk/win/rc/cursor64.cur: - * itk/win/rc/cursor66.cur: - * itk/win/rc/cursor68.cur: - * itk/win/rc/cursor6a.cur: - * itk/win/rc/cursor6c.cur: - * itk/win/rc/cursor6e.cur: - * itk/win/rc/cursor70.cur: - * itk/win/rc/cursor72.cur: - * itk/win/rc/cursor74.cur: - * itk/win/rc/cursor76.cur: - * itk/win/rc/cursor78.cur: - * itk/win/rc/cursor7a.cur: - * itk/win/rc/cursor7c.cur: - * itk/win/rc/cursor7e.cur: - * itk/win/rc/cursor80.cur: - * itk/win/rc/cursor82.cur: - * itk/win/rc/cursor84.cur: - * itk/win/rc/cursor86.cur: - * itk/win/rc/cursor88.cur: - * itk/win/rc/cursor8a.cur: - * itk/win/rc/cursor8c.cur: - * itk/win/rc/cursor8e.cur: - * itk/win/rc/cursor90.cur: - * itk/win/rc/cursor92.cur: - * itk/win/rc/cursor94.cur: - * itk/win/rc/cursor96.cur: - * itk/win/rc/cursor98.cur: - * itk/win/rc/itk.ico: - Fixed binary files - -1998-09-08 stanton - * CHANGES: - *** empty log message *** - -1998-09-03 stanton - * CHANGES: - * README: - more changes - - * CHANGES: - * Makefile.in: - changes - - * Makefile.in: - * Makefile.in: - * Makefile.in: - * Makefile.in: - * Makefile.in: - * Makefile.in: - * Makefile.in: - *** empty log message *** - - * Makefile.in: - nothing - - * CHANGES: - * Makefile.in: - changed back - -1998-08-23 stanton - * itcl/doc/scope.n: - fixed section - -1998-08-20 welch - * itcl/generic/itcl.h: - Patchlevel 3.0.1 - -1998-08-18 welch - * itk/win/pkgIndex.tcl: - Fixed loading .dll - - * itcl/win/pkgIndex.tcl: - fixed loading .dll - - * CHANGES: - *** empty log message *** - -1998-08-18 suresh - * itk/generic/itk_cmds.c: - Removed pedantic check for existance of "::itk" namespace. Changed code to - conditionally create the "::itk" namespace based on whether it already exists - or not. These changes were necessary to facilitate the wrapper dictating - where the [incr Tk] libraries are stored in a wrapped application via the - variable '::itk::library". - -1998-08-12 welch - * itk/win/makefile.bc: - * itk/win/makefile.vc: - Fixes for tkConsole - -1998-08-11 welch - * CHANGES: - * README: - * itcl/doc/class.n: - * itcl/doc/scope.n: - * itcl/generic/itcl.h: - * itcl/generic/itclInt.h: - * itcl/generic/itcl_bicmds.c: - * itcl/generic/itcl_class.c: - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_methods.c: - * itcl/generic/itcl_objects.c: - * itcl/library/itcl.tcl: - * itcl/mac/itclMacApplication.r: - * itcl/mac/itclMacLibrary.r: - * itcl/mac/itclMacResource.r: - * itcl/mac/pkgIndex.tcl: - * itcl/mac/tclMacAppInit.c: - * itcl/tests/info.test: - * itcl/unix/Makefile.in: - * itcl/unix/configure.in: - * itcl/unix/tclAppInit.c: - * itcl/win/itcl.rc: - * itcl/win/itclsh.rc: - * itcl/win/makefile.vc: - * itcl/win/pkgIndex.tcl: - * itcl/win/tclAppInit.c: - * itk/doc/Toplevel.n: - * itk/generic/itk.h: - * itk/generic/itk_cmds.c: - * itk/mac/MW_ItkHeader.pch: - * itk/mac/itkMacApplication.r: - * itk/mac/itkMacLibrary.r: - * itk/mac/itkMacResource.r: - * itk/mac/pkgIndex.tcl: - * itk/mac/tclIndex: - * itk/mac/tkMacAppInit.c: - * itk/unix/Makefile.in: - * itk/unix/configure.in: - * itk/unix/tkAppInit.c: - * itk/win/makefile.vc: - * itk/win/pkgIndex.tcl: - * itk/win/rc/itk.rc: - * itk/win/rc/itkwish.rc: - * itk/win/winMain.c: - * makefile.vc: - 3.0 final from Michael - -1998-08-07 stanton - * itcl/generic/itcl_methods.c: - changed to reflect new CompiledLocal structure - changed to reflect changes in resolver api - changed to use TclInitCompiledLocals interface - - * itcl/generic/itclInt.h: - changed to reflect new resolver api - - * itcl/generic/itcl_bicmds.c: - * itcl/generic/itcl_ensemble.c: - changed to reflect new CompiledLocal structure - - * itcl/generic/itcl_class.c: - changed to reflect changes in resolver api - - * itcl/doc/scope.n: - fixed section name - - * itcl/doc/scope.n: - *** empty log message *** - - * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_util.c: - * itk/doc/Toplevel.n: - lint - -1998-08-04 escoffon - * itcl/generic/itcl.h: - * itcl/generic/itclInt.h: - * itk/generic/itk.h: - EXPORT is now TCL_STORAGE_CLASS - -1998-07-29 escoffon - * itcl/generic/itcl.h: - added setting of EXPORT to DLLEXPORT if we are building the - itcl lib. - - * itk/generic/itk.h: - - dropped the EXPORT macro, it is now part of EXTERN - - added setting of EXPORT to DLLEXPORT if we are building the itk lib. - - * itcl/generic/itclInt.h: - - added setting of EXPORT to DLLEXPORT if we are building the itcl lib. - - use EXTERN instead of extern for Itcl_Assert - -1998-07-28 stanton - * itcl/generic/itcl_cmds.c: - * itk/generic/itk_cmds.c: - changed search order - diff --git a/itcl/INCOMPATIBLE b/itcl/INCOMPATIBLE deleted file mode 100644 index b0e2bd15d3a..00000000000 --- a/itcl/INCOMPATIBLE +++ /dev/null @@ -1,102 +0,0 @@ - -As much as possible, I've tried to make itcl3.0 backward-compatible -with earlier releases. The class definition syntax has not changed -at all from itcl2.2, and the old itcl1.x syntax is still supported. -But you'll notice changes related to namespaces. John Ousterhout -adopted a slightly different namespace model for Tcl8. The syntax -of the "namespace" command is different, as well as the semantics -for command/variable lookups and imports. Also, John Ousterhout -failed to adopt ensembles into the Tcl core, so itcl can't add -functions like "info objects" and "info classes" into the usual "info" -command. These functions have been moved to a new "itcl::find" command. - -The [incr Widgets] package has changed quite a bit. There are many -new widgets, and some of the existing widgets were streamlined--some -of the widget options were removed to improve performance. For details, -see the "CHANGES" file in the iwidgets3.0.0 directory. Because there -are a lot of changes, this distribution contains the iwidgets2.2.0 -package, which is backward-compatible with the existing [incr Widgets]. - -Following is a quick summary of changes, to serve as a porting guide. - - -----------------------------------|------------------------------------- - You have code like this... | change to this... -----------------------------------|------------------------------------- - namespace foo {...} | namespace eval foo {...} - | - delete namespace foo | namespace delete foo - | - info which -namespace $name | if {![string match ::* $name]} { - | set name [namespace current]::$name - | } - | - info context | namespace current - | - info objects ... | itcl::find objects ... - | - info classes ... | itcl::find classes ... - | - In itcl2.2, commands/classes | In Tcl8.0, all commands/classes that - could be found in any namespace | are not in the global namespace must - in a hierarchy. So within a | be qualified. For example, the - namespace like "iwidgets" you | "iwidgets" namespace has a bunch of - could use simple names like: | classes within it. You must always - | refer to these classes with qualified - | names, like this: - | - Labeledwidget::alignlabels ... | iwidgets::Labeledwidget::alignlabels ... - Pane #auto | iwidgets::Pane #auto - | - | - In itcl2.2, the "global" | In Tcl8.0, the "variable" command is - command was used to access | used to access variables in a namespace: - variables in a namespace: | - | - namespace foo { | namespace eval foo { - variable x 0 | variable x 0 - proc example {} { | proc example {} { - global x | variable x - return $x | return $x - } | } - } | } - | - | - public itk_component add... | itk_component add ... - protected itk_component add... | itk_component add -protected ... - private itk_component add... | itk_component add -private ... - | - | - - OTHER DIFFERENCES ------------------------------------------------------------------------- -- You can now use instance variables (along with the usual common - variables) with the "scope" command. Thus, you're no longer forced - to use the trick with a common array like: [scope modes($this)] - -- All widget/mega-widget access commands (e.g., ".foo.bar") are - installed in the global namespace. Therefore, they can be accessed - from any namespace context. - -- The [incr Widgets] package used to be loaded by default. You must - now use the "package require" command to load it explicitly: - - package require Iwidgets <-- loads the lastest (iwidgets3.0.0) - package require -exact Iwidgets 2.2 <-- loads the older release - -- Command/variable names are now reported with fully-qualified names - in "info" inquiries and in error messages. - -- No public/protected/private declarations outside of class definitions - -- The "scope" command used to be more or less the same as the "code" - command. In itcl3.x, "scope" is only for variables, and if a variable - is not recognized, you'll get an error. - -- The "code" command used to return a value like "@scope ...". It now - returns "namespace inscope ...", to be compatible with Tcl8. - -- The prototypes for Itcl_RegisterC and Itcl_FindC have changed. You - can now include ClientData when you register C functions. Also, there - is a new Itcl_RegisterObjC function for (objc,objv)-style command - handlers. diff --git a/itcl/Makefile.in b/itcl/Makefile.in deleted file mode 100644 index 557ae7461f2..00000000000 --- a/itcl/Makefile.in +++ /dev/null @@ -1,138 +0,0 @@ -# -# This file is the toplevel Makefile for [incr Tcl]. If it has the -# name "Makefile.in" then it is a template for a Makefile; to generate -# the actual Makefile, run "./configure", which is a configuration -# script generated by the "autoconf" program (constructs like -# "@foo@" will get replaced in the actual Makefile. -# -# RCS: $Id$ - -# Default top-level directories in which to install architecture- -# specific files (exec_prefix) and machine-independent files such -# as scripts (prefix). The values specified here may be overridden -# at configure-time with the --exec-prefix and --prefix options -# to the "configure" script. - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -subdirs = @subdirs@ - -# Some versions of make, like SGI's, use the following variable to -# determine which shell to use for executing commands: -SHELL = /bin/sh - -all: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -test: - for dir in itcl itk ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -static: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -standalone: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -plusplus: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -install: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -install-binaries: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -install-libraries: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -clean: - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -distclean: - rm -f Makefile config.log config.status config.cache - for dir in $(subdirs) ; do \ - if test -d $$dir ; then \ - echo "$$dir: $(MAKE) $@" ;\ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - else \ - exit 1; \ - fi \ - done; - -# -# Target to create a proper Tcl distribution from information in the -# master source directory. DISTDIR must be defined to indicate where -# to put the distribution. -# - -configure: configure.in - autoconf - for dir in $(subdirs) ; do \ - if (cd $$dir; autoconf) ; then true ; else exit 1 ; fi ; \ - done; - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/itcl/README b/itcl/README deleted file mode 100644 index 94d4e189536..00000000000 --- a/itcl/README +++ /dev/null @@ -1,320 +0,0 @@ ------------------------------------------------------------------------- - [incr Tcl] - version 3.2 for Tcl/Tk 8.0.3 and beyond ------------------------------------------------------------------------- - This is a bug-fix release in the itcl3.x series. - - As much as possible, I've tried to make itcl3.x backward-compatible - with earlier releases. The class definition syntax has not changed - at all from itcl2.2, and the old itcl1.x syntax is still supported. - But you'll notice changes related to the new namespace mechanism in - Tcl 8.0. For information on incompatibilities and porting to itcl3.x, - read the INCOMPATIBLE file in this directory, or check out the itcl - web site: - - http://www.tcltk.com/itcl/ - - Many people through the years have helped me with [incr Tcl] - development, and I thank them for their contributions. Please - read the acknowledgements section below. - - Send comments or suggestions to the [incr Tcl] mailing list - (itcl@scriptics.com) or directly to me (mmc@cadence.com). - If you want to subscribe to the mailing list, send a message - with the subject "subscribe" to "itcl-request@tcltk.com". - -======================================================================== - Copyright (c) 1993-1998 Lucent Technologies, Inc. - Copyright (c) 1998-2000 Cadence Design Systems, Inc. -======================================================================== - - OVERVIEW ------------------------------------------------------------------------- - - What is [incr Tcl]? - - Getting started - - Installation - - Integrating [incr Tcl] with other extensions - - Acknowledgements ------------------------------------------------------------------------- - - - What is [incr Tcl]? ------------------------------------------------------------------------- - [incr Tcl] is an object-oriented extension of the Tcl language. It - was created to support more structured programming in Tcl. Tcl scripts - that grow beyond a few thousand lines become extremely difficult to - maintain. This is because the building blocks of vanilla Tcl are - procedures and global variables, and all of these building blocks - must reside in a single global namespace. There is no support for - protection or encapsulation. - - [incr Tcl] introduces the notion of objects. Each object is a bag - of data with a set of procedures or "methods" that are used to - manipulate it. Objects are organized into "classes" with identical - characteristics, and classes can inherit functionality from one - another. This object-oriented paradigm adds another level of - organization on top of the basic variable/procedure elements, and - the resulting code is easier to understand and maintain. - - Among other things, [incr Tcl] can be used to create new widgets that - look and work like the usual Tk widgets, but are written entirely at - the Tcl language level (C code is optional). These "mega-widgets" - can be created using [incr Tk], a set of base classes which provide - the core mega-widget functionality. [incr Widgets] is a set of - high-level mega-widgets built using [incr Tk]. It has more than - 50 widget classes, and can be used right out of the box to create: - - - fileselectiondialog - - tabnotebook - - panedwindow - - scrolledhtml - - combobox - - optionmenu - - scrolledlistbox - - scrolledframe - - messagedialog - - and many others... - - Classes and/or related procedures can also be encapsulated in their - own "namespace". A namespace is a collection of commands, variables, - classes and other namespaces that is set apart from the usual global - scope. Elements within a namespace can be "private" or "protected", - so that access to them is restricted. An "import" command allows all - of the elements from one namespace to be integrated into another. - - Extension writers will immediately see the benefit of namespaces. - With vanilla Tcl, each extension must add its commands and variables - at the global scope. Extension writers are encouraged to add a unique - prefix to all of the names in their package, to avoid naming collisions. - Extensions can now sit in their own namespace of commands and variables, - and sensitive elements can be protected from accidental access. For - example, the current release of [incr Tcl] has a namespace "itcl" - for object-oriented support, a namespace "itk" for mega-widget - support, and a namespace "iwidgets" for the [incr Widgets] package. - Each of these namespaces has its own collection of commands and - variables. Developers can then pick and choose among the extensions, - and integrate the parts that they need for their application by - importing various namespaces at the global scope. - - - Getting started ------------------------------------------------------------------------- - If you're just getting started with [incr Tcl], check out these - useful resources: - - - FREE TUTORIAL on our web site: http://www.tcltk.com/itcl/ - - - BOOK: "[incr Tcl/Tk] from the Ground Up," by Chad Smith - (ISBN 0-07-212106-8) - - - BOOK: "Tcl/Tk Tools," edited by Mark Harrison - (ISBN 1-56592-218-2) - - Also, run the "catalog" demo to get an overview of the [incr Widgets] - package. On Windows and Macintosh systems, this is installed as one - of the executables. On Unix systems, this is installed in the - "lib/itcl/iwidgets3.0.0/demos" library directory. - - The file "iwidgets3.0.0/doc/iwidgets.ps" contains a tutorial - introduction to the [incr Widgets] package. The mega-widget classes - in [incr Widgets] show off most of the functionality in this release. - You can use them as a pattern to create your own widget classes. - - If you're a seasoned itcl professional, check the CHANGES file for a - summary of recent enhancements. Consult the man pages for detailed - information on particular commands. - - Check out our web site for the latest news: - - http://www.tcltk.com/itcl/ - - - Installation on Unix Systems ------------------------------------------------------------------------- - 1) Obtain this distribution from an archive site like this: - - ftp ftp.tcltk.com - cd pub/itcl - binary - get itcl3.2.tar.gz - quit - - - 2) Uncompress and untar the distribution: - - gunzip itcl3.2.tar.gz - tar xvf itcl3.2.tar - - - 3) Run the configuration script: - - cd itcl3.2 - ./configure - - or, for systems that don't recognize "#!" in shell scripts: - - cd itcl3.2 - /bin/sh ./configure - - The "configure" script finds the appropriate compiler flags and - generates new Makefiles from template files (Makefile.in). - - By default, the configuration script will set things up so - that everything is installed in "/usr/local". You can change - this by specifying a different "prefix" in the "configure" command: - - ./configure --prefix=/your/install/path - - If your Tcl installation is sitting somewhere other than right - next to this package, you may have to tell configure where to - find it: - - ./configure --with-tcl=/usr/local/tcl/lib - - If you like the gcc compiler and/or want to debug, you can add - those options as well: - - ./configure --enable-gcc --enable-symbols - - - 4) Build the libraries and the executables. From the toplevel - directory type: - - make all - - - 5) Install the libraries, executables, man pages and script files. - From the toplevel directory type: - - make install - - - 6) Use the final product: - - $ tclsh - % package require Itcl - % itcl::class Foo { method testing {} { return "testing!" } } - - If you don't like the itcl:: prefix, you can import the itcl - commands into the global namespace: - - % namespace import -force itcl::* - % class Foo { ... } - - Note that you'll find the same behavior with [incr Widgets]: - - $ wish - % package require Iwidgets - % iwidgets::optionmenu .om - % namespace import -force iwidgets::* - % optionmenu .om - - - Installation on Windows 95/98/NT ------------------------------------------------------------------------- - Follow the usual TEA instructions for building under Windows. - Requires Cygwin and Visual C++ 6.0. - - - Installation on Macintosh Systems ------------------------------------------------------------------------- - Many thanks to Jim Ingham for putting up Macintosh binaries for - various releases. Check out http://www.tcltk.com/itcl for downloads. - - - Integrating [incr Tcl] with other extensions ------------------------------------------------------------------------- - [incr Tcl] is now a pure extension to Tcl/Tk. Therefore, if you - build the Tcl/Tk core and this package with the "--enable-shared" - option, you can load [incr Tcl] into a vanilla tclsh, as follows: - - package require Itcl - - Similarly, you can load [incr Tcl] along with the [incr Tk] mega-widget - facility into a vanilla wish, as follows: - - package require Itk - - You can load [incr Tcl], [incr Tk], and the [incr Widgets] package - like this: - - package require Iwidgets - - If you require the earlier release of [incr Widgets] for some reason, - you can specify the version number: - - package require Iwidgets 2.2 - - Other packages should plug-and-play in the same fashion. - - >> NOTE: If you have any trouble with dynamic loading on UNIX - >> systems, you may need to set your LD_LIBRARY_PATH environment - >> variable to include the "lib" directory for your Tcl/Tk - >> installation. For example: - >> - >> LD_LIBRARY_PATH="/usr/local/tcl/lib:$LD_LIBRARY_PATH" - >> export LD_LIBRARY_PATH - - - Acknowledgements ------------------------------------------------------------------------- - Thanks to Chad Smith for writing an excellent, comprehensive - book "[incr Tcl/Tk] from the Ground Up," for many helpful bug - reports, and for nudging me along to fix things. - - Thanks to Matt Newman for providing the Tcl-only "tcl++" package - that helped so many people move forward while waiting for the - itcl3.0 release. - - Thanks to John Ousterhout and the Scriptics team for bundling this - package with their TclPro product. It's gratifying to see [incr Tcl] - accepted as a mainstream product. - - Thanks to Mark Ulferts, Sue Yockey, John Sigler, Bill Scott, Alfredo - Jahn, Bret Schuhmacher, Tako Schotanus and Kris Raney for building - the [incr Widgets] package. With a sketchy overview and a crappy - prototype of [incr Tk], they managed to build a nice set of mega-widgets. - Their initial designs helped me smooth out the rough spots in [incr Tk]. - Thanks especially to Mark Ulferts for keeping things up over the past - few years, and for streamlining the package for itcl3.0. - - Thanks to Jan Nijtmans, Karel Zuiderveld, and Vince Darley for helping - to keep up with Tcl/Tk releases, and for supporting the "plus" and - "dash" patches under [incr Tcl]. - - Thanks to Forest Rouse and ICEM CFD Engineering for integrating - [incr Tcl] into their Tcl/Tk compiler. This is a large undertaking, - and they have done an excellent job. - - Thanks to Alfredo Jahn and Bret Schuhmacher at WebNet for helping - to create the [incr Tcl] web site, and for maintaining the - [incr Tcl] mailing list for many years. - - Thanks to extension writers like Mark Diekhans (tclX) and Ioi Lam (Tix) - for making their packages compatible with [incr Tcl]. - - Thanks to George Howlett for teaching me how namespaces should really - work. He has been a constant source of inspiration, and has kept - a careful watch against many bad ideas. Jim Ingham fleshed out the - notion of explicit scoping, added many nice features to [incr Tk], - and has helped tremendously with porting. Lee Bernhard worked on - distributed systems with Iclient/Iserver, and also helped with porting. - Bill Scott, with a steady stream of bug reports, helped me understand - the questions that a typical user might have. He forced me to reinvent - the paradigm on more than one occasion. - - Thanks to all of the alpha-testers that helped me polish this release. - - Thanks to Mark Harrison for his enthusiasm and support. Due in - large part to his evangelism, I have been able to make [incr Tcl] - development a mainstream activity. - - And many thanks to my wife Maria and my children Maxwell and Katie - for putting up with all of this. - ---Michael -. . . . . . . . . . . . . . . . . ---_----------- - . . . . . . . . . | c a d e n c e | - Michael McLennan . --------------- - mmc@cadence.com . Cadence Design Systems, Inc. - phone: 610-398-6348 . 7535 Windsor Dr. Suite A-200 - fax: 610-530-7985 . Allentown, PA 18195 diff --git a/itcl/README.vc.txt b/itcl/README.vc.txt deleted file mode 100644 index 7ff70605d93..00000000000 --- a/itcl/README.vc.txt +++ /dev/null @@ -1,65 +0,0 @@ -------------------------------------------------------------------------
- How to build [Incr Tcl/Tk] with Visual C++ and makefile.vc
-------------------------------------------------------------------------
-
-[The condition of this "new thing" is experimental. All non-functional
-aspects are a bug, not a feature.]
-
-1) Open config.vc into a text editor and fill in the required information
- following the notes in the comments. The makefile.vc files should not
- ever need editing. If they do need editing to build Itcl, it's a bug.
-
-2) There are a number of macros you can specify on the commandline to
- effect the build. These are all optional. They're contained in
- rules.vc, but here are the meanings:
-
- DEBUG=(0|1)
- Set to one for a symbols build. Defaults to non-symbols
- when left out.
- STATIC_BUILD=(0|1)
- Will make a static library instead of a dll.
- NOMSVCRT=(0|1)
- Will reference libcmt(d).lib for the runtime when set to one.
- This is zero by default unless STATIC_BUILD is set to one.
- OUT_DIR=<someDir>
- You may specify where the output binaries are placed. Defaults
- to the build directory when not specified.
-
-Example commandlines:
-
-C:\itcl3.2.1> nmake -f makefile.vc
-
- Builds Itcl and Itk full optimization and no symbols for a dll
-
-C:\itcl3.2.1> nmake -f makefile.vc DEBUG=1 OUT_DIR=c:\progra~1\tcl\lib\itcl3.2
-
- Builds Itcl and Itk with debugging info for edit/continue (if vc6) and
- places both DLLs in c:\progra~1\tcl\lib\itcl3.2 . I can see the obvious
- bug with that now <shrug>. Darn. You could go into each directory
- seperately instead or just replace 'makefile.vc' above with
- 'itcl\win\makefile.vc' and specify OUT_DIR as you would like it.
-
-C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=1
-
- Builds a static library of both Itcl and Itk instead of a DLL and the
- static libcmt run-time.
-
-C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=1 NOMSVCRT=0
-
- Same as above, but uses msvcrt. In TclPro, these were known with the 'x'
- suffix.
-
-C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=0 NOMSVCRT=1
-
- Invalid. Makes bloaty DLLs.
-
-C:\itcl3.2.1> nmake -f makefile.vc install
-
- Installs to wherever INSTALLDIR was set in config.vc . At the moment,
- this isn't an over-ride as the commandline macros are. Should I make
- it an over-ride?
-
-Enjoy...
---
-David Gravereaux <davygrvy@pobox.com>
-7:07 PM 5/23/2001
diff --git a/itcl/TODO b/itcl/TODO deleted file mode 100644 index 8fc11e22b74..00000000000 --- a/itcl/TODO +++ /dev/null @@ -1,181 +0,0 @@ -======================================================================= - Following is a list of notes describing things which might be - fixed or changed in a future release of [incr Tcl] -======================================================================= - -Handle this case more elegantly: - -class Foo { - constructor {args} { - _init - } - proc _init {} { - puts "once!" - proc _init {} {} - } -} -Foo #auto -Foo #auto - - -itcl "wish" list ------------------------------------------------------------------- -- add virtual inheritance -- add "border" type to canvas widget -- add "validate" and "valid" commands for type validation -- add "unknownvar" and provide access to object data members: "obj.var" -- check namespace [info class] {...} as a replacement for "virtual" -- fix "auto_load_all" problem in Tcl-DP - (Their implementation uses "info commands" to verify that a command - has been successfully autoloaded, but absolute command names like - "::iwidgets::fileselectiondialog" don't show up.) -- fix "auto_load" mechanism to be extensible like "unknown" -- fix Itcl_RegisterC() to support ClientData -- core dump with "cmdtrace" (tclX thing?) - -- ideas from Nelson Macy: - - add "delegate" keyword for inheritance via composition? - - add "forward" keyword for implementing error handlers - - add "get" code to public variables for "cget" access - -- equivalent of constructor/destructor for classes -- protected/private recognized for constructor/destructor -- add something like Tk_CreateWidgetCommand() for widget developers - - -itcl documentation cleanup ------------------------------------------------------------------- -- add "Finance: Trading Systems" to commercial uses of Itcl (Deshaw) -- update doc: "config" code also gets invoked on startup for itk widgets -- update doc: add to FAQ: class with common array interacts with Tk widget - -itcl "to do" list ------------------------------------------------------------------- - -- write "auto_load_all" proc for Tcl-DP - -- bad errorInfo: - > More specifically, the constructor for the class did the following: - > - > set hull [info namespace tail $this] - > ::frame $hull - > - > One of the class variables had a configuration script: - > - > public variable textvariable "" { - > if { $textvariable != "" } { - > regsub "\\(.*\\)" $textvariable "" global - > global ::$global - > trace variable $textvariable w "$hull adjust" - > } - > } - -- add "@body" in as many places as possible to support Tcl compiler - -- check out itcl with Tix: - lappend auto_path $env(TIX_LIBRARY) - source "$env(IWIDGETS_LIBRARY)/init.iwidgets" - - iwidgets::Dialog ._Arcattributes -title "Code: Arc Annotations" - -modality application - - set attrframe [._Arcattributes childsite] - - tixScrolledHList $attrframe.ports - [$attrframe.ports subwidget hlist] configure -selectmode browse - - pack $attrframe.ports -expand yes -fill both -padx 10 -pady 10 - - ._Arcattributes activate - - ------------------------------------------------------------------- - -To: ig4!att!cas.org!lvirden (Larry W. Virden) (lvirden@cas.org) -cc: michael.mclennan@att.com -Subject: Re: Question concerning the Japanese patches for Tcl 7.4 -In-reply-to: Your message of "Fri, 05 Jan 1996 06:43:46 EST." - <9601051143.AA15368@cas.org> --------- -Your message dated: Fri, 05 Jan 1996 06:43:46 EST -> -> The following instructions refer to the software which enables one to -> build a KANJI supporting version of Tcl/Tk. Perhaps a note in the itcl -> instructions letting folk know this package is also compatible would be -> useful. -> -> -> ----- Begin Included Message ----- -> -> >From nisinaka@sra.co.jp Thu Jan 4 00:09:52 1996 -> Received: from srv07s4m by srv99dr.cas.org (5.65/CAS-1.23) -> id AA29886; Thu, 4 Jan 1996 00:09:52 -0500 -> Received: from srv01s4.cas.org by srv07s4m.cas.org (5.0/CAS-1.23) -> id AA11865; Thu, 4 Jan 1996 00:09:50 +0500 -> Received: from sraigw.sra.co.jp by srv01s4.cas.org (4.1/CAS-1.23) -> id AA25691; Thu, 4 Jan 96 00:09:39 EST -> Received: from sranhe.sra.co.jp by sraigw.sra.co.jp -> (8.6.12+2.4W3/3.4W-2.1) -> id OAA06131; Thu, 4 Jan 1996 14:09:32 +0900 -> Received: from srashc.sra.co.jp (srashc [133.137.44.5]) by -> sranhe.sra.co.jp (8.6.12+2.4W3/3.4W-srambox) with ESMTP id OAA00935; -> Thu, 4 Jan 1996 14:06:26 +0900 -> Received: from srashc.sra.co.jp (localhost [127.0.0.1]) by -> srashc.sra.co.jp (8.6.12+2.4W3/3.4W-sra) with ESMTP id OAA25546; Thu, 4 -> Jan 1996 14:09:30 +0900 -> To: lvirden (Larry W. Virden, x2487) -> Cc: tcl-jp-bugs@sra.co.jp -> Reply-To: nisinaka@sra.co.jp -> Subject: Re: Question concerning the Japanese patches for Tcl 7.4 -> In-Reply-To: Your message of Tue, 02 Jan 1996 10:32:32 EST. -> <9601021032.AA2226@cas.org> -> Date: Thu, 04 Jan 1996 14:09:29 +0900 -> Message-Id: <25544.820732169@srashc.sra.co.jp> -> From: NISHINAKA Yoshiyuki <nisinaka@sra.co.jp> -> Status: RO -> X-Lines: 31 -> -> > I notice that incr tcl 2.0 has been released with it's own, -> customized, -> > version of Tcl 7.4/Tk 4.0. Do any of you use itcl? If so, I -> wondered if you -> > had thought of constructing a specialized set of patches which could -> be -> > used with itcl. -> -> I have just got itcl2.0 and tried it with our Japanization -> patches. Seems it works fine. -> -> What I really did was as follows: -> -> (1) Unpack itcl2.0.tar.gz. -> -> (2) Run `configure' at the directory `itcl2.0'. -> -> (3) Apply `tcl7.4p3jp-patch' at the directory `itcl2.0/tcl7.4'. -> `Makefile.in.rej' was the only rejected file, so apply it -> manually. -> -> (4) Apply `tk4.0p3jp-patch' at the directory `itcl2.0/tk4.0'. -> There was no rejected file. -> -> (5) Make symbolic link from `tcl7.4' to `tcl7.4jp'. -> -> (6) Make all. -> -> -> I haven't seriously tested yet though, `make test' was passed -> and the Japanese translation of `demos/widgets' works fine. -> -> -> Yosh Nishinaka (nisinaka@sra.co.jp) -> -> -> ----- End Included Message ----- -> -> -> -- -> :s Larry W. Virden INET: lvirden@cas.org -> :s <URL:http://www.teraform.com/%7Elvirden/> <*> -> :s Unless explicitly stated to the contrary, nothing in this posting should -> :s be construed as representing my employer's opinions. diff --git a/itcl/config.vc b/itcl/config.vc deleted file mode 100644 index 357cc618940..00000000000 --- a/itcl/config.vc +++ /dev/null @@ -1,73 +0,0 @@ -######################################################################
-#
-# Edit for your local configuration. This should be the only file
-# that needs editing to build [Incr Tcl/Tk].
-#
-# RCS: @(#) $Id$
-######################################################################
-
-# only affects the linker and resource compiler
-# pick from:
-# ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH4
-#
-# Or set to IA64 to rearrange everything to use the Intel IA64 SDK.
-#
-MACHINE = IX86
-
-
-# are we MSVC++ version 5 or 6 ?
-#
-MSDEV_VER = 6
-
-# Where is MSVC++ located?
-#
-MSDEVROOT = C:\Dev\DevStudio60
-
-# Where is Tcl ?
-#
-TCLROOT = D:\tclpro_ws\tcl
-
-# Does the above path point to the Tcl install or sources ?
-#
-ISTCLINSTALL = 0
-
-# Where is Tk ? Only needed for a build from the sources.
-#
-!if $(ISTCLINSTALL) == 0
-TKROOT = D:\tclpro_ws\tk
-!endif
-
-# Where are we installing to? When TCLROOT is already the install, this
-# is bypassed.
-#
-!if $(ISTCLINSTALL) == 0
-INSTALLDIR = c:\progra~1\tcl
-!else
-INSTALLDIR = $(TCLROOT)
-!endif
-
-# What Tcl version are we grabbing ?
-#
-TCLMAJOR = 8
-TCLMINOR = 4
-
-TCL_VERSION = $(TCLMAJOR)$(TCLMINOR)
-TCL_DOTVERSION = $(TCLMAJOR).$(TCLMINOR)
-
-
-!if "$(MACHINE)" == "IA64"
-# untested logic path
-#
-vcvars = "c:\ia64sdk17\vcvars32.bat"
-!elseif $(MSDEV_VER) == 5
-vcvars = "$(MSDEVROOT)\vc\bin\vcvars32.bat"
-!elseif $(MSDEV_VER) == 6
-vcvars = "$(MSDEVROOT)\vc98\bin\vcvars32.bat"
-!endif
-
-rc32 = rc
-cc32 = cl
-link32 = link
-lib32 = lib
-cvtres32 = cvtres
-
diff --git a/itcl/config/config.guess b/itcl/config/config.guess deleted file mode 100755 index 62186fd1660..00000000000 --- a/itcl/config/config.guess +++ /dev/null @@ -1,483 +0,0 @@ -#!/bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner <bothner@cygnus.com>. -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:V*:*) - # After 1.2, OSF1 uses "V1.3" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` - exit 0 ;; - alpha:OSF1:*:*) - # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - Pyramid*:OSx*:*:*) - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i486-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - tp_s2*:SunOS:*:*) - # Tadpole Sparcbook 2 running a modified 4.1.3 - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - mips:*:5*:RISCos) - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX:*:*) - echo mips-sgi-irix${UNAME_RELEASE} - exit 0 ;; - i[34]86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1 - elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1.1 - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[3478]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?7:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:UNICOS:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:UNICOS:*:*) - echo ymp-cray-unicos - exit 0 ;; - CRAY-2:UNICOS:*:*) - echo cray2-cray-unicos - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - i[34]86:BSD/386:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - i[34]86:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux - exit 0 ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i[34]86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i[34]86:*:3.2:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL - elif test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL - else - echo ${UNAME_MACHINE}-unknown-sysv32 - fi - exit 0 ;; - Intel:Mach:3*:*) - echo i386-unknown-mach3 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M680[234]0:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) - uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3 && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m680[234]0:LynxOS:2.2*:*) - echo m68k-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.2*:*) - echo powerpc-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i[34]86:LynxOS:2.2*:*) - echo i386-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.2*:*) - echo sparc-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.2*:*) - echo rs6000-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c <<EOF -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else - printf ("m68k-sony-newsos\n"); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-unknown-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff --git a/itcl/config/config.sub b/itcl/config/config.sub deleted file mode 100755 index bf932cb9dd7..00000000000 --- a/itcl/config/config.sub +++ /dev/null @@ -1,793 +0,0 @@ -#!/bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` - ;; - -lynx) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel ) - basic_machine=$basic_machine-unknown - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* ) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigados) - basic_machine=m68k-cbm - os=-amigados - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[345]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-sysv32 - ;; - i[345]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-sysv4 - ;; - i[345]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-sysv - ;; - i[345]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium-*) - # We will change tis to say i586 once there has been - # time for various packages to start to recognize that. - basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - ps2) - basic_machine=i386-ibm - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - basic_machine=mips-mips - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative must end in a *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -winnt*) - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigados - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-masscomp) - os=-rtu - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -lynxos*) - vendor=lynx - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff --git a/itcl/config/install-sh b/itcl/config/install-sh deleted file mode 100755 index 95d784d7cf6..00000000000 --- a/itcl/config/install-sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh - -# -# install - install a program, script, or datafile -# This comes from X11R5; it is not part of GNU. -# -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" - -instcmd="$mvprog" -chmodcmd="" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog -f" -src="" -dst="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -fi - -if [ x"$dst" = x ] -then - echo "install: no destination specified" - exit 1 -fi - - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - -if [ -d $dst ] -then - dst="$dst"/`basename $src` -fi - -# Make a temp file name in the proper directory. - -dstdir=`dirname $dst` -dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - -$doit $instcmd $src $dsttmp - -# and set any options; do chmod last to preserve setuid bits - -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi - -# Now rename the file to the real destination. - -$doit $rmcmd $dst -$doit $mvcmd $dsttmp $dst - - -exit 0 diff --git a/itcl/config/installFile.tcl b/itcl/config/installFile.tcl deleted file mode 100755 index 53c24392fba..00000000000 --- a/itcl/config/installFile.tcl +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -# -# installFile.tcl - a Tcl version of install-sh -# that copies a file and preserves its permission bits. -# This also optimizes out installation of existing files -# that have the same size and time stamp as the source. -# -# \ -exec tclsh8.3 "$0" ${1+"$@"} - -set doCopy 0 ;# Rename files instead of copy -set doStrip 0 ;# Strip the symbols from installed copy -set verbose 0 -set src "" -set dst "" - -# Process command line arguments, compatible with install-sh - -for {set i 0} {$i < $argc} {incr i} { - set arg [lindex $argv $i] - switch -- $arg { - -c { - set doCopy 1 - } - -m { - incr i - # Assume UNIX standard "644", etc, so force Tcl to think octal - set permissions 0[lindex $argv $i] - } - -o { - incr i - set owner [lindex $argv $i] - } - -g { - incr i - set group [lindex $argv $i] - } - -s { - set doStrip 1 - } - -v { - set verbose 1 - } - default { - set src $arg - incr i - set dst [lindex $argv $i] - break - } - } -} -if {[string length $src] == 0} { - puts stderr "$argv0: no input file specified" - exit 1 -} -if {[string length $dst] == 0} { - puts stderr "$argv0: no destination file specified" - exit 1 -} - -# Compatibility with CYGNUS-style pathnames -regsub {^/(cygdrive)?/(.)/(.*)} $src {\2:/\3} src -regsub {^/(cygdrive)?/(.)/(.*)} $dst {\2:/\3} dst - -if {$verbose && $doStrip} { - puts stderr "Ignoring -s (strip) option for $dst" -} -if {[file isdirectory $dst]} { - set dst [file join $dst [file tail $src]] -} - -# Temporary file name - -set dsttmp [file join [file dirname $dst] #inst.[pid]#] - -# Optimize out install if the file already exists - -set actions "" -if {[file exists $dst] && - ([file mtime $src] == [file mtime $dst]) && - ([file size $src] == [file size $dst])} { - - # Looks like the same file, so don't bother to copy. - # Set dsttmp in case we still need to tweak mode, group, etc. - - set dsttmp $dst - lappend actions "already installed" -} else { - file copy -force $src $dsttmp - lappend actions copied -} - -# At this point "$dsttmp" is installed, but might not have the -# right permissions and may need to be renamed. - - -foreach attrName {owner group permissions} { - upvar 0 $attrName attr - - if {[info exists attr]} { - if {![catch {file attributes $dsttmp -$attrName} dstattr]} { - - # This system supports "$attrName" kind of attributes - - if {($attr != $dstattr)} { - file attributes $dsttmp -$attrName $attr - lappend actions "set $attrName to $attr" - } - } - } -} - -if {[string compare $dst $dsttmp] != 0} { - file rename -force $dsttmp $dst -} -if {$verbose} { - puts stderr "$dst: [join $actions ", "]" -} -exit 0 diff --git a/itcl/config/mkinstalldirs b/itcl/config/mkinstalldirs deleted file mode 100755 index 0801ec2c966..00000000000 --- a/itcl/config/mkinstalldirs +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Last modified: 1994-03-25 -# Public domain - -errstatus=0 - -for file in ${1+"$@"} ; do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d in ${1+"$@"} ; do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/itcl/configure b/itcl/configure deleted file mode 100755 index e1ee20c4026..00000000000 --- a/itcl/configure +++ /dev/null @@ -1,948 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_default_prefix=/usr/local - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=itcl/generic/itcl.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -# RCS: $Id$ - -ac_aux_dir= -for ac_dir in config $srcdir/config; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - - -# ----------------------------------------------------------------------- -# -# Set up a new default --prefix. If a previous installation of -# [incr Tcl] can be found searching $PATH use that directory. -# -# ----------------------------------------------------------------------- - - -if test "x$prefix" = xNONE; then -echo $ac_n "checking for prefix by $ac_c" 1>&6 -# Extract the first word of "itclsh", so it can be a program name with args. -set dummy itclsh; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:562: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_ITCLSH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$ITCLSH" in - /*) - ac_cv_path_ITCLSH="$ITCLSH" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_ITCLSH="$ITCLSH" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_ITCLSH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -ITCLSH="$ac_cv_path_ITCLSH" -if test -n "$ITCLSH"; then - echo "$ac_t""$ITCLSH" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -n "$ac_cv_path_ITCLSH"; then - prefix=`echo $ac_cv_path_ITCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` - fi -fi - - -subdirs="itcl itk" - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@ITCLSH@%$ITCLSH%g -s%@subdirs@%$subdirs%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF -chmod +x ${srcdir}/config/install-sh ${srcdir}/config/mkinstalldirs -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in itcl itk; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi - diff --git a/itcl/configure.in b/itcl/configure.in deleted file mode 100644 index dd73de7e444..00000000000 --- a/itcl/configure.in +++ /dev/null @@ -1,25 +0,0 @@ -dnl This file is an input file used by the GNU "autoconf" program to -dnl generate the file "configure", which is run during [incr Tcl] -dnl installation to configure the system for the local environment. - -AC_INIT(itcl/generic/itcl.h) -# RCS: $Id$ - -AC_CONFIG_AUX_DIR(config) -AC_PREREQ(2.0) - -# ----------------------------------------------------------------------- -# -# Set up a new default --prefix. If a previous installation of -# [incr Tcl] can be found searching $PATH use that directory. -# -# ----------------------------------------------------------------------- - -AC_PREFIX_DEFAULT(/usr/local) -AC_PREFIX_PROGRAM(itclsh) - -AC_CONFIG_SUBDIRS(itcl itk) - - -AC_OUTPUT(Makefile, - chmod +x ${srcdir}/config/install-sh ${srcdir}/config/mkinstalldirs) diff --git a/itcl/doc/README b/itcl/doc/README deleted file mode 100644 index 3474a6466e2..00000000000 --- a/itcl/doc/README +++ /dev/null @@ -1,14 +0,0 @@ - - OVERVIEW ------------------------------------------------------------------------- - If you are just getting started with [incr Tcl], download the - "tutorial" from the itcl web site: - - http://www.tcltk.com/itcl/ - - This has over 100 pages of introductory text and code examples. - I didn't include it here, since it adds another megabyte to the - distribution, and long-time users won't need it. - - You can find the same tutorial in the book "Tcl/Tk Tools" - published by O'Reilly and Associates. diff --git a/itcl/itcl/doc/itcl_class.n b/itcl/itcl/doc/itcl_class.n deleted file mode 100644 index 5f571cd3a3a..00000000000 --- a/itcl/itcl/doc/itcl_class.n +++ /dev/null @@ -1,419 +0,0 @@ -'\" -'\" 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$ -'\" -.so man.macros -.TH itcl_class n 3.0 itcl "[incr\ Tcl]" -.BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -itcl_class \- create a class of objects (obsolete) -.SH SYNOPSIS -\fBitcl_class \fIclassName\fR \fB{ -.br - \fBinherit \fIbaseClass\fR ?\fIbaseClass\fR...? -.br - \fBconstructor \fIargs\fR ?\fIinit\fR? \fIbody\fR -.br - \fBdestructor \fIbody\fR -.br - \fBmethod \fIname args body\fR -.br - \fBproc \fIname args body\fR -.br - \fBpublic \fIvarName\fR ?\fIinit\fR? ?\fIconfig\fR? -.br - \fBprotected \fIvarName\fR ?\fIinit\fR? -.br - \fBcommon \fIvarName\fR ?\fIinit\fR? -.br -\fB}\fR -.sp -\fIclassName objName\fR ?\fIargs...\fR? -.br -\fIclassName\fR \fB#auto\fR ?\fIargs...\fR? -.br -\fIclassName\fR \fB::\fR \fIproc\fR ?\fIargs...\fR? -.sp -\fIobjName method\fR ?\fIargs...\fR? -.sp -\fICommands available within class methods/procs:\fR -.br -\fBglobal \fIvarName\fR ?\fIvarName...\fR? -.br -\fBprevious \fIcommand\fR ?\fIargs...\fR? -.br -\fBvirtual \fIcommand\fR ?\fIargs...\fR? -.BE - -.SH DESCRIPTION -.PP -This command is considered obsolete, but is retained for -backward-compatibility with earlier versions of \fB[incr\ Tcl]\fR. -It has been replaced by the \fBclass\fR command, which should -be used for any new development. - -.TP -\fBitcl_class \fIclassName definition\fR -Provides the definition for a class named \fIclassName\fR. If -\fIclassName\fR is already defined, then this command returns -an error. If the class definition is successfully parsed, -\fIclassName\fR becomes a command in the current namespace -context, handling the -creation of objects and providing access to class scope. -The class \fIdefinition\fR -is evaluated as a series of Tcl statements that define -elements within the class. In addition to the usual -commands, the following class definition commands are recognized: -.RS -.TP -\fBinherit \fIbaseClass\fR ?\fIbaseClass\fR...? -Declares one or more base classes, causing the current class to -inherit their characteristics. Classes must have been defined by -a previous \fBitcl_class\fR command, or must be available to the -auto-loading facility (see "AUTO-LOADING" below). A single class -definition can contain no more than one \fBinherit\fR command. -.RS -.LP -When the same member name appears in two or more base classes, -the base class that appears first in the \fBinherit\fR list takes -precedence. For example, if classes "Foo" and "Bar" both contain -the member "x", then the "\fBinherit\fR" statement: -.CS -inherit Foo Bar -.CE -allows "Foo::x" to be accessed simply as "x" but forces "Bar::x" (and -all other inherited members named "x") to be referenced with their -explicit "\fIclass\fR::\fImember\fR" name. -.RE -.TP -\fBconstructor \fIargs\fR ?\fIinit\fR? \fIbody\fR -Declares the argument list and body used for the constructor, which -is automatically invoked whenever an object is created. Before -.VS -the \fIbody\fR is executed, the optional \fIinit\fR statement is -used to invoke any base class constructors that require arguments. -Variables in the \fIargs\fR specification can be accessed in the -\fIinit\fR code fragment, and passed to base class constructors. -After evaluating the \fIinit\fR statement, any base class -constructors that have not been executed are invoked without -arguments. This ensures that all base classes are fully -constructed before the constructor \fIbody\fR is executed. -.VE -If construction is successful, the constructor always returns -the object name\-regardless of how the \fIbody\fR is defined\-and -the object name becomes a command in the current namespace context. -If construction fails, an error message is returned. -.TP -\fBdestructor \fIbody\fR -Declares the body used for the destructor, which is automatically invoked -whenever an object is deleted. If the destructor is successful, the object -data is destroyed and the object name is removed as a command from the -interpreter. If destruction fails, an error message is returned -and the object remains. -.RS -.LP -.VS -When an object is destroyed, all destructors in a class hierarchy -are invoked in order from most- to least-specific. This is the -order that the classes are reported by the "\fBinfo heritage\fR" -command, and it is exactly the opposite of the default constructor -order. -.VE -.RE -.TP -\fBmethod \fIname args body\fR -Declares a method called \fIname\fR with an argument list \fIargs\fR -and a \fIbody\fR of Tcl statements. A method is just like the usual -Tcl "proc" except that it has transparent access to -.VS -object-specific variables, as well as -.VE -common variables. Within the class scope, a method can be invoked -like any other command\-simply by using its name. Outside of the -class scope, the method name must be prefaced by an object -name. Methods in a base class that are redefined in the current class -or hidden by another base class can be explicitly scoped using the -"\fIclass\fR::\fImethod\fR" syntax. -.TP -\fBproc \fIname args body\fR -Declares a proc called \fIname\fR with an argument list \fIargs\fR -and a \fIbody\fR of Tcl statements. A proc is similar to a method, -except that it can be invoked without referring to a specific object, -and therefore has access only to common variables\-not -.VS -to object-specific variables declared with the \fBpublic\fR -and \fBprotected\fR commands. -.VE -Within the class scope, a proc can be invoked -like any other command\-simply by using its name. In any other -namespace context, the proc is invoked using a qualified name -like "\fIclassName\fB::\fIproc\fR". -Procs in a base class that are redefined in the current -class, or hidden by another base class, can also be accessed -via their qualified name. -.TP -\fBpublic \fIvarName\fR ?\fIinit\fR? ?\fIconfig\fR? -Declares a public variable named \fIvarName\fR. Public variables are -visible in methods within the scope of their class and any derived class. -In addition, they can be modified outside of the class scope using the special -"config" formal argument (see "ARGUMENT LISTS" above). If the optional -\fIinit\fR is specified, it is used as the initial value of the variable -when a new object is created. If the optional \fIconfig\fR command -is specified, -it is invoked whenever a public variable is modified via the "config" -formal argument; if the \fIconfig\fR command returns an error, the -public variable is reset to its value before configuration, and the -method handling the configuration returns an error. -.TP -\fBprotected \fIvarName\fR ?\fIinit\fR? -Declares a protected variable named \fIvarName\fR. Protected variables -are visible in methods within the scope of their class and any derived class, -but cannot -be modified outside of the class scope. If the optional \fIinit\fR -is specified, it is used as the initial value of the variable when a new -object is created. Initialization forces the variable to be a simple -scalar value; uninitialized variables, on the other hand, can be used -as arrays. All objects have a built-in protected variable named -"this" which is initialized to the instance name for the object. -.TP -\fBcommon \fIvarName\fR ?\fIinit\fR? -Declares a common variable named \fIvarName\fR. Common variables are -shared among all objects in a class. They are visible in methods and -procs in the scope of their class and any derived class, but cannot be -modified outside of the class scope. -If the optional \fIinit\fR is specified, it is used as the -initial value of the variable. Initialization forces the variable to be -a simple scalar value; uninitialized variables, on the other hand, can -be used as arrays. -.RS -.LP -Once a common variable has been declared, it can be configured using -ordinary Tcl code within the class definition. This facility is -particularly useful when the initialization of the variable is -non-trivial\-when the variable contains an array of values, for example: -.CS -itcl_class Foo { - . - . - common boolean - set boolean(true) 1 - set boolean(false) 0 -} -.CE -.RE -.RE - -.SH CLASS USAGE -.PP -When a class definition has been loaded (or made available to the -auto-loader), the class name can be used as a command. -.TP -\fIclassName objName\fR ?\fIargs...\fR? -Creates a new object in class \fIclassName\fR with the name \fIobjName\fR. -Remaining arguments are passed to the constructor. If construction is -successful, the object name is returned and this name becomes a command -in the current namespace context. Otherwise, an error is returned. -.TP -\fIclassName\fR #auto ?\fIargs...\fR? -Creates a new object in class \fIclassName\fR with an automatically -generated name. Names are of the form \fIclassName<number>\fR, -.VS -where the \fIclassName\fR part is modified to start with a lowercase -letter. In class "Toaster", for example, the "\fB#auto\fR" specification -would produce names toaster0, toaster1, etc. Remaining arguments are -.VE -passed to the constructor. If construction is successful, the object -name is returned and this name becomes a command in the current -namespace context. Otherwise, an error is returned. -.TP -\fIclassName\fR :: \fIproc\fR ?\fIargs...\fR? -Used outside of the class scope to invoke a class proc named \fIproc\fR. -Class procs are like ordinary Tcl procs, except that they are executed -in the scope of the class and therefore have transparent -access to common data members. -.RS -.LP -.VS -Notice that, unlike any other scope qualifier in \fB[incr\ Tcl]\fR, the "::" -shown above is surrounded by spaces. This is unnecessary with the -new namespace facility, and is considered obsolete. The capability -is still supported, however, to provide backward-compatibility with -earlier versions. -.VE -.RE - -.SH OBJECT USAGE -.TP -\fIobjName method\fR ?\fIargs...\fR? -Invokes a method named \fImethod\fR to operate on the specified object. -Remaining arguments are passed to the method. The method name can -be "constructor", "destructor", any method name appearing in the -class definition, or any of the following built-in methods. -.SH BUILT-IN METHODS -.TP -\fIobjName\fR \fBisa \fIclassName\fR -Returns non-zero if the given \fIclassName\fR can be found in the -object's heritage, and zero otherwise. -.TP -\fIobjName\fR \fBdelete\fR -Invokes the destructor associated with an object. -If the destructor is successful, data associated with the object is -deleted and \fIobjName\fR is removed as a command from the -interpreter. Returns the empty string, regardless of the destructor -body. -.RS -.LP -.VS -The built-in \fBdelete\fR method has been replaced by the -"\fBdelete object\fR" command in the global namespace, and -is considered obsolete. The capability is still supported, -however, to provide backward-compatibility with earlier versions. -.VE -.RE -.TP -\fIobjName\fR \fBinfo \fIoption\fR ?\fIargs...\fR? -Returns information related to the class definition or to -a particular object named \fIobjName\fR. -The \fIoption\fR parameter includes the following things, as well as -the options recognized by the usual Tcl "info" command: -.RS -.TP -\fIobjName\fR \fBinfo class\fR -.VS -Returns the name of the most-specific class for object \fIobjName\fR. -.VE -.TP -\fIobjName\fR \fBinfo inherit\fR -Returns the list of base classes as they were defined in the -"\fBinherit\fR" command, or an empty string if this class -has no base classes. -.TP -\fIobjName\fR \fBinfo heritage\fR -Returns the current class name and the entire list of base classes in -the order that they are traversed for member lookup and object -destruction. -.TP -\fIobjName\fR \fBinfo method\fR ?\fImethodName\fR? ?\fB-args\fR? ?\fB-body\fR? -With no arguments, this command returns a list of all class methods. -If \fImethodName\fR is specified, it returns information for a specific method. -If neither of the optional \fB-args\fR or \fB-body\fR flags is specified, -a complete method definition is returned as a list of three elements -including the method name, argument list and body. Otherwise, the -requested information is returned without the method name. -If the \fImethodName\fR is not recognized, an empty string is returned. -.TP -\fIobjName\fR \fBinfo proc\fR ?\fIprocName\fR? ?\fB-args\fR? ?\fB-body\fR? -With no arguments, this command returns a list of all class procs. -If \fIprocName\fR is specified, it returns information for a specific proc. -If neither of the optional \fB-args\fR or \fB-body\fR flags is specified, -a complete proc definition is returned as a list of three elements -including the proc name, argument list and body. Otherwise, the -requested information is returned without the proc name. -If the \fIprocName\fR is not recognized, an empty string is returned. -.TP -\fIobjName\fR \fBinfo public\fR ?\fIvarName\fR? ?\fB-init\fR? ?\fB-value\fR? ?\fB-config\fR? -With no arguments, this command returns a list of all public variables. -If \fIvarName\fR is specified, it returns information for a specific public -variable. -If none of the optional \fB-init\fR, \fB-value\fR or \fB-config\fR flags -are specified, all available information is returned as a list of four -elements including the variable name, initial value, current value, -and configuration commands. Otherwise, the requested information is -returned without the variable name. -If the \fIvarName\fR is not recognized, an empty string is returned. -.TP -\fIobjName\fR \fBinfo protected\fR ?\fIvarName\fR? ?\fB-init\fR? ?\fB-value\fR? -With no arguments, this command returns a list of all protected variables. -If \fIvarName\fR is specified, it returns information for a specific protected -variable. -If neither of the optional \fB-init\fR or \fB-value\fR flags is specified, -all available information is returned as a list of three elements -including the variable name, initial value and current value. -Otherwise, the requested information is returned without the variable name. -If the \fIvarName\fR is not recognized, an empty string is returned. -.TP -\fIobjName\fR \fBinfo common\fR ?\fIvarName\fR? ?\fB-init\fR? ?\fB-value\fR? -With no arguments, this command returns a list of all common variables. -If \fIvarName\fR is specified, it returns information for a specific common -variable. -If neither of the optional \fB-init\fR or \fB-value\fR flags is specified, -all available information is returned as a list of three elements -including the variable name, initial value and current value. -Otherwise, the requested information is returned without the variable name. -If the \fIvarName\fR is not recognized, an empty string is returned. -.RE -.SH OTHER BUILT-IN COMMANDS -The following commands are also available within the scope of each class. -They cannot be accessed from outside of the class as proper methods or -procs; rather, they are useful inside the class when implementing its -functionality. -.TP -\fBglobal \fIvarName\fR ?\fIvarName...\fR? -Creates a link to one or more global variables in the current -namespace context. Global variables can also be accessed in -other namespaces by including namespace qualifiers in \fIvarName\fR. -This is useful when communicating with Tk widgets that rely on global -variables. -.TP -\fBprevious \fIcommand\fR ?\fIargs...\fR? -Invokes \fIcommand\fR in the scope of the most immediate base class -.VS -(i.e., the "previous" class) for the object. For classes using single -.VE -inheritance, this facility can be used to avoid hard-wired base class -references of the form "\fIclass\fR::\fIcommand\fR", making code easier -to maintain. For classes using multiple inheritance, the utility of -this function is dubious. -If the class at the relevant scope has no base class, an error is returned. -.TP -\fBvirtual \fIcommand\fR ?\fIargs...\fR? -.VS -Invokes \fIcommand\fR in the scope of the most-specific class for the -object. The methods within a class are automatically virtual; whenever -an unqualified method name is used, it always refers to the most-specific -implementation for that method. This function provides a way of -evaluating code fragments in a base class that have access to the -most-specific object information. It is useful, for example, for -creating base classes that can capture and save an object's state. -It inverts the usual notions of object-oriented programming, however, -and should therefore be used sparingly. -.VE - -.SH AUTO-LOADING -.PP -Class definitions need not be loaded explicitly; they can be loaded as -needed by the usual Tcl auto-loading facility. Each directory containing -class definition files should have an accompanying "tclIndex" file. -Each line in this file identifies a Tcl procedure or \fB[incr\ Tcl]\fR -class definition and the file where the definition can be found. -.PP -For example, suppose a directory contains the definitions for classes -"Toaster" and "SmartToaster". Then the "tclIndex" file for this -directory would look like: -.CS -# Tcl autoload index file, version 2.0 for [incr Tcl] -# This file is generated by the "auto_mkindex" command -# and sourced to set up indexing information for one or -# more commands. Typically each line is a command that -# sets an element in the auto_index array, where the -# element name is the name of a command and the value is -# a script that loads the command. - -set auto_index(::Toaster) "source $dir/Toaster.itcl" -set auto_index(::SmartToaster) "source $dir/SmartToaster.itcl" -.PP -The \fBauto_mkindex\fR command is used to automatically -generate "tclIndex" files. -.CE -The auto-loader must be made aware of this directory by appending -the directory name to the "auto_path" variable. When this is in -place, classes will be auto-loaded as needed when used in an -application. - -.SH KEYWORDS -class, object, object-oriented diff --git a/itcl/itcl/doc/itcl_info.n b/itcl/itcl/doc/itcl_info.n deleted file mode 100644 index 454da934788..00000000000 --- a/itcl/itcl/doc/itcl_info.n +++ /dev/null @@ -1,62 +0,0 @@ -'\" -'\" 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$ -'\" -.so man.macros -.TH itcl_info n 3.0 itcl "[incr\ Tcl]" -.BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -itcl_info \- query info regarding classes and objects (obsolete) -.SH SYNOPSIS -\fBitcl_info classes ?\fIpattern\fR? -.br -\fBitcl_info objects ?\fIpattern\fR? ?\fB-class \fIclassName\fR? ?\fB-isa \fIclassName\fR? -.BE - -.SH DESCRIPTION -.PP -This command is considered obsolete, but is retained for -backward-compatibility with earlier versions of \fB[incr\ Tcl]\fR. -It has been replaced by the "\fBfind classes\fR" and "\fBfind objects\fR" -commands, which should be used for any new development. - -.PP -The following commands are available in the global namespace to -query information about classes and objects that have been created. -.TP -\fBitcl_info classes ?\fIpattern\fR? -Returns a list of classes available in the current namespace context. -.VS -If a class belongs to the current namespace context, its simple name -is reported; otherwise, if a class is imported from another namespace, -its fully-qualified name is reported. -.VE -.sp -If the optional \fIpattern\fR is specified, then the reported names -are compared using the rules of the "\fBstring match\fR" command, -and only matching names are reported. -.TP -\fBitcl_info objects ?\fIpattern\fR? ?\fB-class \fIclassName\fR? ?\fB-isa \fIclassName\fR? -Returns a list of objects available in the current namespace context. -.VS -If an object belongs to the current namespace context, its simple name -is reported; otherwise, if an object is imported from another namespace, -its fully-qualified access command is reported. -.VE -.sp -If the optional \fIpattern\fR is specified, then the reported names -are compared using the rules of the "\fBstring match\fR" command, -and only matching names are reported. -If the optional "\fB-class\fR" parameter is specified, this list is -restricted to objects whose most-specific class is \fIclassName\fR. -If the optional "\fB-isa\fR" parameter is specified, this list is -further restricted to objects having the given \fIclassName\fR -anywhere in their heritage. - -.SH KEYWORDS -class, object, object-oriented diff --git a/itcl/itcl/doc/itclsh.1 b/itcl/itcl/doc/itclsh.1 deleted file mode 100644 index 6fe87d24aa1..00000000000 --- a/itcl/itcl/doc/itclsh.1 +++ /dev/null @@ -1,30 +0,0 @@ -'\" -'\" Copyright (c) 1996 Lucent Technologies -'\" -'\" See the file "license.terms" for information on usage and redistribution -'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -'\" $Id$ -'\" -.so man.macros -.TH itclsh 1 "" itcl "[incr\ Tcl]" -.BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -itclsh \- Simple shell for [incr Tcl] -.SH SYNOPSIS -\fBitclsh\fR ?\fIfileName arg arg ...\fR? -.BE - -.SH DESCRIPTION -.PP -\fBitclsh\fR is a shell-like application that reads Tcl commands -from its standard input, or from a file, and evaluates them. -It is just like \fBtclsh\fR, but includes the \fB[incr\ Tcl]\fR -extensions for object-oriented programming. -.PP -See the \fBtclsh\fR man page for details concerning usage. See -the \fBitcl\fR man page for an overview of \fB[incr\ Tcl]\fR. - -.SH KEYWORDS -Tcl, itcl, interpreter, script file, shell diff --git a/itcl/itcl/generic/itcl_obsolete.c b/itcl/itcl/generic/itcl_obsolete.c deleted file mode 100644 index 9aa20552ebf..00000000000 --- a/itcl/itcl/generic/itcl_obsolete.c +++ /dev/null @@ -1,1953 +0,0 @@ -/* - * ------------------------------------------------------------------------ - * PACKAGE: [incr Tcl] - * DESCRIPTION: Object-Oriented Extensions to Tcl - * - * [incr Tcl] provides object-oriented extensions to Tcl, much as - * C++ provides object-oriented extensions to C. It provides a means - * of encapsulating related procedures together with their shared data - * in a local namespace that is hidden from the outside world. It - * promotes code re-use through inheritance. More than anything else, - * it encourages better organization of Tcl applications through the - * object-oriented paradigm, leading to code that is easier to - * understand and maintain. - * - * Procedures in this file support the old-style syntax for [incr Tcl] - * class definitions: - * - * itcl_class <className> { - * inherit <base-class>... - * - * constructor {<arglist>} { <body> } - * destructor { <body> } - * - * method <name> {<arglist>} { <body> } - * proc <name> {<arglist>} { <body> } - * - * public <varname> ?<init>? ?<config>? - * protected <varname> ?<init>? - * common <varname> ?<init>? - * } - * - * This capability will be removed in a future release, after users - * have had a chance to switch over to the new syntax. - * - * ======================================================================== - * AUTHOR: Michael J. McLennan - * Bell Labs Innovations for Lucent Technologies - * mmclennan@lucent.com - * http://www.tcltk.com/itcl - * - * RCS: $Id$ - * ======================================================================== - * 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. - */ -#include "itclInt.h" - -/* - * FORWARD DECLARATIONS - */ -static int ItclOldClassCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); - -static int ItclOldMethodCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldPublicCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldProtectedCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldCommonCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); - -static int ItclOldBiDeleteCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiVirtualCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiPreviousCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); - -static int ItclOldBiInfoMethodsCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiInfoProcsCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiInfoPublicsCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiInfoProtectedsCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); -static int ItclOldBiInfoCommonsCmd _ANSI_ARGS_((ClientData cdata, - Tcl_Interp *interp, int objc, Tcl_Obj* CONST objv[])); - - -/* - * Standard list of built-in methods for old-style objects. - */ -typedef struct BiMethod { - char* name; /* method name */ - char* usage; /* string describing usage */ - char* registration; /* registration name for C proc */ - Tcl_ObjCmdProc *proc; /* implementation C proc */ -} BiMethod; - -static BiMethod BiMethodList[] = { - { "cget", "-option", - "@itcl-oldstyle-cget", Itcl_BiCgetCmd }, - { "configure", "?-option? ?value -option value...?", - "@itcl-oldstyle-configure", Itcl_BiConfigureCmd }, - { "delete", "", - "@itcl-oldstyle-delete", ItclOldBiDeleteCmd }, - { "isa", "className", - "@itcl-oldstyle-isa", Itcl_BiIsaCmd }, -}; -static int BiMethodListLen = sizeof(BiMethodList)/sizeof(BiMethod); - - -/* - * ------------------------------------------------------------------------ - * Itcl_OldInit() - * - * Invoked by Itcl_Init() whenever a new interpeter is created to add - * [incr Tcl] facilities. Adds the commands needed for backward - * compatibility with previous releases of [incr Tcl]. - * ------------------------------------------------------------------------ - */ -int -Itcl_OldInit(interp,info) - Tcl_Interp *interp; /* interpreter to be updated */ - ItclObjectInfo *info; /* info regarding all known objects */ -{ - int i; - Tcl_Namespace *parserNs, *oldBiNs; - - /* - * Declare all of the old-style built-in methods as C procedures. - */ - for (i=0; i < BiMethodListLen; i++) { - if (Itcl_RegisterObjC(interp, - BiMethodList[i].registration+1, BiMethodList[i].proc, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) != TCL_OK) { - - return TCL_ERROR; - } - } - - /* - * Create the "itcl::old-parser" namespace for backward - * compatibility, to handle the old-style class definitions. - */ - parserNs = Tcl_CreateNamespace(interp, "::itcl::old-parser", - (ClientData)info, Itcl_ReleaseData); - - if (!parserNs) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - " (cannot initialize itcl old-style parser)", - (char*)NULL); - return TCL_ERROR; - } - Itcl_PreserveData((ClientData)info); - - /* - * Add commands for parsing old-style class definitions. - */ - Tcl_CreateObjCommand(interp, "::itcl::old-parser::inherit", - Itcl_ClassInheritCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::constructor", - Itcl_ClassConstructorCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::destructor", - Itcl_ClassDestructorCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::method", - ItclOldMethodCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::proc", - Itcl_ClassProcCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::public", - ItclOldPublicCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::protected", - ItclOldProtectedCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-parser::common", - ItclOldCommonCmd, (ClientData)info, (Tcl_CmdDeleteProc*)NULL); - - /* - * Set the runtime variable resolver for the parser namespace, - * to control access to "common" data members while parsing - * the class definition. - */ - Tcl_SetNamespaceResolvers(parserNs, (Tcl_ResolveCmdProc*)NULL, - Itcl_ParseVarResolver, (Tcl_ResolveCompiledVarProc*)NULL); - - /* - * Create the "itcl::old-builtin" namespace for backward - * compatibility with the old-style built-in commands. - */ - Tcl_CreateObjCommand(interp, "::itcl::old-builtin::virtual", - ItclOldBiVirtualCmd, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); - - Tcl_CreateObjCommand(interp, "::itcl::old-builtin::previous", - ItclOldBiPreviousCmd, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); - - if (Itcl_CreateEnsemble(interp, "::itcl::old-builtin::info") != TCL_OK) { - return TCL_ERROR; - } - - if (Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "class", "", Itcl_BiInfoClassCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "inherit", "", Itcl_BiInfoInheritCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "heritage", "", Itcl_BiInfoHeritageCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "method", "?methodName? ?-args? ?-body?", - ItclOldBiInfoMethodsCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "proc", "?procName? ?-args? ?-body?", - ItclOldBiInfoProcsCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "public", "?varName? ?-init? ?-value? ?-config?", - ItclOldBiInfoPublicsCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "protected", "?varName? ?-init? ?-value?", - ItclOldBiInfoProtectedsCmd, - (ClientData)NULL,(Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "common", "?varName? ?-init? ?-value?", - ItclOldBiInfoCommonsCmd, - (ClientData)NULL,(Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "args", "procname", Itcl_BiInfoArgsCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK || - - Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "body", "procname", Itcl_BiInfoBodyCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK - ) { - return TCL_ERROR; - } - - /* - * Plug in an "@error" handler to handle other options from - * the usual info command. - */ - if (Itcl_AddEnsemblePart(interp, "::itcl::old-builtin::info", - "@error", (char*)NULL, Itcl_DefaultInfoCmd, - (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) - != TCL_OK - ) { - return TCL_ERROR; - } - - oldBiNs = Tcl_FindNamespace(interp, "::itcl::old-builtin", - (Tcl_Namespace*)NULL, TCL_LEAVE_ERR_MSG); - - if (!oldBiNs || - Tcl_Export(interp, oldBiNs, "*", /* resetListFirst */ 1) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Install the "itcl_class" and "itcl_info" commands into - * the global scope. This supports the old syntax for - * backward compatibility. - */ - Tcl_CreateObjCommand(interp, "::itcl_class", ItclOldClassCmd, - (ClientData)info, Itcl_ReleaseData); - Itcl_PreserveData((ClientData)info); - - - if (Itcl_CreateEnsemble(interp, "::itcl_info") != TCL_OK) { - return TCL_ERROR; - } - - if (Itcl_AddEnsemblePart(interp, "::itcl_info", - "classes", "?pattern?", - Itcl_FindClassesCmd, (ClientData)info, Itcl_ReleaseData) - != TCL_OK) { - return TCL_ERROR; - } - Itcl_PreserveData((ClientData)info); - - if (Itcl_AddEnsemblePart(interp, "::itcl_info", - "objects", "?-class className? ?-isa className? ?pattern?", - Itcl_FindObjectsCmd, (ClientData)info, Itcl_ReleaseData) - != TCL_OK) { - return TCL_ERROR; - } - Itcl_PreserveData((ClientData)info); - - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * Itcl_InstallOldBiMethods() - * - * Invoked when a class is first created, just after the class - * definition has been parsed, to add definitions for built-in - * methods to the class. If a method already exists in the class - * with the same name as the built-in, then the built-in is skipped. - * Otherwise, a method definition for the built-in method is added. - * - * Returns TCL_OK if successful, or TCL_ERROR (along with an error - * message in the interpreter) if anything goes wrong. - * ------------------------------------------------------------------------ - */ -int -Itcl_InstallOldBiMethods(interp, cdefn) - Tcl_Interp *interp; /* current interpreter */ - ItclClass *cdefn; /* class definition to be updated */ -{ - int result = TCL_OK; - - int i; - ItclHierIter hier; - ItclClass *cdPtr; - Tcl_HashEntry *entry; - - /* - * Scan through all of the built-in methods and see if - * that method already exists in the class. If not, add - * it in. - * - * TRICKY NOTE: The virtual tables haven't been built yet, - * so look for existing methods the hard way--by scanning - * through all classes. - */ - for (i=0; i < BiMethodListLen; i++) { - Itcl_InitHierIter(&hier, cdefn); - cdPtr = Itcl_AdvanceHierIter(&hier); - - entry = NULL; - while (cdPtr) { - entry = Tcl_FindHashEntry(&cdPtr->functions, BiMethodList[i].name); - if (entry) { - break; - } - cdPtr = Itcl_AdvanceHierIter(&hier); - } - Itcl_DeleteHierIter(&hier); - - if (!entry) { - result = Itcl_CreateMethod(interp, cdefn, BiMethodList[i].name, - BiMethodList[i].usage, BiMethodList[i].registration); - - if (result != TCL_OK) { - break; - } - } - } - return result; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldClassCmd() - * - * Invoked by Tcl whenever the user issues a "itcl_class" command to - * specify a class definition. Handles the following syntax: - * - * itcl_class <className> { - * inherit <base-class>... - * - * constructor {<arglist>} { <body> } - * destructor { <body> } - * - * method <name> {<arglist>} { <body> } - * proc <name> {<arglist>} { <body> } - * - * public <varname> ?<init>? ?<config>? - * protected <varname> ?<init>? - * common <varname> ?<init>? - * } - * - * NOTE: This command is will only be provided for a limited time, - * to support backward compatibility with the old-style - * [incr Tcl] syntax. Users should convert their scripts - * to use the newer syntax (Itcl_ClassCmd()) as soon as possible. - * - * ------------------------------------------------------------------------ - */ -static int -ItclOldClassCmd(clientData, interp, objc, objv) - ClientData clientData; /* info for all known objects */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclObjectInfo* info = (ItclObjectInfo*)clientData; - - int result; - char *className; - Tcl_Namespace *parserNs; - ItclClass *cdefnPtr; - Tcl_HashEntry* entry; - ItclMemberFunc *mfunc; - Tcl_CallFrame frame; - - if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "name { definition }"); - return TCL_ERROR; - } - className = Tcl_GetStringFromObj(objv[1], (int*)NULL); - - /* - * Find the namespace to use as a parser for the class definition. - * If for some reason it is destroyed, bail out here. - */ - parserNs = Tcl_FindNamespace(interp, "::itcl::old-parser", - (Tcl_Namespace*)NULL, TCL_LEAVE_ERR_MSG); - - if (parserNs == NULL) { - char msg[256]; - sprintf(msg, "\n (while parsing class definition for \"%.100s\")", - className); - Tcl_AddErrorInfo(interp, msg); - return TCL_ERROR; - } - - /* - * Try to create the specified class and its namespace. - */ - if (Itcl_CreateClass(interp, className, info, &cdefnPtr) != TCL_OK) { - return TCL_ERROR; - } - cdefnPtr->flags |= ITCL_OLD_STYLE; - - /* - * Import the built-in commands from the itcl::old-builtin - * and itcl::builtin namespaces. Do this before parsing the - * class definition, so methods/procs can override the built-in - * commands. - */ - result = Tcl_Import(interp, cdefnPtr->namesp, "::itcl::builtin::*", - /* allowOverwrite */ 1); - - if (result == TCL_OK) { - result = Tcl_Import(interp, cdefnPtr->namesp, "::itcl::old-builtin::*", - /* allowOverwrite */ 1); - } - - if (result != TCL_OK) { - char msg[256]; - sprintf(msg, "\n (while installing built-in commands for class \"%.100s\")", className); - Tcl_AddErrorInfo(interp, msg); - - Tcl_DeleteNamespace(cdefnPtr->namesp); - return TCL_ERROR; - } - - /* - * Push this class onto the class definition stack so that it - * becomes the current context for all commands in the parser. - * Activate the parser and evaluate the class definition. - */ - Itcl_PushStack((ClientData)cdefnPtr, &info->cdefnStack); - - result = Tcl_PushCallFrame(interp, &frame, parserNs, - /* isProcCallFrame */ 0); - - if (result == TCL_OK) { - result = Tcl_EvalObj(interp, objv[2]); - Tcl_PopCallFrame(interp); - } - Itcl_PopStack(&info->cdefnStack); - - if (result != TCL_OK) { - char msg[256]; - sprintf(msg, "\n (class \"%.200s\" body line %d)", - className, interp->errorLine); - Tcl_AddErrorInfo(interp, msg); - - Tcl_DeleteNamespace(cdefnPtr->namesp); - return TCL_ERROR; - } - - /* - * At this point, parsing of the class definition has succeeded. - * Add built-in methods such as "configure" and "cget"--as long - * as they don't conflict with those defined in the class. - */ - if (Itcl_InstallOldBiMethods(interp, cdefnPtr) != TCL_OK) { - Tcl_DeleteNamespace(cdefnPtr->namesp); - return TCL_ERROR; - } - - /* - * See if this class has a "constructor", and if it does, mark - * it as "old-style". This will allow the "config" argument - * to work. - */ - entry = Tcl_FindHashEntry(&cdefnPtr->functions, "constructor"); - if (entry) { - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - mfunc->member->flags |= ITCL_OLD_STYLE; - } - - /* - * Build the virtual tables for this class. - */ - Itcl_BuildVirtualTables(cdefnPtr); - - Tcl_ResetResult(interp); - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldMethodCmd() - * - * Invoked by Tcl during the parsing of a class definition whenever - * the "method" command is invoked to define an object method. - * Handles the following syntax: - * - * method <name> {<arglist>} {<body>} - * - * ------------------------------------------------------------------------ - */ -static int -ItclOldMethodCmd(clientData, interp, objc, objv) - ClientData clientData; /* info for all known objects */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclObjectInfo *info = (ItclObjectInfo*)clientData; - ItclClass *cdefn = (ItclClass*)Itcl_PeekStack(&info->cdefnStack); - - char *name, *arglist, *body; - Tcl_HashEntry *entry; - ItclMemberFunc *mfunc; - - if (objc != 4) { - Tcl_WrongNumArgs(interp, 1, objv, "name args body"); - return TCL_ERROR; - } - - name = Tcl_GetStringFromObj(objv[1], (int*)NULL); - if (Tcl_FindHashEntry(&cdefn->functions, name)) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "\"", name, "\" already defined in class \"", cdefn->name, "\"", - (char*)NULL); - return TCL_ERROR; - } - - arglist = Tcl_GetStringFromObj(objv[2], (int*)NULL); - body = Tcl_GetStringFromObj(objv[3], (int*)NULL); - - if (Itcl_CreateMethod(interp, cdefn, name, arglist, body) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Find the method that was just created and mark it as an - * "old-style" method, so that the magic "config" argument - * will be allowed to work. This is done for backward- - * compatibility with earlier releases. In the latest version, - * use of the "config" argument is discouraged. - */ - entry = Tcl_FindHashEntry(&cdefn->functions, name); - if (entry) { - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - mfunc->member->flags |= ITCL_OLD_STYLE; - } - - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldPublicCmd() - * - * Invoked by Tcl during the parsing of a class definition whenever - * the "public" command is invoked to define a public variable. - * Handles the following syntax: - * - * public <varname> ?<init>? ?<config>? - * - * ------------------------------------------------------------------------ - */ -static int -ItclOldPublicCmd(clientData, interp, objc, objv) - ClientData clientData; /* info for all known objects */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclObjectInfo *info = (ItclObjectInfo*)clientData; - ItclClass *cdefnPtr = (ItclClass*)Itcl_PeekStack(&info->cdefnStack); - - char *name, *init, *config; - ItclVarDefn *vdefn; - - if ((objc < 2) || (objc > 4)) { - Tcl_WrongNumArgs(interp, 1, objv, "varname ?init? ?config?"); - return TCL_ERROR; - } - - /* - * Make sure that the variable name does not contain anything - * goofy like a "::" scope qualifier. - */ - name = Tcl_GetStringFromObj(objv[1], (int*)NULL); - if (strstr(name, "::")) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad variable name \"", name, "\"", - (char*)NULL); - return TCL_ERROR; - } - - init = NULL; - config = NULL; - if (objc >= 3) { - init = Tcl_GetStringFromObj(objv[2], (int*)NULL); - } - if (objc >= 4) { - config = Tcl_GetStringFromObj(objv[3], (int*)NULL); - } - - if (Itcl_CreateVarDefn(interp, cdefnPtr, name, init, config, - &vdefn) != TCL_OK) { - - return TCL_ERROR; - } - - vdefn->member->protection = ITCL_PUBLIC; - - return TCL_OK; -} - -/* - * ------------------------------------------------------------------------ - * ItclOldProtectedCmd() - * - * Invoked by Tcl during the parsing of a class definition whenever - * the "protected" command is invoked to define a protected variable. - * Handles the following syntax: - * - * protected <varname> ?<init>? - * - * ------------------------------------------------------------------------ - */ -static int -ItclOldProtectedCmd(clientData, interp, objc, objv) - ClientData clientData; /* info for all known objects */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclObjectInfo *info = (ItclObjectInfo*)clientData; - ItclClass *cdefnPtr = (ItclClass*)Itcl_PeekStack(&info->cdefnStack); - - char *name, *init; - ItclVarDefn *vdefn; - - if ((objc < 2) || (objc > 3)) { - Tcl_WrongNumArgs(interp, 1, objv, "varname ?init?"); - return TCL_ERROR; - } - - /* - * Make sure that the variable name does not contain anything - * goofy like a "::" scope qualifier. - */ - name = Tcl_GetStringFromObj(objv[1], (int*)NULL); - if (strstr(name, "::")) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad variable name \"", name, "\"", - (char*)NULL); - return TCL_ERROR; - } - - if (objc == 3) { - init = Tcl_GetStringFromObj(objv[2], (int*)NULL); - } else { - init = NULL; - } - - if (Itcl_CreateVarDefn(interp, cdefnPtr, name, init, (char*)NULL, - &vdefn) != TCL_OK) { - - return TCL_ERROR; - } - - vdefn->member->protection = ITCL_PROTECTED; - - return TCL_OK; -} - -/* - * ------------------------------------------------------------------------ - * ItclOldCommonCmd() - * - * Invoked by Tcl during the parsing of a class definition whenever - * the "common" command is invoked to define a variable that is - * common to all objects in the class. Handles the following syntax: - * - * common <varname> ?<init>? - * - * ------------------------------------------------------------------------ - */ -static int -ItclOldCommonCmd(clientData, interp, objc, objv) - ClientData clientData; /* info for all known objects */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclObjectInfo *info = (ItclObjectInfo*)clientData; - ItclClass *cdefnPtr = (ItclClass*)Itcl_PeekStack(&info->cdefnStack); - - int newEntry; - char *name, *init; - ItclVarDefn *vdefn; - Tcl_HashEntry *entry; - Namespace *nsPtr; - Var *varPtr; - - if ((objc < 2) || (objc > 3)) { - Tcl_WrongNumArgs(interp, 1, objv, "varname ?init?"); - return TCL_ERROR; - } - - /* - * Make sure that the variable name does not contain anything - * goofy like a "::" scope qualifier. - */ - name = Tcl_GetStringFromObj(objv[1], (int*)NULL); - if (strstr(name, "::")) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad variable name \"", name, "\"", - (char*)NULL); - return TCL_ERROR; - } - - if (objc == 3) { - init = Tcl_GetStringFromObj(objv[2], (int*)NULL); - } else { - init = NULL; - } - - if (Itcl_CreateVarDefn(interp, cdefnPtr, name, init, (char*)NULL, - &vdefn) != TCL_OK) { - - return TCL_ERROR; - } - - vdefn->member->protection = ITCL_PROTECTED; - vdefn->member->flags |= ITCL_COMMON; - - /* - * Create the variable in the namespace associated with the - * class. Do this the hard way, to avoid the variable resolver - * procedures. These procedures won't work until we rebuild - * the virtual tables below. - */ - nsPtr = (Namespace*)cdefnPtr->namesp; - entry = Tcl_CreateHashEntry(&nsPtr->varTable, - vdefn->member->name, &newEntry); - - varPtr = _TclNewVar(); - varPtr->hPtr = entry; - varPtr->nsPtr = nsPtr; - varPtr->refCount++; /* protect from being deleted */ - - Tcl_SetHashValue(entry, varPtr); - - /* - * TRICKY NOTE: Make sure to rebuild the virtual tables for this - * class so that this variable is ready to access. The variable - * resolver for the parser namespace needs this info to find the - * variable if the developer tries to set it within the class - * definition. - * - * If an initialization value was specified, then initialize - * the variable now. - */ - Itcl_BuildVirtualTables(cdefnPtr); - - if (init) { - init = Tcl_SetVar(interp, vdefn->member->name, init, - TCL_NAMESPACE_ONLY); - - if (!init) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "cannot initialize common variable \"", - vdefn->member->name, "\"", - (char*)NULL); - return TCL_ERROR; - } - } - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldDeleteCmd() - * - * Invokes the destructors, and deletes the object that invoked this - * operation. If an error is encountered during destruction, the - * delete operation is aborted. Handles the following syntax: - * - * <objName> delete - * - * When an object is successfully deleted, it is removed from the - * list of known objects, and its access command is deleted. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiDeleteCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - ItclClass *contextClass; - ItclObject *contextObj; - - if (objc != 1) { - Tcl_WrongNumArgs(interp, 1, objv, ""); - return TCL_ERROR; - } - - /* - * If there is an object context, then destruct the object - * and delete it. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - if (!contextObj) { - Tcl_SetResult(interp, "improper usage: should be \"object delete\"", - TCL_STATIC); - return TCL_ERROR; - } - - if (Itcl_DeleteObject(interp, contextObj) != TCL_OK) { - return TCL_ERROR; - } - - Tcl_ResetResult(interp); - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldVirtualCmd() - * - * Executes the remainder of its command line arguments in the - * most-specific class scope for the current object. If there is - * no object context, this fails. - * - * NOTE: All methods are now implicitly virtual, and there are - * much better ways to manipulate scope. This command is only - * provided for backward-compatibility, and should be avoided. - * - * Returns a status TCL_OK/TCL_ERROR to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiVirtualCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - int result; - ItclClass *contextClass; - ItclObject *contextObj; - ItclContext context; - - if (objc == 1) { - Tcl_WrongNumArgs(interp, 1, objv, "command ?args...?"); - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "\n This command will be removed soon.", - "\n Commands are now virtual by default.", - (char*)NULL); - return TCL_ERROR; - } - - /* - * If there is no object context, then return an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - if (!contextObj) { - Tcl_ResetResult(interp); - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "cannot use \"virtual\" without an object context\n", - " This command will be removed soon.\n", - " Commands are now virtual by default.", - (char*)NULL); - return TCL_ERROR; - } - - /* - * Install the most-specific namespace for this object, with - * the object context as clientData. Invoke the rest of the - * args as a command in that namespace. - */ - if (Itcl_PushContext(interp, (ItclMember*)NULL, contextObj->classDefn, - contextObj, &context) != TCL_OK) { - - return TCL_ERROR; - } - - result = Itcl_EvalArgs(interp, objc-1, objv+1); - Itcl_PopContext(interp, &context); - - return result; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldPreviousCmd() - * - * Executes the remainder of its command line arguments in the - * previous class scope (i.e., the next scope up in the heritage - * list). - * - * NOTE: There are much better ways to manipulate scope. This - * command is only provided for backward-compatibility, and should - * be avoided. - * - * Returns a status TCL_OK/TCL_ERROR to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiPreviousCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - int result; - char *name; - ItclClass *contextClass, *base; - ItclObject *contextObj; - ItclMember *member; - ItclMemberFunc *mfunc; - Itcl_ListElem *elem; - Tcl_HashEntry *entry; - - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "command ?args...?"); - return TCL_ERROR; - } - - /* - * If the current context is not a class namespace, - * return an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Get the heritage information for this class and move one - * level up in the hierarchy. If there is no base class, - * return an error. - */ - elem = Itcl_FirstListElem(&contextClass->bases); - if (!elem) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "no previous class in inheritance hierarchy for \"", - contextClass->name, "\"", - (char*)NULL); - return TCL_ERROR; - } - base = (ItclClass*)Itcl_GetListValue(elem); - - /* - * Look in the command resolution table for the base class - * to find the desired method. - */ - name = Tcl_GetStringFromObj(objv[1], (int*)NULL); - entry = Tcl_FindHashEntry(&base->resolveCmds, name); - if (!entry) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "invalid command name \"", base->name, "::", name, "\"", - (char*)NULL); - return TCL_ERROR; - } - - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - member = mfunc->member; - - /* - * Make sure that this method is accessible. - */ - if (mfunc->member->protection != ITCL_PUBLIC) { - Tcl_Namespace *contextNs = Itcl_GetTrueNamespace(interp, - member->classDefn->info); - - if (!Itcl_CanAccessFunc(mfunc, contextNs)) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "can't access \"", member->fullname, "\": ", - Itcl_ProtectionStr(member->protection), " function", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Invoke the desired method by calling Itcl_EvalMemberCode. - * directly. This bypasses the virtual behavior built into - * the usual Itcl_ExecMethod handler. - */ - result = Itcl_EvalMemberCode(interp, mfunc, member, contextObj, - objc-1, objv+1); - - result = Itcl_ReportFuncErrors(interp, mfunc, contextObj, result); - - return result; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldBiInfoMethodsCmd() - * - * Returns information regarding methods for an object. This command - * can be invoked with or without an object context: - * - * <objName> info... <= returns info for most-specific class - * info... <= returns info for active namespace - * - * Handles the following syntax: - * - * info method ?methodName? ?-args? ?-body? - * - * If the ?methodName? is not specified, then a list of all known - * methods is returned. Otherwise, the information (args/body) for - * a specific method is returned. Returns a status TCL_OK/TCL_ERROR - * to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiInfoMethodsCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - char *methodName = NULL; - int methodArgs = 0; - int methodBody = 0; - - char *token; - ItclClass *contextClass, *cdefn; - ItclObject *contextObj; - ItclHierIter hier; - Tcl_HashSearch place; - Tcl_HashEntry *entry; - ItclMemberFunc *mfunc; - ItclMemberCode *mcode; - Tcl_Obj *objPtr, *listPtr; - - /* - * If this command is not invoked within a class namespace, - * signal an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * If there is an object context, then use the most-specific - * class for the object. Otherwise, use the current class - * namespace. - */ - if (contextObj) { - contextClass = contextObj->classDefn; - } - - /* - * Process args: ?methodName? ?-args? ?-body? - */ - objv++; /* skip over command name */ - objc--; - - if (objc > 0) { - methodName = Tcl_GetStringFromObj(*objv, (int*)NULL); - objc--; objv++; - } - for ( ; objc > 0; objc--, objv++) { - token = Tcl_GetStringFromObj(*objv, (int*)NULL); - if (strcmp(token, "-args") == 0) - methodArgs = ~0; - else if (strcmp(token, "-body") == 0) - methodBody = ~0; - else { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad option \"", token, "\": should be -args or -body", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Return info for a specific method. - */ - if (methodName) { - entry = Tcl_FindHashEntry(&contextClass->resolveCmds, methodName); - if (entry) { - int i, valc = 0; - Tcl_Obj *valv[5]; - - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - if ((mfunc->member->flags & ITCL_COMMON) != 0) { - return TCL_OK; - } - - /* - * If the implementation has not yet been defined, - * autoload it now. - */ - if (Itcl_GetMemberCode(interp, mfunc->member) != TCL_OK) { - return TCL_ERROR; - } - mcode = mfunc->member->code; - - if (!methodArgs && !methodBody) { - objPtr = Tcl_NewStringObj(mfunc->member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, mfunc->member->name, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - methodArgs = methodBody = ~0; - } - if (methodArgs) { - if (mcode->arglist) { - objPtr = Itcl_ArgList(mcode->argcount, mcode->arglist); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - else { - objPtr = Tcl_NewStringObj("", -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - } - if (methodBody) { - objPtr = mcode->procPtr->bodyPtr; - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - /* - * If the result list has a single element, then - * return it using Tcl_SetResult() so that it will - * look like a string and not a list with one element. - */ - if (valc == 1) { - objPtr = valv[0]; - } else { - objPtr = Tcl_NewListObj(valc, valv); - } - Tcl_SetObjResult(interp, objPtr); - - for (i=0; i < valc; i++) { - Tcl_DecrRefCount(valv[i]); - } - } - } - - /* - * Return the list of available methods. - */ - else { - listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL); - - Itcl_InitHierIter(&hier, contextClass); - while ((cdefn=Itcl_AdvanceHierIter(&hier)) != NULL) { - entry = Tcl_FirstHashEntry(&cdefn->functions, &place); - while (entry) { - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - - if ((mfunc->member->flags & ITCL_COMMON) == 0) { - objPtr = Tcl_NewStringObj(mfunc->member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, mfunc->member->name, -1); - - Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, - objPtr); - } - entry = Tcl_NextHashEntry(&place); - } - } - Itcl_DeleteHierIter(&hier); - - Tcl_SetObjResult(interp, listPtr); - } - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldBiInfoProcsCmd() - * - * Returns information regarding procs for a class. This command - * can be invoked with or without an object context: - * - * <objName> info... <= returns info for most-specific class - * info... <= returns info for active namespace - * - * Handles the following syntax: - * - * info proc ?procName? ?-args? ?-body? - * - * If the ?procName? is not specified, then a list of all known - * procs is returned. Otherwise, the information (args/body) for - * a specific proc is returned. Returns a status TCL_OK/TCL_ERROR - * to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiInfoProcsCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - char *procName = NULL; - int procArgs = 0; - int procBody = 0; - - char *token; - ItclClass *contextClass, *cdefn; - ItclObject *contextObj; - ItclHierIter hier; - Tcl_HashSearch place; - Tcl_HashEntry *entry; - ItclMemberFunc *mfunc; - ItclMemberCode *mcode; - Tcl_Obj *objPtr, *listPtr; - - /* - * If this command is not invoked within a class namespace, - * signal an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * If there is an object context, then use the most-specific - * class for the object. Otherwise, use the current class - * namespace. - */ - if (contextObj) { - contextClass = contextObj->classDefn; - } - - /* - * Process args: ?procName? ?-args? ?-body? - */ - objv++; /* skip over command name */ - objc--; - - if (objc > 0) { - procName = Tcl_GetStringFromObj(*objv, (int*)NULL); - objc--; objv++; - } - for ( ; objc > 0; objc--, objv++) { - token = Tcl_GetStringFromObj(*objv, (int*)NULL); - if (strcmp(token, "-args") == 0) - procArgs = ~0; - else if (strcmp(token, "-body") == 0) - procBody = ~0; - else { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad option \"", token, "\": should be -args or -body", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Return info for a specific proc. - */ - if (procName) { - entry = Tcl_FindHashEntry(&contextClass->resolveCmds, procName); - if (entry) { - int i, valc = 0; - Tcl_Obj *valv[5]; - - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - if ((mfunc->member->flags & ITCL_COMMON) == 0) { - return TCL_OK; - } - - /* - * If the implementation has not yet been defined, - * autoload it now. - */ - if (Itcl_GetMemberCode(interp, mfunc->member) != TCL_OK) { - return TCL_ERROR; - } - mcode = mfunc->member->code; - - if (!procArgs && !procBody) { - objPtr = Tcl_NewStringObj(mfunc->member->fullname, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - procArgs = procBody = ~0; - } - if (procArgs) { - if (mcode->arglist) { - objPtr = Itcl_ArgList(mcode->argcount, mcode->arglist); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - else { - objPtr = Tcl_NewStringObj("", -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - } - if (procBody) { - objPtr = mcode->procPtr->bodyPtr; - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - /* - * If the result list has a single element, then - * return it using Tcl_SetResult() so that it will - * look like a string and not a list with one element. - */ - if (valc == 1) { - objPtr = valv[0]; - } else { - objPtr = Tcl_NewListObj(valc, valv); - } - Tcl_SetObjResult(interp, objPtr); - - for (i=0; i < valc; i++) { - Tcl_DecrRefCount(valv[i]); - } - } - } - - /* - * Return the list of available procs. - */ - else { - listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL); - - Itcl_InitHierIter(&hier, contextClass); - while ((cdefn=Itcl_AdvanceHierIter(&hier)) != NULL) { - entry = Tcl_FirstHashEntry(&cdefn->functions, &place); - while (entry) { - mfunc = (ItclMemberFunc*)Tcl_GetHashValue(entry); - - if ((mfunc->member->flags & ITCL_COMMON) != 0) { - objPtr = Tcl_NewStringObj(mfunc->member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, mfunc->member->name, -1); - - Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, - objPtr); - } - entry = Tcl_NextHashEntry(&place); - } - } - Itcl_DeleteHierIter(&hier); - - Tcl_SetObjResult(interp, listPtr); - } - return TCL_OK; -} - - -/* - * ------------------------------------------------------------------------ - * ItclOldBiInfoPublicsCmd() - * - * Sets the interpreter result to contain information for public - * variables in the class. Handles the following syntax: - * - * info public ?varName? ?-init? ?-value? ?-config? - * - * If the ?varName? is not specified, then a list of all known public - * variables is returned. Otherwise, the information (init/value/config) - * for a specific variable is returned. Returns a status - * TCL_OK/TCL_ERROR to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiInfoPublicsCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - char *varName = NULL; - int varInit = 0; - int varCheck = 0; - int varValue = 0; - - char *token, *val; - ItclClass *contextClass; - ItclObject *contextObj; - - ItclClass *cdPtr; - ItclVarLookup *vlookup; - ItclVarDefn *vdefn; - ItclMember *member; - ItclHierIter hier; - Tcl_HashEntry *entry; - Tcl_HashSearch place; - Tcl_Obj *objPtr, *listPtr; - - /* - * If this command is not invoked within a class namespace, - * signal an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Process args: ?varName? ?-init? ?-value? ?-config? - */ - objv++; /* skip over command name */ - objc--; - - if (objc > 0) { - varName = Tcl_GetStringFromObj(*objv, (int*)NULL); - objc--; objv++; - } - for ( ; objc > 0; objc--, objv++) { - token = Tcl_GetStringFromObj(*objv, (int*)NULL); - if (strcmp(token, "-init") == 0) - varInit = ~0; - else if (strcmp(token, "-value") == 0) - varValue = ~0; - else if (strcmp(token, "-config") == 0) - varCheck = ~0; - else { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad option \"", token, - "\": should be -init, -value or -config", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Return info for a specific variable. - */ - if (varName) { - vlookup = NULL; - entry = Tcl_FindHashEntry(&contextClass->resolveVars, varName); - if (entry) { - vlookup = (ItclVarLookup*)Tcl_GetHashValue(entry); - if (vlookup->vdefn->member->protection != ITCL_PUBLIC) { - vlookup = NULL; - } - } - - if (vlookup) { - int i, valc = 0; - Tcl_Obj *valv[5]; - - member = vlookup->vdefn->member; - - if (!varInit && !varCheck && !varValue) { - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - varInit = varCheck = varValue = ~0; - } - if (varInit) { - val = (vlookup->vdefn->init) ? vlookup->vdefn->init : ""; - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - if (varValue) { - val = Itcl_GetInstanceVar(interp, member->fullname, - contextObj, contextObj->classDefn); - - if (!val) { - val = "<undefined>"; - } - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - if (varCheck) { - if (member->code && member->code->procPtr->bodyPtr) { - objPtr = member->code->procPtr->bodyPtr; - } else { - objPtr = Tcl_NewStringObj("", -1); - } - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - /* - * If the result list has a single element, then - * return it using Tcl_SetResult() so that it will - * look like a string and not a list with one element. - */ - if (valc == 1) { - objPtr = valv[0]; - } else { - objPtr = Tcl_NewListObj(valc, valv); - } - Tcl_SetObjResult(interp, objPtr); - - for (i=0; i < valc; i++) { - Tcl_DecrRefCount(valv[i]); - } - } - } - - /* - * Return the list of public variables. - */ - else { - listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL); - - Itcl_InitHierIter(&hier, contextClass); - cdPtr = Itcl_AdvanceHierIter(&hier); - while (cdPtr != NULL) { - entry = Tcl_FirstHashEntry(&cdPtr->variables, &place); - while (entry) { - vdefn = (ItclVarDefn*)Tcl_GetHashValue(entry); - member = vdefn->member; - - if ((member->flags & ITCL_COMMON) == 0 && - member->protection == ITCL_PUBLIC) { - - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - - Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, - objPtr); - } - entry = Tcl_NextHashEntry(&place); - } - cdPtr = Itcl_AdvanceHierIter(&hier); - } - Itcl_DeleteHierIter(&hier); - - Tcl_SetObjResult(interp, listPtr); - } - return TCL_OK; -} - -/* - * ------------------------------------------------------------------------ - * ItclOldBiInfoProtectedsCmd() - * - * Sets the interpreter result to contain information for protected - * variables in the class. Handles the following syntax: - * - * info protected ?varName? ?-init? ?-value? - * - * If the ?varName? is not specified, then a list of all known public - * variables is returned. Otherwise, the information (init/value) - * for a specific variable is returned. Returns a status - * TCL_OK/TCL_ERROR to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiInfoProtectedsCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - char *varName = NULL; - int varInit = 0; - int varValue = 0; - - char *token, *val; - ItclClass *contextClass; - ItclObject *contextObj; - - ItclClass *cdPtr; - ItclVarLookup *vlookup; - ItclVarDefn *vdefn; - ItclMember *member; - ItclHierIter hier; - Tcl_HashEntry *entry; - Tcl_HashSearch place; - Tcl_Obj *objPtr, *listPtr; - - /* - * If this command is not invoked within a class namespace, - * signal an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Process args: ?varName? ?-init? ?-value? - */ - objv++; /* skip over command name */ - objc--; - - if (objc > 0) { - varName = Tcl_GetStringFromObj(*objv, (int*)NULL); - objc--; objv++; - } - for ( ; objc > 0; objc--, objv++) { - token = Tcl_GetStringFromObj(*objv, (int*)NULL); - if (strcmp(token, "-init") == 0) - varInit = ~0; - else if (strcmp(token, "-value") == 0) - varValue = ~0; - else { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad option \"", token, "\": should be -init or -value", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Return info for a specific variable. - */ - if (varName) { - vlookup = NULL; - entry = Tcl_FindHashEntry(&contextClass->resolveVars, varName); - if (entry) { - vlookup = (ItclVarLookup*)Tcl_GetHashValue(entry); - if (vlookup->vdefn->member->protection != ITCL_PROTECTED) { - vlookup = NULL; - } - } - - if (vlookup) { - int i, valc = 0; - Tcl_Obj *valv[5]; - - member = vlookup->vdefn->member; - - if (!varInit && !varValue) { - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - varInit = varValue = ~0; - } - - /* - * If this is the built-in "this" variable, then - * report the object name as its initialization string. - */ - if (varInit) { - if ((member->flags & ITCL_THIS_VAR) != 0) { - if (contextObj && contextObj->accessCmd) { - objPtr = Tcl_NewStringObj("", -1); - Tcl_IncrRefCount(objPtr); - Tcl_GetCommandFullName(contextObj->classDefn->interp, - contextObj->accessCmd, objPtr); - valv[valc++] = objPtr; - } - else { - objPtr = Tcl_NewStringObj("<objectName>", -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - } - else { - val = (vlookup->vdefn->init) ? vlookup->vdefn->init : ""; - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - } - - if (varValue) { - val = Itcl_GetInstanceVar(interp, member->fullname, - contextObj, contextObj->classDefn); - - if (!val) { - val = "<undefined>"; - } - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - /* - * If the result list has a single element, then - * return it using Tcl_SetResult() so that it will - * look like a string and not a list with one element. - */ - if (valc == 1) { - objPtr = valv[0]; - } else { - objPtr = Tcl_NewListObj(valc, valv); - } - Tcl_SetObjResult(interp, objPtr); - - for (i=0; i < valc; i++) { - Tcl_DecrRefCount(valv[i]); - } - } - } - - /* - * Return the list of public variables. - */ - else { - listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL); - - Itcl_InitHierIter(&hier, contextClass); - cdPtr = Itcl_AdvanceHierIter(&hier); - while (cdPtr != NULL) { - entry = Tcl_FirstHashEntry(&cdPtr->variables, &place); - while (entry) { - vdefn = (ItclVarDefn*)Tcl_GetHashValue(entry); - member = vdefn->member; - - if ((member->flags & ITCL_COMMON) == 0 && - member->protection == ITCL_PROTECTED) { - - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - - Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, - objPtr); - } - entry = Tcl_NextHashEntry(&place); - } - cdPtr = Itcl_AdvanceHierIter(&hier); - } - Itcl_DeleteHierIter(&hier); - - Tcl_SetObjResult(interp, listPtr); - } - return TCL_OK; -} - -/* - * ------------------------------------------------------------------------ - * ItclOldBiInfoCommonsCmd() - * - * Sets the interpreter result to contain information for common - * variables in the class. Handles the following syntax: - * - * info common ?varName? ?-init? ?-value? - * - * If the ?varName? is not specified, then a list of all known common - * variables is returned. Otherwise, the information (init/value) - * for a specific variable is returned. Returns a status - * TCL_OK/TCL_ERROR to indicate success/failure. - * ------------------------------------------------------------------------ - */ -/* ARGSUSED */ -static int -ItclOldBiInfoCommonsCmd(dummy, interp, objc, objv) - ClientData dummy; /* not used */ - Tcl_Interp *interp; /* current interpreter */ - int objc; /* number of arguments */ - Tcl_Obj *CONST objv[]; /* argument objects */ -{ - char *varName = NULL; - int varInit = 0; - int varValue = 0; - - char *token, *val; - ItclClass *contextClass; - ItclObject *contextObj; - - ItclClass *cdPtr; - ItclVarDefn *vdefn; - ItclVarLookup *vlookup; - ItclMember *member; - ItclHierIter hier; - Tcl_HashEntry *entry; - Tcl_HashSearch place; - Tcl_Obj *objPtr, *listPtr; - - /* - * If this command is not invoked within a class namespace, - * signal an error. - */ - if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Process args: ?varName? ?-init? ?-value? - */ - objv++; /* skip over command name */ - objc--; - - if (objc > 0) { - varName = Tcl_GetStringFromObj(*objv, (int*)NULL); - objc--; objv++; - } - for ( ; objc > 0; objc--, objv++) { - token = Tcl_GetStringFromObj(*objv, (int*)NULL); - if (strcmp(token, "-init") == 0) - varInit = ~0; - else if (strcmp(token, "-value") == 0) - varValue = ~0; - else { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "bad option \"", token, "\": should be -init or -value", - (char*)NULL); - return TCL_ERROR; - } - } - - /* - * Return info for a specific variable. - */ - if (varName) { - vlookup = NULL; - entry = Tcl_FindHashEntry(&contextClass->resolveVars, varName); - if (entry) { - vlookup = (ItclVarLookup*)Tcl_GetHashValue(entry); - if (vlookup->vdefn->member->protection != ITCL_PROTECTED) { - vlookup = NULL; - } - } - - if (vlookup) { - int i, valc = 0; - Tcl_Obj *valv[5]; - - member = vlookup->vdefn->member; - - if (!varInit && !varValue) { - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - varInit = varValue = ~0; - } - if (varInit) { - val = (vlookup->vdefn->init) ? vlookup->vdefn->init : ""; - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - if (varValue) { - val = Itcl_GetCommonVar(interp, member->fullname, - contextObj->classDefn); - - if (!val) { - val = "<undefined>"; - } - objPtr = Tcl_NewStringObj(val, -1); - Tcl_IncrRefCount(objPtr); - valv[valc++] = objPtr; - } - - /* - * If the result list has a single element, then - * return it using Tcl_SetResult() so that it will - * look like a string and not a list with one element. - */ - if (valc == 1) { - objPtr = valv[0]; - } else { - objPtr = Tcl_NewListObj(valc, valv); - } - Tcl_SetObjResult(interp, objPtr); - - for (i=0; i < valc; i++) { - Tcl_DecrRefCount(valv[i]); - } - } - } - - /* - * Return the list of public variables. - */ - else { - listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL); - - Itcl_InitHierIter(&hier, contextClass); - cdPtr = Itcl_AdvanceHierIter(&hier); - while (cdPtr != NULL) { - entry = Tcl_FirstHashEntry(&cdPtr->variables, &place); - while (entry) { - vdefn = (ItclVarDefn*)Tcl_GetHashValue(entry); - member = vdefn->member; - - if ((member->flags & ITCL_COMMON) && - member->protection == ITCL_PROTECTED) { - - objPtr = Tcl_NewStringObj(member->classDefn->name, -1); - Tcl_AppendToObj(objPtr, "::", -1); - Tcl_AppendToObj(objPtr, member->name, -1); - - Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, - objPtr); - } - entry = Tcl_NextHashEntry(&place); - } - cdPtr = Itcl_AdvanceHierIter(&hier); - } - Itcl_DeleteHierIter(&hier); - - Tcl_SetObjResult(interp, listPtr); - } - return TCL_OK; -} diff --git a/itcl/itcl/mac/MW_ItclHeader.pch b/itcl/itcl/mac/MW_ItclHeader.pch deleted file mode 100644 index 53781d10643..00000000000 --- a/itcl/itcl/mac/MW_ItclHeader.pch +++ /dev/null @@ -1,74 +0,0 @@ -/* - * MW_TclHeader.pch -- - * - * This file is the source for a pre-compilied header that gets used - * for all files in the Tcl projects. This make compilies go a bit - * faster. This file is only intended to be used in the MetroWerks - * CodeWarrior environment. It essentially acts as a place to set - * compiler flags. See MetroWerks documention for more details. - * - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) MW_TclHeader.pch 1.27 97/11/20 18:45:25 - */ - -/* - * To use the compilied header you need to set the "Prefix file" in - * the "C/C++ Language" preference panel to point to the created - * compilied header. The name of the header depends on the - * architecture we are compiling for (see the code below). For - * example, for a 68k app the prefix file should be: MW_TclHeader68K. - */ -#if __POWERPC__ -#pragma precompile_target "MW_ItclHeaderPPC" -#include "MW_TclHeaderPPC" -#elif __CFM68K__ -#pragma precompile_target "MW_ItclHeaderCFM68K" -#include "MW_TclHeaderCFM68K" -#else -#pragma precompile_target "MW_ItclHeader68K" -#include "MW_TclHeader68K" -#endif - -/* - * Macintosh Tcl must be compiled with certain compiler options to - * ensure that it will work correctly. The following pragmas are - * used to ensure that those options are set correctly. An error - * will occur at compile time if they are not set correctly. - */ - -#if !__option(enumsalwaysint) -#error Tcl requires the Metrowerks setting "Enums always ints". -#endif - -#if !defined(__POWERPC__) -#if !__option(far_data) -#error Tcl requires the Metrowerks setting "Far data". -#endif -#endif - -#if !defined(__POWERPC__) -#if !__option(fourbyteints) -#error Tcl requires the Metrowerks setting "4 byte ints". -#endif -#endif - -#if !defined(__POWERPC__) -#if !__option(IEEEdoubles) -#error Tcl requires the Metrowerks setting "8 byte doubles". -#endif -#endif - -/* - * Place any includes below that will are needed by the majority of the - * and is OK to be in any file in the system. The pragma's are used - * to control what functions are exported in the Tcl shared library. - */ - -#pragma export on -#include "itcl.h" -#pragma export reset - diff --git a/itcl/itcl/mac/itclMacApplication.r b/itcl/itcl/mac/itclMacApplication.r deleted file mode 100644 index dedc8741477..00000000000 --- a/itcl/itcl/mac/itclMacApplication.r +++ /dev/null @@ -1,99 +0,0 @@ -/* - * tclMacApplication.r -- - * - * This file creates resources for use Tcl Shell application. - * It should be viewed as an example of how to create a new - * Tcl application using the shared Tcl libraries. - * - * Copyright (c) 1996 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tclMacApplication.r 1.1 96/09/11 21:12:54 - */ - -#include <Types.r> -#include <SysTypes.r> - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RESOURCE_INCLUDED -#include "tcl.h" -#include "itcl.h" -#include "itclPatch.h" - -/* Should really have one of these in itcl too, but for now... */ - -#if (TCL_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TCL_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TCL_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TCL_RELEASE_LEVEL == 2) -# define MINOR_VERSION (ITCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL -#else -# define MINOR_VERSION ITCL_MINOR_VERSION * 16 -#endif - -resource 'vers' (1) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - ITCL_PATCH_LEVEL ", by Michael McLennan © Lucent Technologies, Inc." -}; - -resource 'vers' (2) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - "Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998" -}; - -#define ITCL_APP_CREATOR 'ITcL' - -type ITCL_APP_CREATOR as 'STR '; -resource ITCL_APP_CREATOR (0, purgeable) { - "Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998" -}; - -/* - * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open - * to affect the text the Finder displays in the "kind" column and - * file info dialog. This information will be applied to all files - * with the listed creator and type. - */ - -resource 'kind' (128, "Itcl kind", purgeable) { - ITCL_APP_CREATOR, - 0, /* region = USA */ - { - 'APPL', "Itcl Shell", - } -}; - -/* - * The following resource is used when creating the 'env' variable in - * the Macintosh environment. The creation mechanisim looks for the - * 'STR#' resource named "Tcl Environment Variables" rather than a - * specific resource number. (In other words, feel free to change the - * resource id if it conflicts with your application.) Each string in - * the resource must be of the form "KEYWORD=SOME STRING". See Tcl - * documentation for futher information about the env variable. - * - * A good example of something you may want to set is: "TCL_LIBRARY=My - * disk:etc." - */ - -resource 'STR#' (128, "Tcl Environment Variables") { - { "SCHEDULE_NAME=Agent Controller Schedule", - "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler" - }; -}; - diff --git a/itcl/itcl/mac/itclMacLibrary.r b/itcl/itcl/mac/itclMacLibrary.r deleted file mode 100644 index d9076d44021..00000000000 --- a/itcl/itcl/mac/itclMacLibrary.r +++ /dev/null @@ -1,154 +0,0 @@ -/* - * tclMacLibrary.r -- - * - * This file creates resources used by the Tcl shared library. - * Many thanks go to "Jay Lieske, Jr." <lieske@princeton.edu> who - * wrote the initial version of this file. - * - * Copyright (c) 1996 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tclMacLibrary.r 1.3 96/09/12 17:40:07 - */ - -#include <Types.r> -#include <SysTypes.r> - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RESOURCE_INCLUDED -#include "tcl.h" -#include "itcl.h" - -#if (TCL_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TCL_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TCL_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TCL_RELEASE_LEVEL == 2) -# define MINOR_VERSION (ITCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL -#else -# define MINOR_VERSION ITCL_MINOR_VERSION * 16 -#endif - -resource 'vers' (1) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - ITCL_PATCH_LEVEL ", by Michael McLennan © Lucent Technologies, Inc." -}; - -resource 'vers' (2) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - "Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998" -}; - - -/* - * Currently the creator for all Tcl/Tk libraries and extensions - * should be 'TclL'. This will allow those extension and libraries - * to use the common icon for Tcl extensions. However, this signature - * still needs to be approved by the signature police at Apple and may - * change. - */ -#define ITCL_CREATOR 'ITcL' -#define TCL_LIBRARY_RESOURCES 2000 -#define ITCL_LIBRARY_RESOURCES 2000 - -/* - * The 'BNDL' resource is the primary link between a file's - * creator/type and its icon. This resource acts for all Tcl shared - * libraries; other libraries will not need one and ought to use - * custom icons rather than new file types for a different appearance. - */ - -resource 'BNDL' (TCL_LIBRARY_RESOURCES, "Tcl bundle", purgeable) -{ - ITCL_CREATOR, - 0, - { /* array TypeArray: 2 elements */ - /* [1] */ - 'FREF', - { /* array IDArray: 1 elements */ - /* [1] */ - 0, TCL_LIBRARY_RESOURCES - }, - /* [2] */ - 'ICN#', - { /* array IDArray: 1 elements */ - /* [1] */ - 0, TCL_LIBRARY_RESOURCES - } - } -}; - -resource 'FREF' (TCL_LIBRARY_RESOURCES, purgeable) -{ - 'shlb', 0, "" -}; - -type ITCL_CREATOR as 'STR '; -resource ITCL_CREATOR (0, purgeable) { - "Itcl Library " ITCL_PATCH_LEVEL " © 1993-1998" -}; - -/* - * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open - * to affect the text the Finder displays in the "kind" column and - * file info dialog. This information will be applied to all files - * with the listed creator and type. - */ - -resource 'kind' (TCL_LIBRARY_RESOURCES, "Itcl kind", purgeable) { - ITCL_CREATOR, - 0, /* region = USA */ - { - 'shlb', "Itcl Library" - } -}; - - -/* - * The -16397 string will be displayed by Finder when a user - * tries to open the shared library. The string should - * give the user a little detail about the library's capabilities - * and enough information to install the library in the correct location. - * A similar string should be placed in all shared libraries. - */ -resource 'STR ' (-16397, purgeable) { - "Itcl Library\n\n" - "This is one of the libraries needed to run the Itcl flavor of the Tool Command Language programs. " - "To work properly, it should be placed in the ŒTool Command Language¹ folder " - "within the Extensions folder." -}; - -/* - * The mechanisim below loads Tcl source into the resource fork of the - * application. The example below creates a TEXT resource named - * "Init" from the file "init.tcl". This allows applications to use - * Tcl to define the behavior of the application without having to - * require some predetermined file structure - all needed Tcl "files" - * are located within the application. To source a file for the - * resource fork the source command has been modified to support - * sourcing from resources. In the below case "source -rsrc {Init}" - * will load the TEXT resource named "Init". - */ - -#include "itclMacTclCode.r" - -data 'TEXT' (ITCL_LIBRARY_RESOURCES+1,"pkgIndex",purgeable, preload) { - "# Tcl package index file, version 1.0\n" - "package ifneeded Itcl 3.1 [list load [file join $dir itcl31[info sharedlibextension]] Itcl]\n" -}; - - diff --git a/itcl/itcl/mac/itclMacResource.r b/itcl/itcl/mac/itclMacResource.r deleted file mode 100644 index 6cc333f5c36..00000000000 --- a/itcl/itcl/mac/itclMacResource.r +++ /dev/null @@ -1,94 +0,0 @@ -/* - * tclMacResource.r -- - * - * This file creates resources for use in a simple shell. - * This is designed to be an example of using the Tcl libraries - * statically in a Macintosh Application. For an example of - * of using the dynamic libraries look at tclMacApplication.r. - * - * Copyright (c) 1993-94 Lockheed Missle & Space Company - * Copyright (c) 1994-96 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tclMacResource.r 1.14 96/09/11 21:14:36 - */ - -#include <Types.r> -#include <SysTypes.r> - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RESOURCE_INCLUDED -#include "tcl.h" -#include "itcl.h" -#include "itclPatch.h" - -#if (TCL_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TCL_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TCL_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TCL_RELEASE_LEVEL == 2) -# define MINOR_VERSION (ITCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL -#else -# define MINOR_VERSION ITCL_MINOR_VERSION * 16 -#endif - -resource 'vers' (1) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - ITCL_PATCH_LEVEL ", by Michael McLennan © Lucent Technologies, Inc." -}; - -resource 'vers' (2) { - ITCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - ITCL_PATCH_LEVEL, - "Simple Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998" -}; - -#define TCL_LIBRARY_RESOURCES 1000 -#define ITCL_LIBRARY_RESOURCES 2000 - -/* - * The mechanisim below loads Tcl source into the resource fork of the - * application. The example below creates a TEXT resource named - * "Init" from the file "init.tcl". This allows applications to use - * Tcl to define the behavior of the application without having to - * require some predetermined file structure - all needed Tcl "files" - * are located within the application. To source a file for the - * resource fork the source command has been modified to support - * sourcing from resources. In the below case "source -rsrc {Init}" - * will load the TEXT resource named "Init". - */ -read 'TEXT' (TCL_LIBRARY_RESOURCES, "Init", purgeable, preload) ":::tcl" TCL_VERSION ":library:init.tcl"; -read 'TEXT' (ITCL_LIBRARY_RESOURCES, "itcl", purgeable,preload) "::library:itcl.tcl"; - -/* - * The following resource is used when creating the 'env' variable in - * the Macintosh environment. The creation mechanisim looks for the - * 'STR#' resource named "Tcl Environment Variables" rather than a - * specific resource number. (In other words, feel free to change the - * resource id if it conflicts with your application.) Each string in - * the resource must be of the form "KEYWORD=SOME STRING". See Tcl - * documentation for futher information about the env variable. - * - * A good example of something you may want to set is: "TCL_LIBRARY=My - * disk:etc." - */ - -resource 'STR#' (128, "Tcl Environment Variables") { - { "SCHEDULE_NAME=Agent Controller Schedule", - "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler" - }; -}; - diff --git a/itcl/itcl/mac/itclMacTclCode.r b/itcl/itcl/mac/itclMacTclCode.r deleted file mode 100644 index 18411a7c8e3..00000000000 --- a/itcl/itcl/mac/itclMacTclCode.r +++ /dev/null @@ -1,32 +0,0 @@ -/* - * itclMacTclCode.r - * - * This file includes the Itcl code that is needed to startup Tcl. - * It is to be included either in the resource fork of the shared library, or in the - * resource fork of the application for a statically bound application. - * - * Jim Ingham - * Lucent Technologies 1996 - * - */ - -#include <Types.r> -#include <SysTypes.r> - - - -#define ITCL_LIBRARY_RESOURCES 2500 - -/* - * The mechanisim below loads Tcl source into the resource fork of the - * application. The example below creates a TEXT resource named - * "Init" from the file "init.tcl". This allows applications to use - * Tcl to define the behavior of the application without having to - * require some predetermined file structure - all needed Tcl "files" - * are located within the application. To source a file for the - * resource fork the source command has been modified to support - * sourcing from resources. In the below case "source -rsrc {Init}" - * will load the TEXT resource named "Init". - */ - -read 'TEXT' (ITCL_LIBRARY_RESOURCES, "itcl", purgeable,preload) "::library:itcl.tcl"; diff --git a/itcl/itcl/mac/itclStaticApplication.r b/itcl/itcl/mac/itclStaticApplication.r deleted file mode 100644 index 8fc2b09556a..00000000000 --- a/itcl/itcl/mac/itclStaticApplication.r +++ /dev/null @@ -1,26 +0,0 @@ -/* - * itkStaticPkgIndex.r -- - * - * This file creates resources which bind in the static version of the - * pkgIndex files. - * - * Copyright (c) 1996 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tkMacLibrary.r 1.5 96/10/03 17:54:21 - */ - -#include <Types.r> -#include <SysTypes.r> -#include <AEUserTermTypes.r> - -#define ITCL_LIBRARY_RESOURCES 2500 - -#include "itclMacTclCode.r" - -data 'TEXT' (ITCL_LIBRARY_RESOURCES+20,"itcl:pkgIndex",purgeable, preload) { - "# Tcl package index file, version 1.0\n" - "package ifneeded Itcl 2.2 {load {} Itcl}\n" -}; diff --git a/itcl/itcl/mac/pkgIndex.tcl b/itcl/itcl/mac/pkgIndex.tcl deleted file mode 100644 index 97a59dba370..00000000000 --- a/itcl/itcl/mac/pkgIndex.tcl +++ /dev/null @@ -1,3 +0,0 @@ -# Tcl package index file, version 1.0 - -package ifneeded Itcl 3.1 [list load [file join $dir itcl31[info sharedlibextension]] Itcl] diff --git a/itcl/itcl/mac/tclMacAppInit.c b/itcl/itcl/mac/tclMacAppInit.c deleted file mode 100644 index 4ef59bd5404..00000000000 --- a/itcl/itcl/mac/tclMacAppInit.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * tclMacAppInit.c -- - * - * Provides a version of the Tcl_AppInit procedure for the example shell. - * - * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tclMacAppInit.c 1.20 97/07/28 11:03:58 - */ - -/* include tclInt.h for access to namespace API */ -#include "tclInt.h" - -#include "tclInt.h" -#include "tclPort.h" -#include "tclMac.h" -#include "tclMacInt.h" - -#include "itcl.h" - -#if defined(THINK_C) -# include <console.h> -#elif defined(__MWERKS__) -# include <SIOUX.h> -short InstallConsole _ANSI_ARGS_((short fd)); -#endif - -#ifdef TCL_TEST -EXTERN int TclObjTest_Init _ANSI_ARGS_((Tcl_Interp *interp)); -EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); -#endif /* TCL_TEST */ - -/* - * Forward declarations for procedures defined later in this file: - */ - -static int MacintoshInit _ANSI_ARGS_((void)); - -/* - *---------------------------------------------------------------------- - * - * main -- - * - * Main program for tclsh. This file can be used as a prototype - * for other applications using the Tcl library. - * - * Results: - * None. This procedure never returns (it exits the process when - * it's done. - * - * Side effects: - * This procedure initializes the Macintosh world and then - * calls Tcl_Main. Tcl_Main will never return except to exit. - * - *---------------------------------------------------------------------- - */ - -void -main( - int argc, /* Number of arguments. */ - char **argv) /* Array of argument strings. */ -{ - char *newArgv[2]; - - if (MacintoshInit() != TCL_OK) { - Tcl_Exit(1); - } - - argc = 1; - newArgv[0] = "itclsh"; - newArgv[1] = NULL; - Tcl_Main(argc, newArgv, Tcl_AppInit); -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_AppInit -- - * - * This procedure performs application-specific initialization. - * Most applications, especially those that incorporate additional - * packages, will have their own version of this procedure. - * - * Results: - * Returns a standard Tcl completion code, and leaves an error - * message in interp->result if an error occurs. - * - * Side effects: - * Depends on the startup script. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_AppInit( - Tcl_Interp *interp) /* Interpreter for application. */ -{ - if (Tcl_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - -#ifdef TCL_TEST - if (Tcltest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) NULL); - if (TclObjTest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } -#endif /* TCL_TEST */ - - /* - * Call the init procedures for included packages. Each call should - * look like this: - * - * if (Mod_Init(interp) == TCL_ERROR) { - * return TCL_ERROR; - * } - * - * where "Mod" is the name of the module. - */ - if (Itcl_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "Itcl", Itcl_Init, Itcl_SafeInit); - - /* - * This is itclsh, so import all [incr Tcl] commands by - * default into the global namespace. Fix up the autoloader - * to do the same. - */ - if (Tcl_Import(interp, Tcl_GetGlobalNamespace(interp), - "::itcl::*", /* allowOverwrite */ 1) != TCL_OK) { - return TCL_ERROR; - } - - if (Tcl_Eval(interp, "auto_mkindex_parser::slavehook { _%@namespace import -force ::itcl::* }") != TCL_OK) { - return TCL_ERROR; - } - - /* - * Call Tcl_CreateCommand for application-specific commands, if - * they weren't already created by the init procedures called above. - * Each call would loo like this: - * - * Tcl_CreateCommand(interp, "tclName", CFuncCmd, NULL, NULL); - */ - - /* - * Specify a user-specific startup script to invoke if the application - * is run interactively. On the Mac we can specifiy either a TEXT resource - * which contains the script or the more UNIX like file location - * may also used. (I highly recommend using the resource method.) - */ - - Tcl_SetVar(interp, "tcl_rcRsrcName", "itclshrc", TCL_GLOBAL_ONLY); - /* Tcl_SetVar(interp, "tcl_rcFileName", "~/.itclshrc", TCL_GLOBAL_ONLY); */ - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * MacintoshInit -- - * - * This procedure calls initalization routines to set up a simple - * console on a Macintosh. This is necessary as the Mac doesn't - * have a stdout & stderr by default. - * - * Results: - * Returns TCL_OK if everything went fine. If it didn't the - * application should probably fail. - * - * Side effects: - * Inits the appropiate console package. - * - *---------------------------------------------------------------------- - */ - -static int -MacintoshInit() -{ -#if GENERATING68K && !GENERATINGCFM - SetApplLimit(GetApplLimit() - (TCL_MAC_68K_STACK_GROWTH)); -#endif - MaxApplZone(); - -#if defined(THINK_C) - - /* Set options for Think C console package */ - /* The console package calls the Mac init calls */ - console_options.pause_atexit = 0; - console_options.title = "\pTcl Interpreter"; - -#elif defined(__MWERKS__) - - /* Set options for CodeWarrior SIOUX package */ - SIOUXSettings.autocloseonquit = true; - SIOUXSettings.showstatusline = true; - SIOUXSettings.asktosaveonclose = false; - InstallConsole(0); - SIOUXSetTitle("\pTcl Interpreter"); - -#elif defined(applec) - - /* Init packages used by MPW SIOW package */ - InitGraf((Ptr)&qd.thePort); - InitFonts(); - InitWindows(); - InitMenus(); - TEInit(); - InitDialogs(nil); - InitCursor(); - -#endif - - Tcl_MacSetEventProc((Tcl_MacConvertEventPtr) SIOUXHandleOneEvent); - - /* No problems with initialization */ - return TCL_OK; -} diff --git a/itcl/itcl/tests/all b/itcl/itcl/tests/all deleted file mode 100644 index b8b15b09f16..00000000000 --- a/itcl/itcl/tests/all +++ /dev/null @@ -1,21 +0,0 @@ -# This file contains a top-level script to run all of the Tcl -# tests. Execute it by invoking "source all" when running tclTest -# in this directory. -# -# SCCS: @(#) all 1.7 96/02/16 08:55:38 -# ------------------------------------------------------------------ -# THIS SCRIPT IS NOW DEPRECATED! It is kept for older Tcl -# installations that don't have the "tcltest" package. -# Instead, use the "all.tcl" script to run the test suite. -# ------------------------------------------------------------------ - -foreach i [lsort [glob *.test]] { - if [string match l.*.test $i] { - # This is an SCCS lock file; ignore it. - continue - } - puts stdout $i - if [catch {source $i} msg] { - puts $msg - } -} diff --git a/itcl/itcl/tests/defs b/itcl/itcl/tests/defs deleted file mode 100644 index 68a3779c051..00000000000 --- a/itcl/itcl/tests/defs +++ /dev/null @@ -1,351 +0,0 @@ -# This file contains support code for the Tcl test suite. It is -# normally sourced by the individual files in the test suite before -# they run their tests. This improved approach to testing was designed -# and initially implemented by Mary Ann May-Pumphrey of Sun Microsystems. -# -# Copyright (c) 1990-1994 The Regents of the University of California. -# Copyright (c) 1994-1996 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# SCCS: @(#) defs 1.44 96/10/08 17:26:58 -# ------------------------------------------------------------------ -# THIS SCRIPT IS NOW DEPRECATED! It is kept for older Tcl -# installations that don't have the "tcltest" package. -# Instead, use "package require tcltest" in the test suite. -# ------------------------------------------------------------------ - -if ![info exists VERBOSE] { - set VERBOSE 0 -} -if ![info exists TESTS] { - set TESTS {} -} - -# If tests are being run as root, issue a warning message and set a -# variable to prevent some tests from running at all. - -set user {} -if {$tcl_platform(platform) == "unix"} { - catch {set user [exec whoami]} - if {$user == ""} { - catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user} - } - if {$user == ""} {set user root} - if {$user == "root"} { - puts stdout "Warning: you're executing as root. I'll have to" - puts stdout "skip some of the tests, since they'll fail as root." - } -} - -# Some of the tests don't work on some system configurations due to -# differences in word length, file system configuration, etc. In order -# to prevent false alarms, these tests are generally only run in the -# master development directory for Tcl. The presence of a file -# "doAllTests" in this directory is used to indicate that the non-portable -# tests should be run. - -set doNonPortableTests [file exists doAllTests] - -# If there is no "memory" command (because memory debugging isn't -# enabled), generate a dummy command that does nothing. - -if {[info commands memory] == ""} { - proc memory args {} -} - -# Check configuration information that will determine which tests -# to run. To do this, create an array testConfig. Each element -# has a 0 or 1 value, and the following elements are defined: -# unixOnly - 1 means this is a UNIX platform, so it's OK -# to run tests that only work under UNIX. -# macOnly - 1 means this is a Mac platform, so it's OK -# to run tests that only work on Macs. -# pcOnly - 1 means this is a PC platform, so it's OK to -# run tests that only work on PCs. -# unixOrPc - 1 means this is a UNIX or PC platform. -# macOrPc - 1 means this is a Mac or PC platform. -# macOrUnix - 1 means this is a Mac or UNIX platform. -# nonPortable - 1 means this the tests are being running in -# the master Tcl/Tk development environment; -# Some tests are inherently non-portable because -# they depend on things like word length, file system -# configuration, window manager, etc. These tests -# are only run in the main Tcl development directory -# where the configuration is well known. The presence -# of the file "doAllTests" in this directory indicates -# that it is safe to run non-portable tests. -# tempNotPc - The inverse of pcOnly. This flag is used to -# temporarily disable a test. -# nonBlockFiles - 1 means this platform supports setting files into -# nonblocking mode. -# asyncPipeClose- 1 means this platform supports async flush and -# async close on a pipe. -# unixExecs - 1 means this machine has commands such as 'cat', -# 'echo' etc available. - -catch {unset testConfig} - -package require Itcl - -if {$tcl_platform(platform) == "unix"} { - set testConfig(unixOnly) 1 - set testConfig(tempNotPc) 1 -} else { - set testConfig(unixOnly) 0 -} -if {$tcl_platform(platform) == "macintosh"} { - set testConfig(tempNotPc) 1 - set testConfig(macOnly) 1 -} else { - set testConfig(macOnly) 0 -} -if {$tcl_platform(platform) == "windows"} { - set testConfig(pcOnly) 1 -} else { - set testConfig(pcOnly) 0 -} -set testConfig(unixOrPc) [expr $testConfig(unixOnly) || $testConfig(pcOnly)] -set testConfig(macOrPc) [expr $testConfig(macOnly) || $testConfig(pcOnly)] -set testConfig(macOrUnix) [expr $testConfig(macOnly) || $testConfig(unixOnly)] -set testConfig(nonPortable) [file exists doAllTests] - -set f [open defs r] -if {[expr [catch {fconfigure $f -blocking off}]] == 0} { - set testConfig(nonBlockFiles) 1 -} else { - set testConfig(nonBlockFiles) 0 -} -close $f - -# Test for SCO Unix - cannot run async flushing tests because a potential -# problem with select is apparently interfering. (Mark Diekhans). - -if {$tcl_platform(platform) == "unix"} { - if {[catch {exec uname -X | fgrep {Release = 3.2v}}] == 0} { - set testConfig(asyncPipeClose) 0 - } else { - set testConfig(asyncPipeClose) 1 - } -} else { - set testConfig(asyncPipeClose) 1 -} - -# Test to see if execed commands such as cat, echo, rm and so forth are -# present on this machine. - -set testConfig(unixExecs) 1 -if {$tcl_platform(platform) == "macintosh"} { - set testConfig(unixExecs) 0 -} -if {($testConfig(unixExecs) == 1) && ($tcl_platform(platform) == "windows")} { - if {[catch {exec cat defs}] == 1} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && ([catch {exec echo hello}] == 1)} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && \ - ([catch {exec sh -c echo hello}] == 1)} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && ([catch {exec wc defs}] == 1)} { - set testConfig(unixExecs) 0 - } - if {$testConfig(unixExecs) == 1} { - exec echo hello > removeMe - if {[catch {exec rm removeMe}] == 1} { - set testConfig(unixExecs) 0 - } - } - if {($testConfig(unixExecs) == 1) && ([catch {exec sleep 1}] == 1)} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && \ - ([catch {exec fgrep unixExecs defs}] == 1)} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && ([catch {exec ps}] == 1)} { - set testConfig(unixExecs) 0 - } - if {($testConfig(unixExecs) == 1) && \ - ([catch {exec echo abc > removeMe}] == 0) && \ - ([catch {exec chmod 644 removeMe}] == 1) && \ - ([catch {exec rm removeMe}] == 0)} { - set testConfig(unixExecs) 0 - } else { - catch {exec rm -f removeMe} - } - if {($testConfig(unixExecs) == 1) && \ - ([catch {exec mkdir removeMe}] == 1)} { - set testConfig(unixExecs) 0 - } else { - catch {exec rm -r removeMe} - } - if {$testConfig(unixExecs) == 0} { - puts stdout "Warning: Unix-style executables are not available, so" - puts stdout "some tests will be skipped." - } -} - -proc print_verbose {name description script code answer} { - puts stdout "\n" - puts stdout "==== $name $description" - puts stdout "==== Contents of test case:" - puts stdout "$script" - if {$code != 0} { - if {$code == 1} { - puts stdout "==== Test generated error:" - puts stdout $answer - } elseif {$code == 2} { - puts stdout "==== Test generated return exception; result was:" - puts stdout $answer - } elseif {$code == 3} { - puts stdout "==== Test generated break exception" - } elseif {$code == 4} { - puts stdout "==== Test generated continue exception" - } else { - puts stdout "==== Test generated exception $code; message was:" - puts stdout $answer - } - } else { - puts stdout "==== Result was:" - puts stdout "$answer" - } -} - -# test -- -# This procedure runs a test and prints an error message if the -# test fails. If VERBOSE has been set, it also prints a message -# even if the test succeeds. The test will be skipped if it -# doesn't match the TESTS variable, or if one of the elements -# of "constraints" turns out not to be true. -# -# Arguments: -# name - Name of test, in the form foo-1.2. -# description - Short textual description of the test, to -# help humans understand what it does. -# constraints - A list of one or more keywords, each of -# which must be the name of an element in -# the array "testConfig". If any of these -# elements is zero, the test is skipped. -# This argument may be omitted. -# script - Script to run to carry out the test. It must -# return a result that can be checked for -# correctness. -# answer - Expected result from script. - -proc test {name description script answer args} { - global VERBOSE TESTS testConfig - if {[string compare $TESTS ""] != 0} then { - set ok 0 - foreach test $TESTS { - if [string match $test $name] then { - set ok 1 - break - } - } - if !$ok then return - } - set i [llength $args] - if {$i == 0} { - # Empty body - } elseif {$i == 1} { - # "constraints" argument exists; shuffle arguments down, then - # make sure that the constraints are satisfied. - - set constraints $script - set script $answer - set answer [lindex $args 0] - foreach constraint $constraints { - if {![info exists testConfig($constraint)] - || !$testConfig($constraint)} { - return - } - } - } else { - error "wrong # args: must be \"test name description ?constraints? script answer\"" - } - memory tag $name - set code [catch {uplevel $script} result] - if {$code != 0} { - print_verbose $name $description $script \ - $code $result - } elseif {[string compare $result $answer] == 0} then { - if $VERBOSE then { - if {$VERBOSE > 0} { - print_verbose $name $description $script \ - $code $result - } - puts stdout "++++ $name PASSED" - } - } else { - print_verbose $name $description $script \ - $code $result - puts stdout "---- Result should have been:" - puts stdout "$answer" - puts stdout "---- $name FAILED" - } -} - -proc dotests {file args} { - global TESTS - set savedTests $TESTS - set TESTS $args - source $file - set TESTS $savedTests -} - -proc normalizeMsg {msg} { - regsub "\n$" [string tolower $msg] "" msg - regsub -all "\n\n" $msg "\n" msg - regsub -all "\n\}" $msg "\}" msg - return $msg -} - -proc makeFile {contents name} { - set fd [open $name w] - fconfigure $fd -translation lf - if {[string index $contents [expr [string length $contents] - 1]] == "\n"} { - puts -nonewline $fd $contents - } else { - puts $fd $contents - } - close $fd -} - -proc removeFile {name} { - file delete $name -} - -proc makeDirectory {name} { - file mkdir $name -} - -proc removeDirectory {name} { - file delete -force $name -} - -proc viewFile {name} { - global tcl_platform testConfig - if {($tcl_platform(platform) == "macintosh") || \ - ($testConfig(unixExecs) == 0)} { - set f [open $name] - set data [read -nonewline $f] - close $f - return $data - } else { - exec cat $name - } -} - -# Locate tcltest executable - -set tcltest [list [info nameofexecutable]] -if {$tcltest == "{}"} { - set tcltest {} - puts "Unable to find tcltest executable, multiple process tests will fail." -} - - diff --git a/itcl/itcl/unix/tclAppInit.c b/itcl/itcl/unix/tclAppInit.c deleted file mode 100644 index 4835f6cd1fa..00000000000 --- a/itcl/itcl/unix/tclAppInit.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * tclAppInit.c -- - * - * Provides a default version of the main program and Tcl_AppInit - * procedure for Tcl applications (without Tk). - * - * Copyright (c) 1993 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * SCCS: @(#) tclAppInit.c 1.20 97/03/24 14:29:43 - */ - -#ifdef TCL_XT_TEST -#include <X11/Intrinsic.h> -#endif - -/* include tclInt.h for access to namespace API */ -#include "tclInt.h" - -#include "itcl.h" - -/* - * The following variable is a special hack that is needed in order for - * Sun shared libraries to be used for Tcl. - */ - -extern int matherr(); -int *tclDummyMathPtr = (int *) matherr; - - -#ifdef TCL_TEST -EXTERN int TclObjTest_Init _ANSI_ARGS_((Tcl_Interp *interp)); -EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); -#endif /* TCL_TEST */ -#ifdef TCL_XT_TEST -EXTERN int Tclxttest_Init _ANSI_ARGS_((Tcl_Interp *interp)); -#endif - -/* - *---------------------------------------------------------------------- - * - * main -- - * - * This is the main program for the application. - * - * Results: - * None: Tcl_Main never returns here, so this procedure never - * returns either. - * - * Side effects: - * Whatever the application does. - * - *---------------------------------------------------------------------- - */ - -int -main(argc, argv) - int argc; /* Number of command-line arguments. */ - char **argv; /* Values of command-line arguments. */ -{ -#ifdef TCL_XT_TEST - XtToolkitInitialize(); -#endif - Tcl_Main(argc, argv, Tcl_AppInit); - return 0; /* Needed only to prevent compiler warning. */ -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_AppInit -- - * - * This procedure performs application-specific initialization. - * Most applications, especially those that incorporate additional - * packages, will have their own version of this procedure. - * - * Results: - * Returns a standard Tcl completion code, and leaves an error - * message in interp->result if an error occurs. - * - * Side effects: - * Depends on the startup script. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_AppInit(interp) - Tcl_Interp *interp; /* Interpreter for application. */ -{ - if (Tcl_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - -#ifdef TCL_TEST -#ifdef TCL_XT_TEST - if (Tclxttest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } -#endif - if (Tcltest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) NULL); - if (TclObjTest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } -#endif /* TCL_TEST */ - - /* - * Call the init procedures for included packages. Each call should - * look like this: - * - * if (Mod_Init(interp) == TCL_ERROR) { - * return TCL_ERROR; - * } - * - * where "Mod" is the name of the module. - */ - if (Itcl_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "Itcl", Itcl_Init, Itcl_SafeInit); - - /* - * This is itclsh, so import all [incr Tcl] commands by - * default into the global namespace. Fix up the autoloader - * to do the same. - */ - if (Tcl_Import(interp, Tcl_GetGlobalNamespace(interp), - "::itcl::*", /* allowOverwrite */ 1) != TCL_OK) { - return TCL_ERROR; - } - - if (Tcl_Eval(interp, "auto_mkindex_parser::slavehook { _%@namespace import -force ::itcl::* }") != TCL_OK) { - return TCL_ERROR; - } - - /* - * Call Tcl_CreateCommand for application-specific commands, if - * they weren't already created by the init procedures called above. - */ - - /* - * Specify a user-specific startup file to invoke if the application - * is run interactively. Typically the startup file is "~/.apprc" - * where "app" is the name of the application. If this line is deleted - * then no user-specific startup file will be run under any conditions. - */ - - Tcl_SetVar(interp, "tcl_rcFileName", "~/.itclshrc", TCL_GLOBAL_ONLY); - return TCL_OK; -} diff --git a/itcl/license.terms b/itcl/license.terms deleted file mode 100644 index 296de7fd7fc..00000000000 --- a/itcl/license.terms +++ /dev/null @@ -1,83 +0,0 @@ -This software is copyrighted by Cadence Design Systems, Inc., and other -parties. The following terms apply to all files associated with the -software unless explicitly disclaimed in individual files. - -The authors hereby grant permission to use, copy, modify, distribute, -and license this software and its documentation for any purpose, provided -that existing copyright notices are retained in all copies and that this -notice is included verbatim in any distributions. No written agreement, -license, or royalty fee is required for any of the authorized uses. -Modifications to this software may be copyrighted by their authors -and need not follow the licensing terms described here, provided that -the new terms are clearly indicated on the first page of each file where -they apply. - -IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY -FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY -DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE -IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE -NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -MODIFICATIONS. - -GOVERNMENT USE: If you are acquiring this software on behalf of the -U.S. government, the Government shall have only "Restricted Rights" -in the software and related documentation as defined in the Federal -Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you -are acquiring the software on behalf of the Department of Defense, the -software shall be classified as "Commercial Computer Software" and the -Government shall have only "Restricted Rights" as defined in Clause -252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the -authors grant the U.S. Government and others acting in its behalf -permission to use and distribute the software in accordance with the -terms specified in this license. - ------------------------------------------------------------------------ - Following is the original agreement for the Tcl/Tk software from - Sun Microsystems. ------------------------------------------------------------------------ - -This software is copyrighted by the Regents of the University of -California, Sun Microsystems, Inc., and other parties. The following -terms apply to all files associated with the software unless explicitly -disclaimed in individual files. - -The authors hereby grant permission to use, copy, modify, distribute, -and license this software and its documentation for any purpose, provided -that existing copyright notices are retained in all copies and that this -notice is included verbatim in any distributions. No written agreement, -license, or royalty fee is required for any of the authorized uses. -Modifications to this software may be copyrighted by their authors -and need not follow the licensing terms described here, provided that -the new terms are clearly indicated on the first page of each file where -they apply. - -IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY -FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY -DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE -IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE -NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -MODIFICATIONS. - -GOVERNMENT USE: If you are acquiring this software on behalf of the -U.S. government, the Government shall have only "Restricted Rights" -in the software and related documentation as defined in the Federal -Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you -are acquiring the software on behalf of the Department of Defense, the -software shall be classified as "Commercial Computer Software" and the -Government shall have only "Restricted Rights" as defined in Clause -252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the -authors grant the U.S. Government and others acting in its behalf -permission to use and distribute the software in accordance with the -terms specified in this license. diff --git a/itcl/makefile.bc b/itcl/makefile.bc deleted file mode 100644 index 4a59049ab8b..00000000000 --- a/itcl/makefile.bc +++ /dev/null @@ -1,115 +0,0 @@ -# Borland 5.01 Makefile for Itcl 2.2 Distribution
-#
-# This is the main Borland makefile for the Windows distribution
-# of [incr Tcl] version 2.2.
-
-#
-# TOOLS -- path to root of Borland Directory
-# TARGET_ROOT -- Target Directory for installation
-# SOURCE_ROOT -- Path to root of source tree
-
-TOOLS = c:\bc45
-TARGET_ROOT = c:\Program files\Itcl2.2
-SOURCE_ROOT = c:\Itcl2.2
-
-#
-# You should not have to modify anything further in this makefile
-#
-
-#
-# Borland C++ tools
-#
-
-BORLAND = $(TOOLS)
-IMPLIB = $(BORLAND)\bin\Implib
-BCC32 = $(BORLAND)\bin\Bcc32
-TLINK32 = $(BORLAND)\bin\tlink32
-RC = $(BORLAND)\bin\brcc32
-BCC = $(BORLAND)\bin\Bcc
-TLINK = $(BORLAND)\bin\tlink
-RC16 = $(BORLAND)\bin\brcc32 -31
-MAKE = $(BORLAND)\bin\make -fmakefile.bc
-
-#
-# System calls
-#
-
-CP = copy
-RM = del
-MKDIR = -mkdir
-
-#
-# Source and Build Paths
-#
-
-TCLDIR = $(SOURCE_ROOT)\Tcl7.6
-TKDIR = $(SOURCE_ROOT)\Tk4.2
-ITCLDIR = $(SOURCE_ROOT)\Itcl
-ITKDIR = $(SOURCE_ROOT)\Itk
-IWIDGETSDIR = $(SOURCE_ROOT)\Iwidgets2.2.0
-
-#
-# Target Paths
-#
-
-TARGET_BIN = $(TARGET_ROOT)\Bin
-TARGET_LIB_ROOT = $(TARGET_ROOT)\Lib
-TARGET_LIB = $(TARGET_LIB_ROOT)\Itcl
-TARGET_INCLUDE_ROOT = $(TARGET_ROOT)\Include
-TARGET_INCLUDE = $(TARGET_INCLUDE_ROOT)\Itcl
-TARGET_DOC = $(TARGET_ROOT)\Html
-
-#
-# Shared Target Files:
-#
-
-TCLLIB = Tcl76i.lib
-TCLDLL = Tcl76i.dll
-TKLIB = Tk42i.lib
-TKDLL = Tk42i.dll
-ITCLLIB = Itcl22.lib
-ITCLDLL = Itcl22.dll
-ITKLIB = Itk22.lib
-ITKDLL = Itk22.dll
-
-#
-# Paths to Build locations of libraries
-#
-TCLLIBDIR = $(TCLDIR)\Win
-TKLIBDIR = $(TKDIR)\Win
-ITCLLIBDIR = $(ITCLDIR)\Win
-ITKLIBDIR = $(ITKDIR)\Win
-
-
-dist:
- cd $(TCLDIR)\Win
- $(MAKE) all
- cd $(TKDIR)\Win
- $(MAKE) all
- cd $(ITCLDIR)\Win
- $(MAKE) all
- cd $(ITKDIR)\Win
- $(MAKE) all
-
-dist-install:
- cd $(TCLDIR)\Win
- $(MAKE) install
- cd $(TKDIR)\Win
- $(MAKE) install
- cd $(ITCLDIR)\Win
- $(MAKE) install
- cd $(ITKDIR)\Win
- $(MAKE) install
- cd $(IWIDGETSDIR)\Win
- $(MAKE) install
-
-dist-clean:
- cd $(TCLDIR)\Win
- $(MAKE) clean
- cd $(TKDIR)\Win
- $(MAKE) clean
- cd $(ITCLDIR)\Win
- $(MAKE) clean
- cd $(ITKDIR)\Win
- $(MAKE) clean
-
diff --git a/itcl/makefile.vc b/itcl/makefile.vc deleted file mode 100644 index 7a79939772e..00000000000 --- a/itcl/makefile.vc +++ /dev/null @@ -1,45 +0,0 @@ -######################################################################
-#
-# Microsoft Visual C++ 5.0+ makefile for [Incr Tcl/Tk].
-#
-######################################################################
-#
-# This is the main Visual C++ makefile for the Win32 distribution
-# of [incr Tcl/Tk]. To compile the distribution using Visual C++,
-# first open "config.vc" and follow the directions for editing the
-# approriate values for your setup. This is not the TEA makefile.
-#
-######################################################################
-# $Id$
-######################################################################
-
-!include "rules.vc"
-!include "config.vc"
-
-MAKECMD = nmake.exe -nologo /$(MAKEFLAGS) -f makefile.vc
-
-release :
- cd itcl\win
- $(MAKECMD) release
- cd ..\..\itk\win
- $(MAKECMD) release
-
-docs :
- @echo "ack!"
-
-install :
- cd itcl\win
- $(MAKECMD) install
- cd ..\..\itk\win
- $(MAKECMD) install
- if exist ..\..\iwidgets\nul ( \
- cd ..\..\iwidgets\win &\
- $(MAKECMD) install \
- )
-
-#dist-clean:
-# cd $(ITCLDIR)\Win
-# $(MAKECMD) clean
-# cd $(ITKDIR)\Win
-# $(MAKECMD) clean
-
diff --git a/itcl/pkg.vc b/itcl/pkg.vc deleted file mode 100644 index fad1ca28dd6..00000000000 --- a/itcl/pkg.vc +++ /dev/null @@ -1,19 +0,0 @@ -######################################################################
-#
-# Global package version numbers for the build.
-#
-######################################################################
-# $Id$
-######################################################################
-
-# remember to change itcl/generic/itcl.h, too.
-# don't add patchlevel!
-
-!ifndef ITCL_DOTVERSION
-ITCL_DOTVERSION = 3.2
-!endif
-
-ITCL_VERSION = $(ITCL_DOTVERSION:.=)
-ITK_DOTVERSION = $(ITCL_DOTVERSION)
-ITK_VERSION = $(ITCL_VERSION)
-
diff --git a/itcl/rules.vc b/itcl/rules.vc deleted file mode 100644 index 1d26dd62118..00000000000 --- a/itcl/rules.vc +++ /dev/null @@ -1,68 +0,0 @@ -######################################################################
-# rules.vc --
-#
-# Simple set of standard rules for the VC++ makefiles.
-#
-######################################################################
-# $Id$
-######################################################################
-
-######################################################################
-# a bug fix needed for VC++ 6.0's nmake tool.
-#
-# Reset the version *string* back to the integer it's supposed to be.
-# More entries will have to be made here for all subsiquent nmake
-# versions until Microsoft fixes it.
-#
-_NMAKE_VER = $(_NMAKE_VER:6.00.8168.0=600)
-######################################################################
-
-
-######################################################################
-# Commandline checks and over-rides
-######################################################################
-
-!ifndef HAVE_RULES
-HAVE_RULES = 1
-
-# Set DEBUG to 1 to compile with symbols.
-#
-!ifndef DEBUG
-DEBUG = 0
-!endif
-
-# Set STATIC_BUILD to 1 to make a static library rather
-# than a dll.
-#
-!ifndef STATIC_BUILD
-STATIC_BUILD = 0
-!endif
-
-# Set USE_TCL_STUBS to 0 to disable Stubs support. Stubs
-# will work fine even with static libraries, but you may
-# disable it if you want to.
-#
-!ifndef USE_TCL_STUBS
-!if $(STATIC_BUILD) == 0
-USE_TCL_STUBS = 1
-!else
-USE_TCL_STUBS = 0
-!endif
-!endif
-
-# Set NOMSVCRT to 1 to use libcmt(d).lib instead of the
-# dynamic run-time.
-#
-!ifndef NOMSVCRT
-!if $(STATIC_BUILD)
-NOMSVCRT = 1
-!else
-NOMSVCRT = 0
-!endif
-!endif
-
-!if $(STATIC_BUILD) == 0 && $(NOMSVCRT) == 1
-!error "The static runtime in a loadable (dll) extension is a useless configuration that will cause abnormal and unnecessary code bloat."
-!endif
-
-!endif #!ifndef HAVE_RULES
diff --git a/itcl/tcl.m4 b/itcl/tcl.m4 deleted file mode 100644 index 71578ac3d39..00000000000 --- a/itcl/tcl.m4 +++ /dev/null @@ -1,2283 +0,0 @@ -# tcl.m4 -- -# -# This file provides a set of autoconf macros to help TEA-enable -# a Tcl extension. -# -# Copyright (c) 1999 Scriptics Corporation. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -#------------------------------------------------------------------------ -# SC_PATH_TCLCONFIG -- -# -# Locate the tclConfig.sh file and perform a sanity check on -# the Tcl compile flags -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tcl=... -# -# Defines the following vars: -# TCL_BIN_DIR Full path to the directory containing -# the tclConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TCLCONFIG, [ - # - # Ok, lets find the tcl configuration - # First, look for one uninstalled. - # the alternative search directory is invoked by --with-tcl - # - - if test x"${no_tcl}" = x ; then - # we reset no_tcl in case something fails here - no_tcl=true - AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) - AC_MSG_CHECKING([for Tcl configuration]) - AC_CACHE_VAL(ac_cv_c_tclconfig,[ - - # First check to see if --with-tcl was specified. - if test x"${with_tclconfig}" != x ; then - if test -f "${with_tclconfig}/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` - else - AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) - fi - fi - - # then check for a private Tcl installation - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ../tcl \ - `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ - ../../tcl \ - `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ - ../../../tcl \ - `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - - # check in a few common install locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in `ls -d ${prefix}/lib 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` ; do - if test -f "$i/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i; pwd)` - break - fi - done - fi - - # check in a few other private locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ${srcdir}/../tcl \ - `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - ]) - - if test x"${ac_cv_c_tclconfig}" = x ; then - TCL_BIN_DIR="# no Tcl configs found" - AC_MSG_WARN(Can't find Tcl configuration definitions) - exit 0 - else - no_tcl= - TCL_BIN_DIR=${ac_cv_c_tclconfig} - AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh) - fi - fi -]) - -#------------------------------------------------------------------------ -# SC_PATH_TKCONFIG -- -# -# Locate the tkConfig.sh file -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tk=... -# -# Defines the following vars: -# TK_BIN_DIR Full path to the directory containing -# the tkConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TKCONFIG, [ - # - # Ok, lets find the tk configuration - # First, look for one uninstalled. - # the alternative search directory is invoked by --with-tk - # - - if test x"${no_tk}" = x ; then - # we reset no_tk in case something fails here - no_tk=true - AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) - AC_MSG_CHECKING([for Tk configuration]) - AC_CACHE_VAL(ac_cv_c_tkconfig,[ - - # First check to see if --with-tkconfig was specified. - if test x"${with_tkconfig}" != x ; then - if test -f "${with_tkconfig}/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` - else - AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) - fi - fi - - # then check for a private Tk library - if test x"${ac_cv_c_tkconfig}" = x ; then - for i in \ - ../tk \ - `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ - ../../tk \ - `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ - ../../../tk \ - `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do - if test -f "$i/unix/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - # check in a few common install locations - if test x"${ac_cv_c_tkconfig}" = x ; then - for i in `ls -d ${prefix}/lib 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` ; do - if test -f "$i/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i; pwd)` - break - fi - done - fi - # check in a few other private locations - if test x"${ac_cv_c_tkconfig}" = x ; then - for i in \ - ${srcdir}/../tk \ - `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do - if test -f "$i/unix/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - ]) - if test x"${ac_cv_c_tkconfig}" = x ; then - TK_BIN_DIR="# no Tk configs found" - AC_MSG_WARN(Can't find Tk configuration definitions) - exit 0 - else - no_tk= - TK_BIN_DIR=${ac_cv_c_tkconfig} - AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh) - fi - fi - -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TCLCONFIG -- -# -# Load the tclConfig.sh file -# -# Arguments: -# -# Requires the following vars to be set: -# TCL_BIN_DIR -# -# Results: -# -# Subst the following vars: -# TCL_BIN_DIR -# TCL_SRC_DIR -# TCL_LIB_FILE -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TCLCONFIG, [ - AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) - - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then - AC_MSG_RESULT([loading]) - . $TCL_BIN_DIR/tclConfig.sh - else - AC_MSG_RESULT([file not found]) - fi - - # - # The eval is required to do the TCL_DBGX substitution in the - # TCL_LIB_FILE variable - # - - eval TCL_LIB_FILE=${TCL_LIB_FILE} - eval TCL_LIB_FLAG=${TCL_LIB_FLAG} - - AC_SUBST(TCL_DBGX) - AC_SUBST(TCL_BIN_DIR) - AC_SUBST(TCL_SRC_DIR) - AC_SUBST(TCL_LIB_FILE) - AC_SUBST(TCL_LIBS) - AC_SUBST(TCL_DEFS) - AC_SUBST(TCL_SHLIB_LD_LIBS) - AC_SUBST(TCL_EXTRA_CFLAGS) - AC_SUBST(TCL_LD_FLAGS) - AC_SUBST(TCL_LIB_FILE) - AC_SUBST(TCL_STUB_LIB_FILE) - AC_SUBST(TCL_LIB_SPEC) - AC_SUBST(TCL_BUILD_LIB_SPEC) - AC_SUBST(TCL_STUB_LIB_SPEC) - AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TKCONFIG -- -# -# Load the tkConfig.sh file -# -# Arguments: -# -# Requires the following vars to be set: -# TK_BIN_DIR -# -# Results: -# -# Sets the following vars that should be in tkConfig.sh: -# TK_BIN_DIR -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TKCONFIG, [ - AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) - - if test -f "$TK_BIN_DIR/tkConfig.sh" ; then - AC_MSG_RESULT([loading]) - . $TK_BIN_DIR/tkConfig.sh - else - AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) - fi - - AC_SUBST(TK_BIN_DIR) - AC_SUBST(TK_SRC_DIR) - AC_SUBST(TK_LIB_FILE) - AC_SUBST(TK_XINCLUDES) -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_GCC -- -# -# Allows the use of GCC if available -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-gcc -# -# Sets the following vars: -# CC Command to use for the compiler -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_GCC, [ - AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], - [ok=$enableval], [ok=no]) - if test "$ok" = "yes"; then - CC=gcc - else - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) - CC=cl - ;; - *) - CC=${CC-cc} - ;; - esac - fi - AC_PROG_CC -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SHARED -- -# -# Allows the building of shared libraries -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-shared=yes|no -# -# Defines the following vars: -# STATIC_BUILD Used for building import/export libraries -# on Windows. -# -# Sets the following vars: -# SHARED_BUILD Value of 1 or 0 -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SHARED, [ - AC_MSG_CHECKING([how to build libraries]) - AC_ARG_ENABLE(shared, - [ --enable-shared build and link with shared libraries [--enable-shared]], - [tcl_ok=$enableval], [tcl_ok=yes]) - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - AC_MSG_RESULT([shared]) - SHARED_BUILD=1 - else - AC_MSG_RESULT([static]) - SHARED_BUILD=0 - AC_DEFINE(STATIC_BUILD) - fi -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_THREADS -- -# -# Specify if thread support should be enabled -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-threads -# -# Sets the following vars: -# THREADS_LIBS Thread library(s) -# -# Defines the following vars: -# TCL_THREADS -# _REENTRANT -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_THREADS, [ - AC_MSG_CHECKING(for building with threads) - AC_ARG_ENABLE(threads, [ --enable-threads build with threads], - [tcl_ok=$enableval], [tcl_ok=no]) - - if test "$tcl_ok" = "yes"; then - TCL_THREADS=1 - AC_DEFINE(TCL_THREADS) - AC_DEFINE(_REENTRANT) - - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) - AC_MSG_RESULT(yes) - ;; - *) - AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthread" - AC_MSG_RESULT(yes) - else - TCL_THREADS=0 - AC_MSG_RESULT(no) - AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") - fi - ;; - esac - else - TCL_THREADS=0 - AC_MSG_RESULT(no (default)) - fi - -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SYMBOLS -- -# -# Specify if debugging symbols should be used -# -# Arguments: -# none -# -# Requires the following vars to be set: -# CFLAGS_DEBUG -# CFLAGS_OPTIMIZE -# LDFLAGS_DEBUG -# LDFLAGS_OPTIMIZE -# -# Results: -# -# Adds the following arguments to configure: -# --enable-symbols -# -# Defines the following vars: -# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true -# Sets to CFLAGS_OPTIMIZE if false -# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true -# Sets to LDFLAGS_OPTIMIZE if false -# DBGX Debug library extension -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SYMBOLS, [ - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) - tcl_dbgx=d - ;; - *) - tcl_dbgx=g - ;; - esac - - AC_MSG_CHECKING([for build with symbols]) - AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT="${CFLAGS_DEBUG}" - LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" - DBGX=${tcl_dbgx} - TCL_DBGX=${tcl_dbgx} - AC_MSG_RESULT([yes]) - else - CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" - LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" - DBGX="" - TCL_DBGX="" - AC_MSG_RESULT([no]) - fi - - AC_SUBST(TCL_DBGX) - AC_SUBST(CFLAGS_DEFAULT) - AC_SUBST(LDFLAGS_DEFAULT) -]) - -#-------------------------------------------------------------------- -# SC_CONFIG_CFLAGS -# -# Try to determine the proper flags to pass to the compiler -# for building shared libraries and other such nonsense. -# -# Arguments: -# none -# -# Results: -# -# Defines the following vars: -# -# DL_OBJS - Name of the object file that implements dynamic -# loading for Tcl on this system. -# DL_LIBS - Library file(s) to include in tclsh and other base -# applications in order for the "load" command to work. -# LDFLAGS - Flags to pass to the compiler when linking object -# files into an executable application binary such -# as tclsh. -# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", -# that tell the run-time dynamic linker where to look -# for shared libraries such as libtcl.so. Depends on -# the variable LIB_RUNTIME_DIR in the Makefile. -# MAKE_LIB - Command to execute to build the Tcl library; -# differs depending on whether or not Tcl is being -# compiled as a shared library. -# SHLIB_CFLAGS - Flags to pass to cc when compiling the components -# of a shared library (may request position-independent -# code, among other things). -# SHLIB_LD - Base command to use for combining object files -# into a shared library. -# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when -# creating shared libraries. This symbol typically -# goes at the end of the "ld" commands that build -# shared libraries. The value of the symbol is -# "${LIBS}" if all of the dependent libraries should -# be specified when creating a shared library. If -# dependent libraries should not be specified (as on -# SunOS 4.x, where they cause the link to fail, or in -# general if Tcl and Tk aren't themselves shared -# libraries), then this symbol has an empty string -# as its value. -# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable -# extensions. An empty string means we don't know how -# to use shared libraries on this platform. -# TCL_LIB_FILE - Name of the file that contains the Tcl library, such -# as libtcl7.8.so or libtcl7.8.a. -# TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" -# in the shared library name, using the $VERSION variable -# to put the version in the right place. This is used -# by platforms that need non-standard library names. -# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs -# to have a version after the .so, and ${VERSION}.a -# on AIX, since the Tcl shared library needs to have -# a .a extension whereas shared objects for loadable -# extensions have a .so extension. Defaults to -# ${VERSION}${SHLIB_SUFFIX}. -# TCL_NEEDS_EXP_FILE - -# 1 means that an export file is needed to link to a -# shared library. -# TCL_EXP_FILE - The name of the installed export / import file which -# should be used to link to the Tcl shared library. -# Empty if Tcl is unshared. -# TCL_BUILD_EXP_FILE - -# The name of the built export / import file which -# should be used to link to the Tcl shared library. -# Empty if Tcl is unshared. -# CFLAGS_DEBUG - -# Flags used when running the compiler in debug mode -# CFLAGS_OPTIMIZE - -# Flags used when running the compiler in optimize mode -# -# EXTRA_CFLAGS -# -# Subst's the following vars: -# DL_LIBS -# CFLAGS_DEBUG -# CFLAGS_OPTIMIZE -#-------------------------------------------------------------------- - -AC_DEFUN(SC_CONFIG_CFLAGS, [ - - # Step 0: Enable 64 bit support? - - AC_MSG_CHECKING([if 64bit support is enabled]) - AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support],,enableval="no") - - if test "$enableval" = "yes"; then - AC_MSG_RESULT(Will compile with 64bit support) - do64bit=yes - else - do64bit=no - fi - AC_MSG_RESULT($do64bit) - - # Step 1: set the variable "system" to hold the name and version number - # for the system. This can usually be done via the "uname" command, but - # there are a few systems, like Next, where this doesn't work. - - AC_MSG_CHECKING([system version (for dynamic loading)]) - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - AC_MSG_RESULT([unknown (can't find uname command)]) - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid'` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - AC_MSG_RESULT($system) - fi - fi - - # Step 2: check for existence of -ldl library. This is needed because - # Linux can use either -ldl or -ldld for dynamic loading. - - AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) - - # Step 3: set configuration options based on system name and version. - - do64bit_ok=no - fullSrcDir=`cd $srcdir; pwd` - EXTRA_CFLAGS="" - TCL_EXPORT_FILE_SUFFIX="" - UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' - ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O - TCL_NEEDS_EXP_FILE=0 - TCL_BUILD_EXP_FILE="" - TCL_EXP_FILE="" - STLIB_LD="ar cr" - case $system in - AIX-4.[[2-9]]) - SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - ;; - AIX-*) - SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - LIBOBJS="$LIBOBJS tclLoadAix.o" - DL_LIBS="-lld" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - ;; - BSD/OS-2.1*|BSD/OS-3*) - SHLIB_CFLAGS="" - SHLIB_LD="shlicc -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - BSD/OS-4.*) - SHLIB_CFLAGS="-export-dynamic -fPIC" - SHLIB_LD="cc -shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-export-dynamic" - LD_SEARCH_FLAGS="" - ;; - *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95*) - CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" - LDFLAGS_CONSOLE="-subsystem:console" - LDFLAGS_WINDOW="-subsystem:windows" - LDFLAGS_DEBUG="-debug:full -debugtype:cv" - LDFLAGS_OPTIMIZE="-release" - EXTRA_CFLAGS="-YX" - PATHTYPE=-w - STLIB_LD="lib -nologo" - SHLIB_LD="link -dll -nologo" - SHLIB_LD_LIBS="user32.lib advapi32.lib" - RC="rc" - ;; - dgux*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) - SHLIB_SUFFIX=".sl" - AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) - if test "$tcl_ok" = yes; then - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LDFLAGS="-Wl,-E" - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - fi - ;; - IRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' - ;; - IRIX-5.*|IRIX-6.*|IRIX64-6.5*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - EXTRA_CFLAGS="-mabi=n32" - LDFLAGS="-mabi=n32" - else - case $system in - IRIX-6.3) - # Use to build 6.2 compatible binaries on 6.3. - EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" - ;; - *) - EXTRA_CFLAGS="-n32" - ;; - esac - LDFLAGS="-n32" - fi - ;; - IRIX64-6.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - ;; - Linux*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings - # when you inline the string and math operations. Turn this off to - # get rid of the warnings. - - CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - - if test "$have_dl" = yes; then - SHLIB_LD="${CC} -shared" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-rdynamic" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - else - AC_CHECK_HEADER(dld.h, [ - SHLIB_LD="ld -shared" - DL_OBJS="tclLoadDld.o" - DL_LIBS="-ldld" - LDFLAGS="" - LD_SEARCH_FLAGS=""]) - fi - if test "`uname -m`" = "alpha" ; then - EXTRA_CFLAGS="-mieee" - fi - ;; - MP-RAS-02*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - MP-RAS-*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="-Wl,-Bexport" - LD_SEARCH_FLAGS="" - ;; - NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) - # Not available on all versions: check for include file. - AC_CHECK_HEADER(dlfcn.h, [ - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - ], [ - SHLIB_CFLAGS="" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - ]) - - # FreeBSD doesn't handle version numbers with dots. - - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - FreeBSD-*) - # FreeBSD 3.* and greater have ELF. - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - Rhapsody-*|Darwin-*) - SHLIB_CFLAGS="-fno-common" - SHLIB_LD="cc -dynamiclib \${LDFLAGS} -compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE}" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".dylib" - DL_OBJS="tclLoadDyld.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - CFLAGS_OPTIMIZE="-O3" - ;; - NEXTSTEP-*) - SHLIB_CFLAGS="" - SHLIB_LD="cc -nostdlib -r" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadNext.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h - ;; - OSF1-1.0|OSF1-1.1|OSF1-1.2) - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 - SHLIB_CFLAGS="" - # Hack: make package name same as library name - SHLIB_LD='ld -R -export $@:' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadOSF.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-1.*) - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -shared" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-V*) - # Digital OSF/1 - SHLIB_CFLAGS="" - SHLIB_LD='ld -shared -expect_unresolved "*"' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - ;; - RISCos-*) - SHLIB_CFLAGS="-G 0" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - ;; - SCO_SV-3.2*) - # Note, dlopen is available only on SCO 3.2.5 and greater. However, - # this test works, since "uname -s" was non-standard in 3.2.4 and - # below. - SHLIB_CFLAGS="-Kpic -belf" - SHLIB_LD="ld -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="-belf -Wl,-Bexport" - LD_SEARCH_FLAGS="" - ;; - SINIX*5.4*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS="" - ;; - SunOS-4*) - SHLIB_CFLAGS="-PIC" - SHLIB_LD="ld" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - - # SunOS can't handle version numbers with dots in them in library - # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it - # requires an extra version number at the end of .so file names. - # So, the library has to have a name like libtcl75.so.1.0 - - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - SunOS-5.[[0-6]]*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="" - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - ;; - SunOS-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - LDFLAGS="" - - do64bit_ok=no - if test "$do64bit" = "yes" ; then - arch=`isainfo` - if test "$arch" = "sparcv9 sparc" ; then - if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then - do64bit_ok=yes - EXTRA_CFLAGS="-xarch=v9" - LDFLAGS="-xarch=v9" - else - AC_MSG_WARN("64bit mode not supported using GCC on $system") - fi - else - AC_MSG_WARN("64bit mode only supported sparcv9 system") - fi - fi - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - fi - ;; - ULTRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - ;; - UNIX_SV* | UnixWare-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers - # that don't grok the -Bexport option. Test that it does. - hold_ldflags=$LDFLAGS - AC_MSG_CHECKING(for ld accepts -Bexport flag) - LDFLAGS="${LDFLAGS} -Wl,-Bexport" - AC_TRY_LINK(, [int i;], found=yes, found=no) - LDFLAGS=$hold_ldflags - AC_MSG_RESULT($found) - if test $found = yes; then - LDFLAGS="-Wl,-Bexport" - else - LDFLAGS="" - fi - LD_SEARCH_FLAGS="" - ;; - esac - - if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then - AC_MSG_WARN("64bit support being disabled -- not supported on this platform") - fi - - # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic - # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, - # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need - # to determine which of several header files defines the a.out file - # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we - # support only a file format that is more or less version-7-compatible. - # In particular, - # - a.out files must begin with `struct exec'. - # - the N_TXTOFF on the `struct exec' must compute the seek address - # of the text segment - # - The `struct exec' must contain a_magic, a_text, a_data, a_bss - # and a_entry fields. - # The following compilation should succeed if and only if either sys/exec.h - # or a.out.h is usable for the purpose. - # - # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the - # `struct exec' includes a second header that contains information that - # duplicates the v7 fields that are needed. - - if test "x$DL_OBJS" = "xtclLoadAout.o" ; then - AC_MSG_CHECKING(sys/exec.h) - AC_TRY_COMPILE([#include <sys/exec.h>],[ - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_magic == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_H) - else - AC_MSG_CHECKING(a.out.h) - AC_TRY_COMPILE([#include <a.out.h>],[ - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_magic == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_A_OUT_H) - else - AC_MSG_CHECKING(sys/exec_aout.h) - AC_TRY_COMPILE([#include <sys/exec_aout.h>],[ - struct exec foo; - unsigned long seek; - int flag; -#if defined(__mips) || defined(mips) - seek = N_TXTOFF (foo.ex_f, foo.ex_o); -#else - seek = N_TXTOFF (foo); -#endif - flag = (foo.a_midmag == OMAGIC); - return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_AOUT_H) - else - DL_OBJS="" - fi - fi - fi - fi - - # Step 5: disable dynamic loading if requested via a command-line switch. - - AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], - [tcl_ok=$enableval], [tcl_ok=yes]) - if test "$tcl_ok" = "no"; then - DL_OBJS="" - fi - - if test "x$DL_OBJS" != "x" ; then - BUILD_DLTEST="\$(DLTEST_TARGETS)" - else - echo "Can't figure out how to do dynamic loading or shared libraries" - echo "on this system." - SHLIB_CFLAGS="" - SHLIB_LD="" - SHLIB_SUFFIX="" - DL_OBJS="tclLoadNone.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - BUILD_DLTEST="" - fi - - # If we're running gcc, then change the C flags for compiling shared - # libraries to the right flags for gcc, instead of those for the - # standard manufacturer compiler. - - if test "$DL_OBJS" != "tclLoadNone.o" ; then - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - case $system in - AIX-*) - ;; - BSD/OS*) - ;; - IRIX*) - ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) - ;; - Rhapsody-*|Darwin-*) - ;; - RISCos-*) - ;; - ULTRIX-4.*) - ;; - *) - SHLIB_CFLAGS="-fPIC" - ;; - esac - fi - fi - - if test "$SHARED_LIB_SUFFIX" = "" ; then - SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' - fi - if test "$UNSHARED_LIB_SUFFIX" = "" ; then - UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' - fi - - AC_SUBST(STLIB_LD) - AC_SUBST(SHLIB_LD) - AC_SUBST(SHLIB_CFLAGS) - AC_SUBST(SHLIB_LDFLAGS) - AC_SUBST(DL_LIBS) - AC_SUBST(CFLAGS_DEBUG) - AC_SUBST(CFLAGS_OPTIMIZE) - AC_SUBST(LDFLAGS_DEBUG) - AC_SUBST(LDFLAGS_OPTIMIZE) -]) - -#-------------------------------------------------------------------- -# SC_SERIAL_PORT -# -# Determine which interface to use to talk to the serial port. -# Note that #include lines must begin in leftmost column for -# some compilers to recognize them as preprocessor directives. -# -# Arguments: -# none -# -# Results: -# -# Defines only one of the following vars: -# USE_TERMIOS -# USE_TERMIO -# USE_SGTTY -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_SERIAL_PORT, [ - AC_MSG_CHECKING([termios vs. termio vs. sgtty]) - - AC_TRY_RUN([ -#include <termios.h> - -main() -{ - struct termios t; - if (tcgetattr(0, &t) == 0) { - cfsetospeed(&t, 0); - t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; -}], tk_ok=termios, tk_ok=no, tk_ok=no) - - if test $tk_ok = termios; then - AC_DEFINE(USE_TERMIOS) - else - AC_TRY_RUN([ -#include <termio.h> - -main() -{ - struct termio t; - if (ioctl(0, TCGETA, &t) == 0) { - t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; - }], tk_ok=termio, tk_ok=no, tk_ok=no) - - if test $tk_ok = termio; then - AC_DEFINE(USE_TERMIO) - else - AC_TRY_RUN([ -#include <sgtty.h> - -main() -{ - struct sgttyb t; - if (ioctl(0, TIOCGETP, &t) == 0) { - t.sg_ospeed = 0; - t.sg_flags |= ODDP | EVENP | RAW; - return 0; - } - return 1; -}], tk_ok=sgtty, tk_ok=none, tk_ok=none) - if test $tk_ok = sgtty; then - AC_DEFINE(USE_SGTTY) - fi - fi - fi - AC_MSG_RESULT($tk_ok) -]) - -#-------------------------------------------------------------------- -# SC_MISSING_POSIX_HEADERS -# -# Supply substitutes for missing POSIX header files. Special -# notes: -# - stdlib.h doesn't define strtol, strtoul, or -# strtod insome versions of SunOS -# - some versions of string.h don't declare procedures such -# as strstr -# -# Arguments: -# none -# -# Results: -# -# Defines some of the following vars: -# NO_DIRENT_H -# NO_ERRNO_H -# NO_VALUES_H -# NO_LIMITS_H -# NO_STDLIB_H -# NO_STRING_H -# NO_SYS_WAIT_H -# NO_DLFCN_H -# HAVE_UNISTD_H -# HAVE_SYS_PARAM_H -# -# HAVE_STRING_H ? -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ - - AC_MSG_CHECKING(dirent.h) - AC_TRY_LINK([#include <sys/types.h> -#include <dirent.h>], [ -#ifndef _POSIX_SOURCE -# ifdef __Lynx__ - /* - * Generate compilation error to make the test fail: Lynx headers - * are only valid if really in the POSIX environment. - */ - - missing_procedure(); -# endif -#endif -DIR *d; -struct dirent *entryPtr; -char *p; -d = opendir("foobar"); -entryPtr = readdir(d); -p = entryPtr->d_name; -closedir(d); -], tcl_ok=yes, tcl_ok=no) - - if test $tcl_ok = no; then - AC_DEFINE(NO_DIRENT_H) - fi - - AC_MSG_RESULT($tcl_ok) - AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H)) - AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H)) - AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H)) - AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_LIMITS_H)) - AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) - AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) - AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) - AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) - if test $tcl_ok = 0; then - AC_DEFINE(NO_STDLIB_H) - fi - AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) - AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) - AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) - - # See also memmove check below for a place where NO_STRING_H can be - # set and why. - - if test $tcl_ok = 0; then - AC_DEFINE(NO_STRING_H) - fi - - AC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H)) - AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H)) - - # OS/390 lacks sys/param.h (and doesn't need it, by chance). - - AC_HAVE_HEADERS(unistd.h sys/param.h) - -]) - -#-------------------------------------------------------------------- -# SC_PATH_X -# -# Locate the X11 header files and the X11 library archive. Try -# the ac_path_x macro first, but if it doesn't find the X stuff -# (e.g. because there's no xmkmf program) then check through -# a list of possible directories. Under some conditions the -# autoconf macro will return an include directory that contains -# no include files, so double-check its result just to be safe. -# -# Arguments: -# none -# -# Results: -# -# Sets the the following vars: -# XINCLUDES -# XLIBSW -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_PATH_X, [ - AC_PATH_X - not_really_there="" - if test "$no_x" = ""; then - if test "$x_includes" = ""; then - AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes") - else - if test ! -r $x_includes/X11/Intrinsic.h; then - not_really_there="yes" - fi - fi - fi - if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then - AC_MSG_CHECKING(for X11 header files) - XINCLUDES="# no special path needed" - AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope") - if test "$XINCLUDES" = nope; then - dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" - for i in $dirs ; do - if test -r $i/X11/Intrinsic.h; then - AC_MSG_RESULT($i) - XINCLUDES=" -I$i" - break - fi - done - fi - else - if test "$x_includes" != ""; then - XINCLUDES=-I$x_includes - else - XINCLUDES="# no special path needed" - fi - fi - if test "$XINCLUDES" = nope; then - AC_MSG_RESULT(couldn't find any!) - XINCLUDES="# no include files found" - fi - - if test "$no_x" = yes; then - AC_MSG_CHECKING(for X11 libraries) - XLIBSW=nope - dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" - for i in $dirs ; do - if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then - AC_MSG_RESULT($i) - XLIBSW="-L$i -lX11" - x_libraries="$i" - break - fi - done - else - if test "$x_libraries" = ""; then - XLIBSW=-lX11 - else - XLIBSW="-L$x_libraries -lX11" - fi - fi - if test "$XLIBSW" = nope ; then - AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) - fi - if test "$XLIBSW" = nope ; then - AC_MSG_RESULT(couldn't find any! Using -lX11.) - XLIBSW=-lX11 - fi -]) -#-------------------------------------------------------------------- -# SC_BLOCKING_STYLE -# -# The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. -# On these systems (mostly older ones), use the old BSD-style -# FIONBIO approach instead. -# -# Arguments: -# none -# -# Results: -# -# Defines some of the following vars: -# HAVE_SYS_IOCTL_H -# HAVE_SYS_FILIO_H -# USE_FIONBIO -# O_NONBLOCK -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_BLOCKING_STYLE, [ - AC_CHECK_HEADERS(sys/ioctl.h) - AC_CHECK_HEADERS(sys/filio.h) - AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid'` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - fi - fi - case $system in - # There used to be code here to use FIONBIO under AIX. However, it - # was reported that FIONBIO doesn't work under AIX 3.2.5. Since - # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO - # code (JO, 5/31/97). - - OSF*) - AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) - ;; - SunOS-4*) - AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) - ;; - ULTRIX-4.*) - AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) - ;; - *) - AC_MSG_RESULT(O_NONBLOCK) - ;; - esac -]) - -#-------------------------------------------------------------------- -# SC_HAVE_VFORK -# -# Check to see whether the system provides a vfork kernel call. -# If not, then use fork instead. Also, check for a problem with -# vforks and signals that can cause core dumps if a vforked child -# resets a signal handler. If the problem exists, then use fork -# instead of vfork. -# -# Arguments: -# none -# -# Results: -# -# Defines some of the following vars: -# vfork (=fork) -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_HAVE_VFORK, [ - AC_TYPE_SIGNAL() - AC_CHECK_FUNC(vfork, tcl_ok=1, tcl_ok=0) - if test "$tcl_ok" = 1; then - AC_MSG_CHECKING([vfork/signal bug]); - AC_TRY_RUN([ -#include <stdio.h> -#include <signal.h> -#include <sys/wait.h> -int gotSignal = 0; -sigProc(sig) - int sig; -{ - gotSignal = 1; -} -main() -{ - int pid, sts; - (void) signal(SIGCHLD, sigProc); - pid = vfork(); - if (pid < 0) { - exit(1); - } else if (pid == 0) { - (void) signal(SIGCHLD, SIG_DFL); - _exit(0); - } else { - (void) wait(&sts); - } - exit((gotSignal) ? 0 : 1); -}], tcl_ok=1, tcl_ok=0, tcl_ok=0) - - if test "$tcl_ok" = 1; then - AC_MSG_RESULT(ok) - else - AC_MSG_RESULT([buggy, using fork instead]) - fi - fi - rm -f core - if test "$tcl_ok" = 0; then - AC_DEFINE(vfork, fork) - fi -]) - -#-------------------------------------------------------------------- -# SC_TIME_HANLDER -# -# Checks how the system deals with time.h, what time structures -# are used on the system, and what fields the structures have. -# -# Arguments: -# none -# -# Results: -# -# Defines some of the following vars: -# USE_DELTA_FOR_TZ -# HAVE_TM_GMTOFF -# HAVE_TM_TZADJ -# HAVE_TIMEZONE_VAR -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_TIME_HANDLER, [ - AC_CHECK_HEADERS(sys/time.h) - AC_HEADER_TIME - AC_STRUCT_TIMEZONE - - AC_MSG_CHECKING([tm_tzadj in struct tm]) - AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;], - [AC_DEFINE(HAVE_TM_TZADJ) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - - AC_MSG_CHECKING([tm_gmtoff in struct tm]) - AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;], - [AC_DEFINE(HAVE_TM_GMTOFF) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - - # - # Its important to include time.h in this check, as some systems - # (like convex) have timezone functions, etc. - # - have_timezone=no - AC_MSG_CHECKING([long timezone variable]) - AC_TRY_COMPILE([#include <time.h>], - [extern long timezone; - timezone += 1; - exit (0);], - [have_timezone=yes - AC_DEFINE(HAVE_TIMEZONE_VAR) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - - # - # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. - # - if test "$have_timezone" = no; then - AC_MSG_CHECKING([time_t timezone variable]) - AC_TRY_COMPILE([#include <time.h>], - [extern time_t timezone; - timezone += 1; - exit (0);], - [AC_DEFINE(HAVE_TIMEZONE_VAR) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - fi - - # - # AIX does not have a timezone field in struct tm. When the AIX bsd - # library is used, the timezone global and the gettimeofday methods are - # to be avoided for timezone deduction instead, we deduce the timezone - # by comparing the localtime result on a known GMT value. - # - - if test "`uname -s`" = "AIX" ; then - AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) - if test $libbsd = yes; then - AC_DEFINE(USE_DELTA_FOR_TZ) - fi - fi -]) - -#-------------------------------------------------------------------- -# SC_BUGGY_STRTOD -# -# Under Solaris 2.4, strtod returns the wrong value for the -# terminating character under some conditions. Check for this -# and if the problem exists use a substitute procedure -# "fixstrtod" (provided by Tcl) that corrects the error. -# -# Arguments: -# none -# -# Results: -# -# Might defines some of the following vars: -# strtod (=fixstrtod) -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_BUGGY_STRTOD, [ - AC_CHECK_FUNC(strtod, tk_strtod=1, tk_strtod=0) - if test "$tk_strtod" = 1; then - AC_MSG_CHECKING([for Solaris 2.4 strtod bug]) - AC_TRY_RUN([ - extern double strtod(); - int main() - { - char *string = "NaN"; - char *term; - strtod(string, &term); - if ((term != string) && (term[-1] == 0)) { - exit(1); - } - exit(0); - }], tk_ok=1, tk_ok=0, tk_ok=0) - if test "$tk_ok" = 1; then - AC_MSG_RESULT(ok) - else - AC_MSG_RESULT(buggy) - AC_DEFINE(strtod, fixstrtod) - fi - fi -]) - -#-------------------------------------------------------------------- -# SC_TCL_LINK_LIBS -# -# Search for the libraries needed to link the Tcl shell. -# Things like the math library (-lm) and socket stuff (-lsocket vs. -# -lnsl) are dealt with here. -# -# Arguments: -# Requires the following vars to be set in the Makefile: -# DL_LIBS -# LIBS -# MATH_LIBS -# -# Results: -# -# Subst's the following var: -# TCL_LIBS -# MATH_LIBS -# -# Might append to the following vars: -# LIBS -# -# Might define the following vars: -# HAVE_NET_ERRNO_H -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_TCL_LINK_LIBS, [ - #-------------------------------------------------------------------- - # On a few very rare systems, all of the libm.a stuff is - # already in libc.a. Set compiler flags accordingly. - # Also, Linux requires the "ieee" library for math to work - # right (and it must appear before "-lm"). - #-------------------------------------------------------------------- - - AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") - AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) - - #-------------------------------------------------------------------- - # On AIX systems, libbsd.a has to be linked in to support - # non-blocking file IO. This library has to be linked in after - # the MATH_LIBS or it breaks the pow() function. The way to - # insure proper sequencing, is to add it to the tail of MATH_LIBS. - # This library also supplies gettimeofday. - #-------------------------------------------------------------------- - - libbsd=no - if test "`uname -s`" = "AIX" ; then - AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) - if test $libbsd = yes; then - MATH_LIBS="$MATH_LIBS -lbsd" - fi - fi - - - #-------------------------------------------------------------------- - # Interactive UNIX requires -linet instead of -lsocket, plus it - # needs net/errno.h to define the socket-related error codes. - #-------------------------------------------------------------------- - - AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) - AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) - - #-------------------------------------------------------------------- - # Check for the existence of the -lsocket and -lnsl libraries. - # The order here is important, so that they end up in the right - # order in the command line generated by make. Here are some - # special considerations: - # 1. Use "connect" and "accept" to check for -lsocket, and - # "gethostbyname" to check for -lnsl. - # 2. Use each function name only once: can't redo a check because - # autoconf caches the results of the last check and won't redo it. - # 3. Use -lnsl and -lsocket only if they supply procedures that - # aren't already present in the normal libraries. This is because - # IRIX 5.2 has libraries, but they aren't needed and they're - # bogus: they goof up name resolution if used. - # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. - # To get around this problem, check for both libraries together - # if -lsocket doesn't work by itself. - #-------------------------------------------------------------------- - - tcl_checkBoth=0 - AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) - if test "$tcl_checkSocket" = 1; then - AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1) - fi - if test "$tcl_checkBoth" = 1; then - tk_oldLibs=$LIBS - LIBS="$LIBS -lsocket -lnsl" - AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) - fi - AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, - [LIBS="$LIBS -lnsl"])) - - # Don't perform the eval of the libraries here because DL_LIBS - # won't be set until we call SC_CONFIG_CFLAGS - - TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' - AC_SUBST(TCL_LIBS) - AC_SUBST(MATH_LIBS) -]) - -#------------------------------------------------------------------------ -# SC_MAKE_LIB -- -# -# Generate a line that can be used to build a shared/unshared library -# in a platform independent manner. -# -# Arguments: -# none -# -# Requires: -# -# Results: -# -# Defines the following vars: -# MAKE_LIB Makefile rule for building a library -# MAKE_SHARED_LIB Makefile rule for building a shared library -# MAKE_UNSHARED_LIB Makefile rule for building a static -# library -#------------------------------------------------------------------------ - -AC_DEFUN(SC_MAKE_LIB, [ - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) - if test "${CC-cc}" = "cl"; then - MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) " - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS) " - fi - ;; - *) - MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" - ;; - esac - - if test "${SHARED_BUILD}" = "1" ; then - MAKE_LIB=${MAKE_SHARED_LIB} - else - MAKE_LIB=${MAKE_STATIC_LIB} - fi - - AC_SUBST(MAKE_LIB) - AC_SUBST(MAKE_SHARED_LIB) - AC_SUBST(MAKE_STATIC_LIB) -]) - -#------------------------------------------------------------------------ -# SC_LIB_SPEC -- -# -# Compute the name of an existing object library located in libdir -# from the given base name and produce the appropriate linker flags. -# -# Arguments: -# basename The base name of the library without version -# numbers, extensions, or "lib" prefixes. -# extra_dir Extra directory in which to search for the -# library. This location is used first, then -# $prefix/$exec-prefix, then some defaults. -# -# Requires: -# CYGPATH command used to generate native style paths -# -# Results: -# -# Defines the following vars: -# ${basename}_LIB_NAME The computed library name. -# ${basename}_LIB_SPEC The computed linker flags. -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LIB_SPEC, [ - AC_MSG_CHECKING(for $1 library) - - # Look in exec-prefix and prefix for the library. If neither of - # these were specified, look in libdir. It doesn't matter if libdir - # wasn't specified since a search in the unspecified directory will - # fail (NONE/lib) - - if test x"${exec_prefix}" != x"NONE" ; then - sc_lib_name_dir="${exec_prefix}/lib" - elif test x"${prefix}" != "NONE" ; then - sc_lib_name_dir="${prefix}/lib" - else - eval "sc_lib_name_dir=${libdir}" - fi - - if test x"$2" != x ; then - sc_extra_lib_dir=$2 - else - sc_extra_lib_dir=NONE - fi - - for i in \ - `ls -dr ${sc_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ - `ls -dr ${sc_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ - `ls -dr ${sc_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ - `ls -dr ${sc_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ - `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ - `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ - `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ - `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do - if test -f "$i" ; then - - sc_lib_name_dir=`dirname $i` - $1_LIB_NAME=`basename $i` - $1_LIB_PATH_NAME=$i - break - fi - done - - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) - $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME}`\" - ;; - *) - # Strip off the leading "lib" and trailing ".a" or ".so" - - sc_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//'` - $1_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" - ;; - esac - if test "x$1_LIB_NAME" = x ; then - AC_MSG_ERROR(not found) - else - AC_MSG_RESULT(${$1_LIB_SPEC}) - fi -]) - -#------------------------------------------------------------------------ -# SC_PRIVATE_TCL_HEADERS -- -# -# Locate the private Tcl include files -# -# Arguments: -# -# Requires: -# TCL_SRC_DIR Assumes that SC_LOAD_TCLCONFIG has -# already been called. -# -# Results: -# -# Substs the following vars: -# TCL_TOP_DIR_NATIVE -# TCL_GENERIC_DIR_NATIVE -# TCL_UNIX_DIR_NATIVE -# TCL_WIN_DIR_NATIVE -# TCL_BMAP_DIR_NATIVE -# TCL_TOOL_DIR_NATIVE -# TCL_PLATFORM_DIR_NATIVE -# TCL_BIN_DIR_NATIVE -# TCL_INCLUDES -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ - AC_MSG_CHECKING(for Tcl private include files) - - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) - TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" - TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" - TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" - TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\" - TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\" - TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" - TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" - TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} - ;; - *) - TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' - TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic' - TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix' - TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win' - TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps' - TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools' - TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat' - TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} - ;; - esac - - AC_SUBST(TCL_TOP_DIR_NATIVE) - AC_SUBST(TCL_GENERIC_DIR_NATIVE) - AC_SUBST(TCL_UNIX_DIR_NATIVE) - AC_SUBST(TCL_WIN_DIR_NATIVE) - AC_SUBST(TCL_BMAP_DIR_NATIVE) - AC_SUBST(TCL_TOOL_DIR_NATIVE) - AC_SUBST(TCL_PLATFORM_DIR_NATIVE) - - TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" - AC_SUBST(TCL_INCLUDES) - AC_MSG_RESULT(Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}) -]) - -#------------------------------------------------------------------------ -# SC_PUBLIC_TCL_HEADERS -- -# -# Locate the installed public Tcl header files -# -# Arguments: -# None. -# -# Requires: -# CYGPATH must be set -# -# Results: -# -# Adds a --with-tclinclude switch to configure. -# Result is cached. -# -# Substs the following vars: -# TCL_INCLUDES -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [ - AC_MSG_CHECKING(for Tcl public headers) - - AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files.], with_tclinclude=${withval}) - - if test x"${with_tclinclude}" != x ; then - if test -f "${with_tclinclude}/tcl.h" ; then - ac_cv_c_tclh=${with_tclinclude} - else - AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h]) - fi - else - AC_CACHE_VAL(ac_cv_c_tclh, [ - # Use the value from --with-tclinclude, if it was given - - if test x"${with_tclinclude}" != x ; then - ac_cv_c_tclh=${with_tclinclude} - else - # Check in the includedir, if --prefix was specified - - eval "temp_includedir=${includedir}" - for i in \ - `ls -d ${temp_includedir} 2>/dev/null` \ - /usr/local/include /usr/include ; do - if test -f "$i/tcl.h" ; then - ac_cv_c_tclh=$i - break - fi - done - fi - ]) - fi - - # Print a message based on how we determined the include path - - if test x"${ac_cv_c_tclh}" = x ; then - AC_MSG_ERROR(tcl.h not found. Please specify its location with --with-tclinclude) - else - AC_MSG_RESULT(${ac_cv_c_tclh}) - fi - - # Convert to a native path and substitute into the output files. - - INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` - - TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" - - AC_SUBST(TCL_INCLUDES) -]) - -#------------------------------------------------------------------------ -# SC_PRIVATE_TK_HEADERS -- -# -# Locate the private Tk include files -# -# Arguments: -# -# Requires: -# TK_SRC_DIR Assumes that SC_LOAD_TKCONFIG has -# already been called. -# -# Results: -# -# Substs the following vars: -# TK_INCLUDES -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PRIVATE_TK_HEADERS, [ - AC_MSG_CHECKING(for Tk private include files) - - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) - TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" - TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" - TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" - TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\" - TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} - - TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" - ;; - *) - TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic' - TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix' - TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win' - TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} - - TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" - ;; - esac - - AC_SUBST(TK_UNIX_DIR_NATIVE) - AC_SUBST(TK_WIN_DIR_NATIVE) - AC_SUBST(TK_GENERIC_DIR_NATIVE) - AC_SUBST(TK_XLIB_DIR_NATIVE) - AC_SUBST(TK_PLATFORM_DIR_NATIVE) - - AC_SUBST(TK_INCLUDES) - AC_MSG_RESULT(Using srcdir found in tkConfig.sh) -]) - -#------------------------------------------------------------------------ -# SC_PUBLIC_TK_HEADERS -- -# -# Locate the installed public Tk header files -# -# Arguments: -# None. -# -# Requires: -# CYGPATH must be set -# -# Results: -# -# Adds a --with-tkinclude switch to configure. -# Result is cached. -# -# Substs the following vars: -# TK_INCLUDES -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PUBLIC_TK_HEADERS, [ - AC_MSG_CHECKING(for Tk public headers) - - AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) - - if test x"${with_tkinclude}" != x ; then - if test -f "${with_tkinclude}/tk.h" ; then - ac_cv_c_tkh=${with_tkinclude} - else - AC_MSG_ERROR([${with_tkinclude} directory does not contain Tk public header file tk.h]) - fi - else - AC_CACHE_VAL(ac_cv_c_tkh, [ - # Use the value from --with-tkinclude, if it was given - - if test x"${with_tkinclude}" != x ; then - ac_cv_c_tkh=${with_tkinclude} - else - # Check in the includedir, if --prefix was specified - - eval "temp_includedir=${includedir}" - for i in \ - `ls -d ${temp_includedir} 2>/dev/null` \ - /usr/local/include /usr/include ; do - if test -f "$i/tk.h" ; then - ac_cv_c_tkh=$i - break - fi - done - fi - ]) - fi - - # Print a message based on how we determined the include path - - if test x"${ac_cv_c_tkh}" = x ; then - AC_MSG_ERROR(tk.h not found. Please specify its location with --with-tkinclude) - else - AC_MSG_RESULT(${ac_cv_c_tkh}) - fi - - # Convert to a native path and substitute into the output files. - - INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` - - TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" - - AC_SUBST(TK_INCLUDES) -]) - -#------------------------------------------------------------------------ -# SC_SIMPLE_EXEEXT -# Select the executable extension based on the host type. This -# is a lightweight replacement for AC_EXEEXT that doesn't require -# a compiler. -# -# Arguments -# none -# -# Results -# Subst's the following values: -# EXEEXT -#------------------------------------------------------------------------ - -AC_DEFUN(SC_SIMPLE_EXEEXT, [ - AC_MSG_CHECKING(executable extension based on host type) - - case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) - EXEEXT=".exe" - ;; - *) - EXEEXT="" - ;; - esac - - AC_MSG_RESULT(${EXEEXT}) - AC_SUBST(EXEEXT) -]) - -#------------------------------------------------------------------------ -# SC_PROG_TCLSH -# Locate a tclsh shell in the following directories: -# ${exec_prefix}/bin -# ${prefix}/bin -# ${TCL_BIN_DIR} -# ${TCL_BIN_DIR}/../bin -# ${PATH} -# -# Arguments -# none -# -# Results -# Subst's the following values: -# TCLSH_PROG -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PROG_TCLSH, [ - AC_MSG_CHECKING([for tclsh]) - - AC_CACHE_VAL(ac_cv_path_tclsh, [ - search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \ - `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do - if test x"$ac_cv_path_tclsh" = x ; then - if test -f "$j" ; then - ac_cv_path_tclsh=$j - break - fi - fi - done - done - ]) - - if test -f "$ac_cv_path_tclsh" ; then - TCLSH_PROG=$ac_cv_path_tclsh - AC_MSG_RESULT($TCLSH_PROG) - else - AC_MSG_ERROR(No tclsh found in PATH: $search_path) - fi - AC_SUBST(TCLSH_PROG) -]) - -#------------------------------------------------------------------------ -# SC_PROG_WISH -# Locate a wish shell in the following directories: -# ${exec_prefix}/bin -# ${prefix}/bin -# ${TCL_BIN_DIR} -# ${TCL_BIN_DIR}/../bin -# ${PATH} -# -# Arguments -# none -# -# Results -# Subst's the following values: -# WISH_PROG -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PROG_WISH, [ - AC_MSG_CHECKING([for wish]) - - AC_CACHE_VAL(ac_cv_path_wish, [ - search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \ - `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do - if test x"$ac_cv_path_wish" = x ; then - if test -f "$j" ; then - ac_cv_path_wish=$j - break - fi - fi - done - done - ]) - - if test -f "$ac_cv_path_wish" ; then - WISH_PROG=$ac_cv_path_wish - AC_MSG_RESULT($WISH_PROG) - else - AC_MSG_ERROR(No wish found in PATH: $search_path) - fi - AC_SUBST(WISH_PROG) -]) - |