File: var.step

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (44 lines) | stat: -rw-r--r-- 1,123 bytes parent folder | download | duplicates (3)
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

picked=!line 1 to $step-1 of $good
bad_reasons=!line $step of $traps
r=!random 0,1
!if $r<0.5 and $(bad_$step)!=$empty
  b=!randitem $(bad_$step)
  b=!record $b of $deffile
  !distribute lines $b into b1,step_remark,b3
  step_reason=!item 2 of $b1
  picked=!append line $b3 to $picked
  bad_reasons=!append item $bad_reasons to $step_reason
  step_test=NO
!else
  !distribute items OK,OK into step_reason,step_test
  step_remark=!line $step of $remarks
  thisstep=!line $step of $good
  picked=!append line $thisstep to $picked
!endif

!read reasons/reasons
!if $ask_reason=0
  bad_reasons=NO
  bad_rnames=$NO: $no_name
  !exit
!endif

res=$reason_title,$reason_title2
rn=!itemcnt $res
sh=!shuffle $rn
res=!item $sh of $res
bad_reasons=!append item $res to $bad_reasons
bad_reasons=!listuniq $bad_reasons

bad_reasons=!item 1 to 4 of $bad_reasons
rn=!itemcnt $bad_reasons
sh=!shuffle $rn
bad_reasons=!item $sh of $bad_reasons

bad_rnames=
!for i in $bad_reasons
  n_=!positionof item $i in $reason_title,$reason_title2
  n_=!item $n_ of $reason_name,$reason_name2
  bad_rnames=!append item $NO: $n_ to $bad_rnames
!next i