Diff
Not logged in

Differences From Artifact [e9b83bda0d]:

To Artifact [beada33a43]:


879
880
881
882
883
884
885


886
887
888
889




890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908

909
910
911
912
913
914
915
879
880
881
882
883
884
885
886
887




888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909

910
911
912
913
914
915
916
917







+
+
-
-
-
-
+
+
+
+


















-
+








  #
  # NOTE: This procedure verifies the combination of language and version
  #       specified by the caller.  The language argument must be one of the
  #       literal strings "eagle", "tcl", or "client".  The version argument
  #       must be one of the literal strings "8.4", "8.5", or "8.6" when the
  #       language is "tcl" -OR- the literal string "1.0" when the language
  #       is "eagle".  When the language is "client", the version match the
  #       major and minor portions of "1.0" and any remaining portions must
  #       is either "eagle" or "client".  The varName argument is the name
  #       of a scalar variable in the context of the immediate caller that
  #       will receive a boolean value indicating if the specified language
  #       is actually a reference to the package downloader client itself.
  #       be numeric.  The varName argument is the name of a scalar variable
  #       in the context of the immediate caller that will receive a boolean
  #       value indicating if the specified language is actually a reference
  #       to the package downloader client itself.
  #
  # <internal>
  proc verifyLanguageAndVersion { language version varName } {
    if {[string length $varName] > 0} then {
      upvar 1 $varName isClient
    }

    set isClient false

    if {[string length $language] == 0 || $language eq "eagle"} then {
      if {$version ne "1.0"} then {
        error "unsupported Eagle version"
      }
    } elseif {$language eq "tcl"} then {
      if {$version ne "8.4" && $version ne "8.5" && $version ne "8.6"} then {
        error "unsupported Tcl version"
      }
    } elseif {$language eq "client"} then {
      if {$version ne "1.0"} then {
      if {![regexp -- {^1\.0(?:\.\d+)+$} $version]} then {
        error "unsupported client version"
      }

      set isClient true
    } else {
      error "unsupported language"
    }