File: def.proc

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 (77 lines) | stat: -rw-r--r-- 1,922 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
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

l_=0
!if $nei isitemof $n_sup
  !advance l_
!endif
!if $nei isitemof $n_part
  l_=$[$l_+2]
!endif

!bound nlevel between integer 0 and 3 default $l_

!ifval $nlevel!=$l_
  !ifval $nlevel%2=0
    !if $nsharing!=$empty
      error=remote_sharing
      !advance nlevel
    !else
      n_sup=!listcomplement $nei in $n_sup
    !endif
  !else
    n_sup=!append item $nei to $n_sup
    n_sup=!listuniq $n_sup
  !endif
  !ifval $nlevel<2
    n_part=!listcomplement $nei in $n_part
  !else
    n_part=!append item $nei to $n_part
    n_part=!listuniq $n_part
  !endif
  !setdef n_sup=$n_sup\
n_part=$n_part in wimshome/log/classes/$wims_class/neighbors
  wims_class_log=Neighbor level $nlevel with $nei by $wims_realuser
!endif

sharablelist=!listcomplement $sharing in $sharelist
!if $changeshare!=$empty
  changed=0
  classexp=!defof class_expiration in wimshome/log/classes/$wims_class/.def
  neiexp=!defof class_expiration in wimshome/log/classes/$nei/.def
  !if $classexp<$neiexp
    error=sharable_expdate $neiexp
    !goto end
  !endif

  detail_share=open
  wims_class_log=Allow $nei share $mksharable by $wims_realuser
  !for r in $sharablelist
    !if $r isitemof $mksharable and $nei notitemof $(sharable_$r)
      sharable_$r=!append item $nei to $(sharable_$r)
      changed=1
    !endif
    !if $r notitemof $mksharable and $nei isitemof $(sharable_$r)
      !if $r isitemof $nsharing
        error=$error remote_sharing
      !else
        sharable_$r=!listcomplement $nei in $(sharable_$r)
        changed=1
      !endif
    !endif
  !next r
  !if $changed>0
    shlist=
    !for sh in $sharablelist
      shlist=!append item $(sharable_$sh) to $shlist
    !next sh
    sharable_all=!listuniq $shlist
    !read neighbor/writeneighbor.proc
  !endif
!endif

:end
!reset mksharable,changeshare
!for r in $sharablelist
  !if $nei isitemof $(sharable_$r)
    mksharable=!append item $r to $mksharable
  !endif
!next r