Search
lxdream.org :: lxdream :: r755:ab873907b00e
lxdream 0.9.1
released Jun 29
Download Now
changeset755:ab873907b00e
parent754:35c496703380
child756:38385124df7a
authornkeynes
dateMon Jul 21 00:08:34 2008 +0000 (15 years ago)
Add gettext.h and build sanely without libintl if it's not available
Remove x86dasm's config.h & opintl.h (no longer needed and actually wrong)
src/aica/audio.h
src/cocoaui/cocoaui.h
src/config.h
src/display.h
src/gdlist.c
src/gettext.h
src/gtkui/debug_win.c
src/gtkui/dump_win.c
src/gtkui/gdrom_menu.c
src/gtkui/gtkui.c
src/gtkui/gtkui.h
src/gtkui/mmio_win.c
src/main.c
src/x86dasm/bfd.h
src/x86dasm/config.h
src/x86dasm/dis-asm.h
src/x86dasm/dis-buf.c
src/x86dasm/dis-init.c
src/x86dasm/i386-dis.c
src/x86dasm/opintl.h
src/x86dasm/sysdep.h
src/x86dasm/x86dasm.c
1.1 --- a/src/aica/audio.h Sun Jul 20 11:37:47 2008 +0000
1.2 +++ b/src/aica/audio.h Mon Jul 21 00:08:34 2008 +0000
1.3 @@ -21,7 +21,7 @@
1.4 #include <stdint.h>
1.5 #include <stdio.h>
1.6 #include <glib/gtypes.h>
1.7 -#include <glib/gi18n.h>
1.8 +#include "gettext.h"
1.9
1.10 #ifdef __cplusplus
1.11 extern "C" {
2.1 --- a/src/cocoaui/cocoaui.h Sun Jul 20 11:37:47 2008 +0000
2.2 +++ b/src/cocoaui/cocoaui.h Mon Jul 21 00:08:34 2008 +0000
2.3 @@ -20,7 +20,8 @@
2.4 #define lxdream_cocoaui_H
2.5
2.6 #import <AppKit/AppKit.h>
2.7 -#include <glib/gi18n.h>
2.8 +#include "lxdream.h"
2.9 +#include "gettext.h"
2.10
2.11 #ifdef __cplusplus
2.12 extern "C" {
3.1 --- a/src/config.h Sun Jul 20 11:37:47 2008 +0000
3.2 +++ b/src/config.h Mon Jul 21 00:08:34 2008 +0000
3.3 @@ -20,7 +20,7 @@
3.4 #define lxdream_config_H 1
3.5
3.6 #include <glib/gtypes.h>
3.7 -#include <glib/gi18n.h>
3.8 +#include "gettext.h"
3.9
3.10 #ifdef __cplusplus
3.11 extern "C" {
4.1 --- a/src/display.h Sun Jul 20 11:37:47 2008 +0000
4.2 +++ b/src/display.h Mon Jul 21 00:08:34 2008 +0000
4.3 @@ -25,8 +25,8 @@
4.4 #include <stdint.h>
4.5 #include <stdio.h>
4.6 #include <glib.h>
4.7 -#include <glib/gi18n.h>
4.8 #include "lxdream.h"
4.9 +#include "gettext.h"
4.10 #ifdef APPLE_BUILD
4.11 #include <OpenGL/gl.h>
4.12 #include <OpenGL/glext.h>
5.1 --- a/src/gdlist.c Sun Jul 20 11:37:47 2008 +0000
5.2 +++ b/src/gdlist.c Mon Jul 21 00:08:34 2008 +0000
5.3 @@ -20,8 +20,8 @@
5.4 #include <string.h>
5.5 #include <stdlib.h>
5.6 #include <glib/gstrfuncs.h>
5.7 -#include <glib/gi18n.h>
5.8 #include <libgen.h>
5.9 +#include "gettext.h"
5.10 #include "gdrom/gdrom.h"
5.11 #include "gdlist.h"
5.12 #include "lxdream.h"
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/src/gettext.h Mon Jul 21 00:08:34 2008 +0000
6.3 @@ -0,0 +1,273 @@
6.4 +/* Convenience header for conditional use of GNU <libintl.h>.
6.5 + Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
6.6 +
6.7 + This program is free software; you can redistribute it and/or modify it
6.8 + under the terms of the GNU Library General Public License as published
6.9 + by the Free Software Foundation; either version 2, or (at your option)
6.10 + any later version.
6.11 +
6.12 + This program is distributed in the hope that it will be useful,
6.13 + but WITHOUT ANY WARRANTY; without even the implied warranty of
6.14 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6.15 + Library General Public License for more details.
6.16 +
6.17 + You should have received a copy of the GNU Library General Public
6.18 + License along with this program; if not, write to the Free Software
6.19 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
6.20 + USA. */
6.21 +
6.22 +#ifndef _LIBGETTEXT_H
6.23 +#define _LIBGETTEXT_H 1
6.24 +
6.25 +#define _(String) gettext (String)
6.26 +#define Q_(String) g_strip_context ((String), gettext (String))
6.27 +#ifdef gettext_noop
6.28 +#define N_(String) gettext_noop (String)
6.29 +#else
6.30 +#define N_(String) (String)
6.31 +#endif
6.32 +
6.33 +/* NLS can be disabled through the configure --disable-nls option. */
6.34 +#if ENABLE_NLS
6.35 +
6.36 +/* Get declarations of GNU message catalog functions. */
6.37 +# include <libintl.h>
6.38 +
6.39 +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
6.40 + the gettext() and ngettext() macros. This is an alternative to calling
6.41 + textdomain(), and is useful for libraries. */
6.42 +# ifdef DEFAULT_TEXT_DOMAIN
6.43 +# undef gettext
6.44 +# define gettext(Msgid) \
6.45 + dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
6.46 +# undef ngettext
6.47 +# define ngettext(Msgid1, Msgid2, N) \
6.48 + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
6.49 +# endif
6.50 +
6.51 +#else
6.52 +
6.53 +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
6.54 + chokes if dcgettext is defined as a macro. So include it now, to make
6.55 + later inclusions of <locale.h> a NOP. We don't include <libintl.h>
6.56 + as well because people using "gettext.h" will not include <libintl.h>,
6.57 + and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
6.58 + is OK. */
6.59 +#if defined(__sun)
6.60 +# include <locale.h>
6.61 +#endif
6.62 +
6.63 +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
6.64 + <libintl.h>, which chokes if dcgettext is defined as a macro. So include
6.65 + it now, to make later inclusions of <libintl.h> a NOP. */
6.66 +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
6.67 +# include <cstdlib>
6.68 +# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
6.69 +# include <libintl.h>
6.70 +# endif
6.71 +#endif
6.72 +
6.73 +/* Disabled NLS.
6.74 + The casts to 'const char *' serve the purpose of producing warnings
6.75 + for invalid uses of the value returned from these functions.
6.76 + On pre-ANSI systems without 'const', the config.h file is supposed to
6.77 + contain "#define const". */
6.78 +# define gettext(Msgid) ((const char *) (Msgid))
6.79 +# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
6.80 +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
6.81 +# define ngettext(Msgid1, Msgid2, N) \
6.82 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
6.83 +# define dngettext(Domainname, Msgid1, Msgid2, N) \
6.84 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
6.85 +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
6.86 + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
6.87 +# define textdomain(Domainname) ((const char *) (Domainname))
6.88 +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
6.89 +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
6.90 +
6.91 +#endif
6.92 +
6.93 +/* A pseudo function call that serves as a marker for the automated
6.94 + extraction of messages, but does not call gettext(). The run-time
6.95 + translation is done at a different place in the code.
6.96 + The argument, String, should be a literal string. Concatenated strings
6.97 + and other string expressions won't work.
6.98 + The macro's expansion is not parenthesized, so that it is suitable as
6.99 + initializer for static 'char[]' or 'const char[]' variables. */
6.100 +#define gettext_noop(String) String
6.101 +
6.102 +/* The separator between msgctxt and msgid in a .mo file. */
6.103 +#define GETTEXT_CONTEXT_GLUE "\004"
6.104 +
6.105 +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
6.106 + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
6.107 + short and rarely need to change.
6.108 + The letter 'p' stands for 'particular' or 'special'. */
6.109 +#ifdef DEFAULT_TEXT_DOMAIN
6.110 +# define pgettext(Msgctxt, Msgid) \
6.111 + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
6.112 +#else
6.113 +# define pgettext(Msgctxt, Msgid) \
6.114 + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
6.115 +#endif
6.116 +#define dpgettext(Domainname, Msgctxt, Msgid) \
6.117 + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
6.118 +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
6.119 + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
6.120 +#ifdef DEFAULT_TEXT_DOMAIN
6.121 +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
6.122 + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
6.123 +#else
6.124 +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
6.125 + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
6.126 +#endif
6.127 +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
6.128 + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
6.129 +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
6.130 + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
6.131 +
6.132 +#ifdef __GNUC__
6.133 +__inline
6.134 +#else
6.135 +#ifdef __cplusplus
6.136 +inline
6.137 +#endif
6.138 +#endif
6.139 +static const char *
6.140 +pgettext_aux (const char *domain,
6.141 + const char *msg_ctxt_id, const char *msgid,
6.142 + int category)
6.143 +{
6.144 + const char *translation = dcgettext (domain, msg_ctxt_id, category);
6.145 + if (translation == msg_ctxt_id)
6.146 + return msgid;
6.147 + else
6.148 + return translation;
6.149 +}
6.150 +
6.151 +#ifdef __GNUC__
6.152 +__inline
6.153 +#else
6.154 +#ifdef __cplusplus
6.155 +inline
6.156 +#endif
6.157 +#endif
6.158 +static const char *
6.159 +npgettext_aux (const char *domain,
6.160 + const char *msg_ctxt_id, const char *msgid,
6.161 + const char *msgid_plural, unsigned long int n,
6.162 + int category)
6.163 +{
6.164 + const char *translation =
6.165 + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
6.166 + if (translation == msg_ctxt_id || translation == msgid_plural)
6.167 + return (n == 1 ? msgid : msgid_plural);
6.168 + else
6.169 + return translation;
6.170 +}
6.171 +
6.172 +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
6.173 + can be arbitrary expressions. But for string literals these macros are
6.174 + less efficient than those above. */
6.175 +
6.176 +#include <string.h>
6.177 +
6.178 +#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
6.179 + (__GNUC__ >= 3 || __GNUG__ >= 2 /* || __STDC_VERSION__ >= 199901L */ )
6.180 +
6.181 +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
6.182 +#include <stdlib.h>
6.183 +#endif
6.184 +
6.185 +#define pgettext_expr(Msgctxt, Msgid) \
6.186 + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
6.187 +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
6.188 + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
6.189 +
6.190 +#ifdef __GNUC__
6.191 +__inline
6.192 +#else
6.193 +#ifdef __cplusplus
6.194 +inline
6.195 +#endif
6.196 +#endif
6.197 +static const char *
6.198 +dcpgettext_expr (const char *domain,
6.199 + const char *msgctxt, const char *msgid,
6.200 + int category)
6.201 +{
6.202 + size_t msgctxt_len = strlen (msgctxt) + 1;
6.203 + size_t msgid_len = strlen (msgid) + 1;
6.204 + const char *translation;
6.205 +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
6.206 + char msg_ctxt_id[msgctxt_len + msgid_len];
6.207 +#else
6.208 + char buf[1024];
6.209 + char *msg_ctxt_id =
6.210 + (msgctxt_len + msgid_len <= sizeof (buf)
6.211 + ? buf
6.212 + : (char *) malloc (msgctxt_len + msgid_len));
6.213 + if (msg_ctxt_id != NULL)
6.214 +#endif
6.215 + {
6.216 + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
6.217 + msg_ctxt_id[msgctxt_len - 1] = '\004';
6.218 + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
6.219 + translation = dcgettext (domain, msg_ctxt_id, category);
6.220 +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
6.221 + if (msg_ctxt_id != buf)
6.222 + free (msg_ctxt_id);
6.223 +#endif
6.224 + if (translation != msg_ctxt_id)
6.225 + return translation;
6.226 + }
6.227 + return msgid;
6.228 +}
6.229 +
6.230 +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
6.231 + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
6.232 +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
6.233 + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
6.234 +
6.235 +#ifdef __GNUC__
6.236 +__inline
6.237 +#else
6.238 +#ifdef __cplusplus
6.239 +inline
6.240 +#endif
6.241 +#endif
6.242 +static const char *
6.243 +dcnpgettext_expr (const char *domain,
6.244 + const char *msgctxt, const char *msgid,
6.245 + const char *msgid_plural, unsigned long int n,
6.246 + int category)
6.247 +{
6.248 + size_t msgctxt_len = strlen (msgctxt) + 1;
6.249 + size_t msgid_len = strlen (msgid) + 1;
6.250 + const char *translation;
6.251 +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
6.252 + char msg_ctxt_id[msgctxt_len + msgid_len];
6.253 +#else
6.254 + char buf[1024];
6.255 + char *msg_ctxt_id =
6.256 + (msgctxt_len + msgid_len <= sizeof (buf)
6.257 + ? buf
6.258 + : (char *) malloc (msgctxt_len + msgid_len));
6.259 + if (msg_ctxt_id != NULL)
6.260 +#endif
6.261 + {
6.262 + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
6.263 + msg_ctxt_id[msgctxt_len - 1] = '\004';
6.264 + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
6.265 + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
6.266 +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
6.267 + if (msg_ctxt_id != buf)
6.268 + free (msg_ctxt_id);
6.269 +#endif
6.270 + if (!(translation == msg_ctxt_id || translation == msgid_plural))
6.271 + return translation;
6.272 + }
6.273 + return (n == 1 ? msgid : msgid_plural);
6.274 +}
6.275 +
6.276 +#endif /* _LIBGETTEXT_H */
7.1 --- a/src/gtkui/debug_win.c Sun Jul 20 11:37:47 2008 +0000
7.2 +++ b/src/gtkui/debug_win.c Mon Jul 21 00:08:34 2008 +0000
7.3 @@ -19,7 +19,6 @@
7.4 #include <stdio.h>
7.5 #include <string.h>
7.6 #include <math.h>
7.7 -#include <glib/gi18n.h>
7.8 #include <gdk/gdkkeysyms.h>
7.9 #include "mem.h"
7.10 #include "cpu.h"
8.1 --- a/src/gtkui/dump_win.c Sun Jul 20 11:37:47 2008 +0000
8.2 +++ b/src/gtkui/dump_win.c Mon Jul 21 00:08:34 2008 +0000
8.3 @@ -20,7 +20,6 @@
8.4 #include <assert.h>
8.5 #include <string.h>
8.6 #include <stdlib.h>
8.7 -#include <glib/gi18n.h>
8.8 #include "mem.h"
8.9 #include "gtkui/gtkui.h"
8.10
9.1 --- a/src/gtkui/gdrom_menu.c Sun Jul 20 11:37:47 2008 +0000
9.2 +++ b/src/gtkui/gdrom_menu.c Mon Jul 21 00:08:34 2008 +0000
9.3 @@ -18,8 +18,6 @@
9.4
9.5 #include <assert.h>
9.6 #include <libgen.h>
9.7 -#include <glib/gi18n.h>
9.8 -
9.9 #include "dream.h"
9.10 #include "dreamcast.h"
9.11 #include "config.h"
10.1 --- a/src/gtkui/gtkui.c Sun Jul 20 11:37:47 2008 +0000
10.2 +++ b/src/gtkui/gtkui.c Mon Jul 21 00:08:34 2008 +0000
10.3 @@ -20,7 +20,6 @@
10.4 #include <stdlib.h>
10.5 #include <unistd.h>
10.6 #include <sys/time.h>
10.7 -#include <glib/gi18n.h>
10.8 #include <gtk/gtkversion.h>
10.9 #include "lxdream.h"
10.10 #include "dreamcast.h"
11.1 --- a/src/gtkui/gtkui.h Sun Jul 20 11:37:47 2008 +0000
11.2 +++ b/src/gtkui/gtkui.h Mon Jul 21 00:08:34 2008 +0000
11.3 @@ -21,7 +21,7 @@
11.4
11.5 #include "lxdream.h"
11.6 #include <gtk/gtk.h>
11.7 -#include <glib/gi18n.h>
11.8 +#include "gettext.h"
11.9 #include "gui.h"
11.10 #include "cpu.h"
11.11
12.1 --- a/src/gtkui/mmio_win.c Sun Jul 20 11:37:47 2008 +0000
12.2 +++ b/src/gtkui/mmio_win.c Mon Jul 21 00:08:34 2008 +0000
12.3 @@ -18,7 +18,6 @@
12.4
12.5 #include <stdint.h>
12.6 #include <string.h>
12.7 -#include <glib/gi18n.h>
12.8 #include "gtkui/gtkui.h"
12.9 #include "mem.h"
12.10 #include "mmio.h"
13.1 --- a/src/main.c Sun Jul 20 11:37:47 2008 +0000
13.2 +++ b/src/main.c Mon Jul 21 00:08:34 2008 +0000
13.3 @@ -20,7 +20,7 @@
13.4 #include <stdlib.h>
13.5 #include <unistd.h>
13.6 #include <getopt.h>
13.7 -#include <glib/gi18n.h>
13.8 +#include "gettext.h"
13.9 #include "lxdream.h"
13.10 #include "syscall.h"
13.11 #include "mem.h"
14.1 --- a/src/x86dasm/bfd.h Sun Jul 20 11:37:47 2008 +0000
14.2 +++ b/src/x86dasm/bfd.h Mon Jul 21 00:08:34 2008 +0000
14.3 @@ -35,8 +35,8 @@
14.4 extern "C" {
14.5 #endif
14.6
14.7 -#include "ansidecl.h"
14.8 -#include "symcat.h"
14.9 +#include "x86dasm/ansidecl.h"
14.10 +#include "x86dasm/symcat.h"
14.11 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
14.12 #ifndef SABER
14.13 /* This hack is to avoid a problem with some strict ANSI C preprocessors.
15.1 --- a/src/x86dasm/config.h Sun Jul 20 11:37:47 2008 +0000
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,163 +0,0 @@
15.4 -/* config.h. Generated by configure. */
15.5 -/* config.in. Generated from configure.in by autoheader. */
15.6 -
15.7 -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
15.8 - systems. This function is required for `alloca.c' support on those systems.
15.9 - */
15.10 -/* #undef CRAY_STACKSEG_END */
15.11 -
15.12 -/* Define to 1 if using `alloca.c'. */
15.13 -/* #undef C_ALLOCA */
15.14 -
15.15 -/* Define to 1 if NLS is requested */
15.16 -#define ENABLE_NLS 1
15.17 -
15.18 -/* Define to 1 if you have `alloca', as a function or macro. */
15.19 -#define HAVE_ALLOCA 1
15.20 -
15.21 -/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
15.22 - */
15.23 -#define HAVE_ALLOCA_H 1
15.24 -
15.25 -/* Define to 1 if you have the <argz.h> header file. */
15.26 -#define HAVE_ARGZ_H 1
15.27 -
15.28 -/* Define to 1 if you have the `dcgettext' function. */
15.29 -/* #undef HAVE_DCGETTEXT */
15.30 -
15.31 -/* Define to 1 if you have the `getcwd' function. */
15.32 -#define HAVE_GETCWD 1
15.33 -
15.34 -/* Define to 1 if you have the `getpagesize' function. */
15.35 -#define HAVE_GETPAGESIZE 1
15.36 -
15.37 -/* Define as 1 if you have gettext and don't want to use GNU gettext. */
15.38 -#define HAVE_GETTEXT 1
15.39 -
15.40 -/* Define to 1 if you have the <inttypes.h> header file. */
15.41 -#define HAVE_INTTYPES_H 1
15.42 -
15.43 -/* Define if your locale.h file contains LC_MESSAGES. */
15.44 -#define HAVE_LC_MESSAGES 1
15.45 -
15.46 -/* Define to 1 if you have the <limits.h> header file. */
15.47 -#define HAVE_LIMITS_H 1
15.48 -
15.49 -/* Define to 1 if you have the <locale.h> header file. */
15.50 -#define HAVE_LOCALE_H 1
15.51 -
15.52 -/* Define to 1 if you have the <malloc.h> header file. */
15.53 -#define HAVE_MALLOC_H 1
15.54 -
15.55 -/* Define to 1 if you have the <memory.h> header file. */
15.56 -#define HAVE_MEMORY_H 1
15.57 -
15.58 -/* Define to 1 if you have a working `mmap' system call. */
15.59 -#define HAVE_MMAP 1
15.60 -
15.61 -/* Define to 1 if you have the `munmap' function. */
15.62 -#define HAVE_MUNMAP 1
15.63 -
15.64 -/* Define to 1 if you have the <nl_types.h> header file. */
15.65 -#define HAVE_NL_TYPES_H 1
15.66 -
15.67 -/* Define to 1 if you have the `putenv' function. */
15.68 -#define HAVE_PUTENV 1
15.69 -
15.70 -/* Define to 1 if you have the `setenv' function. */
15.71 -#define HAVE_SETENV 1
15.72 -
15.73 -/* Define to 1 if you have the `setlocale' function. */
15.74 -#define HAVE_SETLOCALE 1
15.75 -
15.76 -/* Define to 1 if you have the <stdint.h> header file. */
15.77 -#define HAVE_STDINT_H 1
15.78 -
15.79 -/* Define to 1 if you have the <stdlib.h> header file. */
15.80 -#define HAVE_STDLIB_H 1
15.81 -
15.82 -/* Define if you have the stpcpy function */
15.83 -#define HAVE_STPCPY 1
15.84 -
15.85 -/* Define to 1 if you have the `strcasecmp' function. */
15.86 -#define HAVE_STRCASECMP 1
15.87 -
15.88 -/* Define to 1 if you have the `strchr' function. */
15.89 -#define HAVE_STRCHR 1
15.90 -
15.91 -/* Define to 1 if you have the <strings.h> header file. */
15.92 -#define HAVE_STRINGS_H 1
15.93 -
15.94 -/* Define to 1 if you have the <string.h> header file. */
15.95 -#define HAVE_STRING_H 1
15.96 -
15.97 -/* Define to 1 if you have the <sys/param.h> header file. */
15.98 -#define HAVE_SYS_PARAM_H 1
15.99 -
15.100 -/* Define to 1 if you have the <sys/stat.h> header file. */
15.101 -#define HAVE_SYS_STAT_H 1
15.102 -
15.103 -/* Define to 1 if you have the <sys/types.h> header file. */
15.104 -#define HAVE_SYS_TYPES_H 1
15.105 -
15.106 -/* Define to 1 if you have the <unistd.h> header file. */
15.107 -#define HAVE_UNISTD_H 1
15.108 -
15.109 -/* Define to 1 if you have the <values.h> header file. */
15.110 -#define HAVE_VALUES_H 1
15.111 -
15.112 -/* Define to 1 if you have the `__argz_count' function. */
15.113 -#define HAVE___ARGZ_COUNT 1
15.114 -
15.115 -/* Define to 1 if you have the `__argz_next' function. */
15.116 -#define HAVE___ARGZ_NEXT 1
15.117 -
15.118 -/* Define to 1 if you have the `__argz_stringify' function. */
15.119 -#define HAVE___ARGZ_STRINGIFY 1
15.120 -
15.121 -/* Name of package */
15.122 -#define PACKAGE "opcodes"
15.123 -
15.124 -/* Define to the address where bug reports for this package should be sent. */
15.125 -#define PACKAGE_BUGREPORT ""
15.126 -
15.127 -/* Define to the full name of this package. */
15.128 -#define PACKAGE_NAME ""
15.129 -
15.130 -/* Define to the full name and version of this package. */
15.131 -#define PACKAGE_STRING ""
15.132 -
15.133 -/* Define to the one symbol short name of this package. */
15.134 -#define PACKAGE_TARNAME ""
15.135 -
15.136 -/* Define to the version of this package. */
15.137 -#define PACKAGE_VERSION ""
15.138 -
15.139 -/* If using the C implementation of alloca, define if you know the
15.140 - direction of stack growth for your system; otherwise it will be
15.141 - automatically deduced at run-time.
15.142 - STACK_DIRECTION > 0 => grows toward higher addresses
15.143 - STACK_DIRECTION < 0 => grows toward lower addresses
15.144 - STACK_DIRECTION = 0 => direction of growth unknown */
15.145 -/* #undef STACK_DIRECTION */
15.146 -
15.147 -/* Define to 1 if you have the ANSI C header files. */
15.148 -#define STDC_HEADERS 1
15.149 -
15.150 -/* Version number of package */
15.151 -#define VERSION "2.16.1"
15.152 -
15.153 -/* Define to empty if `const' does not conform to ANSI C. */
15.154 -/* #undef const */
15.155 -
15.156 -/* Define to `__inline__' or `__inline' if that's what the C compiler
15.157 - calls it, or to nothing if 'inline' is not supported under any name. */
15.158 -#ifndef __cplusplus
15.159 -/* #undef inline */
15.160 -#endif
15.161 -
15.162 -/* Define to `long' if <sys/types.h> does not define. */
15.163 -/* #undef off_t */
15.164 -
15.165 -/* Define to `unsigned' if <sys/types.h> does not define. */
15.166 -/* #undef size_t */
16.1 --- a/src/x86dasm/dis-asm.h Sun Jul 20 11:37:47 2008 +0000
16.2 +++ b/src/x86dasm/dis-asm.h Mon Jul 21 00:08:34 2008 +0000
16.3 @@ -33,7 +33,7 @@
16.4 #endif
16.5
16.6 #include <stdio.h>
16.7 -#include "bfd.h"
16.8 +#include "x86dasm/bfd.h"
16.9
16.10 typedef int (*fprintf_ftype) (void *, const char*, ...);
16.11
17.1 --- a/src/x86dasm/dis-buf.c Sun Jul 20 11:37:47 2008 +0000
17.2 +++ b/src/x86dasm/dis-buf.c Mon Jul 21 00:08:34 2008 +0000
17.3 @@ -16,10 +16,10 @@
17.4 along with this program; if not, write to the Free Software
17.5 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17.6
17.7 -#include "sysdep.h"
17.8 -#include "dis-asm.h"
17.9 +#include "x86dasm/sysdep.h"
17.10 +#include "x86dasm/dis-asm.h"
17.11 #include <errno.h>
17.12 -#include "opintl.h"
17.13 +#include "gettext.h"
17.14
17.15 /* Get LENGTH bytes from info's buffer, at target address memaddr.
17.16 Transfer them to myaddr. */
18.1 --- a/src/x86dasm/dis-init.c Sun Jul 20 11:37:47 2008 +0000
18.2 +++ b/src/x86dasm/dis-init.c Mon Jul 21 00:08:34 2008 +0000
18.3 @@ -17,9 +17,9 @@
18.4 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18.5 02111-1307, USA. */
18.6
18.7 -#include "sysdep.h"
18.8 -#include "dis-asm.h"
18.9 -#include "bfd.h"
18.10 +#include "x86dasm/sysdep.h"
18.11 +#include "x86dasm/dis-asm.h"
18.12 +#include "x86dasm/bfd.h"
18.13
18.14 void
18.15 init_disassemble_info (struct disassemble_info *info, void *stream,
19.1 --- a/src/x86dasm/i386-dis.c Sun Jul 20 11:37:47 2008 +0000
19.2 +++ b/src/x86dasm/i386-dis.c Mon Jul 21 00:08:34 2008 +0000
19.3 @@ -31,9 +31,9 @@
19.4 and the small letter tells about the operand size. Refer to
19.5 the Intel manual for details. */
19.6
19.7 -#include "dis-asm.h"
19.8 -#include "sysdep.h"
19.9 -#include "opintl.h"
19.10 +#include "x86dasm/dis-asm.h"
19.11 +#include "x86dasm/sysdep.h"
19.12 +#include "gettext.h"
19.13
19.14 #define MAXLEN 20
19.15
20.1 --- a/src/x86dasm/opintl.h Sun Jul 20 11:37:47 2008 +0000
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,42 +0,0 @@
20.4 -/* opintl.h - opcodes specific header for gettext code.
20.5 - Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
20.6 -
20.7 - Written by Tom Tromey <tromey@cygnus.com>
20.8 -
20.9 - This file is part of the opcodes library used by GAS and the GNU binutils.
20.10 -
20.11 - You should have received a copy of the GNU General Public License
20.12 - along with GAS; see the file COPYING. If not, write to the Free
20.13 - Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20.14 - 02111-1307, USA. */
20.15 -
20.16 -#ifdef ENABLE_NLS
20.17 -# include <libintl.h>
20.18 -/* Note the use of dgetext() and PACKAGE here, rather than gettext().
20.19 -
20.20 - This is because the code in this directory is used to build a library which
20.21 - will be linked with code in other directories to form programs. We want to
20.22 - maintain a seperate translation file for this directory however, rather
20.23 - than being forced to merge it with that of any program linked to
20.24 - libopcodes. This is a library, so it cannot depend on the catalog
20.25 - currently loaded.
20.26 -
20.27 - In order to do this, we have to make sure that when we extract messages we
20.28 - use the OPCODES domain rather than the domain of the program that included
20.29 - the opcodes library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String)
20.30 - and define PACKAGE to be 'opcodes'. (See the code in configure). */
20.31 -# define _(String) dgettext (PACKAGE, String)
20.32 -# ifdef gettext_noop
20.33 -# define N_(String) gettext_noop (String)
20.34 -# else
20.35 -# define N_(String) (String)
20.36 -# endif
20.37 -#else
20.38 -# define gettext(Msgid) (Msgid)
20.39 -# define dgettext(Domainname, Msgid) (Msgid)
20.40 -# define dcgettext(Domainname, Msgid, Category) (Msgid)
20.41 -# define textdomain(Domainname) while (0) /* nothing */
20.42 -# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
20.43 -# define _(String) (String)
20.44 -# define N_(String) (String)
20.45 -#endif
21.1 --- a/src/x86dasm/sysdep.h Sun Jul 20 11:37:47 2008 +0000
21.2 +++ b/src/x86dasm/sysdep.h Mon Jul 21 00:08:34 2008 +0000
21.3 @@ -25,9 +25,9 @@
21.4 trying to replace often did that. If it can be dropped from this
21.5 file (check in a non-ANSI environment!), it should be. */
21.6
21.7 -#include "config.h"
21.8 +#include "lxdream.h"
21.9
21.10 -#include "ansidecl.h"
21.11 +#include "x86dasm/ansidecl.h"
21.12
21.13 #ifdef HAVE_STDLIB_H
21.14 #include <stdlib.h>
22.1 --- a/src/x86dasm/x86dasm.c Sun Jul 20 11:37:47 2008 +0000
22.2 +++ b/src/x86dasm/x86dasm.c Mon Jul 21 00:08:34 2008 +0000
22.3 @@ -19,15 +19,15 @@
22.4
22.5 #include <stdarg.h>
22.6 #include <string.h>
22.7 -#include "x86dasm.h"
22.8 -#include "bfd.h"
22.9 -#include "dis-asm.h"
22.10 +#include "x86dasm/x86dasm.h"
22.11 +#include "x86dasm/bfd.h"
22.12 +#include "x86dasm/dis-asm.h"
22.13 #include "sh4/sh4.h"
22.14 #include "sh4/sh4trans.h"
22.15
22.16 extern const struct reg_desc_struct sh4_reg_map[];
22.17 const struct cpu_desc_struct x86_cpu_desc =
22.18 - { "x86", x86_disasm_instruction, NULL, mem_has_page,
22.19 + { "x86", (disasm_func_t)x86_disasm_instruction, NULL, mem_has_page,
22.20 NULL, NULL, NULL, 1,
22.21 (char *)&sh4r, sizeof(sh4r), sh4_reg_map,
22.22 &sh4r.pc };
.