Subversion Repositories wimsdev

Rev

Rev 12457 | Rev 16804 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
l_=0
3
!if $nei isitemof $n_sup
12739 bpr 4
  !advance l_
23 reyssat 5
!endif
6
!if $nei isitemof $n_part
12739 bpr 7
  l_=$[$l_+2]
23 reyssat 8
!endif
9
 
10
!bound nlevel between integer 0 and 3 default $l_
11
 
12
!ifval $nlevel!=$l_
12457 bpr 13
  !ifval $nlevel%2=0
14
    !if $nsharing!=$empty
15
      error=remote_sharing
16
      !advance nlevel
17
    !else
18
      n_sup=!listcomplement $nei in $n_sup
19
    !endif
23 reyssat 20
  !else
12457 bpr 21
    n_sup=!append item $nei to $n_sup
22
    n_sup=!listuniq $n_sup
23 reyssat 23
  !endif
12457 bpr 24
  !ifval $nlevel<2
25
    n_part=!listcomplement $nei in $n_part
26
  !else
27
    n_part=!append item $nei to $n_part
28
    n_part=!listuniq $n_part
29
  !endif
30
  !setdef n_sup=$n_sup\
23 reyssat 31
n_part=$n_part in wimshome/log/classes/$wims_class/neighbors
12457 bpr 32
  wims_class_log=Neighbor level $nlevel with $nei by $wims_realuser
23 reyssat 33
!endif
34
 
5106 bpr 35
sharablelist=!listcomplement $sharing in $sharelist
23 reyssat 36
!if $changeshare!=$empty
12457 bpr 37
  changed=0
38
  wims_class_log=Allow $nei share $mksharable by $wims_realuser
39
  !for r in $sharablelist
40
    !if $r isitemof $mksharable and $nei notitemof $(sharable_$r)
41
      sharable_$r=!append item $nei to $(sharable_$r)
42
      changed=1
43
    !endif
44
    !if $r notitemof $mksharable and $nei isitemof $(sharable_$r)
45
      !if $r isitemof $nsharing
46
        error=$error remote_sharing
47
      !else
48
        sharable_$r=!listcomplement $nei in $(sharable_$r)
49
        changed=1
50
      !endif
51
    !endif
52
  !next r
53
  !if $changed>0
54
    shlist=
55
    !for sh in $sharablelist
56
      shlist=!append item $(sharable_$sh) to $shlist
57
    !next sh
58
    sharable_all=!listuniq $shlist
59
    !read neighbor/writeneighbor.proc
23 reyssat 60
  !endif
61
!endif
62
 
63
!reset mksharable,changeshare
64
!for r in $sharablelist
12457 bpr 65
  !if $nei isitemof $(sharable_$r)
66
    mksharable=!append item $r to $mksharable
67
  !endif
23 reyssat 68
!next r