]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
503b54c9 | 2 | * Private localization support for CUPS. |
ef416fc2 | 3 | * |
ceaf5639 | 4 | * Copyright 2007-2018 by Apple Inc. |
503b54c9 | 5 | * Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 6 | * |
503b54c9 MS |
7 | * These coded instructions, statements, and computer programs are the |
8 | * property of Apple Inc. and are protected by Federal copyright | |
9 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
10 | * which should have been included with this file. If this file is | |
57b7b66b | 11 | * missing or damaged, see the license at "http://www.cups.org/". |
ef416fc2 | 12 | * |
503b54c9 | 13 | * This file is subject to the Apple OS-Developed Software exception. |
ef416fc2 | 14 | */ |
15 | ||
71e16022 MS |
16 | #ifndef _CUPS_LANGUAGE_PRIVATE_H_ |
17 | # define _CUPS_LANGUAGE_PRIVATE_H_ | |
ef416fc2 | 18 | |
19 | /* | |
20 | * Include necessary headers... | |
21 | */ | |
22 | ||
ceaf5639 | 23 | # include "config.h" |
d6ae789d | 24 | # include <stdio.h> |
71e16022 | 25 | # include <cups/transcode.h> |
454708a4 MS |
26 | # ifdef __APPLE__ |
27 | # include <CoreFoundation/CoreFoundation.h> | |
28 | # endif /* __APPLE__ */ | |
ef416fc2 | 29 | |
30 | # ifdef __cplusplus | |
31 | extern "C" { | |
32 | # endif /* __cplusplus */ | |
33 | ||
34 | ||
35 | /* | |
36 | * Macro for localized text... | |
37 | */ | |
38 | ||
39 | # define _(x) x | |
40 | ||
41 | ||
42 | /* | |
43 | * Types... | |
44 | */ | |
45 | ||
46 | typedef struct _cups_message_s /**** Message catalog entry ****/ | |
47 | { | |
48 | char *id, /* Original string */ | |
49 | *str; /* Localized string */ | |
50 | } _cups_message_t; | |
51 | ||
52 | ||
53 | /* | |
54 | * Prototypes... | |
55 | */ | |
56 | ||
f8b3a85b | 57 | # ifdef __APPLE__ |
454708a4 MS |
58 | extern const char *_cupsAppleLanguage(const char *locale, char *language, size_t langsize); |
59 | extern const char *_cupsAppleLocale(CFStringRef languageName, char *locale, size_t localesize); | |
f8b3a85b | 60 | # endif /* __APPLE__ */ |
d6ae789d | 61 | extern void _cupsCharmapFlush(void); |
ef416fc2 | 62 | extern const char *_cupsEncodingName(cups_encoding_t encoding); |
0837b7e8 MS |
63 | extern void _cupsLangPrintError(const char *prefix, |
64 | const char *message); | |
65 | extern int _cupsLangPrintFilter(FILE *fp, const char *prefix, | |
66 | const char *message, ...) | |
85dda01c | 67 | __attribute__ ((__format__ (__printf__, 3, 4))); |
fa73b229 | 68 | extern int _cupsLangPrintf(FILE *fp, const char *message, ...) |
85dda01c | 69 | __attribute__ ((__format__ (__printf__, 2, 3))); |
fa73b229 | 70 | extern int _cupsLangPuts(FILE *fp, const char *message); |
0837b7e8 MS |
71 | extern const char *_cupsLangString(cups_lang_t *lang, |
72 | const char *message); | |
ef416fc2 | 73 | extern void _cupsMessageFree(cups_array_t *a); |
8b116e60 | 74 | extern cups_array_t *_cupsMessageLoad(const char *filename, int unquote); |
ef416fc2 | 75 | extern const char *_cupsMessageLookup(cups_array_t *a, const char *m); |
a29fd7dd | 76 | extern cups_array_t *_cupsMessageNew(void *context); |
07725fee | 77 | extern void _cupsSetLocale(char *argv[]); |
ef416fc2 | 78 | |
a603edef | 79 | |
ef416fc2 | 80 | # ifdef __cplusplus |
81 | } | |
82 | # endif /* __cplusplus */ | |
83 | ||
71e16022 | 84 | #endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */ |