VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/util/merge-err-lines@ 106061

Last change on this file since 106061 was 104078, checked in by vboxsync, 8 months ago

openssl-3.1.5: Applied and adjusted our OpenSSL changes to 3.1.4. bugref:10638

File size: 969 bytes
Line 
1#! /usr/bin/env perl
2# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9# Sometimes calls to XXXerr() are split into two lines, because the define'd
10# names are very long. This script looks for those lines and merges them.
11# It should be run before the "err-to-raise" script.
12
13# Run this program like this:
14# perl -pi util/merge-err-lines files...
15# or
16# git grep -l '[A-Z0-9]err([^)]*$' | xargs perl -pi util/merge-err-lines
17
18use strict;
19use warnings;
20
21# Look for "{whitespace}XXXerr(no-close-paren{WHITESPACE}" lines
22if ( /^ *[_A-Z0-9]+err\([^)]+ *$/ ) {
23 my $copy = $_;
24 chop($copy);
25 $copy =~ s/ +$//;
26 my $next = <>;
27 $next =~ s/^ +//;
28 $_ = $copy . ' ' . $next;
29}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette