~ubuntu-branches/ubuntu/vivid/postfix/vivid-proposed

« back to all changes in this revision

Viewing changes to src/postconf/extract.awk

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2011-02-22 05:26:41 UTC
  • mto: (33.1.4 natty) (39.1.4 oneiric)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20110222052641-9kcxe1gt157c31j9
Tags: upstream-2.8.0
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        }
67
67
    }
68
68
}
 
69
/^(static| )*(const +)?CONFIG_NBOOL_TABLE .*\{/,/\};/ { 
 
70
    if ($1 ~ /^VAR/) {
 
71
        nbool_vars["int " substr($3,2,length($3)-2) ";"] = 1
 
72
        if (++btab[$1 $2 $4 $5 $6 $7 $8 $9] == 1) {
 
73
            nbool_table[$0] = 1
 
74
        }
 
75
    }
 
76
}
69
77
 
70
78
END { 
71
79
    # Print parameter declarations without busting old AWK's file limit.
99
107
        print key
100
108
    print "EOF"
101
109
 
 
110
    print "cat >nbool_vars.h <<'EOF'"
 
111
    for (key in nbool_vars)
 
112
        print key
 
113
    print "EOF"
 
114
 
102
115
    # Print parameter initializations without busting old AWK's file limit.
103
116
    print "sed 's/[     ][      ]*/ /g' >int_table.h <<'EOF'"
104
117
    for (key in int_table)
130
143
        print key
131
144
    print "EOF"
132
145
 
 
146
    print "sed 's/[     ][      ]*/ /g' >nbool_table.h <<'EOF'"
 
147
    for (key in nbool_table)
 
148
        print key
 
149
    print "EOF"
 
150
 
133
151
    # Flush output nicely.
134
152
    exit(0);
135
153
}