Imported Upstream version 1.22.4
[platform/upstream/groff.git] / font / util / make-Rproto
1 #! /bin/sh
2 #
3 # make-Rproto -- script for creating an R.proto file
4 #
5 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
6 #      Written by Werner Lemberg <wl@gnu.org>
7 #
8 # This file is part of groff.
9 #
10 # groff is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free
12 # Software Foundation, either version 3 of the License, or (at your
13 # option) any later version.
14 #
15 # groff is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 # for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 #
24 # usage:
25 #
26 #   make-Rproto R.proto.in < uniuni.cpp > R.proto
27 #
28 # 'R.proto.in' contains the device specific part of the R.proto file; it
29 # should end with a line containing the word 'charset'.
30 #
31 # 'uniuni.cpp' is located in directory 'src/libs/libgroff'.
32
33 prog="$0"
34
35 if test $# -ne 1; then
36   echo "usage: $0 R.proto.in < uniuni.cpp > R.proto"
37   exit 1
38 fi
39
40 # Emit preamble.
41 cat "$1"
42
43 # Extract composite characters.
44 grep '^  { ".*", ".*_.*" },' \
45 | sed 's/  { "\(.*\)", ".\(.*\)" },/u\2 24      0       0x\1/'
46
47 # EOF