]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/language-private.h
Merge changes from CUPS 1.6svn-r9968.
[thirdparty/cups.git] / cups / language-private.h
CommitLineData
ef416fc2 1/*
71e16022 2 * "$Id$"
ef416fc2 3 *
71e16022 4 * Private localization support for CUPS.
ef416fc2 5 *
71e16022 6 * Copyright 2007-2010 by Apple Inc.
ef416fc2 7 * Copyright 1997-2006 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
bc44d920 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/".
ef416fc2 14 *
15 * This file is subject to the Apple OS-Developed Software exception.
16 */
17
71e16022
MS
18#ifndef _CUPS_LANGUAGE_PRIVATE_H_
19# define _CUPS_LANGUAGE_PRIVATE_H_
ef416fc2 20
21/*
22 * Include necessary headers...
23 */
24
d6ae789d 25# include <stdio.h>
71e16022 26# include <cups/transcode.h>
ef416fc2 27
28# ifdef __cplusplus
29extern "C" {
30# endif /* __cplusplus */
31
32
33/*
34 * Macro for localized text...
35 */
36
37# define _(x) x
38
39
40/*
41 * Types...
42 */
43
44typedef struct _cups_message_s /**** Message catalog entry ****/
45{
46 char *id, /* Original string */
47 *str; /* Localized string */
48} _cups_message_t;
49
50
51/*
52 * Prototypes...
53 */
54
f8b3a85b 55# ifdef __APPLE__
0a682745
MS
56extern const char *_cupsAppleLanguage(const char *locale, char *language,
57 size_t langsize);
f8b3a85b 58# endif /* __APPLE__ */
d6ae789d 59extern void _cupsCharmapFlush(void);
ef416fc2 60extern const char *_cupsEncodingName(cups_encoding_t encoding);
0837b7e8
MS
61extern void _cupsLangPrintError(const char *prefix,
62 const char *message);
63extern int _cupsLangPrintFilter(FILE *fp, const char *prefix,
64 const char *message, ...)
85dda01c 65 __attribute__ ((__format__ (__printf__, 3, 4)));
fa73b229 66extern int _cupsLangPrintf(FILE *fp, const char *message, ...)
85dda01c 67 __attribute__ ((__format__ (__printf__, 2, 3)));
fa73b229 68extern int _cupsLangPuts(FILE *fp, const char *message);
0837b7e8
MS
69extern const char *_cupsLangString(cups_lang_t *lang,
70 const char *message);
ef416fc2 71extern void _cupsMessageFree(cups_array_t *a);
8b116e60 72extern cups_array_t *_cupsMessageLoad(const char *filename, int unquote);
ef416fc2 73extern const char *_cupsMessageLookup(cups_array_t *a, const char *m);
07725fee 74extern void _cupsSetLocale(char *argv[]);
ef416fc2 75
a603edef 76
ef416fc2 77# ifdef __cplusplus
78}
79# endif /* __cplusplus */
80
71e16022 81#endif /* !_CUPS_LANGUAGE_PRIVATE_H_ */
ef416fc2 82
83/*
71e16022 84 * End of "$Id$".
ef416fc2 85 */