X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fsu-filter.pl;h=389c7c35c5847a2df51afc497a12af6a6a8963f5;hp=8975af64f95c238c8613cc65f9106b5aa3566c0a;hb=4d02f8706381bf2bd002951daef9b26d9ed85968;hpb=f9be4da00e0db2f23c0d888b4c9e0727b8d0f20b;ds=sidebyside diff --git a/util/su-filter.pl b/util/su-filter.pl index 8975af64f9..389c7c35c5 100644 --- a/util/su-filter.pl +++ b/util/su-filter.pl @@ -1,7 +1,11 @@ -#!/usr/bin/env perl -# -# su-filter.pl +#! /usr/bin/env perl +# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. # +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + use strict; my $in_su = 0; @@ -47,7 +51,7 @@ while(<>) { do_output($out); $in_su = 0; } - } elsif($incomm <= 0 && /( *)(static )?(const )?(union|struct) ([^\s]+ )?\{/) { + } elsif($incomm <= 0 && /( *)(static )?(const )?(union|struct) ([a-zA-Z_\$][\$0-9a-zA-Z_]+ )?\{/) { $in_su = 1; $indent = $1; $out = $_; @@ -104,7 +108,7 @@ sub structureData { if($inbrace) { if($item eq "}") { $inbrace --; - + if(!$inbrace) { $substruc = structureData($dataitem); $dataitem = $substruc;