4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright 2017 Nexenta Systems, Inc.
18 # Combine LC_CTYPE classes from all .UTF-8.src files to be compiled by localedef
19 # into one LC_CTYPE/LCL_DATA used by all locales, so we have the same case
20 # mapping tables, character classes, etc. for all of them. This is not general
21 # purpose parser but is good enough for the stock files supplied with CLDR.
25 for i
in upper lower alpha space cntrl graph print punct digit xdigit blank \
27 # sed can't match both range patterns on the same line so we just make
28 # it look like valid multiline class by duplicating the definition
36 sed -n "/^$i/,/\([>)]\)$/ {
43 sed "1 s,^,$i,;$ s,\([>)]\);/,\1,"
46 # Add the manually assembled definitions from FreeBSD
47 # (originally tools/tools/locale/etc/manual-input.UTF-8).
48 cat data
/manual-input.UTF-8
50 printf "\nEND LC_CTYPE\n"