Diff
Not logged in

Differences From Artifact [9b97cc752a]:

To Artifact [def0379d56]:


1205
1206
1207
1208
1209
1210
1211
1212
1213


1214
1215
1216
1217
1218
1219
1220
1205
1206
1207
1208
1209
1210
1211


1212
1213
1214
1215
1216
1217
1218
1219
1220







-
-
+
+








    if {![isValidPackageRequirement $patchLevel false]} then {
      error "bad patch level"
    }

    #
    # NOTE: Grab the language for the package script.  It must be an empty
    #       string, "Tcl", or "Eagle".  If it is an empty string, "Eagle"
    #       will be assumed.
    #       string, "Tcl", or "Eagle".  If it is an empty string, then the
    #       current language will be assumed (but not by this procedure).
    #
    set language [getDictionaryValue $result Language]

    if {[lsearch -exact [list "" Tcl Eagle] $language] == -1} then {
      error "unsupported language"
    }

1569
1570
1571
1572
1573
1574
1575
1576
1577
1578




1579
1580
1581
1582
1583
1584
1585
1569
1570
1571
1572
1573
1574
1575



1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586







-
-
-
+
+
+
+







                set script(inner) [interp readorgetscriptfile -- \
                    "" $fileName(1)]

                #
                # NOTE: Determine the target language for the package script,
                #       which may or may not be the language that is currently
                #       evaluating this script (Eagle).  The default language,
                #       when one was not explicitly specified, is Eagle.  In
                #       the future, this may be changed, e.g. to use the file
                #       extension of the client script.
                #       when one was not explicitly specified, is the current
                #       language (i.e. which is always Eagle for this script
                #       because the Harpy plugin is absolutely required in
                #       order to validate one of its script certificate).
                #
                switch -exact -- ${%metadata%(language)} {
                  "" -
                  Eagle {
                    #
                    # NOTE: The target language is Eagle, which is evaluating
                    #       this script.  No special handling is needed here.
1715
1716
1717
1718
1719
1720
1721
1722
1723



1724
1725
1726








1727






1728
1729
1730
1731
1732
1733
1734
1735
1736







1737
1738
1739
1740
1741
1742
1743
1716
1717
1718
1719
1720
1721
1722


1723
1724
1725
1726
1727

1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765







-
-
+
+
+


-
+
+
+
+
+
+
+
+

+
+
+
+
+
+









+
+
+
+
+
+
+







        #
        set script(inner) $metadata(script)

        #
        # NOTE: Determine the target language for the package script, which
        #       may or may not be the language that is currently evaluating
        #       this script (Eagle).  The default language, when one was not
        #       explicitly specified, is Eagle.  In the future, this may be
        #       changed, e.g. to use the file extension of the client script.
        #       explicitly specified, is the current language.  In the future,
        #       this may be changed, e.g. to use the file extension of the
        #       client script.
        #
        switch -exact -- $metadata(language) {
          "" -
          "" {
            #
            # NOTE: Assume the current language is the same as the target
            #       language -OR- that the script being evaluated does not
            #       care.
            #
            return [uplevel #0 $script(inner)]
          }
          Eagle {
            #
            # NOTE: The target language is Eagle.  If the current language
            #       is also Eagle, simply evaluate the inner script block.
            #       If the current language is Tcl, then try to use Garuda
            #       in order to evaluate the inner script block in Eagle.
            #
            if {[isEagle]} then {
              return [uplevel #0 $script(inner)]
            } else {
              eagleMustBeReady

              return [eagle [list uplevel #0 $script(inner)]]
            }
          }
          Tcl {
            #
            # NOTE: The target language is Tcl.  If the current language is
            #       also Tcl, simply evaluate the inner script block.  If
            #       the current language is Eagle, then try to use its [tcl]
            #       command in order to evaluate the inner script block in
            #       Tcl.
            #
            if {[isEagle]} then {
              tclMustBeReady; return [tcl eval [tcl master] [list \
                  uplevel #0 $script(inner)]]
            } else {
              return [uplevel #0 $script(inner)]
            }
          }