CAPS Universe documentation  1.0.4
All you need to know to be successful
libcapsbase-local.h
Go to the documentation of this file.
1#pragma once
2
3/*
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 *
6 * (c) 2017 Juergen Borleis <projects@caps-printing.org>
7 *
8 * This library is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 */
17
19#ifdef DEBUG
20# define caps_print_debug(fmt, ...) caps_message_print(LIBCAPS_DEBUG, PACKAGE, __func__, __LINE__, fmt, ##__VA_ARGS__)
21#else
22# define caps_print_debug(fmt, ...)
23#endif
30#ifdef DSO_HIDDEN
31# define DSO_VISIBLE __attribute__((visibility("default")))
32#else
33# define DSO_VISIBLE
34#endif /* DSO_HIDDEN */
35
37#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
38
43#if ENABLE_NLS
44
45# ifndef PACKAGE
46# error "Missing 'PACKAGE' macro: include 'config.h' first"
47# endif
48
49# define _(string) dgettext(PACKAGE, string)
50# include <libintl.h>
51
52#else
53
54# define _(string) (string)
55
56#endif
61# define NLS_(string) (string)
62