1@define object@
2******* ${objecttodo}$o ($o.subid)
3      + OID:  	$o.objectID
4      + Type: 	$o.perltype
5      + Access: $o.access
6      + Status: $o.status
7@if $o.ranges@
8      + Ranges
9@foreach $start, $end range $o@
10        $start - $end
11@end@
12@end@
13@if $o.enums@
14********* Enums
15@foreach $label, $value enum@
16        $value:  $label
17@end@
18@end@
19********* Description
20        $o.description
21@enddefine@
22##
23@open -@
24We're about to generate an Emacs org-mode file for you.  First, though,
25a couple of quick questions:
26
27@prompt $dotodo Do you want us to put TODO labels on the tables (y/n):@
28@if "$dotodo" eq "y"@
29@eval $tabletodo = "TODO "@
30@end@
31
32@prompt $dotodo Do you want us to put TODO labels on the notifications (y/n):@
33@if "$dotodo" eq "y"@
34@eval $notificationtodo = "TODO "@
35@end@
36
37What about objects, such as table columns and notification varbinds?
38@prompt $dotodo Do you want us to put TODO labels on these objects (y/n):@
39@if "$dotodo" eq "y"@
40@eval $objecttodo = "TODO "@
41@end@
42##
43@open ${name}.org@
44MIB Information for $name.module::$name
45
46This file was created with /mib2c -c mib2c.org-mode.conf $name/
47
48* Scalars
49@foreach $o scalar@
50@calldefine object@
51@end@
52* Tables
53@foreach $t table@
54*** ${tabletodo}$t ($t.objectID)
55***** Description
56      $t.description
57***** Indexes:
58@foreach $o index@
59@calldefine object@
60@end@
61***** Columns:
62@foreach $o nonindex@
63@calldefine object@
64@end@
65@end@
66* Notifications
67@foreach $n notifications@
68*** Description
69    $n.description
70*** ${notificationtodo}$n ($n.objectID)
71@foreach $o varbinds@
72@calldefine object@
73@end@
74@end@
75