Start development on 386BSD 0.0
[unix-history] / .ref-BSD-4_3_Net_2 / usr / src / contrib / isode / others / quipu / tools / scripts / ent2aei
CommitLineData
11492ebf
C
1#!/bin/sh
2awk '
3BEGIN {
4 mapping["filestore"] = "iso ftam"
5 mapping["terminal"] = "iso vt"
6 mapping["passwdstore"] = "isode passwd lookup demo"
7 mapping["Z39.50"] = "IRP Z39.50"
8 mapping["pp-qmgr"] = "pp qmgr interface"
9 mapping["\"pp qmgr\""] = "pp qmgr interface"
10}
11{
12 if ( substr($0,1,1) == "#" )
13 next
14 if ( $1 == "" )
15 next
16
17 if (new == "" ) {
18 tmp = $2
19 for (i=3; i<=NF -2; i++)
20 tmp = tmp " " $i
21
22 if ( $NF == "\\" )
23 new = $1
24 else {
25 if ($1 == "default")
26 continue
27 if (mapping [tmp] == "")
28 printf "%-14s %-20s %s\n", $1, tmp, $NF
29 else
30 printf "%-14s %-20s %s\n", $1, mapping[tmp], $NF
31 }
32 } else {
33 if (substr($1,1,1) == "\\")
34 $1 = substr ($1,2)
35
36 if (new == "default")
37 next
38 if (mapping [tmp] == "")
39 printf "%-14s %-20s %s\n", new, tmp, $1
40 else
41 printf "%-14s %-20s %s\n", new, mapping[tmp], $1
42
43 new = ""
44 }
45
46} '
47