Menu

[r3]: / cmp / Config / Default.tcl  Maximize  Restore  History

Download this file

152 lines (133 with data), 5.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
##
## Compiler2 - Config - Default
##
## (C) IPN - Ingenieurbuero fuer Praezisionsnumerik
##
## Dipl.-Ing. Andreas Otto
## Ulmenstrasse 3
## D-34289 Zierenberg
## mailto:aotto@t-online.de
## http://tclcompiler.sourceforge.net
##
## Alle Rechte vorbehalten
##
namespace eval ::Config::Default {
variable DATA ; ## array of DEFAULT values
##
## -------------------------------------------------------------------------------------------------------
## Key Action Typ Default Proc(nU) Arguments
## -------------------------------------------------------------------------------------------------------
##
array set DATA [list \
[list ROOT REPOSITORY] [list %VALUE% %REP% Master DEFAULT ] \
\
[list ROOT PACKAGE] [list %SLINK% %PKG% %NULL% DEFAULT ] \
\
[list PACKAGE MAJOR] [list %VALUE% %INT% 0 DEFAULT ] \
[list PACKAGE MINOR] [list %VALUE% %FLOAT% 1 DEFAULT ] \
[list PACKAGE DEBUGMODE] [list %VALUE% %BOOL% no DEFAULT ] \
[list PACKAGE C_INSTDIR] [list %VALUE% %DIR% . DEFAULT ] \
[list PACKAGE TCL_INSTDIR] [list %VALUE% %DIR% . DEFAULT ] \
[list PACKAGE TCL_FILE] [list %SLINK% %FILE% %NULL% DEFAULT FILE ] \
[list PACKAGE C_FILE] [list %SLINK% %FILE% %NULL% DEFAULT FILE ] \
[list PACKAGE STRIP] [list %VALUE% %BOOL% yes DEFAULT ] \
\
[list TCL_FILE HEADER] [list %VALUE% %FLIST% [list] DEFAULT ] \
[list C_FILE HEADER] [list %VALUE% %FLIST% [list] DEFAULT ] \
[list C_FILE USE_INIT] [list %VALUE% %BOOL% no DEFAULT ] \
\
[list TCL_FILE TCL2META] [list %HLINK% %CODE% %NULL% DEFAULT ] \
[list TCL2META TEST] [list %VALUE% %BOOL% no DEFAULT ] \
[list TCL2META PRINT] [list %VALUE% %BOOL% no DEFAULT ] \
[list TCL2META SAFE] [list %VALUE% %BOOL% no DEFAULT ] \
[list TCL2META CMD] [list %VALUE% %SLIST% [list] DEFAULT ] \
[list TCL2META PKG_REQUIRE] [list %VALUE% %SLIST% [list] DEFAULT ] \
\
[list TCL_FILE META2C] [list %HLINK% %CODE% %NULL% DEFAULT ] \
[list META2C PRINT] [list %VALUE% %BOOL% no DEFAULT ] \
[list META2C DEBUG] [list %VALUE% %BOOL% no DEFAULT ] \
[list META2C SKIP] [list %VALUE% %ALL% [list] DEFAULT ] \
[list META2C OPTIMIZATION] [list %VALUE% %LIST% 1 DEFAULT 0 1 ] \
\
[list TCL_FILE META2TCL] [list %HLINK% %CODE% %NULL% DEFAULT ] \
[list META2TCL PRINT] [list %VALUE% %BOOL% no DEFAULT ] \
]
array set DATA [ list {ROOT CCT_VERSION} [ list %VALUE% %FLOAT% [ package require Config ] DEFAULT ] ]
namespace export -clear Get*
}
##
## -----------------------------------------------------------------
##
proc ::Config::Default::Create {} {
variable DATA
variable DATA_TYPE
variable DATA_DEFA
variable DATA_ARGS
variable DATA_PROC
variable DATA_KEY
variable DATA_ACTION
## init
set _DATA_TYPE {}
set _DATA_DEFA {}
set _DATA_ARGS {}
## fill
foreach { Key Val } [ array get DATA ] {
foreach { K1 K2 } $Key break
foreach { Act Typ Def Prc } $Val break
lappend _DATA_TYPE $Key $Typ
lappend _DATA_DEFA $Key $Def
lappend _DATA_ACTION $Key $Act
lappend _DATA_PROC $Key $Prc
lappend _DATA_ARGS $Key [ lrange $Val 4 end ]
lappend DATA_KEY($K1) $K2
}
## set
array set DATA_TYPE $_DATA_TYPE
array set DATA_DEFA $_DATA_DEFA
array set DATA_ARGS $_DATA_ARGS
array set DATA_PROC $_DATA_PROC
array set DATA_ACTION $_DATA_ACTION
}
proc ::Config::Default::Delete {} {
variable DATA_TYPE ; ## TYPE index
variable DATA_DEFA ; ## DEFA index
variable DATA_ARGS ; ## ARGS index
variable DATA_KEY ; ## KEY index
variable DATA_ACTION ; ## ACTION index
array unset DATA_TYPE
array unset DATA_DEFA
array unset DATA_ARGS
array unset DATA_KEY
array unset DATA_ACTION
}
##
## -----------------------------------------------------------------
##
proc ::Config::Default::GetKey { Key } {
variable DATA_KEY
if {[ info exists DATA_KEY($Key) ]} {
return $DATA_KEY($Key)
} else {
return {}
}
}
proc ::Config::Default::GetType { Grp } {
variable DATA_TYPE
return $DATA_TYPE($Grp)
}
proc ::Config::Default::GetAction { Grp } {
variable DATA_ACTION
return $DATA_ACTION($Grp)
}
proc ::Config::Default::GetArgs { Grp } {
variable DATA_ARGS
return $DATA_ARGS($Grp)
}
proc ::Config::Default::GetDefa { Grp } {
variable DATA_DEFA
return $DATA_DEFA($Grp)
}
proc ::Config::Default::GetProc { Grp } {
variable DATA_PROC
return $DATA_PROC($Grp)
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.