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