File tree 1 file changed +31
-27
lines changed
1 file changed +31
-27
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,37 @@ if {[catch {package require Tcl 8.5} err]
44
44
45
45
catch {rename send {}} ; # What an evil concept...
46
46
47
+ # #####################################################################
48
+ # #
49
+ # # Enabling platform-specific code paths
50
+
51
+ proc is_MacOSX {} {
52
+ if {[tk windowingsystem] eq {aqua}} {
53
+ return 1
54
+ }
55
+ return 0
56
+ }
57
+
58
+ proc is_Windows {} {
59
+ if {$::tcl_platform(platform) eq {windows}} {
60
+ return 1
61
+ }
62
+ return 0
63
+ }
64
+
65
+ set _iscygwin {}
66
+ proc is_Cygwin {} {
67
+ global _iscygwin
68
+ if {$_iscygwin eq {}} {
69
+ if {[string match " CYGWIN_*" $::tcl_platform(os) ]} {
70
+ set _iscygwin 1
71
+ } else {
72
+ set _iscygwin 0
73
+ }
74
+ }
75
+ return $_iscygwin
76
+ }
77
+
47
78
# #####################################################################
48
79
# #
49
80
# # locate our library
@@ -163,7 +194,6 @@ set _isbare {}
163
194
set _gitexec {}
164
195
set _githtmldir {}
165
196
set _reponame {}
166
- set _iscygwin {}
167
197
set _search_path {}
168
198
set _shellpath {@@SHELL_PATH@@}
169
199
@@ -252,32 +282,6 @@ proc reponame {} {
252
282
return $::_reponame
253
283
}
254
284
255
- proc is_MacOSX {} {
256
- if {[tk windowingsystem] eq {aqua}} {
257
- return 1
258
- }
259
- return 0
260
- }
261
-
262
- proc is_Windows {} {
263
- if {$::tcl_platform(platform) eq {windows}} {
264
- return 1
265
- }
266
- return 0
267
- }
268
-
269
- proc is_Cygwin {} {
270
- global _iscygwin
271
- if {$_iscygwin eq {}} {
272
- if {[string match " CYGWIN_*" $::tcl_platform(os) ]} {
273
- set _iscygwin 1
274
- } else {
275
- set _iscygwin 0
276
- }
277
- }
278
- return $_iscygwin
279
- }
280
-
281
285
proc is_enabled {option} {
282
286
global enabled_options
283
287
if {[catch {set on $enabled_options($option) }]} {return 0}
You can’t perform that action at this time.
0 commit comments