]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/language-private.h
4 * Private localization support for CUPS.
6 * Copyright 2007-2010 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
15 * This file is subject to the Apple OS-Developed Software exception.
18 #ifndef _CUPS_LANGUAGE_PRIVATE_H_
19 # define _CUPS_LANGUAGE_PRIVATE_H_
22 * Include necessary headers...
26 # include <cups/transcode.h>
30 # endif /* __cplusplus */
34 * Macro for localized text...
44 typedef struct _cups_message_s
/**** Message catalog entry ****/
46 char *id
, /* Original string */
47 *str
; /* Localized string */
50 typedef struct _cups_cmap_s
/**** SBCS Charmap Struct ****/
52 struct _cups_cmap_s
*next
; /* Next charmap in cache */
53 int used
; /* Number of times entry used */
54 cups_encoding_t encoding
; /* Legacy charset encoding */
55 cups_ucs2_t char2uni
[256]; /* Map Legacy SBCS -> UCS-2 */
56 cups_sbcs_t
*uni2char
[256]; /* Map UCS-2 -> Legacy SBCS */
59 typedef struct _cups_wide2uni_s
/**** Wide to Unicode ****/
61 cups_vbcs_t widechar
; /* VBCS 32-bit Char (EUC) */
62 cups_ucs2_t unichar
; /* UCS-2 Char */
65 typedef struct _cups_vmap_s
/**** VBCS Charmap Struct ****/
67 struct _cups_vmap_s
*next
; /* Next charmap in cache */
68 int used
; /* Number of times entry used */
69 cups_encoding_t encoding
; /* Legacy charset encoding */
70 cups_ucs2_t
*char2uni
[256]; /* Map 16-bit Char -> UCS-2 */
71 int charcount
; /* Count of 16-bit VBCS Chars */
72 _cups_wide2uni_t
*wide2uni
; /* Map 32-bit Char -> UCS-2 */
73 int widecount
; /* Count of 32-bit VBCS Chars */
74 cups_vbcs_t
*uni2char
[256]; /* Map UCS-2 -> 32-bit VBCS */
75 cups_sbcs_t lead2char
[256]; /* Legacy Lead Char - 2-byte */
76 cups_sbcs_t lead3char
[256]; /* Legacy Lead Char - 3-byte */
77 cups_sbcs_t lead4char
[256]; /* Legacy Lead Char - 4-byte */
86 extern const char *_cupsAppleLanguage(const char *locale
, char *language
,
88 # endif /* __APPLE__ */
89 extern void _cupsCharmapFlush(void);
90 extern const char *_cupsEncodingName(cups_encoding_t encoding
);
91 extern void _cupsLangPrintError(const char *message
);
92 extern int _cupsLangPrintf(FILE *fp
, const char *message
, ...)
94 __attribute__ ((__format__ (__printf__
, 2, 3)))
95 # endif /* __GNUC__ */
97 extern int _cupsLangPuts(FILE *fp
, const char *message
);
98 extern const char *_cupsLangString(cups_lang_t
*lang
, const char *message
);
99 extern void _cupsMessageFree(cups_array_t
*a
);
100 extern cups_array_t
*_cupsMessageLoad(const char *filename
, int unquote
);
101 extern const char *_cupsMessageLookup(cups_array_t
*a
, const char *m
);
102 extern void _cupsSetLocale(char *argv
[]);
107 # endif /* __cplusplus */
109 #endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */