]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/i18n.h
2 * "$Id: i18n.h 5925 2006-09-05 19:43:11Z mike $"
4 * (Private) localization support for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2006 by Easy Software Products.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
24 * This file is subject to the Apple OS-Developed Software exception.
28 # define _CUPS_I18N_H_
31 * Include necessary headers...
35 # include "transcode.h"
39 # endif /* __cplusplus */
43 * Macro for localized text...
53 typedef struct _cups_message_s
/**** Message catalog entry ****/
55 char *id
, /* Original string */
56 *str
; /* Localized string */
59 typedef struct _cups_cmap_s
/**** SBCS Charmap Struct ****/
61 struct _cups_cmap_s
*next
; /* Next charmap in cache */
62 int used
; /* Number of times entry used */
63 cups_encoding_t encoding
; /* Legacy charset encoding */
64 cups_ucs2_t char2uni
[256]; /* Map Legacy SBCS -> UCS-2 */
65 cups_sbcs_t
*uni2char
[256]; /* Map UCS-2 -> Legacy SBCS */
68 typedef struct _cups_wide2uni_s
/**** Wide to Unicode ****/
70 cups_vbcs_t widechar
; /* VBCS 32-bit Char (EUC) */
71 cups_ucs2_t unichar
; /* UCS-2 Char */
74 typedef struct _cups_vmap_s
/**** VBCS Charmap Struct ****/
76 struct _cups_vmap_s
*next
; /* Next charmap in cache */
77 int used
; /* Number of times entry used */
78 cups_encoding_t encoding
; /* Legacy charset encoding */
79 cups_ucs2_t
*char2uni
[256]; /* Map 16-bit Char -> UCS-2 */
80 int charcount
; /* Count of 16-bit VBCS Chars */
81 _cups_wide2uni_t
*wide2uni
; /* Map 32-bit Char -> UCS-2 */
82 int widecount
; /* Count of 32-bit VBCS Chars */
83 cups_vbcs_t
*uni2char
[256]; /* Map UCS-2 -> 32-bit VBCS */
84 cups_sbcs_t lead2char
[256]; /* Legacy Lead Char - 2-byte */
85 cups_sbcs_t lead3char
[256]; /* Legacy Lead Char - 3-byte */
86 cups_sbcs_t lead4char
[256]; /* Legacy Lead Char - 4-byte */
94 extern void _cupsCharmapFlush(void);
95 extern void _cupsCharmapFree(const cups_encoding_t encoding
);
96 extern void *_cupsCharmapGet(const cups_encoding_t encoding
);
97 extern const char *_cupsEncodingName(cups_encoding_t encoding
);
98 extern int _cupsLangPrintf(FILE *fp
, const char *message
, ...)
100 __attribute__ ((__format__ (__printf__
, 2, 3)))
101 # endif /* __GNUC__ */
103 extern int _cupsLangPuts(FILE *fp
, const char *message
);
104 extern const char *_cupsLangString(cups_lang_t
*lang
, const char *message
);
105 extern void _cupsMessageFree(cups_array_t
*a
);
106 extern cups_array_t
*_cupsMessageLoad(const char *filename
);
107 extern const char *_cupsMessageLookup(cups_array_t
*a
, const char *m
);
108 extern void _cupsSetLocale(char *argv
[]);
112 # endif /* __cplusplus */
114 #endif /* !_CUPS_I18N_H_ */
117 * End of "$Id: i18n.h 5925 2006-09-05 19:43:11Z mike $".