revision 755:ab873907b00e
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 755:ab873907b00e |
parent | 754:35c496703380 |
child | 756:38385124df7a |
author | nkeynes |
date | Mon 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)
Remove x86dasm's config.h & opintl.h (no longer needed and actually wrong)
1.1 --- a/src/aica/audio.h Sun Jul 20 11:37:47 2008 +00001.2 +++ b/src/aica/audio.h Mon Jul 21 00:08:34 2008 +00001.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.10 #ifdef __cplusplus1.11 extern "C" {
2.1 --- a/src/cocoaui/cocoaui.h Sun Jul 20 11:37:47 2008 +00002.2 +++ b/src/cocoaui/cocoaui.h Mon Jul 21 00:08:34 2008 +00002.3 @@ -20,7 +20,8 @@2.4 #define lxdream_cocoaui_H2.6 #import <AppKit/AppKit.h>2.7 -#include <glib/gi18n.h>2.8 +#include "lxdream.h"2.9 +#include "gettext.h"2.11 #ifdef __cplusplus2.12 extern "C" {
3.1 --- a/src/config.h Sun Jul 20 11:37:47 2008 +00003.2 +++ b/src/config.h Mon Jul 21 00:08:34 2008 +00003.3 @@ -20,7 +20,7 @@3.4 #define lxdream_config_H 13.6 #include <glib/gtypes.h>3.7 -#include <glib/gi18n.h>3.8 +#include "gettext.h"3.10 #ifdef __cplusplus3.11 extern "C" {
4.1 --- a/src/display.h Sun Jul 20 11:37:47 2008 +00004.2 +++ b/src/display.h Mon Jul 21 00:08:34 2008 +00004.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_BUILD4.11 #include <OpenGL/gl.h>4.12 #include <OpenGL/glext.h>
5.1 --- a/src/gdlist.c Sun Jul 20 11:37:47 2008 +00005.2 +++ b/src/gdlist.c Mon Jul 21 00:08:34 2008 +00005.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 +00006.2 +++ b/src/gettext.h Mon Jul 21 00:08:34 2008 +00006.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 it6.8 + under the terms of the GNU Library General Public License as published6.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 of6.14 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU6.15 + Library General Public License for more details.6.16 +6.17 + You should have received a copy of the GNU Library General Public6.18 + License along with this program; if not, write to the Free Software6.19 + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,6.20 + USA. */6.21 +6.22 +#ifndef _LIBGETTEXT_H6.23 +#define _LIBGETTEXT_H 16.24 +6.25 +#define _(String) gettext (String)6.26 +#define Q_(String) g_strip_context ((String), gettext (String))6.27 +#ifdef gettext_noop6.28 +#define N_(String) gettext_noop (String)6.29 +#else6.30 +#define N_(String) (String)6.31 +#endif6.32 +6.33 +/* NLS can be disabled through the configure --disable-nls option. */6.34 +#if ENABLE_NLS6.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 by6.40 + the gettext() and ngettext() macros. This is an alternative to calling6.41 + textdomain(), and is useful for libraries. */6.42 +# ifdef DEFAULT_TEXT_DOMAIN6.43 +# undef gettext6.44 +# define gettext(Msgid) \6.45 + dgettext (DEFAULT_TEXT_DOMAIN, Msgid)6.46 +# undef ngettext6.47 +# define ngettext(Msgid1, Msgid2, N) \6.48 + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)6.49 +# endif6.50 +6.51 +#else6.52 +6.53 +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which6.54 + chokes if dcgettext is defined as a macro. So include it now, to make6.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 +#endif6.62 +6.63 +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include6.64 + <libintl.h>, which chokes if dcgettext is defined as a macro. So include6.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_H6.69 +# include <libintl.h>6.70 +# endif6.71 +#endif6.72 +6.73 +/* Disabled NLS.6.74 + The casts to 'const char *' serve the purpose of producing warnings6.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 to6.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 +#endif6.92 +6.93 +/* A pseudo function call that serves as a marker for the automated6.94 + extraction of messages, but does not call gettext(). The run-time6.95 + translation is done at a different place in the code.6.96 + The argument, String, should be a literal string. Concatenated strings6.97 + and other string expressions won't work.6.98 + The macro's expansion is not parenthesized, so that it is suitable as6.99 + initializer for static 'char[]' or 'const char[]' variables. */6.100 +#define gettext_noop(String) String6.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 a6.106 + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be6.107 + short and rarely need to change.6.108 + The letter 'p' stands for 'particular' or 'special'. */6.109 +#ifdef DEFAULT_TEXT_DOMAIN6.110 +# define pgettext(Msgctxt, Msgid) \6.111 + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)6.112 +#else6.113 +# define pgettext(Msgctxt, Msgid) \6.114 + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)6.115 +#endif6.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_DOMAIN6.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 +#else6.124 +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \6.125 + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)6.126 +#endif6.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 +__inline6.134 +#else6.135 +#ifdef __cplusplus6.136 +inline6.137 +#endif6.138 +#endif6.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 + else6.148 + return translation;6.149 +}6.150 +6.151 +#ifdef __GNUC__6.152 +__inline6.153 +#else6.154 +#ifdef __cplusplus6.155 +inline6.156 +#endif6.157 +#endif6.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 + else6.169 + return translation;6.170 +}6.171 +6.172 +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID6.173 + can be arbitrary expressions. But for string literals these macros are6.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_ARRAYS6.182 +#include <stdlib.h>6.183 +#endif6.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 +__inline6.192 +#else6.193 +#ifdef __cplusplus6.194 +inline6.195 +#endif6.196 +#endif6.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_ARRAYS6.206 + char msg_ctxt_id[msgctxt_len + msgid_len];6.207 +#else6.208 + char buf[1024];6.209 + char *msg_ctxt_id =6.210 + (msgctxt_len + msgid_len <= sizeof (buf)6.211 + ? buf6.212 + : (char *) malloc (msgctxt_len + msgid_len));6.213 + if (msg_ctxt_id != NULL)6.214 +#endif6.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_ARRAYS6.221 + if (msg_ctxt_id != buf)6.222 + free (msg_ctxt_id);6.223 +#endif6.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 +__inline6.237 +#else6.238 +#ifdef __cplusplus6.239 +inline6.240 +#endif6.241 +#endif6.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_ARRAYS6.252 + char msg_ctxt_id[msgctxt_len + msgid_len];6.253 +#else6.254 + char buf[1024];6.255 + char *msg_ctxt_id =6.256 + (msgctxt_len + msgid_len <= sizeof (buf)6.257 + ? buf6.258 + : (char *) malloc (msgctxt_len + msgid_len));6.259 + if (msg_ctxt_id != NULL)6.260 +#endif6.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_ARRAYS6.267 + if (msg_ctxt_id != buf)6.268 + free (msg_ctxt_id);6.269 +#endif6.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 +00007.2 +++ b/src/gtkui/debug_win.c Mon Jul 21 00:08:34 2008 +00007.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 +00008.2 +++ b/src/gtkui/dump_win.c Mon Jul 21 00:08:34 2008 +00008.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"
9.1 --- a/src/gtkui/gdrom_menu.c Sun Jul 20 11:37:47 2008 +00009.2 +++ b/src/gtkui/gdrom_menu.c Mon Jul 21 00:08:34 2008 +00009.3 @@ -18,8 +18,6 @@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 +000010.2 +++ b/src/gtkui/gtkui.c Mon Jul 21 00:08:34 2008 +000010.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 +000011.2 +++ b/src/gtkui/gtkui.h Mon Jul 21 00:08:34 2008 +000011.3 @@ -21,7 +21,7 @@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"
12.1 --- a/src/gtkui/mmio_win.c Sun Jul 20 11:37:47 2008 +000012.2 +++ b/src/gtkui/mmio_win.c Mon Jul 21 00:08:34 2008 +000012.3 @@ -18,7 +18,6 @@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 +000013.2 +++ b/src/main.c Mon Jul 21 00:08:34 2008 +000013.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 +000014.2 +++ b/src/x86dasm/bfd.h Mon Jul 21 00:08:34 2008 +000014.3 @@ -35,8 +35,8 @@14.4 extern "C" {14.5 #endif14.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 SABER14.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 +000015.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +000015.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-YMP15.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 115.17 -15.18 -/* Define to 1 if you have `alloca', as a function or macro. */15.19 -#define HAVE_ALLOCA 115.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 115.24 -15.25 -/* Define to 1 if you have the <argz.h> header file. */15.26 -#define HAVE_ARGZ_H 115.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 115.33 -15.34 -/* Define to 1 if you have the `getpagesize' function. */15.35 -#define HAVE_GETPAGESIZE 115.36 -15.37 -/* Define as 1 if you have gettext and don't want to use GNU gettext. */15.38 -#define HAVE_GETTEXT 115.39 -15.40 -/* Define to 1 if you have the <inttypes.h> header file. */15.41 -#define HAVE_INTTYPES_H 115.42 -15.43 -/* Define if your locale.h file contains LC_MESSAGES. */15.44 -#define HAVE_LC_MESSAGES 115.45 -15.46 -/* Define to 1 if you have the <limits.h> header file. */15.47 -#define HAVE_LIMITS_H 115.48 -15.49 -/* Define to 1 if you have the <locale.h> header file. */15.50 -#define HAVE_LOCALE_H 115.51 -15.52 -/* Define to 1 if you have the <malloc.h> header file. */15.53 -#define HAVE_MALLOC_H 115.54 -15.55 -/* Define to 1 if you have the <memory.h> header file. */15.56 -#define HAVE_MEMORY_H 115.57 -15.58 -/* Define to 1 if you have a working `mmap' system call. */15.59 -#define HAVE_MMAP 115.60 -15.61 -/* Define to 1 if you have the `munmap' function. */15.62 -#define HAVE_MUNMAP 115.63 -15.64 -/* Define to 1 if you have the <nl_types.h> header file. */15.65 -#define HAVE_NL_TYPES_H 115.66 -15.67 -/* Define to 1 if you have the `putenv' function. */15.68 -#define HAVE_PUTENV 115.69 -15.70 -/* Define to 1 if you have the `setenv' function. */15.71 -#define HAVE_SETENV 115.72 -15.73 -/* Define to 1 if you have the `setlocale' function. */15.74 -#define HAVE_SETLOCALE 115.75 -15.76 -/* Define to 1 if you have the <stdint.h> header file. */15.77 -#define HAVE_STDINT_H 115.78 -15.79 -/* Define to 1 if you have the <stdlib.h> header file. */15.80 -#define HAVE_STDLIB_H 115.81 -15.82 -/* Define if you have the stpcpy function */15.83 -#define HAVE_STPCPY 115.84 -15.85 -/* Define to 1 if you have the `strcasecmp' function. */15.86 -#define HAVE_STRCASECMP 115.87 -15.88 -/* Define to 1 if you have the `strchr' function. */15.89 -#define HAVE_STRCHR 115.90 -15.91 -/* Define to 1 if you have the <strings.h> header file. */15.92 -#define HAVE_STRINGS_H 115.93 -15.94 -/* Define to 1 if you have the <string.h> header file. */15.95 -#define HAVE_STRING_H 115.96 -15.97 -/* Define to 1 if you have the <sys/param.h> header file. */15.98 -#define HAVE_SYS_PARAM_H 115.99 -15.100 -/* Define to 1 if you have the <sys/stat.h> header file. */15.101 -#define HAVE_SYS_STAT_H 115.102 -15.103 -/* Define to 1 if you have the <sys/types.h> header file. */15.104 -#define HAVE_SYS_TYPES_H 115.105 -15.106 -/* Define to 1 if you have the <unistd.h> header file. */15.107 -#define HAVE_UNISTD_H 115.108 -15.109 -/* Define to 1 if you have the <values.h> header file. */15.110 -#define HAVE_VALUES_H 115.111 -15.112 -/* Define to 1 if you have the `__argz_count' function. */15.113 -#define HAVE___ARGZ_COUNT 115.114 -15.115 -/* Define to 1 if you have the `__argz_next' function. */15.116 -#define HAVE___ARGZ_NEXT 115.117 -15.118 -/* Define to 1 if you have the `__argz_stringify' function. */15.119 -#define HAVE___ARGZ_STRINGIFY 115.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 the15.140 - direction of stack growth for your system; otherwise it will be15.141 - automatically deduced at run-time.15.142 - STACK_DIRECTION > 0 => grows toward higher addresses15.143 - STACK_DIRECTION < 0 => grows toward lower addresses15.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 115.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 compiler15.157 - calls it, or to nothing if 'inline' is not supported under any name. */15.158 -#ifndef __cplusplus15.159 -/* #undef inline */15.160 -#endif15.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 +000016.2 +++ b/src/x86dasm/dis-asm.h Mon Jul 21 00:08:34 2008 +000016.3 @@ -33,7 +33,7 @@16.4 #endif16.6 #include <stdio.h>16.7 -#include "bfd.h"16.8 +#include "x86dasm/bfd.h"16.10 typedef int (*fprintf_ftype) (void *, const char*, ...);
17.1 --- a/src/x86dasm/dis-buf.c Sun Jul 20 11:37:47 2008 +000017.2 +++ b/src/x86dasm/dis-buf.c Mon Jul 21 00:08:34 2008 +000017.3 @@ -16,10 +16,10 @@17.4 along with this program; if not, write to the Free Software17.5 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */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.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 +000018.2 +++ b/src/x86dasm/dis-init.c Mon Jul 21 00:08:34 2008 +000018.3 @@ -17,9 +17,9 @@18.4 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA18.5 02111-1307, USA. */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.14 void18.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 +000019.2 +++ b/src/x86dasm/i386-dis.c Mon Jul 21 00:08:34 2008 +000019.3 @@ -31,9 +31,9 @@19.4 and the small letter tells about the operand size. Refer to19.5 the Intel manual for details. */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.14 #define MAXLEN 20
20.1 --- a/src/x86dasm/opintl.h Sun Jul 20 11:37:47 2008 +000020.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +000020.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 License20.12 - along with GAS; see the file COPYING. If not, write to the Free20.13 - Software Foundation, 59 Temple Place - Suite 330, Boston, MA20.14 - 02111-1307, USA. */20.15 -20.16 -#ifdef ENABLE_NLS20.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 which20.21 - will be linked with code in other directories to form programs. We want to20.22 - maintain a seperate translation file for this directory however, rather20.23 - than being forced to merge it with that of any program linked to20.24 - libopcodes. This is a library, so it cannot depend on the catalog20.25 - currently loaded.20.26 -20.27 - In order to do this, we have to make sure that when we extract messages we20.28 - use the OPCODES domain rather than the domain of the program that included20.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_noop20.33 -# define N_(String) gettext_noop (String)20.34 -# else20.35 -# define N_(String) (String)20.36 -# endif20.37 -#else20.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 +000021.2 +++ b/src/x86dasm/sysdep.h Mon Jul 21 00:08:34 2008 +000021.3 @@ -25,9 +25,9 @@21.4 trying to replace often did that. If it can be dropped from this21.5 file (check in a non-ANSI environment!), it should be. */21.7 -#include "config.h"21.8 +#include "lxdream.h"21.10 -#include "ansidecl.h"21.11 +#include "x86dasm/ansidecl.h"21.13 #ifdef HAVE_STDLIB_H21.14 #include <stdlib.h>
22.1 --- a/src/x86dasm/x86dasm.c Sun Jul 20 11:37:47 2008 +000022.2 +++ b/src/x86dasm/x86dasm.c Mon Jul 21 00:08:34 2008 +000022.3 @@ -19,15 +19,15 @@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.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 };
.