1e1051a39Sopenharmony_ci#! /usr/bin/env perl
2e1051a39Sopenharmony_ci# Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
3e1051a39Sopenharmony_ci#
4e1051a39Sopenharmony_ci# Licensed under the Apache License 2.0 (the "License").  You may not use
5e1051a39Sopenharmony_ci# this file except in compliance with the License.  You can obtain a copy
6e1051a39Sopenharmony_ci# in the file LICENSE in the source distribution or at
7e1051a39Sopenharmony_ci# https://www.openssl.org/source/license.html
8e1051a39Sopenharmony_ci
9e1051a39Sopenharmony_ci# Run this program like this:
10e1051a39Sopenharmony_ci#       perl -pi util/err-to-raise files...
11e1051a39Sopenharmony_ci# or
12e1051a39Sopenharmony_ci#       git ls-files | grep '\.c$' | xargs perl -pi util/err-to-raise
13e1051a39Sopenharmony_ci# Consider running util/merge-err-lines first, to catch most (all?) of the
14e1051a39Sopenharmony_ci# cases where the XXXerr() call is split into two lines.
15e1051a39Sopenharmony_ci
16e1051a39Sopenharmony_ci# Do not use this in engines/, they have their own error reporting functions,
17e1051a39Sopenharmony_ci# which do call ERR_raise().
18e1051a39Sopenharmony_ci
19e1051a39Sopenharmony_ciuse strict;
20e1051a39Sopenharmony_ciuse warnings;
21e1051a39Sopenharmony_ci
22e1051a39Sopenharmony_cis/\b([_A-Z0-9]+)err\(\s*\w+\s*,/ERR_raise(ERR_LIB_$1,/;
23