0024129: Eliminate remaining compiler warnings in MSVC++ 2008 32 bit with warning...
[occt.git] / src / ExprIntrp / ExprIntrp_Replace.tcl
CommitLineData
b311480e 1# Copyright (c) 1999-2012 OPEN CASCADE SAS
2#
3# The content of this file is subject to the Open CASCADE Technology Public
4# License Version 6.5 (the "License"). You may not use the content of this file
5# except in compliance with the License. Please obtain a copy of the License
6# at http://www.opencascade.org and read it completely before using this file.
7#
8# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10#
11# The Original Code and all software distributed under the License is
12# distributed on an "AS IS" basis, without warranty of any kind, and the
13# Initial Developer hereby disclaims all such warranties, including without
14# limitation, any warranties of merchantability, fitness for a particular
15# purpose or non-infringement. Please see the License for the specific terms
16# and conditions governing the rights and limitations under the License.
17
7fd59977 18proc ExprIntrp_Replace:AdmFileType {} {
19 return "dbadmfile";
20}
21
22proc ExprIntrp_Replace:OutputDirTypeName {} {
23 return "dbtmpfile";
24}
25
26
27proc ExprIntrp_Replace:HandleInputFile { ID } {
28
29 scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
30
31 switch $name {
32 ExprIntrp.tab.c {return 1;}
33 default {
34 return 0;
35 }
36 }
37}
38
39proc ExprIntrp_Replace:Execute { unit args } {
40
41 msgprint -i -c "ExprIntrp_Replace::Execute" "Copying of ExprIntrp includes $unit $args "
42
43 global tcl_interactive
44
45 set tcl_interactive 1
46 package require Wokutils
47
48
49 if { [wokparam -e %Station $unit] != "wnt" } {
50 set copycmd "cp -p "
51 set replstr "/"
52 } else {
53 set copycmd "cmd /c copy"
54 set replstr "\\\\\\\\"
55 }
56
57
58 set sourcename ExprIntrp.tab.c
59 set name ExprIntrp.tab.c
60
61 set source [woklocate -p ExprIntrp:source:$sourcename [wokinfo -N $unit]]
62 set vistarget [woklocate -p ExprIntrp:privinclude [wokinfo -N $unit]]$name
63# set target [wokinfo -p ExprIntrp:privinclude:$name [wokinfo -N $unit]]
64msgprint -i -c "$source "
65 regsub -all "/" " $source $vistarget" $replstr TheArgs
66
67 msgprint -i -c "ExprIntrp_Replace::Execute" "Copy $source to $vistarget"
68 if { [file exist $vistarget] && [wokparam -e %Station ] != "wnt" } {
69 eval exec "chmod u+w $vistarget"
70 }
71 eval exec "$copycmd $TheArgs"
72
73 return 0;
74}
75
76
77