Rev 18307 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 12569 | bpr | 1 | |
| 2 | !! modifiy glossary items |
||
| 3 | max_glossary=!defof MAX_SHEETS in wimshome/public_html/bases/sys/define.conf |
||
| 4 | title_limit=50 |
||
| 5 | desc_limit=255 |
||
| 6 | !if $cmd=new or $cmd=resume |
||
| 7 | glossarys= |
||
| 8 | !for i=1 to $glossarytot |
||
| 9 | glo=!record $i of $gloss_dir/.glossaryindex |
||
| 12760 | bpr | 10 | !distribute lines $glo into a_,t_,d_ |
| 11 | glossarys=!append line $i,$t_,$a_,[$d_] to $glossarys |
||
| 12569 | bpr | 12 | !next i |
| 13 | glossarytot=!linecnt $glossarys |
||
| 14 | !ifval $glossarytot=0 |
||
| 15 | error=no_glossary |
||
| 16 | !exit |
||
| 17 | !endif |
||
| 18 | !set glo=!line $gl of $(glossarys) |
||
| 12760 | bpr | 19 | !distribute item $glo into d,ti,st,di |
| 20 | !set di=!declosing $di |
||
| 12569 | bpr | 21 | !exit |
| 22 | !endif |
||
| 23 | !if $cmd=reply |
||
| 24 | !if $gl=$empty |
||
| 25 | error=no_pick |
||
| 26 | !exit |
||
| 27 | !endif |
||
| 28 | gl=$[floor($gl)] |
||
| 29 | !if $gl=NaN or $gl<1 or $gl>min($max_glossary,$glossarytot) |
||
| 30 | error=bad_glossary |
||
| 31 | !exit |
||
| 32 | !endif |
||
| 33 | !set glocnt=!recordcnt $gloss_dir/.glossary$gl |
||
| 34 | !for j=1 to $glocnt |
||
| 35 | !set glocontent=!record $j of $gloss_dir/.glossary$gl |
||
| 36 | ititle=!singlespace $(title$j) |
||
| 12760 | bpr | 37 | idesc=!singlespace $(desc$j) |
| 18287 | bpr | 38 | iadress=!singlespace $(adress$j) |
| 12569 | bpr | 39 | !set glocontent=!record $j of $gloss_dir/.glossary$gl |
| 18287 | bpr | 40 | !set sglo=!replace line number 1 by $iadress in $glocontent |
| 41 | !set sglo=!replace line number 2 by $ititle in $sglo |
||
| 15584 | bpr | 42 | !set sglo=!replace line number 3 by $idesc in $sglo |
| 18307 | bpr | 43 | !if $sglo!=$glocontent |
| 12569 | bpr | 44 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
| 45 | $j\ |
||
| 46 | \ |
||
| 47 | $sglo |
||
| 48 | !endif |
||
| 49 | !next |
||
| 50 | !for j=1 to $glocnt |
||
| 51 | !if $(delete$j)=1 |
||
| 52 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
||
| 53 | $j\ |
||
| 54 | delete |
||
| 55 | !endif |
||
| 56 | !next |
||
| 18313 | bpr | 57 | !read proc/updatefield.proc $gloss_dir/.glossary$gl\ |
| 12569 | bpr | 58 | 2\ |
| 59 | sort |
||
| 18313 | bpr | 60 | |
| 12569 | bpr | 61 | glo=!record $gl of $gloss_dir/.glossaryindex |
| 18287 | bpr | 62 | iadress=!singlespace $adress |
| 12569 | bpr | 63 | ititle=!singlespace $title |
| 12760 | bpr | 64 | idesc=!singlespace $desc |
| 12569 | bpr | 65 | !set glo=$glo\ |
| 66 | \ |
||
| 67 | |||
| 18287 | bpr | 68 | !set sglo=!replace line number 1 by $iadress in $glo |
| 69 | !set sglo=!replace line number 2 by $ititle in $sglo |
||
| 12819 | bpr | 70 | !set sglo=!replace line number 3 by $idesc in $sglo |
| 12569 | bpr | 71 | !read proc/updatefield.proc $gloss_dir/.glossaryindex\ |
| 72 | $gl\ |
||
| 73 | \ |
||
| 74 | $sglo |
||
| 75 | |||
| 76 | !endif |
||
| 77 | |||
| 78 | !!wims_module_log=class $wims_class: add No$glosscnt to glossary $gl |
||
| 79 | !endif |