|
121 | 121 | print OUT <<'EOF'; |
122 | 122 | /* crypto/objects/obj_mac.h */ |
123 | 123 |
|
124 | | -/* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the |
125 | | - * following command: |
126 | | - * perl objects.pl objects.txt obj_mac.num obj_mac.h |
| 124 | +/* |
| 125 | + * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following |
| 126 | + * command: perl objects.pl objects.txt obj_mac.num obj_mac.h |
127 | 127 | */ |
128 | 128 |
|
129 | 129 | /* Copyright (C) 1995-1997 Eric Young ([email protected]) |
|
132 | 132 | * This package is an SSL implementation written |
133 | 133 | * by Eric Young ([email protected]). |
134 | 134 | * The implementation was written so as to conform with Netscapes SSL. |
135 | | - * |
| 135 | + * |
136 | 136 | * This library is free for commercial and non-commercial use as long as |
137 | 137 | * the following conditions are aheared to. The following conditions |
138 | 138 | * apply to all code found in this distribution, be it the RC4, RSA, |
139 | 139 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation |
140 | 140 | * included with this distribution is covered by the same copyright terms |
141 | 141 | * except that the holder is Tim Hudson ([email protected]). |
142 | | - * |
| 142 | + * |
143 | 143 | * Copyright remains Eric Young's, and as such any Copyright notices in |
144 | 144 | * the code are not to be removed. |
145 | 145 | * If this package is used in a product, Eric Young should be given attribution |
146 | 146 | * as the author of the parts of the library used. |
147 | 147 | * This can be in the form of a textual message at program startup or |
148 | 148 | * in documentation (online or textual) provided with the package. |
149 | | - * |
| 149 | + * |
150 | 150 | * Redistribution and use in source and binary forms, with or without |
151 | 151 | * modification, are permitted provided that the following conditions |
152 | 152 | * are met: |
|
161 | 161 | |
162 | 162 | * The word 'cryptographic' can be left out if the rouines from the library |
163 | 163 | * being used are not cryptographic related :-). |
164 | | - * 4. If you include any Windows specific code (or a derivative thereof) from |
| 164 | + * 4. If you include any Windows specific code (or a derivative thereof) from |
165 | 165 | * the apps directory (application code) you must include an acknowledgement: |
166 | 166 | * "This product includes software written by Tim Hudson ([email protected])" |
167 | | - * |
| 167 | + * |
168 | 168 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND |
169 | 169 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
170 | 170 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
176 | 176 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
177 | 177 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
178 | 178 | * SUCH DAMAGE. |
179 | | - * |
| 179 | + * |
180 | 180 | * The licence and distribution terms for any publically available version or |
181 | 181 | * derivative of this code cannot be changed. i.e. this code cannot simply be |
182 | 182 | * copied and put under another distribution licence |
183 | 183 | * [including the GNU Public Licence.] |
184 | 184 | */ |
185 | 185 |
|
186 | | -#define SN_undef "UNDEF" |
187 | | -#define LN_undef "undefined" |
188 | | -#define NID_undef 0 |
189 | | -#define OBJ_undef 0L |
190 | | -
|
| 186 | +#define SN_undef "UNDEF" |
| 187 | +#define LN_undef "undefined" |
| 188 | +#define NID_undef 0 |
| 189 | +#define OBJ_undef 0L |
191 | 190 | EOF |
192 | 191 |
|
| 192 | +sub expand |
| 193 | + { |
| 194 | + my $string = shift; |
| 195 | + |
| 196 | + 1 while $string =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; |
| 197 | + |
| 198 | + return $string; |
| 199 | + } |
| 200 | + |
193 | 201 | foreach (sort { $a <=> $b } keys %ordern) |
194 | 202 | { |
195 | 203 | $Cname=$ordern{$_}; |
196 | | - print OUT "#define SN_",$Cname,"\t\t\"",$sn{$Cname},"\"\n" if $sn{$Cname} ne ""; |
197 | | - print OUT "#define LN_",$Cname,"\t\t\"",$ln{$Cname},"\"\n" if $ln{$Cname} ne ""; |
198 | | - print OUT "#define NID_",$Cname,"\t\t",$nid{$Cname},"\n" if $nid{$Cname} ne ""; |
199 | | - print OUT "#define OBJ_",$Cname,"\t\t",$obj{$Cname},"\n" if $obj{$Cname} ne ""; |
200 | 204 | print OUT "\n"; |
| 205 | + print OUT expand("#define SN_$Cname\t\t\"$sn{$Cname}\"\n") if $sn{$Cname} ne ""; |
| 206 | + print OUT expand("#define LN_$Cname\t\t\"$ln{$Cname}\"\n") if $ln{$Cname} ne ""; |
| 207 | + print OUT expand("#define NID_$Cname\t\t$nid{$Cname}\n") if $nid{$Cname} ne ""; |
| 208 | + print OUT expand("#define OBJ_$Cname\t\t$obj{$Cname}\n") if $obj{$Cname} ne ""; |
201 | 209 | } |
202 | 210 |
|
203 | 211 | close OUT; |
|
0 commit comments