File: src.ll

package info (click to toggle)
lifelines 3.0.50-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 11,140 kB
  • ctags: 6,517
  • sloc: ansic: 57,468; xml: 8,014; sh: 4,255; makefile: 848; yacc: 601; perl: 170; sed: 16
file content (32 lines) | stat: -rw-r--r-- 834 bytes parent folder | download | duplicates (5)
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
/*
* @progname       src.ll
* @version        2.0
* @author         McBride
* @category       sample
* @output         text
* @description
Here is a report program to list SOURces. The REFN and TITL
values are shown. Other tags can be added by duplicating
the lines that containing "myrefn" or "REFN" and replacing them
with the tag you want.

To process tags that have CONTinuation lines, or tags with no
values you need something more complicated.

"P. McBride" <pbmcbride@RCN.COM>
*/

proc main ()
{
   forsour(snode, i) {
     set(mytitle, "")
     set(myrefn, "")
     fornodes(root(snode), anode) {
       if(eqstr(tag(anode),"TITL")) { set(mytitle, save(value(anode))) }
       elsif(eqstr(tag(anode),"REFN")) {
         set(myrefn, save(value(anode)))
       }
     }
     myrefn  "\t"  key(snode)  "\t"  mytitle  nl()
   }
}