Subversion Repositories wimsdev

Rev

Rev 17871 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9679 guerimand 1
!! duplicate a sheet
2
 
3
!if $scnt>=$max_sheets
12701 bpr 4
  error=bad_maxsheets
5
  !reset job wims_ariane
6
  !changeto var.proc
9679 guerimand 7
!endif
8
!bound sheet between 1 and $scnt default $empty
9
 
10
!if $sheet=$empty
12701 bpr 11
  error=bad_sheet
12
  !reset job wims_ariane
13
  !changeto var.proc
9679 guerimand 14
!endif
15
 
9688 guerimand 16
exocnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sheet
17
!if $exocnt=0
12701 bpr 18
  !reset job wims_ariane
19
  !changeto var.proc
9688 guerimand 20
!endif
9679 guerimand 21
 
22
!sh cd $wims_home/log/classes/$wims_class/sheets/\
23
cp .sheet$sheet .sheet$[$scnt+1]
17871 bpr 24
tmp=!fileexists $wims_home/log/classes/$wims_class/sheets/sheet$sheet.src
25
!if $tmp=yes
17881 bpr 26
  msg2wims_primitives=!defof msgprim in wimshome/public_html/scripts/primitives/allmsgprim
17871 bpr 27
  !sh cd $wims_home/log/classes/$wims_class/sheets/\
28
cp -p sheet$sheet.src sheet$[$scnt+1].src\
29
$wims_home/bin/msg2wims sheet$[$scnt+1].src sheet$[$scnt+1].def
30
!endif
9679 guerimand 31
 
32
p=!record $sheet of wimshome/log/classes/$wims_class/sheets/.sheets
33
p=!replace line number 1 by 0 in $p
34
 
35
!appendfile wimshome/log/classes/$wims_class/sheets/.sheets :$p
36
 
11134 guerimand 37
!! --- copy severity of the sheet:
38
fsev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
39
sev=!line $[$sheet+1] of $fsev
40
!if $sev!=$empty
12701 bpr 41
  n=!linecnt $fsev
42
  !while $n<$scnt+1
43
    fsev=$fsev\
11134 guerimand 44
 
12701 bpr 45
    !increase n
46
  !endwhile
47
  fsev=!append line $sev to $fsev
48
  !writefile wimshome/log/classes/$wims_class/sheets/.severity $fsev
11134 guerimand 49
!endif
50
!! ---
51
 
9679 guerimand 52
scnt=$[$scnt+1]
53
sheet=$scnt
54
message=$name_duplicateok
10339 bpr 55
!reset job wims_ariane
56
!changeto var.proc