Commit | Line | Data |
---|---|---|
7eea9d3b NA |
1 | # |
2 | # Copyright (C) 2020 Free Software Foundation, Inc. | |
3 | # | |
4 | # This file is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 2 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; see the file COPYING. If not see | |
16 | # <http://www.gnu.org/licenses/>. | |
17 | # | |
18 | ||
19 | # Only process lines in the error-define block | |
20 | /= ECTF_BASE/,/ECTF_NERR/ { | |
21 | # Do not process non-errors (braces, ECTF_NERR, etc). | |
22 | /^ *ECTF_/!n; | |
23 | # Strip out the base initializer. | |
24 | s, = ECTF_BASE,,; | |
25 | # Transform errors into _STR(...). | |
26 | s@^ *\(ECTF_[^[:blank:],]*\),\{0,1\}[[:blank:]]*/\* \(.*\). \*/$@_CTF_STR (\1, "\2")@; | |
27 | p; | |
28 | } |