Bump version to 4.3-4
[LibreOffice.git] / i18npool / source / localedata / genstaticheader.pl
blob0257185c37f51deb9f0cc1bd4586e912289d5c9b
1 #!/usr/bin/perl -w # -*- tab-width: 4; indent-tabs-mode: nil;
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 my @FUNCS = qw(
11 getAllCalendars
12 getAllCurrencies
13 getAllFormats0
14 getBreakIteratorRules
15 getCollationOptions
16 getCollatorImplementation
17 getContinuousNumberingLevels
18 getDateAcceptancePatterns
19 getFollowPageWords
20 getForbiddenCharacters
21 getIndexAlgorithm
22 getLCInfo
23 getLocaleItem
24 getOutlineNumberingLevels
25 getReservedWords
26 getSearchOptions
27 getTransliterations
28 getUnicodeScripts
29 getAllFormats1
32 print 'extern "C" {
36 foreach my $lang (@ARGV) {
37 foreach my $func (@FUNCS) {
38 if ($func eq 'getAllFormats1') {
39 if ($lang eq 'en_US') {
40 printf("void %s_%s();\n", $func, $lang);
42 } else {
43 printf("void %s_%s();\n", $func, $lang);
48 print '
49 static const struct {
50 const char *pLocale;
52 foreach my $func (@FUNCS) {
53 printf(" void (*%s)();\n", $func);
55 print '} aLibTable[] = {
58 foreach my $lang (@ARGV) {
59 printf(" {\n");
60 printf(" \"%s\",\n", $lang);
61 foreach my $func (@FUNCS) {
62 if ($func eq 'getAllFormats1') {
63 if ($lang eq 'en_US') {
64 printf(" %s_%s,\n", $func, $lang);
65 } else {
66 printf(" 0,\n");
68 } else {
69 printf(" %s_%s,\n", $func, $lang);
72 printf(" }%s\n", ($lang ne $ARGV[$#ARGV]) ? ',' : '');
75 print '};
80 # vim:set shiftwidth=4 softtabstop=4 expandtab: