diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2021-10-19 00:06:23 +0200 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2021-10-25 00:20:21 +0200 |
commit | 0b2b6207c24bfab3878185d1f907fd0d960931da (patch) | |
tree | a9e6773370c5a9f2b7f358031ec15ac35dd0effe /camlibs/pccam600 | |
parent | b6e9e97fe8a12fde1aa3486be563c3362005de8e (diff) | |
download | libgphoto2-0b2b6207c24bfab3878185d1f907fd0d960931da.tar.gz |
Factor out i18n stuff into separate i18n.h files
Factor out the i18n definitions into i18n.h include files:
One include file each for libgphoto2 and for libgphoto2_port.
This removes the complete
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (GETTEXT_PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
block (which in some occasions defines even more macros)
and replaces it with a single line
#include "libgphoto2/i18n.h"
for camlibs and libgphoto2 itself and with
#include "libgphoto2_port/i18n.h"
for iolibs and libgphoto2_port itself.
This gives us two central locations to change the defintions.
Diffstat (limited to 'camlibs/pccam600')
-rw-r--r-- | camlibs/pccam600/library.c | 17 | ||||
-rw-r--r-- | camlibs/pccam600/pccam600.c | 16 |
2 files changed, 6 insertions, 27 deletions
diff --git a/camlibs/pccam600/library.c b/camlibs/pccam600/library.c index fe01597a4..33b30c9af 100644 --- a/camlibs/pccam600/library.c +++ b/camlibs/pccam600/library.c @@ -39,21 +39,10 @@ #include <gphoto2/gphoto2.h> #include <gphoto2/gphoto2-port.h> -#define GP_MODULE "pccam600" +#include "libgphoto2/i18n.h" + -#ifdef ENABLE_NLS -# include <libintl.h> -# undef _ -# define _(String) dgettext (GETTEXT_PACKAGE, String) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else -# define _(String) (String) -# define N_(String) (String) -#endif +#define GP_MODULE "pccam600" #define QUALITY_LO 0x56 diff --git a/camlibs/pccam600/pccam600.c b/camlibs/pccam600/pccam600.c index 2f60e6056..39170472a 100644 --- a/camlibs/pccam600/pccam600.c +++ b/camlibs/pccam600/pccam600.c @@ -36,21 +36,11 @@ #include <gphoto2/gphoto2-port.h> #include <gphoto2/gphoto2-port-log.h> +#include "libgphoto2/i18n.h" + + #define GP_MODULE "pccam600" -#ifdef ENABLE_NLS -# include <libintl.h> -# undef _ -# define _(String) dgettext (GETTEXT_PACKAGE, String) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else -# define _(String) (String) -# define N_(String) (String) -#endif /* *waits until the status value is 0 or 8. |