File: mod.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 (79 lines) | stat: -rw-r--r-- 2,025 bytes parent folder | download | duplicates (2)
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
78
79

!! modifiy glossary items
max_glossary=!defof MAX_SHEETS in wimshome/public_html/bases/sys/define.conf
title_limit=50
desc_limit=255
!if $cmd=new or $cmd=resume
  glossarys=
  !for i=1 to $glossarytot
    glo=!record $i of $gloss_dir/.glossaryindex
    !distribute lines $glo into a_,t_,d_
    glossarys=!append line $i,$t_,$a_,[$d_] to $glossarys
  !next i
  glossarytot=!linecnt $glossarys
  !ifval $glossarytot=0
    error=no_glossary
    !exit
  !endif
  !set glo=!line $gl of $(glossarys)
  !distribute item $glo into d,ti,st,di
  !set di=!declosing $di
  !exit
!endif
!if $cmd=reply
  !if $gl=$empty
    error=no_pick
    !exit
  !endif
  gl=$[floor($gl)]
  !if $gl=NaN or $gl<1 or $gl>min($max_glossary,$glossarytot)
    error=bad_glossary
    !exit
  !endif
  !set glocnt=!recordcnt $gloss_dir/.glossary$gl
  !for j=1 to $glocnt
    !set glocontent=!record $j of $gloss_dir/.glossary$gl
    ititle=!singlespace $(title$j)
    idesc=!singlespace $(desc$j)
    iadress=!singlespace $(adress$j)
    !set glocontent=!record $j of $gloss_dir/.glossary$gl
    !set sglo=!replace line number 1 by $iadress in $glocontent
    !set sglo=!replace line number 2 by $ititle in $sglo
    !set sglo=!replace line number 3 by $idesc in $sglo
    !if $sglo!=$glocontent
      !read proc/updatefield.proc $gloss_dir/.glossary$gl\
$j\
\
$sglo
    !endif
  !next
  !for j=1 to $glocnt
    !if $(delete$j)=1
      !read proc/updatefield.proc $gloss_dir/.glossary$gl\
$j\
delete
    !endif
  !next
  !read proc/updatefield.proc $gloss_dir/.glossary$gl\
2\
sort

  glo=!record $gl of $gloss_dir/.glossaryindex
  iadress=!singlespace $adress
  ititle=!singlespace $title
  idesc=!singlespace $desc
  !set glo=$glo\
\

  !set sglo=!replace line number 1 by $iadress in $glo
  !set sglo=!replace line number 2 by $ititle in $sglo
  !set sglo=!replace line number 3 by $idesc in $sglo
  !read proc/updatefield.proc $gloss_dir/.glossaryindex\
$gl\
\
$sglo

!endif

  !!wims_module_log=class $wims_class: add No$glosscnt to glossary $gl
!endif