ebview-0.3.6.2/0000755000175000017500000000000011241637676012474 5ustar mhattamhattaebview-0.3.6.2/intl/0000755000175000017500000000000011241377503013430 5ustar mhattamhattaebview-0.3.6.2/intl/localealias.c0000644000175000017500000002454611241377503016060 0ustar mhattamhatta/* Handle aliases for locale names. Copyright (C) 1995-1999, 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #if defined _LIBC || defined HAVE___FSETLOCKING # include #endif #include #ifdef __GNUC__ # undef alloca # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #include #include "gettextP.h" #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define strcasecmp __strcasecmp # ifndef mempcpy # define mempcpy __mempcpy # endif # define HAVE_MEMPCPY 1 # define HAVE___FSETLOCKING 1 #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include #else # include "lock.h" #endif #ifndef internal_function # define internal_function #endif /* Some optimizations for glibc. */ #ifdef _LIBC # define FEOF(fp) feof_unlocked (fp) # define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) #else # define FEOF(fp) feof (fp) # define FGETS(buf, n, fp) fgets (buf, n, fp) #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif #if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED # undef fgets # define fgets(buf, len, s) fgets_unlocked (buf, len, s) #endif #if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED # undef feof # define feof(s) feof_unlocked (s) #endif __libc_lock_define_initialized (static, lock) struct alias_map { const char *alias; const char *value; }; #ifndef _LIBC # define libc_freeres_ptr(decl) decl #endif libc_freeres_ptr (static char *string_space); static size_t string_space_act; static size_t string_space_max; libc_freeres_ptr (static struct alias_map *map); static size_t nmap; static size_t maxmap; /* Prototypes for local functions. */ static size_t read_alias_file (const char *fname, int fname_len) internal_function; static int extend_alias_table (void); static int alias_compare (const struct alias_map *map1, const struct alias_map *map2); const char * _nl_expand_alias (const char *name) { static const char *locale_alias_path; struct alias_map *retval; const char *result = NULL; size_t added; __libc_lock_lock (lock); if (locale_alias_path == NULL) locale_alias_path = LOCALE_ALIAS_PATH; do { struct alias_map item; item.alias = name; if (nmap > 0) retval = (struct alias_map *) bsearch (&item, map, nmap, sizeof (struct alias_map), (int (*) (const void *, const void *) ) alias_compare); else retval = NULL; /* We really found an alias. Return the value. */ if (retval != NULL) { result = retval->value; break; } /* Perhaps we can find another alias file. */ added = 0; while (added == 0 && locale_alias_path[0] != '\0') { const char *start; while (locale_alias_path[0] == PATH_SEPARATOR) ++locale_alias_path; start = locale_alias_path; while (locale_alias_path[0] != '\0' && locale_alias_path[0] != PATH_SEPARATOR) ++locale_alias_path; if (start < locale_alias_path) added = read_alias_file (start, locale_alias_path - start); } } while (added != 0); __libc_lock_unlock (lock); return result; } static size_t internal_function read_alias_file (const char *fname, int fname_len) { FILE *fp; char *full_fname; size_t added; static const char aliasfile[] = "/locale.alias"; full_fname = (char *) alloca (fname_len + sizeof aliasfile); #ifdef HAVE_MEMPCPY mempcpy (mempcpy (full_fname, fname, fname_len), aliasfile, sizeof aliasfile); #else memcpy (full_fname, fname, fname_len); memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); #endif #ifdef _LIBC /* Note the file is opened with cancellation in the I/O functions disabled. */ fp = fopen (relocate (full_fname), "rc"); #else fp = fopen (relocate (full_fname), "r"); #endif freea (full_fname); if (fp == NULL) return 0; #ifdef HAVE___FSETLOCKING /* No threads present. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); #endif added = 0; while (!FEOF (fp)) { /* It is a reasonable approach to use a fix buffer here because a) we are only interested in the first two fields b) these fields must be usable as file names and so must not be that long We avoid a multi-kilobyte buffer here since this would use up stack space which we might not have if the program ran out of memory. */ char buf[400]; char *alias; char *value; char *cp; int complete_line; if (FGETS (buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; /* Determine whether the line is complete. */ complete_line = strchr (buf, '\n') != NULL; cp = buf; /* Ignore leading white space. */ while (isspace ((unsigned char) cp[0])) ++cp; /* A leading '#' signals a comment line. */ if (cp[0] != '\0' && cp[0] != '#') { alias = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate alias name. */ if (cp[0] != '\0') *cp++ = '\0'; /* Now look for the beginning of the value. */ while (isspace ((unsigned char) cp[0])) ++cp; if (cp[0] != '\0') { value = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate value. */ if (cp[0] == '\n') { /* This has to be done to make the following test for the end of line possible. We are looking for the terminating '\n' which do not overwrite here. */ *cp++ = '\0'; *cp = '\n'; } else if (cp[0] != '\0') *cp++ = '\0'; #ifdef IN_LIBGLOCALE /* glibc's locale.alias contains entries for ja_JP and ko_KR that make it impossible to use a Japanese or Korean UTF-8 locale under the name "ja_JP" or "ko_KR". Ignore these entries. */ if (strchr (alias, '_') == NULL) #endif { size_t alias_len; size_t value_len; if (nmap >= maxmap) if (__builtin_expect (extend_alias_table (), 0)) goto out; alias_len = strlen (alias) + 1; value_len = strlen (value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { /* Increase size of memory pool. */ size_t new_size = (string_space_max + (alias_len + value_len > 1024 ? alias_len + value_len : 1024)); char *new_pool = (char *) realloc (string_space, new_size); if (new_pool == NULL) goto out; if (__builtin_expect (string_space != new_pool, 0)) { size_t i; for (i = 0; i < nmap; i++) { map[i].alias += new_pool - string_space; map[i].value += new_pool - string_space; } } string_space = new_pool; string_space_max = new_size; } map[nmap].alias = (const char *) memcpy (&string_space[string_space_act], alias, alias_len); string_space_act += alias_len; map[nmap].value = (const char *) memcpy (&string_space[string_space_act], value, value_len); string_space_act += value_len; ++nmap; ++added; } } } /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ if (! complete_line) do if (FGETS (buf, sizeof buf, fp) == NULL) /* Make sure the inner loop will be left. The outer loop will exit at the `feof' test. */ break; while (strchr (buf, '\n') == NULL); } out: /* Should we test for ferror()? I think we have to silently ignore errors. --drepper */ fclose (fp); if (added > 0) qsort (map, nmap, sizeof (struct alias_map), (int (*) (const void *, const void *)) alias_compare); return added; } static int extend_alias_table () { size_t new_size; struct alias_map *new_map; new_size = maxmap == 0 ? 100 : 2 * maxmap; new_map = (struct alias_map *) realloc (map, (new_size * sizeof (struct alias_map))); if (new_map == NULL) /* Simply don't extend: we don't have any more core. */ return -1; map = new_map; maxmap = new_size; return 0; } static int alias_compare (const struct alias_map *map1, const struct alias_map *map2) { #if defined _LIBC || defined HAVE_STRCASECMP return strcasecmp (map1->alias, map2->alias); #else const unsigned char *p1 = (const unsigned char *) map1->alias; const unsigned char *p2 = (const unsigned char *) map2->alias; unsigned char c1, c2; if (p1 == p2) return 0; do { /* I know this seems to be odd but the tolower() function in some systems libc cannot handle nonalpha characters. */ c1 = isupper (*p1) ? tolower (*p1) : *p1; c2 = isupper (*p2) ? tolower (*p2) : *p2; if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); return c1 - c2; #endif } ebview-0.3.6.2/intl/localcharset.h0000644000175000017500000000256311241377503016253 0ustar mhattamhatta/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ ebview-0.3.6.2/intl/textdomain.c0000644000175000017500000000746611241377503015765 0ustar mhattamhatta/* Implementation of the textdomain(3) function. Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include # define gl_rwlock_define __libc_rwlock_define # define gl_rwlock_wrlock __libc_rwlock_wrlock # define gl_rwlock_unlock __libc_rwlock_unlock #else # include "lock.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define TEXTDOMAIN __textdomain # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define TEXTDOMAIN libintl_textdomain #endif /* Lock variable to protect the global data in the gettext implementation. */ gl_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ char * TEXTDOMAIN (const char *domainname) { char *new_domain; char *old_domain; /* A NULL pointer requests the current setting. */ if (domainname == NULL) return (char *) _nl_current_default_domain; gl_rwlock_wrlock (_nl_state_lock); old_domain = (char *) _nl_current_default_domain; /* If domain name is the null string set to default domain "messages". */ if (domainname[0] == '\0' || strcmp (domainname, _nl_default_default_domain) == 0) { _nl_current_default_domain = _nl_default_default_domain; new_domain = (char *) _nl_current_default_domain; } else if (strcmp (domainname, old_domain) == 0) /* This can happen and people will use it to signal that some environment variable changed. */ new_domain = old_domain; else { /* If the following malloc fails `_nl_current_default_domain' will be NULL. This value will be returned and so signals we are out of core. */ #if defined _LIBC || defined HAVE_STRDUP new_domain = strdup (domainname); #else size_t len = strlen (domainname) + 1; new_domain = (char *) malloc (len); if (new_domain != NULL) memcpy (new_domain, domainname, len); #endif if (new_domain != NULL) _nl_current_default_domain = new_domain; } /* We use this possibility to signal a change of the loaded catalogs since this is most likely the case and there is no other easy we to do it. Do it only when the call was successful. */ if (new_domain != NULL) { ++_nl_msg_cat_cntr; if (old_domain != new_domain && old_domain != _nl_default_default_domain) free (old_domain); } gl_rwlock_unlock (_nl_state_lock); return new_domain; } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__textdomain, textdomain); #endif ebview-0.3.6.2/intl/gettext.c0000644000175000017500000000355411241377503015267 0ustar mhattamhatta/* Implementation of gettext(3) function. Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define GETTEXT __gettext # define DCGETTEXT INTUSE(__dcgettext) #else # define GETTEXT libintl_gettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * GETTEXT (const char *msgid) { return DCGETTEXT (NULL, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__gettext, gettext); #endif ebview-0.3.6.2/intl/dcgettext.c0000644000175000017500000000342111241377503015567 0ustar mhattamhatta/* Implementation of the dcgettext(3) function. Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCGETTEXT __dcgettext # define DCIGETTEXT __dcigettext #else # define DCGETTEXT libintl_dcgettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCGETTEXT (const char *domainname, const char *msgid, int category) { return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ INTDEF(__dcgettext) weak_alias (__dcgettext, dcgettext); #endif ebview-0.3.6.2/intl/ref-del.sin0000644000175000017500000000203011241377503015454 0ustar mhattamhatta# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } ebview-0.3.6.2/intl/os2compat.h0000644000175000017500000000302611241377503015511 0ustar mhattamhatta/* OS/2 compatibility defines. This file is intended to be included from config.h Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* When included from os2compat.h we need all the original definitions */ #ifndef OS2_AWARE #undef LIBDIR #define LIBDIR _nlos2_libdir extern char *_nlos2_libdir; #undef LOCALEDIR #define LOCALEDIR _nlos2_localedir extern char *_nlos2_localedir; #undef LOCALE_ALIAS_PATH #define LOCALE_ALIAS_PATH _nlos2_localealiaspath extern char *_nlos2_localealiaspath; #endif #undef HAVE_STRCASECMP #define HAVE_STRCASECMP 1 #define strcasecmp stricmp #define strncasecmp strnicmp /* We have our own getenv() which works even if library is compiled as DLL */ #define getenv _nl_getenv /* Older versions of gettext used -1 as the value of LC_MESSAGES */ #define LC_MESSAGES_COMPAT (-1) ebview-0.3.6.2/intl/osdep.c0000644000175000017500000000174111241377503014711 0ustar mhattamhatta/* OS dependent parts of libintl. Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if defined __CYGWIN__ # include "intl-exports.c" #elif defined __EMX__ # include "os2compat.c" #else /* Avoid AIX compiler warning. */ typedef int dummy; #endif ebview-0.3.6.2/intl/gmo.h0000644000175000017500000001151211241377503014363 0ustar mhattamhatta/* Description of GNU message catalog format: general file layout. Copyright (C) 1995, 1997, 2000-2002, 2004, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GETTEXT_H #define _GETTEXT_H 1 #include /* @@ end of prolog @@ */ /* The magic number of the GNU message catalog format. */ #define _MAGIC 0x950412de #define _MAGIC_SWAPPED 0xde120495 /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 #define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work when cross-compiling. */ #if __STDC__ # define UINT_MAX_32_BITS 4294967295U #else # define UINT_MAX_32_BITS 0xFFFFFFFF #endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have ) have 64+-bit integral types. */ #ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS #endif #if UINT_MAX == UINT_MAX_32_BITS typedef unsigned nls_uint32; #else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short nls_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long nls_uint32; # else /* The following line is intended to throw an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif #endif /* Header for binary .mo file format. */ struct mo_file_header { /* The magic number. */ nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; /* The following are only used in .mo files with major revision 0 or 1. */ /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; /* Offset of table with start offsets of translated strings. */ nls_uint32 trans_tab_offset; /* Size of hash table. */ nls_uint32 hash_tab_size; /* Offset of first hash table entry. */ nls_uint32 hash_tab_offset; /* The following are only used in .mo files with minor revision >= 1. */ /* The number of system dependent segments. */ nls_uint32 n_sysdep_segments; /* Offset of table describing system dependent segments. */ nls_uint32 sysdep_segments_offset; /* The number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Offset of table with start offsets of original sysdep strings. */ nls_uint32 orig_sysdep_tab_offset; /* Offset of table with start offsets of translated sysdep strings. */ nls_uint32 trans_sysdep_tab_offset; }; /* Descriptor for static string contained in the binary .mo file. */ struct string_desc { /* Length of addressed string, not including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* The following are only used in .mo files with minor revision >= 1. */ /* Descriptor for system dependent string segment. */ struct sysdep_segment { /* Length of addressed string, including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* Pair of a static and a system dependent segment, in struct sysdep_string. */ struct segment_pair { /* Size of static segment. */ nls_uint32 segsize; /* Reference to system dependent string segment, or ~0 at the end. */ nls_uint32 sysdepref; }; /* Descriptor for system dependent string. */ struct sysdep_string { /* Offset of static string segments in file. */ nls_uint32 offset; /* Alternating sequence of static and system dependent segments. The last segment is a static segment, including the trailing NUL. */ struct segment_pair segments[1]; }; /* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ #define SEGMENTS_END ((nls_uint32) ~0) /* @@ begin of epilog @@ */ #endif /* gettext.h */ ebview-0.3.6.2/intl/dcigettext.c0000644000175000017500000013334511241377503015751 0ustar mhattamhatta/* Implementation of the internal dcigettext function. Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif /* NL_LOCALE_NAME does not work in glibc-2.4. Ignore it. */ #undef HAVE_NL_LOCALE_NAME #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #ifndef errno extern int errno; #endif #ifndef __set_errno # define __set_errno(val) errno = (val) #endif #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include #ifdef _LIBC /* Guess whether integer division by zero raises signal SIGFPE. Set to 1 only if you know for sure. In case of doubt, set to 0. */ # if defined __alpha__ || defined __arm__ || defined __i386__ \ || defined __m68k__ || defined __s390__ # define INTDIV0_RAISES_SIGFPE 1 # else # define INTDIV0_RAISES_SIGFPE 0 # endif #endif #if !INTDIV0_RAISES_SIGFPE # include #endif #if defined HAVE_SYS_PARAM_H || defined _LIBC # include #endif #if !defined _LIBC # if HAVE_NL_LOCALE_NAME # include # endif # include "localcharset.h" #endif #include "gettextP.h" #include "plural-exp.h" #ifdef _LIBC # include #else # ifdef IN_LIBGLOCALE # include # endif # include "libgnuintl.h" #endif #include "hash-string.h" /* Handle multi-threaded applications. */ #ifdef _LIBC # include # define gl_rwlock_define_initialized __libc_rwlock_define_initialized # define gl_rwlock_rdlock __libc_rwlock_rdlock # define gl_rwlock_wrlock __libc_rwlock_wrlock # define gl_rwlock_unlock __libc_rwlock_unlock #else # include "lock.h" #endif /* Alignment of types. */ #if defined __GNUC__ && __GNUC__ >= 2 # define alignof(TYPE) __alignof__ (TYPE) #else # define alignof(TYPE) \ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define getcwd __getcwd # ifndef stpcpy # define stpcpy __stpcpy # endif # define tfind __tfind #else # if !defined HAVE_GETCWD char *getwd (); # define getcwd(buf, max) getwd (buf) # else # if VMS # define getcwd(buf, max) (getcwd) (buf, max, 0) # else char *getcwd (); # endif # endif # ifndef HAVE_STPCPY static char *stpcpy (char *dest, const char *src); # endif # ifndef HAVE_MEMPCPY static void *mempcpy (void *dest, const void *src, size_t n); # endif #endif /* Use a replacement if the system does not provide the `tsearch' function family. */ #if HAVE_TSEARCH || defined _LIBC # include #else # define tsearch libintl_tsearch # define tfind libintl_tfind # define tdelete libintl_tdelete # define twalk libintl_twalk # include "tsearch.h" #endif #ifdef _LIBC # define tsearch __tsearch #endif /* Amount to increase buffer size by in each try. */ #define PATH_INCR 32 /* The following is from pathmax.h. */ /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define PATH_MAX but might cause redefinition warnings when sys/param.h is later included (as on MORE/BSD 4.3). */ #if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__) # include #endif #ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 255 #endif #if !defined PATH_MAX && defined _PC_PATH_MAX # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) #endif /* Don't include sys/param.h if it already has been. */ #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) #endif /* Whether to support different locales in different threads. */ #if defined _LIBC || HAVE_NL_LOCALE_NAME || (HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS) || defined IN_LIBGLOCALE # define HAVE_PER_THREAD_LOCALE #endif /* This is the type used for the search tree where known translations are stored. */ struct known_translation_t { /* Domain in which to search. */ const char *domainname; /* The category. */ int category; #ifdef HAVE_PER_THREAD_LOCALE /* Name of the relevant locale category, or "" for the global locale. */ const char *localename; #endif #ifdef IN_LIBGLOCALE /* The character encoding. */ const char *encoding; #endif /* State of the catalog counter at the point the string was found. */ int counter; /* Catalog where the string was found. */ struct loaded_l10nfile *domain; /* And finally the translation. */ const char *translation; size_t translation_length; /* Pointer to the string in question. */ char msgid[ZERO]; }; gl_rwlock_define_initialized (static, tree_lock) /* Root of the search tree with known translations. */ static void *root; /* Function to compare two entries in the table of known translations. */ static int transcmp (const void *p1, const void *p2) { const struct known_translation_t *s1; const struct known_translation_t *s2; int result; s1 = (const struct known_translation_t *) p1; s2 = (const struct known_translation_t *) p2; result = strcmp (s1->msgid, s2->msgid); if (result == 0) { result = strcmp (s1->domainname, s2->domainname); if (result == 0) { #ifdef HAVE_PER_THREAD_LOCALE result = strcmp (s1->localename, s2->localename); if (result == 0) #endif { #ifdef IN_LIBGLOCALE result = strcmp (s1->encoding, s2->encoding); if (result == 0) #endif /* We compare the category last (though this is the cheapest operation) since it is hopefully always the same (namely LC_MESSAGES). */ result = s1->category - s2->category; } } } return result; } /* Name of the default domain used for gettext(3) prior any call to textdomain(3). The default value for this is "messages". */ const char _nl_default_default_domain[] attribute_hidden = "messages"; #ifndef IN_LIBGLOCALE /* Value used as the default domain for gettext(3). */ const char *_nl_current_default_domain attribute_hidden = _nl_default_default_domain; #endif /* Contains the default location of the message catalogs. */ #if defined __EMX__ extern const char _nl_default_dirname[]; #else # ifdef _LIBC extern const char _nl_default_dirname[]; libc_hidden_proto (_nl_default_dirname) # endif const char _nl_default_dirname[] = LOCALEDIR; # ifdef _LIBC libc_hidden_data_def (_nl_default_dirname) # endif #endif #ifndef IN_LIBGLOCALE /* List with bindings of specific domains created by bindtextdomain() calls. */ struct binding *_nl_domain_bindings; #endif /* Prototypes for local functions. */ static char *plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, const char *translation, size_t translation_len) internal_function; #ifdef IN_LIBGLOCALE static const char *guess_category_value (int category, const char *categoryname, const char *localename) internal_function; #else static const char *guess_category_value (int category, const char *categoryname) internal_function; #endif #ifdef _LIBC # include "../locale/localeinfo.h" # define category_to_name(category) \ _nl_category_names.str + _nl_category_name_idxs[category] #else static const char *category_to_name (int category) internal_function; #endif #if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE static const char *get_output_charset (struct binding *domainbinding) internal_function; #endif /* For those loosing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ # define freea(p) /* nothing */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else struct block_list { void *address; struct block_list *next; }; # define ADD_BLOCK(list, addr) \ do { \ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ /* If we cannot get a free block we cannot add the new element to \ the list. */ \ if (newp != NULL) { \ newp->address = (addr); \ newp->next = (list); \ (list) = newp; \ } \ } while (0) # define FREE_BLOCKS(list) \ do { \ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ free (old->address); \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) # define freea(p) free (p) #endif /* have alloca */ #ifdef _LIBC /* List of blocks allocated for translations. */ typedef struct transmem_list { struct transmem_list *next; char data[ZERO]; } transmem_block_t; static struct transmem_list *transmem_list; #else typedef unsigned char transmem_block_t; #endif /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCIGETTEXT __dcigettext #else # define DCIGETTEXT libintl_dcigettext #endif /* Lock variable to protect the global data in the gettext implementation. */ gl_rwlock_define_initialized (, _nl_state_lock attribute_hidden) /* Checking whether the binaries runs SUID must be done and glibc provides easier methods therefore we make a difference here. */ #ifdef _LIBC # define ENABLE_SECURE __libc_enable_secure # define DETERMINE_SECURE #else # ifndef HAVE_GETUID # define getuid() 0 # endif # ifndef HAVE_GETGID # define getgid() 0 # endif # ifndef HAVE_GETEUID # define geteuid() getuid() # endif # ifndef HAVE_GETEGID # define getegid() getgid() # endif static int enable_secure; # define ENABLE_SECURE (enable_secure == 1) # define DETERMINE_SECURE \ if (enable_secure == 0) \ { \ if (getuid () != geteuid () || getgid () != getegid ()) \ enable_secure = 1; \ else \ enable_secure = -1; \ } #endif /* Get the function to evaluate the plural expression. */ #include "eval-plural.h" /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale and, if PLURAL is nonzero, search over string depending on the plural form determined by N. */ #ifdef IN_LIBGLOCALE char * gl_dcigettext (const char *domainname, const char *msgid1, const char *msgid2, int plural, unsigned long int n, int category, const char *localename, const char *encoding) #else char * DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, int plural, unsigned long int n, int category) #endif { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; #endif struct loaded_l10nfile *domain; struct binding *binding; const char *categoryname; const char *categoryvalue; const char *dirname; char *xdomainname; char *single_locale; char *retval; size_t retlen; int saved_errno; struct known_translation_t *search; struct known_translation_t **foundp = NULL; size_t msgid_len; #if defined HAVE_PER_THREAD_LOCALE && !defined IN_LIBGLOCALE const char *localename; #endif size_t domainname_len; /* If no real MSGID is given return NULL. */ if (msgid1 == NULL) return NULL; #ifdef _LIBC if (category < 0 || category >= __LC_LAST || category == LC_ALL) /* Bogus. */ return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); #endif /* Preserve the `errno' value. */ saved_errno = errno; gl_rwlock_rdlock (_nl_state_lock); /* If DOMAINNAME is NULL, we are interested in the default domain. If CATEGORY is not LC_MESSAGES this might not make much sense but the definition left this undefined. */ if (domainname == NULL) domainname = _nl_current_default_domain; /* OS/2 specific: backward compatibility with older libintl versions */ #ifdef LC_MESSAGES_COMPAT if (category == LC_MESSAGES_COMPAT) category = LC_MESSAGES; #endif msgid_len = strlen (msgid1) + 1; /* Try to find the translation among those which we found at some time. */ search = (struct known_translation_t *) alloca (offsetof (struct known_translation_t, msgid) + msgid_len); memcpy (search->msgid, msgid1, msgid_len); search->domainname = domainname; search->category = category; #ifdef HAVE_PER_THREAD_LOCALE # ifndef IN_LIBGLOCALE # ifdef _LIBC localename = __current_locale_name (category); # else # if HAVE_NL_LOCALE_NAME /* NL_LOCALE_NAME is public glibc API introduced in glibc-2.4. */ localename = nl_langinfo (NL_LOCALE_NAME (category)); # else # if HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS /* The __names field is not public glibc API and must therefore not be used in code that is installed in public locations. */ { locale_t thread_locale = uselocale (NULL); if (thread_locale != LC_GLOBAL_LOCALE) localename = thread_locale->__names[category]; else localename = ""; } # endif # endif # endif # endif search->localename = localename; # ifdef IN_LIBGLOCALE search->encoding = encoding; # endif /* Since tfind/tsearch manage a balanced tree, concurrent tfind and tsearch calls can be fatal. */ gl_rwlock_rdlock (tree_lock); foundp = (struct known_translation_t **) tfind (search, &root, transcmp); gl_rwlock_unlock (tree_lock); freea (search); if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) { /* Now deal with plural. */ if (plural) retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation, (*foundp)->translation_length); else retval = (char *) (*foundp)->translation; gl_rwlock_unlock (_nl_state_lock); __set_errno (saved_errno); return retval; } #endif /* See whether this is a SUID binary or not. */ DETERMINE_SECURE; /* First find matching binding. */ #ifdef IN_LIBGLOCALE /* We can use a trivial binding, since _nl_find_msg will ignore it anyway, and _nl_load_domain and _nl_find_domain just pass it through. */ binding = NULL; dirname = bindtextdomain (domainname, NULL); #else for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding == NULL) dirname = _nl_default_dirname; else { dirname = binding->dirname; #endif if (!IS_ABSOLUTE_PATH (dirname)) { /* We have a relative path. Make it absolute now. */ size_t dirname_len = strlen (dirname) + 1; size_t path_max; char *resolved_dirname; char *ret; path_max = (unsigned int) PATH_MAX; path_max += 2; /* The getcwd docs say to do this. */ for (;;) { resolved_dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, tmp_dirname); __set_errno (0); ret = getcwd (resolved_dirname, path_max); if (ret != NULL || errno != ERANGE) break; path_max += path_max / 2; path_max += PATH_INCR; } if (ret == NULL) /* We cannot get the current working directory. Don't signal an error but simply return the default string. */ goto return_untranslated; stpcpy (stpcpy (strchr (resolved_dirname, '\0'), "/"), dirname); dirname = resolved_dirname; } #ifndef IN_LIBGLOCALE } #endif /* Now determine the symbolic name of CATEGORY and its value. */ categoryname = category_to_name (category); #ifdef IN_LIBGLOCALE categoryvalue = guess_category_value (category, categoryname, localename); #else categoryvalue = guess_category_value (category, categoryname); #endif domainname_len = strlen (domainname); xdomainname = (char *) alloca (strlen (categoryname) + domainname_len + 5); ADD_BLOCK (block_list, xdomainname); stpcpy ((char *) mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), domainname, domainname_len), ".mo"); /* Creating working area. */ single_locale = (char *) alloca (strlen (categoryvalue) + 1); ADD_BLOCK (block_list, single_locale); /* Search for the given string. This is a loop because we perhaps got an ordered list of languages to consider for the translation. */ while (1) { /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; if (categoryvalue[0] == '\0') { /* The whole contents of CATEGORYVALUE has been searched but no valid entry has been found. We solve this situation by implicitly appending a "C" entry, i.e. no translation will take place. */ single_locale[0] = 'C'; single_locale[1] = '\0'; } else { char *cp = single_locale; while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') *cp++ = *categoryvalue++; *cp = '\0'; /* When this is a SUID binary we must not allow accessing files outside the dedicated directories. */ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale)) /* Ingore this entry. */ continue; } /* If the current locale value is C (or POSIX) we don't load a domain. Return the MSGID. */ if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) break; /* Find structure describing the message catalog matching the DOMAINNAME and CATEGORY. */ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding); if (domain != NULL) { #if defined IN_LIBGLOCALE retval = _nl_find_msg (domain, binding, encoding, msgid1, &retlen); #else retval = _nl_find_msg (domain, binding, msgid1, 1, &retlen); #endif if (retval == NULL) { int cnt; for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) { #if defined IN_LIBGLOCALE retval = _nl_find_msg (domain->successor[cnt], binding, encoding, msgid1, &retlen); #else retval = _nl_find_msg (domain->successor[cnt], binding, msgid1, 1, &retlen); #endif if (retval != NULL) { domain = domain->successor[cnt]; break; } } } /* Returning -1 means that some resource problem exists (likely memory) and that the strings could not be converted. Return the original strings. */ if (__builtin_expect (retval == (char *) -1, 0)) break; if (retval != NULL) { /* Found the translation of MSGID1 in domain DOMAIN: starting at RETVAL, RETLEN bytes. */ FREE_BLOCKS (block_list); if (foundp == NULL) { /* Create a new entry and add it to the search tree. */ size_t size; struct known_translation_t *newp; size = offsetof (struct known_translation_t, msgid) + msgid_len + domainname_len + 1; #ifdef HAVE_PER_THREAD_LOCALE size += strlen (localename) + 1; #endif newp = (struct known_translation_t *) malloc (size); if (newp != NULL) { char *new_domainname; #ifdef HAVE_PER_THREAD_LOCALE char *new_localename; #endif new_domainname = (char *) mempcpy (newp->msgid, msgid1, msgid_len); memcpy (new_domainname, domainname, domainname_len + 1); #ifdef HAVE_PER_THREAD_LOCALE new_localename = new_domainname + domainname_len + 1; strcpy (new_localename, localename); #endif newp->domainname = new_domainname; newp->category = category; #ifdef HAVE_PER_THREAD_LOCALE newp->localename = new_localename; #endif #ifdef IN_LIBGLOCALE newp->encoding = encoding; #endif newp->counter = _nl_msg_cat_cntr; newp->domain = domain; newp->translation = retval; newp->translation_length = retlen; gl_rwlock_wrlock (tree_lock); /* Insert the entry in the search tree. */ foundp = (struct known_translation_t **) tsearch (newp, &root, transcmp); gl_rwlock_unlock (tree_lock); if (foundp == NULL || __builtin_expect (*foundp != newp, 0)) /* The insert failed. */ free (newp); } } else { /* We can update the existing entry. */ (*foundp)->counter = _nl_msg_cat_cntr; (*foundp)->domain = domain; (*foundp)->translation = retval; (*foundp)->translation_length = retlen; } __set_errno (saved_errno); /* Now deal with plural. */ if (plural) retval = plural_lookup (domain, n, retval, retlen); gl_rwlock_unlock (_nl_state_lock); return retval; } } } return_untranslated: /* Return the untranslated MSGID. */ FREE_BLOCKS (block_list); gl_rwlock_unlock (_nl_state_lock); #ifndef _LIBC if (!ENABLE_SECURE) { extern void _nl_log_untranslated (const char *logfilename, const char *domainname, const char *msgid1, const char *msgid2, int plural); const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); if (logfilename != NULL && logfilename[0] != '\0') _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural); } #endif __set_errno (saved_errno); return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); } /* Look up the translation of msgid within DOMAIN_FILE and DOMAINBINDING. Return it if found. Return NULL if not found or in case of a conversion failure (problem in the particular message catalog). Return (char *) -1 in case of a memory allocation failure during conversion (only if ENCODING != NULL resp. CONVERT == true). */ char * internal_function #ifdef IN_LIBGLOCALE _nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *encoding, const char *msgid, size_t *lengthp) #else _nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, int convert, size_t *lengthp) #endif { struct loaded_domain *domain; nls_uint32 nstrings; size_t act; char *result; size_t resultlen; if (domain_file->decided <= 0) _nl_load_domain (domain_file, domainbinding); if (domain_file->data == NULL) return NULL; domain = (struct loaded_domain *) domain_file->data; nstrings = domain->nstrings; /* Locate the MSGID and its translation. */ if (domain->hash_tab != NULL) { /* Use the hashing table. */ nls_uint32 len = strlen (msgid); nls_uint32 hash_val = __hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); while (1) { nls_uint32 nstr = W (domain->must_swap_hash_tab, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; nstr--; /* Compare msgid with the original string at index nstr. We compare the lengths with >=, not ==, because plural entries are represented by strings with an embedded NUL. */ if (nstr < nstrings ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len && (strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[nstr].offset)) == 0) : domain->orig_sysdep_tab[nstr - nstrings].length > len && (strcmp (msgid, domain->orig_sysdep_tab[nstr - nstrings].pointer) == 0)) { act = nstr; goto found; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } /* NOTREACHED */ } else { /* Try the default method: binary search in the sorted array of messages. */ size_t top, bottom; bottom = 0; top = nstrings; while (bottom < top) { int cmp_val; act = (bottom + top) / 2; cmp_val = strcmp (msgid, (domain->data + W (domain->must_swap, domain->orig_tab[act].offset))); if (cmp_val < 0) top = act; else if (cmp_val > 0) bottom = act + 1; else goto found; } /* No translation was found. */ return NULL; } found: /* The translation was found at index ACT. If we have to convert the string to use a different character set, this is the time. */ if (act < nstrings) { result = (char *) (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; } else { result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; resultlen = domain->trans_sysdep_tab[act - nstrings].length; } #if defined _LIBC || HAVE_ICONV # ifdef IN_LIBGLOCALE if (encoding != NULL) # else if (convert) # endif { /* We are supposed to do a conversion. */ # ifndef IN_LIBGLOCALE const char *encoding = get_output_charset (domainbinding); # endif size_t nconversions; struct converted_domain *convd; size_t i; /* Protect against reallocation of the table. */ gl_rwlock_rdlock (domain->conversions_lock); /* Search whether a table with converted translations for this encoding has already been allocated. */ nconversions = domain->nconversions; convd = NULL; for (i = nconversions; i > 0; ) { i--; if (strcmp (domain->conversions[i].encoding, encoding) == 0) { convd = &domain->conversions[i]; break; } } gl_rwlock_unlock (domain->conversions_lock); if (convd == NULL) { /* We have to allocate a new conversions table. */ gl_rwlock_wrlock (domain->conversions_lock); /* Maybe in the meantime somebody added the translation. Recheck. */ for (i = nconversions; i > 0; ) { i--; if (strcmp (domain->conversions[i].encoding, encoding) == 0) { convd = &domain->conversions[i]; goto found_convd; } } { /* Allocate a table for the converted translations for this encoding. */ struct converted_domain *new_conversions = (struct converted_domain *) (domain->conversions != NULL ? realloc (domain->conversions, (nconversions + 1) * sizeof (struct converted_domain)) : malloc ((nconversions + 1) * sizeof (struct converted_domain))); if (__builtin_expect (new_conversions == NULL, 0)) { /* Nothing we can do, no more memory. We cannot use the translation because it might be encoded incorrectly. */ unlock_fail: gl_rwlock_unlock (domain->conversions_lock); return (char *) -1; } domain->conversions = new_conversions; /* Copy the 'encoding' string to permanent storage. */ encoding = strdup (encoding); if (__builtin_expect (encoding == NULL, 0)) /* Nothing we can do, no more memory. We cannot use the translation because it might be encoded incorrectly. */ goto unlock_fail; convd = &new_conversions[nconversions]; convd->encoding = encoding; /* Find out about the character set the file is encoded with. This can be found (in textual form) in the entry "". If this entry does not exist or if this does not contain the 'charset=' information, we will assume the charset matches the one the current locale and we don't have to perform any conversion. */ # ifdef _LIBC convd->conv = (__gconv_t) -1; # else # if HAVE_ICONV convd->conv = (iconv_t) -1; # endif # endif { char *nullentry; size_t nullentrylen; /* Get the header entry. This is a recursion, but it doesn't reallocate domain->conversions because we pass encoding = NULL or convert = 0, respectively. */ nullentry = # ifdef IN_LIBGLOCALE _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen); # else _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen); # endif if (nullentry != NULL) { const char *charsetstr; charsetstr = strstr (nullentry, "charset="); if (charsetstr != NULL) { size_t len; char *charset; const char *outcharset; charsetstr += strlen ("charset="); len = strcspn (charsetstr, " \t\n"); charset = (char *) alloca (len + 1); # if defined _LIBC || HAVE_MEMPCPY *((char *) mempcpy (charset, charsetstr, len)) = '\0'; # else memcpy (charset, charsetstr, len); charset[len] = '\0'; # endif outcharset = encoding; # ifdef _LIBC /* We always want to use transliteration. */ outcharset = norm_add_slashes (outcharset, "TRANSLIT"); charset = norm_add_slashes (charset, ""); int r = __gconv_open (outcharset, charset, &convd->conv, GCONV_AVOID_NOCONV); if (__builtin_expect (r != __GCONV_OK, 0)) { /* If the output encoding is the same there is nothing to do. Otherwise do not use the translation at all. */ if (__builtin_expect (r != __GCONV_NULCONV, 1)) { gl_rwlock_unlock (domain->conversions_lock); free ((char *) encoding); return NULL; } convd->conv = (__gconv_t) -1; } # else # if HAVE_ICONV /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, we want to use transliteration. */ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ || _LIBICONV_VERSION >= 0x0105 if (strchr (outcharset, '/') == NULL) { char *tmp; len = strlen (outcharset); tmp = (char *) alloca (len + 10 + 1); memcpy (tmp, outcharset, len); memcpy (tmp + len, "//TRANSLIT", 10 + 1); outcharset = tmp; convd->conv = iconv_open (outcharset, charset); freea (outcharset); } else # endif convd->conv = iconv_open (outcharset, charset); # endif # endif freea (charset); } } } convd->conv_tab = NULL; /* Here domain->conversions is still == new_conversions. */ domain->nconversions++; } found_convd: gl_rwlock_unlock (domain->conversions_lock); } if ( # ifdef _LIBC convd->conv != (__gconv_t) -1 # else # if HAVE_ICONV convd->conv != (iconv_t) -1 # endif # endif ) { /* We are supposed to do a conversion. First allocate an appropriate table with the same structure as the table of translations in the file, where we can put the pointers to the converted strings in. There is a slight complication with plural entries. They are represented by consecutive NUL terminated strings. We handle this case by converting RESULTLEN bytes, including NULs. */ if (convd->conv_tab == NULL && ((convd->conv_tab = (char **) calloc (nstrings + domain->n_sysdep_strings, sizeof (char *))) == NULL)) /* Mark that we didn't succeed allocating a table. */ convd->conv_tab = (char **) -1; if (__builtin_expect (convd->conv_tab == (char **) -1, 0)) /* Nothing we can do, no more memory. We cannot use the translation because it might be encoded incorrectly. */ return (char *) -1; if (convd->conv_tab[act] == NULL) { /* We haven't used this string so far, so it is not translated yet. Do this now. */ /* We use a bit more efficient memory handling. We allocate always larger blocks which get used over time. This is faster than many small allocations. */ __libc_lock_define_initialized (static, lock) # define INITIAL_BLOCK_SIZE 4080 static unsigned char *freemem; static size_t freemem_size; const unsigned char *inbuf; unsigned char *outbuf; int malloc_count; # ifndef _LIBC transmem_block_t *transmem_list = NULL; # endif __libc_lock_lock (lock); inbuf = (const unsigned char *) result; outbuf = freemem + sizeof (size_t); malloc_count = 0; while (1) { transmem_block_t *newmem; # ifdef _LIBC size_t non_reversible; int res; if (freemem_size < sizeof (size_t)) goto resize_freemem; res = __gconv (convd->conv, &inbuf, inbuf + resultlen, &outbuf, outbuf + freemem_size - sizeof (size_t), &non_reversible); if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT) break; if (res != __GCONV_FULL_OUTPUT) { /* We should not use the translation at all, it is incorrectly encoded. */ __libc_lock_unlock (lock); return NULL; } inbuf = (const unsigned char *) result; # else # if HAVE_ICONV const char *inptr = (const char *) inbuf; size_t inleft = resultlen; char *outptr = (char *) outbuf; size_t outleft; if (freemem_size < sizeof (size_t)) goto resize_freemem; outleft = freemem_size - sizeof (size_t); if (iconv (convd->conv, (ICONV_CONST char **) &inptr, &inleft, &outptr, &outleft) != (size_t) (-1)) { outbuf = (unsigned char *) outptr; break; } if (errno != E2BIG) { __libc_lock_unlock (lock); return NULL; } # endif # endif resize_freemem: /* We must allocate a new buffer or resize the old one. */ if (malloc_count > 0) { ++malloc_count; freemem_size = malloc_count * INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) realloc (transmem_list, freemem_size); # ifdef _LIBC if (newmem != NULL) transmem_list = transmem_list->next; else { struct transmem_list *old = transmem_list; transmem_list = transmem_list->next; free (old); } # endif } else { malloc_count = 1; freemem_size = INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) malloc (freemem_size); } if (__builtin_expect (newmem == NULL, 0)) { freemem = NULL; freemem_size = 0; __libc_lock_unlock (lock); return (char *) -1; } # ifdef _LIBC /* Add the block to the list of blocks we have to free at some point. */ newmem->next = transmem_list; transmem_list = newmem; freemem = (unsigned char *) newmem->data; freemem_size -= offsetof (struct transmem_list, data); # else transmem_list = newmem; freemem = newmem; # endif outbuf = freemem + sizeof (size_t); } /* We have now in our buffer a converted string. Put this into the table of conversions. */ *(size_t *) freemem = outbuf - freemem - sizeof (size_t); convd->conv_tab[act] = (char *) freemem; /* Shrink freemem, but keep it aligned. */ freemem_size -= outbuf - freemem; freemem = outbuf; freemem += freemem_size & (alignof (size_t) - 1); freemem_size = freemem_size & ~ (alignof (size_t) - 1); __libc_lock_unlock (lock); } /* Now convd->conv_tab[act] contains the translation of all the plural variants. */ result = convd->conv_tab[act] + sizeof (size_t); resultlen = *(size_t *) convd->conv_tab[act]; } } /* The result string is converted. */ #endif /* _LIBC || HAVE_ICONV */ *lengthp = resultlen; return result; } /* Look up a plural variant. */ static char * internal_function plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, const char *translation, size_t translation_len) { struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; unsigned long int index; const char *p; index = plural_eval (domaindata->plural, n); if (index >= domaindata->nplurals) /* This should never happen. It means the plural expression and the given maximum value do not match. */ index = 0; /* Skip INDEX strings at TRANSLATION. */ p = translation; while (index-- > 0) { #ifdef _LIBC p = __rawmemchr (p, '\0'); #else p = strchr (p, '\0'); #endif /* And skip over the NUL byte. */ p++; if (p >= translation + translation_len) /* This should never happen. It means the plural expression evaluated to a value larger than the number of variants available for MSGID1. */ return (char *) translation; } return (char *) p; } #ifndef _LIBC /* Return string representation of locale CATEGORY. */ static const char * internal_function category_to_name (int category) { const char *retval; switch (category) { #ifdef LC_COLLATE case LC_COLLATE: retval = "LC_COLLATE"; break; #endif #ifdef LC_CTYPE case LC_CTYPE: retval = "LC_CTYPE"; break; #endif #ifdef LC_MONETARY case LC_MONETARY: retval = "LC_MONETARY"; break; #endif #ifdef LC_NUMERIC case LC_NUMERIC: retval = "LC_NUMERIC"; break; #endif #ifdef LC_TIME case LC_TIME: retval = "LC_TIME"; break; #endif #ifdef LC_MESSAGES case LC_MESSAGES: retval = "LC_MESSAGES"; break; #endif #ifdef LC_RESPONSE case LC_RESPONSE: retval = "LC_RESPONSE"; break; #endif #ifdef LC_ALL case LC_ALL: /* This might not make sense but is perhaps better than any other value. */ retval = "LC_ALL"; break; #endif default: /* If you have a better idea for a default value let me know. */ retval = "LC_XXX"; } return retval; } #endif /* Guess value of current locale from value of the environment variables or system-dependent defaults. */ static const char * internal_function #ifdef IN_LIBGLOCALE guess_category_value (int category, const char *categoryname, const char *locale) #else guess_category_value (int category, const char *categoryname) #endif { const char *language; #ifndef IN_LIBGLOCALE const char *locale; # ifndef _LIBC const char *language_default; int locale_defaulted; # endif #endif /* We use the settings in the following order: 1. The value of the environment variable 'LANGUAGE'. This is a GNU extension. Its value can be a colon-separated list of locale names. 2. The value of the environment variable 'LC_ALL', 'LC_xxx', or 'LANG'. More precisely, the first among these that is set to a non-empty value. This is how POSIX specifies it. The value is a single locale name. 3. A system-dependent preference list of languages. Its value can be a colon-separated list of locale names. 4. A system-dependent default locale name. This way: - System-dependent settings can be overridden by environment variables. - If the system provides both a list of languages and a default locale, the former is used. */ #ifndef IN_LIBGLOCALE /* Fetch the locale name, through the POSIX method of looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems this can be done by the `setlocale' function itself. */ # ifdef _LIBC locale = __current_locale_name (category); # else # if HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS /* The __names field is not public glibc API and must therefore not be used in code that is installed in public locations. */ locale_t thread_locale = uselocale (NULL); if (thread_locale != LC_GLOBAL_LOCALE) { locale = thread_locale->__names[category]; locale_defaulted = 0; } else # endif { locale = _nl_locale_name_posix (category, categoryname); locale_defaulted = 0; if (locale == NULL) { locale = _nl_locale_name_default (); locale_defaulted = 1; } } # endif #endif /* Ignore LANGUAGE and its system-dependent analogon if the locale is set to "C" because 1. "C" locale usually uses the ASCII encoding, and most international messages use non-ASCII characters. These characters get displayed as question marks (if using glibc's iconv()) or as invalid 8-bit characters (because other iconv()s refuse to convert most non-ASCII characters to ASCII). In any case, the output is ugly. 2. The precise output of some programs in the "C" locale is specified by POSIX and should not depend on environment variables like "LANGUAGE" or system-dependent information. We allow such programs to use gettext(). */ if (strcmp (locale, "C") == 0) return locale; /* The highest priority value is the value of the 'LANGUAGE' environment variable. */ language = getenv ("LANGUAGE"); if (language != NULL && language[0] != '\0') return language; #if !defined IN_LIBGLOCALE && !defined _LIBC /* The next priority value is the locale name, if not defaulted. */ if (locale_defaulted) { /* The next priority value is the default language preferences list. */ language_default = _nl_language_preferences_default (); if (language_default != NULL) return language_default; } /* The least priority value is the locale name, if defaulted. */ #endif return locale; } #if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE /* Returns the output charset. */ static const char * internal_function get_output_charset (struct binding *domainbinding) { /* The output charset should normally be determined by the locale. But sometimes the locale is not used or not correctly set up, so we provide a possibility for the user to override this: the OUTPUT_CHARSET environment variable. Moreover, the value specified through bind_textdomain_codeset overrides both. */ if (domainbinding != NULL && domainbinding->codeset != NULL) return domainbinding->codeset; else { /* For speed reasons, we look at the value of OUTPUT_CHARSET only once. This is a user variable that is not supposed to change during a program run. */ static char *output_charset_cache; static int output_charset_cached; if (!output_charset_cached) { const char *value = getenv ("OUTPUT_CHARSET"); if (value != NULL && value[0] != '\0') { size_t len = strlen (value) + 1; char *value_copy = (char *) malloc (len); if (value_copy != NULL) memcpy (value_copy, value, len); output_charset_cache = value_copy; } output_charset_cached = 1; } if (output_charset_cache != NULL) return output_charset_cache; else { # ifdef _LIBC return _NL_CURRENT (LC_CTYPE, CODESET); # else # if HAVE_ICONV return locale_charset (); # endif # endif } } } #endif /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif #if !_LIBC && !HAVE_MEMPCPY static void * mempcpy (void *dest, const void *src, size_t n) { return (void *) ((char *) memcpy (dest, src, n) + n); } #endif #if !_LIBC && !HAVE_TSEARCH # include "tsearch.c" #endif #ifdef _LIBC /* If we want to free all resources we have to do some work at program's end. */ libc_freeres_fn (free_mem) { void *old; while (_nl_domain_bindings != NULL) { struct binding *oldp = _nl_domain_bindings; _nl_domain_bindings = _nl_domain_bindings->next; if (oldp->dirname != _nl_default_dirname) /* Yes, this is a pointer comparison. */ free (oldp->dirname); free (oldp->codeset); free (oldp); } if (_nl_current_default_domain != _nl_default_default_domain) /* Yes, again a pointer comparison. */ free ((char *) _nl_current_default_domain); /* Remove the search tree with the known translations. */ __tdestroy (root, free); root = NULL; while (transmem_list != NULL) { old = transmem_list; transmem_list = transmem_list->next; free (old); } } #endif ebview-0.3.6.2/intl/ChangeLog0000644000175000017500000000010711241377503015200 0ustar mhattamhatta2007-11-07 GNU * Version 0.17 released. ebview-0.3.6.2/intl/locale.alias0000644000175000017500000000510611241377503015704 0ustar mhattamhatta# Locale name alias data base. # Copyright (C) 1996-2001,2003,2007 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. # The format of this file is the same as for the corresponding file of # the X Window System, which normally can be found in # /usr/lib/X11/locale/locale.alias # A single line contains two fields: an alias and a substitution value. # All entries are case independent. # Note: This file is obsolete and is kept around for the time being for # backward compatibility. Nobody should rely on the names defined here. # Locales should always be specified by their full name. # Packages using this file: bokmal nb_NO.ISO-8859-1 bokmål nb_NO.ISO-8859-1 catalan ca_ES.ISO-8859-1 croatian hr_HR.ISO-8859-2 czech cs_CZ.ISO-8859-2 danish da_DK.ISO-8859-1 dansk da_DK.ISO-8859-1 deutsch de_DE.ISO-8859-1 dutch nl_NL.ISO-8859-1 eesti et_EE.ISO-8859-1 estonian et_EE.ISO-8859-1 finnish fi_FI.ISO-8859-1 français fr_FR.ISO-8859-1 french fr_FR.ISO-8859-1 galego gl_ES.ISO-8859-1 galician gl_ES.ISO-8859-1 german de_DE.ISO-8859-1 greek el_GR.ISO-8859-7 hebrew he_IL.ISO-8859-8 hrvatski hr_HR.ISO-8859-2 hungarian hu_HU.ISO-8859-2 icelandic is_IS.ISO-8859-1 italian it_IT.ISO-8859-1 japanese ja_JP.eucJP japanese.euc ja_JP.eucJP ja_JP ja_JP.eucJP ja_JP.ujis ja_JP.eucJP japanese.sjis ja_JP.SJIS korean ko_KR.eucKR korean.euc ko_KR.eucKR ko_KR ko_KR.eucKR lithuanian lt_LT.ISO-8859-13 no_NO nb_NO.ISO-8859-1 no_NO.ISO-8859-1 nb_NO.ISO-8859-1 norwegian nb_NO.ISO-8859-1 nynorsk nn_NO.ISO-8859-1 polish pl_PL.ISO-8859-2 portuguese pt_PT.ISO-8859-1 romanian ro_RO.ISO-8859-2 russian ru_RU.ISO-8859-5 slovak sk_SK.ISO-8859-2 slovene sl_SI.ISO-8859-2 slovenian sl_SI.ISO-8859-2 spanish es_ES.ISO-8859-1 swedish sv_SE.ISO-8859-1 thai th_TH.TIS-620 turkish tr_TR.ISO-8859-9 ebview-0.3.6.2/intl/tsearch.h0000644000175000017500000000536611241377503015244 0ustar mhattamhatta/* Binary tree data structure. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _TSEARCH_H #define _TSEARCH_H #if HAVE_TSEARCH /* Get tseach(), tfind(), tdelete(), twalk() declarations. */ #include #else #ifdef __cplusplus extern "C" { #endif /* See , for details. */ typedef enum { preorder, postorder, endorder, leaf } VISIT; /* Searches an element in the tree *VROOTP that compares equal to KEY. If one is found, it is returned. Otherwise, a new element equal to KEY is inserted in the tree and is returned. */ extern void * tsearch (const void *key, void **vrootp, int (*compar) (const void *, const void *)); /* Searches an element in the tree *VROOTP that compares equal to KEY. If one is found, it is returned. Otherwise, NULL is returned. */ extern void * tfind (const void *key, void *const *vrootp, int (*compar) (const void *, const void *)); /* Searches an element in the tree *VROOTP that compares equal to KEY. If one is found, it is removed from the tree, and its parent node is returned. Otherwise, NULL is returned. */ extern void * tdelete (const void *key, void **vrootp, int (*compar) (const void *, const void *)); /* Perform a depth-first, left-to-right traversal of the tree VROOT. The ACTION function is called: - for non-leaf nodes: 3 times, before the left subtree traversal, after the left subtree traversal but before the right subtree traversal, and after the right subtree traversal, - for leaf nodes: once. The arguments passed to ACTION are: 1. the node; it can be casted to a 'const void * const *', i.e. into a pointer to the key, 2. an indicator which visit of the node this is, 3. the level of the node in the tree (0 for the root). */ extern void twalk (const void *vroot, void (*action) (const void *, VISIT, int)); #ifdef __cplusplus } #endif #endif #endif /* _TSEARCH_H */ ebview-0.3.6.2/intl/COPYING.LIB-2.10000644000175000017500000006366111241377503015402 0ustar mhattamhatta GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. ^L Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ^L GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. ^L Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. ^L 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. ^L 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. ^L 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. ^L 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ^L How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ebview-0.3.6.2/intl/plural.y0000644000175000017500000001657611241377503015140 0ustar mhattamhatta%{ /* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* For bison < 2.0, the bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. This can go away once the AM_INTL_SUBDIR macro requires bison >= 2.0. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg %} %pure_parser %expect 7 %union { unsigned long int num; enum expression_operator op; struct expression *exp; } %{ /* Prototypes for local functions. */ static int yylex (YYSTYPE *lval, const char **pexp); static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * new_exp (int nargs, enum expression_operator op, struct expression * const *args) { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (enum expression_operator op) { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (enum expression_operator op, struct expression *right) { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (enum expression_operator op, struct expression *left, struct expression *right) { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (enum expression_operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } %} /* This declares that all operators have the same associativity and the precedence order as in C. See [Harbison, Steele: C, A Reference Manual]. There is no unary minus and no bitwise operators. Operators with the same syntactic behaviour have been merged into a single token, to save space in the array generated by bison. */ %right '?' /* ? */ %left '|' /* || */ %left '&' /* && */ %left EQUOP2 /* == != */ %left CMPOP2 /* < > <= >= */ %left ADDOP2 /* + - */ %left MULOP2 /* * / % */ %right '!' /* ! */ %token EQUOP2 CMPOP2 ADDOP2 MULOP2 %token NUMBER %type exp %% start: exp { if ($1 == NULL) YYABORT; ((struct parse_args *) arg)->res = $1; } ; exp: exp '?' exp ':' exp { $$ = new_exp_3 (qmop, $1, $3, $5); } | exp '|' exp { $$ = new_exp_2 (lor, $1, $3); } | exp '&' exp { $$ = new_exp_2 (land, $1, $3); } | exp EQUOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp CMPOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp ADDOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp MULOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | '!' exp { $$ = new_exp_1 (lnot, $2); } | 'n' { $$ = new_exp_0 (var); } | NUMBER { if (($$ = new_exp_0 (num)) != NULL) $$->val.num = $1; } | '(' exp ')' { $$ = $2; } ; %% void internal_function FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } ebview-0.3.6.2/intl/langprefs.c0000644000175000017500000000737511241377503015571 0ustar mhattamhatta/* Determine the user's language preferences. Copyright (C) 2004-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include #endif #include #if HAVE_CFPREFERENCESCOPYAPPVALUE # include # include # include # include # include extern void _nl_locale_name_canonicalize (char *name); #endif /* Determine the user's language preferences, as a colon separated list of locale names in XPG syntax language[_territory][.codeset][@modifier] The result must not be freed; it is statically allocated. The LANGUAGE environment variable does not need to be considered; it is already taken into account by the caller. */ const char * _nl_language_preferences_default (void) { #if HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ { /* Cache the preferences list, since CoreFoundation calls are expensive. */ static const char *cached_languages; static int cache_initialized; if (!cache_initialized) { CFTypeRef preferences = CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"), kCFPreferencesCurrentApplication); if (preferences != NULL && CFGetTypeID (preferences) == CFArrayGetTypeID ()) { CFArrayRef prefArray = (CFArrayRef)preferences; int n = CFArrayGetCount (prefArray); char buf[256]; size_t size = 0; int i; for (i = 0; i < n; i++) { CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i); if (element != NULL && CFGetTypeID (element) == CFStringGetTypeID () && CFStringGetCString ((CFStringRef)element, buf, sizeof (buf), kCFStringEncodingASCII)) { _nl_locale_name_canonicalize (buf); size += strlen (buf) + 1; /* Most GNU programs use msgids in English and don't ship an en.mo message catalog. Therefore when we see "en" in the preferences list, arrange for gettext() to return the msgid, and ignore all further elements of the preferences list. */ if (strcmp (buf, "en") == 0) break; } else break; } if (size > 0) { char *languages = (char *) malloc (size); if (languages != NULL) { char *p = languages; for (i = 0; i < n; i++) { CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i); if (element != NULL && CFGetTypeID (element) == CFStringGetTypeID () && CFStringGetCString ((CFStringRef)element, buf, sizeof (buf), kCFStringEncodingASCII)) { _nl_locale_name_canonicalize (buf); strcpy (p, buf); p += strlen (buf); *p++ = ':'; if (strcmp (buf, "en") == 0) break; } else break; } *--p = '\0'; cached_languages = languages; } } } cache_initialized = 1; } if (cached_languages != NULL) return cached_languages; } #endif return NULL; } ebview-0.3.6.2/intl/Makefile.in0000644000175000017500000005041311241377503015500 0ustar mhattamhatta# Makefile for directory with message catalog handling library of GNU gettext # Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. # The VPATH variables allows builds with $builddir != $srcdir, assuming a # 'make' program that supports VPATH (such as GNU make). This line is removed # by autoconf automatically when "$(srcdir)" = ".". # In this directory, the VPATH handling is particular: # 1. If INTL_LIBTOOL_SUFFIX_PREFIX is 'l' (indicating a build with libtool), # the .c -> .lo rules carefully use $(srcdir), so that VPATH can be omitted. # 2. If PACKAGE = gettext-tools, VPATH _must_ be omitted, because otherwise # 'make' does the wrong thing if GNU gettext was configured with # "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la # files it finds in srcdir = ../../gettext-runtime/intl. VPATH = $(srcdir) prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ libdir = @libdir@ includedir = @includedir@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/intl aliaspath = $(localedir) subdir = intl INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ l = @INTL_LIBTOOL_SUFFIX_PREFIX@ AR = ar CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext WINDRES = @WINDRES@ # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. # -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro. DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \ -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ -Dset_relocation_prefix=libintl_set_relocation_prefix \ -Drelocate=libintl_relocate \ -DDEPENDS_ON_LIBICONV=1 @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@ LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@) LDFLAGS_yes = -Wl,--export-all-symbols LDFLAGS_no = LIBS = @LIBS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) HEADERS = \ gmo.h \ gettextP.h \ hash-string.h \ loadinfo.h \ plural-exp.h \ eval-plural.h \ localcharset.h \ lock.h \ relocatable.h \ tsearch.h tsearch.c \ xsize.h \ printf-args.h printf-args.c \ printf-parse.h wprintf-parse.h printf-parse.c \ vasnprintf.h vasnwprintf.h vasnprintf.c \ os2compat.h \ libgnuintl.h.in SOURCES = \ bindtextdom.c \ dcgettext.c \ dgettext.c \ gettext.c \ finddomain.c \ hash-string.c \ loadmsgcat.c \ localealias.c \ textdomain.c \ l10nflist.c \ explodename.c \ dcigettext.c \ dcngettext.c \ dngettext.c \ ngettext.c \ plural.y \ plural-exp.c \ localcharset.c \ lock.c \ relocatable.c \ langprefs.c \ localename.c \ log.c \ printf.c \ version.c \ osdep.c \ os2compat.c \ intl-exports.c \ intl-compat.c OBJECTS = \ bindtextdom.$lo \ dcgettext.$lo \ dgettext.$lo \ gettext.$lo \ finddomain.$lo \ hash-string.$lo \ loadmsgcat.$lo \ localealias.$lo \ textdomain.$lo \ l10nflist.$lo \ explodename.$lo \ dcigettext.$lo \ dcngettext.$lo \ dngettext.$lo \ ngettext.$lo \ plural.$lo \ plural-exp.$lo \ localcharset.$lo \ lock.$lo \ relocatable.$lo \ langprefs.$lo \ localename.$lo \ log.$lo \ printf.$lo \ version.$lo \ osdep.$lo \ intl-compat.$lo OBJECTS_RES_yes = libintl.res OBJECTS_RES_no = DISTFILES.common = Makefile.in \ config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \ $(HEADERS) $(SOURCES) DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc README.woe32 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h \ libgnuintl.h_vms Makefile.vms libgnuintl.h.msvc-static \ libgnuintl.h.msvc-shared Makefile.msvc all: all-@USE_INCLUDED_LIBINTL@ all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed all-no: all-no-@BUILD_INCLUDED_LIBINTL@ all-no-yes: libgnuintl.$la all-no-no: libintl.a libgnuintl.a: $(OBJECTS) rm -f $@ $(AR) cru $@ $(OBJECTS) $(RANLIB) $@ libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@) $(LIBTOOL) --mode=link \ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \ $(OBJECTS_RES_@WOE32@) \ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -rpath $(libdir) \ -no-undefined # Libtool's library version information for libintl. # Before making a gettext release, the gettext maintainer must change this # according to the libtool documentation, section "Library interface versions". # Maintainers of other packages that include the intl directory must *not* # change these values. LTV_CURRENT=8 LTV_REVISION=2 LTV_AGE=0 .SUFFIXES: .SUFFIXES: .c .y .o .lo .sin .sed .c.o: $(COMPILE) $< .y.c: $(YACC) $(YFLAGS) --output $@ $< rm -f $*.h bindtextdom.lo: $(srcdir)/bindtextdom.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c dcgettext.lo: $(srcdir)/dcgettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c dgettext.lo: $(srcdir)/dgettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c gettext.lo: $(srcdir)/gettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c finddomain.lo: $(srcdir)/finddomain.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c hash-string.lo: $(srcdir)/hash-string.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/hash-string.c loadmsgcat.lo: $(srcdir)/loadmsgcat.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c localealias.lo: $(srcdir)/localealias.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c textdomain.lo: $(srcdir)/textdomain.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c l10nflist.lo: $(srcdir)/l10nflist.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c explodename.lo: $(srcdir)/explodename.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c dcigettext.lo: $(srcdir)/dcigettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c dcngettext.lo: $(srcdir)/dcngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c dngettext.lo: $(srcdir)/dngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c ngettext.lo: $(srcdir)/ngettext.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c plural.lo: $(srcdir)/plural.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c plural-exp.lo: $(srcdir)/plural-exp.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c localcharset.lo: $(srcdir)/localcharset.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c lock.lo: $(srcdir)/lock.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/lock.c relocatable.lo: $(srcdir)/relocatable.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c langprefs.lo: $(srcdir)/langprefs.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c localename.lo: $(srcdir)/localename.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c log.lo: $(srcdir)/log.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c printf.lo: $(srcdir)/printf.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c version.lo: $(srcdir)/version.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/version.c osdep.lo: $(srcdir)/osdep.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c intl-compat.lo: $(srcdir)/intl-compat.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c # This rule is executed only on Woe32 systems. # The following sed expressions come from the windres-options script. They are # inlined here, so that they can be written in a Makefile without requiring a # temporary file. They must contain literal newlines rather than semicolons, # so that they work with the sed-3.02 that is shipped with MSYS. We can use # GNU bash's $'\n' syntax to obtain such a newline. libintl.res: $(srcdir)/libintl.rc nl=$$'\n'; \ sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ $(WINDRES) \ "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \ "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \ "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \ "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \ -i $(srcdir)/libintl.rc -o libintl.res --output-format=coff ref-add.sed: $(srcdir)/ref-add.sin sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed mv t-ref-add.sed ref-add.sed ref-del.sed: $(srcdir)/ref-del.sin sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed mv t-ref-del.sed ref-del.sed INCLUDES = -I. -I$(srcdir) -I.. libgnuintl.h: $(srcdir)/libgnuintl.h.in sed -e '/IN_LIBGLOCALE/d' \ -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ < $(srcdir)/libgnuintl.h.in \ | if test '@WOE32DLL@' = yes; then \ sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \ else \ cat; \ fi \ | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \ -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \ | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \ > libgnuintl.h libintl.h: $(srcdir)/libgnuintl.h.in sed -e '/IN_LIBGLOCALE/d' \ -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ < $(srcdir)/libgnuintl.h.in > libintl.h charset.alias: $(srcdir)/config.charset $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ mv t-$@ $@ check: all # We must not install the libintl.h/libintl.a files if we are on a # system which has the GNU gettext() function in its C library or in a # separate library. # If you want to use the one which comes with this version of the # package, you have to use `configure --with-included-gettext'. install: install-exec install-data install-exec: all if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ if test "@RELOCATABLE@" = yes; then \ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ if test -n "$$dependencies"; then \ rm -f $(DESTDIR)$(libdir)/libintl.la; \ fi; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no \ && test @GLIBC2@ != no; then \ $(mkdir_p) $(DESTDIR)$(libdir); \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ orig=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ if test @GLIBC21@ = no; then \ orig=charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ fi; \ fi; \ $(mkdir_p) $(DESTDIR)$(localedir); \ test -f $(DESTDIR)$(localedir)/locale.alias \ && orig=$(DESTDIR)$(localedir)/locale.alias \ || orig=$(srcdir)/locale.alias; \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ : ; \ fi install-data: all if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ for file in $$dists; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ dists="$(DISTFILES.generated)"; \ for file in $$dists; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ $(INSTALL_DATA) $$dir/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ dists="$(DISTFILES.obsolete)"; \ for file in $$dists; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-strip: install install-dvi install-html install-info install-ps install-pdf: installdirs: if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no \ && test @GLIBC2@ != no; then \ $(mkdir_p) $(DESTDIR)$(libdir); \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \ $(mkdir_p) $(DESTDIR)$(localedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ && test '@USE_INCLUDED_LIBINTL@' = yes; then \ rm -f $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools" \ && test '@USE_INCLUDED_LIBINTL@' = no \ && test @GLIBC2@ != no; then \ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ if test -f $(DESTDIR)$(localedir)/locale.alias; then \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext-tools"; then \ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi info dvi ps pdf html: $(OBJECTS): ../config.h libgnuintl.h bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h dcigettext.$lo: $(srcdir)/eval-plural.h localcharset.$lo: $(srcdir)/localcharset.h bindtextdom.$lo dcigettext.$lo finddomain.$lo loadmsgcat.$lo localealias.$lo lock.$lo log.$lo: $(srcdir)/lock.h localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c # A bison-2.1 generated plural.c includes if ENABLE_NLS. PLURAL_DEPS_yes = libintl.h PLURAL_DEPS_no = plural.$lo: $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@) tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) id: ID ID: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.la *.o *.obj *.lo libintl.res core core.* rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed rm -f -r .libs _libs clean: mostlyclean distclean: clean rm -f Makefile ID TAGS if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ rm -f ChangeLog.inst $(DISTFILES.normal); \ else \ : ; \ fi maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # GNU gettext needs not contain the file `VERSION' but contains some # other files which should not be distributed in other packages. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: Makefile if test "$(PACKAGE)" = "gettext-tools"; then \ : ; \ else \ if test "$(PACKAGE)" = "gettext-runtime"; then \ additional="$(DISTFILES.gettext)"; \ else \ additional="$(DISTFILES.normal)"; \ fi; \ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \ done; \ fi Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status # This would be more efficient, but doesn't work any more with autoconf-2.57, # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. # cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/intl/printf-args.c0000644000175000017500000001336311241377503016036 0ustar mhattamhatta/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } ebview-0.3.6.2/intl/printf-parse.h0000644000175000017500000000421311241377503016213 0ustar mhattamhatta/* Parse printf format string. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; } char_directives; /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #ifdef STATIC STATIC #else extern #endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif /* _PRINTF_PARSE_H */ ebview-0.3.6.2/intl/relocatable.c0000644000175000017500000003353411241377503016061 0ustar mhattamhatta/* Provide relocatable packages. Copyright (C) 2003-2006 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for getline(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include /* Specification. */ #include "relocatable.h" #if ENABLE_RELOCATABLE #include #include #include #include #ifdef NO_XMALLOC # define xmalloc malloc #else # include "xalloc.h" #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif #if DEPENDS_ON_LIBCHARSET # include #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV # include #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS # include #endif /* Faked cheap 'bool'. */ #undef bool #undef false #undef true #define bool int #define false 0 #define true 1 /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif /* Original installation prefix. */ static char *orig_prefix; static size_t orig_prefix_len; /* Current installation prefix. */ static char *curr_prefix; static size_t curr_prefix_len; /* These prefixes do not end in a slash. Anything that will be concatenated to them must start with a slash. */ /* Sets the original and the current installation prefix of this module. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ static void set_this_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { if (orig_prefix_arg != NULL && curr_prefix_arg != NULL /* Optimization: if orig_prefix and curr_prefix are equal, the relocation is a nop. */ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) { /* Duplicate the argument strings. */ char *memory; orig_prefix_len = strlen (orig_prefix_arg); curr_prefix_len = strlen (curr_prefix_arg); memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); #ifdef NO_XMALLOC if (memory != NULL) #endif { memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); orig_prefix = memory; memory += orig_prefix_len + 1; memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); curr_prefix = memory; return; } } orig_prefix = NULL; curr_prefix = NULL; /* Don't worry about wasted memory here - this function is usually only called once. */ } /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ void set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); /* Now notify all dependent libraries. */ #if DEPENDS_ON_LIBCHARSET libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif } #if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR) /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns NULL upon failure. */ #ifdef IN_LIBRARY #define compute_curr_prefix local_compute_curr_prefix static #endif const char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname) { const char *curr_installdir; const char *rel_installdir; if (curr_pathname == NULL) return NULL; /* Determine the relative installation directory, relative to the prefix. This is simply the difference between orig_installprefix and orig_installdir. */ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) != 0) /* Shouldn't happen - nothing should be installed outside $(prefix). */ return NULL; rel_installdir = orig_installdir + strlen (orig_installprefix); /* Determine the current installation directory. */ { const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname); const char *p = curr_pathname + strlen (curr_pathname); char *q; while (p > p_base) { p--; if (ISSLASH (*p)) break; } q = (char *) xmalloc (p - curr_pathname + 1); #ifdef NO_XMALLOC if (q == NULL) return NULL; #endif memcpy (q, curr_pathname, p - curr_pathname); q[p - curr_pathname] = '\0'; curr_installdir = q; } /* Compute the current installation prefix by removing the trailing rel_installdir from it. */ { const char *rp = rel_installdir + strlen (rel_installdir); const char *cp = curr_installdir + strlen (curr_installdir); const char *cp_base = curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir); while (rp > rel_installdir && cp > cp_base) { bool same = false; const char *rpi = rp; const char *cpi = cp; while (rpi > rel_installdir && cpi > cp_base) { rpi--; cpi--; if (ISSLASH (*rpi) || ISSLASH (*cpi)) { if (ISSLASH (*rpi) && ISSLASH (*cpi)) same = true; break; } /* Do case-insensitive comparison if the filesystem is always or often case-insensitive. It's better to accept the comparison if the difference is only in case, rather than to fail. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break; #else if (*rpi != *cpi) break; #endif } if (!same) break; /* The last pathname component was the same. opi and cpi now point to the slash before it. */ rp = rpi; cp = cpi; } if (rp > rel_installdir) /* Unexpected: The curr_installdir does not end with rel_installdir. */ return NULL; { size_t curr_prefix_len = cp - curr_installdir; char *curr_prefix; curr_prefix = (char *) xmalloc (curr_prefix_len + 1); #ifdef NO_XMALLOC if (curr_prefix == NULL) return NULL; #endif memcpy (curr_prefix, curr_installdir, curr_prefix_len); curr_prefix[curr_prefix_len] = '\0'; return curr_prefix; } } } #endif /* !IN_LIBRARY || PIC */ #if defined PIC && defined INSTALLDIR /* Full pathname of shared library, or NULL. */ static char *shared_library_fullname; #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ /* Determine the full pathname of the shared library when it is loaded. */ BOOL WINAPI DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) { (void) reserved; if (event == DLL_PROCESS_ATTACH) { /* The DLL is being loaded into an application's address range. */ static char location[MAX_PATH]; if (!GetModuleFileName (module_handle, location, sizeof (location))) /* Shouldn't happen. */ return FALSE; if (!IS_PATH_WITH_DIR (location)) /* Shouldn't happen. */ return FALSE; { #if defined __CYGWIN__ /* On Cygwin, we need to convert paths coming from Win32 system calls to the Unix-like slashified notation. */ static char location_as_posix_path[2 * MAX_PATH]; /* There's no error return defined for cygwin_conv_to_posix_path. See cygwin-api/func-cygwin-conv-to-posix-path.html. Does it overflow the buffer of expected size MAX_PATH or does it truncate the path? I don't know. Let's catch both. */ cygwin_conv_to_posix_path (location, location_as_posix_path); location_as_posix_path[MAX_PATH - 1] = '\0'; if (strlen (location_as_posix_path) >= MAX_PATH - 1) /* A sign of buffer overflow or path truncation. */ return FALSE; shared_library_fullname = strdup (location_as_posix_path); #else shared_library_fullname = strdup (location); #endif } } return TRUE; } #else /* Unix except Cygwin */ static void find_shared_library_fullname () { #if defined __linux__ && __GLIBC__ >= 2 /* Linux has /proc/self/maps. glibc 2 has the getline() function. */ FILE *fp; /* Open the current process' maps file. It describes one VMA per line. */ fp = fopen ("/proc/self/maps", "r"); if (fp) { unsigned long address = (unsigned long) &find_shared_library_fullname; for (;;) { unsigned long start, end; int c; if (fscanf (fp, "%lx-%lx", &start, &end) != 2) break; if (address >= start && address <= end - 1) { /* Found it. Now see if this line contains a filename. */ while (c = getc (fp), c != EOF && c != '\n' && c != '/') continue; if (c == '/') { size_t size; int len; ungetc (c, fp); shared_library_fullname = NULL; size = 0; len = getline (&shared_library_fullname, &size, fp); if (len >= 0) { /* Success: filled shared_library_fullname. */ if (len > 0 && shared_library_fullname[len - 1] == '\n') shared_library_fullname[len - 1] = '\0'; } } break; } while (c = getc (fp), c != EOF && c != '\n') continue; } fclose (fp); } #endif } #endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */ /* Return the full pathname of the current shared library. Return NULL if unknown. Guaranteed to work only on Linux, Cygwin and Woe32. */ static char * get_shared_library_fullname () { #if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__) static bool tried_find_shared_library_fullname; if (!tried_find_shared_library_fullname) { find_shared_library_fullname (); tried_find_shared_library_fullname = true; } #endif return shared_library_fullname; } #endif /* PIC */ /* Returns the pathname, relocated according to the current installation directory. */ const char * relocate (const char *pathname) { #if defined PIC && defined INSTALLDIR static int initialized; /* Initialization code for a shared library. */ if (!initialized) { /* At this point, orig_prefix and curr_prefix likely have already been set through the main program's set_program_name_and_installdir function. This is sufficient in the case that the library has initially been installed in the same orig_prefix. But we can do better, to also cover the cases that 1. it has been installed in a different prefix before being moved to orig_prefix and (later) to curr_prefix, 2. unlike the program, it has not moved away from orig_prefix. */ const char *orig_installprefix = INSTALLPREFIX; const char *orig_installdir = INSTALLDIR; const char *curr_prefix_better; curr_prefix_better = compute_curr_prefix (orig_installprefix, orig_installdir, get_shared_library_fullname ()); if (curr_prefix_better == NULL) curr_prefix_better = curr_prefix; set_relocation_prefix (orig_installprefix, curr_prefix_better); initialized = 1; } #endif /* Note: It is not necessary to perform case insensitive comparison here, even for DOS-like filesystems, because the pathname argument was typically created from the same Makefile variable as orig_prefix came from. */ if (orig_prefix != NULL && curr_prefix != NULL && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) { if (pathname[orig_prefix_len] == '\0') /* pathname equals orig_prefix. */ return curr_prefix; if (ISSLASH (pathname[orig_prefix_len])) { /* pathname starts with orig_prefix. */ const char *pathname_tail = &pathname[orig_prefix_len]; char *result = (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { memcpy (result, curr_prefix, curr_prefix_len); strcpy (result + curr_prefix_len, pathname_tail); return result; } } } /* Nothing to relocate. */ return pathname; } #endif ebview-0.3.6.2/intl/lock.c0000644000175000017500000005413011241377503014527 0ustar mhattamhatta/* Locking in multithreaded situations. Copyright (C) 2005-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include #include "lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # if PTHREAD_IN_USE_DETECTION_HARD /* The function to be executed by a dummy thread. */ static void * dummy_thread_func (void *arg) { return arg; } int glthread_in_use (void) { static int tested; static int result; /* 1: linked with -lpthread, 0: only with libc */ if (!tested) { pthread_t thread; if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) /* Thread creation failed. */ result = 0; else { /* Thread creation works. */ void *retval; if (pthread_join (thread, &retval) != 0) abort (); result = 1; } tested = 1; } return result; } # endif /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # if !defined PTHREAD_RWLOCK_INITIALIZER void glthread_rwlock_init (gl_rwlock_t *lock) { if (pthread_rwlock_init (&lock->rwlock, NULL) != 0) abort (); lock->initialized = 1; } void glthread_rwlock_rdlock (gl_rwlock_t *lock) { if (!lock->initialized) { if (pthread_mutex_lock (&lock->guard) != 0) abort (); if (!lock->initialized) glthread_rwlock_init (lock); if (pthread_mutex_unlock (&lock->guard) != 0) abort (); } if (pthread_rwlock_rdlock (&lock->rwlock) != 0) abort (); } void glthread_rwlock_wrlock (gl_rwlock_t *lock) { if (!lock->initialized) { if (pthread_mutex_lock (&lock->guard) != 0) abort (); if (!lock->initialized) glthread_rwlock_init (lock); if (pthread_mutex_unlock (&lock->guard) != 0) abort (); } if (pthread_rwlock_wrlock (&lock->rwlock) != 0) abort (); } void glthread_rwlock_unlock (gl_rwlock_t *lock) { if (!lock->initialized) abort (); if (pthread_rwlock_unlock (&lock->rwlock) != 0) abort (); } void glthread_rwlock_destroy (gl_rwlock_t *lock) { if (!lock->initialized) abort (); if (pthread_rwlock_destroy (&lock->rwlock) != 0) abort (); lock->initialized = 0; } # endif # else void glthread_rwlock_init (gl_rwlock_t *lock) { if (pthread_mutex_init (&lock->lock, NULL) != 0) abort (); if (pthread_cond_init (&lock->waiting_readers, NULL) != 0) abort (); if (pthread_cond_init (&lock->waiting_writers, NULL) != 0) abort (); lock->waiting_writers_count = 0; lock->runcount = 0; } void glthread_rwlock_rdlock (gl_rwlock_t *lock) { if (pthread_mutex_lock (&lock->lock) != 0) abort (); /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ /* POSIX says: "It is implementation-defined whether the calling thread acquires the lock when a writer does not hold the lock and there are writers blocked on the lock." Let's say, no: give the writers a higher priority. */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ if (pthread_cond_wait (&lock->waiting_readers, &lock->lock) != 0) abort (); } lock->runcount++; if (pthread_mutex_unlock (&lock->lock) != 0) abort (); } void glthread_rwlock_wrlock (gl_rwlock_t *lock) { if (pthread_mutex_lock (&lock->lock) != 0) abort (); /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; if (pthread_cond_wait (&lock->waiting_writers, &lock->lock) != 0) abort (); lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ if (pthread_mutex_unlock (&lock->lock) != 0) abort (); } void glthread_rwlock_unlock (gl_rwlock_t *lock) { if (pthread_mutex_lock (&lock->lock) != 0) abort (); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) abort (); lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ if (pthread_cond_signal (&lock->waiting_writers) != 0) abort (); } else { /* Wake up all waiting readers. */ if (pthread_cond_broadcast (&lock->waiting_readers) != 0) abort (); } } if (pthread_mutex_unlock (&lock->lock) != 0) abort (); } void glthread_rwlock_destroy (gl_rwlock_t *lock) { if (pthread_mutex_destroy (&lock->lock) != 0) abort (); if (pthread_cond_destroy (&lock->waiting_readers) != 0) abort (); if (pthread_cond_destroy (&lock->waiting_writers) != 0) abort (); } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if !(defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) void glthread_recursive_lock_init (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; if (pthread_mutexattr_init (&attributes) != 0) abort (); if (pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE) != 0) abort (); if (pthread_mutex_init (&lock->recmutex, &attributes) != 0) abort (); if (pthread_mutexattr_destroy (&attributes) != 0) abort (); lock->initialized = 1; } void glthread_recursive_lock_lock (gl_recursive_lock_t *lock) { if (!lock->initialized) { if (pthread_mutex_lock (&lock->guard) != 0) abort (); if (!lock->initialized) glthread_recursive_lock_init (lock); if (pthread_mutex_unlock (&lock->guard) != 0) abort (); } if (pthread_mutex_lock (&lock->recmutex) != 0) abort (); } void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock) { if (!lock->initialized) abort (); if (pthread_mutex_unlock (&lock->recmutex) != 0) abort (); } void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock) { if (!lock->initialized) abort (); if (pthread_mutex_destroy (&lock->recmutex) != 0) abort (); lock->initialized = 0; } # endif # else void glthread_recursive_lock_init (gl_recursive_lock_t *lock) { if (pthread_mutex_init (&lock->mutex, NULL) != 0) abort (); lock->owner = (pthread_t) 0; lock->depth = 0; } void glthread_recursive_lock_lock (gl_recursive_lock_t *lock) { pthread_t self = pthread_self (); if (lock->owner != self) { if (pthread_mutex_lock (&lock->mutex) != 0) abort (); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ abort (); } void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock) { if (lock->owner != pthread_self ()) abort (); if (lock->depth == 0) abort (); if (--(lock->depth) == 0) { lock->owner = (pthread_t) 0; if (pthread_mutex_unlock (&lock->mutex) != 0) abort (); } } void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock) { if (lock->owner != (pthread_t) 0) abort (); if (pthread_mutex_destroy (&lock->mutex) != 0) abort (); } # endif /* -------------------------- gl_once_t datatype -------------------------- */ static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; int glthread_once_singlethreaded (pthread_once_t *once_control) { /* We don't know whether pthread_once_t is an integer type, a floating-point type, a pointer type, or a structure type. */ char *firstbyte = (char *)once_control; if (*firstbyte == *(const char *)&fresh_once) { /* First time use of once_control. Invert the first byte. */ *firstbyte = ~ *(const char *)&fresh_once; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once_call (void *arg) { void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; void (*initfunction) (void) = *gl_once_temp_addr; initfunction (); } int glthread_once_singlethreaded (pth_once_t *once_control) { /* We know that pth_once_t is an integer type. */ if (*once_control == PTH_ONCE_INIT) { /* First time use of once_control. Invert the marker. */ *once_control = ~ PTH_ONCE_INIT; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init (gl_recursive_lock_t *lock) { if (mutex_init (&lock->mutex, USYNC_THREAD, NULL) != 0) abort (); lock->owner = (thread_t) 0; lock->depth = 0; } void glthread_recursive_lock_lock (gl_recursive_lock_t *lock) { thread_t self = thr_self (); if (lock->owner != self) { if (mutex_lock (&lock->mutex) != 0) abort (); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ abort (); } void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock) { if (lock->owner != thr_self ()) abort (); if (lock->depth == 0) abort (); if (--(lock->depth) == 0) { lock->owner = (thread_t) 0; if (mutex_unlock (&lock->mutex) != 0) abort (); } } void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock) { if (lock->owner != (thread_t) 0) abort (); if (mutex_destroy (&lock->mutex) != 0) abort (); } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once (gl_once_t *once_control, void (*initfunction) (void)) { if (!once_control->inited) { /* Use the mutex to guarantee that if another thread is already calling the initfunction, this thread waits until it's finished. */ if (mutex_lock (&once_control->mutex) != 0) abort (); if (!once_control->inited) { once_control->inited = 1; initfunction (); } if (mutex_unlock (&once_control->mutex) != 0) abort (); } } int glthread_once_singlethreaded (gl_once_t *once_control) { /* We know that gl_once_t contains an integer type. */ if (!once_control->inited) { /* First time use of once_control. Invert the marker. */ once_control->inited = ~ 0; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_WIN32_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ void glthread_lock_init (gl_lock_t *lock) { InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } void glthread_lock_lock (gl_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); } void glthread_lock_unlock (gl_lock_t *lock) { if (!lock->guard.done) abort (); LeaveCriticalSection (&lock->lock); } void glthread_lock_destroy (gl_lock_t *lock) { if (!lock->guard.done) abort (); DeleteCriticalSection (&lock->lock); lock->guard.done = 0; } /* ------------------------- gl_rwlock_t datatype ------------------------- */ static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->array = NULL; wq->count = 0; wq->alloc = 0; wq->offset = 0; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ static HANDLE gl_waitqueue_add (gl_waitqueue_t *wq) { HANDLE event; unsigned int index; if (wq->count == wq->alloc) { unsigned int new_alloc = 2 * wq->alloc + 1; HANDLE *new_array = (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); if (new_array == NULL) /* No more memory. */ return INVALID_HANDLE_VALUE; /* Now is a good opportunity to rotate the array so that its contents starts at offset 0. */ if (wq->offset > 0) { unsigned int old_count = wq->count; unsigned int old_alloc = wq->alloc; unsigned int old_offset = wq->offset; unsigned int i; if (old_offset + old_count > old_alloc) { unsigned int limit = old_offset + old_count - old_alloc; for (i = 0; i < limit; i++) new_array[old_alloc + i] = new_array[i]; } for (i = 0; i < old_count; i++) new_array[i] = new_array[old_offset + i]; wq->offset = 0; } wq->array = new_array; wq->alloc = new_alloc; } event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) /* No way to allocate an event. */ return INVALID_HANDLE_VALUE; index = wq->offset + wq->count; if (index >= wq->alloc) index -= wq->alloc; wq->array[index] = event; wq->count++; return event; } /* Notifies the first thread from a wait queue and dequeues it. */ static inline void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { SetEvent (wq->array[wq->offset + 0]); wq->offset++; wq->count--; if (wq->count == 0 || wq->offset == wq->alloc) wq->offset = 0; } /* Notifies all threads from a wait queue and dequeues them all. */ static inline void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { unsigned int i; for (i = 0; i < wq->count; i++) { unsigned int index = wq->offset + i; if (index >= wq->alloc) index -= wq->alloc; SetEvent (wq->array[index]); } wq->count = 0; wq->offset = 0; } void glthread_rwlock_init (gl_rwlock_t *lock) { InitializeCriticalSection (&lock->lock); gl_waitqueue_init (&lock->waiting_readers); gl_waitqueue_init (&lock->waiting_writers); lock->runcount = 0; lock->guard.done = 1; } void glthread_rwlock_rdlock (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ if (!(lock->runcount + 1 > 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_readers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_readers, incremented lock->runcount. */ if (!(lock->runcount > 0)) abort (); return; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount + 1 > 0)); } } lock->runcount++; LeaveCriticalSection (&lock->lock); } void glthread_rwlock_wrlock (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether no readers or writers are currently running. */ if (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_writers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_writers, set lock->runcount = -1. */ if (!(lock->runcount == -1)) abort (); return; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount == 0)); } } lock->runcount--; /* runcount becomes -1 */ LeaveCriticalSection (&lock->lock); } void glthread_rwlock_unlock (gl_rwlock_t *lock) { if (!lock->guard.done) abort (); EnterCriticalSection (&lock->lock); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) abort (); lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers.count > 0) { /* Wake up one of the waiting writers. */ lock->runcount--; gl_waitqueue_notify_first (&lock->waiting_writers); } else { /* Wake up all waiting readers. */ lock->runcount += lock->waiting_readers.count; gl_waitqueue_notify_all (&lock->waiting_readers); } } LeaveCriticalSection (&lock->lock); } void glthread_rwlock_destroy (gl_rwlock_t *lock) { if (!lock->guard.done) abort (); if (lock->runcount != 0) abort (); DeleteCriticalSection (&lock->lock); if (lock->waiting_readers.array != NULL) free (lock->waiting_readers.array); if (lock->waiting_writers.array != NULL) free (lock->waiting_writers.array); lock->guard.done = 0; } /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init (gl_recursive_lock_t *lock) { lock->owner = 0; lock->depth = 0; InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } void glthread_recursive_lock_lock (gl_recursive_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_recursive_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } { DWORD self = GetCurrentThreadId (); if (lock->owner != self) { EnterCriticalSection (&lock->lock); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ abort (); } } void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock) { if (lock->owner != GetCurrentThreadId ()) abort (); if (lock->depth == 0) abort (); if (--(lock->depth) == 0) { lock->owner = 0; LeaveCriticalSection (&lock->lock); } } void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock) { if (lock->owner != 0) abort (); DeleteCriticalSection (&lock->lock); lock->guard.done = 0; } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once (gl_once_t *once_control, void (*initfunction) (void)) { if (once_control->inited <= 0) { if (InterlockedIncrement (&once_control->started) == 0) { /* This thread is the first one to come to this once_control. */ InitializeCriticalSection (&once_control->lock); EnterCriticalSection (&once_control->lock); once_control->inited = 0; initfunction (); once_control->inited = 1; LeaveCriticalSection (&once_control->lock); } else { /* Undo last operation. */ InterlockedDecrement (&once_control->started); /* Some other thread has already started the initialization. Yield the CPU while waiting for the other thread to finish initializing and taking the lock. */ while (once_control->inited < 0) Sleep (0); if (once_control->inited <= 0) { /* Take the lock. This blocks until the other thread has finished calling the initfunction. */ EnterCriticalSection (&once_control->lock); LeaveCriticalSection (&once_control->lock); if (!(once_control->inited > 0)) abort (); } } } } #endif /* ========================================================================= */ ebview-0.3.6.2/intl/loadinfo.h0000644000175000017500000001211311241377503015372 0ustar mhattamhatta/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOADINFO_H #define _LOADINFO_H 1 /* Declarations of locale dependent catalog lookup functions. Implemented in localealias.c Possibly replace a locale name by another. explodename.c Split a locale name into its various fields. l10nflist.c Generate a list of filenames of possible message catalogs. finddomain.c Find and open the relevant message catalogs. The main function _nl_find_domain() in finddomain.c is declared in gettextP.h. */ #ifndef internal_function # define internal_function #endif #ifndef LIBINTL_DLL_EXPORTED # define LIBINTL_DLL_EXPORTED #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif /* Separator in PATH like lists of pathnames. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ # define PATH_SEPARATOR ':' #endif /* Encoding of locale name parts. */ #define XPG_NORM_CODESET 1 #define XPG_CODESET 2 #define XPG_TERRITORY 4 #define XPG_MODIFIER 8 struct loaded_l10nfile { const char *filename; int decided; const void *data; struct loaded_l10nfile *next; struct loaded_l10nfile *successor[1]; }; /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ extern const char *_nl_normalize_codeset (const char *codeset, size_t name_len); /* Lookup a locale dependent file. *L10NFILE_LIST denotes a pool of lookup results of locale dependent files of the same kind, sorted in decreasing order of ->filename. DIRLIST and DIRLIST_LEN are an argz list of directories in which to look, containing at least one directory (i.e. DIRLIST_LEN > 0). MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER are the pieces of the locale name, as produced by _nl_explode_name(). FILENAME is the filename suffix. The return value is the lookup result, either found in *L10NFILE_LIST, or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. If the return value is non-NULL, it is added to *L10NFILE_LIST, and its ->next field denotes the chaining inside *L10NFILE_LIST, and furthermore its ->successor[] field contains a list of other lookup results from which this lookup result inherits. */ extern struct loaded_l10nfile * _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *filename, int do_allocate); /* Lookup the real locale name for a locale alias NAME, or NULL if NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ /* Part of the libintl ABI only for the sake of the gettext.m4 macro. */ extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset. NAME gets destructively modified: NUL bytes are inserted here and there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, *CODESET gets assigned either a pointer into the old NAME string, or NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it is different from *CODESET; this one is dynamically allocated and has to be freed by the caller. The return value is a bitmask, where each bit corresponds to one filled-in value: XPG_MODIFIER for *MODIFIER, XPG_TERRITORY for *TERRITORY, XPG_CODESET for *CODESET, XPG_NORM_CODESET for *NORMALIZED_CODESET. */ extern int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset); #endif /* loadinfo.h */ ebview-0.3.6.2/intl/bindtextdom.c0000644000175000017500000002137211241377503016122 0ustar mhattamhatta/* Implementation of the bindtextdomain(3) function Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include # define gl_rwlock_define __libc_rwlock_define # define gl_rwlock_wrlock __libc_rwlock_wrlock # define gl_rwlock_unlock __libc_rwlock_unlock #else # include "lock.h" #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ /* Lock variable to protect the global data in the gettext implementation. */ gl_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define BINDTEXTDOMAIN __bindtextdomain # define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define BINDTEXTDOMAIN libintl_bindtextdomain # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset #endif /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP to be used for the DOMAINNAME message catalog. If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not modified, only the current value is returned. If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither modified nor returned. */ static void set_binding_values (const char *domainname, const char **dirnamep, const char **codesetp) { struct binding *binding; int modified; /* Some sanity checks. */ if (domainname == NULL || domainname[0] == '\0') { if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; return; } gl_rwlock_wrlock (_nl_state_lock); modified = 0; for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding != NULL) { if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The current binding has be to returned. */ *dirnamep = binding->dirname; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->dirname; if (strcmp (dirname, result) != 0) { if (strcmp (dirname, _nl_default_dirname) == 0) result = (char *) _nl_default_dirname; else { #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, dirname, len); #endif } if (__builtin_expect (result != NULL, 1)) { if (binding->dirname != _nl_default_dirname) free (binding->dirname); binding->dirname = result; modified = 1; } } *dirnamep = result; } } if (codesetp) { const char *codeset = *codesetp; if (codeset == NULL) /* The current binding has be to returned. */ *codesetp = binding->codeset; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->codeset; if (result == NULL || strcmp (codeset, result) != 0) { #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, codeset, len); #endif if (__builtin_expect (result != NULL, 1)) { if (binding->codeset != NULL) free (binding->codeset); binding->codeset = result; modified = 1; } } *codesetp = result; } } } else if ((dirnamep == NULL || *dirnamep == NULL) && (codesetp == NULL || *codesetp == NULL)) { /* Simply return the default values. */ if (dirnamep) *dirnamep = _nl_default_dirname; if (codesetp) *codesetp = NULL; } else { /* We have to create a new binding. */ size_t len = strlen (domainname) + 1; struct binding *new_binding = (struct binding *) malloc (offsetof (struct binding, domainname) + len); if (__builtin_expect (new_binding == NULL, 0)) goto failed; memcpy (new_binding->domainname, domainname, len); if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The default value. */ dirname = _nl_default_dirname; else { if (strcmp (dirname, _nl_default_dirname) == 0) dirname = _nl_default_dirname; else { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; memcpy (result, dirname, len); #endif dirname = result; } } *dirnamep = dirname; new_binding->dirname = (char *) dirname; } else /* The default value. */ new_binding->dirname = (char *) _nl_default_dirname; if (codesetp) { const char *codeset = *codesetp; if (codeset != NULL) { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; memcpy (result, codeset, len); #endif codeset = result; } *codesetp = codeset; new_binding->codeset = (char *) codeset; } else new_binding->codeset = NULL; /* Now enqueue it. */ if (_nl_domain_bindings == NULL || strcmp (domainname, _nl_domain_bindings->domainname) < 0) { new_binding->next = _nl_domain_bindings; _nl_domain_bindings = new_binding; } else { binding = _nl_domain_bindings; while (binding->next != NULL && strcmp (domainname, binding->next->domainname) > 0) binding = binding->next; new_binding->next = binding->next; binding->next = new_binding; } modified = 1; /* Here we deal with memory allocation failures. */ if (0) { failed_codeset: if (new_binding->dirname != _nl_default_dirname) free (new_binding->dirname); failed_dirname: free (new_binding); failed: if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; } } /* If we modified any binding, we flush the caches. */ if (modified) ++_nl_msg_cat_cntr; gl_rwlock_unlock (_nl_state_lock); } /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ char * BINDTEXTDOMAIN (const char *domainname, const char *dirname) { set_binding_values (domainname, &dirname, NULL); return (char *) dirname; } /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ char * BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) { set_binding_values (domainname, NULL, &codeset); return (char *) codeset; } #ifdef _LIBC /* Aliases for function names in GNU C Library. */ weak_alias (__bindtextdomain, bindtextdomain); weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset); #endif ebview-0.3.6.2/intl/log.c0000644000175000017500000000623111241377503014357 0ustar mhattamhatta/* Log file output. Copyright (C) 2003, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include /* Handle multi-threaded applications. */ #ifdef _LIBC # include #else # include "lock.h" #endif /* Print an ASCII string with quotes and escape sequences where needed. */ static void print_escaped (FILE *stream, const char *str) { putc ('"', stream); for (; *str != '\0'; str++) if (*str == '\n') { fputs ("\\n\"", stream); if (str[1] == '\0') return; fputs ("\n\"", stream); } else { if (*str == '"' || *str == '\\') putc ('\\', stream); putc (*str, stream); } putc ('"', stream); } static char *last_logfilename = NULL; static FILE *last_logfile = NULL; __libc_lock_define_initialized (static, lock) static inline void _nl_log_untranslated_locked (const char *logfilename, const char *domainname, const char *msgid1, const char *msgid2, int plural) { FILE *logfile; /* Can we reuse the last opened logfile? */ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0) { /* Close the last used logfile. */ if (last_logfilename != NULL) { if (last_logfile != NULL) { fclose (last_logfile); last_logfile = NULL; } free (last_logfilename); last_logfilename = NULL; } /* Open the logfile. */ last_logfilename = (char *) malloc (strlen (logfilename) + 1); if (last_logfilename == NULL) return; strcpy (last_logfilename, logfilename); last_logfile = fopen (logfilename, "a"); if (last_logfile == NULL) return; } logfile = last_logfile; fprintf (logfile, "domain "); print_escaped (logfile, domainname); fprintf (logfile, "\nmsgid "); print_escaped (logfile, msgid1); if (plural) { fprintf (logfile, "\nmsgid_plural "); print_escaped (logfile, msgid2); fprintf (logfile, "\nmsgstr[0] \"\"\n"); } else fprintf (logfile, "\nmsgstr \"\"\n"); putc ('\n', logfile); } /* Add to the log file an entry denoting a failed translation. */ void _nl_log_untranslated (const char *logfilename, const char *domainname, const char *msgid1, const char *msgid2, int plural) { __libc_lock_lock (lock); _nl_log_untranslated_locked (logfilename, domainname, msgid1, msgid2, plural); __libc_lock_unlock (lock); } ebview-0.3.6.2/intl/printf-args.h0000644000175000017500000000662111241377503016042 0ustar mhattamhatta/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include /* Get wchar_t. */ #if HAVE_WCHAR_T # include #endif /* Get wint_t. */ #if HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; typedef struct { size_t count; argument *arg; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ ebview-0.3.6.2/intl/wprintf-parse.h0000644000175000017500000000426311241377503016407 0ustar mhattamhatta/* Parse printf format string. Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _WPRINTF_PARSE_H #define _WPRINTF_PARSE_H #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* A parsed directive. */ typedef struct { const wchar_t* dir_start; const wchar_t* dir_end; int flags; const wchar_t* width_start; const wchar_t* width_end; size_t width_arg_index; const wchar_t* precision_start; const wchar_t* precision_end; size_t precision_arg_index; wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */ size_t arg_index; } wchar_t_directive; /* A parsed format string. */ typedef struct { size_t count; wchar_t_directive *dir; size_t max_width_length; size_t max_precision_length; } wchar_t_directives; /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #ifdef STATIC STATIC #else extern #endif int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a); #endif /* _WPRINTF_PARSE_H */ ebview-0.3.6.2/intl/vasnwprintf.h0000644000175000017500000000330611241377503016164 0ustar mhattamhatta/* vswprintf with automatic memory allocation. Copyright (C) 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNWPRINTF_H #define _VASNWPRINTF_H /* Get va_list. */ #include /* Get wchar_t, size_t. */ #include #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. */ extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...); extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args); #ifdef __cplusplus } #endif #endif /* _VASNWPRINTF_H */ ebview-0.3.6.2/intl/finddomain.c0000644000175000017500000001367311241377503015716 0ustar mhattamhatta/* Handle list of needed message catalogs Copyright (C) 1995-1999, 2000-2001, 2003-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include # define gl_rwlock_define_initialized __libc_rwlock_define_initialized # define gl_rwlock_rdlock __libc_rwlock_rdlock # define gl_rwlock_wrlock __libc_rwlock_wrlock # define gl_rwlock_unlock __libc_rwlock_unlock #else # include "lock.h" #endif /* @@ end of prolog @@ */ /* List of already loaded domains. */ static struct loaded_l10nfile *_nl_loaded_domains; /* Return a data structure describing the message catalog described by the DOMAINNAME and CATEGORY parameters with respect to the currently established bindings. */ struct loaded_l10nfile * internal_function _nl_find_domain (const char *dirname, char *locale, const char *domainname, struct binding *domainbinding) { struct loaded_l10nfile *retval; const char *language; const char *modifier; const char *territory; const char *codeset; const char *normalized_codeset; const char *alias_value; int mask; /* LOCALE can consist of up to four recognized parts for the XPG syntax: language[_territory][.codeset][@modifier] Beside the first part all of them are allowed to be missing. If the full specified locale is not found, the less specific one are looked for. The various parts will be stripped off according to the following order: (1) codeset (2) normalized codeset (3) territory (4) modifier */ /* We need to protect modifying the _NL_LOADED_DOMAINS data. */ gl_rwlock_define_initialized (static, lock); gl_rwlock_rdlock (lock); /* If we have already tested for this locale entry there has to be one data set in the list of loaded domains. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, 0, locale, NULL, NULL, NULL, NULL, domainname, 0); gl_rwlock_unlock (lock); if (retval != NULL) { /* We know something about this locale. */ int cnt; if (retval->decided <= 0) _nl_load_domain (retval, domainbinding); if (retval->data != NULL) return retval; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided <= 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } return retval; /* NOTREACHED */ } /* See whether the locale value is an alias. If yes its value *overwrites* the alias name. No test for the original value is done. */ alias_value = _nl_expand_alias (locale); if (alias_value != NULL) { #if defined _LIBC || defined HAVE_STRDUP locale = strdup (alias_value); if (locale == NULL) return NULL; #else size_t len = strlen (alias_value) + 1; locale = (char *) malloc (len); if (locale == NULL) return NULL; memcpy (locale, alias_value, len); #endif } /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_', '.', and `@'. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset); if (mask == -1) /* This means we are out of core. */ return NULL; /* We need to protect modifying the _NL_LOADED_DOMAINS data. */ gl_rwlock_wrlock (lock); /* Create all possible locale entries which might be interested in generalization. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, mask, language, territory, codeset, normalized_codeset, modifier, domainname, 1); gl_rwlock_unlock (lock); if (retval == NULL) /* This means we are out of core. */ goto out; if (retval->decided <= 0) _nl_load_domain (retval, domainbinding); if (retval->data == NULL) { int cnt; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided <= 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } } /* The room for an alias was dynamically allocated. Free it now. */ if (alias_value != NULL) free (locale); out: /* The space for normalized_codeset is dynamically allocated. Free it. */ if (mask & XPG_NORM_CODESET) free ((void *) normalized_codeset); return retval; } #ifdef _LIBC /* This is called from iconv/gconv_db.c's free_mem, as locales must be freed before freeing gconv steps arrays. */ void __libc_freeres_fn_section _nl_finddomain_subfreeres () { struct loaded_l10nfile *runp = _nl_loaded_domains; while (runp != NULL) { struct loaded_l10nfile *here = runp; if (runp->data != NULL) _nl_unload_domain ((struct loaded_domain *) runp->data); runp = runp->next; free ((char *) here->filename); free (here); } } #endif ebview-0.3.6.2/intl/plural-exp.h0000644000175000017500000001013111241377503015666 0ustar mhattamhatta/* Expression parsing and evaluation for plural form selection. Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PLURAL_EXP_H #define _PLURAL_EXP_H #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif #ifdef __cplusplus extern "C" { #endif enum expression_operator { /* Without arguments: */ var, /* The variable "n". */ num, /* Decimal number. */ /* Unary operators: */ lnot, /* Logical NOT. */ /* Binary operators: */ mult, /* Multiplication. */ divide, /* Division. */ module, /* Modulo operation. */ plus, /* Addition. */ minus, /* Subtraction. */ less_than, /* Comparison. */ greater_than, /* Comparison. */ less_or_equal, /* Comparison. */ greater_or_equal, /* Comparison. */ equal, /* Comparison for equality. */ not_equal, /* Comparison for inequality. */ land, /* Logical AND. */ lor, /* Logical OR. */ /* Ternary operators: */ qmop /* Question mark operator. */ }; /* This is the representation of the expressions to determine the plural form. */ struct expression { int nargs; /* Number of arguments. */ enum expression_operator operation; union { unsigned long int num; /* Number value for `num'. */ struct expression *args[3]; /* Up to three arguments. */ } val; }; /* This is the data structure to pass information to the parser and get the result in a thread-safe way. */ struct parse_args { const char *cp; struct expression *res; }; /* Names for the libintl functions are a problem. This source code is used 1. in the GNU C Library library, 2. in the GNU libintl library, 3. in the GNU gettext tools. The function names in each situation must be different, to allow for binary incompatible changes in 'struct expression'. Furthermore, 1. in the GNU C Library library, the names have a __ prefix, 2.+3. in the GNU libintl library and in the GNU gettext tools, the names must follow ANSI C and not start with __. So we have to distinguish the three cases. */ #ifdef _LIBC # define FREE_EXPRESSION __gettext_free_exp # define PLURAL_PARSE __gettextparse # define GERMANIC_PLURAL __gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural #elif defined (IN_LIBINTL) # define FREE_EXPRESSION libintl_gettext_free_exp # define PLURAL_PARSE libintl_gettextparse # define GERMANIC_PLURAL libintl_gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural #else # define FREE_EXPRESSION free_plural_expression # define PLURAL_PARSE parse_plural_expression # define GERMANIC_PLURAL germanic_plural # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression #endif extern void FREE_EXPRESSION (struct expression *exp) internal_function; extern int PLURAL_PARSE (void *arg); extern struct expression GERMANIC_PLURAL attribute_hidden; extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, const struct expression **pluralp, unsigned long int *npluralsp) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE) extern unsigned long int plural_eval (const struct expression *pexp, unsigned long int n); #endif #ifdef __cplusplus } #endif #endif /* _PLURAL_EXP_H */ ebview-0.3.6.2/intl/dgettext.c0000644000175000017500000000337111241377503015430 0ustar mhattamhatta/* Implementation of the dgettext(3) function. Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DGETTEXT __dgettext # define DCGETTEXT INTUSE(__dcgettext) #else # define DGETTEXT libintl_dgettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale. */ char * DGETTEXT (const char *domainname, const char *msgid) { return DCGETTEXT (domainname, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dgettext, dgettext); #endif ebview-0.3.6.2/intl/hash-string.c0000644000175000017500000000315111241377503016023 0ustar mhattamhatta/* Implements a string hashing function. Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include "hash-string.h" /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ unsigned long int __hash_string (const char *str_param) { unsigned long int hval, g; const char *str = str_param; /* Compute the hash value for the given string. */ hval = 0; while (*str != '\0') { hval <<= 4; hval += (unsigned char) *str++; g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); if (g != 0) { hval ^= g >> (HASHWORDBITS - 8); hval ^= g; } } return hval; } ebview-0.3.6.2/intl/xsize.h0000644000175000017500000000672611241377503014756 0ustar mhattamhatta/* xsize.h -- Checked size_t computations. Copyright (C) 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider tupe and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ ebview-0.3.6.2/intl/os2compat.c0000644000175000017500000000550711241377503015512 0ustar mhattamhatta/* OS/2 compatibility functions. Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define OS2_AWARE #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* A version of getenv() that works from DLLs */ extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue); char * _nl_getenv (const char *name) { unsigned char *value; if (DosScanEnv (name, &value)) return NULL; else return value; } /* A fixed size buffer. */ char libintl_nl_default_dirname[MAXPATHLEN+1]; char *_nlos2_libdir = NULL; char *_nlos2_localealiaspath = NULL; char *_nlos2_localedir = NULL; static __attribute__((constructor)) void nlos2_initialize () { char *root = getenv ("UNIXROOT"); char *gnulocaledir = getenv ("GNULOCALEDIR"); _nlos2_libdir = gnulocaledir; if (!_nlos2_libdir) { if (root) { size_t sl = strlen (root); _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); memcpy (_nlos2_libdir, root, sl); memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); } else _nlos2_libdir = LIBDIR; } _nlos2_localealiaspath = gnulocaledir; if (!_nlos2_localealiaspath) { if (root) { size_t sl = strlen (root); _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); memcpy (_nlos2_localealiaspath, root, sl); memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); } else _nlos2_localealiaspath = LOCALE_ALIAS_PATH; } _nlos2_localedir = gnulocaledir; if (!_nlos2_localedir) { if (root) { size_t sl = strlen (root); _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); memcpy (_nlos2_localedir, root, sl); memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); } else _nlos2_localedir = LOCALEDIR; } if (strlen (_nlos2_localedir) <= MAXPATHLEN) strcpy (libintl_nl_default_dirname, _nlos2_localedir); } ebview-0.3.6.2/intl/export.h0000644000175000017500000000023511241377503015122 0ustar mhattamhatta #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) #else #define LIBINTL_DLL_EXPORTED #endif ebview-0.3.6.2/intl/libintl.rc0000644000175000017500000000323311241377503015414 0ustar mhattamhatta/* Resources for intl.dll */ #include VS_VERSION_INFO VERSIONINFO FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */ #ifdef _DEBUG FILEFLAGS 0x1L /* VS_FF_DEBUG */ #else FILEFLAGS 0x0L #endif FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */ FILETYPE 0x2L /* VFT_DLL */ FILESUBTYPE 0x0L /* VFT2_UNKNOWN */ BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "04090000" /* Lang = US English, Charset = ASCII */ BEGIN VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\0" VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "LGPLed libintl for Windows NT/2000/XP/Vista and Windows 95/98/ME\0" VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" VALUE "InternalName", "intl.dll\0" VALUE "LegalCopyright", "Copyright (C) 1995-2007\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "intl.dll\0" VALUE "ProductName", "libintl: accessing NLS message catalogs\0" VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 0 /* US English, ASCII */ END END ebview-0.3.6.2/intl/plural.c0000644000175000017500000014212011241377503015073 0ustar mhattamhatta/* A Bison parser, made by GNU Bison 2.3a. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.3a" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse __gettextparse #define yylex __gettextlex #define yyerror __gettexterror #define yylval __gettextlval #define yychar __gettextchar #define yydebug __gettextdebug #define yynerrs __gettextnerrs /* Copy the first part of user declarations. */ /* Line 164 of yacc.c. */ #line 1 "plural.y" /* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* For bison < 2.0, the bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. This can go away once the AM_INTL_SUBDIR macro requires bison >= 2.0. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { EQUOP2 = 258, CMPOP2 = 259, ADDOP2 = 260, MULOP2 = 261, NUMBER = 262 }; #endif /* Tokens. */ #define EQUOP2 258 #define CMPOP2 259 #define ADDOP2 260 #define MULOP2 261 #define NUMBER 262 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE {/* Line 191 of yacc.c. */ #line 51 "plural.y" unsigned long int num; enum expression_operator op; struct expression *exp; } /* Line 191 of yacc.c. */ #line 175 "plural.c" YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 221 of yacc.c. */ #line 57 "plural.y" /* Prototypes for local functions. */ static int yylex (YYSTYPE *lval, const char **pexp); static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * new_exp (int nargs, enum expression_operator op, struct expression * const *args) { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (enum expression_operator op) { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (enum expression_operator op, struct expression *right) { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (enum expression_operator op, struct expression *left, struct expression *right) { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (enum expression_operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } /* Line 221 of yacc.c. */ #line 265 "plural.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 9 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 54 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 16 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 3 /* YYNRULES -- Number of rules. */ #define YYNRULES 13 /* YYNRULES -- Number of states. */ #define YYNSTATES 27 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 262 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 6, 7, 8, 9, 11 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 11, 15, 19, 23, 27, 31, 35, 38, 40, 42 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 17, 0, -1, 18, -1, 18, 3, 18, 12, 18, -1, 18, 4, 18, -1, 18, 5, 18, -1, 18, 6, 18, -1, 18, 7, 18, -1, 18, 8, 18, -1, 18, 9, 18, -1, 10, 18, -1, 13, -1, 11, -1, 14, 18, 15, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 154, 154, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 203 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", "$accept", "start", "exp", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 63, 124, 38, 258, 259, 260, 261, 33, 262, 58, 110, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 5, 3, 3, 3, 3, 3, 3, 2, 1, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 12, 11, 0, 0, 2, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 13, 0, 4, 5, 6, 7, 8, 9, 0, 3 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 5, 6 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -10 static const yytype_int8 yypact[] = { -9, -9, -10, -10, -9, 8, 36, -10, 13, -10, -9, -9, -9, -9, -9, -9, -9, -10, 26, 41, 45, 18, -2, 14, -10, -9, 36 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -10, -10, -1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 7, 1, 2, 8, 3, 4, 15, 16, 9, 18, 19, 20, 21, 22, 23, 24, 10, 11, 12, 13, 14, 15, 16, 16, 26, 14, 15, 16, 17, 10, 11, 12, 13, 14, 15, 16, 0, 0, 25, 10, 11, 12, 13, 14, 15, 16, 12, 13, 14, 15, 16, 13, 14, 15, 16 }; static const yytype_int8 yycheck[] = { 1, 10, 11, 4, 13, 14, 8, 9, 0, 10, 11, 12, 13, 14, 15, 16, 3, 4, 5, 6, 7, 8, 9, 9, 25, 7, 8, 9, 15, 3, 4, 5, 6, 7, 8, 9, -1, -1, 12, 3, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, 7, 8, 9 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 10, 11, 13, 14, 17, 18, 18, 18, 0, 3, 4, 5, 6, 7, 8, 9, 15, 18, 18, 18, 18, 18, 18, 18, 12, 18 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss = yyssa; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1269 of yacc.c. */ #line 155 "plural.y" { if ((yyvsp[(1) - (1)].exp) == NULL) YYABORT; ((struct parse_args *) arg)->res = (yyvsp[(1) - (1)].exp); } break; case 3: /* Line 1269 of yacc.c. */ #line 163 "plural.y" { (yyval.exp) = new_exp_3 (qmop, (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp)); } break; case 4: /* Line 1269 of yacc.c. */ #line 167 "plural.y" { (yyval.exp) = new_exp_2 (lor, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 5: /* Line 1269 of yacc.c. */ #line 171 "plural.y" { (yyval.exp) = new_exp_2 (land, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 6: /* Line 1269 of yacc.c. */ #line 175 "plural.y" { (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 7: /* Line 1269 of yacc.c. */ #line 179 "plural.y" { (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 8: /* Line 1269 of yacc.c. */ #line 183 "plural.y" { (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 9: /* Line 1269 of yacc.c. */ #line 187 "plural.y" { (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp)); } break; case 10: /* Line 1269 of yacc.c. */ #line 191 "plural.y" { (yyval.exp) = new_exp_1 (lnot, (yyvsp[(2) - (2)].exp)); } break; case 11: /* Line 1269 of yacc.c. */ #line 195 "plural.y" { (yyval.exp) = new_exp_0 (var); } break; case 12: /* Line 1269 of yacc.c. */ #line 199 "plural.y" { if (((yyval.exp) = new_exp_0 (num)) != NULL) (yyval.exp)->val.num = (yyvsp[(1) - (1)].num); } break; case 13: /* Line 1269 of yacc.c. */ #line 204 "plural.y" { (yyval.exp) = (yyvsp[(2) - (3)].exp); } break; /* Line 1269 of yacc.c. */ #line 1572 "plural.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1486 of yacc.c. */ #line 209 "plural.y" void internal_function FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } ebview-0.3.6.2/intl/libgnuintl.h.in0000644000175000017500000003415311241377503016363 0ustar mhattamhatta/* Message catalogs for internationalization. Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 #include /* The LC_MESSAGES locale category is the category used by the functions gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. On systems that don't define it, use an arbitrary value instead. On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) then includes (i.e. this file!) and then only defines LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES in this case. */ #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) # define LC_MESSAGES 1729 #endif /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1 /* Provide information about the supported file formats. Returns the maximum minor revision number supported for a given major revision. */ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ((major) == 0 || (major) == 1 ? 1 : -1) /* Resolve a platform specific conflict on DJGPP. GNU gettext takes precedence over _conio_gettext. */ #ifdef __DJGPP__ # undef gettext #endif #ifdef __cplusplus extern "C" { #endif /* Version number: (major<<16) + (minor<<8) + subminor */ #define LIBINTL_VERSION 0x001100 extern int libintl_version; /* We redirect the functions to those prefixed with "libintl_". This is necessary, because some systems define gettext/textdomain/... in the C library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). If we used the unprefixed names, there would be cases where the definition in the C library would override the one in the libintl.so shared library. Recall that on ELF systems, the symbols are looked up in the following order: 1. in the executable, 2. in the shared libraries specified on the link command line, in order, 3. in the dependencies of the shared libraries specified on the link command line, 4. in the dlopen()ed shared libraries, in the order in which they were dlopen()ed. The definition in the C library would override the one in libintl.so if either * -lc is given on the link command line and -lintl isn't, or * -lc is given on the link command line before -lintl, or * libintl.so is a dependency of a dlopen()ed shared library but not linked to the executable at link time. Since Solaris gettext() behaves differently than GNU gettext(), this would be unacceptable. The redirection happens by default through macros in C, so that &gettext is independent of the compilation unit, but through inline functions in C++, in order not to interfere with the name mangling of class fields or class methods called 'gettext'. */ /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. If he doesn't, we choose the method. A third possible method is _INTL_REDIRECT_ASM, supported only by GCC. */ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) # if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) # define _INTL_REDIRECT_ASM # else # ifdef __cplusplus # define _INTL_REDIRECT_INLINE # else # define _INTL_REDIRECT_MACROS # endif # endif #endif /* Auxiliary macros. */ #ifdef _INTL_REDIRECT_ASM # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring # define _INTL_STRINGIFY(prefix) #prefix #else # define _INTL_ASM(cname) #endif /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return its n-th argument literally. This enables GCC to warn for example about printf (gettext ("foo %y")). */ #if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) #else # define _INTL_MAY_RETURN_STRING_ARG(n) #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_gettext (const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (1); static inline char *gettext (const char *__msgid) { return libintl_gettext (__msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define gettext libintl_gettext #endif extern char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext) _INTL_MAY_RETURN_STRING_ARG (1); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dgettext (const char *__domainname, const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *dgettext (const char *__domainname, const char *__msgid) { return libintl_dgettext (__domainname, __msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define dgettext libintl_dgettext #endif extern char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *dcgettext (const char *__domainname, const char *__msgid, int __category) { return libintl_dcgettext (__domainname, __msgid, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcgettext libintl_dcgettext #endif extern char *dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_ASM (libintl_dcgettext) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_ngettext (__msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define ngettext libintl_ngettext #endif extern char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_ngettext) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Similar to `dgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); static inline char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define dngettext libintl_dngettext #endif extern char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_dngettext) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); #endif /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); static inline char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) { return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcngettext libintl_dcngettext #endif extern char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_ASM (libintl_dcngettext) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); #endif #ifndef IN_LIBGLOCALE /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } #else #ifdef _INTL_REDIRECT_MACROS # define textdomain libintl_textdomain #endif extern char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); #endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, const char *__dirname) { return libintl_bindtextdomain (__domainname, __dirname); } #else #ifdef _INTL_REDIRECT_MACROS # define bindtextdomain libintl_bindtextdomain #endif extern char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); #endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) { return libintl_bind_textdomain_codeset (__domainname, __codeset); } #else #ifdef _INTL_REDIRECT_MACROS # define bind_textdomain_codeset libintl_bind_textdomain_codeset #endif extern char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); #endif #endif /* IN_LIBGLOCALE */ /* Support for format strings with positions in *printf(), following the POSIX/XSI specification. Note: These replacements for the *printf() functions are visible only in source files that #include or #include "gettext.h". Packages that use *printf() in source files that don't refer to _() or gettext() but for which the format string could be the return value of _() or gettext() need to add this #include. Oh well. */ #if !@HAVE_POSIX_PRINTF@ #include #include /* Get va_list. */ #if __STDC__ || defined __cplusplus || defined _MSC_VER # include #else # include #endif #undef fprintf #define fprintf libintl_fprintf extern int fprintf (FILE *, const char *, ...); #undef vfprintf #define vfprintf libintl_vfprintf extern int vfprintf (FILE *, const char *, va_list); #undef printf #if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ /* Don't break __attribute__((format(printf,M,N))). This redefinition is only possible because the libc in NetBSD, Cygwin, mingw does not have a function __printf__. */ # define libintl_printf __printf__ #endif #define printf libintl_printf extern int printf (const char *, ...); #undef vprintf #define vprintf libintl_vprintf extern int vprintf (const char *, va_list); #undef sprintf #define sprintf libintl_sprintf extern int sprintf (char *, const char *, ...); #undef vsprintf #define vsprintf libintl_vsprintf extern int vsprintf (char *, const char *, va_list); #if @HAVE_SNPRINTF@ #undef snprintf #define snprintf libintl_snprintf extern int snprintf (char *, size_t, const char *, ...); #undef vsnprintf #define vsnprintf libintl_vsnprintf extern int vsnprintf (char *, size_t, const char *, va_list); #endif #if @HAVE_ASPRINTF@ #undef asprintf #define asprintf libintl_asprintf extern int asprintf (char **, const char *, ...); #undef vasprintf #define vasprintf libintl_vasprintf extern int vasprintf (char **, const char *, va_list); #endif #if @HAVE_WPRINTF@ #undef fwprintf #define fwprintf libintl_fwprintf extern int fwprintf (FILE *, const wchar_t *, ...); #undef vfwprintf #define vfwprintf libintl_vfwprintf extern int vfwprintf (FILE *, const wchar_t *, va_list); #undef wprintf #define wprintf libintl_wprintf extern int wprintf (const wchar_t *, ...); #undef vwprintf #define vwprintf libintl_vwprintf extern int vwprintf (const wchar_t *, va_list); #undef swprintf #define swprintf libintl_swprintf extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); #undef vswprintf #define vswprintf libintl_vswprintf extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); #endif #endif /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ #define libintl_set_relocation_prefix libintl_set_relocation_prefix extern void libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); #ifdef __cplusplus } #endif #endif /* libintl.h */ ebview-0.3.6.2/intl/version.c0000644000175000017500000000173111241377503015263 0ustar mhattamhatta/* libintl library version. Copyright (C) 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "libgnuintl.h" /* Version number: (major<<16) + (minor<<8) + subminor */ int libintl_version = LIBINTL_VERSION; ebview-0.3.6.2/intl/lock.h0000644000175000017500000012735611241377503014547 0ustar mhattamhatta/* Locking in multithreaded situations. Copyright (C) 2005-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains locking primitives for use with a given thread library. It does not contain primitives for creating threads or for other synchronization primitives. Normal (non-recursive) locks: Type: gl_lock_t Declaration: gl_lock_define(extern, name) Initializer: gl_lock_define_initialized(, name) Initialization: gl_lock_init (name); Taking the lock: gl_lock_lock (name); Releasing the lock: gl_lock_unlock (name); De-initialization: gl_lock_destroy (name); Read-Write (non-recursive) locks: Type: gl_rwlock_t Declaration: gl_rwlock_define(extern, name) Initializer: gl_rwlock_define_initialized(, name) Initialization: gl_rwlock_init (name); Taking the lock: gl_rwlock_rdlock (name); gl_rwlock_wrlock (name); Releasing the lock: gl_rwlock_unlock (name); De-initialization: gl_rwlock_destroy (name); Recursive locks: Type: gl_recursive_lock_t Declaration: gl_recursive_lock_define(extern, name) Initializer: gl_recursive_lock_define_initialized(, name) Initialization: gl_recursive_lock_init (name); Taking the lock: gl_recursive_lock_lock (name); Releasing the lock: gl_recursive_lock_unlock (name); De-initialization: gl_recursive_lock_destroy (name); Once-only execution: Type: gl_once_t Initializer: gl_once_define(extern, name) Execution: gl_once (name, initfunction); */ #ifndef _LOCK_H #define _LOCK_H /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_mutex_init # pragma weak pthread_mutex_lock # pragma weak pthread_mutex_unlock # pragma weak pthread_mutex_destroy # pragma weak pthread_rwlock_init # pragma weak pthread_rwlock_rdlock # pragma weak pthread_rwlock_wrlock # pragma weak pthread_rwlock_unlock # pragma weak pthread_rwlock_destroy # pragma weak pthread_once # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # pragma weak pthread_mutexattr_init # pragma weak pthread_mutexattr_settype # pragma weak pthread_mutexattr_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pthread_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTHREAD_MUTEX_INITIALIZER # define gl_lock_init(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_init (&NAME, NULL) != 0) \ abort (); \ } \ while (0) # define gl_lock_lock(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_lock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_lock_unlock(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_unlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_lock_destroy(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_destroy (&NAME) != 0) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # ifdef PTHREAD_RWLOCK_INITIALIZER typedef pthread_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTHREAD_RWLOCK_INITIALIZER # define gl_rwlock_init(NAME) \ do \ { \ if (pthread_in_use () && pthread_rwlock_init (&NAME, NULL) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_rdlock(NAME) \ do \ { \ if (pthread_in_use () && pthread_rwlock_rdlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_wrlock(NAME) \ do \ { \ if (pthread_in_use () && pthread_rwlock_wrlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_unlock(NAME) \ do \ { \ if (pthread_in_use () && pthread_rwlock_unlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_destroy(NAME) \ do \ { \ if (pthread_in_use () && pthread_rwlock_destroy (&NAME) != 0) \ abort (); \ } \ while (0) # else typedef struct { int initialized; pthread_mutex_t guard; /* protects the initialization */ pthread_rwlock_t rwlock; /* read-write lock */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0, PTHREAD_MUTEX_INITIALIZER } # define gl_rwlock_init(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_init (&NAME); \ } \ while (0) # define gl_rwlock_rdlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_rdlock (&NAME); \ } \ while (0) # define gl_rwlock_wrlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_wrlock (&NAME); \ } \ while (0) # define gl_rwlock_unlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_unlock (&NAME); \ } \ while (0) # define gl_rwlock_destroy(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_destroy (&NAME); \ } \ while (0) extern void glthread_rwlock_init (gl_rwlock_t *lock); extern void glthread_rwlock_rdlock (gl_rwlock_t *lock); extern void glthread_rwlock_wrlock (gl_rwlock_t *lock); extern void glthread_rwlock_unlock (gl_rwlock_t *lock); extern void glthread_rwlock_destroy (gl_rwlock_t *lock); # endif # else typedef struct { pthread_mutex_t lock; /* protects the remaining fields */ pthread_cond_t waiting_readers; /* waiting readers */ pthread_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } # define gl_rwlock_init(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_init (&NAME); \ } \ while (0) # define gl_rwlock_rdlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_rdlock (&NAME); \ } \ while (0) # define gl_rwlock_wrlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_wrlock (&NAME); \ } \ while (0) # define gl_rwlock_unlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_unlock (&NAME); \ } \ while (0) # define gl_rwlock_destroy(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_rwlock_destroy (&NAME); \ } \ while (0) extern void glthread_rwlock_init (gl_rwlock_t *lock); extern void glthread_rwlock_rdlock (gl_rwlock_t *lock); extern void glthread_rwlock_wrlock (gl_rwlock_t *lock); extern void glthread_rwlock_unlock (gl_rwlock_t *lock); extern void glthread_rwlock_destroy (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP typedef pthread_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; # ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER # else # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # endif # define gl_recursive_lock_init(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_init (&NAME, NULL) != 0) \ abort (); \ } \ while (0) # define gl_recursive_lock_lock(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_lock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_recursive_lock_unlock(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_unlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_recursive_lock_destroy(NAME) \ do \ { \ if (pthread_in_use () && pthread_mutex_destroy (&NAME) != 0) \ abort (); \ } \ while (0) # else typedef struct { pthread_mutex_t recmutex; /* recursive mutex */ pthread_mutex_t guard; /* protects the initialization */ int initialized; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } # define gl_recursive_lock_init(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_init (&NAME); \ } \ while (0) # define gl_recursive_lock_lock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_lock (&NAME); \ } \ while (0) # define gl_recursive_lock_unlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_unlock (&NAME); \ } \ while (0) # define gl_recursive_lock_destroy(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_destroy (&NAME); \ } \ while (0) extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock); # endif # else /* Old versions of POSIX threads on Solaris did not have recursive locks. We have to implement them ourselves. */ typedef struct { pthread_mutex_t mutex; pthread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } # define gl_recursive_lock_init(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_init (&NAME); \ } \ while (0) # define gl_recursive_lock_lock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_lock (&NAME); \ } \ while (0) # define gl_recursive_lock_unlock(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_unlock (&NAME); \ } \ while (0) # define gl_recursive_lock_destroy(NAME) \ do \ { \ if (pthread_in_use ()) \ glthread_recursive_lock_destroy (&NAME); \ } \ while (0) extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock); # endif /* -------------------------- gl_once_t datatype -------------------------- */ typedef pthread_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; # define gl_once(NAME, INITFUNCTION) \ do \ { \ if (pthread_in_use ()) \ { \ if (pthread_once (&NAME, INITFUNCTION) != 0) \ abort (); \ } \ else \ { \ if (glthread_once_singlethreaded (&NAME)) \ INITFUNCTION (); \ } \ } \ while (0) extern int glthread_once_singlethreaded (pthread_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_mutex_init # pragma weak pth_mutex_acquire # pragma weak pth_mutex_release # pragma weak pth_rwlock_init # pragma weak pth_rwlock_acquire # pragma weak pth_rwlock_release # pragma weak pth_once # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pth_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTH_MUTEX_INIT # define gl_lock_init(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_init (&NAME)) \ abort (); \ } \ while (0) # define gl_lock_lock(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_acquire (&NAME, 0, NULL)) \ abort (); \ } \ while (0) # define gl_lock_unlock(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_release (&NAME)) \ abort (); \ } \ while (0) # define gl_lock_destroy(NAME) \ (void)(&NAME) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef pth_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTH_RWLOCK_INIT # define gl_rwlock_init(NAME) \ do \ { \ if (pth_in_use() && !pth_rwlock_init (&NAME)) \ abort (); \ } \ while (0) # define gl_rwlock_rdlock(NAME) \ do \ { \ if (pth_in_use() \ && !pth_rwlock_acquire (&NAME, PTH_RWLOCK_RD, 0, NULL)) \ abort (); \ } \ while (0) # define gl_rwlock_wrlock(NAME) \ do \ { \ if (pth_in_use() \ && !pth_rwlock_acquire (&NAME, PTH_RWLOCK_RW, 0, NULL)) \ abort (); \ } \ while (0) # define gl_rwlock_unlock(NAME) \ do \ { \ if (pth_in_use() && !pth_rwlock_release (&NAME)) \ abort (); \ } \ while (0) # define gl_rwlock_destroy(NAME) \ (void)(&NAME) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* In Pth, mutexes are recursive by default. */ typedef pth_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ PTH_MUTEX_INIT # define gl_recursive_lock_init(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_init (&NAME)) \ abort (); \ } \ while (0) # define gl_recursive_lock_lock(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_acquire (&NAME, 0, NULL)) \ abort (); \ } \ while (0) # define gl_recursive_lock_unlock(NAME) \ do \ { \ if (pth_in_use() && !pth_mutex_release (&NAME)) \ abort (); \ } \ while (0) # define gl_recursive_lock_destroy(NAME) \ (void)(&NAME) /* -------------------------- gl_once_t datatype -------------------------- */ typedef pth_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; # define gl_once(NAME, INITFUNCTION) \ do \ { \ if (pth_in_use ()) \ { \ void (*gl_once_temp) (void) = INITFUNCTION; \ if (!pth_once (&NAME, glthread_once_call, &gl_once_temp)) \ abort (); \ } \ else \ { \ if (glthread_once_singlethreaded (&NAME)) \ INITFUNCTION (); \ } \ } \ while (0) extern void glthread_once_call (void *arg); extern int glthread_once_singlethreaded (pth_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak mutex_init # pragma weak mutex_lock # pragma weak mutex_unlock # pragma weak mutex_destroy # pragma weak rwlock_init # pragma weak rw_rdlock # pragma weak rw_wrlock # pragma weak rw_unlock # pragma weak rwlock_destroy # pragma weak thr_self # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ DEFAULTMUTEX # define gl_lock_init(NAME) \ do \ { \ if (thread_in_use () && mutex_init (&NAME, USYNC_THREAD, NULL) != 0) \ abort (); \ } \ while (0) # define gl_lock_lock(NAME) \ do \ { \ if (thread_in_use () && mutex_lock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_lock_unlock(NAME) \ do \ { \ if (thread_in_use () && mutex_unlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_lock_destroy(NAME) \ do \ { \ if (thread_in_use () && mutex_destroy (&NAME) != 0) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ DEFAULTRWLOCK # define gl_rwlock_init(NAME) \ do \ { \ if (thread_in_use () && rwlock_init (&NAME, USYNC_THREAD, NULL) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_rdlock(NAME) \ do \ { \ if (thread_in_use () && rw_rdlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_wrlock(NAME) \ do \ { \ if (thread_in_use () && rw_wrlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_unlock(NAME) \ do \ { \ if (thread_in_use () && rw_unlock (&NAME) != 0) \ abort (); \ } \ while (0) # define gl_rwlock_destroy(NAME) \ do \ { \ if (thread_in_use () && rwlock_destroy (&NAME) != 0) \ abort (); \ } \ while (0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* Old Solaris threads did not have recursive locks. We have to implement them ourselves. */ typedef struct { mutex_t mutex; thread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { DEFAULTMUTEX, (thread_t) 0, 0 } # define gl_recursive_lock_init(NAME) \ do \ { \ if (thread_in_use ()) \ glthread_recursive_lock_init (&NAME); \ } \ while (0) # define gl_recursive_lock_lock(NAME) \ do \ { \ if (thread_in_use ()) \ glthread_recursive_lock_lock (&NAME); \ } \ while (0) # define gl_recursive_lock_unlock(NAME) \ do \ { \ if (thread_in_use ()) \ glthread_recursive_lock_unlock (&NAME); \ } \ while (0) # define gl_recursive_lock_destroy(NAME) \ do \ { \ if (thread_in_use ()) \ glthread_recursive_lock_destroy (&NAME); \ } \ while (0) extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; mutex_t mutex; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; # define gl_once(NAME, INITFUNCTION) \ do \ { \ if (thread_in_use ()) \ { \ glthread_once (&NAME, INITFUNCTION); \ } \ else \ { \ if (glthread_once_singlethreaded (&NAME)) \ INITFUNCTION (); \ } \ } \ while (0) extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection does not work on Windows 95/98/ME. Packages that need trylock usually define their own mutex type.) */ /* There is no way to statically initialize a CRITICAL_SECTION. It needs to be done lazily, once only. For this we need spinlocks. */ typedef struct { volatile int done; volatile long started; } gl_spinlock_t; /* -------------------------- gl_lock_t datatype -------------------------- */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; } gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME = gl_lock_initializer; # define gl_lock_initializer \ { { 0, -1 } } # define gl_lock_init(NAME) \ glthread_lock_init (&NAME) # define gl_lock_lock(NAME) \ glthread_lock_lock (&NAME) # define gl_lock_unlock(NAME) \ glthread_lock_unlock (&NAME) # define gl_lock_destroy(NAME) \ glthread_lock_destroy (&NAME) extern void glthread_lock_init (gl_lock_t *lock); extern void glthread_lock_lock (gl_lock_t *lock); extern void glthread_lock_unlock (gl_lock_t *lock); extern void glthread_lock_destroy (gl_lock_t *lock); /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* It is impossible to implement read-write locks using plain locks, without introducing an extra thread dedicated to managing read-write locks. Therefore here we need to use the low-level Event type. */ typedef struct { HANDLE *array; /* array of waiting threads, each represented by an event */ unsigned int count; /* number of waiting threads */ unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } gl_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_waitqueue_t waiting_readers; /* waiting readers */ gl_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { { 0, -1 } } # define gl_rwlock_init(NAME) \ glthread_rwlock_init (&NAME) # define gl_rwlock_rdlock(NAME) \ glthread_rwlock_rdlock (&NAME) # define gl_rwlock_wrlock(NAME) \ glthread_rwlock_wrlock (&NAME) # define gl_rwlock_unlock(NAME) \ glthread_rwlock_unlock (&NAME) # define gl_rwlock_destroy(NAME) \ glthread_rwlock_destroy (&NAME) extern void glthread_rwlock_init (gl_rwlock_t *lock); extern void glthread_rwlock_rdlock (gl_rwlock_t *lock); extern void glthread_rwlock_wrlock (gl_rwlock_t *lock); extern void glthread_rwlock_unlock (gl_rwlock_t *lock); extern void glthread_rwlock_destroy (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* The Win32 documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ DWORD owner; unsigned long depth; CRITICAL_SECTION lock; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { { 0, -1 }, 0, 0 } # define gl_recursive_lock_init(NAME) \ glthread_recursive_lock_init (&NAME) # define gl_recursive_lock_lock(NAME) \ glthread_recursive_lock_lock (&NAME) # define gl_recursive_lock_unlock(NAME) \ glthread_recursive_lock_unlock (&NAME) # define gl_recursive_lock_destroy(NAME) \ glthread_recursive_lock_destroy (&NAME) extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock); extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; volatile long started; CRITICAL_SECTION lock; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { -1, -1 }; # define gl_once(NAME, INITFUNCTION) \ glthread_once (&NAME, INITFUNCTION) extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void)); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ /* -------------------------- gl_lock_t datatype -------------------------- */ typedef int gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) # define gl_lock_define_initialized(STORAGECLASS, NAME) # define gl_lock_init(NAME) # define gl_lock_lock(NAME) # define gl_lock_unlock(NAME) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef int gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) # define gl_rwlock_define_initialized(STORAGECLASS, NAME) # define gl_rwlock_init(NAME) # define gl_rwlock_rdlock(NAME) # define gl_rwlock_wrlock(NAME) # define gl_rwlock_unlock(NAME) /* --------------------- gl_recursive_lock_t datatype --------------------- */ typedef int gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) # define gl_recursive_lock_init(NAME) # define gl_recursive_lock_lock(NAME) # define gl_recursive_lock_unlock(NAME) /* -------------------------- gl_once_t datatype -------------------------- */ typedef int gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = 0; # define gl_once(NAME, INITFUNCTION) \ do \ { \ if (NAME == 0) \ { \ NAME = ~ 0; \ INITFUNCTION (); \ } \ } \ while (0) #endif /* ========================================================================= */ #endif /* _LOCK_H */ ebview-0.3.6.2/intl/COPYING.LIB-2.00000644000175000017500000006131311241377503015371 0ustar mhattamhatta GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ebview-0.3.6.2/intl/localcharset.c0000644000175000017500000003031411241377503016241 0ustar mhattamhatta/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # define OS2 #endif #if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) FILE *fp; const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ cp = ""; else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; if (old_res_ptr != NULL) free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } if (file_name != NULL) free (file_name); #else # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". As long as this is not fixed, return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } ebview-0.3.6.2/intl/relocatable.h0000644000175000017500000000543211241377503016062 0ustar mhattamhatta/* Provide relocatable packages. Copyright (C) 2003, 2005 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H #ifdef __cplusplus extern "C" { #endif /* This can be enabled through the configure --enable-relocatable option. */ #if ENABLE_RELOCATABLE /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED #endif /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern RELOCATABLE_DLL_EXPORTED void set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); /* Returns the pathname, relocated according to the current installation directory. */ extern const char * relocate (const char *pathname); /* Memory management: relocate() leaks memory, because it has to construct a fresh pathname. If this is a problem because your program calls relocate() frequently, think about caching the result. */ /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns NULL upon failure. */ extern const char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname); #else /* By default, we use the hardwired pathnames. */ #define relocate(pathname) (pathname) #endif #ifdef __cplusplus } #endif #endif /* _RELOCATABLE_H */ ebview-0.3.6.2/intl/hash-string.h0000644000175000017500000000256611241377503016041 0ustar mhattamhatta/* Description of GNU message catalog format: string hashing function. Copyright (C) 1995, 1997-1998, 2000-2003, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* @@ end of prolog @@ */ /* We assume to have `unsigned long int' value with at least 32 bits. */ #define HASHWORDBITS 32 #ifndef _LIBC # ifdef IN_LIBINTL # define __hash_string libintl_hash_string # else # define __hash_string hash_string # endif #endif /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ extern unsigned long int __hash_string (const char *str_param); ebview-0.3.6.2/intl/vasnprintf.c0000644000175000017500000035070311241377503015776 0ustar mhattamhatta/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include # include "isnan.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include # include "isnan.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif /* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ #ifndef EOVERFLOW # define EOVERFLOW E2BIG #endif #if HAVE_WCHAR_T # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the _snwprintf() function instead. */ # define SNPRINTF _snwprintf # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ # /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char () { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems, but is not required to be multithread- safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && __GLIBC__ point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnan (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x), but does not require libm. */ static int is_infinitel (long double x) { return isnanl (x) || (x + x == x && x != 0.0L); } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1]; typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1]; /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(hightest bit in b[n-1]), 0<=s=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0L)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e; mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e; mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log(1-z) = - z - z^2/2 - z^3/3 - z^4/4 - ... Four terms are enough to get an approximation with error < 10^-7. */ l -= z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log(1-z) = - z - z^2/2 - z^3/3 - z^4/4 - ... Four terms are enough to get an approximation with error < 10^-7. */ l -= z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ free (d.dir); \ if (a.arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = (unsigned char) *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ if (u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, &converted, &converted_len) < 0) # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); if (converted == NULL) # endif { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ if (u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, &converted, &converted_len) < 0) # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); if (converted == NULL) # endif { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ if (u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, &converted, &converted_len) < 0) # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); if (converted == NULL) # endif { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnan (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. */ && is_infinitel (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. */ if (!has_precision) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnan (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnan (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; size_t width; #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2]; #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ { switch (dp->conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { tmp_length = local_wcslen (a.arg[dp->arg_index].a.a_wide_string); # if !WIDE_CHAR_VERSION tmp_length = xtimes (tmp_length, MB_CUR_MAX); # endif } else # endif tmp_length = strlen (a.arg[dp->arg_index].a.a_string); break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ } if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; /*FALLTHROUGH*/ # endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's returns value conforms to ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Prepare checking whether snprintf returns the count via %n. */ ENSURE_ALLOCATION (xsum (length, 1)); *(TCHAR_T *) (result + length) = '\0'; #endif for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. */ size_t bigger_need = xsum (xtimes (allocated, 2), 12); ENSURE_ALLOCATION (bigger_need); continue; } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EINVAL; return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least count * sizeof (TCHAR_T) bytes. But allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !DCHAR_IS_TCHAR # if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); # endif /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ typedef int TCHAR_T_verify [2 * (sizeof (TCHAR_T) == 1) - 1]; # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = NULL; tmpdst_len = 0; if (DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, &tmpdst, &tmpdst_len) < 0) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = (unsigned char) *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; # if USE_SNPRINTF /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); length += count; ENSURE_ALLOCATION (n); length -= count; } /* Here count + pad <= allocated - length. */ # endif { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; # if NEED_PRINTF_FLAG_ZERO DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } # endif /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } # if NEED_PRINTF_FLAG_ZERO else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } # endif else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF ebview-0.3.6.2/intl/config.charset0000755000175000017500000004702611241377503016264 0ustar mhattamhatta#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin # ISO-8859-3 Y glibc solaris # ISO-8859-4 Y osf solaris freebsd netbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin # ISO-8859-6 Y glibc aix hpux solaris # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd darwin # ISO-8859-8 Y glibc aix hpux osf solaris # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin # ISO-8859-13 glibc netbsd darwin # ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd darwin # KOI8-R Y glibc solaris freebsd netbsd darwin # KOI8-U Y glibc freebsd netbsd darwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix woe32 dos # CP943 aix # CP949 osf woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1250 woe32 # CP1251 glibc solaris netbsd darwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin # BIG5-HKSCS glibc solaris # GBK glibc aix osf solaris woe32 dos # GB18030 glibc solaris netbsd # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII Y glibc # TCVN5712-1 glibc # GEORGIAN-PS glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but it is useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. echo "* UTF-8" ;; beos*) # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac ebview-0.3.6.2/intl/localename.c0000644000175000017500000012457111241377503015706 0ustar mhattamhatta/* Determine name of the currently selected locale. Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Ulrich Drepper , 1995. */ /* Win32 code written by Tor Lillqvist . */ /* MacOS X code written by Bruno Haible . */ #include /* Specification. */ #ifdef IN_LIBINTL # include "gettextP.h" #else # include "localename.h" #endif #include #include #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE # include # include # if HAVE_CFLOCALECOPYCURRENT # include # elif HAVE_CFPREFERENCESCOPYAPPVALUE # include # endif #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #ifdef WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include /* List of language codes, sorted by value: 0x01 LANG_ARABIC 0x02 LANG_BULGARIAN 0x03 LANG_CATALAN 0x04 LANG_CHINESE 0x05 LANG_CZECH 0x06 LANG_DANISH 0x07 LANG_GERMAN 0x08 LANG_GREEK 0x09 LANG_ENGLISH 0x0a LANG_SPANISH 0x0b LANG_FINNISH 0x0c LANG_FRENCH 0x0d LANG_HEBREW 0x0e LANG_HUNGARIAN 0x0f LANG_ICELANDIC 0x10 LANG_ITALIAN 0x11 LANG_JAPANESE 0x12 LANG_KOREAN 0x13 LANG_DUTCH 0x14 LANG_NORWEGIAN 0x15 LANG_POLISH 0x16 LANG_PORTUGUESE 0x17 LANG_RHAETO_ROMANCE 0x18 LANG_ROMANIAN 0x19 LANG_RUSSIAN 0x1a LANG_CROATIAN == LANG_SERBIAN 0x1b LANG_SLOVAK 0x1c LANG_ALBANIAN 0x1d LANG_SWEDISH 0x1e LANG_THAI 0x1f LANG_TURKISH 0x20 LANG_URDU 0x21 LANG_INDONESIAN 0x22 LANG_UKRAINIAN 0x23 LANG_BELARUSIAN 0x24 LANG_SLOVENIAN 0x25 LANG_ESTONIAN 0x26 LANG_LATVIAN 0x27 LANG_LITHUANIAN 0x28 LANG_TAJIK 0x29 LANG_FARSI 0x2a LANG_VIETNAMESE 0x2b LANG_ARMENIAN 0x2c LANG_AZERI 0x2d LANG_BASQUE 0x2e LANG_SORBIAN 0x2f LANG_MACEDONIAN 0x30 LANG_SUTU 0x31 LANG_TSONGA 0x32 LANG_TSWANA 0x33 LANG_VENDA 0x34 LANG_XHOSA 0x35 LANG_ZULU 0x36 LANG_AFRIKAANS 0x37 LANG_GEORGIAN 0x38 LANG_FAEROESE 0x39 LANG_HINDI 0x3a LANG_MALTESE 0x3b LANG_SAAMI 0x3c LANG_GAELIC 0x3d LANG_YIDDISH 0x3e LANG_MALAY 0x3f LANG_KAZAK 0x40 LANG_KYRGYZ 0x41 LANG_SWAHILI 0x42 LANG_TURKMEN 0x43 LANG_UZBEK 0x44 LANG_TATAR 0x45 LANG_BENGALI 0x46 LANG_PUNJABI 0x47 LANG_GUJARATI 0x48 LANG_ORIYA 0x49 LANG_TAMIL 0x4a LANG_TELUGU 0x4b LANG_KANNADA 0x4c LANG_MALAYALAM 0x4d LANG_ASSAMESE 0x4e LANG_MARATHI 0x4f LANG_SANSKRIT 0x50 LANG_MONGOLIAN 0x51 LANG_TIBETAN 0x52 LANG_WELSH 0x53 LANG_CAMBODIAN 0x54 LANG_LAO 0x55 LANG_BURMESE 0x56 LANG_GALICIAN 0x57 LANG_KONKANI 0x58 LANG_MANIPURI 0x59 LANG_SINDHI 0x5a LANG_SYRIAC 0x5b LANG_SINHALESE 0x5c LANG_CHEROKEE 0x5d LANG_INUKTITUT 0x5e LANG_AMHARIC 0x5f LANG_TAMAZIGHT 0x60 LANG_KASHMIRI 0x61 LANG_NEPALI 0x62 LANG_FRISIAN 0x63 LANG_PASHTO 0x64 LANG_TAGALOG 0x65 LANG_DIVEHI 0x66 LANG_EDO 0x67 LANG_FULFULDE 0x68 LANG_HAUSA 0x69 LANG_IBIBIO 0x6a LANG_YORUBA 0x70 LANG_IGBO 0x71 LANG_KANURI 0x72 LANG_OROMO 0x73 LANG_TIGRINYA 0x74 LANG_GUARANI 0x75 LANG_HAWAIIAN 0x76 LANG_LATIN 0x77 LANG_SOMALI 0x78 LANG_YI 0x79 LANG_PAPIAMENTU */ /* Mingw headers don't have latest language and sublanguage codes. */ # ifndef LANG_AFRIKAANS # define LANG_AFRIKAANS 0x36 # endif # ifndef LANG_ALBANIAN # define LANG_ALBANIAN 0x1c # endif # ifndef LANG_AMHARIC # define LANG_AMHARIC 0x5e # endif # ifndef LANG_ARABIC # define LANG_ARABIC 0x01 # endif # ifndef LANG_ARMENIAN # define LANG_ARMENIAN 0x2b # endif # ifndef LANG_ASSAMESE # define LANG_ASSAMESE 0x4d # endif # ifndef LANG_AZERI # define LANG_AZERI 0x2c # endif # ifndef LANG_BASQUE # define LANG_BASQUE 0x2d # endif # ifndef LANG_BELARUSIAN # define LANG_BELARUSIAN 0x23 # endif # ifndef LANG_BENGALI # define LANG_BENGALI 0x45 # endif # ifndef LANG_BURMESE # define LANG_BURMESE 0x55 # endif # ifndef LANG_CAMBODIAN # define LANG_CAMBODIAN 0x53 # endif # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif # ifndef LANG_CHEROKEE # define LANG_CHEROKEE 0x5c # endif # ifndef LANG_DIVEHI # define LANG_DIVEHI 0x65 # endif # ifndef LANG_EDO # define LANG_EDO 0x66 # endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif # ifndef LANG_FAEROESE # define LANG_FAEROESE 0x38 # endif # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif # ifndef LANG_FRISIAN # define LANG_FRISIAN 0x62 # endif # ifndef LANG_FULFULDE # define LANG_FULFULDE 0x67 # endif # ifndef LANG_GAELIC # define LANG_GAELIC 0x3c # endif # ifndef LANG_GALICIAN # define LANG_GALICIAN 0x56 # endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif # ifndef LANG_GUARANI # define LANG_GUARANI 0x74 # endif # ifndef LANG_GUJARATI # define LANG_GUJARATI 0x47 # endif # ifndef LANG_HAUSA # define LANG_HAUSA 0x68 # endif # ifndef LANG_HAWAIIAN # define LANG_HAWAIIAN 0x75 # endif # ifndef LANG_HEBREW # define LANG_HEBREW 0x0d # endif # ifndef LANG_HINDI # define LANG_HINDI 0x39 # endif # ifndef LANG_IBIBIO # define LANG_IBIBIO 0x69 # endif # ifndef LANG_IGBO # define LANG_IGBO 0x70 # endif # ifndef LANG_INDONESIAN # define LANG_INDONESIAN 0x21 # endif # ifndef LANG_INUKTITUT # define LANG_INUKTITUT 0x5d # endif # ifndef LANG_KANNADA # define LANG_KANNADA 0x4b # endif # ifndef LANG_KANURI # define LANG_KANURI 0x71 # endif # ifndef LANG_KASHMIRI # define LANG_KASHMIRI 0x60 # endif # ifndef LANG_KAZAK # define LANG_KAZAK 0x3f # endif # ifndef LANG_KONKANI # define LANG_KONKANI 0x57 # endif # ifndef LANG_KYRGYZ # define LANG_KYRGYZ 0x40 # endif # ifndef LANG_LAO # define LANG_LAO 0x54 # endif # ifndef LANG_LATIN # define LANG_LATIN 0x76 # endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif # ifndef LANG_LITHUANIAN # define LANG_LITHUANIAN 0x27 # endif # ifndef LANG_MACEDONIAN # define LANG_MACEDONIAN 0x2f # endif # ifndef LANG_MALAY # define LANG_MALAY 0x3e # endif # ifndef LANG_MALAYALAM # define LANG_MALAYALAM 0x4c # endif # ifndef LANG_MALTESE # define LANG_MALTESE 0x3a # endif # ifndef LANG_MANIPURI # define LANG_MANIPURI 0x58 # endif # ifndef LANG_MARATHI # define LANG_MARATHI 0x4e # endif # ifndef LANG_MONGOLIAN # define LANG_MONGOLIAN 0x50 # endif # ifndef LANG_NEPALI # define LANG_NEPALI 0x61 # endif # ifndef LANG_ORIYA # define LANG_ORIYA 0x48 # endif # ifndef LANG_OROMO # define LANG_OROMO 0x72 # endif # ifndef LANG_PAPIAMENTU # define LANG_PAPIAMENTU 0x79 # endif # ifndef LANG_PASHTO # define LANG_PASHTO 0x63 # endif # ifndef LANG_PUNJABI # define LANG_PUNJABI 0x46 # endif # ifndef LANG_RHAETO_ROMANCE # define LANG_RHAETO_ROMANCE 0x17 # endif # ifndef LANG_SAAMI # define LANG_SAAMI 0x3b # endif # ifndef LANG_SANSKRIT # define LANG_SANSKRIT 0x4f # endif # ifndef LANG_SERBIAN # define LANG_SERBIAN 0x1a # endif # ifndef LANG_SINDHI # define LANG_SINDHI 0x59 # endif # ifndef LANG_SINHALESE # define LANG_SINHALESE 0x5b # endif # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif # ifndef LANG_SOMALI # define LANG_SOMALI 0x77 # endif # ifndef LANG_SORBIAN # define LANG_SORBIAN 0x2e # endif # ifndef LANG_SUTU # define LANG_SUTU 0x30 # endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif # ifndef LANG_SYRIAC # define LANG_SYRIAC 0x5a # endif # ifndef LANG_TAGALOG # define LANG_TAGALOG 0x64 # endif # ifndef LANG_TAJIK # define LANG_TAJIK 0x28 # endif # ifndef LANG_TAMAZIGHT # define LANG_TAMAZIGHT 0x5f # endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif # ifndef LANG_TATAR # define LANG_TATAR 0x44 # endif # ifndef LANG_TELUGU # define LANG_TELUGU 0x4a # endif # ifndef LANG_THAI # define LANG_THAI 0x1e # endif # ifndef LANG_TIBETAN # define LANG_TIBETAN 0x51 # endif # ifndef LANG_TIGRINYA # define LANG_TIGRINYA 0x73 # endif # ifndef LANG_TSONGA # define LANG_TSONGA 0x31 # endif # ifndef LANG_TSWANA # define LANG_TSWANA 0x32 # endif # ifndef LANG_TURKMEN # define LANG_TURKMEN 0x42 # endif # ifndef LANG_UKRAINIAN # define LANG_UKRAINIAN 0x22 # endif # ifndef LANG_URDU # define LANG_URDU 0x20 # endif # ifndef LANG_UZBEK # define LANG_UZBEK 0x43 # endif # ifndef LANG_VENDA # define LANG_VENDA 0x33 # endif # ifndef LANG_VIETNAMESE # define LANG_VIETNAMESE 0x2a # endif # ifndef LANG_WELSH # define LANG_WELSH 0x52 # endif # ifndef LANG_XHOSA # define LANG_XHOSA 0x34 # endif # ifndef LANG_YI # define LANG_YI 0x78 # endif # ifndef LANG_YIDDISH # define LANG_YIDDISH 0x3d # endif # ifndef LANG_YORUBA # define LANG_YORUBA 0x6a # endif # ifndef LANG_ZULU # define LANG_ZULU 0x35 # endif # ifndef SUBLANG_ARABIC_SAUDI_ARABIA # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 # endif # ifndef SUBLANG_ARABIC_IRAQ # define SUBLANG_ARABIC_IRAQ 0x02 # endif # ifndef SUBLANG_ARABIC_EGYPT # define SUBLANG_ARABIC_EGYPT 0x03 # endif # ifndef SUBLANG_ARABIC_LIBYA # define SUBLANG_ARABIC_LIBYA 0x04 # endif # ifndef SUBLANG_ARABIC_ALGERIA # define SUBLANG_ARABIC_ALGERIA 0x05 # endif # ifndef SUBLANG_ARABIC_MOROCCO # define SUBLANG_ARABIC_MOROCCO 0x06 # endif # ifndef SUBLANG_ARABIC_TUNISIA # define SUBLANG_ARABIC_TUNISIA 0x07 # endif # ifndef SUBLANG_ARABIC_OMAN # define SUBLANG_ARABIC_OMAN 0x08 # endif # ifndef SUBLANG_ARABIC_YEMEN # define SUBLANG_ARABIC_YEMEN 0x09 # endif # ifndef SUBLANG_ARABIC_SYRIA # define SUBLANG_ARABIC_SYRIA 0x0a # endif # ifndef SUBLANG_ARABIC_JORDAN # define SUBLANG_ARABIC_JORDAN 0x0b # endif # ifndef SUBLANG_ARABIC_LEBANON # define SUBLANG_ARABIC_LEBANON 0x0c # endif # ifndef SUBLANG_ARABIC_KUWAIT # define SUBLANG_ARABIC_KUWAIT 0x0d # endif # ifndef SUBLANG_ARABIC_UAE # define SUBLANG_ARABIC_UAE 0x0e # endif # ifndef SUBLANG_ARABIC_BAHRAIN # define SUBLANG_ARABIC_BAHRAIN 0x0f # endif # ifndef SUBLANG_ARABIC_QATAR # define SUBLANG_ARABIC_QATAR 0x10 # endif # ifndef SUBLANG_AZERI_LATIN # define SUBLANG_AZERI_LATIN 0x01 # endif # ifndef SUBLANG_AZERI_CYRILLIC # define SUBLANG_AZERI_CYRILLIC 0x02 # endif # ifndef SUBLANG_BENGALI_INDIA # define SUBLANG_BENGALI_INDIA 0x01 # endif # ifndef SUBLANG_BENGALI_BANGLADESH # define SUBLANG_BENGALI_BANGLADESH 0x02 # endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 # endif # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 # endif # ifndef SUBLANG_ENGLISH_JAMAICA # define SUBLANG_ENGLISH_JAMAICA 0x08 # endif # ifndef SUBLANG_ENGLISH_CARIBBEAN # define SUBLANG_ENGLISH_CARIBBEAN 0x09 # endif # ifndef SUBLANG_ENGLISH_BELIZE # define SUBLANG_ENGLISH_BELIZE 0x0a # endif # ifndef SUBLANG_ENGLISH_TRINIDAD # define SUBLANG_ENGLISH_TRINIDAD 0x0b # endif # ifndef SUBLANG_ENGLISH_ZIMBABWE # define SUBLANG_ENGLISH_ZIMBABWE 0x0c # endif # ifndef SUBLANG_ENGLISH_PHILIPPINES # define SUBLANG_ENGLISH_PHILIPPINES 0x0d # endif # ifndef SUBLANG_ENGLISH_INDONESIA # define SUBLANG_ENGLISH_INDONESIA 0x0e # endif # ifndef SUBLANG_ENGLISH_HONGKONG # define SUBLANG_ENGLISH_HONGKONG 0x0f # endif # ifndef SUBLANG_ENGLISH_INDIA # define SUBLANG_ENGLISH_INDIA 0x10 # endif # ifndef SUBLANG_ENGLISH_MALAYSIA # define SUBLANG_ENGLISH_MALAYSIA 0x11 # endif # ifndef SUBLANG_ENGLISH_SINGAPORE # define SUBLANG_ENGLISH_SINGAPORE 0x12 # endif # ifndef SUBLANG_FRENCH_LUXEMBOURG # define SUBLANG_FRENCH_LUXEMBOURG 0x05 # endif # ifndef SUBLANG_FRENCH_MONACO # define SUBLANG_FRENCH_MONACO 0x06 # endif # ifndef SUBLANG_FRENCH_WESTINDIES # define SUBLANG_FRENCH_WESTINDIES 0x07 # endif # ifndef SUBLANG_FRENCH_REUNION # define SUBLANG_FRENCH_REUNION 0x08 # endif # ifndef SUBLANG_FRENCH_CONGO # define SUBLANG_FRENCH_CONGO 0x09 # endif # ifndef SUBLANG_FRENCH_SENEGAL # define SUBLANG_FRENCH_SENEGAL 0x0a # endif # ifndef SUBLANG_FRENCH_CAMEROON # define SUBLANG_FRENCH_CAMEROON 0x0b # endif # ifndef SUBLANG_FRENCH_COTEDIVOIRE # define SUBLANG_FRENCH_COTEDIVOIRE 0x0c # endif # ifndef SUBLANG_FRENCH_MALI # define SUBLANG_FRENCH_MALI 0x0d # endif # ifndef SUBLANG_FRENCH_MOROCCO # define SUBLANG_FRENCH_MOROCCO 0x0e # endif # ifndef SUBLANG_FRENCH_HAITI # define SUBLANG_FRENCH_HAITI 0x0f # endif # ifndef SUBLANG_GERMAN_LUXEMBOURG # define SUBLANG_GERMAN_LUXEMBOURG 0x04 # endif # ifndef SUBLANG_GERMAN_LIECHTENSTEIN # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 # endif # ifndef SUBLANG_KASHMIRI_INDIA # define SUBLANG_KASHMIRI_INDIA 0x02 # endif # ifndef SUBLANG_MALAY_MALAYSIA # define SUBLANG_MALAY_MALAYSIA 0x01 # endif # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 # endif # ifndef SUBLANG_NEPALI_INDIA # define SUBLANG_NEPALI_INDIA 0x02 # endif # ifndef SUBLANG_PUNJABI_INDIA # define SUBLANG_PUNJABI_INDIA 0x01 # endif # ifndef SUBLANG_PUNJABI_PAKISTAN # define SUBLANG_PUNJABI_PAKISTAN 0x02 # endif # ifndef SUBLANG_ROMANIAN_ROMANIA # define SUBLANG_ROMANIAN_ROMANIA 0x01 # endif # ifndef SUBLANG_ROMANIAN_MOLDOVA # define SUBLANG_ROMANIAN_MOLDOVA 0x02 # endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 # endif # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif # ifndef SUBLANG_SINDHI_PAKISTAN # define SUBLANG_SINDHI_PAKISTAN 0x01 # endif # ifndef SUBLANG_SINDHI_AFGHANISTAN # define SUBLANG_SINDHI_AFGHANISTAN 0x02 # endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif # ifndef SUBLANG_SPANISH_COSTA_RICA # define SUBLANG_SPANISH_COSTA_RICA 0x05 # endif # ifndef SUBLANG_SPANISH_PANAMA # define SUBLANG_SPANISH_PANAMA 0x06 # endif # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 # endif # ifndef SUBLANG_SPANISH_VENEZUELA # define SUBLANG_SPANISH_VENEZUELA 0x08 # endif # ifndef SUBLANG_SPANISH_COLOMBIA # define SUBLANG_SPANISH_COLOMBIA 0x09 # endif # ifndef SUBLANG_SPANISH_PERU # define SUBLANG_SPANISH_PERU 0x0a # endif # ifndef SUBLANG_SPANISH_ARGENTINA # define SUBLANG_SPANISH_ARGENTINA 0x0b # endif # ifndef SUBLANG_SPANISH_ECUADOR # define SUBLANG_SPANISH_ECUADOR 0x0c # endif # ifndef SUBLANG_SPANISH_CHILE # define SUBLANG_SPANISH_CHILE 0x0d # endif # ifndef SUBLANG_SPANISH_URUGUAY # define SUBLANG_SPANISH_URUGUAY 0x0e # endif # ifndef SUBLANG_SPANISH_PARAGUAY # define SUBLANG_SPANISH_PARAGUAY 0x0f # endif # ifndef SUBLANG_SPANISH_BOLIVIA # define SUBLANG_SPANISH_BOLIVIA 0x10 # endif # ifndef SUBLANG_SPANISH_EL_SALVADOR # define SUBLANG_SPANISH_EL_SALVADOR 0x11 # endif # ifndef SUBLANG_SPANISH_HONDURAS # define SUBLANG_SPANISH_HONDURAS 0x12 # endif # ifndef SUBLANG_SPANISH_NICARAGUA # define SUBLANG_SPANISH_NICARAGUA 0x13 # endif # ifndef SUBLANG_SPANISH_PUERTO_RICO # define SUBLANG_SPANISH_PUERTO_RICO 0x14 # endif # ifndef SUBLANG_SWEDISH_FINLAND # define SUBLANG_SWEDISH_FINLAND 0x02 # endif # ifndef SUBLANG_TAMAZIGHT_ARABIC # define SUBLANG_TAMAZIGHT_ARABIC 0x01 # endif # ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN # define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 # endif # ifndef SUBLANG_TIGRINYA_ETHIOPIA # define SUBLANG_TIGRINYA_ETHIOPIA 0x01 # endif # ifndef SUBLANG_TIGRINYA_ERITREA # define SUBLANG_TIGRINYA_ERITREA 0x02 # endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 # endif # ifndef SUBLANG_URDU_INDIA # define SUBLANG_URDU_INDIA 0x02 # endif # ifndef SUBLANG_UZBEK_LATIN # define SUBLANG_UZBEK_LATIN 0x01 # endif # ifndef SUBLANG_UZBEK_CYRILLIC # define SUBLANG_UZBEK_CYRILLIC 0x02 # endif #endif # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ /* Canonicalize a MacOS X locale name to a Unix locale name. NAME is a sufficiently large buffer. On input, it contains the MacOS X locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static # endif void gl_locale_name_canonicalize (char *name) { /* This conversion is based on a posting by Deborah GoldSmith on 2005-03-08, http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this. Therefore we do it ourselves, using a table based on the results of the MacOS X 10.3.8 function CFLocaleCreateCanonicalLocaleIdentifierFromString(). */ typedef struct { const char legacy[21+1]; const char unixy[5+1]; } legacy_entry; static const legacy_entry legacy_table[] = { { "Afrikaans", "af" }, { "Albanian", "sq" }, { "Amharic", "am" }, { "Arabic", "ar" }, { "Armenian", "hy" }, { "Assamese", "as" }, { "Aymara", "ay" }, { "Azerbaijani", "az" }, { "Basque", "eu" }, { "Belarusian", "be" }, { "Belorussian", "be" }, { "Bengali", "bn" }, { "Brazilian Portugese", "pt_BR" }, { "Brazilian Portuguese", "pt_BR" }, { "Breton", "br" }, { "Bulgarian", "bg" }, { "Burmese", "my" }, { "Byelorussian", "be" }, { "Catalan", "ca" }, { "Chewa", "ny" }, { "Chichewa", "ny" }, { "Chinese", "zh" }, { "Chinese, Simplified", "zh_CN" }, { "Chinese, Traditional", "zh_TW" }, { "Chinese, Tradtional", "zh_TW" }, { "Croatian", "hr" }, { "Czech", "cs" }, { "Danish", "da" }, { "Dutch", "nl" }, { "Dzongkha", "dz" }, { "English", "en" }, { "Esperanto", "eo" }, { "Estonian", "et" }, { "Faroese", "fo" }, { "Farsi", "fa" }, { "Finnish", "fi" }, { "Flemish", "nl_BE" }, { "French", "fr" }, { "Galician", "gl" }, { "Gallegan", "gl" }, { "Georgian", "ka" }, { "German", "de" }, { "Greek", "el" }, { "Greenlandic", "kl" }, { "Guarani", "gn" }, { "Gujarati", "gu" }, { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */ { "Hebrew", "he" }, { "Hindi", "hi" }, { "Hungarian", "hu" }, { "Icelandic", "is" }, { "Indonesian", "id" }, { "Inuktitut", "iu" }, { "Irish", "ga" }, { "Italian", "it" }, { "Japanese", "ja" }, { "Javanese", "jv" }, { "Kalaallisut", "kl" }, { "Kannada", "kn" }, { "Kashmiri", "ks" }, { "Kazakh", "kk" }, { "Khmer", "km" }, { "Kinyarwanda", "rw" }, { "Kirghiz", "ky" }, { "Korean", "ko" }, { "Kurdish", "ku" }, { "Latin", "la" }, { "Latvian", "lv" }, { "Lithuanian", "lt" }, { "Macedonian", "mk" }, { "Malagasy", "mg" }, { "Malay", "ms" }, { "Malayalam", "ml" }, { "Maltese", "mt" }, { "Manx", "gv" }, { "Marathi", "mr" }, { "Moldavian", "mo" }, { "Mongolian", "mn" }, { "Nepali", "ne" }, { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */ { "Nyanja", "ny" }, { "Nynorsk", "nn" }, { "Oriya", "or" }, { "Oromo", "om" }, { "Panjabi", "pa" }, { "Pashto", "ps" }, { "Persian", "fa" }, { "Polish", "pl" }, { "Portuguese", "pt" }, { "Portuguese, Brazilian", "pt_BR" }, { "Punjabi", "pa" }, { "Pushto", "ps" }, { "Quechua", "qu" }, { "Romanian", "ro" }, { "Ruanda", "rw" }, { "Rundi", "rn" }, { "Russian", "ru" }, { "Sami", "se_NO" }, /* Not just "se". */ { "Sanskrit", "sa" }, { "Scottish", "gd" }, { "Serbian", "sr" }, { "Simplified Chinese", "zh_CN" }, { "Sindhi", "sd" }, { "Sinhalese", "si" }, { "Slovak", "sk" }, { "Slovenian", "sl" }, { "Somali", "so" }, { "Spanish", "es" }, { "Sundanese", "su" }, { "Swahili", "sw" }, { "Swedish", "sv" }, { "Tagalog", "tl" }, { "Tajik", "tg" }, { "Tajiki", "tg" }, { "Tamil", "ta" }, { "Tatar", "tt" }, { "Telugu", "te" }, { "Thai", "th" }, { "Tibetan", "bo" }, { "Tigrinya", "ti" }, { "Tongan", "to" }, { "Traditional Chinese", "zh_TW" }, { "Turkish", "tr" }, { "Turkmen", "tk" }, { "Uighur", "ug" }, { "Ukrainian", "uk" }, { "Urdu", "ur" }, { "Uzbek", "uz" }, { "Vietnamese", "vi" }, { "Welsh", "cy" }, { "Yiddish", "yi" } }; /* Convert new-style locale names with language tags (ISO 639 and ISO 15924) to Unix (ISO 639 and ISO 3166) names. */ typedef struct { const char langtag[7+1]; const char unixy[12+1]; } langtag_entry; static const langtag_entry langtag_table[] = { /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn". The default script for az on Unix is Latin. */ { "az-Latn", "az" }, /* MacOS X has "ga-dots". Does not yet exist on Unix. */ { "ga-dots", "ga" }, /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */ /* MacOS X has "mn-Cyrl", "mn-Mong". The default script for mn on Unix is Cyrillic. */ { "mn-Cyrl", "mn" }, /* MacOS X has "ms-Arab", "ms-Latn". The default script for ms on Unix is Latin. */ { "ms-Latn", "ms" }, /* MacOS X has "tg-Cyrl". The default script for tg on Unix is Cyrillic. */ { "tg-Cyrl", "tg" }, /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */ /* MacOS X has "tt-Cyrl". The default script for tt on Unix is Cyrillic. */ { "tt-Cyrl", "tt" }, /* MacOS X has "zh-Hans", "zh-Hant". Country codes are used to distinguish these on Unix. */ { "zh-Hans", "zh_CN" }, { "zh-Hant", "zh_TW" } }; /* Convert script names (ISO 15924) to Unix conventions. See http://www.unicode.org/iso15924/iso15924-codes.html */ typedef struct { const char script[4+1]; const char unixy[9+1]; } script_entry; static const script_entry script_table[] = { { "Arab", "arabic" }, { "Cyrl", "cyrillic" }, { "Mong", "mongolian" } }; /* Step 1: Convert using legacy_table. */ if (name[0] >= 'A' && name[0] <= 'Z') { unsigned int i1, i2; i1 = 0; i2 = sizeof (legacy_table) / sizeof (legacy_entry); while (i2 - i1 > 1) { /* At this point we know that if name occurs in legacy_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const legacy_entry *p = &legacy_table[i]; if (strcmp (name, p->legacy) < 0) i2 = i; else i1 = i; } if (strcmp (name, legacy_table[i1].legacy) == 0) { strcpy (name, legacy_table[i1].unixy); return; } } /* Step 2: Convert using langtag_table and script_table. */ if (strlen (name) == 7 && name[2] == '-') { unsigned int i1, i2; i1 = 0; i2 = sizeof (langtag_table) / sizeof (langtag_entry); while (i2 - i1 > 1) { /* At this point we know that if name occurs in langtag_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const langtag_entry *p = &langtag_table[i]; if (strcmp (name, p->langtag) < 0) i2 = i; else i1 = i; } if (strcmp (name, langtag_table[i1].langtag) == 0) { strcpy (name, langtag_table[i1].unixy); return; } i1 = 0; i2 = sizeof (script_table) / sizeof (script_entry); while (i2 - i1 > 1) { /* At this point we know that if (name + 3) occurs in script_table, its index must be >= i1 and < i2. */ unsigned int i = (i1 + i2) >> 1; const script_entry *p = &script_table[i]; if (strcmp (name + 3, p->script) < 0) i2 = i; else i1 = i; } if (strcmp (name + 3, script_table[i1].script) == 0) { name[2] = '@'; strcpy (name + 3, script_table[i1].unixy); return; } } /* Step 3: Convert new-style dash to Unix underscore. */ { char *p; for (p = name; *p != '\0'; p++) if (*p == '-') *p = '_'; } } #endif /* XPG3 defines the result of 'setlocale (category, NULL)' as: "Directs 'setlocale()' to query 'category' and return the current setting of 'local'." However it does not specify the exact format. Neither do SUSV2 and ISO C 99. So we can use this feature only on selected systems (e.g. those using GNU C Library). */ #if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2) # define HAVE_LOCALE_NULL #endif /* Determine the current locale's name, and canonicalize it into XPG syntax language[_territory][.codeset][@modifier] The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ const char * gl_locale_name_posix (int category, const char *categoryname) { /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. On some systems this can be done by the 'setlocale' function itself. */ #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL return setlocale (category, NULL); #else const char *retval; /* Setting of LC_ALL overrides all other. */ retval = getenv ("LC_ALL"); if (retval != NULL && retval[0] != '\0') return retval; /* Next comes the name of the desired category. */ retval = getenv (categoryname); if (retval != NULL && retval[0] != '\0') return retval; /* Last possibility is the LANG environment variable. */ retval = getenv ("LANG"); if (retval != NULL && retval[0] != '\0') return retval; return NULL; #endif } const char * gl_locale_name_default (void) { /* POSIX:2001 says: "All implementations shall define a locale as the default locale, to be invoked when no environment variables are set, or set to the empty string. This default locale can be the POSIX locale or any other implementation-defined locale. Some implementations may provide facilities for local installation administrators to set the default locale, customizing it for each location. POSIX:2001 does not require such a facility. */ #if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32_NATIVE)) /* The system does not have a way of setting the locale, other than the POSIX specified environment variables. We use C as default locale. */ return "C"; #else /* Return an XPG style locale name language[_territory][@modifier]. Don't even bother determining the codeset; it's not useful in this context, because message catalogs are not specific to a single codeset. */ # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ { /* Cache the locale name, since CoreFoundation calls are expensive. */ static const char *cached_localename; if (cached_localename == NULL) { char namebuf[256]; # if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */ CFLocaleRef locale = CFLocaleCopyCurrent (); CFStringRef name = CFLocaleGetIdentifier (locale); if (CFStringGetCString (name, namebuf, sizeof(namebuf), kCFStringEncodingASCII)) { gl_locale_name_canonicalize (namebuf); cached_localename = strdup (namebuf); } CFRelease (locale); # elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ CFTypeRef value = CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), kCFPreferencesCurrentApplication); if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID () && CFStringGetCString ((CFStringRef)value, namebuf, sizeof(namebuf), kCFStringEncodingASCII)) { gl_locale_name_canonicalize (namebuf); cached_localename = strdup (namebuf); } # endif if (cached_localename == NULL) cached_localename = "C"; } return cached_localename; } # endif # if defined(WIN32_NATIVE) /* WIN32, not Cygwin */ { LCID lcid; LANGID langid; int primary, sub; /* Use native Win32 API locale ID. */ lcid = GetThreadLocale (); /* Strip off the sorting rules, keep only the language part. */ langid = LANGIDFROMLCID (lcid); /* Split into language and territory part. */ primary = PRIMARYLANGID (langid); sub = SUBLANGID (langid); /* Dispatch on language. See also http://www.unicode.org/unicode/onlinedat/languages.html . For details about languages, see http://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: return "af_ZA"; case LANG_ALBANIAN: return "sq_AL"; case LANG_AMHARIC: return "am_ET"; case LANG_ARABIC: switch (sub) { case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; case SUBLANG_ARABIC_EGYPT: return "ar_EG"; case SUBLANG_ARABIC_LIBYA: return "ar_LY"; case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; case SUBLANG_ARABIC_OMAN: return "ar_OM"; case SUBLANG_ARABIC_YEMEN: return "ar_YE"; case SUBLANG_ARABIC_SYRIA: return "ar_SY"; case SUBLANG_ARABIC_JORDAN: return "ar_JO"; case SUBLANG_ARABIC_LEBANON: return "ar_LB"; case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; case SUBLANG_ARABIC_UAE: return "ar_AE"; case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; case SUBLANG_ARABIC_QATAR: return "ar_QA"; } return "ar"; case LANG_ARMENIAN: return "hy_AM"; case LANG_ASSAMESE: return "as_IN"; case LANG_AZERI: switch (sub) { /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; } return "az"; case LANG_BASQUE: switch (sub) { case SUBLANG_DEFAULT: return "eu_ES"; } return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ case LANG_BELARUSIAN: return "be_BY"; case LANG_BENGALI: switch (sub) { case SUBLANG_BENGALI_INDIA: return "bn_IN"; case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; } return "bn"; case LANG_BULGARIAN: return "bg_BG"; case LANG_BURMESE: return "my_MM"; case LANG_CAMBODIAN: return "km_KH"; case LANG_CATALAN: return "ca_ES"; case LANG_CHEROKEE: return "chr_US"; case LANG_CHINESE: switch (sub) { case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; case SUBLANG_CHINESE_MACAU: return "zh_MO"; } return "zh"; case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN * What used to be called Serbo-Croatian * should really now be two separate * languages because of political reasons. * (Says tml, who knows nothing about Serbian * or Croatian.) * (I can feel those flames coming already.) */ switch (sub) { case SUBLANG_DEFAULT: return "hr_HR"; case SUBLANG_SERBIAN_LATIN: return "sr_CS"; case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; } return "hr"; case LANG_CZECH: return "cs_CZ"; case LANG_DANISH: return "da_DK"; case LANG_DIVEHI: return "dv_MV"; case LANG_DUTCH: switch (sub) { case SUBLANG_DUTCH: return "nl_NL"; case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; } return "nl"; case LANG_EDO: return "bin_NG"; case LANG_ENGLISH: switch (sub) { /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought * English was the language spoken in England. * Oh well. */ case SUBLANG_ENGLISH_US: return "en_US"; case SUBLANG_ENGLISH_UK: return "en_GB"; case SUBLANG_ENGLISH_AUS: return "en_AU"; case SUBLANG_ENGLISH_CAN: return "en_CA"; case SUBLANG_ENGLISH_NZ: return "en_NZ"; case SUBLANG_ENGLISH_EIRE: return "en_IE"; case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; case SUBLANG_ENGLISH_INDIA: return "en_IN"; case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; } return "en"; case LANG_ESTONIAN: return "et_EE"; case LANG_FAEROESE: return "fo_FO"; case LANG_FARSI: return "fa_IR"; case LANG_FINNISH: return "fi_FI"; case LANG_FRENCH: switch (sub) { case SUBLANG_FRENCH: return "fr_FR"; case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ case SUBLANG_FRENCH_REUNION: return "fr_RE"; case SUBLANG_FRENCH_CONGO: return "fr_CG"; case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; case SUBLANG_FRENCH_MALI: return "fr_ML"; case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; case SUBLANG_FRENCH_HAITI: return "fr_HT"; } return "fr"; case LANG_FRISIAN: return "fy_NL"; case LANG_FULFULDE: /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ return "ff_NG"; case LANG_GAELIC: switch (sub) { case 0x01: /* SCOTTISH */ return "gd_GB"; case 0x02: /* IRISH */ return "ga_IE"; } return "C"; case LANG_GALICIAN: return "gl_ES"; case LANG_GEORGIAN: return "ka_GE"; case LANG_GERMAN: switch (sub) { case SUBLANG_GERMAN: return "de_DE"; case SUBLANG_GERMAN_SWISS: return "de_CH"; case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; } return "de"; case LANG_GREEK: return "el_GR"; case LANG_GUARANI: return "gn_PY"; case LANG_GUJARATI: return "gu_IN"; case LANG_HAUSA: return "ha_NG"; case LANG_HAWAIIAN: /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) or Hawaii Creole English ("cpe_US", 600000 speakers)? */ return "cpe_US"; case LANG_HEBREW: return "he_IL"; case LANG_HINDI: return "hi_IN"; case LANG_HUNGARIAN: return "hu_HU"; case LANG_IBIBIO: return "nic_NG"; case LANG_ICELANDIC: return "is_IS"; case LANG_IGBO: return "ig_NG"; case LANG_INDONESIAN: return "id_ID"; case LANG_INUKTITUT: return "iu_CA"; case LANG_ITALIAN: switch (sub) { case SUBLANG_ITALIAN: return "it_IT"; case SUBLANG_ITALIAN_SWISS: return "it_CH"; } return "it"; case LANG_JAPANESE: return "ja_JP"; case LANG_KANNADA: return "kn_IN"; case LANG_KANURI: return "kr_NG"; case LANG_KASHMIRI: switch (sub) { case SUBLANG_DEFAULT: return "ks_PK"; case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; } return "ks"; case LANG_KAZAK: return "kk_KZ"; case LANG_KONKANI: /* FIXME: Adjust this when such locales appear on Unix. */ return "kok_IN"; case LANG_KOREAN: return "ko_KR"; case LANG_KYRGYZ: return "ky_KG"; case LANG_LAO: return "lo_LA"; case LANG_LATIN: return "la_VA"; case LANG_LATVIAN: return "lv_LV"; case LANG_LITHUANIAN: return "lt_LT"; case LANG_MACEDONIAN: return "mk_MK"; case LANG_MALAY: switch (sub) { case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; } return "ms"; case LANG_MALAYALAM: return "ml_IN"; case LANG_MALTESE: return "mt_MT"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ return "mni_IN"; case LANG_MARATHI: return "mr_IN"; case LANG_MONGOLIAN: switch (sub) { case SUBLANG_DEFAULT: return "mn_MN"; } return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ case LANG_NEPALI: switch (sub) { case SUBLANG_DEFAULT: return "ne_NP"; case SUBLANG_NEPALI_INDIA: return "ne_IN"; } return "ne"; case LANG_NORWEGIAN: switch (sub) { case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO"; case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; } return "no"; case LANG_ORIYA: return "or_IN"; case LANG_OROMO: return "om_ET"; case LANG_PAPIAMENTU: return "pap_AN"; case LANG_PASHTO: return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: return "pl_PL"; case LANG_PORTUGUESE: switch (sub) { case SUBLANG_PORTUGUESE: return "pt_PT"; /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; } return "pt"; case LANG_PUNJABI: switch (sub) { case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ } return "pa"; case LANG_RHAETO_ROMANCE: return "rm_CH"; case LANG_ROMANIAN: switch (sub) { case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; } return "ro"; case LANG_RUSSIAN: switch (sub) { case SUBLANG_DEFAULT: return "ru_RU"; } return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; case LANG_SANSKRIT: return "sa_IN"; case LANG_SINDHI: switch (sub) { case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF"; } return "sd"; case LANG_SINHALESE: return "si_LK"; case LANG_SLOVAK: return "sk_SK"; case LANG_SLOVENIAN: return "sl_SI"; case LANG_SOMALI: return "so_SO"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ return "wen_DE"; case LANG_SPANISH: switch (sub) { case SUBLANG_SPANISH: return "es_ES"; case SUBLANG_SPANISH_MEXICAN: return "es_MX"; case SUBLANG_SPANISH_MODERN: return "es_ES@modern"; /* not seen on Unix */ case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; case SUBLANG_SPANISH_PANAMA: return "es_PA"; case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; case SUBLANG_SPANISH_PERU: return "es_PE"; case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; case SUBLANG_SPANISH_ECUADOR: return "es_EC"; case SUBLANG_SPANISH_CHILE: return "es_CL"; case SUBLANG_SPANISH_URUGUAY: return "es_UY"; case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; case SUBLANG_SPANISH_HONDURAS: return "es_HN"; case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; } return "es"; case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ case LANG_SWAHILI: return "sw_KE"; case LANG_SWEDISH: switch (sub) { case SUBLANG_DEFAULT: return "sv_SE"; case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; } return "sv"; case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ case LANG_TAGALOG: return "tl_PH"; case LANG_TAJIK: return "tg_TJ"; case LANG_TAMAZIGHT: switch (sub) { /* FIXME: Adjust this when Tamazight locales appear on Unix. */ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin"; } return "ber_MA"; case LANG_TAMIL: switch (sub) { case SUBLANG_DEFAULT: return "ta_IN"; } return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ case LANG_TATAR: return "tt_RU"; case LANG_TELUGU: return "te_IN"; case LANG_THAI: return "th_TH"; case LANG_TIBETAN: return "bo_CN"; case LANG_TIGRINYA: switch (sub) { case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; } return "ti"; case LANG_TSONGA: return "ts_ZA"; case LANG_TSWANA: return "tn_BW"; case LANG_TURKISH: return "tr_TR"; case LANG_TURKMEN: return "tk_TM"; case LANG_UKRAINIAN: return "uk_UA"; case LANG_URDU: switch (sub) { case SUBLANG_URDU_PAKISTAN: return "ur_PK"; case SUBLANG_URDU_INDIA: return "ur_IN"; } return "ur"; case LANG_UZBEK: switch (sub) { case SUBLANG_UZBEK_LATIN: return "uz_UZ"; case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; case LANG_VENDA: return "ve_ZA"; case LANG_VIETNAMESE: return "vi_VN"; case LANG_WELSH: return "cy_GB"; case LANG_XHOSA: return "xh_ZA"; case LANG_YI: return "sit_CN"; case LANG_YIDDISH: return "yi_IL"; case LANG_YORUBA: return "yo_NG"; case LANG_ZULU: return "zu_ZA"; default: return "C"; } } # endif #endif } const char * gl_locale_name (int category, const char *categoryname) { const char *retval; retval = gl_locale_name_posix (category, categoryname); if (retval != NULL) return retval; return gl_locale_name_default (); } ebview-0.3.6.2/intl/gettextP.h0000644000175000017500000002221411241377503015406 0ustar mhattamhatta/* Header describing internals of libintl library. Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GETTEXTP_H #define _GETTEXTP_H #include /* Get size_t. */ #ifdef _LIBC # include "../iconv/gconv_int.h" #else # if HAVE_ICONV # include # endif #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include # define gl_rwlock_define __libc_rwlock_define #else # include "lock.h" #endif #ifdef _LIBC extern char *__gettext (const char *__msgid); extern char *__dgettext (const char *__domainname, const char *__msgid); extern char *__dcgettext (const char *__domainname, const char *__msgid, int __category); extern char *__ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n); extern char *__dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int n); extern char *__dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category); extern char *__dcigettext (const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category); extern char *__textdomain (const char *__domainname); extern char *__bindtextdomain (const char *__domainname, const char *__dirname); extern char *__bind_textdomain_codeset (const char *__domainname, const char *__codeset); extern void _nl_finddomain_subfreeres (void) attribute_hidden; extern void _nl_unload_domain (struct loaded_domain *__domain) internal_function attribute_hidden; #else /* Declare the exported libintl_* functions, in a way that allows us to call them under their real name. */ # undef _INTL_REDIRECT_INLINE # undef _INTL_REDIRECT_MACROS # define _INTL_REDIRECT_MACROS # include "libgnuintl.h" # ifdef IN_LIBGLOCALE extern char *gl_dcigettext (const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category, const char *__localename, const char *__encoding); # else extern char *libintl_dcigettext (const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category); # endif #endif #include "loadinfo.h" #include "gmo.h" /* Get nls_uint32. */ /* @@ end of prolog @@ */ #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif #ifndef W # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif #ifdef _LIBC # include # define SWAP(i) bswap_32 (i) #else static inline nls_uint32 # ifdef __cplusplus SWAP (nls_uint32 i) # else SWAP (i) nls_uint32 i; # endif { return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); } #endif /* In-memory representation of system dependent string. */ struct sysdep_string_desc { /* Length of addressed string, including the trailing NUL. */ size_t length; /* Pointer to addressed string. */ const char *pointer; }; /* Cache of translated strings after charset conversion. Note: The strings are converted to the target encoding only on an as-needed basis. */ struct converted_domain { /* The target encoding name. */ const char *encoding; /* The descriptor for conversion from the message catalog's encoding to this target encoding. */ #ifdef _LIBC __gconv_t conv; #else # if HAVE_ICONV iconv_t conv; # endif #endif /* The table of translated strings after charset conversion. */ char **conv_tab; }; /* The representation of an opened message catalog. */ struct loaded_domain { /* Pointer to memory containing the .mo file. */ const char *data; /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ int use_mmap; /* Size of mmap()ed memory. */ size_t mmap_size; /* 1 if the .mo file uses a different endianness than this machine. */ int must_swap; /* Pointer to additional malloc()ed memory. */ void *malloced; /* Number of static strings pairs. */ nls_uint32 nstrings; /* Pointer to descriptors of original strings in the file. */ const struct string_desc *orig_tab; /* Pointer to descriptors of translated strings in the file. */ const struct string_desc *trans_tab; /* Number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Pointer to descriptors of original sysdep strings. */ const struct sysdep_string_desc *orig_sysdep_tab; /* Pointer to descriptors of translated sysdep strings. */ const struct sysdep_string_desc *trans_sysdep_tab; /* Size of hash table. */ nls_uint32 hash_size; /* Pointer to hash table. */ const nls_uint32 *hash_tab; /* 1 if the hash table uses a different endianness than this machine. */ int must_swap_hash_tab; /* Cache of charset conversions of the translated strings. */ struct converted_domain *conversions; size_t nconversions; gl_rwlock_define (, conversions_lock) const struct expression *plural; unsigned long int nplurals; }; /* We want to allocate a string at the end of the struct. But ISO C doesn't allow zero sized arrays. */ #ifdef __GNUC__ # define ZERO 0 #else # define ZERO 1 #endif /* A set of settings bound to a message domain. Used to store settings from bindtextdomain() and bind_textdomain_codeset(). */ struct binding { struct binding *next; char *dirname; char *codeset; char domainname[ZERO]; }; /* A counter which is incremented each time some previous translations become invalid. This variable is part of the external ABI of the GNU libintl. */ #ifdef IN_LIBGLOCALE # include extern LIBGLOCALE_DLL_EXPORTED int _nl_msg_cat_cntr; #else extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr; #endif #ifndef _LIBC extern const char *_nl_language_preferences_default (void); # define gl_locale_name_canonicalize _nl_locale_name_canonicalize extern void _nl_locale_name_canonicalize (char *name); # define gl_locale_name_posix _nl_locale_name_posix extern const char *_nl_locale_name_posix (int category, const char *categoryname); # define gl_locale_name_default _nl_locale_name_default extern const char *_nl_locale_name_default (void); # define gl_locale_name _nl_locale_name extern const char *_nl_locale_name (int category, const char *categoryname); #endif struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, const char *__domainname, struct binding *__domainbinding) internal_function; void _nl_load_domain (struct loaded_l10nfile *__domain, struct binding *__domainbinding) internal_function; #ifdef IN_LIBGLOCALE char *_nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *encoding, const char *msgid, size_t *lengthp) internal_function; #else char *_nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, int convert, size_t *lengthp) internal_function; #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_dirname libintl_nl_default_dirname # define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Contains the default location of the message catalogs. */ extern const char _nl_default_dirname[]; #ifdef _LIBC libc_hidden_proto (_nl_default_dirname) #endif /* List with bindings of specific domains. */ extern struct binding *_nl_domain_bindings; /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_default_domain libintl_nl_default_default_domain # define _nl_current_default_domain libintl_nl_current_default_domain #endif /* Name of the default text domain. */ extern const char _nl_default_default_domain[] attribute_hidden; /* Default text domain in which entries for gettext(3) are to be found. */ extern const char *_nl_current_default_domain attribute_hidden; /* @@ begin of epilog @@ */ #endif /* gettextP.h */ ebview-0.3.6.2/intl/intl-exports.c0000644000175000017500000000273311241377503016251 0ustar mhattamhatta/* List of exported symbols of libintl on Cygwin. Copyright (C) 2006 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* IMP(x) is a symbol that contains the address of x. */ #define IMP(x) _imp__##x /* Ensure that the variable x is exported from the library, and that a pseudo-variable IMP(x) is available. */ #define VARIABLE(x) \ /* Export x without redefining x. This code was found by compiling a \ snippet: \ extern __declspec(dllexport) int x; int x = 42; */ \ asm (".section .drectve\n"); \ asm (".ascii \" -export:" #x ",data\"\n"); \ asm (".data\n"); \ /* Allocate a pseudo-variable IMP(x). */ \ extern int x; \ void * IMP(x) = &x; VARIABLE(libintl_version) ebview-0.3.6.2/intl/ref-add.sin0000644000175000017500000000210511241377503015443 0ustar mhattamhatta# Add this package to a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } ebview-0.3.6.2/intl/explodename.c0000644000175000017500000000654611241377503016110 0ustar mhattamhatta/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ /* Split a locale name NAME into a leading language part and all the rest. Return a pointer to the first character after the language, i.e. to the first byte of the rest. */ static char *_nl_find_language (const char *name); static char * _nl_find_language (const char *name) { while (name[0] != '\0' && name[0] != '_' && name[0] != '@' && name[0] != '.') ++name; return (char *) name; } int _nl_explode_name (char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset) { char *cp; int mask; *modifier = NULL; *territory = NULL; *codeset = NULL; *normalized_codeset = NULL; /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_', '.', and `@'. */ mask = 0; *language = cp = name; cp = _nl_find_language (*language); if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ cp = strchr (*language, '\0'); else { if (cp[0] == '_') { /* Next is the territory. */ cp[0] = '\0'; *territory = ++cp; while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@') ++cp; mask |= XPG_TERRITORY; } if (cp[0] == '.') { /* Next is the codeset. */ cp[0] = '\0'; *codeset = ++cp; while (cp[0] != '\0' && cp[0] != '@') ++cp; mask |= XPG_CODESET; if (*codeset != cp && (*codeset)[0] != '\0') { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); if (*normalized_codeset == NULL) return -1; else if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; } } } if (cp[0] == '@') { /* Next is the modifier. */ cp[0] = '\0'; *modifier = ++cp; if (cp[0] != '\0') mask |= XPG_MODIFIER; } if (*territory != NULL && (*territory)[0] == '\0') mask &= ~XPG_TERRITORY; if (*codeset != NULL && (*codeset)[0] == '\0') mask &= ~XPG_CODESET; return mask; } ebview-0.3.6.2/intl/dcngettext.c0000644000175000017500000000347411241377503015755 0ustar mhattamhatta/* Implementation of the dcngettext(3) function. Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCNGETTEXT __dcngettext # define DCIGETTEXT __dcigettext #else # define DCNGETTEXT libintl_dcngettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category) { return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dcngettext, dcngettext); #endif ebview-0.3.6.2/intl/plural-exp.c0000644000175000017500000000773211241377503015676 0ustar mhattamhatta/* Expression parsing for plural form selection. Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "plural-exp.h" #if (defined __GNUC__ && !(__APPLE_CC__ > 1) && !defined __cplusplus) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) /* These structs are the constant expression for the germanic plural form determination. It represents the expression "n != 1". */ static const struct expression plvar = { .nargs = 0, .operation = var, }; static const struct expression plone = { .nargs = 0, .operation = num, .val = { .num = 1 } }; struct expression GERMANIC_PLURAL = { .nargs = 2, .operation = not_equal, .val = { .args = { [0] = (struct expression *) &plvar, [1] = (struct expression *) &plone } } }; # define INIT_GERMANIC_PLURAL() #else /* For compilers without support for ISO C 99 struct/union initializers: Initialization at run-time. */ static struct expression plvar; static struct expression plone; struct expression GERMANIC_PLURAL; static void init_germanic_plural () { if (plone.val.num == 0) { plvar.nargs = 0; plvar.operation = var; plone.nargs = 0; plone.operation = num; plone.val.num = 1; GERMANIC_PLURAL.nargs = 2; GERMANIC_PLURAL.operation = not_equal; GERMANIC_PLURAL.val.args[0] = &plvar; GERMANIC_PLURAL.val.args[1] = &plone; } } # define INIT_GERMANIC_PLURAL() init_germanic_plural () #endif void internal_function EXTRACT_PLURAL_EXPRESSION (const char *nullentry, const struct expression **pluralp, unsigned long int *npluralsp) { if (nullentry != NULL) { const char *plural; const char *nplurals; plural = strstr (nullentry, "plural="); nplurals = strstr (nullentry, "nplurals="); if (plural == NULL || nplurals == NULL) goto no_plural; else { char *endp; unsigned long int n; struct parse_args args; /* First get the number. */ nplurals += 9; while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) ++nplurals; if (!(*nplurals >= '0' && *nplurals <= '9')) goto no_plural; #if defined HAVE_STRTOUL || defined _LIBC n = strtoul (nplurals, &endp, 10); #else for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) n = n * 10 + (*endp - '0'); #endif if (nplurals == endp) goto no_plural; *npluralsp = n; /* Due to the restrictions bison imposes onto the interface of the scanner function we have to put the input string and the result passed up from the parser into the same structure which address is passed down to the parser. */ plural += 7; args.cp = plural; if (PLURAL_PARSE (&args) != 0) goto no_plural; *pluralp = args.res; } } else { /* By default we are using the Germanic form: singular form only for `one', the plural form otherwise. Yes, this is also what English is using since English is a Germanic language. */ no_plural: INIT_GERMANIC_PLURAL (); *pluralp = &GERMANIC_PLURAL; *npluralsp = 2; } } ebview-0.3.6.2/intl/l10nflist.c0000644000175000017500000002557211241377503015423 0ustar mhattamhatta/* Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for stpcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #if defined _LIBC || defined HAVE_ARGZ_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # ifndef stpcpy # define stpcpy(dest, src) __stpcpy(dest, src) # endif #else # ifndef HAVE_STPCPY static char *stpcpy (char *dest, const char *src); # endif #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) #endif /* Define function which are usually not available. */ #ifdef _LIBC # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) #elif defined HAVE_ARGZ_COUNT # undef __argz_count # define __argz_count argz_count #else /* Returns the number of strings in ARGZ. */ static size_t argz_count__ (const char *argz, size_t len) { size_t count = 0; while (len > 0) { size_t part_len = strlen (argz); argz += part_len + 1; len -= part_len + 1; count++; } return count; } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) #endif /* !_LIBC && !HAVE_ARGZ_COUNT */ #ifdef _LIBC # define __argz_stringify(argz, len, sep) \ INTUSE(__argz_stringify) (argz, len, sep) #elif defined HAVE_ARGZ_STRINGIFY # undef __argz_stringify # define __argz_stringify argz_stringify #else /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ static void argz_stringify__ (char *argz, size_t len, int sep) { while (len > 0) { size_t part_len = strlen (argz); argz += part_len; len -= part_len + 1; if (len > 0) *argz++ = sep; } } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) #endif /* !_LIBC && !HAVE_ARGZ_STRINGIFY */ #ifdef _LIBC #elif defined HAVE_ARGZ_NEXT # undef __argz_next # define __argz_next argz_next #else static char * argz_next__ (char *argz, size_t argz_len, const char *entry) { if (entry) { if (entry < argz + argz_len) entry = strchr (entry, '\0') + 1; return entry >= argz + argz_len ? NULL : (char *) entry; } else if (argz_len > 0) return argz; else return 0; } # undef __argz_next # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) #endif /* !_LIBC && !HAVE_ARGZ_NEXT */ /* Return number of bits set in X. */ static inline int pop (int x) { /* We assume that no more than 16 bits are used. */ x = ((x & ~0x5555) >> 1) + (x & 0x5555); x = ((x & ~0x3333) >> 2) + (x & 0x3333); x = ((x >> 4) + x) & 0x0f0f; x = ((x >> 8) + x) & 0xff; return x; } struct loaded_l10nfile * _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *filename, int do_allocate) { char *abs_filename; struct loaded_l10nfile **lastp; struct loaded_l10nfile *retval; char *cp; size_t dirlist_count; size_t entries; int cnt; /* If LANGUAGE contains an absolute directory specification, we ignore DIRLIST. */ if (IS_ABSOLUTE_PATH (language)) dirlist_len = 0; /* Allocate room for the full file name. */ abs_filename = (char *) malloc (dirlist_len + strlen (language) + ((mask & XPG_TERRITORY) != 0 ? strlen (territory) + 1 : 0) + ((mask & XPG_CODESET) != 0 ? strlen (codeset) + 1 : 0) + ((mask & XPG_NORM_CODESET) != 0 ? strlen (normalized_codeset) + 1 : 0) + ((mask & XPG_MODIFIER) != 0 ? strlen (modifier) + 1 : 0) + 1 + strlen (filename) + 1); if (abs_filename == NULL) return NULL; /* Construct file name. */ cp = abs_filename; if (dirlist_len > 0) { memcpy (cp, dirlist, dirlist_len); __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); cp += dirlist_len; cp[-1] = '/'; } cp = stpcpy (cp, language); if ((mask & XPG_TERRITORY) != 0) { *cp++ = '_'; cp = stpcpy (cp, territory); } if ((mask & XPG_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, codeset); } if ((mask & XPG_NORM_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, normalized_codeset); } if ((mask & XPG_MODIFIER) != 0) { *cp++ = '@'; cp = stpcpy (cp, modifier); } *cp++ = '/'; stpcpy (cp, filename); /* Look in list of already loaded domains whether it is already available. */ lastp = l10nfile_list; for (retval = *l10nfile_list; retval != NULL; retval = retval->next) if (retval->filename != NULL) { int compare = strcmp (retval->filename, abs_filename); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It's not in the list. */ retval = NULL; break; } lastp = &retval->next; } if (retval != NULL || do_allocate == 0) { free (abs_filename); return retval; } dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); /* Allocate a new loaded_l10nfile. */ retval = (struct loaded_l10nfile *) malloc (sizeof (*retval) + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) * sizeof (struct loaded_l10nfile *))); if (retval == NULL) { free (abs_filename); return NULL; } retval->filename = abs_filename; /* We set retval->data to NULL here; it is filled in later. Setting retval->decided to 1 here means that retval does not correspond to a real file (dirlist_count > 1) or is not worth looking up (if an unnormalized codeset was specified). */ retval->decided = (dirlist_count > 1 || ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0)); retval->data = NULL; retval->next = *lastp; *lastp = retval; entries = 0; /* Recurse to fill the inheritance list of RETVAL. If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL entry does not correspond to a real file; retval->filename contains colons. In this case we loop across all elements of DIRLIST and across all bit patterns dominated by MASK. If the DIRLIST is a single directory or entirely redundant (i.e. DIRLIST_COUNT == 1), we loop across all bit patterns dominated by MASK, excluding MASK itself. In either case, we loop down from MASK to 0. This has the effect that the extra bits in the locale name are dropped in this order: first the modifier, then the territory, then the codeset, then the normalized_codeset. */ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) if ((cnt & ~mask) == 0 && !((cnt & XPG_CODESET) != 0 && (cnt & XPG_NORM_CODESET) != 0)) { if (dirlist_count > 1) { /* Iterate over all elements of the DIRLIST. */ char *dir = NULL; while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) != NULL) retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, language, territory, codeset, normalized_codeset, modifier, filename, 1); } else retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, cnt, language, territory, codeset, normalized_codeset, modifier, filename, 1); } retval->successor[entries] = NULL; return retval; } /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ const char * _nl_normalize_codeset (const char *codeset, size_t name_len) { int len = 0; int only_digit = 1; char *retval; char *wp; size_t cnt; for (cnt = 0; cnt < name_len; ++cnt) if (isalnum ((unsigned char) codeset[cnt])) { ++len; if (isalpha ((unsigned char) codeset[cnt])) only_digit = 0; } retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); if (retval != NULL) { if (only_digit) wp = stpcpy (retval, "iso"); else wp = retval; for (cnt = 0; cnt < name_len; ++cnt) if (isalpha ((unsigned char) codeset[cnt])) *wp++ = tolower ((unsigned char) codeset[cnt]); else if (isdigit ((unsigned char) codeset[cnt])) *wp++ = codeset[cnt]; *wp = '\0'; } return (const char *) retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif ebview-0.3.6.2/intl/printf.c0000644000175000017500000002217311241377503015103 0ustar mhattamhatta/* Formatted output to strings, using POSIX/XSI format strings with positions. Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #if !HAVE_POSIX_PRINTF #include #include #include #include /* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ #ifndef EOVERFLOW # define EOVERFLOW E2BIG #endif /* When building a DLL, we must export some functions. Note that because the functions are only defined for binary backward compatibility, we don't need to use __declspec(dllimport) in any case. */ #if defined _MSC_VER && BUILDING_DLL # define DLL_EXPORTED __declspec(dllexport) #else # define DLL_EXPORTED #endif #define STATIC static /* This needs to be consistent with libgnuintl.h.in. */ #if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ /* Don't break __attribute__((format(printf,M,N))). This redefinition is only possible because the libc in NetBSD, Cygwin, mingw does not have a function __printf__. */ # define libintl_printf __printf__ #endif /* Define auxiliary functions declared in "printf-args.h". */ #include "printf-args.c" /* Define auxiliary functions declared in "printf-parse.h". */ #include "printf-parse.c" /* Define functions declared in "vasnprintf.h". */ #define vasnprintf libintl_vasnprintf #include "vasnprintf.c" #if 0 /* not needed */ #define asnprintf libintl_asnprintf #include "asnprintf.c" #endif DLL_EXPORTED int libintl_vfprintf (FILE *stream, const char *format, va_list args) { if (strchr (format, '$') == NULL) return vfprintf (stream, format, args); else { size_t length; char *result = libintl_vasnprintf (NULL, &length, format, args); int retval = -1; if (result != NULL) { size_t written = fwrite (result, 1, length, stream); free (result); if (written == length) { if (length > INT_MAX) errno = EOVERFLOW; else retval = length; } } return retval; } } DLL_EXPORTED int libintl_fprintf (FILE *stream, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vfprintf (stream, format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vprintf (const char *format, va_list args) { return libintl_vfprintf (stdout, format, args); } DLL_EXPORTED int libintl_printf (const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vprintf (format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vsprintf (char *resultbuf, const char *format, va_list args) { if (strchr (format, '$') == NULL) return vsprintf (resultbuf, format, args); else { size_t length = (size_t) ~0 / (4 * sizeof (char)); char *result = libintl_vasnprintf (resultbuf, &length, format, args); if (result != resultbuf) { free (result); return -1; } if (length > INT_MAX) { errno = EOVERFLOW; return -1; } else return length; } } DLL_EXPORTED int libintl_sprintf (char *resultbuf, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vsprintf (resultbuf, format, args); va_end (args); return retval; } #if HAVE_SNPRINTF # if HAVE_DECL__SNPRINTF /* Windows. */ # define system_vsnprintf _vsnprintf # else /* Unix. */ # define system_vsnprintf vsnprintf # endif DLL_EXPORTED int libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args) { if (strchr (format, '$') == NULL) return system_vsnprintf (resultbuf, length, format, args); else { size_t maxlength = length; char *result = libintl_vasnprintf (resultbuf, &length, format, args); if (result != resultbuf) { if (maxlength > 0) { size_t pruned_length = (length < maxlength ? length : maxlength - 1); memcpy (resultbuf, result, pruned_length); resultbuf[pruned_length] = '\0'; } free (result); } if (length > INT_MAX) { errno = EOVERFLOW; return -1; } else return length; } } DLL_EXPORTED int libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vsnprintf (resultbuf, length, format, args); va_end (args); return retval; } #endif #if HAVE_ASPRINTF DLL_EXPORTED int libintl_vasprintf (char **resultp, const char *format, va_list args) { size_t length; char *result = libintl_vasnprintf (NULL, &length, format, args); if (result == NULL) return -1; if (length > INT_MAX) { free (result); errno = EOVERFLOW; return -1; } *resultp = result; return length; } DLL_EXPORTED int libintl_asprintf (char **resultp, const char *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vasprintf (resultp, format, args); va_end (args); return retval; } #endif #if HAVE_FWPRINTF #include #define WIDE_CHAR_VERSION 1 #include "wprintf-parse.h" /* Define auxiliary functions declared in "wprintf-parse.h". */ #define CHAR_T wchar_t #define DIRECTIVE wchar_t_directive #define DIRECTIVES wchar_t_directives #define PRINTF_PARSE wprintf_parse #include "printf-parse.c" /* Define functions declared in "vasnprintf.h". */ #define vasnwprintf libintl_vasnwprintf #include "vasnprintf.c" #if 0 /* not needed */ #define asnwprintf libintl_asnwprintf #include "asnprintf.c" #endif # if HAVE_DECL__SNWPRINTF /* Windows. */ # define system_vswprintf _vsnwprintf # else /* Unix. */ # define system_vswprintf vswprintf # endif DLL_EXPORTED int libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) { if (wcschr (format, '$') == NULL) return vfwprintf (stream, format, args); else { size_t length; wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args); int retval = -1; if (result != NULL) { size_t i; for (i = 0; i < length; i++) if (fputwc (result[i], stream) == WEOF) break; free (result); if (i == length) { if (length > INT_MAX) errno = EOVERFLOW; else retval = length; } } return retval; } } DLL_EXPORTED int libintl_fwprintf (FILE *stream, const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vfwprintf (stream, format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vwprintf (const wchar_t *format, va_list args) { return libintl_vfwprintf (stdout, format, args); } DLL_EXPORTED int libintl_wprintf (const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vwprintf (format, args); va_end (args); return retval; } DLL_EXPORTED int libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args) { if (wcschr (format, '$') == NULL) return system_vswprintf (resultbuf, length, format, args); else { size_t maxlength = length; wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args); if (result != resultbuf) { if (maxlength > 0) { size_t pruned_length = (length < maxlength ? length : maxlength - 1); memcpy (resultbuf, result, pruned_length * sizeof (wchar_t)); resultbuf[pruned_length] = 0; } free (result); /* Unlike vsnprintf, which has to return the number of character that would have been produced if the resultbuf had been sufficiently large, the vswprintf function has to return a negative value if the resultbuf was not sufficiently large. */ if (length >= maxlength) return -1; } if (length > INT_MAX) { errno = EOVERFLOW; return -1; } else return length; } } DLL_EXPORTED int libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...) { va_list args; int retval; va_start (args, format); retval = libintl_vswprintf (resultbuf, length, format, args); va_end (args); return retval; } #endif #endif ebview-0.3.6.2/intl/ngettext.c0000644000175000017500000000367411241377503015450 0ustar mhattamhatta/* Implementation of ngettext(3) function. Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define NGETTEXT __ngettext # define DCNGETTEXT __dcngettext #else # define NGETTEXT libintl_ngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__ngettext, ngettext); #endif ebview-0.3.6.2/intl/loadmsgcat.c0000644000175000017500000010270011241377503015712 0ustar mhattamhatta/* Load needed message catalogs. Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #ifdef __GNUC__ # undef alloca # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # ifdef _MSC_VER # include # define alloca _alloca # else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif # endif #endif #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #ifdef _LIBC # include # include #endif #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || (defined _LIBC && defined _POSIX_MAPPED_FILES) # include # undef HAVE_MMAP # define HAVE_MMAP 1 #else # undef HAVE_MMAP #endif #if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC # include #endif #if defined HAVE_INTTYPES_H || defined _LIBC # include #endif #include "gmo.h" #include "gettextP.h" #include "hash-string.h" #include "plural-exp.h" #ifdef _LIBC # include "../locale/localeinfo.h" # include #endif /* Handle multi-threaded applications. */ #ifdef _LIBC # include #else # include "lock.h" #endif /* Provide fallback values for macros that ought to be defined in . Note that our fallback values need not be literal strings, because we don't use them with preprocessor string concatenation. */ #if !defined PRId8 || PRI_MACROS_BROKEN # undef PRId8 # define PRId8 "d" #endif #if !defined PRIi8 || PRI_MACROS_BROKEN # undef PRIi8 # define PRIi8 "i" #endif #if !defined PRIo8 || PRI_MACROS_BROKEN # undef PRIo8 # define PRIo8 "o" #endif #if !defined PRIu8 || PRI_MACROS_BROKEN # undef PRIu8 # define PRIu8 "u" #endif #if !defined PRIx8 || PRI_MACROS_BROKEN # undef PRIx8 # define PRIx8 "x" #endif #if !defined PRIX8 || PRI_MACROS_BROKEN # undef PRIX8 # define PRIX8 "X" #endif #if !defined PRId16 || PRI_MACROS_BROKEN # undef PRId16 # define PRId16 "d" #endif #if !defined PRIi16 || PRI_MACROS_BROKEN # undef PRIi16 # define PRIi16 "i" #endif #if !defined PRIo16 || PRI_MACROS_BROKEN # undef PRIo16 # define PRIo16 "o" #endif #if !defined PRIu16 || PRI_MACROS_BROKEN # undef PRIu16 # define PRIu16 "u" #endif #if !defined PRIx16 || PRI_MACROS_BROKEN # undef PRIx16 # define PRIx16 "x" #endif #if !defined PRIX16 || PRI_MACROS_BROKEN # undef PRIX16 # define PRIX16 "X" #endif #if !defined PRId32 || PRI_MACROS_BROKEN # undef PRId32 # define PRId32 "d" #endif #if !defined PRIi32 || PRI_MACROS_BROKEN # undef PRIi32 # define PRIi32 "i" #endif #if !defined PRIo32 || PRI_MACROS_BROKEN # undef PRIo32 # define PRIo32 "o" #endif #if !defined PRIu32 || PRI_MACROS_BROKEN # undef PRIu32 # define PRIu32 "u" #endif #if !defined PRIx32 || PRI_MACROS_BROKEN # undef PRIx32 # define PRIx32 "x" #endif #if !defined PRIX32 || PRI_MACROS_BROKEN # undef PRIX32 # define PRIX32 "X" #endif #if !defined PRId64 || PRI_MACROS_BROKEN # undef PRId64 # define PRId64 (sizeof (long) == 8 ? "ld" : "lld") #endif #if !defined PRIi64 || PRI_MACROS_BROKEN # undef PRIi64 # define PRIi64 (sizeof (long) == 8 ? "li" : "lli") #endif #if !defined PRIo64 || PRI_MACROS_BROKEN # undef PRIo64 # define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") #endif #if !defined PRIu64 || PRI_MACROS_BROKEN # undef PRIu64 # define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") #endif #if !defined PRIx64 || PRI_MACROS_BROKEN # undef PRIx64 # define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") #endif #if !defined PRIX64 || PRI_MACROS_BROKEN # undef PRIX64 # define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") #endif #if !defined PRIdLEAST8 || PRI_MACROS_BROKEN # undef PRIdLEAST8 # define PRIdLEAST8 "d" #endif #if !defined PRIiLEAST8 || PRI_MACROS_BROKEN # undef PRIiLEAST8 # define PRIiLEAST8 "i" #endif #if !defined PRIoLEAST8 || PRI_MACROS_BROKEN # undef PRIoLEAST8 # define PRIoLEAST8 "o" #endif #if !defined PRIuLEAST8 || PRI_MACROS_BROKEN # undef PRIuLEAST8 # define PRIuLEAST8 "u" #endif #if !defined PRIxLEAST8 || PRI_MACROS_BROKEN # undef PRIxLEAST8 # define PRIxLEAST8 "x" #endif #if !defined PRIXLEAST8 || PRI_MACROS_BROKEN # undef PRIXLEAST8 # define PRIXLEAST8 "X" #endif #if !defined PRIdLEAST16 || PRI_MACROS_BROKEN # undef PRIdLEAST16 # define PRIdLEAST16 "d" #endif #if !defined PRIiLEAST16 || PRI_MACROS_BROKEN # undef PRIiLEAST16 # define PRIiLEAST16 "i" #endif #if !defined PRIoLEAST16 || PRI_MACROS_BROKEN # undef PRIoLEAST16 # define PRIoLEAST16 "o" #endif #if !defined PRIuLEAST16 || PRI_MACROS_BROKEN # undef PRIuLEAST16 # define PRIuLEAST16 "u" #endif #if !defined PRIxLEAST16 || PRI_MACROS_BROKEN # undef PRIxLEAST16 # define PRIxLEAST16 "x" #endif #if !defined PRIXLEAST16 || PRI_MACROS_BROKEN # undef PRIXLEAST16 # define PRIXLEAST16 "X" #endif #if !defined PRIdLEAST32 || PRI_MACROS_BROKEN # undef PRIdLEAST32 # define PRIdLEAST32 "d" #endif #if !defined PRIiLEAST32 || PRI_MACROS_BROKEN # undef PRIiLEAST32 # define PRIiLEAST32 "i" #endif #if !defined PRIoLEAST32 || PRI_MACROS_BROKEN # undef PRIoLEAST32 # define PRIoLEAST32 "o" #endif #if !defined PRIuLEAST32 || PRI_MACROS_BROKEN # undef PRIuLEAST32 # define PRIuLEAST32 "u" #endif #if !defined PRIxLEAST32 || PRI_MACROS_BROKEN # undef PRIxLEAST32 # define PRIxLEAST32 "x" #endif #if !defined PRIXLEAST32 || PRI_MACROS_BROKEN # undef PRIXLEAST32 # define PRIXLEAST32 "X" #endif #if !defined PRIdLEAST64 || PRI_MACROS_BROKEN # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 #endif #if !defined PRIiLEAST64 || PRI_MACROS_BROKEN # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 #endif #if !defined PRIoLEAST64 || PRI_MACROS_BROKEN # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 #endif #if !defined PRIuLEAST64 || PRI_MACROS_BROKEN # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 #endif #if !defined PRIxLEAST64 || PRI_MACROS_BROKEN # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 #endif #if !defined PRIXLEAST64 || PRI_MACROS_BROKEN # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 #endif #if !defined PRIdFAST8 || PRI_MACROS_BROKEN # undef PRIdFAST8 # define PRIdFAST8 "d" #endif #if !defined PRIiFAST8 || PRI_MACROS_BROKEN # undef PRIiFAST8 # define PRIiFAST8 "i" #endif #if !defined PRIoFAST8 || PRI_MACROS_BROKEN # undef PRIoFAST8 # define PRIoFAST8 "o" #endif #if !defined PRIuFAST8 || PRI_MACROS_BROKEN # undef PRIuFAST8 # define PRIuFAST8 "u" #endif #if !defined PRIxFAST8 || PRI_MACROS_BROKEN # undef PRIxFAST8 # define PRIxFAST8 "x" #endif #if !defined PRIXFAST8 || PRI_MACROS_BROKEN # undef PRIXFAST8 # define PRIXFAST8 "X" #endif #if !defined PRIdFAST16 || PRI_MACROS_BROKEN # undef PRIdFAST16 # define PRIdFAST16 "d" #endif #if !defined PRIiFAST16 || PRI_MACROS_BROKEN # undef PRIiFAST16 # define PRIiFAST16 "i" #endif #if !defined PRIoFAST16 || PRI_MACROS_BROKEN # undef PRIoFAST16 # define PRIoFAST16 "o" #endif #if !defined PRIuFAST16 || PRI_MACROS_BROKEN # undef PRIuFAST16 # define PRIuFAST16 "u" #endif #if !defined PRIxFAST16 || PRI_MACROS_BROKEN # undef PRIxFAST16 # define PRIxFAST16 "x" #endif #if !defined PRIXFAST16 || PRI_MACROS_BROKEN # undef PRIXFAST16 # define PRIXFAST16 "X" #endif #if !defined PRIdFAST32 || PRI_MACROS_BROKEN # undef PRIdFAST32 # define PRIdFAST32 "d" #endif #if !defined PRIiFAST32 || PRI_MACROS_BROKEN # undef PRIiFAST32 # define PRIiFAST32 "i" #endif #if !defined PRIoFAST32 || PRI_MACROS_BROKEN # undef PRIoFAST32 # define PRIoFAST32 "o" #endif #if !defined PRIuFAST32 || PRI_MACROS_BROKEN # undef PRIuFAST32 # define PRIuFAST32 "u" #endif #if !defined PRIxFAST32 || PRI_MACROS_BROKEN # undef PRIxFAST32 # define PRIxFAST32 "x" #endif #if !defined PRIXFAST32 || PRI_MACROS_BROKEN # undef PRIXFAST32 # define PRIXFAST32 "X" #endif #if !defined PRIdFAST64 || PRI_MACROS_BROKEN # undef PRIdFAST64 # define PRIdFAST64 PRId64 #endif #if !defined PRIiFAST64 || PRI_MACROS_BROKEN # undef PRIiFAST64 # define PRIiFAST64 PRIi64 #endif #if !defined PRIoFAST64 || PRI_MACROS_BROKEN # undef PRIoFAST64 # define PRIoFAST64 PRIo64 #endif #if !defined PRIuFAST64 || PRI_MACROS_BROKEN # undef PRIuFAST64 # define PRIuFAST64 PRIu64 #endif #if !defined PRIxFAST64 || PRI_MACROS_BROKEN # undef PRIxFAST64 # define PRIxFAST64 PRIx64 #endif #if !defined PRIXFAST64 || PRI_MACROS_BROKEN # undef PRIXFAST64 # define PRIXFAST64 PRIX64 #endif #if !defined PRIdMAX || PRI_MACROS_BROKEN # undef PRIdMAX # define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") #endif #if !defined PRIiMAX || PRI_MACROS_BROKEN # undef PRIiMAX # define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") #endif #if !defined PRIoMAX || PRI_MACROS_BROKEN # undef PRIoMAX # define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") #endif #if !defined PRIuMAX || PRI_MACROS_BROKEN # undef PRIuMAX # define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") #endif #if !defined PRIxMAX || PRI_MACROS_BROKEN # undef PRIxMAX # define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") #endif #if !defined PRIXMAX || PRI_MACROS_BROKEN # undef PRIXMAX # define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") #endif #if !defined PRIdPTR || PRI_MACROS_BROKEN # undef PRIdPTR # define PRIdPTR \ (sizeof (void *) == sizeof (long) ? "ld" : \ sizeof (void *) == sizeof (int) ? "d" : \ "lld") #endif #if !defined PRIiPTR || PRI_MACROS_BROKEN # undef PRIiPTR # define PRIiPTR \ (sizeof (void *) == sizeof (long) ? "li" : \ sizeof (void *) == sizeof (int) ? "i" : \ "lli") #endif #if !defined PRIoPTR || PRI_MACROS_BROKEN # undef PRIoPTR # define PRIoPTR \ (sizeof (void *) == sizeof (long) ? "lo" : \ sizeof (void *) == sizeof (int) ? "o" : \ "llo") #endif #if !defined PRIuPTR || PRI_MACROS_BROKEN # undef PRIuPTR # define PRIuPTR \ (sizeof (void *) == sizeof (long) ? "lu" : \ sizeof (void *) == sizeof (int) ? "u" : \ "llu") #endif #if !defined PRIxPTR || PRI_MACROS_BROKEN # undef PRIxPTR # define PRIxPTR \ (sizeof (void *) == sizeof (long) ? "lx" : \ sizeof (void *) == sizeof (int) ? "x" : \ "llx") #endif #if !defined PRIXPTR || PRI_MACROS_BROKEN # undef PRIXPTR # define PRIXPTR \ (sizeof (void *) == sizeof (long) ? "lX" : \ sizeof (void *) == sizeof (int) ? "X" : \ "llX") #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ISO C functions. This is required by the standard because some ISO C functions will require linking with this object file and the name space must not be polluted. */ # define open(name, flags) open_not_cancel_2 (name, flags) # define close(fd) close_not_cancel_no_status (fd) # define read(fd, buf, n) read_not_cancel (fd, buf, n) # define mmap(addr, len, prot, flags, fd, offset) \ __mmap (addr, len, prot, flags, fd, offset) # define munmap(addr, len) __munmap (addr, len) #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in . */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #ifdef __BEOS__ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif /* On reasonable systems, binary I/O is the default. */ #ifndef O_BINARY # define O_BINARY 0 #endif /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr; /* Expand a system dependent string segment. Return NULL if unsupported. */ static const char * get_sysdep_segment_value (const char *name) { /* Test for an ISO C 99 section 7.8.1 format string directive. Syntax: P R I { d | i | o | u | x | X } { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ /* We don't use a table of 14 times 6 'const char *' strings here, because data relocations cost startup time. */ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') { if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' || name[3] == 'x' || name[3] == 'X') { if (name[4] == '8' && name[5] == '\0') { if (name[3] == 'd') return PRId8; if (name[3] == 'i') return PRIi8; if (name[3] == 'o') return PRIo8; if (name[3] == 'u') return PRIu8; if (name[3] == 'x') return PRIx8; if (name[3] == 'X') return PRIX8; abort (); } if (name[4] == '1' && name[5] == '6' && name[6] == '\0') { if (name[3] == 'd') return PRId16; if (name[3] == 'i') return PRIi16; if (name[3] == 'o') return PRIo16; if (name[3] == 'u') return PRIu16; if (name[3] == 'x') return PRIx16; if (name[3] == 'X') return PRIX16; abort (); } if (name[4] == '3' && name[5] == '2' && name[6] == '\0') { if (name[3] == 'd') return PRId32; if (name[3] == 'i') return PRIi32; if (name[3] == 'o') return PRIo32; if (name[3] == 'u') return PRIu32; if (name[3] == 'x') return PRIx32; if (name[3] == 'X') return PRIX32; abort (); } if (name[4] == '6' && name[5] == '4' && name[6] == '\0') { if (name[3] == 'd') return PRId64; if (name[3] == 'i') return PRIi64; if (name[3] == 'o') return PRIo64; if (name[3] == 'u') return PRIu64; if (name[3] == 'x') return PRIx64; if (name[3] == 'X') return PRIX64; abort (); } if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' && name[7] == 'S' && name[8] == 'T') { if (name[9] == '8' && name[10] == '\0') { if (name[3] == 'd') return PRIdLEAST8; if (name[3] == 'i') return PRIiLEAST8; if (name[3] == 'o') return PRIoLEAST8; if (name[3] == 'u') return PRIuLEAST8; if (name[3] == 'x') return PRIxLEAST8; if (name[3] == 'X') return PRIXLEAST8; abort (); } if (name[9] == '1' && name[10] == '6' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST16; if (name[3] == 'i') return PRIiLEAST16; if (name[3] == 'o') return PRIoLEAST16; if (name[3] == 'u') return PRIuLEAST16; if (name[3] == 'x') return PRIxLEAST16; if (name[3] == 'X') return PRIXLEAST16; abort (); } if (name[9] == '3' && name[10] == '2' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST32; if (name[3] == 'i') return PRIiLEAST32; if (name[3] == 'o') return PRIoLEAST32; if (name[3] == 'u') return PRIuLEAST32; if (name[3] == 'x') return PRIxLEAST32; if (name[3] == 'X') return PRIXLEAST32; abort (); } if (name[9] == '6' && name[10] == '4' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST64; if (name[3] == 'i') return PRIiLEAST64; if (name[3] == 'o') return PRIoLEAST64; if (name[3] == 'u') return PRIuLEAST64; if (name[3] == 'x') return PRIxLEAST64; if (name[3] == 'X') return PRIXLEAST64; abort (); } } if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' && name[7] == 'T') { if (name[8] == '8' && name[9] == '\0') { if (name[3] == 'd') return PRIdFAST8; if (name[3] == 'i') return PRIiFAST8; if (name[3] == 'o') return PRIoFAST8; if (name[3] == 'u') return PRIuFAST8; if (name[3] == 'x') return PRIxFAST8; if (name[3] == 'X') return PRIXFAST8; abort (); } if (name[8] == '1' && name[9] == '6' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST16; if (name[3] == 'i') return PRIiFAST16; if (name[3] == 'o') return PRIoFAST16; if (name[3] == 'u') return PRIuFAST16; if (name[3] == 'x') return PRIxFAST16; if (name[3] == 'X') return PRIXFAST16; abort (); } if (name[8] == '3' && name[9] == '2' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST32; if (name[3] == 'i') return PRIiFAST32; if (name[3] == 'o') return PRIoFAST32; if (name[3] == 'u') return PRIuFAST32; if (name[3] == 'x') return PRIxFAST32; if (name[3] == 'X') return PRIXFAST32; abort (); } if (name[8] == '6' && name[9] == '4' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST64; if (name[3] == 'i') return PRIiFAST64; if (name[3] == 'o') return PRIoFAST64; if (name[3] == 'u') return PRIuFAST64; if (name[3] == 'x') return PRIxFAST64; if (name[3] == 'X') return PRIXFAST64; abort (); } } if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' && name[7] == '\0') { if (name[3] == 'd') return PRIdMAX; if (name[3] == 'i') return PRIiMAX; if (name[3] == 'o') return PRIoMAX; if (name[3] == 'u') return PRIuMAX; if (name[3] == 'x') return PRIxMAX; if (name[3] == 'X') return PRIXMAX; abort (); } if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' && name[7] == '\0') { if (name[3] == 'd') return PRIdPTR; if (name[3] == 'i') return PRIiPTR; if (name[3] == 'o') return PRIoPTR; if (name[3] == 'u') return PRIuPTR; if (name[3] == 'x') return PRIxPTR; if (name[3] == 'X') return PRIXPTR; abort (); } } } /* Test for a glibc specific printf() format directive flag. */ if (name[0] == 'I' && name[1] == '\0') { #if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) /* The 'I' flag, in numeric format directives, replaces ASCII digits with the 'outdigits' defined in the LC_CTYPE locale facet. This is used for Farsi (Persian) and maybe Arabic. */ return "I"; #else return ""; #endif } /* Other system dependent strings are not valid. */ return NULL; } /* Load the message catalogs specified by FILENAME. If it is no valid message catalog do nothing. */ void internal_function _nl_load_domain (struct loaded_l10nfile *domain_file, struct binding *domainbinding) { __libc_lock_define_initialized_recursive (static, lock) int fd = -1; size_t size; #ifdef _LIBC struct stat64 st; #else struct stat st; #endif struct mo_file_header *data = (struct mo_file_header *) -1; int use_mmap = 0; struct loaded_domain *domain; int revision; const char *nullentry; size_t nullentrylen; __libc_lock_lock_recursive (lock); if (domain_file->decided != 0) { /* There are two possibilities: + this is the same thread calling again during this initialization via _nl_find_msg. We have initialized everything this call needs. + this is another thread which tried to initialize this object. Not necessary anymore since if the lock is available this is finished. */ goto done; } domain_file->decided = -1; domain_file->data = NULL; /* Note that it would be useless to store domainbinding in domain_file because domainbinding might be == NULL now but != NULL later (after a call to bind_textdomain_codeset). */ /* If the record does not represent a valid locale the FILENAME might be NULL. This can happen when according to the given specification the locale file name is different for XPG and CEN syntax. */ if (domain_file->filename == NULL) goto out; /* Try to open the addressed file. */ fd = open (domain_file->filename, O_RDONLY | O_BINARY); if (fd == -1) goto out; /* We must know about the size of the file. */ if ( #ifdef _LIBC __builtin_expect (fstat64 (fd, &st) != 0, 0) #else __builtin_expect (fstat (fd, &st) != 0, 0) #endif || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) || __builtin_expect (size < sizeof (struct mo_file_header), 0)) /* Something went wrong. */ goto out; #ifdef HAVE_MMAP /* Now we are ready to load the file. If mmap() is available we try this first. If not available or it failed we try to load it. */ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); if (__builtin_expect (data != (struct mo_file_header *) -1, 1)) { /* mmap() call was successful. */ close (fd); fd = -1; use_mmap = 1; } #endif /* If the data is not yet available (i.e. mmap'ed) we try to load it manually. */ if (data == (struct mo_file_header *) -1) { size_t to_read; char *read_ptr; data = (struct mo_file_header *) malloc (size); if (data == NULL) goto out; to_read = size; read_ptr = (char *) data; do { long int nb = (long int) read (fd, read_ptr, to_read); if (nb <= 0) { #ifdef EINTR if (nb == -1 && errno == EINTR) continue; #endif goto out; } read_ptr += nb; to_read -= nb; } while (to_read > 0); close (fd); fd = -1; } /* Using the magic number we can test whether it really is a message catalog file. */ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED, 0)) { /* The magic number is wrong: not a message catalog file. */ #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); goto out; } domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); if (domain == NULL) goto out; domain_file->data = domain; domain->data = (char *) data; domain->use_mmap = use_mmap; domain->mmap_size = size; domain->must_swap = data->magic != _MAGIC; domain->malloced = NULL; /* Fill in the information about the available tables. */ revision = W (domain->must_swap, data->revision); /* We support only the major revisions 0 and 1. */ switch (revision >> 16) { case 0: case 1: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); domain->trans_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->trans_tab_offset)); domain->hash_size = W (domain->must_swap, data->hash_tab_size); domain->hash_tab = (domain->hash_size > 2 ? (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->hash_tab_offset)) : NULL); domain->must_swap_hash_tab = domain->must_swap; /* Now dispatch on the minor revision. */ switch (revision & 0xffff) { case 0: domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; break; case 1: default: { nls_uint32 n_sysdep_strings; if (domain->hash_tab == NULL) /* This is invalid. These minor revisions need a hash table. */ goto invalid; n_sysdep_strings = W (domain->must_swap, data->n_sysdep_strings); if (n_sysdep_strings > 0) { nls_uint32 n_sysdep_segments; const struct sysdep_segment *sysdep_segments; const char **sysdep_segment_values; const nls_uint32 *orig_sysdep_tab; const nls_uint32 *trans_sysdep_tab; nls_uint32 n_inmem_sysdep_strings; size_t memneed; char *mem; struct sysdep_string_desc *inmem_orig_sysdep_tab; struct sysdep_string_desc *inmem_trans_sysdep_tab; nls_uint32 *inmem_hash_tab; unsigned int i, j; /* Get the values of the system dependent segments. */ n_sysdep_segments = W (domain->must_swap, data->n_sysdep_segments); sysdep_segments = (const struct sysdep_segment *) ((char *) data + W (domain->must_swap, data->sysdep_segments_offset)); sysdep_segment_values = (const char **) alloca (n_sysdep_segments * sizeof (const char *)); for (i = 0; i < n_sysdep_segments; i++) { const char *name = (char *) data + W (domain->must_swap, sysdep_segments[i].offset); nls_uint32 namelen = W (domain->must_swap, sysdep_segments[i].length); if (!(namelen > 0 && name[namelen - 1] == '\0')) { freea (sysdep_segment_values); goto invalid; } sysdep_segment_values[i] = get_sysdep_segment_value (name); } orig_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->orig_sysdep_tab_offset)); trans_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->trans_sysdep_tab_offset)); /* Compute the amount of additional memory needed for the system dependent strings and the augmented hash table. At the same time, also drop string pairs which refer to an undefined system dependent segment. */ n_inmem_sysdep_strings = 0; memneed = domain->hash_size * sizeof (nls_uint32); for (i = 0; i < n_sysdep_strings; i++) { int valid = 1; size_t needs[2]; for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); size_t need = 0; const struct segment_pair *p = sysdep_string->segments; if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) for (p = sysdep_string->segments;; p++) { nls_uint32 sysdepref; need += W (domain->must_swap, p->segsize); sysdepref = W (domain->must_swap, p->sysdepref); if (sysdepref == SEGMENTS_END) break; if (sysdepref >= n_sysdep_segments) { /* Invalid. */ freea (sysdep_segment_values); goto invalid; } if (sysdep_segment_values[sysdepref] == NULL) { /* This particular string pair is invalid. */ valid = 0; break; } need += strlen (sysdep_segment_values[sysdepref]); } needs[j] = need; if (!valid) break; } if (valid) { n_inmem_sysdep_strings++; memneed += needs[0] + needs[1]; } } memneed += 2 * n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); if (n_inmem_sysdep_strings > 0) { unsigned int k; /* Allocate additional memory. */ mem = (char *) malloc (memneed); if (mem == NULL) goto invalid; domain->malloced = mem; inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_inmem_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_hash_tab = (nls_uint32 *) mem; mem += domain->hash_size * sizeof (nls_uint32); /* Compute the system dependent strings. */ k = 0; for (i = 0; i < n_sysdep_strings; i++) { int valid = 1; for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); const struct segment_pair *p = sysdep_string->segments; if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) for (p = sysdep_string->segments;; p++) { nls_uint32 sysdepref; sysdepref = W (domain->must_swap, p->sysdepref); if (sysdepref == SEGMENTS_END) break; if (sysdep_segment_values[sysdepref] == NULL) { /* This particular string pair is invalid. */ valid = 0; break; } } if (!valid) break; } if (valid) { for (j = 0; j < 2; j++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, j == 0 ? orig_sysdep_tab[i] : trans_sysdep_tab[i])); const char *static_segments = (char *) data + W (domain->must_swap, sysdep_string->offset); const struct segment_pair *p = sysdep_string->segments; /* Concatenate the segments, and fill inmem_orig_sysdep_tab[k] (for j == 0) and inmem_trans_sysdep_tab[k] (for j == 1). */ struct sysdep_string_desc *inmem_tab_entry = (j == 0 ? inmem_orig_sysdep_tab : inmem_trans_sysdep_tab) + k; if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) { /* Only one static segment. */ inmem_tab_entry->length = W (domain->must_swap, p->segsize); inmem_tab_entry->pointer = static_segments; } else { inmem_tab_entry->pointer = mem; for (p = sysdep_string->segments;; p++) { nls_uint32 segsize = W (domain->must_swap, p->segsize); nls_uint32 sysdepref = W (domain->must_swap, p->sysdepref); size_t n; if (segsize > 0) { memcpy (mem, static_segments, segsize); mem += segsize; static_segments += segsize; } if (sysdepref == SEGMENTS_END) break; n = strlen (sysdep_segment_values[sysdepref]); memcpy (mem, sysdep_segment_values[sysdepref], n); mem += n; } inmem_tab_entry->length = mem - inmem_tab_entry->pointer; } } k++; } } if (k != n_inmem_sysdep_strings) abort (); /* Compute the augmented hash table. */ for (i = 0; i < domain->hash_size; i++) inmem_hash_tab[i] = W (domain->must_swap_hash_tab, domain->hash_tab[i]); for (i = 0; i < n_inmem_sysdep_strings; i++) { const char *msgid = inmem_orig_sysdep_tab[i].pointer; nls_uint32 hash_val = __hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); for (;;) { if (inmem_hash_tab[idx] == 0) { /* Hash table entry is empty. Use it. */ inmem_hash_tab[idx] = 1 + domain->nstrings + i; break; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } } domain->n_sysdep_strings = n_inmem_sysdep_strings; domain->orig_sysdep_tab = inmem_orig_sysdep_tab; domain->trans_sysdep_tab = inmem_trans_sysdep_tab; domain->hash_tab = inmem_hash_tab; domain->must_swap_hash_tab = 0; } else { domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; } freea (sysdep_segment_values); } else { domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; } } break; } break; default: /* This is an invalid revision. */ invalid: /* This is an invalid .mo file. */ if (domain->malloced) free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); free (domain); domain_file->data = NULL; goto out; } /* No caches of converted translations so far. */ domain->conversions = NULL; domain->nconversions = 0; gl_rwlock_init (domain->conversions_lock); /* Get the header entry and look for a plural specification. */ #ifdef IN_LIBGLOCALE nullentry = _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen); #else nullentry = _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen); #endif EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); out: if (fd != -1) close (fd); domain_file->decided = 1; done: __libc_lock_unlock_recursive (lock); } #ifdef _LIBC void internal_function __libc_freeres_fn_section _nl_unload_domain (struct loaded_domain *domain) { size_t i; if (domain->plural != &__gettext_germanic_plural) __gettext_free_exp ((struct expression *) domain->plural); for (i = 0; i < domain->nconversions; i++) { struct converted_domain *convd = &domain->conversions[i]; free (convd->encoding); if (convd->conv_tab != NULL && convd->conv_tab != (char **) -1) free (convd->conv_tab); if (convd->conv != (__gconv_t) -1) __gconv_close (convd->conv); } if (domain->conversions != NULL) free (domain->conversions); __libc_rwlock_fini (domain->conversions_lock); if (domain->malloced) free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else # endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); free (domain); } #endif ebview-0.3.6.2/intl/printf-parse.c0000644000175000017500000003306011241377503016210 0ustar mhattamhatta/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 2006-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include # endif #else # include #endif /* malloc(), realloc(), free(). */ #include /* errno. */ #include /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = 1; d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE)); if (d->dir == NULL) /* Out of memory. */ goto out_of_memory_1; a->count = 0; a_allocated = 0; a->arg = NULL; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) realloc (d->dir, memory_size); if (memory == NULL) /* Out of memory. */ goto out_of_memory; d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg) free (a->arg); if (d->dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg) free (a->arg); if (d->dir) free (d->dir); out_of_memory_1: errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T ebview-0.3.6.2/intl/vasnprintf.h0000644000175000017500000000544311241377503016001 0ustar mhattamhatta/* vsprintf with automatic memory allocation. Copyright (C) 2002-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ ebview-0.3.6.2/intl/dngettext.c0000644000175000017500000000354611241377503015612 0ustar mhattamhatta/* Implementation of the dngettext(3) function. Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DNGETTEXT __dngettext # define DCNGETTEXT __dcngettext #else # define DNGETTEXT libintl_dngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale and skip message according to the plural form. */ char * DNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dngettext, dngettext); #endif ebview-0.3.6.2/intl/eval-plural.h0000644000175000017500000000534211241377503016031 0ustar mhattamhatta/* Plural expression evaluation. Copyright (C) 2000-2003, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef STATIC #define STATIC static #endif /* Evaluate the plural expression and return an index value. */ STATIC unsigned long int internal_function plural_eval (const struct expression *pexp, unsigned long int n) { switch (pexp->nargs) { case 0: switch (pexp->operation) { case var: return n; case num: return pexp->val.num; default: break; } /* NOTREACHED */ break; case 1: { /* pexp->operation must be lnot. */ unsigned long int arg = plural_eval (pexp->val.args[0], n); return ! arg; } case 2: { unsigned long int leftarg = plural_eval (pexp->val.args[0], n); if (pexp->operation == lor) return leftarg || plural_eval (pexp->val.args[1], n); else if (pexp->operation == land) return leftarg && plural_eval (pexp->val.args[1], n); else { unsigned long int rightarg = plural_eval (pexp->val.args[1], n); switch (pexp->operation) { case mult: return leftarg * rightarg; case divide: #if !INTDIV0_RAISES_SIGFPE if (rightarg == 0) raise (SIGFPE); #endif return leftarg / rightarg; case module: #if !INTDIV0_RAISES_SIGFPE if (rightarg == 0) raise (SIGFPE); #endif return leftarg % rightarg; case plus: return leftarg + rightarg; case minus: return leftarg - rightarg; case less_than: return leftarg < rightarg; case greater_than: return leftarg > rightarg; case less_or_equal: return leftarg <= rightarg; case greater_or_equal: return leftarg >= rightarg; case equal: return leftarg == rightarg; case not_equal: return leftarg != rightarg; default: break; } } /* NOTREACHED */ break; } case 3: { /* pexp->operation must be qmop. */ unsigned long int boolarg = plural_eval (pexp->val.args[0], n); return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); } } /* NOTREACHED */ return 0; } ebview-0.3.6.2/intl/tsearch.c0000644000175000017500000004462011241377503015233 0ustar mhattamhatta/* Copyright (C) 1995, 1996, 1997, 2000, 2006 Free Software Foundation, Inc. Contributed by Bernd Schmidt , 1997. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tree search for red/black trees. The algorithm for adding nodes is taken from one of the many "Algorithms" books by Robert Sedgewick, although the implementation differs. The algorithm for deleting nodes can probably be found in a book named "Introduction to Algorithms" by Cormen/Leiserson/Rivest. At least that's the book that my professor took most algorithms from during the "Data Structures" course... Totally public domain. */ /* Red/black trees are binary trees in which the edges are colored either red or black. They have the following properties: 1. The number of black edges on every path from the root to a leaf is constant. 2. No two red edges are adjacent. Therefore there is an upper bound on the length of every path, it's O(log n) where n is the number of nodes in the tree. No path can be longer than 1+2*P where P is the length of the shortest path in the tree. Useful for the implementation: 3. If one of the children of a node is NULL, then the other one is red (if it exists). In the implementation, not the edges are colored, but the nodes. The color interpreted as the color of the edge leading to this node. The color is meaningless for the root node, but we color the root node black for convenience. All added nodes are red initially. Adding to a red/black tree is rather easy. The right place is searched with a usual binary tree search. Additionally, whenever a node N is reached that has two red successors, the successors are colored black and the node itself colored red. This moves red edges up the tree where they pose less of a problem once we get to really insert the new node. Changing N's color to red may violate rule 2, however, so rotations may become necessary to restore the invariants. Adding a new red leaf may violate the same rule, so afterwards an additional check is run and the tree possibly rotated. Deleting is hairy. There are mainly two nodes involved: the node to be deleted (n1), and another node that is to be unchained from the tree (n2). If n1 has a successor (the node with a smallest key that is larger than n1), then the successor becomes n2 and its contents are copied into n1, otherwise n1 becomes n2. Unchaining a node may violate rule 1: if n2 is black, one subtree is missing one black edge afterwards. The algorithm must try to move this error upwards towards the root, so that the subtree that does not have enough black edges becomes the whole tree. Once that happens, the error has disappeared. It may not be necessary to go all the way up, since it is possible that rotations and recoloring can fix the error before that. Although the deletion algorithm must walk upwards through the tree, we do not store parent pointers in the nodes. Instead, delete allocates a small array of parent pointers and fills it while descending the tree. Since we know that the length of a path is O(log n), where n is the number of nodes, this is likely to use less memory. */ /* Tree rotations look like this: A C / \ / \ B C A G / \ / \ --> / \ D E F G B F / \ D E In this case, A has been rotated left. This preserves the ordering of the binary tree. */ #include /* Specification. */ #ifdef IN_LIBINTL # include "tsearch.h" #else # include #endif #include typedef int (*__compar_fn_t) (const void *, const void *); typedef void (*__action_fn_t) (const void *, VISIT, int); #ifndef weak_alias # define __tsearch tsearch # define __tfind tfind # define __tdelete tdelete # define __twalk twalk #endif #ifndef internal_function /* Inside GNU libc we mark some function in a special way. In other environments simply ignore the marking. */ # define internal_function #endif typedef struct node_t { /* Callers expect this to be the first element in the structure - do not move! */ const void *key; struct node_t *left; struct node_t *right; unsigned int red:1; } *node; typedef const struct node_t *const_node; #undef DEBUGGING #ifdef DEBUGGING /* Routines to check tree invariants. */ #include #define CHECK_TREE(a) check_tree(a) static void check_tree_recurse (node p, int d_sofar, int d_total) { if (p == NULL) { assert (d_sofar == d_total); return; } check_tree_recurse (p->left, d_sofar + (p->left && !p->left->red), d_total); check_tree_recurse (p->right, d_sofar + (p->right && !p->right->red), d_total); if (p->left) assert (!(p->left->red && p->red)); if (p->right) assert (!(p->right->red && p->red)); } static void check_tree (node root) { int cnt = 0; node p; if (root == NULL) return; root->red = 0; for(p = root->left; p; p = p->left) cnt += !p->red; check_tree_recurse (root, 0, cnt); } #else #define CHECK_TREE(a) #endif /* Possibly "split" a node with two red successors, and/or fix up two red edges in a row. ROOTP is a pointer to the lowest node we visited, PARENTP and GPARENTP pointers to its parent/grandparent. P_R and GP_R contain the comparison values that determined which way was taken in the tree to reach ROOTP. MODE is 1 if we need not do the split, but must check for two red edges between GPARENTP and ROOTP. */ static void maybe_split_for_insert (node *rootp, node *parentp, node *gparentp, int p_r, int gp_r, int mode) { node root = *rootp; node *rp, *lp; rp = &(*rootp)->right; lp = &(*rootp)->left; /* See if we have to split this node (both successors red). */ if (mode == 1 || ((*rp) != NULL && (*lp) != NULL && (*rp)->red && (*lp)->red)) { /* This node becomes red, its successors black. */ root->red = 1; if (*rp) (*rp)->red = 0; if (*lp) (*lp)->red = 0; /* If the parent of this node is also red, we have to do rotations. */ if (parentp != NULL && (*parentp)->red) { node gp = *gparentp; node p = *parentp; /* There are two main cases: 1. The edge types (left or right) of the two red edges differ. 2. Both red edges are of the same type. There exist two symmetries of each case, so there is a total of 4 cases. */ if ((p_r > 0) != (gp_r > 0)) { /* Put the child at the top of the tree, with its parent and grandparent as successors. */ p->red = 1; gp->red = 1; root->red = 0; if (p_r < 0) { /* Child is left of parent. */ p->left = *rp; *rp = p; gp->right = *lp; *lp = gp; } else { /* Child is right of parent. */ p->right = *lp; *lp = p; gp->left = *rp; *rp = gp; } *gparentp = root; } else { *gparentp = *parentp; /* Parent becomes the top of the tree, grandparent and child are its successors. */ p->red = 0; gp->red = 1; if (p_r < 0) { /* Left edges. */ gp->left = p->right; p->right = gp; } else { /* Right edges. */ gp->right = p->left; p->left = gp; } } } } } /* Find or insert datum into search tree. KEY is the key to be located, ROOTP is the address of tree root, COMPAR the ordering function. */ void * __tsearch (const void *key, void **vrootp, __compar_fn_t compar) { node q; node *parentp = NULL, *gparentp = NULL; node *rootp = (node *) vrootp; node *nextp; int r = 0, p_r = 0, gp_r = 0; /* No they might not, Mr Compiler. */ if (rootp == NULL) return NULL; /* This saves some additional tests below. */ if (*rootp != NULL) (*rootp)->red = 0; CHECK_TREE (*rootp); nextp = rootp; while (*nextp != NULL) { node root = *rootp; r = (*compar) (key, root->key); if (r == 0) return root; maybe_split_for_insert (rootp, parentp, gparentp, p_r, gp_r, 0); /* If that did any rotations, parentp and gparentp are now garbage. That doesn't matter, because the values they contain are never used again in that case. */ nextp = r < 0 ? &root->left : &root->right; if (*nextp == NULL) break; gparentp = parentp; parentp = rootp; rootp = nextp; gp_r = p_r; p_r = r; } q = (struct node_t *) malloc (sizeof (struct node_t)); if (q != NULL) { *nextp = q; /* link new node to old */ q->key = key; /* initialize new node */ q->red = 1; q->left = q->right = NULL; if (nextp != rootp) /* There may be two red edges in a row now, which we must avoid by rotating the tree. */ maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1); } return q; } #ifdef weak_alias weak_alias (__tsearch, tsearch) #endif /* Find datum in search tree. KEY is the key to be located, ROOTP is the address of tree root, COMPAR the ordering function. */ void * __tfind (key, vrootp, compar) const void *key; void *const *vrootp; __compar_fn_t compar; { node *rootp = (node *) vrootp; if (rootp == NULL) return NULL; CHECK_TREE (*rootp); while (*rootp != NULL) { node root = *rootp; int r; r = (*compar) (key, root->key); if (r == 0) return root; rootp = r < 0 ? &root->left : &root->right; } return NULL; } #ifdef weak_alias weak_alias (__tfind, tfind) #endif /* Delete node with given key. KEY is the key to be deleted, ROOTP is the address of the root of tree, COMPAR the comparison function. */ void * __tdelete (const void *key, void **vrootp, __compar_fn_t compar) { node p, q, r, retval; int cmp; node *rootp = (node *) vrootp; node root, unchained; /* Stack of nodes so we remember the parents without recursion. It's _very_ unlikely that there are paths longer than 40 nodes. The tree would need to have around 250.000 nodes. */ int stacksize = 100; int sp = 0; node *nodestack[100]; if (rootp == NULL) return NULL; p = *rootp; if (p == NULL) return NULL; CHECK_TREE (p); while ((cmp = (*compar) (key, (*rootp)->key)) != 0) { if (sp == stacksize) abort (); nodestack[sp++] = rootp; p = *rootp; rootp = ((cmp < 0) ? &(*rootp)->left : &(*rootp)->right); if (*rootp == NULL) return NULL; } /* This is bogus if the node to be deleted is the root... this routine really should return an integer with 0 for success, -1 for failure and errno = ESRCH or something. */ retval = p; /* We don't unchain the node we want to delete. Instead, we overwrite it with its successor and unchain the successor. If there is no successor, we really unchain the node to be deleted. */ root = *rootp; r = root->right; q = root->left; if (q == NULL || r == NULL) unchained = root; else { node *parent = rootp, *up = &root->right; for (;;) { if (sp == stacksize) abort (); nodestack[sp++] = parent; parent = up; if ((*up)->left == NULL) break; up = &(*up)->left; } unchained = *up; } /* We know that either the left or right successor of UNCHAINED is NULL. R becomes the other one, it is chained into the parent of UNCHAINED. */ r = unchained->left; if (r == NULL) r = unchained->right; if (sp == 0) *rootp = r; else { q = *nodestack[sp-1]; if (unchained == q->right) q->right = r; else q->left = r; } if (unchained != root) root->key = unchained->key; if (!unchained->red) { /* Now we lost a black edge, which means that the number of black edges on every path is no longer constant. We must balance the tree. */ /* NODESTACK now contains all parents of R. R is likely to be NULL in the first iteration. */ /* NULL nodes are considered black throughout - this is necessary for correctness. */ while (sp > 0 && (r == NULL || !r->red)) { node *pp = nodestack[sp - 1]; p = *pp; /* Two symmetric cases. */ if (r == p->left) { /* Q is R's brother, P is R's parent. The subtree with root R has one black edge less than the subtree with root Q. */ q = p->right; if (q->red) { /* If Q is red, we know that P is black. We rotate P left so that Q becomes the top node in the tree, with P below it. P is colored red, Q is colored black. This action does not change the black edge count for any leaf in the tree, but we will be able to recognize one of the following situations, which all require that Q is black. */ q->red = 0; p->red = 1; /* Left rotate p. */ p->right = q->left; q->left = p; *pp = q; /* Make sure pp is right if the case below tries to use it. */ nodestack[sp++] = pp = &q->left; q = p->right; } /* We know that Q can't be NULL here. We also know that Q is black. */ if ((q->left == NULL || !q->left->red) && (q->right == NULL || !q->right->red)) { /* Q has two black successors. We can simply color Q red. The whole subtree with root P is now missing one black edge. Note that this action can temporarily make the tree invalid (if P is red). But we will exit the loop in that case and set P black, which both makes the tree valid and also makes the black edge count come out right. If P is black, we are at least one step closer to the root and we'll try again the next iteration. */ q->red = 1; r = p; } else { /* Q is black, one of Q's successors is red. We can repair the tree with one operation and will exit the loop afterwards. */ if (q->right == NULL || !q->right->red) { /* The left one is red. We perform the same action as in maybe_split_for_insert where two red edges are adjacent but point in different directions: Q's left successor (let's call it Q2) becomes the top of the subtree we are looking at, its parent (Q) and grandparent (P) become its successors. The former successors of Q2 are placed below P and Q. P becomes black, and Q2 gets the color that P had. This changes the black edge count only for node R and its successors. */ node q2 = q->left; q2->red = p->red; p->right = q2->left; q->left = q2->right; q2->right = q; q2->left = p; *pp = q2; p->red = 0; } else { /* It's the right one. Rotate P left. P becomes black, and Q gets the color that P had. Q's right successor also becomes black. This changes the black edge count only for node R and its successors. */ q->red = p->red; p->red = 0; q->right->red = 0; /* left rotate p */ p->right = q->left; q->left = p; *pp = q; } /* We're done. */ sp = 1; r = NULL; } } else { /* Comments: see above. */ q = p->left; if (q->red) { q->red = 0; p->red = 1; p->left = q->right; q->right = p; *pp = q; nodestack[sp++] = pp = &q->right; q = p->left; } if ((q->right == NULL || !q->right->red) && (q->left == NULL || !q->left->red)) { q->red = 1; r = p; } else { if (q->left == NULL || !q->left->red) { node q2 = q->right; q2->red = p->red; p->left = q2->right; q->right = q2->left; q2->left = q; q2->right = p; *pp = q2; p->red = 0; } else { q->red = p->red; p->red = 0; q->left->red = 0; p->left = q->right; q->right = p; *pp = q; } sp = 1; r = NULL; } } --sp; } if (r != NULL) r->red = 0; } free (unchained); return retval; } #ifdef weak_alias weak_alias (__tdelete, tdelete) #endif /* Walk the nodes of a tree. ROOT is the root of the tree to be walked, ACTION the function to be called at each node. LEVEL is the level of ROOT in the whole tree. */ static void internal_function trecurse (const void *vroot, __action_fn_t action, int level) { const_node root = (const_node) vroot; if (root->left == NULL && root->right == NULL) (*action) (root, leaf, level); else { (*action) (root, preorder, level); if (root->left != NULL) trecurse (root->left, action, level + 1); (*action) (root, postorder, level); if (root->right != NULL) trecurse (root->right, action, level + 1); (*action) (root, endorder, level); } } /* Walk the nodes of a tree. ROOT is the root of the tree to be walked, ACTION the function to be called at each node. */ void __twalk (const void *vroot, __action_fn_t action) { const_node root = (const_node) vroot; CHECK_TREE (root); if (root != NULL && action != NULL) trecurse (root, action, 0); } #ifdef weak_alias weak_alias (__twalk, twalk) #endif #ifdef _LIBC /* The standardized functions miss an important functionality: the tree cannot be removed easily. We provide a function to do this. */ static void internal_function tdestroy_recurse (node root, __free_fn_t freefct) { if (root->left != NULL) tdestroy_recurse (root->left, freefct); if (root->right != NULL) tdestroy_recurse (root->right, freefct); (*freefct) ((void *) root->key); /* Free the node itself. */ free (root); } void __tdestroy (void *vroot, __free_fn_t freefct) { node root = (node) vroot; CHECK_TREE (root); if (root != NULL) tdestroy_recurse (root, freefct); } weak_alias (__tdestroy, tdestroy) #endif /* _LIBC */ ebview-0.3.6.2/intl/intl-compat.c0000644000175000017500000000662411241377503016033 0ustar mhattamhatta/* intl-compat.c - Stub functions to call gettext functions from GNU gettext Library. Copyright (C) 1995, 2000-2003, 2005 Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" /* @@ end of prolog @@ */ /* This file redirects the gettext functions (without prefix) to those defined in the included GNU libintl library (with "libintl_" prefix). It is compiled into libintl in order to make the AM_GNU_GETTEXT test of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which has the redirections primarily in the include file. It is also compiled into libgnuintl so that libgnuintl.so can be used as LD_PRELOADable library on glibc systems, to provide the extra features that the functions in the libc don't have (namely, logging). */ #undef gettext #undef dgettext #undef dcgettext #undef ngettext #undef dngettext #undef dcngettext #undef textdomain #undef bindtextdomain #undef bind_textdomain_codeset /* When building a DLL, we must export some functions. Note that because the functions are only defined for binary backward compatibility, we don't need to use __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL # define DLL_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL # define DLL_EXPORTED __declspec(dllexport) #else # define DLL_EXPORTED #endif DLL_EXPORTED char * gettext (const char *msgid) { return libintl_gettext (msgid); } DLL_EXPORTED char * dgettext (const char *domainname, const char *msgid) { return libintl_dgettext (domainname, msgid); } DLL_EXPORTED char * dcgettext (const char *domainname, const char *msgid, int category) { return libintl_dcgettext (domainname, msgid, category); } DLL_EXPORTED char * ngettext (const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_ngettext (msgid1, msgid2, n); } DLL_EXPORTED char * dngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_dngettext (domainname, msgid1, msgid2, n); } DLL_EXPORTED char * dcngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category) { return libintl_dcngettext (domainname, msgid1, msgid2, n, category); } DLL_EXPORTED char * textdomain (const char *domainname) { return libintl_textdomain (domainname); } DLL_EXPORTED char * bindtextdomain (const char *domainname, const char *dirname) { return libintl_bindtextdomain (domainname, dirname); } DLL_EXPORTED char * bind_textdomain_codeset (const char *domainname, const char *codeset) { return libintl_bind_textdomain_codeset (domainname, codeset); } ebview-0.3.6.2/intl/VERSION0000644000175000017500000000004611241377503014500 0ustar mhattamhattaGNU gettext library from gettext-0.17 ebview-0.3.6.2/ebview.spec0000644000175000017500000000450410104720477014621 0ustar mhattamhattaSummary: EPWING CD-ROM dictionary viewer Name: ebview Version: 0.3.6 Release: 1 Copyright: GPL Group: Applications/Text Source: http://prdownloads.sourceforge.net/ebview/ebview-%{version}.tar.gz URL: http://ebview.sourceforge.net/ Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-root Summary(ja): EPWING·Á¼°¤ÎCD-ROM¼­½ñ¤ò»²¾È¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à %description An EPWING CD-ROM dictionary viewer. Requeires: gtk2 >= 2.2, eb >= 3.3.2 %description -l ja EPWING·Á¼°¤ÎCD-ROM¼­½ñ¤ò»²¾È¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤Ç¡¢¼¡¤ÎÆÃħ¤¬¤¢¤ê¤Þ¤¹¡£ * Á°Êý°ìÃס¢¸åÊý°ìÃס¢´°Á´°ìÃס¢¾ò·ï°ìÃס¢Ê£¹ç¸¡º÷¡¢¤³¤ì¤é¤òÁȤ߹ç¤ï¤»¤¿¤ª¤Þ¤«¤»¸¡º÷¤Ê¤É¡¢¤µ¤Þ¤¶¤Þ¤Ê¸¡º÷ÊýË¡¤¬ÍѰդµ¤ì¤Æ¤¤¤Þ¤¹¡£ * ¶ú»É¤·¸¡º÷:Ê£¿ô¤Î¼­½ñ¤ò°ìµ¤¤Ë¸¡º÷¤·¤Þ¤¹¡£ * ³°»ú¡¢ÀŻ߲衢ư²è¡¢²»À¼¤Îɽ¼¨¤äºÆÀ¸¤¬¤Ç¤­¤Þ¤¹¡£ * X¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°Åª¤Ê¸¡º÷¤¬²Äǽ¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢Mozilla¤Ç±Ñʸ¥Ú¡¼¥¸¤òÆÉ¤ó¤Ç¤¤¤ë¾ì¹ç¤Ë¡¢Ê¬¤«¤é¤Ê¤¤Ã±¸ì¤¬¤¢¤Ã¤¿¤é¤½¤Îñ¸ì¤òÁªÂò¤¹¤ë¤³¤È¤Ç¼«Æ°Åª¤Ë¸¡º÷¤µ¤ì¤Þ¤¹¡£ * ¸ìÈø¤Î¼«Æ°ÊäÀµ¤ò¹Ô¤¤¤Þ¤¹¤Î¤Ç¡¢±Ññ¸ì¤Î²áµî·Á¤äÊ£¿ô·Á¡¢ÆüËܸì¤Î³èÍѤʤɤ¬ÊäÀµ¤µ¤ì¤¿·Á¤Ç¸¡º÷¤µ¤ì¤Þ¤¹¡£ %prep %setup -q -c cd %{name}-%{version} #%patch1 -p1 cd .. %build cd %{name}-%{version} autoconf %configure --with-eb-conf=/etc/eb.conf make cd .. %install cd %{name}-%{version} %makeinstall cd .. %clean rm -rf ${RPM_BUILD_ROOT} rm -f *.files %files /usr/bin/ebview /usr/share/locale/ja/LC_MESSAGES/ebview.mo /usr/share/ebview/about.jp /usr/share/ebview/about.en /usr/share/ebview/endinglist.xml /usr/share/ebview/endinglist-ja.xml /usr/share/ebview/shortcut.xml /usr/share/ebview/searchengines.xml /usr/share/ebview/filter.xml /usr/share/ebview/help/ja/index.html /usr/share/ebview/help/ja/menu.html /usr/share/ebview/help/ja/body.html /usr/share/ebview/help/en/index.html /usr/share/ebview/help/en/menu.html /usr/share/ebview/help/en/body.html %defattr(-, root, root) %doc %{name}-%{version}/ChangeLog %doc %{name}-%{version}/README %changelog * Thu May 22 2003 Kenichi Suto - version 0.3.0 * Tue Nov 19 2002 Kenichi Suto - version 0.2.0 * Fri May 17 2002 Kenichi Suto - version 0.1.5 * Sun Feb 24 2002 Kenichi Suto - version 0.1.4 * Fri Jul 27 2001 Kenichi Suto - version 0.1.2 * Fri Jun 22 2001 akira yamada - Initial packaging. ebview-0.3.6.2/aclocal.m40000644000175000017500000115351011241636757014341 0ustar mhattamhatta# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, [m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3012 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6]) m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6' macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/eb4.m4]) m4_include([m4/glib-gettext.m4]) m4_include([m4/pkg.m4]) ebview-0.3.6.2/depcomp0000755000175000017500000004426711241362135014047 0ustar mhattamhatta#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ebview-0.3.6.2/config.guess0000644000175000017500000013105411241402747015002 0ustar mhattamhatta#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ebview-0.3.6.2/Makefile.am0000644000175000017500000000006510013675513014515 0ustar mhattamhattaACLOCAL_AMFLAGS = -I m4 SUBDIRS = src po m4 data doc ebview-0.3.6.2/mkinstalldirs0000755000175000017500000000672211241363076015277 0ustar mhattamhatta#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ebview-0.3.6.2/INSTALL0000644000175000017500000000207710013675513013517 0ustar mhattamhatta EBView ¤Î¥¤¥ó¥¹¥È¡¼¥ëÊýË¡ 1. ½àÈ÷ ËÜ¥×¥í¥°¥é¥à¤ÏEB¥é¥¤¥Ö¥é¥ê¤ò»ÈÍѤ·¤Þ¤¹¡£¤Þ¤À¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤Ê¤¤¾ì ¹ç¤Ë¤Ï°Ê²¼¤Î¾ì½ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£ http://www.sra.co.jp/people/m-kasahr/eb/ ¤Þ¤¿¡¢GTK version 2.2 °Ê¾å¤âɬÍפǤ¹¡£¤Þ¤À¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï °Ê²¼¤Î¾ì½ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£ GTK : http://www.gtk.org/ 2. ¥³¥ó¥Ñ¥¤¥ë&¥¤¥ó¥¹¥È¡¼¥ë ´ðËÜŪ¤Ë¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£ $ ./configure $ make $ su Password: root¤Î¥Ñ¥¹¥ï¡¼¥É¤òÆþÎÏ # make install ¾°¡¢EB¥é¥¤¥Ö¥é¥ê¤¬ /usr, /usr/local °Ê³°¤Î¾ì½ê¤ËÆþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢°Ê ²¼¤Î¤è¤¦¤Ë configure ¤ËÂФ·¤Æ¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£ $ ./configure --with-eb-prefix=/usr/test 3. FreeBSD¤Ç¤Î¥³¥ó¥Ñ¥¤¥ë libiconv¡¢libintl ¤¬ /usr/local ¤ËÆþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢°Ê²¼¤Î´Ä¶­ÊÑ¿ô¤â ÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£ export CPPFLAGS=-I/usr/local/include export LDFLAGS=-L/usr/local/lib 4. ¥×¥í¥°¥é¥à¤Îµ¯Æ° ¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤Ç "ebview" ¤ÈÆþÎϤ·¤Þ¤¹¡£ ¥×¥í¥°¥é¥à¤¬µ¯Æ°¤·¤¿¤é¡Ö¥Ø¥ë¥×¡×¥á¥Ë¥å¡¼¤Î¡Ö»È¤¤Êý¡×¤òÁªÂò¤·¤Æ¤¯¤À¤µ ¤¤¡£Web ¥Ö¥é¥¦¥¶¤Ë»È¤¤Êý¤ÎÀâÌÀ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ ebview-0.3.6.2/archive.sh0000755000175000017500000000050110013675512014433 0ustar mhattamhatta#!/bin/sh if [ x"$1" = x ] ; then echo "Usage : archive.sh version" exit 1 fi echo "aclocal -I m4" aclocal -I m4 echo automake automake echo "autoheader" autoheader echo "autoconf" autoconf echo "removing *~" find . -name '*~' -exec rm -f {} \; echo "tar" cd .. tar cfz ebview-$1.tar.gz ebview-$1 echo "done" ebview-0.3.6.2/ChangeLog0000644000175000017500000001737411241637311014244 0ustar mhattamhatta2009-08-16 Masayuki Hatta * Version 0.3.6.2 (unofficial) * src/bmh.c, src/defs.h, src/dictbar.c, src/eb.c, src/filter.c, src/grep.c, src/hook.c, src/jcode.c, src/multi.c, src/pref_color.c, src/pref_dictgroup.c, src/pref_font.c, src/shortcut.c, src/log.c : Applied 64bit fixes from OpenSUSE. https://bugzilla.novell.com/show_bug.cgi?id=242602 2009-08-15 Masayuki Hatta * Version 0.3.6.1 (unofficial). * config.guess, config.sub : copied from Debian's autotools-dev 20090611.1. * configure.in : set version to 0.3.6.1. * configure.in : Added checks for Pango. * configure.in : eb3 -> eb4. * depcomp, install-sh, missing, mkinstalldir : copied from GNU automake 1.11. * ltmain.sh : copied from GNU libtool 2.2.6. * Ran aclocal, automake, autoheader and autoconf. * src/Makefile.am : added Pango-related flags. * src/ebview.c : removed GTK_DISABLE_DEPRECATED. * src/defs.h : define _FILE_OFFSET_BITS as 64. * src/popup.c, src/selection.c : Fixed popup window's behavior. * ABOUT-NLS, intl/* : copied from GNU gettext 0.17. * po/* : regenerated & updated. * m4/Makefile.am : eb3 -> eb4. * m4/ssizet.m4 : put AC_TYPE_SSIZE_T into bracket. * m4/glib-gettext.m4 : copied from GLib 2.20.4. * m4/pkg.m4 : copied from pkg-config 0.22. * m4/eb4.m4 : replaced with eb3.m4. * pixmaps/ebview-32x32.xpm : added. * doc/{en,ja}/body.html : bumped version. * po/POTFILES.in : regenerated. 2004-02-22 Kenichi Suto * Version 0.3.5: * jcode : Katakana/Hiragana conversion fixed. * mainwindow.c : Japanese input on UNIX fixed. 2004-02-19 Kenichi Suto * Version 0.3.4: * shortcutfunc.c : New shortcut to Expand/Shrink line, Increase/Decrease text. 2004-02-15 Kenichi Suto * shortcutfunc.c : New shortcut to paste text from clipboard. * mainmenu.c, mainwindow.c : Expand/Shrink line, Increase/Decrease text. 2004-02-09 Kenichi Suto * render.c : Improved indentation of image. * mainmenu.c : Menu structure changed. * selection.c : Selection search modified (ex. copy-only mode). * external.c : Play sound internally (Windows). * selection.c : Immediately get clipboard on Windows (No loop). 2004-02-08 Kenichi Suto * render.c : Japanese keyword emphasis bug fixed. * hook.c : Handling of unbalanced hooks. * headword.c : Show dictionary name on tooltips. Thanks to Mr. Masatake YAMATO. 2004-02-04 Kenichi Suto * preference.c : Config file location changed on Windows. 2004-01-27 Kenichi Suto * jcode.c : Replace characters now defined in Unicode. 2004-01-24 Kenichi Suto * eb.c, jcode.c : Search both Katakana and Hiragana. 2004-01-23 Kenichi Suto * textview.c : Place cursor at the top when finished to render. * pref_dictgroup.c : Color selection featuer added. * dialog.c : Center dialog according to the grabbed window. * pref_webgroup.c : Automatically saves changes. 2004-01-20 Kenichi Suto * eb.c, menu.c : Check error when menu or copyright will be shown. * pref_eictgroup.c : Default set to active. 2004-01-15 Kenichi Suto * Version 0.3.3 Release. * cellrendererebook.c : Use normal font to draw cell text. * grep.c : Enable file pattern. * headword.c, pref_gui.c : Calculate number of cells from window height. * eb.c : Use BMH method for fulltext search. 2004-01-10 Kenichi Suto Thanks to Shun-ichi TAHARA for bug report. * cellrendererebook.c : Size calculation corrected. * headword.c : Segfault on next and previous button fixed. * preference.c : Destroying wrong widget in ok_pref() fixed. * external.c : Freeze on failure of exec() fixed. 2004-01-05 Kenichi Suto * pref_grep.c, headword.c : New option to toggle filename in hit list. 2004-01-02 Kenichi Suto * ebview.c : Suppress console message on Windows. * pref_dirgroup.c, grep.c : New "directory group" feature. 2003-12-26 Kenichi Suto * pref_io.c : Drag & drop enabled. * pref_io.c, pref_dictgroup.c : Japanese path name enabled. 2003-12-25 Kenichi Suto * configure.in : Changed to use gcc3 on Cygwin environment. * eb.c, hook.c : finalize_hookset() added. Thanks to Kazuki Ohta. * external.c : Call ShellExecute() when no program is specified. * filter.c : Ignore zero sized cache file. * render.c : Non-black gaiji color fixed. 2003-06-25 Kenichi Suto * eb.c : Japanese stemming fixed. * pref_io.c : Fixed weblist for NULL entries. * grep.c, filter.c, bmh.c, reg.c : New for file search. * headword.c : Modified to support file search. 2003-05-26 Kenichi Suto * mainwindow.c : Add event handler for focus_in_event. 2003-05-26 Kenichi Suto * popup.c : Add gtk_windows_present(popup). * xmlinternal.c : Support cascaded tag . 2003-05-16 Kenichi Suto * Version 0.3.0 * Almost all files have rewritten. 2003-04-26 Kenichi Suto * Version 0.2.1 * EBView now supports FreeBSD! ( Thanks to Tetsuo Ono, Norikatsu Shigemura, KATO Tsuguru. ) * eb.c : Appendix support added. * ebview-client.c, websearch.c : modified for FreeBSD support. 2002-12-19 Kenichi Suto * Version 0.3.0 * Codeset of preferences is now UTF-8. * Length of button label is number of chars, not bytes. 2002-11-19 Kenichi Suto * Version 0.2.0 * multi.c : List candidates on multiword search. * font.c : Font selection capability added. * ebview.c : Added remote invocation function. * eb.c : Fulltext search added. * websearch.c : Internet search. * weblist.c : Internet search. * popup.c : Show title, enable middle button. * shortcut.c : Keyboard shortcut. 2002-05-17 Kenichi Suto * Version 0.1.5 * canvas.c : Now you can click link in popup window. * preference.c : Preferences now saved as XML. * xml.c, xmlinternal.c : XML parser library for preference. * pixmap.c : For pixmap buttons. * dictgroup.c : Now you can define dictionary group. 2002-02-23 Kenichi Suto * external.c : Executes external program to play sound and movie. * preference.c : New preference mpeg_template and wave_template added. 2002-02-21 Kenichi Suto * popup.c, render.c : Rendering engine was almost rewritten. INDENT and KEYWORD support. * dump.c : Add dump facility. 2002-01-26 Kenichi Suto * popup.c : Now X selection search can be shown in popup window. 2002-01-08 Kenichi Suto * selection.c : Handling of COMPOUND_TEXT fixed. * dicttext.c : Fixed wordwrap bug. 2001-08-04 Kenichi Suto * aclocal.m4 : For compile on FreeBSD 4.3. * render.c : Own implementation of iswalpha() for FreeBSD. 2001-07-17 Kenichi Suto * render.c : Now, superscript and subscript can be handled. * dicttext.c, select.c : Character selection feature was added. * eb.c, ending.c, preference.c : Support of ending pattern search. 2001-06-24 Kenichi Suto * ebview.c : Avoid crash when GTK+ theme was applied immediately after the execution of EBView. * eb.c : Avoid crash when dictionary was removed. ebview-0.3.6.2/Makefile.in0000644000175000017500000005552511241636761014547 0ustar mhattamhatta# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS config.guess config.sub depcomp install-sh \ ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 \ $(top_srcdir)/m4/glib-gettext.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FGREP = @FGREP@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOX_CFLAGS = @PANGOX_CFLAGS@ PANGOX_LIBS = @PANGOX_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src po m4 data doc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/m4/0000755000175000017500000000000011241637663013010 5ustar mhattamhattaebview-0.3.6.2/m4/eb4.m40000644000175000017500000000733311241371240013714 0ustar mhattamhattadnl * dnl * Make ready to link EB Library 3.x or 4.x. dnl * dnl * Copyright (c) 2000-2006 Motoyuki Kasahara dnl * dnl * Redistribution and use in source and binary forms, with or without dnl * modification, are permitted provided that the following conditions dnl * are met: dnl * 1. Redistributions of source code must retain the above copyright dnl * notice, this list of conditions and the following disclaimer. dnl * 2. Redistributions in binary form must reproduce the above copyright dnl * notice, this list of conditions and the following disclaimer in the dnl * documentation and/or other materials provided with the distribution. dnl * 3. Neither the name of the project nor the names of its contributors dnl * may be used to endorse or promote products derived from this software dnl * without specific prior written permission. dnl * dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE dnl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL dnl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS dnl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT dnl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY dnl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF dnl * SUCH DAMAGE. dnl * AC_DEFUN([eb_LIB_EB4], [dnl dnl * dnl * Requirements. dnl * AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_LIBTOOL]) AC_REQUIRE([AC_TYPE_OFF_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_CHECK_HEADERS(limits.h) AC_CHECK_TYPE(ssize_t, int) dnl * dnl * --with-eb-conf option. dnl * AC_ARG_WITH(eb-conf, AC_HELP_STRING([--with-eb-conf=FILE], [eb.conf file is FILE [[SYSCONFDIR/eb.conf]]]), [ebconf="${withval}"], [ebconf=$sysconfdir/eb.conf]) if test X$prefix = XNONE; then PREFIX=$ac_default_prefix else PREFIX=$prefix fi ebconf=`echo X$ebconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ -e 's;\$(prefix);'"$PREFIX;g"` dnl * dnl * Read eb.conf dnl * AC_MSG_CHECKING(for eb.conf) AC_MSG_RESULT($ebconf) if test -f ${ebconf}; then . ${ebconf} else AC_MSG_ERROR($ebconf not found) fi if test X$EBCONF_ENABLE_PTHREAD = Xyes; then AC_DEFINE(EBCONF_ENABLE_PTHREAD, 1, [Define if EB Library supports pthread.]) fi if test X$EBCONF_ENABLE_NLS = Xyes; then AC_DEFINE(EBCONF_ENABLE_NLS, 1, [Define if EB Library supports native language.]) fi if test X$EBCONF_ENABLE_EBNET = Xyes; then AC_DEFINE(EBCONF_ENABLE_EBNET, 1, [Define if EB Library supports remote access.]) fi AC_SUBST(EBCONF_EBINCS) AC_SUBST(EBCONF_EBLIBS) AC_SUBST(EBCONF_ZLIBINCS) AC_SUBST(EBCONF_ZLIBLIBS) AC_SUBST(EBCONF_PTHREAD_CPPFLAGS) AC_SUBST(EBCONF_PTHREAD_CFLAGS) AC_SUBST(EBCONF_PTHREAD_LDFLAGS) AC_SUBST(EBCONF_INTLINCS) AC_SUBST(EBCONF_INTLLIBS) dnl * dnl * Check for EB Library. dnl * AC_MSG_CHECKING(for EB Library) save_CPPFLAGS=$CPPFLAGS save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS save_LIBS=$LIBS CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" AC_TRY_LINK([#include ], [eb_initialize_library(); return 0;], try_eb=yes, try_eb=no) CPPFLAGS=$save_CPPFLAGS CFLAGS=$save_CFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS AC_MSG_RESULT($try_eb) if test ${try_eb} != yes; then AC_MSG_ERROR(EB Library not available) fi ]) ebview-0.3.6.2/m4/Makefile.am0000644000175000017500000000003611241371260015027 0ustar mhattamhattaEXTRA_DIST = eb4.m4 ssizet.m4 ebview-0.3.6.2/m4/Makefile.in0000644000175000017500000002424711241636761015064 0ustar mhattamhatta# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 \ $(top_srcdir)/m4/glib-gettext.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FGREP = @FGREP@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOX_CFLAGS = @PANGOX_CFLAGS@ PANGOX_LIBS = @PANGOX_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = eb4.m4 ssizet.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/m4/pkg.m40000644000175000017500000001214511241365110014017 0ustar mhattamhatta# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES ebview-0.3.6.2/m4/ssizet.m40000644000175000017500000000014011241364767014570 0ustar mhattamhattadnl * dnl * Check for ssize_t. dnl * AC_DEFUN([AC_TYPE_SSIZE_T], [AC_CHECK_TYPE(ssize_t, int)]) ebview-0.3.6.2/m4/glib-gettext.m40000644000175000017500000003253611241365453015655 0ustar mhattamhatta# Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) ebview-0.3.6.2/pixmaps/0000755000175000017500000000000011241410130014123 5ustar mhattamhattaebview-0.3.6.2/pixmaps/book_open.xpm0000644000175000017500000000323310013675513016643 0ustar mhattamhattastatic char * book_open_xpm[] = { "24 24 64 1", /* colors */ " c None", ". c #939393", "X c #838383", "o c #777777", "O c #737373", "+ c #656565", "@ c #636363", "# c #616161", "$ c #5B5B5B", "% c #575757", "& c #515151", "* c #4F4F4F", "= c #F6F6F6", "- c #F2F2F2", "; c #F0F0F0", ": c #EEEEEE", "> c #ECECEC", ", c #EAEAEA", "< c #E4E4E4", "1 c #E0E0E0", "2 c #DEDEDE", "3 c #DCDCDC", "4 c #DADADA", "5 c #D8D8D8", "6 c #D4D4D4", "7 c #D0D0D0", "8 c #CECECE", "9 c #CACACA", "0 c #C6C6C6", "q c #BEBEBE", "w c #B2B2B2", "e c #AEAEAE", "r c #ACACAC", "t c #A8A8A8", "y c #A6A6A6", "u c #A2A2A2", "i c #A0A0A0", "p c #9E9E9E", "a c #9A9A9A", "s c #8A8A8A", "d c #808080", "f c #6C6C6C", "g c #6A6A6A", "h c #F5F5F5", "j c #F3F3F3", "k c #F1F1F1", "l c #EFEFEF", "z c #EDEDED", "x c #EBEBEB", "c c #E9E9E9", "v c #E7E7E7", "b c #E5E5E5", "n c #DFDFDF", "m c #2A2A2A", "M c #DBDBDB", "N c #D9D9D9", "B c #242424", "V c #D5D5D5", "C c #D3D3D3", "Z c #161616", "A c #C3C3C3", "S c #BFBFBF", "D c #0C0C0C", /* pixels */ " ", " ", " qa; ", " qq;; ", " q4;;;; ", " q;;;6;; ", " q;;>;;-lz ", " e;;;6,;6:v ", " w;;6;;6c;7vC ", " i;;z6;;>::hn=nn=s& ", " @blAOyM;=====e+$ ", " #>Ognchnn=n=s. ", " &frbkh====e+f ", " Bmq5;=====s. ", " DZ%qqqqMMS+f ", " sXqqqqo. ", " Otqo$ ", " * ", " ", " " }; ebview-0.3.6.2/pixmaps/item.xpm0000644000175000017500000000161710013675513015632 0ustar mhattamhatta/* XPM */ static char * item_xpm[] = { "16 16 36 1", " c None", ". c #090908", "+ c #9D9D8D", "@ c #CFCFB9", "# c #C4C4AF", "$ c #8D8D7F", "% c #9C9C8C", "& c #E2E2D0", "* c #EDEDE5", "= c #C0C0AC", "- c #B2B29F", "; c #828274", "> c #080807", ", c #D5D5BF", "' c #FBFBFA", ") c #C3C3AE", "! c #B5B5A2", "~ c #A6A695", "{ c #959586", "] c #080808", "^ c #CACAB5", "/ c #DDDDD0", "( c #B7B7A4", "_ c #AAAA98", ": c #9B9B8B", "< c #8C8C7D", "[ c #929283", "} c #BABAA7", "| c #ADAD9B", "1 c #9F9F8E", "2 c #909081", "3 c #727266", "4 c #878779", "5 c #A0A090", "6 c #737367", "7 c #000000", " ", " ", " .... ", " .+@#$. ", " .%&*=-;. ", " >,')!~{. ", " ]^/(_:<. ", " .[}|123. ", " .45[677 ", " .....77 ", " 7777 ", " 777 ", " 777 ", " 77 ", " ", " "}; ebview-0.3.6.2/pixmaps/list.xpm0000644000175000017500000000430410013675513015643 0ustar mhattamhatta/* XPM */ static char * list_xpm[] = { "16 16 101 2", " c None", ". c #121212", "+ c #2D2E2D", "@ c #5A5B5A", "# c #E0E4E0", "$ c #BCC0BC", "% c #868986", "& c #B6BBB3", "* c #C5C9C5", "= c #58574F", "- c #4C4737", "; c #3D3F37", "> c #BCC1B8", ", c #242424", "' c #4C493F", ") c #9F967B", "! c #1C1A14", "~ c #21221F", "{ c #B3B6B3", "] c #545148", "^ c #AAA287", "/ c #1D1B15", "( c #83887D", "_ c #C0C4C0", ": c #DBDFDB", "< c #514E44", "[ c #A79E83", "} c #2C2A21", "| c #3A3A36", "1 c #7D7F7D", "2 c #C8CDC5", "3 c #484948", "4 c #4E4B40", "5 c #A59C7F", "6 c #91876A", "7 c #3D392D", "8 c #38352A", "9 c #494435", "0 c #41443F", "a c #4A4436", "b c #4D493D", "c c #A39A7C", "d c #ACA07E", "e c #534D3C", "f c #68614C", "g c #171511", "h c #6A634D", "i c #25221B", "j c #797158", "k c #BEB496", "l c #A1977A", "m c #B5AA87", "n c #A99E7D", "o c #A89D7B", "p c #B4A884", "q c #A39878", "r c #373328", "s c #363736", "t c #1B1B1B", "u c #90866A", "v c #4B473A", "w c #BFB697", "x c #C2B99C", "y c #BCB292", "z c #BAAF8E", "A c #9A9071", "B c #2E2B22", "C c #817960", "D c #BFB597", "E c #BDB394", "F c #B7AC8A", "G c #948A6D", "H c #28261E", "I c #343126", "J c #A09576", "K c #BDB393", "L c #AEA380", "M c #797159", "N c #1F1D16", "O c #12110D", "P c #7C745B", "Q c #B6AC8B", "R c #C1B89A", "S c #BEB596", "T c #B9AE8D", "U c #A69B79", "V c #000000", "W c #353127", "X c #A69C7E", "Y c #C0B799", "Z c #B8AD8B", "` c #887F63", " . c #3F3B2E", ".. c #716A53", "+. c #B3A887", "@. c #6D654F", "#. c #191813", "$. c #978D70", "%. c #BEB495", "&. c #C1B89B", "*. c #4D4838", " . + + + + + + + + + + + + . ", " @ # # # $ % & # # # # # # @ ", " @ # # * = - ; > # # # # # @ ", " . + + , ' ) ! ~ + + + + + . ", " @ # # { ] ^ / ( _ : # # # @ ", " @ # # { < [ / } | 1 % 2 # @ ", " , @ @ 3 4 5 / 6 7 8 9 0 @ , ", " 3 { , a b c / d e f 6 g h i ", " @ # + j b k l m n o p p q r ", " s % t u v w x y z p p p A B ", " s % t 6 C k x D E F p p G H ", " @ # $ I J K x x D F p L M N ", " 3 { { O P Q R R S T p U e ", " V V V V W X y x Y Z p ` . ", " / ..+.x Y Z p @./ ", " #.$.%.&.T p *.V "}; ebview-0.3.6.2/pixmaps/cdrom.xpm0000644000175000017500000000610510013675513015775 0ustar mhattamhatta/* XPM */ static char * cdrom_xpm[] = { "20 20 138 2", " c None", ". c #000000", "+ c #AEB3B3", "@ c #C6C9CD", "# c #D7D4DF", "$ c #ECDEF3", "% c #E7CBE9", "& c #D9B5D3", "* c #B1B7A5", "= c #B0B8AD", "- c #B3B9B6", "; c #C1C6C8", "> c #D5D3DC", ", c #E5CAE6", "' c #E0BBD7", ") c #E1ADC2", "! c #E3ACA3", "~ c #CAC1A4", "{ c #C5C7AC", "] c #B7BEAF", "^ c #ADB4AF", "/ c #BDC2C3", "( c #D1D0D8", "_ c #E5C7E4", ": c #E0B6D1", "< c #E7A9B4", "[ c #EDCDB6", "} c #D6CFAE", "| c #DFA79F", "1 c #DDBFAA", "2 c #CFC5A9", "3 c #C1C4AC", "4 c #B2BAAF", "5 c #B6BBBB", "6 c #CDCED4", "7 c #E4C4E1", "8 c #E0AFC7", "9 c #EABCAE", "0 c #E1D6B6", "a c #C7CCAE", "b c #A2AB9A", "c c #E3ABC0", "d c #E6A3A7", "e c #DFBAA8", "f c #BDC2AE", "g c #E2BFDC", "h c #E7D6B8", "i c #ACB6A6", "j c #9DA89F", "k c #D9AFCF", "l c #E1B4D2", "m c #E2B0CB", "n c #E4A9BB", "o c #E2B2A6", "p c #6A6A6A", "q c #0D0D0D", "r c #A6B1A3", "s c #98A29C", "t c #8F9796", "u c #7E8485", "v c #E8C6E7", "w c #E5C2E3", "x c #E3BDDD", "y c #E1B6D5", "z c #8B9092", "A c #979EA2", "B c #A0A7AE", "C c #E7D3ED", "D c #E8D1ED", "E c #E8CEEC", "F c #E9CCEB", "G c #A7AEB7", "H c #B2B6C5", "I c #BABCCE", "J c #BFBED3", "K c #E9DFF0", "L c #E1D2F7", "M c #CAC7D2", "N c #C5C4CD", "O c #BFBFC7", "P c #B8B9C0", "Q c #AEAFB6", "R c #D5A8E1", "S c #D8B2E9", "T c #D9B8ED", "U c #DBBDF0", "V c #DCBFF1", "W c #A4A6AC", "X c #A8AAAF", "Y c #A0A6A8", "Z c #989E9C", "` c #A1A89E", " . c #B1B6A1", ".. c #C08CAD", "+. c #CC90B5", "@. c #D394CA", "#. c #D6A2DB", "$. c #CFA7DF", "%. c #989F9B", "&. c #ACB3A0", "*. c #B9B9A4", "=. c #D0B8A8", "-. c #C5B5B8", ";. c #B6BBAD", ">. c #E3D7B5", ",. c #DDB4A9", "'. c #CB89AC", "). c #C891B5", "!. c #D18DB7", "~. c #A1A798", "{. c #BDB9A5", "]. c #CAB5B7", "^. c #B8B1B1", "/. c #C2C8B2", "(. c #E1BFAF", "_. c #DB929A", ":. c #BE82A6", "<. c #C891B4", "[. c #C78BB0", "}. c #BCB6A1", "|. c #CDB6B7", "1. c #C0B4B5", "2. c #B1B1AA", "3. c #CAD1B4", "4. c #E2C1B0", "5. c #DBA8A3", "6. c #D28AA9", "7. c #B77EA2", "8. c #BD89A9", "9. c #C9AFAF", "0. c #D0D6B5", "a. c #E2BFAF", "b. c #C684A7", "c. c #ACAAA6", "d. c #BDC3B0", "e. c #D2D7B5", "f. c #E2BFAE", "g. c #DBB6A8", " ", " . . . . . . ", " . . + @ # $ % & . . ", " . * = - ; > $ , ' ) ! . ", " . ~ { ] ^ / ( $ _ : < [ } . ", " . | 1 2 3 4 5 6 $ 7 8 9 0 a b . ", " . c d e 2 f ^ @ $ g < h a i j . ", " . k l m n o 2 p q q p [ a r s t u . ", " . v w x y m p . . p j t z A B . ", " . C D E F v q q A G H I J . ", " . K K K K K q q L L L L L . ", " . M N O P Q p . . p R S T U V . ", " . W X Y Z ` .p q q p ..+.@.#.R $.. ", " . %.` &.*.=.-.;.>.,.'...).!.@.. ", " . ~. .{.=.].^./.>.(._.:...<.[.. ", " . }.=.|.1.2.3.>.4.5.6.7.8.. ", " . 9.-.^.;.0.>.a.,._.b.. ", " . . c.d.e.>.f.g.. . ", " . . . . . . ", " "}; ebview-0.3.6.2/pixmaps/file.xpm0000644000175000017500000000225410013675513015611 0ustar mhattamhatta/* XPM */ static char * file_xpm[] = { "16 16 55 1", " c None", ". c #000000", "+ c #F6F6F6", "@ c #F2F2F2", "# c #EEEEEE", "$ c #E9E9E9", "% c #E5E5E5", "& c #E1E1E1", "* c #DDDDDD", "= c #D9D9D9", "- c #D5D5D5", "; c #D1D1D1", "> c #F1F1F1", ", c #EDEDED", "' c #D4D4D4", ") c #D0D0D0", "! c #CCCCCC", "~ c #E0E0E0", "{ c #DCDCDC", "] c #D8D8D8", "^ c #C8C8C8", "/ c #E8E8E8", "( c #E4E4E4", "_ c #CBCBCB", ": c #C7C7C7", "< c #C3C3C3", "[ c #D3D3D3", "} c #CFCFCF", "| c #BFBFBF", "1 c #DFDFDF", "2 c #DBDBDB", "3 c #D7D7D7", "4 c #C2C2C2", "5 c #BEBEBE", "6 c #BABABA", "7 c #CACACA", "8 c #C6C6C6", "9 c #B6B6B6", "0 c #D6D6D6", "a c #D2D2D2", "b c #CECECE", "c c #B9B9B9", "d c #B5B5B5", "e c #B1B1B1", "f c #C1C1C1", "g c #BDBDBD", "h c #ADADAD", "i c #C9C9C9", "j c #C5C5C5", "k c #ACACAC", "l c #A8A8A8", "m c #B8B8B8", "n c #B4B4B4", "o c #B0B0B0", "p c #A4A4A4", " ", " ", " ............ ", " .+@#$%&*=-;. ", " .>,$%&*=')!. ", " .,$%~{]')!^. ", " ./(~{]')_:<. ", " .(~{][}_:<|. ", " .123[}_:456. ", " .23[}784569. ", " .0ab7845cde. ", " .ab78fgcdeh. ", " .bijfgcdekl. ", " .ijfgmnoklp. ", " ............ ", " "}; ebview-0.3.6.2/pixmaps/globe.xpm0000644000175000017500000001042510013675513015761 0ustar mhattamhatta/* XPM */ static char * globe_xpm[] = { "20 20 215 2", " c None", ". c #6D7B73", "+ c #626C67", "@ c #658CB2", "# c #74939E", "$ c #88A086", "% c #8C9F7C", "& c #879B74", "* c #819367", "= c #6B7F59", "- c #46553A", "; c #4376AD", "> c #7197B8", ", c #E1DFC3", "' c #C6CEBE", ") c #839CAB", "! c #8A969A", "~ c #ADA690", "{ c #919385", "] c #AEA37F", "^ c #A9A572", "/ c #938853", "( c #4379AF", "_ c #B6C8C8", ": c #F9F9D1", "< c #FCFCE8", "[ c #FCFCE1", "} c #EAECCA", "| c #C3D1CA", "1 c #9AACA9", "2 c #B8B296", "3 c #F1E2A2", "4 c #AEAF90", "5 c #C4B774", "6 c #8A7E4F", "7 c #799FBC", "8 c #FBFBE8", "9 c #FCFCEC", "0 c #FCFCD8", "a c #FCFCDC", "b c #FBFACB", "c c #FCFCDE", "d c #D2D0A2", "e c #F9F5B2", "f c #D1C898", "g c #B4A874", "h c #969065", "i c #59553F", "j c #417AB2", "k c #86A4B3", "l c #D4D7A5", "m c #F4F4C4", "n c #FCFCEA", "o c #FCFCE0", "p c #FCFCD6", "q c #B0B89D", "r c #E1D69C", "s c #DBD599", "t c #959473", "u c #8A845B", "v c #747357", "w c #477EB5", "x c #6090BA", "y c #94ADAA", "z c #99B1A7", "A c #B7CA9F", "B c #C9D8A4", "C c #D5D8A7", "D c #F1E6AC", "E c #F6E6A8", "F c #CEBD94", "G c #BEBB94", "H c #E0D79A", "I c #7A7D6C", "J c #36444C", "K c #68684D", "L c #25261F", "M c #325E8D", "N c #477DB3", "O c #5087BC", "P c #548ABD", "Q c #5889B4", "R c #93AB99", "S c #8EB28A", "T c #90AF88", "U c #B0B688", "V c #CABA8D", "W c #CEBA88", "X c #BDB188", "Y c #637678", "Z c #23435E", "` c #253D4F", " . c #5A5C4A", ".. c #1C252A", "+. c #305A86", "@. c #4278AE", "#. c #4C80B6", "$. c #4F84B6", "%. c #5281AC", "&. c #A1AB9F", "*. c #C2BD92", "=. c #C8BA8D", "-. c #BFB386", ";. c #B8AE86", ">. c #C4B481", ",. c #A49B7B", "'. c #2E4F69", "). c #203E5A", "!. c #233D50", "~. c #3D4B4D", "{. c #13232E", "]. c #000000", "^. c #27517A", "/. c #3E6FA4", "(. c #4778AB", "_. c #4A7AA9", ":. c #4C7AA2", "<. c #9AA9AB", "[. c #E0CEA0", "}. c #D6C08C", "|. c #BDAF82", "1. c #B5A579", "2. c #606D72", "3. c #294E6D", "4. c #204360", "5. c #223C52", "6. c #233C4E", "7. c #243D4F", "8. c #111F28", "9. c #346597", "0. c #3F6EA0", "a. c #42709E", "b. c #446E97", "c. c #CFC8A4", "d. c #E1D7A3", "e. c #C9BD88", "f. c #A3A67C", "g. c #A29970", "h. c #32526B", "i. c #264662", "j. c #213D56", "k. c #223C4E", "l. c #213C51", "m. c #0C1319", "n. c #2B5584", "o. c #366292", "p. c #3A6692", "q. c #3D658C", "r. c #ACB09B", "s. c #E7D69C", "t. c #C0BA87", "u. c #949872", "v. c #64726F", "w. c #465863", "x. c #3E4C59", "y. c #203B4E", "z. c #203C4E", "A. c #213C4F", "B. c #1E3749", "C. c #010202", "D. c #1A3757", "E. c #295583", "F. c #2E5A85", "G. c #315B84", "H. c #7F9396", "I. c #EDD89C", "J. c #BEB280", "K. c #6B726A", "L. c #264560", "M. c #5E6156", "N. c #253F56", "O. c #213D51", "P. c #203B4D", "Q. c #213C4E", "R. c #121E28", "S. c #203D5F", "T. c #264A72", "U. c #274C70", "V. c #2F537B", "W. c #7C837E", "X. c #63646B", "Y. c #234265", "Z. c #1E3F63", "`. c #233F57", " + c #203E57", ".+ c #203E56", "++ c #203C50", "@+ c #192E3C", "#+ c #1F334E", "$+ c #233F64", "%+ c #1E4272", "&+ c #1E4270", "*+ c #1F3F69", "=+ c #1F3F60", "-+ c #213F58", ";+ c #203F59", ">+ c #203F58", ",+ c #203E58", "'+ c #183043", ")+ c #030506", "!+ c #132439", "~+ c #1E3A5C", "{+ c #203D61", "]+ c #1E3D60", "^+ c #203D58", "/+ c #1E3E5C", "(+ c #1D3A51", "_+ c #0F1F2C", ":+ c #020203", "<+ c #0D1621", "[+ c #102033", "}+ c #112439", "|+ c #0F1F2D", "1+ c #091219", "2+ c #010102", " ", " . + ", " @ # $ % & * = - ", " ; > , ' ) ! ~ { ] ^ / ", " ( _ : < [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a b 0 c d e f g h i ", " j k l m 0 n a o p q r s t u v ", " w x y z A B C D E F G H I J K L ", " M N O P Q R S T U V W X Y Z ` ... ", " +.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.]. ", " ^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.]. ", " 9.0.a.b.c.d.e.f.g.h.i.j.k.!.l.m.]. ", " n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.]. ", " D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.]. ", " S.T.U.V.W.X.Y.Z.`. +.+++@+].]. ", " #+$+%+&+*+=+-+;+>+,+'+)+].]. ", " !+~+{+]+^+.+/+(+_+].].]. ", " :+<+[+}+|+1+2+].].]. ", " ].].].].].]. ", " "}; ebview-0.3.6.2/pixmaps/popup2.xpm0000644000175000017500000000113710013675513016116 0ustar mhattamhatta/* XPM */ static char * popup2_xpm[] = { "20 20 5 1", " c None", ". c #96BC8C", "+ c #3F4F3B", "@ c #E50404", "# c #2E2E2E", " ", " ", " ", " ............ ", " ............+ @ ", " ............+ @@ ", " ............+@@ ", " ...........@@@ ", " ...@......@@@ ", " ...@@....@@@+ ", " ....@@..@@@.+..# ", " ....@@@@@@..+..+ ", " ++++@@@@@+++..+ ", " @@@@......+ ", " @@.......+. ", " @ +++++++.+ ", " ....+ ", " ++++ ", " ", " "}; ebview-0.3.6.2/pixmaps/popup.xpm0000644000175000017500000000111710013675513016032 0ustar mhattamhatta/* XPM */ static char * popup_xpm[] = { "20 20 4 1", " c None", ". c #96BC8C", "+ c #3F4F3B", "@ c #2E2E2E", " ", " ", " ", " ............ ", " ............+ ", " ............+ ", " ............+ ", " ............+ ", " ............+ ", " ............+ ", " ............+..@ ", " ............+..+ ", " ++++++++++++..+ ", " .......+ ", " .......+. ", " +++++++.+ ", " ....+ ", " ++++ ", " ", " "}; ebview-0.3.6.2/pixmaps/folder_open.xpm0000644000175000017500000000143610013675513017167 0ustar mhattamhatta/* XPM */ static char * folder_open_xpm[] = { "16 16 28 1", " c None", ". c #000000", "+ c #8383F7", "@ c #C2C2F1", "# c #C0C0F2", "$ c #BEBEF2", "% c #BCBCF2", "& c #BABAF2", "* c #B8B8F2", "= c #B6B6F2", "- c #B4B4F2", "; c #B2B2F3", "> c #B0B0F3", ", c #AEAEF3", "' c #ACACF3", ") c #AAAAF3", "! c #A8A8F3", "~ c #A6A6F4", "{ c #A4A4F4", "] c #A2A2F4", "^ c #A0A0F4", "/ c #9E9EF4", "( c #9C9CF4", "_ c #9A9AF5", ": c #9898F5", "< c #9696F5", "[ c #9494F5", "} c #9292F5", " ", " ", " .... ", " .++++. ", ".++++++....... ", ".++++++++++++. ", ".+..............", ".+.@#$%&*=-;>,'.", ".+.%&*=-;>,')!~.", "..*=-;>,')!~{]. ", "..;>,')!~{]^/(. ", ".,')!~{]^/(_:. ", ".!~{]^/(_:<[}. ", ".............. ", " ", " "}; ebview-0.3.6.2/pixmaps/small-close.xpm0000644000175000017500000000034310013675513017102 0ustar mhattamhatta/* XPM */ static char * small_close_xpm[] = { "10 10 2 1", " c None", ". c #000000", " ", " ", " . .. ", " . .. ", " .. ", " .. ", " . .. ", " . .. ", " ", " "}; ebview-0.3.6.2/pixmaps/small-right.xpm0000644000175000017500000000113310013675513017110 0ustar mhattamhatta/* XPM */ static char * small_right_xpm[] = { "10 10 27 1", " c None", ". c #000000", "+ c #B4B7B3", "@ c #474B46", "# c #F9FBF9", "$ c #EFF4EE", "% c #AAB0A9", "& c #434842", "* c #161616", "= c #F7F9F6", "- c #EFF3EE", "; c #E9F0E8", "> c #E2EAE1", ", c #ACB3AA", "' c #3B4239", ") c #90B386", "! c #85AA7D", "~ c #84A87A", "{ c #729969", "] c #445D3F", "^ c #131E11", "/ c #8CB082", "( c #739969", "_ c #405C38", ": c #192515", "< c #486541", "[ c #121E10", " ", " ", " .+@ ", " .#$%& ", " *=-;>,' ", " .)!~{]^ ", " ./(_: ", " .<[ ", " ", " "}; ebview-0.3.6.2/pixmaps/ebview.xpm0000644000175000017500000002062610013675513016156 0ustar mhattamhatta/* XPM */ static char * ebview_xpm[] = { "48 48 234 2", " c None", ". c #515151", "+ c #04EAD9", "@ c #05E8D7", "# c #06E6D5", "$ c #06E3D4", "% c #07E1D2", "& c #07DFD0", "* c #08DDCE", "= c #08DACC", "- c #09D8CB", "; c #09D6C9", "> c #03EFDC", ", c #04ECDB", "' c #06E3D3", ") c #08DCCE", "! c #0AD3C7", "~ c #0BD1C5", "{ c #0BCFC3", "] c #0CCCC2", "^ c #03F1DE", "/ c #04ECDA", "( c #06E5D5", "_ c #09D8CA", ": c #0AD5C9", "< c #0CCAC0", "[ c #0DC8BE", "} c #0DC5BC", "| c #02F3E0", "1 c #03EEDC", "2 c #05EAD9", "3 c #07E1D1", "4 c #07DED0", "5 c #0BCEC3", "6 c #0CCCC1", "7 c #0EC3BA", "8 c #0FC1B9", "9 c #0FBEB7", "0 c #05EAD8", "a c #05E7D7", "b c #09D7CA", "c c #0AD5C8", "d c #0DC7BE", "e c #0FC1B8", "f c #10BCB5", "g c #10BAB3", "h c #02F3DF", "i c #03F0DE", "j c #07E0D1", "k c #07DECF", "l c #0BD0C5", "m c #0CCABF", "n c #0EC5BC", "o c #0FC0B8", "p c #11B7B1", "q c #11B5AF", "r c #04EEDC", "s c #05E9D8", "t c #05E7D6", "u c #09D9CC", "v c #0AD3C6", "w c #0CC9BF", "x c #0FBEB6", "y c #10B9B3", "z c #12B3AE", "A c #13B0AC", "B c #02F2DF", "C c #03F0DD", "D c #EDF9F8", "E c #12B2AD", "F c #13AEAA", "G c #14ABA8", "H c #04EBDA", "I c #12B5AF", "J c #14A9A6", "K c #15A7A4", "L c #04EEDB", "M c #06E4D4", "N c #06E2D3", "O c #08DECF", "P c #0AD2C6", "Q c #0BD0C4", "R c #0CCBC1", "S c #0DC9BF", "T c #0DC7BD", "U c #0EC4BB", "V c #0EC2BA", "W c #13B0AB", "X c #13ADAA", "Y c #15A4A3", "Z c #04EDDB", "` c #06E2D2", " . c #08DDCF", ".. c #08DBCD", "+. c #0BCDC2", "@. c #0FBDB6", "#. c #10BBB4", "$. c #15A6A4", "%. c #15A4A2", "&. c #16A2A1", "*. c #17A09F", "=. c #04EBD9", "-. c #05E6D6", ";. c #09D9CB", ">. c #0DC6BD", ",. c #0EC2B9", "'. c #11B9B2", "). c #11B6B1", "!. c #13ADA9", "~. c #16A4A2", "{. c #179F9F", "]. c #179D9D", "^. c #07E2D2", "/. c #0CCBC0", "(. c #0FBFB8", "_. c #11B6B0", ":. c #12B4AF", "<. c #14A8A6", "[. c #16A2A0", "}. c #189B9B", "|. c #189899", "1. c #0AD4C7", "2. c #0DC8BF", "3. c #0FBFB7", "4. c #11B8B2", "5. c #13AFAB", "6. c #16A1A0", "7. c #199697", "8. c #0AD1C6", "9. c #0EC1B9", "0. c #10BDB6", "a. c #12B4AE", "b. c #12B1AD", "c. c #179F9E", "d. c #189A9B", "e. c #1A9496", "f. c #05E6D5", "g. c #08DACD", "h. c #0BCFC4", "i. c #10BDB5", "j. c #10BAB4", "k. c #14AAA7", "l. c #16A3A2", "m. c #1A9395", "n. c #1A9194", "o. c #1B8F92", "p. c #0CCDC2", "q. c #13ACA9", "r. c #15A8A5", "s. c #179C9C", "t. c #1B8C90", "u. c #14ACA9", "v. c #15A5A3", "w. c #199899", "x. c #199597", "y. c #1A9193", "z. c #1C8A8E", "A. c #11B5B0", "B. c #179E9E", "C. c #189A9A", "D. c #1B8E92", "E. c #1C888C", "F. c #15A7A5", "G. c #16A3A1", "H. c #199799", "I. c #1B8E91", "J. c #1D878C", "K. c #1D858A", "L. c #16A0A0", "M. c #189C9C", "N. c #199798", "O. c #1A9093", "P. c #1E8388", "Q. c #16A09F", "R. c #18999A", "S. c #1B8C8F", "T. c #1C898E", "U. c #1E8087", "V. c #14ACA8", "W. c #199596", "X. c #1A9295", "Y. c #1E8288", "Z. c #1E8086", "`. c #1F7E85", " + c #179E9D", ".+ c #189B9C", "++ c #1C8B8F", "@+ c #1C898D", "#+ c #1F7B83", "$+ c #199496", "%+ c #1A9294", "&+ c #1D848A", "*+ c #1F7E84", "=+ c #207981", "-+ c #1D878B", ";+ c #1F7D84", ">+ c #207B83", ",+ c #10B9B2", "'+ c #199698", ")+ c #1B9092", "!+ c #1B8D91", "~+ c #1D868B", "{+ c #207B82", "]+ c #21767F", "^+ c #189999", "/+ c #1D8489", "(+ c #1E7F86", "_+ c #21747D", ":+ c #1B8D90", "<+ c #207880", "[+ c #1E8187", "}+ c #1F7F86", "|+ c #22717B", "1+ c #207A82", "2+ c #21767E", "3+ c #21737D", "4+ c #236F79", "5+ c #12B1AC", "6+ c #21737C", "7+ c #1D858B", "8+ c #1E8389", "9+ c #1F7F85", "0+ c #1F7C83", "a+ c #21757E", "b+ c #22717A", "c+ c #236E79", "d+ c #207A81", "e+ c #207780", "f+ c #22737C", "g+ c #22707A", "h+ c #236E78", "i+ c #20777F", "j+ c #21777F", "k+ c #22727C", " . . . . . . . . . . ", " . . . + @ # $ % & * = - ; . . . ", " . . > , + @ # ' % & ) = - ; ! ~ { ] . . ", " . . ^ > / + @ ( ' % & ) = _ : ! ~ { ] < [ } . . ", " . | ^ 1 / 2 @ ( ' 3 4 ) = _ : ! ~ 5 6 < [ } 7 8 9 . ", " . | ^ 1 / 0 a ( ' 3 4 ) = b c ! ~ 5 6 < d } 7 e 9 f g . ", " . h i 1 / 0 a ( ' j k ) = b c ! l 5 6 m d n 7 o 9 f g p q . ", " . h i r / s t ( ' j k ) u b c v l 5 6 w d n 7 o x f y p q z A . ", " . B C r / D D D D D D D D D D D D D D D D D D D D D D p q E A F G . ", " . B C r H s D D D D D D D D D D D D D D D D D D D D D D I E A F G J K . ", " . C L H s t M N j O D D D D P Q 5 R S T U V D D D D D D E W X G J K Y . ", " . C Z H s t M ` j ...D D D D Q +.R S T U V o @.#.D D D D W X G J $.%.&.*.. ", " . Z =.s -.M ` j ...;.D D D D +.R S >.U ,.o @.#.'.).D D D !.G J $.~.&.{.].. ", " . Z =.s -.M ^.& ...;.; D D D D /.S >.U ,.(.@.#.'._.:.E D D G <.$.~.[.{.].}.|.. ", " . =.@ -.M ^.& ...- ; 1.D D D D 2.>.U ,.3.@.#.4._.:.E 5.D D <.$.~.6.{.].}.|.7.. ", " . @ -.M % & * ..- ; 1.8.D D D D >.U 9.3.0.#.D D a.b.5.!.D D $.~.6.c.].d.|.7.e.. ", ". @ f.M % & * g.- ; 1.~ h.D D D D U 9.3.i.j.4.D D b.5.!.k.D D l.6.c.].d.|.7.m.n.o.. ", ". # $ % & * = - ; ! ~ h.p.D D D D 9.3.i.j.4.D D D 5.q.k.r.$.D 6.c.s.d.|.7.m.n.o.t.. ", ". ' % & ) = - ; ! ~ { ] < D D D D 3.f g 4._.D D D u.k.r.v.l.6.c.s.d.w.x.m.y.o.t.z.. ", ". % & ) = _ : ! ~ { ] < [ D D D D f g 4.A.D D D D k.r.v.l.6.B.s.C.w.x.m.y.D.t.z.E.. ", ". 4 ) = _ : ! ~ 5 6 < [ } D D D D D D D D D D D D F.v.G.6.B.s.C.H.x.m.y.I.t.z.J.K.. ", ". ) = b c ! ~ 5 6 < d } 7 D D D D D D D D D D D D v.G.L.B.M.C.N.x.m.O.I.t.z.J.K.P.. ", ". = b c ! l 5 6 m d n 7 o D D D D q z A F D D D D G.Q.B.M.R.N.x.m.O.I.S.T.J.K.P.U.. ", ". b c v l 5 6 w d n 7 o x D D D D z A F V.J D D D Q.B.M.R.N.W.X.O.I.S.T.J.K.Y.Z.`.. ", ". c P l 5 6 w T n V o x f D D D D A F G J F.v.D D +.+R.N.W.X.O.I.++@+J.K.Y.Z.`.#+. ", ". P Q 5 R S T n V o x #.y D D D D F G J K Y &.D D .+R.N.$+%+D D ++@+J.&+Y.Z.*+#+=+. ", " . 5 R S T U V o x #.y p D D D D G J K Y &.*.D D R.N.$+%+O.D D @+-+&+Y.Z.;+>+=+. ", " . R S T U V o @.#.,+p :.D D D D J $.%.&.*.].}.R.'+$+%+)+!+D D ~+&+Y.Z.;+{+=+]+. ", " . S >.U ,.o @.#.'.).:.E D D D D $.~.&.{.].}.^+'+$+%+o.!+D D D /+Y.(+;+{+=+]+_+. ", " . U ,.(.@.#.'._.:.E 5.D D D D ~.[.{.].}.|.'+$+%+o.:+++D D D Y.(+;+{+<+]+_+. ", " . ,.3.@.#.4._.:.E 5.!.D D D D 6.{.].}.|.7.e.n.o.:+++D D D [+}+;+{+<+]+_+|+. ", " . 0.#.4._.a.b.5.!.k.D D D D c.].d.|.7.e.n.o.:+D D D D D }+;+1+<+2+_+|+. ", " . j.4._.a.b.D D D D D D D D D D D D D D D D D D D D D D ;+1+<+2+3+|+4+. ", " . _.z 5+5.D D D D D D D D D D D D D D D D D D D D D D 1+<+2+6+|+4+. ", " . 5+5.u.k.r.v.l.6.c.s.d.w.x.m.y.o.t.z.E.7+8+[+9+0+1+<+a+6+|+4+. ", " . u.k.r.v.l.6.B.s.C.w.x.m.y.D.t.z.E.K.8+[+`.0+1+<+a+6+b+c+. . . ", " . F.v.G.6.B.s.C.H.x.m.y.I.t.z.J.K.8+[+`.0+d+e+a+f+b+c+. . . . . ", " . G.L.B.M.C.N.x.m.O.I.t.z.J.K.P.U.`.0+d+e+a+f+g+h+. . . . . . ", " . . M.R.N.x.m.O.I.S.T.J.K.P.U.`.0+=+i+a+f+g+. . . . . . . ", " . . W.X.O.I.S.T.J.K.Y.Z.`.0+=+j+a+k+. . . . . . . ", " . . . ++@+J.K.Y.Z.`.#+=+j+. . . . . . . . ", " . . . . . . . . . . . . . . . ", " . . . . . ", " . . . . . ", " . . . . . ", " . . . . . ", " . . . . ", " . . . "}; ebview-0.3.6.2/pixmaps/push-on.xpm0000644000175000017500000000114210013675513016256 0ustar mhattamhatta/* XPM */ static char * push_on[] = { "10 10 28 1", " c None", ". c #F7944A", "+ c #F79452", "@ c #D68442", "# c #A56331", "$ c #FF9452", "% c #FFD68C", "& c #FFC684", "* c #BD7339", "= c #945229", "- c #5A3118", "; c #E7844A", "> c #DE844A", ", c #C67339", "' c #9C5A31", ") c #734221", "! c #312110", "~ c #B56B39", "{ c #AD6B39", "] c #945A31", "^ c #422910", "/ c #211008", "( c #844A29", "_ c #7B4A21", ": c #633921", "< c #392110", "[ c #291810", "} c #000000", " .+@# ", " $%&*=-", " ;>,')!", " ~{])^/", " (_: c #DDCCCC", ", c #DDCCCD", "' c #CBB6B7", ") c #B89A9B", "! c #7D5E61", "~ c #210708", "{ c #270A0B", "] c #A19999", "^ c #DED1D1", "/ c #F3E6E6", "( c #EFE0E1", "_ c #EBDCDD", ": c #EADCDC", "< c #E4D7D7", "[ c #E6D2D3", "} c #E1C5C6", "| c #AC7D7D", "1 c #654040", "2 c #2E0C0D", "3 c #050001", "4 c #DED1D2", "5 c #F4EBEB", "6 c #F1E6E6", "7 c #EBDFDF", "8 c #E4DBDA", "9 c #E5DBDB", "0 c #E2D3D3", "a c #DDC3C4", "b c #DBB3B6", "c c #A06E6E", "d c #310D0D", "e c #A39596", "f c #F5ECEC", "g c #EEE4E4", "h c #120808", "i c #E4DADA", "j c #E5DEDD", "k c #0E0505", "l c #CBB3B4", "m c #D8B9BB", "n c #B88B8C", "o c #633E3F", "p c #250A0A", "q c #BFB2B3", "r c #EADEDE", "s c #190E0E", "t c #0F0606", "u c #130A0A", "v c #E6DCDC", "w c #0C0404", "x c #0F0505", "y c #130606", "z c #C3A9A9", "A c #CBA5A6", "B c #A57577", "C c #2C0B0D", "D c #0D0303", "E c #D1C3C4", "F c #EDE1E0", "G c #120909", "H c #090303", "I c #0B0303", "J c #0D0404", "K c #B9A7A7", "L c #DEC6C7", "M c #CCABAD", "N c #B68B8F", "O c #290A0C", "P c #CCB9B9", "Q c #ECE1E1", "R c #E5DDDD", "S c #DFD1D0", "T c #DFCDCC", "U c #CDB1B1", "V c #CBA7A9", "W c #B28487", "X c #2B0A0C", "Y c #1B0607", "Z c #C9AFB0", "` c #ECDFDF", " . c #E6DEDF", ".. c #0F0405", "+. c #120506", "@. c #D0B4B6", "#. c #CBAAAB", "$. c #C09699", "%. c #A17273", "&. c #2A0B0C", "*. c #1A0507", "=. c #AD8C8D", "-. c #D6C0C0", ";. c #E1D0D1", ">. c #0F0504", ",. c #100405", "'. c #DECFCF", "). c #120505", "!. c #180707", "~. c #24090A", "{. c #C69B9E", "]. c #B38083", "^. c #905E5F", "/. c #170405", "(. c #957273", "_. c #C6A3A5", ":. c #DAB9BA", "<. c #DCC4C4", "[. c #130505", "}. c #DCC6C7", "|. c #E0C9CA", "1. c #CFB3B4", "2. c #22080A", "3. c #BA8D8F", "4. c #BE8C8D", "5. c #A16C6E", "6. c #774748", "7. c #220809", "8. c #1D0607", "9. c #B88D8F", "0. c #C79FA0", "a. c #D6B2B4", "b. c #D8BEBF", "c. c #CDACAF", "d. c #D9BABC", "e. c #CBA5A7", "f. c #C6999A", "g. c #BF8B8C", "h. c #9F6A6B", "i. c #804F50", "j. c #1E0708", "k. c #A17477", "l. c #C29698", "m. c #C69E9F", "n. c #C69B9C", "o. c #C59898", "p. c #B27C7D", "q. c #AB7475", "r. c #8C5A5B", "s. c #734849", "t. c #210707", "u. c #250909", "v. c #9E7070", "w. c #B98A8B", "x. c #B88888", "y. c #B37D7F", "z. c #9F6767", "A. c #824E4F", "B. c #703F40", "C. c #27090A", "D. c #1B0507", "E. c #1E0707", "F. c #230909", "G. c #280B0B", "H. c #2C0B0C", "I. c #2F0C0C", " ", " ", " ", " . + @ # $ % & ", " * = - ; > , ' ) ! ~ { ", " = ] ^ / ( _ : < [ } | 1 2 ", " 3 4 5 6 7 8 8 9 0 a b c d ", " 3 e f g 7 h 8 i j k l m n o p ", " + q 6 r s t u v w x y z A B C ", " D E F r 8 G H I J x K L M N O ", " $ P Q 8 R R I J J S T U V W X ", " Y Z ` . .J ....k +.@.#.$.%.&. ", " *.=.-.;...>.,.'.).!.~.{.].^.O ", " /.(._.:.<.[.}.|.1.2.3.4.5.6.7. ", " 8.9.0.a.b.c.d.e.f.g.h.i.O ", " j.k.l.m.n.f.o.4.p.q.r.s.8. ", " t.u.v.w.x.y.z.A.B.C.D. ", " E.F.G.H.I.I.C. ", " ", " "}; ebview-0.3.6.2/pixmaps/ebview.xcf0000644000175000017500000002006310013675513016125 0ustar mhattamhattagimp xcf file00BB/ gimp-commentCreated with The GIMPžI b00¿·µ¬¥ì¥¤¥ä¡¼#2ÿ     Q00e00u Q"Q QQQQQþQþQþQþQþQþQþQþQ þQþQ þQ þQ þQ þQ þQ"þQþQ"þQþQ$þQþQ$þQþQ$þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ$þQþQ$þQþQ$þQþQ"þQþQ"þQ þQ þQ þQ þQ þQþQ þQþQþQQþQQþQýQQQQQQQQQQ QQ Q Q+Q+Q+Q+Q+Q,Q Q"Q QQQQQþQþQþQþQþQþQþQþQ þQþQ þQ þQ þQ þQ þQ"þQþQ"þQþQ$þQþQ$þQþQ$þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ$þQþQ$þQþQ$þQþQ"þQþQ"þQ þQ þQ þQ þQ þQþQ þQþQþQQþQQþQýQQQQQQQQQQ QQ Q Q+Q+Q+Q+Q+Q,Q Q"Q QQQQQþQþQþQþQþQþQþQþQ þQþQ þQ þQ þQ þQ þQ"þQþQ"þQþQ$þQþQ$þQþQ$þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ&þQþQ$þQþQ$þQþQ$þQþQ"þQþQ"þQ þQ þQ þQ þQ þQþQ þQþQþQQþQQþQýQQQQQQQQQQ QQ Q Q+Q+Q+Q+Q+Q,Q ÿ"ÿ ÿÿÿÿÿþÿþÿþÿþÿþÿþÿþÿþÿ þÿþÿ þÿ þÿ þÿ þÿ þÿ"þÿþÿ"þÿþÿ$þÿþÿ$þÿþÿ$þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ&þÿþÿ$þÿþÿ$þÿþÿ$þÿþÿ"þÿþÿ"þÿ þÿ þÿ þÿ þÿ þÿþÿ þÿþÿþÿÿþÿÿþÿýÿÿÿÿÿÿÿÿÿÿ ÿÿ ÿ ÿ+ÿ+ÿ+ÿ+ÿ+ÿ,ÿ00 ¿·µ¬¥ì¥¤¥ä¡¼ÿ     ò00 00 ‰ííííí íí íí íí íííííííííþííí#íí# í# í#íí#íí#íí#ííííííí íí íí íí ííííí±‰ùùùùù ùù ùù ùù ùùùùùùùùùþùùù#ùù# ù# ù#ùù#ùù#ùù#ùùùùùùù ùù ùù ùù ùùùùù±‰øøøøø øø øø øø øøøøøøøøøþøøø#øø# ø# ø#øø#øø#øø#øøøøøøø øø øø øø øøøøø±‰ÿÿÿÿÿ ÿÿ ÿÿ ÿÿ ÿÿÿÿÿÿÿÿÿþÿÿÿ#ÿÿ# ÿ# ÿ#ÿÿ#ÿÿ#ÿÿ#ÿÿÿÿÿÿÿ ÿÿ ÿÿ ÿÿ ÿÿÿÿÿ±00ÇØ·Êÿ      00 00 'ù !ó ë í é ç å á  ß  Ý  Û  á Ù × Û × Õ Õ  Ý Õ Ù Õ ×     Ý Õ    Ù  ! Ù  !×  !!×  !!"Ù  !!"Ý !!"" Û !!"" ã !!"## ã !!"## á !!"##á !!"##ã !""##å !""##ç !""##ë !!""#ñ !!""!õ !!5õíêèæäáßÝÚØ!ïñïíêèæãáßÝÚØÖÓÑÏëóñïìêèæãáßÜÚØÖÓÑÏÌÊÈçõóñïìêèåãáßÜÚØÕÓÑÏÌÊÈÅÃÁåõóñîìêèåãáÞÜÚØÕÓÑÎÌÊÈÅÃÁ¾¼ãõóñîìêçåãáÞÜÚ×ÕÓÑÎÌÊÇÅÃÁ¾¼º·áõóðîìêçåãàÞÜÚ×ÕÓÐÎÌÊÇÅÃÀ¾¼º·µ³ßõóðîìéçåãàÞÜÙ×ÕÓÐÎÌÉÇÅÃÀ¾¼¹·µ³°® ÝõòðîìéçåâàÞÜÙ×ÕÒÐÎÌÉÇÅÂÀ¾¼¹·µ²°®«© ÛõòðîëéçåâàÞÛÙ×ÕÒÐÎËÉÇÅÂÀ¾»¹·µ²°®«©§¤ ÛòðîëéçäâàÞÛÙ×ÔÒÐÎËÉÇÄÂÀ¾»¹·´²°­«©§¤¢ ÙòðíëéçäâàÝÛÙ×ÔÒÐÍËÉÇÄÂÀ½»¹·´²°­«©¦¤¢ ÙðíëéæäâàÝÛÙÖÔÒÐÍËÉÆÄÂÀ½»¹¶´²¯­«©¦¤¢Ÿ›×ïíëéæäâßÝÛÙÖÔÒÏÍËÉÆÄ¿½»¹¶´²¯­«¨¦¤¢Ÿ›˜–×íëèæäâßÝÛØÖÔÒÏÍËÈÆÄ¿½»¸¶´²¯­«¨¦¤¡Ÿ›˜–”×ëèæäáßÝÛØÖÔÑÏÍËÈÆÄÁ¿½»¸¶´±¯­ª¨¦¤¡Ÿš˜–”‘ÕêèæäáßÝÚØÖÔÑÏÍÊÈÆÄÁ¿½º¸¶´±¯­ª¨¦£¡Ÿš˜–“‘ÕèæãáßÝÚØÖÓÑÏÍÊÈÆÃÁ¿½º¸¶³±¯¬ª¨¦£¡Ÿœš˜–“‘ŒŠÕæãáßÜÚØÖÓÑÏÌÊÈÆÃÁ¿¼º¸¶³±¯¬ª¨¥£¡Ÿœš˜•“‘ŒŠˆÕãáßÜÚØÕÓÑÏÌÊÈÅÃÁ¿¼º¸µ³±®¬ª¨¥£¡žœš˜•“‘ŽŒŠˆ…ÕáÞÜÚØÕÓÑÎÌÊÈÅÃÁ¾¼º¸µ³±®¬ª§¥£¡žœš—•“‘ŽŒŠ‡…ƒÕÞÜÚ×ÕÓÑÎÌÊÇÅÃÁ¾¼º·µ³°®¬ª§¥£ žœš—•“ŽŒŠ‡…ƒ€ÕÜÚ×ÕÓÐÎÌÊÇÅÃÀ¾¼º·µ³°®¬©§¥£ žœ™—•“ŽŒ‰‡…ƒ€~ÕÙ×ÕÓÐÎÌÉÇÅÃÀ¾¼¹·µ³°®¬©§¥¢ žœ™—•’ŽŒ‰‡…‚€~|Õ×ÕÒÐÎÌÉÇÅÂÀ¾¼¹·µ²°®«©§¥¢ ž›™—•’Ž‹‰‡…‚€~{yÕÕÒÐÎËÉÇÅÂÀ¾»¹·µ²°®«©§¤¢ ž›™—”’Ž‹‰‡„‚€~{yw×ÐÎËÉÇÄÂÀ¾»¹·´²°­«©§¤¢ ›™—”’‹‰‡„‚€}{yw×ÍËÉÇÄÂÀ½»¹·´²°­«©¦¤¢ ›™–”’‹‰†„‚€}{yvt×ËÉÆÄÂÀ½»¹¶´²¯­«©¦¤¢Ÿ›™–”’‹‰†„‚}{yvtrÙÆÄ¿½»¹¶´²¯­«¨¦¤¢Ÿ›˜–”’‹ˆ†„‚}{xvtrÙÄ¿½»¸¶´²¯­«¨¦¤¡Ÿ›˜–”‘‹ˆ†„}{xvtqo Û¿½»¸¶´±¯­ª¨¦¤¡Ÿš˜–”‘Šˆ†„}zxvtqo Û½º¸¶´±¯­ª¨¦£¡Ÿš˜–“‘Šˆ†ƒ}zxvsqom ݸ¶³±¯¬ª¨¦£¡Ÿœš˜–“‘ŒŠˆ†ƒ|zxvsqol ß³±¯¬ª¨¥£¡Ÿœš˜•“‘ŒŠˆ…ƒ|zxusqolᮬª¨¥£¡žœš˜•“‘ŽŒŠˆ…ƒ~|zxusqnl㪧¥£¡žœš—•“‘ŽŒŠ‡…ƒ~|zwusqnl奣 žœš—•“ŽŒŠ‡…ƒ€~|zwuspnlç žœ™—•“ŽŒ‰‡…ƒ€~|ywuspnlë™—•’ŽŒ‰‡…‚€~|ywurpnï’Ž‹‰‡…‚€~{ywurp!õ‰‡„‚€~{ywt5õÛÙ×ÕÔÒÐÎÍË!ïÞÜÛÙ×ÕÔÒÐÎÌËÉÇÅÄëàÞÜÛÙ×ÕÓÒÐÎÌËÉÇÅÃÂÀ¾çâàÞÜÚÙ×ÕÓÒÐÎÌÊÉÇÅÃÂÀ¾¼º¹åáàÞÜÚÙ×ÕÓÑÐÎÌÊÉÇÅÃÁÀ¾¼º¹·µãáàÞÜÚØ×ÕÓÑÐÎÌÊÈÇÅÃÁÀ¾¼º¸·µ³±ááßÞÜÚØ×ÕÓÑÏÎÌÊÈÇÅÃÁ¿¾¼º¸·µ³±¯®ßáßÞÜÚØÖÕÓÑÏÎÌÊÈÆÅÃÁ¿¾¼º¸¶µ³±¯®¬ª ÝáßÝÜÚØÖÕÓÑÏÍÌÊÈÆÅÃÁ¿½¼º¸¶µ³±¯­¬ª¨¦ ÛáßÝÜÚØÖÔÓÑÏÍÌÊÈÆÄÃÁ¿½¼º¸¶´³±¯­¬ª¨¦¤£ ÛßÝÛÚØÖÔÓÑÏÍËÊÈÆÄÃÁ¿½»º¸¶´³±¯­«ª¨¦¤£¡ ÙßÝÛÚØÖÔÒÑÏÍËÊÈÆÄÂÁ¿½»º¸¶´²±¯­«ª¨¦¤¢¡ŸÙÝÛÙØÖÔÒÑÏÍËÉÈÆÄÂÁ¿½»¹¸¶´²±¯­«©¨¦¤¢¡Ÿ›×ÝÛÙØÖÔÒÐÏÍËÉÈÆÄÂÀ¿½»¹¸¶´²°¯­«©¨¦¤¢ Ÿ›™˜×ÛÙ×ÖÔÒÐÏÍËÉÇÆÄÂÀ¿½»¹·¶´²°¯­«©§¦¤¢ Ÿ›™—–×Ù×ÖÔÒÐÎÍËÉÇÆÄÂÀ¾½»¹·¶´²°®­«©§¦¤¢ ž›™—–”ÕÙ×ÕÔÒÐÎÍËÉÇÅÄÂÀ¾½»¹·µ´²°®­«©§¥¤¢ ž›™—•”’Õ×ÕÔÒÐÎÌËÉÇÅÄÂÀ¾¼»¹·µ´²°®¬«©§¥¤¢ žœ›™—•”’ŽÕÕÓÒÐÎÌËÉÇÅÃÂÀ¾¼»¹·µ³²°®¬«©§¥£¢ žœ›™—•“’ŽŒÕÓÒÐÎÌÊÉÇÅÃÂÀ¾¼º¹·µ³²°®¬ª©§¥£¢ žœš™—•“’ŽŒŠÕÑÐÎÌÊÉÇÅÃÁÀ¾¼º¹·µ³±°®¬ª©§¥£¡ žœš™—•“‘ŽŒŠ‰ÕÐÎÌÊÈÇÅÃÁÀ¾¼º¸·µ³±°®¬ª¨§¥£¡ žœš˜—•“‘ŽŒŠˆ‡ÕÎÌÊÈÇÅÃÁ¿¾¼º¸·µ³±¯®¬ª¨§¥£¡Ÿžœš˜—•“‘ŽŒŠˆ‡…ÕÌÊÈÆÅÃÁ¿¾¼º¸¶µ³±¯®¬ª¨¦¥£¡Ÿžœš˜–•“‘ŽŒŠˆ†…ƒÕÊÈÆÅÃÁ¿½¼º¸¶µ³±¯­¬ª¨¦¥£¡Ÿœš˜–•“‘ŒŠˆ†…ƒÕÈÆÄÃÁ¿½¼º¸¶´³±¯­¬ª¨¦¤£¡Ÿœš˜–”“‘ŒŠˆ†„ƒ×ÄÃÁ¿½»º¸¶´³±¯­«ª¨¦¤£¡Ÿ›š˜–”“‘‹Šˆ†„ƒ×ÂÁ¿½»º¸¶´²±¯­«ª¨¦¤¢¡Ÿ›š˜–”’‘‹Šˆ†„‚}×Á¿½»¹¸¶´²±¯­«©¨¦¤¢¡Ÿ›™˜–”’‘‹‰ˆ†„‚}{Ù½»¹¸¶´²°¯­«©¨¦¤¢ Ÿ›™˜–”’‹‰ˆ†„‚€}{Ù»¹·¶´²°¯­«©§¦¤¢ Ÿ›™—–”’‹‰‡†„‚€}{y Û·¶´²°®­«©§¦¤¢ ž›™—–”’Ž‹‰‡†„‚€~}{y Ûµ´²°®­«©§¥¤¢ ž›™—•”’Ž‹‰‡…„‚€~}{yw ݲ°®¬«©§¥¤¢ žœ›™—•”’ŽŒ‹‰‡…„‚€~|{yw ß®¬«©§¥£¢ žœ›™—•“’ŽŒ‹‰‡…ƒ‚€~|{yw᪩§¥£¢ žœš™—•“’ŽŒŠ‰‡…ƒ‚€~|zywã§¥£¡ žœš™—•“‘ŽŒŠ‰‡…ƒ€~|zyw壡 žœš˜—•“‘ŽŒŠˆ‡…ƒ€~|zxw矞œš˜—•“‘ŽŒŠˆ‡…ƒ~|zxw뚘–•“‘ŽŒŠˆ†…ƒ~|zxï•“‘ŒŠˆ†…ƒ}|z!õŒŠˆ†„ƒ}5 ÿ"ÿÿÿÿÿÿÿ!ÿ #ÿ #ÿ %ÿ %ÿ'ÿ'ÿ'ÿ)ÿ)ÿ)ÿ)ÿ)ÿ)ÿ)ÿ)ÿ)ÿ)ÿ'ÿ'ÿ'ÿ%ÿ %ÿ #ÿ #ÿ !ÿÿÿÿÿÿÿÿ" ÿ6ebview-0.3.6.2/pixmaps/up.xpm0000644000175000017500000000313010013675513015310 0ustar mhattamhatta/* XPM */ static char * up_xpm[] = { "20 20 73 1", " c None", ". c #000000", "+ c #1D1D1D", "@ c #D6D9D5", "# c #94A989", "$ c #060606", "% c #DCDDDA", "& c #92AB87", "* c #E2E0E0", "= c #E3E2E2", "- c #97B08D", "; c #6A875B", "> c #030303", ", c #E9E8E8", "' c #EAE9EA", ") c #9DB591", "! c #8CA480", "~ c #EEECEE", "{ c #F0ECF0", "] c #99B48C", "^ c #91AA85", "/ c #678458", "( c #010101", "_ c #EBEAEA", ": c #F0EEF0", "< c #F3EFF3", "[ c #95B487", "} c #92AE85", "| c #759267", "1 c #E4E3E3", "2 c #EFECEE", "3 c #F3EFF2", "4 c #F6F2F6", "5 c #91B182", "6 c #90AE81", "7 c #859F76", "8 c #688559", "9 c #ECEAEB", "0 c #F1EDF0", "a c #F4F0F4", "b c #8BAE7B", "c c #8BAD7B", "d c #8EAA81", "e c #7A956D", "f c #E2E1E1", "g c #EFECEF", "h c #F2EFF2", "i c #F5F1F5", "j c #8AAD7A", "k c #8AAC7A", "l c #8DAD7F", "m c #8AA67F", "n c #69875B", "o c #D9D9D7", "p c #E5E4E3", "q c #ECEBEB", "r c #EAE9E9", "s c #E7E7E7", "t c #8FAE81", "u c #90AE83", "v c #8BAB7E", "w c #89A67C", "x c #718E62", "y c #B9BEB5", "z c #BBBFB7", "A c #BDC1B8", "B c #BFC3BB", "C c #BEC2BA", "D c #BEC2BB", "E c #739264", "F c #739364", "G c #729063", "H c #607C53", " ", " ", " ", " .. ", " .. ", " +@#$ ", " .%&. ", " .*=-;. ", " >,')!. ", " .=~{]^/. ", " (_:<[}|. ", " .12345678. ", " .90a4bcde. ", " .fghiajklmn. ", " .opqrstuvwx. ", " .yzABCDEEFG8H. ", " .............. ", " ", " ", " "}; ebview-0.3.6.2/pixmaps/search.xpm0000644000175000017500000000646610013675513016150 0ustar mhattamhatta/* XPM */ static char * search_xpm[] = { "30 20 128 2", " c None", ". c #000000", "+ c #ADAD9C", "@ c #959585", "# c #DCDCC5", "$ c #DFDFC8", "% c #242424", "& c #A7A796", "* c #D7D7C1", "= c #D9D9C3", "- c #DCDCC4", "; c #DDDDC7", "> c #E1E1CA", ", c #A6A694", "' c #D6D6BF", ") c #D8D8C2", "! c #DBDBC4", "~ c #DFDFC7", "{ c #E3E3CB", "] c #B2B29F", "^ c #7C7C7C", "/ c #646464", "( c #D5D5BD", "_ c #D5D5BF", ": c #D7D7C0", "< c #DADAC3", "[ c #DEDEC6", "} c #E1E1C9", "| c #E5E5CD", "1 c #E9E9D1", "2 c #343434", "3 c #E7E7E7", "4 c #373736", "5 c #B8B8A6", "6 c #D3D3BC", "7 c #D9D9C2", "8 c #DDDDC5", "9 c #E0E0C8", "0 c #E8E8D0", "a c #ECECD4", "b c #EEEED5", "c c #ECECEC", "d c #EDEDED", "e c #3D3D37", "f c #CECEB7", "g c #E6E6CE", "h c #EAEAD2", "i c #F1F1D8", "j c #A5A594", "k c #EEEEE5", "l c #3C3C3C", "m c #8F8F80", "n c #D0D0B9", "o c #B4B4A0", "p c #46463E", "q c #090908", "r c #4A4A42", "s c #C1C1AD", "t c #F2F2D9", "u c #F3F3DA", "v c #EEEEE6", "w c #505050", "x c #929282", "y c #D1D1B9", "z c #B0B09D", "A c #33332D", "B c #9D9D8D", "C c #CFCFB9", "D c #C4C4AF", "E c #8D8D7F", "F c #34342F", "G c #C3C3AF", "H c #F4F4DB", "I c #F5F5DC", "J c #969686", "K c #D2D2BC", "L c #45453E", "M c #9C9C8C", "N c #E2E2D0", "O c #EDEDE5", "P c #C0C0AC", "Q c #828274", "R c #4B4B43", "S c #BEBEAB", "T c #797973", "U c #D8D8C1", "V c #DDDDC6", "W c #080807", "X c #FBFBFA", "Y c #C3C3AE", "Z c #B5B5A2", "` c #A6A695", " . c #959586", ".. c #98988F", "+. c #080808", "@. c #CACAB5", "#. c #DDDDD0", "$. c #B7B7A4", "%. c #AAAA98", "&. c #9B9B8B", "*. c #8C8C7D", "=. c #818174", "-. c #E2E2CA", ";. c #46463F", ">. c #929283", ",. c #BABAA7", "'. c #ADAD9B", "). c #9F9F8E", "!. c #909081", "~. c #727266", "{. c #4B4B44", "]. c #BEBEAE", "^. c #33332E", "/. c #878779", "(. c #A0A090", "_. c #737367", ":. c #4E4E4E", "<. c #BEBEAA", "[. c #404040", "}. c #6F6F6F", "|. c #EBEBD3", "1. c #EDEDD4", "2. c #EFEFD6", "3. c #F0F0D7", "4. c #BBBBA8", "5. c #CDCDB8", "6. c #4D4D45", "7. c #A6A696", " . . + . ", " . . @ # $ % ", " . . & * = - ; > . ", " . . , ' * * ) ! ~ { ] . ", " . ^ / ' ( _ : < [ } | 1 2 ", " . 3 4 5 6 * 7 8 9 | 0 a b . ", " . c d e f _ ! 9 g 0 h b i j . ", " . k k l m n o p q q r s t u . ", " . v w x y z A B C D E F G H I . ", " . . J K ! L M N O P ] Q R I I S . ", " . T U 7 V W _ X Y Z ` .q I I I ) . ", " . ..! # $ +.@.#.$.%.&.*.q I I I =.. ", " . ~ 9 -.;.>.,.'.).!.~.{.I I . . ", " . ].| | ,.^./.(.>._.. . < . ", " :.0 1 h <.r q q [.}.. . ", " . |.a 1.2.i t t < . . . . ", " . 2.3.i t 1 j . . . . ", " . 4.t u 5.6.. . . . ", " . u 7.. . . ", " . . "}; ebview-0.3.6.2/pixmaps/html.xpm0000644000175000017500000000511310013675513015633 0ustar mhattamhattastatic char * html_xpm[] = { "16 16 126 2", " c None", ". c #5D7F8C", "+ c #6E877B", "@ c #717F69", "# c #4578AD", "$ c #AABBBC", "% c #A6B6AD", "& c #879896", "* c #9CA085", "= c #949774", "- c #8F8E5F", "; c #4A7DAD", "> c #DBE4D7", ", c #FCFCE2", "' c #FBFBDA", ") c #DBE2CC", "! c #B8C0B0", "~ c #EEE1A4", "{ c #BEB98C", "] c #A1935E", "^ c #739AB7", "/ c #E8E9BF", "( c #FBFBD5", "_ c #FCFBD8", ": c #F0F0C9", "< c #CAC99D", "[ c #C9C491", "} c #8C8861", "| c #5A5844", "1 c #3A6C9F", "2 c #5589BA", "3 c #7FA2B0", "4 c #9DB7A1", "5 c #B3CA9B", "6 c #D2D39F", "7 c #E2D19B", "8 c #B3AE8D", "9 c #A1A486", "0 c #3A4B56", "a c #60624E", "b c #191919", "c c #396899", "d c #4B80B6", "e c #5285B5", "f c #869EA2", "g c #B6B98F", "h c #B9B488", "i c #C3B588", "j c #C1B184", "k c #6A7779", "l c #707675", "m c #8C8D85", "n c #9B9991", "o c #82817D", "p c #2E5B88", "q c #4374A7", "r c #4878A4", "s c #8A9FA6", "t c #E0CD9C", "u c #BCB283", "v c #9A9376", "w c #5B6D78", "x c #BBB7AD", "y c #8B887F", "z c #A7A59C", "A c #C2BFB7", "B c #73716E", "C c #366394", "D c #3D6894", "E c #919D98", "F c #DBCE97", "G c #A2A379", "H c #677370", "I c #7B7F7C", "J c #87847C", "K c #97958D", "L c #ADABA4", "M c #C8C5BE", "N c #696866", "O c #254A74", "P c #2D5681", "Q c #567387", "R c #D8C48E", "S c #6F746C", "T c #3A5164", "U c #8B8C87", "V c #A19E96", "W c #ADAAA3", "X c #BCBAB3", "Y c #CFCDC7", "Z c #676765", "` c #223D5D", " . c #214472", ".. c #224470", "+. c #204064", "@. c #2B4861", "#. c #8E9495", "$. c #9F9D96", "%. c #A9A7A2", "&. c #C9C7C2", "*. c #D6D5D1", "=. c #6B6A69", "-. c #162A42", ";. c #1D3858", ">. c #1F3D5D", ",. c #29445A", "'. c #999E9F", "). c #8C8B86", "!. c #BEBCB7", "~. c #D7D6D2", "{. c #E6E5E3", "]. c #70706F", "^. c #000000", "/. c #020202", "(. c #121212", "_. c #A7A5A0", ":. c #D6D4CE", "<. c #E0DFDA", "[. c #E5E4E1", "}. c #EFEEED", "|. c #787878", "1. c #444444", "2. c #3E3E3E", "3. c #2E2E2E", "4. c #272727", "5. c #212121", " ", " ", " . + @ ", " # $ % & * = - ", " ; > , ' ) ! ~ { ] ", " ^ / ( , _ : < [ } | ", " 1 2 3 4 5 6 7 8 9 0 a b ", " c d e f g h i j k l m n o ", " p q r s t u v w x y z A B ", " C D E F G H I J K L M N ", " O P Q R S T U V W X Y Z ", " ` ...+.@.#.$.%.&.*.=. ", " -.;.>.,.'.).!.~.{.]. ", " ^./.(._.:.<.[.}.|. ", " 1.2.3.4.5. ", " " }; ebview-0.3.6.2/pixmaps/.xvpics/0000755000175000017500000000000010013675513015533 5ustar mhattamhattaebview-0.3.6.2/pixmaps/.xvpics/file.xpm0000755000175000017500000000050210013675513017200 0ustar mhattamhattaP7 332 #IMGINFO:16x16 RGB (1196 bytes) #END_OF_COMMENTS 16 16 255 I$IIÛ¶¶¶IH%IÛ¶¶ÚI$IIÛ¶¶¶IH%IÛ¶¶ÚI$Û¶I$ÿÿÿÛÚÛÿ¶ÛÚÛ¶Û¶ÿÛÿÚÛÛÚÛÚ¶IHÛ¶ÿÛþÛÛÚ·ÚÛ¶I$Û¶ÿÛÚÛÚÛÚ·Ú¶I$Û¶ÿÛÚÛ¶ÛÚ¶Û¶I$I$ÿÛÚÛ¶Û¶Ú·µÛ¶I$ÿÛÚ·Ú¶Û¶¶¶Û¶I$ÿ·ÚÛ¶¶Ú·µ“Û¶I$ÿ·Ú¶Û¶¶¶¶’Û¶Û¶Û¶Ú·¶¶¶¶¶’IHÛ¶Û¶¶Ú·µ“¶¶‘I%Û¶I$Û¶¶¶I$IIÛ¶¶Ú%H%Iebview-0.3.6.2/pixmaps/.xvpics/popup2.xpm0000755000175000017500000000072110013675513017511 0ustar mhattamhattaP7 332 #IMGINFO:20x20 RGB (607 bytes) #END_OF_COMMENTS 20 20 255 I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I•–š•¶–•–š•–¶¶º·DI(EÛu¶•–•š–•¶–•š$IIà»¶ÖÛu¶•–•š–•¶–•š$IàÀÛ¶»Ûu¶•–•š–•¶–•š$áà»¶ºÖÛu¶•–•š–•¶–•ÀàÀ)Û¶¶ÛI•–šà–™––•–àÀà»¶$IIHI•–šàÀš•––àÀà)º×$IH)I•–š•àÀš–àÀÀšDš–$IEHI•–š•àÀàÀÀÀ›•H—¹$I)IÛ¶$MH)àÀàÀÀM)H»•(׺·Û¶¶¶I$àäÀÀ›•–•¶–(Û¶¶Û¶¶¶I$IàÀš–µš–•–(·ºÖÛ¶¶¶I$IIà»(HII)LI–H»I$IIÛ¶¶¶IH%IÛ¶•–šµ%HI$IIÛ¶¶¶IH%IÛ¶¶H)MHEI$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%ebview-0.3.6.2/pixmaps/.xvpics/folder_open.xpm0000755000175000017500000000050110013675513020554 0ustar mhattamhattaP7 332 #IMGINFO:16x16 RGB (798 bytes) #END_OF_COMMENTS 16 16 255 I$IIÛ¶¶¶IH%IÛ¶¶ÚI$IIÛ¶¶¶IH%IÛ¶¶ÚI$Û¶I$IIÛ¶¶ÚI“o“oÛ$IHI·Ú¶·“o“o““I$“o“o““o’o““oHI%““Û···¶······’“·Û“Û’····“·¶·····¶“··“·“Û···“·¶“·“·““Û··“·“¶“·“·““Û¶·“·“·’“·““““I$I$Û¶¶¶I$IIÛ¶¶Ú%H%IÛ¶¶¶I$IIÛ¶¶Ú%H%Iebview-0.3.6.2/pixmaps/.xvpics/folder_close.xpm0000755000175000017500000000050210013675513020721 0ustar mhattamhattaP7 332 #IMGINFO:16x16 RGB (1189 bytes) #END_OF_COMMENTS 16 16 255 I$IIÛ¶¶¶IH%IÛ¶¶ÚI$IIÛ¶¶¶IH%IÛ¶¶ÚI$Û¶I$IIÛ¶¶ÚI“o“oÛ$IHI·Ú¶·“o“o““I$ÛÛ·Û¶Û··Û·¶·I$Û·Û·Ú·····¶·I$Û··Û¶······’I$Û···¶····“·’Û¶·Û“Û’···“·“¶Û¶·····’·“·“·“Û¶···“·’·“·“““Û¶··“·“’·“““““IHI$Û¶¶¶I$IIÛ¶¶Ú%H%IÛ¶¶¶I$IIÛ¶¶Ú%H%Iebview-0.3.6.2/pixmaps/.xvpics/paste2.xpm0000755000175000017500000000072110013675513017462 0ustar mhattamhattaP7 332 #IMGINFO:20x20 RGB (607 bytes) #END_OF_COMMENTS 20 20 255 I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%$%$%H%$%$%H%$%HI·Ú¶·$%$ÿ$%$%ÿÿÿÿ$%HIàÛ$%$ÿ$%$%ÿ$%$ÿ$IàÀ»¶$%ÿÿÿ$%$ÿ$%$ÿ$àÀ»Ö·º$%ÿ$ÿ$%$ÿÿÿÿàÀÀ»D)HE$ÿÿÿàÿ%ÿ$%àÀàÛ$I(I$ÿ$%àÀ$)ÿ$àÀÀ%ÛI$Iÿÿ$%$àÀ)ÿàÀÀ$%Û¶I$%$%HÀàÀÀàÁH%I$Û·Ú¶Û¶¶¶I$àäÀÀÁÚ%HÛ¶Û¶¶¶I$àäÀÀ»Ö%IÛ¶¶Û¶¶¶I$IàÀÛ¶º%HÛ¶I$IIÛ¶¶¶à)HE»ÖÛII$IIÛ¶¶¶IH%IÛ¶¶Ú%II$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%ebview-0.3.6.2/pixmaps/paste.xpm0000644000175000017500000000111710013675513016003 0ustar mhattamhatta/* XPM */ static char * paste_xpm[] = { "20 20 4 1", " c None", ". c #2A2A2A", "+ c #FFFFFF", "@ c #000000", " ", " ", " ", " ", ".............. ", "...+....++++.. @@@ ", "...+....+...+. @ @", "..+++...+...+.@ ", "..+.+...++++..@ ", ".+++++..+...+.@ ", ".+...+..+...+. @ @", "++...++.++++.. @@@ ", ".............. ", " @@@@ ", " @@@ ", " @@@@ ", " @ @@@ ", " @@ ", " ", " "}; ebview-0.3.6.2/pixmaps/ebview.ico0000644000175000017500000000727610013675513016132 0ustar mhattamhatta00¨(0` QQQÙê×èÕæÔãÒáÐßÎÝÌÚËØ ÉÖ ÜïÛìÓãÎÜÇÓ ÅÑ ÃÏ ÂÌ ÞñÚìÕåÊØ ÉÕ ÀÊ ¾È ¼Å àóÜîÙêÑáÐÞÃÎ ÁÌ ºÃ¹Á·¾Øê×çÊ× ÈÕ ¾Ç ¸Áµ¼³ºßóÞðÑàÏÞÅÐ ¿Ê ¼Å¸À±·¯µÜîØéÖçÌÙ ÆÓ ¿É ¶¾³¹®³¬°ßòÝðøùí­²ª®¨«Ú믵¦©¤§ÛîÔäÓâÏÞÆÒ ÄÐ ÁË ¿É ½Ç »ÄºÂ«°ª­£¤ÛíÒâÏÝÍÛÂÍ ¶½´»¤¦¢¤¡¢Ÿ ÙëÖæËÙ ½Æ ¹Â²¹±¶©­¢¤ŸŸÒâÀË ¸¿°¶¯´¦¨ ¢››™˜ÇÔ ¿È ·¿²¸«¯ ¡—–ÆÑ ¹Á¶½®´­±žŸ›š–”ÕæÍÚÄÏ µ½´º§ª¢£•“”‘’ÂÍ ©¬¥¨œœŒ©¬£¥™˜—•“‘ŽŠ°µžžšš’ŽŒˆ¥§¡£™—‘ŽŒ‡Š…  œœ˜—“ˆƒŸ š™Œމ‡€¨¬–••’ˆ‚†€…~žœ›‹‰ƒ{–””’Š„„~y ‹‡„}ƒ{ ²¹˜–’‘‹†‚{ v!™™‰„†}t!€x ‡†{q"‚z ~v!}s!yo#¬±|s!‹…‰ƒ…ƒ|~u!zq"yn#z €w |s"zp"xn#w w!|r"º»¦§µ¶·¼Áè³´«¥¯°¦§µ¶·ÞÁèßé©®ªš«¥¯°¦§¬±·ÞÁçßä壨ž©Ÿªš«¥–œ¦§¬±·Þâãßä忢˜£~ž•Ÿ¤š›¥–œ¦§ÜÒ·Þâãßäàá—”˜Ž~ž•Ÿ™š› –œ¡§ÜÒ·ÞÕÑßÚàáÙ}—”˜Ž~…•†™š›‘–œ¡ÛÜÒÝÞÕÑßÚÔØs@Ù}DDDDDDDDDDDDDDDDDDDDDDÕÑÖÚÔØŒ|sƒ„DDDDDDDDDDDDDDDDDDDDDDÃÕÑÖ×ÔØ‚`|sƒ„}lDDDD…o†x‡‘ÐDDDDDÓÃÕÑÖÏÔi{_`|stE}lDDDD~nowx‡‘кDDDÒÓÃÊÑËÏÔUir_`jstE}DDDDmvnowxƽ¾‘кDDDµÎÃÊÑËÏShUi5_`jktEDDDDamcnowÌÆ½¾‘ÈDDD͵ÎÃÊÁËÏRSTUV5_`Å6tDDDDJabcdow®Æ½¾ÇÈDDÉ¿µ¶ÃÊÁË!RSTUV5>`?6DDDDGJKYcdDD®ª½¾«DD»Â¿µ¶ÃÄÁPQ!RST4V5>`?DDDDFGJKYcDD¹®ª½¾DDº»¦¿µ¶À¼Á)P2!"=T4V5>,DDDDAFGJ¢˜DD¸¹®ª³´«¥º»¦§µ¶·¼()<2!"=*4#5>DDDD@AF²JDDD­ž©®ª³´«¥¯°¦§µ¶· ()2!"3*4#5DDDD7@AFDDDD£­ž©®ªš«¥¯°¦§¬± ()!"*#DDDDDDDDDDDD˜£¨ž©Ÿªš«¥–œ¦§¬  !"DDDDDDDDDDDD¢˜£~ž•Ÿ¤š›¥–œ¦§ DDDD,-|DDDD”˜Ž~ž•Ÿ™š› –œ¡ DDDD{,-|sDDD—”˜Ž~…•†™š›‘–œ Š’DDDD{‹Œ|DDD}“”aD~…•†x‘–ˆM‰ yŠDDDDU{‹Œ|DD„}lDDŽ~…o†x‘fM] y€DDDDhU{‚`DDƒ„}lDDam~…o†x‡efMp\] yDDDDzhUi{_`|stE}DDuam~nowxZe9fMp\]g DDDDqShUir_`jstEDDGuamvnowxZe9fM[0\]gDDDD^RShUi5_`jkDDDlGJamcnoCZH9:M[0\]DDDDQ^RSTUV5_`DDDDWXGJabcdCLH9:MN0ODDDDPQ!RSTUVDDDDDDEWXGJKYBC8H9DDDDDDDDDDDDDDDDDDDDDDIEAFGJKBC8DDDDDDDDDDDDDDDDDDDDDD67EAFG./89:01;()<2!"=*4#5>,?67@A./&'01 ()2!"3*4#5%,-67&'  ()!"*#+%,-  !"#$%     ÿÿÿÿÿøÿÿÿÿÿðÿÿÿÿÿàÿÿÿÿÿÁÿÿÿÿÿƒÿÿÿÿÿÿÿ?þÿøüÿàø?ÿ€pÿ ÿþÿüÿøÿðÿàÿàÿÀÿÀÿ€€€??????????€€€ÀÿÀÿàÿàÿðÿøÿüÿþÿÿ?ÿÿ€ÿÿàÿÿÿøÿÿÿÿ?ÿÿebview-0.3.6.2/pixmaps/paste2.xpm0000644000175000017500000000113710013675513016067 0ustar mhattamhatta/* XPM */ static char * paste2_xpm[] = { "20 20 5 1", " c None", ". c #2A2A2A", "+ c #FFFFFF", "@ c #E50404", "# c #000000", " ", " ", " ", " ", ".............. ", "...+....++++.. @## ", "...+....+...+. @@ #", "..+++...+...+.@@ ", "..+.+...++++@@@ ", ".+++@+..+..@@@# ", ".+..@@..+.@@@. # #", "++...@@.+@@@.. ### ", ".....@@@@@@... ", " @@@@@ #### ", " @@@@ ### ", " @@ #### ", " @ # ### ", " ## ", " ", " "}; ebview-0.3.6.2/pixmaps/refresh.xpm0000644000175000017500000000127310013675513016330 0ustar mhattamhatta/* XPM */ static char * refresh_xpm[] = { "20 20 11 1", " c None", ". c #000000", "+ c #566B43", "@ c #4C603C", "# c #526741", "$ c #5A7046", "% c #445636", "& c #37452B", "* c #425334", "= c #475937", "- c #5C7449", " ", " ", " . ", " .. ", " .+@... ", " .#$##@%.. ", " .+#...%%. ", " . .. .&. ", " . . .&. ", " .. .. ", " .. .. ", " .*. . . ", " .*. .. . ", " .%@...#=. ", " ..##-#@#. ", " ...@%. ", " .. ", " . ", " ", " "}; ebview-0.3.6.2/pixmaps/run.xpm0000644000175000017500000000721210013675513015475 0ustar mhattamhattastatic char * run_xpm[] = { "24 24 152 2", " c None", ". c #000000", "+ c #7F7F7F", "@ c #D4D8D0", "# c #C0B8C2", "$ c #CAC8C9", "% c #343634", "& c #959A90", "* c #CCD0C6", "= c #87788B", "- c #989496", "; c #5B5F56", "> c #949991", ", c #8E938A", "' c #121218", ") c #646862", "! c #686B68", "~ c #544856", "{ c #5E5A5F", "] c #828386", "^ c #707372", "/ c #898E85", "( c #60655A", "_ c #AAB1A2", ": c #CBCEC6", "< c #9EA496", "[ c #A4AA9C", "} c #868C80", "| c #65513A", "1 c #484841", "2 c #A7AE9F", "3 c #554530", "4 c #B88F5A", "5 c #4F524B", "6 c #AAB0A2", "7 c #706956", "8 c #D2AA6B", "9 c #5A3E24", "0 c #969C8E", "a c #8C9185", "b c #A1A799", "c c #7A7D70", "d c #C0A071", "e c #986C3C", "f c #737468", "g c #909689", "h c #909588", "i c #A9B0A1", "j c #949A8C", "k c #8E7450", "l c #CBA167", "m c #584B3A", "n c #9FA698", "o c #898E82", "p c #A0A799", "q c #82887C", "r c #736A56", "s c #DCB980", "t c #6A4C2E", "u c #7A7E74", "v c #3D403A", "w c #696E64", "x c #A3AA9B", "y c #7C7461", "z c #886C46", "A c #D7B986", "B c #AD824A", "C c #3E3A32", "D c #181612", "E c #281A0E", "F c #464842", "G c #989E90", "H c #555A50", "I c #B49871", "J c #D0B58B", "K c #DAB985", "L c #A27E4B", "M c #715839", "N c #765230", "O c #1E140B", "P c #575A53", "Q c #999F92", "R c #473A26", "S c #D3BC96", "T c #ECD2A6", "U c #CB9F5E", "V c #E6C792", "W c #C09A66", "X c #261C11", "Y c #47341E", "Z c #30312C", "` c #8A9084", " . c #827053", ".. c #E8D2AF", "+. c #F1E1C6", "@. c #E9C890", "#. c #D6B787", "$. c #E3C087", "%. c #B68F5A", "&. c #22170C", "*. c #222320", "=. c #ACAEA7", "-. c #DCDDD7", ";. c #2A2C28", ">. c #8E7A5E", ",. c #F0DEBF", "'. c #EFDAB4", "). c #ECD09D", "!. c #E9CA95", "~. c #D2AF7A", "{. c #BA9562", "]. c #49321B", "^. c #191008", "/. c #0E0E12", "(. c #121217", "_. c #09090C", ":. c #E9D0A5", "<. c #F1DFC0", "[. c #ECD09F", "}. c #EBCE9B", "|. c #E8C68B", "1. c #CFA462", "2. c #A97F4B", "3. c #5D3D1F", "4. c #050301", "5. c #7E643E", "6. c #EED5A8", "7. c #EBCE98", "8. c #E9C990", "9. c #DEBA7D", "0. c #BD9054", "a. c #8F6538", "b. c #4A311A", "c. c #120B05", "d. c #95805B", "e. c #EDD2A2", "f. c #E8C37F", "g. c #DCB470", "h. c #8E6235", "i. c #674726", "j. c #312111", "k. c #020201", "l. c #CEB080", "m. c #E9C788", "n. c #E0B874", "o. c #A0723F", "p. c #3C2815", "q. c #191009", "r. c #E0BB7C", "s. c #E9C688", "t. c #D3A866", "u. c #6D4A27", " ", " . . . . . . . . . . . . . . . . . . . . ", " + @ @ # # # # # # # # # # # # $ @ @ @ % ", " + & * = = = = = = = = = = = = - ; > , ' ", " + ) ! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ { ] ^ / ' ", " + ( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ : ' ", " + ( _ _ _ _ _ _ < [ _ _ _ _ _ _ _ _ : ' ", " + ( _ _ _ _ _ } | 1 _ _ _ _ _ _ _ _ : ' ", " + ( _ _ _ _ 2 3 4 5 2 6 _ _ _ _ _ _ : ' ", " + ( _ _ _ _ 7 8 9 0 a b _ _ _ _ _ _ : ' ", " + ( _ _ _ c d e f g h i _ _ _ _ _ _ : ' ", " + ( _ _ j k l m n o p _ _ _ _ _ _ _ : ' ", " + ( 6 q r s t u v w x _ _ _ _ _ _ _ : ' ", " + ( y z A B C D E F G _ _ _ _ _ _ _ : ' ", " + H I J K L M N O P Q _ _ _ _ _ _ _ : ' ", " + R S T U V W X Y Z ` _ _ _ _ _ _ _ : ' ", " + ...+.@.#.$.%.&.*.=.: : : : : : : -.' ", " ;.>.,.'.).!.~.{.].^./.(.' ' ' ' ' ' ' _. ", " :.<.[.}.|.1.2.3.4. ", " 5.6.7.8.9.0.a.b.c. ", " d.e.f.g.h.i.j.k. ", " l.m.n.o.p.q. ", " r.s.t.u. ", " " }; ebview-0.3.6.2/pixmaps/folder_closed.xpm0000644000175000017500000000224610013675513017477 0ustar mhattamhatta/* XPM */ static char * folder_closed_xpm[] = { "16 16 54 1", " c None", ". c #000000", "+ c #8383F7", "@ c #D2D2F0", "# c #CFCFF0", "$ c #CDCDF0", "% c #CACAF1", "& c #C8C8F1", "* c #C5C5F1", "= c #C3C3F1", "- c #C0C0F2", "; c #BEBEF2", "> c #BBBBF2", ", c #B9B9F2", "' c #B6B6F2", ") c #CDCDF1", "! c #C2C2F1", "~ c #BDBDF2", "{ c #B8B8F2", "] c #B3B3F3", "^ c #B1B1F3", "/ c #C7C7F1", "( c #B5B5F2", "_ c #B0B0F3", ": c #AEAEF3", "< c #ABABF3", "[ c #BFBFF2", "} c #BABAF2", "| c #ADADF3", "1 c #A8A8F3", "2 c #A6A6F4", "3 c #BCBCF2", "4 c #B7B7F2", "5 c #B2B2F3", "6 c #A3A3F4", "7 c #A0A0F4", "8 c #B4B4F2", "9 c #AFAFF3", "0 c #AAAAF3", "a c #A5A5F4", "b c #9E9EF4", "c c #9B9BF5", "d c #ACACF3", "e c #A7A7F4", "f c #A2A2F4", "g c #9D9DF4", "h c #9898F5", "i c #9696F5", "j c #A4A4F4", "k c #9F9FF4", "l c #9A9AF5", "m c #9595F5", "n c #9393F5", "o c #9090F5", " ", " ", " .... ", " .++++. ", ".++++++....... ", ".@#$%&*=-;>,'. ", ".)%&*!-~>{']^. ", "./*!-~>{(]_:<. ", ".![~}{(]_|<12. ", ".3}4(5_|<1267. ", ".4859|01a67bc. ", ".^9d0eaf7gchi. ", ".d0ejfkglhmno. ", ".............. ", " ", " "}; ebview-0.3.6.2/pixmaps/ebook.xpm0000644000175000017500000000167010013675513015772 0ustar mhattamhatta/* XPM */ static char * ebook_xpm[] = { "20 20 28 1", " c None", ". c #000000", "+ c #844F4F", "@ c #AB7474", "# c #A66B6B", "$ c #9F6060", "% c #B6B6B5", "& c #8E5555", "* c #A6A7A4", "= c #888D82", "- c #945959", "; c #9B5E5E", "> c #9E6769", ", c #3C4035", "' c #54594B", ") c #875252", "! c #91948E", "~ c #AE8182", "{ c #E1D5D2", "] c #F1F0EC", "^ c #AAAAA7", "/ c #636361", "( c #C2C2C0", "_ c #14090A", ": c #B88989", "< c #CCCDC4", "[ c #AF7A7A", "} c #999D91", " ", " ", " .......... ", " .+@#$$$$$$. ", " .@#$$$$$$.% ", " .&@$$$$$$$.% ", " .@#$$$$$$.%% ", " .@#$$$$$$$.%*. ", " .&@$$$$$$$.%%=. ", " .@#$$$$$$$.%*. ", " .-@$$$$$$$.%%=. ", " .;#$$$$$$$.%*. ", " .>...,')$$.%%!. ", " .~{]]]^/...%*. ", " .>{]]]]]]](%!. ", " _..:<]]]](*. ", " ...[<]}=. ", " ...$. ", " .. ", " "}; ebview-0.3.6.2/pixmaps/home.xpm0000644000175000017500000000214010013675513015614 0ustar mhattamhattastatic char * home_xpm[] = { "24 24 27 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #CFD7CF", "# c #E0E4DD", "$ c #839279", "% c #C9D0C5", "& c #D4D9D0", "* c #B9C2B3", "= c #7F8F74", "- c #000100", "; c #C7CEC3", "> c #D2D7CE", ", c #CCD3C8", "' c #C8CFC4", ") c #B7C0B1", "! c #EFF1EE", "~ c #B8C1B2", "{ c #7A8A6F", "] c #D3D8CF", "^ c #6C7A63", "/ c #A6B19E", "( c #626F5A", "_ c #6D7B64", ": c #6A7861", "< c #D8DDD4", "[ c #6B7962", " ", " ", " ", " ", " . ... ", " .+. .@. ", " .+#$..%. ", " .++&*=-;. ", " .++>,')='. ", " .!+>'''%~{. ", " .++]''%'''~^. ", " .+++%''%';;;/(. ", " ...++'''';;;;_... ", " .++%';;;;;;^. ", " .++....;;;;^. ", " .++.;;.;;;'^. ", " .++.''.''';:. ", " .+<.,,.'';;[. ", " .%_.^^.^^:[^. ", " ............. ", " ", " ", " ", " " }; ebview-0.3.6.2/pixmaps/jump.xpm0000644000175000017500000000137010013675513015643 0ustar mhattamhatta/* XPM */ static char * jump_xpm[] = { "30 20 2 1", " c None", ". c #0000FE", " ", " ", " ", " ", " ", " .. ", " . ", " . ", " . . . . .. ", " . . . . . . .. . ", " . . . . . . . . ", " . . . . . . . . ", " . . . . . . . . ", " ... .. . .. . .. .. . ", " . ", " . ", " . ", " ", " ", " "}; ebview-0.3.6.2/pixmaps/push-off.xpm0000644000175000017500000000114310013675513016415 0ustar mhattamhatta/* XPM */ static char * push_off[] = { "10 10 28 1", " c None", ". c #F7944A", "+ c #F79452", "@ c #D68442", "# c #A56331", "$ c #FF9452", "% c #FFD68C", "& c #FFC684", "* c #BD7339", "= c #945229", "- c #5A3118", "; c #000000", "> c #E7844A", ", c #DE844A", "' c #C67339", ") c #9C5A31", "! c #734221", "~ c #312110", "{ c #B56B39", "] c #AD6B39", "^ c #945A31", "/ c #422910", "( c #211008", "_ c #844A29", ": c #7B4A21", "< c #633921", "[ c #392110", "} c #291810", " ", " ", " .+@# ", " $%&*=-", ";;;;>,')!~", " {]^!/(", " _:<[(}", " [((( ", " ", " "}; ebview-0.3.6.2/pixmaps/new.xpm0000644000175000017500000000406510013675513015465 0ustar mhattamhattastatic char *new_xpm[] = { /* width height ncolors chars_per_pixel */ "24 24 89 1", /* colors */ " c None", ". c #DCDCC4", "X c #929282", "o c #797973", "O c #ADAD9C", "+ c #F5F5DC", "@ c #F3F3DA", "# c #F1F1D8", "$ c #A7A796", "% c #EFEFD6", "& c #A5A594", "* c #EDEDD4", "= c #EBEBD2", "- c #E9E9D0", "; c #EEEEE5", ": c #DDDDC7", "> c #B8B8A6", ", c #D9D9C3", "< c #D7D7C1", "1 c #D5D5BF", "2 c #3D3D37", "3 c #A6A694", "4 c #ECECEC", "5 c #E0E0C9", "6 c #BBBBA8", "7 c #DCDCC5", "8 c #DADAC3", "9 c #D8D8C1", "0 c #D6D6BF", "q c #D0D0B9", "w c #CECEB7", "e c #98988F", "r c #EBEBD3", "t c #E9E9D1", "y c #E7E7CF", "u c #E5E5CD", "i c #E3E3CB", "p c #E1E1C9", "a c #4D4D45", "s c #DFDFC7", "d c #959585", "f c #DDDDC5", "g c #D5D5BD", "h c #D1D1B9", "j c #EEEEE6", "k c #F4F4DB", "l c #F2F2D9", "z c #CDCDB8", "x c #F0F0D7", "c c #818174", "v c #EEEED5", "b c #ECECD3", "n c #EAEAD1", "m c #E4E4CB", "M c #7C7C7C", "N c #D8D8C2", "B c #646464", "V c #D2D2BC", "C c #828274", "Z c #505050", "A c #4E4E4E", "S c #3C3C3C", "D c #EDEDED", "F c #BEBEAB", "G c #E1E1CA", "H c #DFDFC8", "J c #E7E7E7", "K c #DDDDC6", "L c #343434", "P c #DBDBC4", "I c #D9D9C2", "U c #8F8F80", "Y c #D7D7C0", "T c #B2B29F", "R c #D3D3BC", "E c #BEBEAE", "W c #242424", "Q c #A6A696", "! c #ECECD4", "~ c #EAEAD2", "^ c #E8E8D0", "/ c #E6E6CE", "( c #E4E4CC", ") c #E2E2CA", "_ c #E0E0C8", "` c #969686", "' c #373736", "] c #DEDEC6", /* pixels */ " ", " ", " ", " O ", " d7HW ", " $<,.:G ", " 30<R c #9E6769", ", c #3C4035", "' c #54594B", ") c #4E6A75", "! c #91948E", "~ c #AE8182", "{ c #E1D5D2", "] c #F1F0EC", "^ c #AAAAA7", "/ c #636361", "( c #C2C2C0", "_ c #14090A", ": c #85A3AE", "< c #CCCDC4", "[ c #7697A3", "} c #999D91", " ", " ", " .......... ", " .+@#$$$$$$. ", " .@#$$$$$$.% ", " .&@$$$$$$$.% ", " .@#$$$$$$.%% ", " .@#$$$$$$$.%*. ", " .&@$$$$$$$.%%=. ", " .@#$$$$$$$.%*. ", " .-@$$$$$$$.%%=. ", " .;#$$$$$$$.%*. ", " .>...,')$$.%%!. ", " .~{]]]^/...%*. ", " .>{]]]]]]](%!. ", " _..:<]]]](*. ", " ...[<]}=. ", " ...$. ", " .. ", " "}; ebview-0.3.6.2/pixmaps/small-left.xpm0000644000175000017500000000107410013675513016731 0ustar mhattamhatta/* XPM */ static char * small_left_xpm[] = { "10 10 25 1", " c None", ". c #4C4E4B", "+ c #A3ABA1", "@ c #000000", "# c #494D48", "$ c #B4B7B3", "% c #F4F8F4", "& c #DDE7DB", "* c #3B4239", "= c #B6BCB5", "- c #E8EFE7", "; c #E9F0E8", "> c #EFF3EE", ", c #DAE5D8", "' c #121910", ") c #121E10", "! c #46633F", "~ c #709966", "{ c #82A878", "] c #84AA7B", "^ c #769E6C", "/ c #42623A", "( c #749C69", "_ c #172514", ": c #406238", " ", " ", " .+@ ", " #$%&@ ", " *=-;>,' ", " )!~{]^@ ", " )/~(@ ", " _:@ ", " ", " "}; ebview-0.3.6.2/pixmaps/ebview-32x32.xpm0000644000175000017500000001374011241404762016734 0ustar mhattamhatta/* XPM */ static char *e[] = { /* columns rows colors chars-per-pixel */ "32 32 175 2", " c black", ". c #1F24777A7FCA", "X c #3D855EC162F0", "o c #2F3068EE6FE5", "O c #2379704B7991", "+ c #2BDB6F3A7570", "@ c #220973BF7CC8", "# c #2068787A807E", "$ c #2B4370B576E8", "% c #2D3D7D457E4F", "& c #376C621567D9", "* c #3290680C6DF4", "= c #323769156ED2", "- c #3DCF634B65C9", "; c #3CE7670E689F", ": c #3D696CBF6C47", "> c #356C7E977B8C", ", c #3A11740E72C0", "< c #399478EF764A", "1 c #3A137E777998", "2 c #5FF63CDE3D6D", "3 c #668925EF2B10", "4 c #64F229112DDD", "5 c #625D352E36FA", "6 c #627B3B3A3B1B", "7 c #6A5F34833321", "8 c #44995BDC5DE0", "9 c #4D5955AB55F2", "0 c #4DA258E857E5", "q c #4B525BC15ADE", "w c #53DF4D514D88", "e c #5E05451C43A7", "r c #5DAC495D46B1", "t c #5287506E5032", "y c #5158514B514A", "u c #49B560E05F0E", "i c #40AB686A67DB", "p c #421B6D346A89", "a c #410E71A56E07", "s c #1E797CD78408", "d c #205078DE80CE", "f c #2FF781247FEA", "g c #359284E77FDE", "h c #17F584AD897F", "j c #1CE0817E879D", "k c #1CCE85E68B02", "l c #1B768AED8F06", "z c #17558F3491F6", "x c #1A948F429243", "c c #16E594669618", "v c #177897E49926", "b c #160E9D699D48", "n c #197B943B962B", "m c #18379812992A", "M c #189F998D9A39", "N c #1698A0D79FE8", "B c #0F40A7DDA4D5", "V c #0E89AB77A7E3", "C c #0B75ADF8A993", "Z c #0DECB3C5AE5B", "A c #0B2BB7DBB10F", "S c #0D4ABD56B5DF", "D c #08CCBEA0B9F3", "F c #14C8A4C9A2F7", "G c #1335AA47A739", "H c #12E4AE3CAA4C", "J c #1119B35AAE23", "K c #1D3EB498AA53", "L c #1133B710B108", "P c #1118BB03B40D", "I c #1FE7B7F2B30D", "U c #1EC9BD55B733", "Y c #273E848A85F3", "T c #23DF82668905", "R c #26D18B508AAF", "E c #2EDE863183BD", "W c #2D998A5886D8", "Q c #203E989599F1", "! c #258C9ED29C3E", "~ c #2B5E9A2D9C62", "^ c #3516872B819F", "/ c #349C8AAC842A", "( c #31D1918389E0", ") c #34E49B629E33", "_ c #23A0A3579BF3", "` c #2595AABEA02B", "' c #235CA310A2B5", "] c #2527ABCEA0D6", "[ c #20A8B495B0BD", "{ c #077AC5E1BDEC", "} c #0733C9A2BF55", "| c #0968C0EBB838", " . c #0CA0C49BBBA2", ".. c #0BABC9BDBFA3", "X. c #1391C3BAB88F", "o. c #1606C739BA1D", "O. c #1909C3DEB65D", "+. c #1DA2C0C9BA35", "@. c #27B2C6DFBFE5", "#. c #056ECD95C23D", "$. c #0B2FCE39C342", "%. c #0632D47EC782", "&. c #03BCD74EC9AE", "*. c #0668DD82CF05", "=. c #0A0CD335C71B", "-. c #0948D734CA3E", ";. c #0860DAB2CCD9", ":. c #0705E07AD177", ">. c #05CBE476D475", ",. c #040FE9B8D872", "<. c #03A7ED24DB42", "1. c #0857E442D33A", "2. c #1300ED39DCB1", "3. c #0000FFFFF78D", "4. c #3F4AC6E3C1E5", "5. c #478BA4D1A707", "6. c #574FAD62AF79", "7. c #5F2CA814ABCC", "8. c #560EC061BE66", "9. c #5D57B35DB4D7", "0. c #6004BF53BE55", "q. c #66A2AEC3B1AB", "w. c #66D7B199B3E2", "e. c #77BDB0C1B4DD", "r. c #4DD1C86CC457", "t. c #5F2BC66DC3FE", "y. c #5E45CA94C73F", "u. c #5DEDCDE8C9ED", "i. c #5C1CD402CE7D", "p. c #583BDEF9D6CC", "a. c #5B49D85AD1FB", "s. c #5A45DCA7D55C", "d. c #5681E6E2DD0C", "f. c #58A5E363DA55", "g. c #60D3C26BC0CD", "h. c #68B7D4DFD047", "j. c #6ED5D556D130", "k. c #8F27C84AC973", "l. c #829CD27FD07B", "z. c #8C36D26DD161", "x. c #8A48DBBAD885", "c. c #9AB5D5F4D565", "v. c #9916DD5FDB22", "b. c #9756E16BDE2B", "n. c #A02EE767E3AC", "m. c #9DD6F055EA94", "M. c #93BBF344EC1C", "N. c #9D95F185EB83", "B. c #A5C7CFF1D15E", "V. c #A910D0A6D245", "C. c #A755D1EDD355", "Z. c #A513DD0FDBDF", "A. c #AA0CD68BD712", "S. c #AD8ED85AD8E7", "D. c #A8F8DA58D9FD", "F. c #A5C0E1D4DFB3", "G. c #AFB4E196E05F", "H. c #A3D1E69EE34A", "J. c #A40EEB3CE712", "K. c #A346EED2E9D6", "L. c #AD93E53CE327", "P. c #A210F31FED33", "I. c #BF1BEC3BEA10", "U. c #BF62F316EF8D", "Y. c #C22AE7ADE6A7", "T. c #C185EA11E895", "R. c #C121EED8EC71", "E. c #DAA0F045EF91", "W. c #D6A2F338F1AC", "Q. c #DB2BF337F206", "!. c #E768F753F656", "~. c #ED29F99BF89C", "^. c #EFE5FA7DF98C", "/. c #F51CFC7FFB95", "(. c None", /* pixels */ "(.(.(.(.(.(.(.(.t w a / / / ^ ^ ^ p w w (.(.(.(.(.(.(.(.(.(.(.(.", "(.(.(.(.(.4 3 q / K O.,.>.1.*.*.-.K _ 1 q 5 5 (.(.(.(.(.(.(.(.(.", "(.(.(.(.(.i / O.>.<.,.>.*.*.-.-.=.$.$.S ' < q (.(.(.(.(.(.(.(.(.", "(.(.(.(.y ] <.<.<.>.>.*.*.;.-.$.$.$.o... .P W 9 (.(.(.(.(.(.(.(.", "(.(.(.0 ] <.<.<.,.:.:.*.;.=.=.$.$.{ .S P P J ^ 9 (.(.(.(.(.(.(.", "(.(.u ` <.2.M.P.N.N.N.m.K.K.K.J.J.n.n.H.j.A J H E q (.(.(.(.(.(.", "(.3 / <.<.2.M.P.U./.^.U.J.J.H.H.I.^.^./.H.J H H F : 2 (.(.(.(.(.", "(.u O.<.,.,.>.:.f.^.^.f.} ....| 4.a.W./.Z.H H G F R 9 (.(.(.(.(.", "r / 1.,.1.>.:.;.f.^.^.s.} . . .S A r.Q.Z.H G F F m : w (.(.(.(.", "w K <.>.1.*.;.&.f.^.^.s. . .S +.U J Z F.Z.F F b b M % w (.(.(.(.", "a X.,.1.*.*.-.%.s.^.^.a.| .S v.v.J H G.Z.F F b M n Y 8 7 (.(.(.", "/ >.1.*.*.-.=.#.s.^.^.i.D A 4.Q.Z.H G 8.z.F b v m n x : e (.(.(.", "/ 1.*.;.;.=.$.#.s.^.^.i.A A x./.Z.G F F ' b M n n x x ; e (.(.(.", "^ *.;.-.-.$.$.{ s.^.^.I.H.L.~.^.v.G F F b v n n x l k - e (.(.(.", "^ ;.-.=.$.$...{ i.^.^.I.H.L.~./.Z.F b M v n n x l k k - e (.(.(.", "^ -.=.$.$...X.D i.^.^.y.C H l.~.Z.b M M c x x l l T j - e (.(.(.", "d =.$.$.....S D i.^.^.y.V G F G.D.v v M 9.) l k k s d - r (.(.(.", "p K $.$.S .P A u.^.^.t.B F F c.c.v n ~ Q.q.h j s s + q 6 (.(.(.", "r _ $.o.S S P A u.^.^.g.B b b ' ! n n 6.!.q.s s s d = y (.(.(.(.", "r 1 S o.S P L Z y.^.^.g.F b b c n x x S.!.7.s s s @ X y (.(.(.(.", "(.q _ P P L J C t.^.^.w.b v v c x 5.k.^.S.T s . @ = y (.(.(.(.(.", "(.5 < P Z I v.Z.I.^./.I.D.D.Z.A.A.E././.B.s s . @ X r (.(.(.(.(.", "(.(.q W H I v.Z.Z.Z.Z.Z.D.A.A.A.C.C.B.B.e.. @ O & 9 (.(.(.(.(.(.", "(.(.(.9 E G G F b b v v c x l l k j s s s @ O X y y (.(.(.(.(.(.", "(.(.(.(.9 ^ b F b M m n x x l k k s d @ d O & y y y y (.(.(.(.(.", "(.(.(.(.(.9 : R n m n x x k k s d s d O o 8 9 y y y y y (.(.(.(.", "(.(.(.(.(.2 2 9 : % Y l k k T s d $ * X 9 e r (.y y y y y (.(.(.", "(.(.(.(.(.(.(.(.w w 8 ; ; X ; - - u t t (.(.(.(.(.y y y y y (.(.", "(.(.(.(.(.(.(.(.(.(.e e e e e e r e (.(.(.(.(.(.(.(.y y y y y (.", "(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.y y y y y ", "(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.y y y y ", "(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.y y y " }; ebview-0.3.6.2/pixmaps/left.xpm0000644000175000017500000000221110013675513015615 0ustar mhattamhatta/* XPM */ static char * left_xpm[] = { "20 20 42 1", " c None", ". c #000000", "+ c #C6D7C3", "@ c #E4EBE2", "# c #FFFFFF", "$ c #DFE8DD", "% c #F3F7F3", "& c #DCE6D9", "* c #F2F6F1", "= c #EFF3EE", "- c #F1F5F0", "; c #F4F7F4", "> c #121B12", ", c #DEE7DC", "' c #EEF3ED", ") c #EBF1EA", "! c #B1C7AC", "~ c #E9EFE8", "{ c #D7E3D5", "] c #243221", "^ c #375930", "/ c #548149", "( c #729B68", "_ c #80A776", ": c #7DA473", "< c #81A877", "[ c #83AA7A", "} c #87AC7D", "| c #67925C", "1 c #516F4A", "2 c #4E7C44", "3 c #739C6A", "4 c #84A979", "5 c #81A878", "6 c #709864", "7 c #49763F", "8 c #719A67", "9 c #608C56", "0 c #46703C", "a c #6FA763", "b c #5B8851", "c c #36582E", " ", " ", " ", " .. ", " ..+. ", " ..@#+. ", " ..$#%%+. ", " ..&#*=-;+. ", " .>,#'))===+. ", " ..!#~{,@)===+] ", " ..^/(_:<[}[}|. ", " ..1234_5}[|. ", " ..^26<_}|. ", " ..728_9. ", " ..0ab. ", " ..c. ", " .. ", " ", " ", " "}; ebview-0.3.6.2/pixmaps/multi.xpm0000644000175000017500000000065710013675513016031 0ustar mhattamhatta/* XPM */ static char * multi_xpm[] = { "16 16 4 1", " c None", ". c #FDFFD4", "+ c #000000", "@ c #818181", " ", " ", " ............. ", " ............. ", " .+..@@@@@@@@. ", " .+..++++++++. ", " ............. ", " ............. ", " .+..@@@@@@@@. ", " .+..++++++++. ", " ............. ", " ............. ", " .+..@@@@@@@@. ", " .+..++++++++. ", " ............. ", " "}; ebview-0.3.6.2/pixmaps/right.xpm0000644000175000017500000000236310013675513016010 0ustar mhattamhatta/* XPM */ static char * right_xpm[] = { "20 20 49 1", " c None", ". c #000000", "+ c #E1EADF", "@ c #FFFFFF", "# c #F0F4EF", "$ c #D4E0D1", "% c #F3F7F3", "& c #EDF2EB", "* c #CEDCCB", "= c #F4F7F4", "- c #F1F5F0", "; c #EFF3EE", "> c #EBF1EA", ", c #C9D8C5", "' c #E5ECE3", ") c #CBDAC7", "! c #181818", "~ c #2B2B2B", "{ c #E4EBE2", "] c #DEE7DC", "^ c #D7E3D5", "/ c #EEF3ED", "( c #B1C7AC", "_ c #9DBB90", ": c #88AC80", "< c #83AA7C", "[ c #85A879", "} c #7EA476", "| c #84A778", "1 c #759B6C", "2 c #59814F", "3 c #3A5934", "4 c #9ABB8F", "5 c #83AA7A", "6 c #87AC7D", "7 c #82A87B", "8 c #86A97C", "9 c #759C6D", "0 c #537C49", "a c #445840", "b c #80A776", "c c #749868", "d c #4B7040", "e c #90B387", "f c #749A6B", "g c #3B5E31", "h c #5D8554", "i c #37592F", "j c #3F6534", " ", " ", " ", " .. ", " .+.. ", " .@#$.. ", " .@%&#*.. ", " .@=-;>-,.. ", " .@;;;>>'#)!. ", " ~@;;;>{]^]/(.. ", " ._:<:<[}|123.. ", " .4567|890a.. ", " .46b[c0d.. ", " .ebf0g.. ", " . c #B0C4A6", ", c #A6BD9B", "' c #A3BA97", ") c #9AB590", "! c #87A37B", "~ c #738F65", "{ c #010101", "] c #E4E4E2", "^ c #F0EEEF", "/ c #F1F0F1", "( c #F2F0F2", "_ c #93B385", ": c #8FAF81", "< c #8FAF80", "[ c #86A877", "} c #739164", "| c #040404", "1 c #DBDBDA", "2 c #EBE9EA", "3 c #F3EFF3", "4 c #F5F1F5", "5 c #8AAD7A", "6 c #89AC79", "7 c #86A478", "8 c #6A885C", "9 c #E0E0DF", "0 c #F2EFF2", "a c #F4F0F4", "b c #F6F2F6", "c c #8BAE7B", "d c #86A876", "e c #769568", "f c #D4D5D1", "g c #EEEDED", "h c #8DAE7D", "i c #89A67B", "j c #E3E3E1", "k c #F1EFF1", "l c #F3F0F3", "m c #8EAE7E", "n c #8FAD81", "o c #729163", "p c #D4D5D2", "q c #ECEBEB", "r c #EEECEE", "s c #91AF82", "t c #7F9D71", "u c #678459", "v c #030303", "w c #E1E1E0", "x c #E9E8E8", "y c #90AB83", "z c #6E8B60", "A c #D2D4D0", "B c #7D9970", "C c #637F55", "D c #BBC0B8", "E c #678558", "F c #A3AC9E", "G c #5F7B52", " ", " ", " ", " .+++@#$$$$@... ", " .%&*=-;>,')!~. ", " {]^/(/_:<[}. ", " |1234455678. ", " .90abc5de. ", " .fg(45hi8. ", " .jklmno. ", " .pqrstu. ", " vwxyz. ", " .A%BC. ", " .DE. ", " .FG. ", " .. ", " .. ", " ", " ", " "}; ebview-0.3.6.2/stamp-h.in0000644000175000017500000000001210013675516014355 0ustar mhattamhattatimestamp ebview-0.3.6.2/README0000644000175000017500000000273410013675513013346 0ustar mhattamhatta EBView -- Electronic Book Viewer ³µÍ× ==== EBView ¤Ï UNIX ¸ß´¹ OS ¾å¤Ç CD-ROM ¼­½ñ¤ò»²¾È¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤Ç¤¹¡£ °Ê²¼¤Îưµ¡¤Ë¤è¤ê³«È¯¤µ¤ì¤Þ¤·¤¿¡£ ¡¦Linux ¾å¤Ç CD-ROM ¼­½ñ¤ò¸«¤¿¤¤! ¡¦Web ¤ò¸«¤Æ¤¤¤ë¤È¤­¤Ê¤Éñ¸ì¤¬¤ï¤«¤é¤Ê¤¤¤È¤­¤Ë¥µ¥¯¥Ã¤È¼­½ñ¤ò°ú¤­¤¿¤¤¡ª ¡¦Ê£¹ç¸¡º÷¡¢¾ò·ï¸¡º÷»þ¤ËÊ£¿ô¤Îñ¸ì¤ò°ìµ¤¤Ë»ØÄꤷ¤¿¤¤¡ª ¼ÂºÝ¤Î¸¡º÷¤Ë¤Ï EB ¥é¥¤¥Ö¥é¥ê(http://www.sra.co.jp/people/m-kasahr/eb/) ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£ °Ê²¼¤ÎÆÃħ¤¬¤¢¤ê¤Þ¤¹¡£ * ¶ú»É¤·¸¡º÷(Ê£¿ô¤Î¼­½ñ¤ò°ìµ¤¤Ë¸¡º÷¤¹¤ë) * X ¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷ * ¸¡º÷·ë²Ì¤Î¥Ý¥Ã¥×¥¢¥Ã¥×ɽ¼¨ * ÀŻ߲衢ư²è¡¢²»À¼¤Î¥µ¥Ý¡¼¥È * ¼­½ñ¤Î¥°¥ë¡¼¥×²½ * ¸ìÈøÊäÀµ * GTK2¤ò»È¤Ã¤¿GUI ¥¤¥ó¥¹¥È¡¼¥ëÊýË¡ ================ INSTALL ¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ »È¤¤Êý ====== ¥×¥í¥°¥é¥à¤¬µ¯Æ°¤·¤¿¤é¡Ö¥Ø¥ë¥×¡×¥á¥Ë¥å¡¼¤Î¡Ö»È¤¤Êý¡×¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£ Web ¥Ö¥é¥¦¥¶¤Ë»È¤¤Êý¤ÎÀâÌÀ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ ¥é¥¤¥»¥ó¥¹¡¦ÌÈÀÕ»ö¹à ==================== EBView ¤Ï GNU General Public License ¤Ë½¾¤Ã¤¿¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£¤³¤Î ¥×¥í¥°¥é¥à¤ÎÍøÍѤËÅö¤¿¤Ã¤Æ¤Ïºî¼Ô¤Ï¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤¤¤Þ¤»¤ó¡£¾Ü¤·¤¯¤Ï COPYING ¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ ¥Û¡¼¥à¥Ú¡¼¥¸ ============ EBView ¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤Ï°Ê²¼¤Ç¤¹¡£ºÇ¿·¤Î¾ðÊó¤ä¥×¥í¥°¥é¥à¤Î¥À¥¦¥ó¥í¡¼¥É¤Ï ¤³¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ http://ebview.sourceforge.net/ ¼Õ¼­ ==== EB ¥é¥¤¥Ö¥é¥ê¤È¤¤¤¦¡¢¤¹¤Ð¤é¤·¤¤¥×¥í¥°¥é¥à¤ò³«È¯¤µ¤ì¤¿³Þ¸¶¤µ¤ó¤Ë´¶¼Õ¤·¤Þ ¤¹¡£EB ¥é¥¤¥Ö¥é¥ê¤¬¤Ê¤±¤ì¤ÐËÜ¥×¥í¥°¥é¥à¤â¤Ê¤«¤Ã¤¿¤Ç¤·¤ç¤¦¡£ ºî¼Ô ==== ¥Ð¥°¤ÎÊó¹ð¡¢¼ÁÌäÅù¤Ï°Ê²¼¤Ë¤ª´ê¤¤¤·¤Þ¤¹¡£ ¿ÜÆ£¸­°ì (Kenichi SUTO) E-Mail : ebview-0.3.6.2/AUTHORS0000644000175000017500000000014110013675512013523 0ustar mhattamhattaKenichi Suto Hironori FUJII ebview-0.3.6.2/ltmain.sh0000755000175000017500000073337411241362244014322 0ustar mhattamhatta# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6 Debian-2.2.6a-4" TIMESTAMP="" package_revision=1.3012 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 ebview-0.3.6.2/data/0000755000175000017500000000000011241637662013400 5ustar mhattamhattaebview-0.3.6.2/data/Makefile.am0000644000175000017500000000124210013675512015423 0ustar mhattamhattadata = about.jp about.en endinglist.xml endinglist-ja.xml searchengines.xml shortcut.xml filter.xml all: $(data) check: all install: if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(pkgdatadir); \ else \ $(top_srcdir)/mkinstalldirs $(pkgdatadir); \ fi; \ data="$(data)"; \ for file in $$data; do \ $(INSTALL_DATA) $(srcdir)/$$file $(pkgdatadir)/$$file; \ done; # Define this as empty until I found a useful application. installcheck: uninstall: data="$(data)"; \ for file in $$data; do \ rm -f $(pkgdatadir)/$$file; \ done mostlyclean: rm -f *.a *.o *.lo core core.* *~ clean: mostlyclean distclean: clean rm -f Makefile about.jp about.en ebview-0.3.6.2/data/endinglist.xml0000644000175000017500000000170210013675512016252 0ustar mhattamhatta ies y ied y es ting te ing ing e ed e ed id y ices ex ves fe s ebview-0.3.6.2/data/Makefile.in0000644000175000017500000002570511241636761015455 0ustar mhattamhatta# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/about.en.in $(srcdir)/about.jp.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 \ $(top_srcdir)/m4/glib-gettext.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = about.jp about.en CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FGREP = @FGREP@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOX_CFLAGS = @PANGOX_CFLAGS@ PANGOX_LIBS = @PANGOX_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ data = about.jp about.en endinglist.xml endinglist-ja.xml searchengines.xml shortcut.xml filter.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): about.jp: $(top_builddir)/config.status $(srcdir)/about.jp.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ about.en: $(top_builddir)/config.status $(srcdir)/about.en.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install-exec: install-exec-am install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am all: $(data) check: all install: if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(pkgdatadir); \ else \ $(top_srcdir)/mkinstalldirs $(pkgdatadir); \ fi; \ data="$(data)"; \ for file in $$data; do \ $(INSTALL_DATA) $(srcdir)/$$file $(pkgdatadir)/$$file; \ done; # Define this as empty until I found a useful application. installcheck: uninstall: data="$(data)"; \ for file in $$data; do \ rm -f $(pkgdatadir)/$$file; \ done mostlyclean: rm -f *.a *.o *.lo core core.* *~ clean: mostlyclean distclean: clean rm -f Makefile about.jp about.en # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/data/filter.xml0000644000175000017500000000036410013675512015402 0ustar mhattamhatta .pdf pdftotext -enc EUC-JP %f %o xpdf -remote ebview %f %p ebview-0.3.6.2/data/about.en.in0000644000175000017500000000163710013675512015442 0ustar mhattamhatta
EBView @VERSION@
(C) Copyright 2001-2003
Author : Kenichi Suto
E-Mail : deep_blue@users.sourceforge.net
Homepage: http://ebview.sourceforge.net/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or(at your option) any later version. This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ebview-0.3.6.2/data/endinglist-ja.xml0000644000175000017500000005753410013675512016660 0ustar mhattamhatta ¤¿ ¤ë ¤Æ ¤ë ¤«¤Ê¤¤ ¤¯ ¤«¤Ê¤« ¤¯ ¤­¤Þ¤¹ ¤¯ ¤­¤Þ¤· ¤¯ ¤­¤Þ¤»¤ó¤Ç¤·¤¿ ¤¯ ¤­¤Þ¤»¤ó ¤¯ ¤­¤Þ¤·¤ç¤¦ ¤¯ ¤±¤Ð ¤¯ ¤³¤¦ ¤¯ ¤¤¤Æ ¤¯ ¤Ã¤Æ ¤¯ ¤¤¤¿ ¤¯ ¤Ã¤¿ ¤¯ ¤«¤ì ¤¯ ¤«¤» ¤¯ ¤± ¤¯ ¤µ¤Ê¤¤ ¤¹ ¤µ¤Ê¤« ¤¹ ¤·¤Þ¤¹ ¤¹ ¤·¤Þ¤· ¤¹ ¤·¤Þ¤»¤ó¤Ç¤·¤¿ ¤¹ ¤·¤Þ¤»¤ó ¤¹ ¤·¤Þ¤·¤ç¤¦ ¤¹ ¤»¤Ð ¤¹ ¤½¤¦ ¤¹ ¤·¤Æ ¤¹ ¤·¤¿ ¤¹ ¤µ¤ì ¤¹ ¤µ¤» ¤¹ ¤» ¤¹ ¤¿¤Ê¤¤ ¤Ä ¤¿¤Ê¤« ¤Ä ¤Á¤Þ¤¹ ¤Ä ¤Á¤Þ¤· ¤Ä ¤Á¤Þ¤»¤ó¤Ç¤·¤¿ ¤Ä ¤Á¤Þ¤»¤ó ¤Ä ¤Á¤Þ¤·¤ç¤¦ ¤Ä ¤Æ¤Ð ¤Ä ¤È¤¦ ¤Ä ¤Ã¤Æ ¤Ä ¤Ã¤¿ ¤Ä ¤¿¤ì ¤Ä ¤¿¤» ¤Ä ¤Æ ¤Ä ¤Ê¤Ê¤¤ ¤Ì ¤Ê¤Ê¤« ¤Ì ¤Ë¤Þ¤¹ ¤Ì ¤Ë¤Þ¤· ¤Ì ¤Ë¤Þ¤»¤ó¤Ç¤·¤¿ ¤Ì ¤Ë¤Þ¤»¤ó ¤Ì ¤Ë¤Þ¤·¤ç¤¦ ¤Ë ¤Í¤Ð ¤Ì ¤Î¤¦ ¤Ì ¤ó¤Ç ¤Ì ¤ó¤À ¤Ì ¤Ê¤ì ¤Ì ¤Ê¤» ¤Ì ¤Í ¤Ì ¤Þ¤Ê¤¤ ¤à ¤Þ¤Ê¤« ¤à ¤ß¤Þ¤¹ ¤à ¤ß¤Þ¤· ¤à ¤ß¤Þ¤»¤ó¤Ç¤·¤¿ ¤à ¤ß¤Þ¤»¤ó ¤à ¤ß¤Þ¤·¤ç¤¦ ¤à ¤á¤Ð ¤à ¤â¤¦ ¤à ¤ó¤Ç ¤à ¤ó¤À ¤à ¤Þ¤ì ¤à ¤Þ¤» ¤à ¤á ¤à ¤é¤Ê¤¤ ¤ë ¤é¤Ê¤« ¤ë ¤ê¤Þ¤¹ ¤ë ¤ê¤Þ¤· ¤ë ¤ê¤Þ¤»¤ó¤Ç¤·¤¿ ¤ë ¤ê¤Þ¤»¤ó ¤ë ¤ê¤Þ¤·¤ç¤¦ ¤ë ¤ì¤Ð ¤ë ¤í¤¦ ¤ë ¤Ã¤Æ ¤ë ¤Ã¤¿ ¤ë ¤é¤ì ¤ë ¤é¤» ¤ë ¤ï¤Ê¤¤ ¤¦ ¤ï¤Ê¤« ¤¦ ¤¤¤Þ¤¹ ¤¦ ¤¤¤Þ¤· ¤¦ ¤¤¤Þ¤»¤ó¤Ç¤·¤¿ ¤¦ ¤¤¤Þ¤»¤ó ¤¦ ¤¤¤Þ¤·¤ç¤¦ ¤¦ ¤¨¤Ð ¤¦ ¤ª¤¦ ¤¦ ¤Ã¤Æ ¤¦ ¤Ã¤¿ ¤¦ ¤ï¤ì ¤¦ ¤ï¤» ¤¦ ¤¨ ¤¦ ¤¬¤Ê¤¤ ¤° ¤¬¤Ê¤« ¤° ¤®¤Þ¤¹ ¤° ¤®¤Þ¤· ¤° ¤®¤Þ¤»¤ó¤Ç¤·¤¿ ¤° ¤®¤Þ¤»¤ó ¤° ¤®¤Þ¤·¤ç¤¦ ¤° ¤²¤Ð ¤° ¤´¤¦ ¤° ¤¤¤Ç ¤° ¤¤¤À ¤° ¤¬¤ì ¤° ¤¬¤» ¤° ¤² ¤° ¤Ð¤Ê¤¤ ¤Ö ¤Ð¤Ê¤« ¤Ö ¤Ó¤Þ¤¹ ¤Ö ¤Ó¤Þ¤·¤¿ ¤Ö ¤Ó¤Þ¤»¤ó¤Ç¤·¤¿ ¤Ö ¤Ó¤Þ¤»¤ó ¤Ö ¤Ó¤Þ¤·¤ç¤¦ ¤Ö ¤Ù¤Ð ¤Ö ¤Ü¤¦ ¤Ö ¤ó¤Ç ¤Ö ¤ó¤À ¤Ö ¤Ð¤ì ¤Ö ¤Ð¤» ¤Ö ¤Ù ¤Ö ¤Ê¤¤ ¤ë ¤Ê¤« ¤ë ¤Þ¤¹ ¤ë ¤Þ¤·¤¿ ¤ë ¤Þ¤»¤ó¤Ç¤·¤¿ ¤ë ¤Þ¤»¤ó ¤ë ¤Þ¤·¤ç¤¦ ¤ë ¤ì¤Ð ¤ë ¤è¤¦ ¤ë ¤Æ ¤ë ¤¿ ¤ë ¤é¤ì ¤ë ¤µ¤» ¤ë ¤í ¤ë ¤é¤Þ ¤ë ¤¯¤Ê¤« ¤¤ ¤¯¤Ê ¤¤ ¤«¤Ã¤¿ ¤¤ ¤¯ ¤¯ ¤¯ ¤¤ ¤·¤« ¤·¤¤ ¤±¤Þ¤¹ ¤±¤ë ¤±¤Þ¤·¤¿ ¤±¤ë ¤±¤Þ¤»¤ó¤Ç¤· ¤±¤ë ¤±¤Þ¤»¤ó ¤±¤ë ¤±¤Þ¤·¤ç¤¦ ¤±¤ë ¤±¤Ê¤¤ ¤±¤ë ¤±¤Ê¤« ¤±¤ë ¤±¤ì ¤±¤ë ¤±¤è ¤±¤ë ¤±¤Æ ¤±¤ë ¤±¤¿ ¤±¤ë ¤±¤é ¤±¤ë ¤±¤µ ¤±¤ë ¤±¤í ¤±¤ë ¤²¤Þ¤¹ ¤²¤ë ¤²¤Þ¤·¤¿ ¤²¤ë ¤²¤Þ¤»¤ó¤Ç¤· ¤²¤ë ¤²¤Þ¤»¤ó ¤²¤ë ¤²¤Þ¤·¤ç¤¦ ¤²¤ë ¤²¤Ê¤¤ ¤²¤ë ¤²¤Ê¤« ¤²¤ë ¤²¤Æ ¤²¤ë ¤²¤ì ¤²¤ë ¤²¤è ¤²¤ë ¤²¤¿ ¤²¤ë ¤²¤é ¤²¤ë ¤²¤µ ¤²¤ë ¤²¤í ¤²¤ë ¤Ù¤Þ¤¹ ¤Ù¤ë ¤Ù¤Þ¤·¤¿ ¤Ù¤ë ¤Ù¤Þ¤»¤ó¤Ç¤· ¤Ù¤ë ¤Ù¤Þ¤»¤ó ¤Ù¤ë ¤Ù¤Þ¤·¤ç¤¦ ¤Ù¤ë ¤Ù¤Ê¤¤ ¤Ù¤ë ¤Ù¤Ê¤« ¤Ù¤ë ¤Ù¤ì ¤Ù¤ë ¤Ù¤è ¤Ù¤ë ¤Ù¤Æ ¤Ù¤ë ¤Ù¤¿ ¤Ù¤ë ¤Ù¤é ¤Ù¤ë ¤Ù¤µ ¤Ù¤ë ¤Ù¤í ¤Ù¤ë ¤á¤Þ¤¹ ¤á¤ë ¤á¤Þ¤·¤¿ ¤á¤ë ¤á¤Þ¤»¤ó¤Ç¤· ¤á¤ë ¤á¤Þ¤»¤ó ¤á¤ë ¤á¤Þ¤·¤ç¤¦ ¤á¤ë ¤á¤Ê¤¤ ¤á¤ë ¤á¤Ê¤« ¤á¤ë ¤á¤ì ¤á¤ë ¤á¤è ¤á¤ë ¤á¤Æ ¤á¤ë ¤á¤¿ ¤á¤ë ¤á¤é ¤á¤ë ¤á¤µ ¤á¤ë ¤á¤í ¤á¤ë ¤¨¤Þ¤¹ ¤¨¤ë ¤¨¤Þ¤·¤¿ ¤¨¤ë ¤¨¤Þ¤»¤ó¤Ç¤· ¤¨¤ë ¤¨¤Þ¤»¤ó ¤¨¤ë ¤¨¤Þ¤·¤ç¤¦ ¤¨¤ë ¤¨¤Ê¤¤ ¤¨¤ë ¤¨¤Ê¤« ¤¨¤ë ¤¨¤ì ¤¨¤ë ¤¨¤è ¤¨¤ë ¤¨¤Æ ¤¨¤ë ¤¨¤¿ ¤¨¤ë ¤¨¤é ¤¨¤ë ¤¨¤µ ¤¨¤ë ¤¨¤í ¤¨¤ë ¤ì¤Þ¤¹ ¤ì¤ë ¤ì¤Þ¤·¤¿ ¤ì¤ë ¤ì¤Þ¤»¤ó¤Ç¤· ¤ì¤ë ¤ì¤Þ¤»¤ó ¤ì¤ë ¤ì¤Þ¤·¤ç¤¦ ¤ì¤ë ¤ì¤Ê¤¤ ¤ì¤ë ¤ì¤Ê¤« ¤ì¤ë ¤ì¤ì ¤ì¤ë ¤ì¤è ¤ì¤ë ¤ì¤Æ ¤ì¤ë ¤ì¤¿ ¤ì¤ë ¤ì¤é ¤ì¤ë ¤ì¤µ ¤ì¤ë ¤ì¤í ¤ì¤ë ¤ì ¤ë ¤Í¤Þ¤¹ ¤Í¤ë ¤Í¤Þ¤·¤¿ ¤Í¤ë ¤Í¤Þ¤»¤ó¤Ç¤· ¤Í¤ë ¤Í¤Þ¤»¤ó ¤Í¤ë ¤Í¤Þ¤·¤ç¤¦ ¤Í¤ë ¤Í¤Ê¤¤ ¤Í¤ë ¤Í¤Ê¤« ¤Í¤ë ¤Í¤ì ¤Í¤ë ¤Í¤è ¤Í¤ë ¤Í¤Æ ¤Í¤ë ¤Í¤¿ ¤Í¤ë ¤Í¤é ¤Í¤ë ¤Í¤µ ¤Í¤ë ¤Í¤í ¤Í¤ë ¤»¤Þ¤¹ ¤»¤ë ¤»¤Þ¤·¤¿ ¤»¤ë ¤»¤Þ¤»¤ó¤Ç¤· ¤»¤ë ¤»¤Þ¤»¤ó ¤»¤ë ¤»¤Þ¤·¤ç¤¦ ¤»¤ë ¤»¤Ê¤¤ ¤»¤ë ¤»¤Ê¤« ¤»¤ë ¤»¤ì ¤»¤ë ¤»¤è ¤»¤ë ¤»¤Æ ¤»¤ë ¤»¤¿ ¤»¤ë ¤»¤é ¤»¤ë ¤»¤µ ¤»¤ë ¤»¤í ¤»¤ë ¤¼¤Þ¤¹ ¤¼¤ë ¤¼¤Þ¤·¤¿ ¤¼¤ë ¤¼¤Þ¤»¤ó¤Ç¤· ¤¼¤ë ¤¼¤Þ¤»¤ó ¤¼¤ë ¤¼¤Þ¤·¤ç¤¦ ¤¼¤ë ¤¼¤Ê¤¤ ¤¼¤ë ¤¼¤Ê¤« ¤¼¤ë ¤¼¤ì ¤¼¤ë ¤¼¤è ¤¼¤ë ¤¼¤Æ ¤¼¤ë ¤¼¤¿ ¤¼¤ë ¤¼¤é ¤¼¤ë ¤¼¤µ ¤¼¤ë ¤¼¤í ¤¼¤ë ¤Æ¤Þ¤¹ ¤Æ¤ë ¤Æ¤Þ¤·¤¿ ¤Æ¤ë ¤Æ¤Þ¤»¤ó¤Ç¤· ¤Æ¤ë ¤Æ¤Þ¤»¤ó ¤Æ¤ë ¤Æ¤Þ¤·¤ç¤¦ ¤Æ¤ë ¤Æ¤Ê¤¤ ¤Æ¤ë ¤Æ¤Ê¤« ¤Æ¤ë ¤Æ¤ì ¤Æ¤ë ¤Æ¤è ¤Æ¤ë ¤Æ¤Æ ¤Æ¤ë ¤Æ¤¿ ¤Æ¤ë ¤Æ¤é ¤Æ¤ë ¤Æ¤µ ¤Æ¤ë ¤Æ¤í ¤Æ¤ë ¤Ç¤Þ¤¹ ¤Ç¤ë ¤Ç¤Þ¤·¤¿ ¤Ç¤ë ¤Ç¤Þ¤»¤ó¤Ç¤· ¤Ç¤ë ¤Ç¤Þ¤»¤ó ¤Ç¤ë ¤Ç¤Þ¤·¤ç¤¦ ¤Ç¤ë ¤Ç¤Ê¤¤ ¤Ç¤ë ¤Ç¤Ê¤« ¤Ç¤ë ¤Ç¤ì ¤Ç¤ë ¤Ç¤è ¤Ç¤ë ¤Ç¤Æ ¤Ç¤ë ¤Ç¤¿ ¤Ç¤ë ¤Ç¤é ¤Ç¤ë ¤Ç¤µ ¤Ç¤ë ¤Ç¤í ¤Ç¤ë ebview-0.3.6.2/data/shortcut.xml0000644000175000017500000001070110013675512015764 0ustar mhattamhatta 0x0004 0x006e Next Hit 0x0004 0x0070 Previous Hit 0x0004 0x0063 Copy To Clipboard 0x0000 0xff0d Start Search 0x0004 0x0068 Show Help 0x0000 0xff1b Clear Word 0x0004 0x0071 Quit Program 0x0000 0xffbe Select Automatic Search 0x0000 0xffbf Select Exactword Search 0x0000 0xffc0 Select Word Search 0x0000 0xffc1 Select Endword Search 0x0000 0xffc2 Select Keyword Search 0x0000 0xffc3 Select Multi Search 0x0000 0xffc4 Select Fulltext Search 0x0000 0xffc5 Select Internet Search 0x0000 0xffc6 Select File Search 0x0000 0xffc9 Switch Pane Direction 0x0004 0xff54 Next Dictionary Group 0x0004 0xff52 Previous Dictionary Group 0x0004 0x0031 Toggle Dictionary No. 1 0x0004 0x0032 Toggle Dictionary No. 2 0x0004 0x0033 Toggle Dictionary No. 3 0x0004 0x0034 Toggle Dictionary No. 4 0x0004 0x0035 Toggle Dictionary No. 5 0x0004 0x0036 Toggle Dictionary No. 6 0x0004 0x0037 Toggle Dictionary No. 7 0x0004 0x0038 Toggle Dictionary No. 8 0x0004 0x0039 Toggle Dictionary No. 9 0x0004 0x0030 Toggle Dictionary No. 10 0x0008 0xff51 Go Back In History 0x0008 0xff53 Go Forward In History 0x0000 0xff56 Scroll Mainview Down 0x0000 0xff55 Scroll Mainview Up 0x0004 0x0066 Next Hits 0x0004 0x0062 Prev. Hits ebview-0.3.6.2/data/about.jp.in0000644000175000017500000000136010013675512015442 0ustar mhattamhatta
EBView @VERSION@
(C) Copyright 2001-2003
Author : ¿ÜÆ£ ¸­°ì (Kenichi SUTO)
E-Mail : deep_blue@users.sourceforge.net
Homepage: http://ebview.sourceforge.net/
¤³¤Î¥×¥í¥°¥é¥à¤Ï¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£¤¢¤Ê¤¿¤Ï¡¢Free Software Foundation ¤¬¸øÉ½¤·¤¿ GNU General Public License (GNU °ìÈ̸øÍ­»ÈÍѵöÂú) ¥Ð¡¼¥¸¥ç¥ó 2 ¤¢¤ë¤¤¤Ï¤½¤ì°Ê¹ß¤Î³Æ¥Ð¡¼¥¸¥ç¥ó¤ÎÃæ¤«¤é¤¤¤º¤ì¤«¤òÁªÂò¤·¡¢¤½¤Î¥Ð¡¼¥¸¥ç¥ó¤¬Äê¤á¤ë¾ò¹à¤Ë½¾¤Ã¤ÆËÜ¥×¥í¥°¥é¥à¤òºÆÈÒÉÛ¤Þ¤¿¤ÏÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤³¤Î¥×¥í¥°¥é¥à¤ÏÍ­ÍѤȤϻפ¤¤Þ¤¹¤¬¡¢ÈÒÉۤˤ¢¤¿¤Ã¤Æ¤Ï¡¢»Ô¾ìÀ­µÚ¤ÓÆÃÄêÌÜŪŬ¹çÀ­¤Ë¤Ä¤¤¤Æ¤Î°ÅÌÛ¤ÎÊݾڤò´Þ¤á¤Æ¡¢¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤Ê¤¤¤Þ¤»¤ó¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï GNU General Public License ¤ò¤ªÆÉ¤ß¤¯¤À¤µ¤¤¡£ ebview-0.3.6.2/data/searchengines.xml0000644000175000017500000002463210013675512016737 0ustar mhattamhatta Google(¥Õ¥ì¡¼¥º:ÆüËܸì) http://www.google.co.jp/
http://www.google.co.jp/search?q=%22%2B
%22&hl=ja&lr=lang_ja&ie=euc-jp +%2B euc-jp
Google(¥Õ¥ì¡¼¥º:±Ñ¸ì) http://www.google.com/
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%22%2B
%22 +%2B utf-8
Google(ÆüËܸì) http://www.google.co.jp/
http://www.google.co.jp/search?q=
&hl=ja&lr=lang_ja&ie=euc-jp + euc-jp
Yahoo Japan http://www.yahoo.co.jp
http://search.yahoo.co.jp/bin/search?p=
&s=o + euc-jp
Infoseek http://www.infoseek.co.jp/
http://www.infoseek.co.jp/Titles?qt=
&col=JW&lk=noframes&sv=JP&svx=120&osf=0&qp=0&rf=0&nh=25&ud4=0C + euc-jp
goo http://www.goo.ne.jp/
http://search.goo.ne.jp/search/search.jsp?MT=
&SM=MC&DC=25&IM=1 + euc-jp
¥Õ¥ì¥Ã¥·¥å¥¢¥¤ http://www.fresheye.com/
http://search.fresheye.com/?kw=
&term=monthly +%26+ euc-jp
Excite http://www.excite.co.jp/
http://www.excite.co.jp/search.gw?search=
&target=combined&c=web&lk=excite_jp&lang=jp + euc-jp
Goo(EXCEED±Ñϼ­Åµ) http://dictionary.goo.ne.jp/cgi-bin/ej-top.cgi
http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=
&sw=0 + euc-jp
¥Ó¥¸¥Í¥¹±Ñ¸ì¼­½ñ(¥¢¥ë¥¯) http://home.alc.co.jp/db/owa/bdicn_sch
http://home.alc.co.jp/db/owa/bdicn_sch?stage=sch&word_in=
+ shift_jis
¥Ç¥¤¥ê¡¼¥³¥ó¥µ¥¤¥¹±Ñϼ­Åµ(Yahoo) http://www.yahoo.co.jp/
http://dic.yahoo.co.jp/bin/dsearch?d=edc&t=c&p=
+ euc-jp
InfoSeek¥Þ¥ë¥Á¼­½ñ(±Ñϼ­½ñ) http://jiten.www.infoseek.co.jp/Eiwa?pg=jiten_etop.html&col=EW
http://jiten.www.infoseek.co.jp/Eiwa?qt=
&sm=1&pg=result_e.html&col=EW + euc-jp
Goo(EXCEEDϱѼ­Åµ) http://dictionary.goo.ne.jp/cgi-bin/je-top.cgi
http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=
&sw=1 + euc-jp
¥Ç¥¤¥ê¡¼¥³¥ó¥µ¥¤¥¹Ï±Ѽ­Åµ(Yahoo) http://www.yahoo.co.jp/
http://dic.yahoo.co.jp/bin/dsearch?d=wdc&t=c&p=
+ euc-jp
Infoseek¥Þ¥ë¥Á¼­½ñ(ϱѼ­½ñ) http://jiten.www.infoseek.co.jp/Waei?pg=jiten_wtop.html&col=WE
http://jiten.www.infoseek.co.jp/Waei?qt=
&sm=1&pg=result_w.html&col=WE + euc-jp
Goo(Âç¼­ÎÓÂè2ÈÇ) http://dictionary.goo.ne.jp/cgi-bin/jp-top.cgi
http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=
&sw=2 + euc-jp
¿·¼­ÎÓ(Yahoo) http://www.yahoo.co.jp/
http://dic.yahoo.co.jp/bin/dsearch?d=snj&t=c&p=
+ euc-jp
Infoseek¥Þ¥ë¥Á¼­½ñ(¹ñ¸ì¼­½ñ) http://jiten.www.infoseek.co.jp/Kokugo?pg=jiten_ktop.html&col=KO
http://jiten.www.infoseek.co.jp/Kokugo?qt=
&sm=1&pg=result_k.html&col=KO + euc-jp
Dictionary.com http://www.dictionary.com/
http://www.dictionary.com/cgi-bin/dict.pl?term=
+ euc-jp
American Heritage Dictionary (Yahoo) http://education.yahoo.com/reference/dictionary/
http://education.yahoo.com/search/ahd?p=
euc-jp
Cambridge International Dictionaries http://dictionary.cambridge.org/
http://dictionary.cambridge.org/results.asp?searchword=
euc-jp
Roget's II Thesaurus (Yahoo) http://education.yahoo.com/reference/thesaurus/
http://education.yahoo.com/search/nt?p=
euc-jp
Britanica http://www.britannica.com/
http://www.britannica.com/search?query=
&ct=eb + euc-jp
Microsoft Encarta http://encarta.msn.com/
http://encarta.msn.com/encnet/refpages/SRPage.aspx?search=
+ euc-jp
Enchanted Learning http://www.enchantedlearning.com/Home.html
http://www.EnchantedLearning.com/cgi-bin/uncgi/search?key=
+ euc-jp
Lycos infoplease.com http://infoplease.lycos.com/
http://infoplease.lycos.com/search.php3?query=cancer
+ euc-jp
The Britannica Concise (Yahoo) http://education.yahoo.com/reference/encyclopedia/
http://education.yahoo.com/search/be?p=
euc-jp
¥¦¥£¥­¥Ú¥Ç¥£¥¢ http://ja.wikipedia.org/
http://ja.wikipedia.org/wiki/
utf-8
Wikipedia http://en.wikipedia.org/wiki/
http://en.wikipedia.org/wiki/
euc-jp
Goo(¥Ç¥¤¥ê¡¼¿·¸ì¼­Åµ) http://dictionary.goo.ne.jp/cgi-bin/nw-top.cgi
http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=
&sw=3 + euc-jp
Google Image Search http://images.google.com/
http://images.google.com/images?q=
&ie=UTF-8&oe=UTF-8&hl=ja + utf-8
¥¢¥¹¥­¡¼¥Ç¥¸¥¿¥ëÍѸ켭ŵ http://yougo.ascii24.com/
http://yougo.ascii24.com/gh/search/?pattern=
+ shift_jis
¾ðÊó¡¦ÄÌ¿®Î¬¸ìÎÓ e-words http://e-words.jp/
http://e-words.jp/e.x?w=
+ euc-jp
Yahoo ¥³¥ó¥Ô¥å¡¼¥¿ÍѸ켭ŵ http://computers.yahoo.co.jp/dict/
http://computers.yahoo.co.jp/bin/dict?p=
+ euc-jp
Insider's Computer Dictionary http://www.atmarkit.co.jp/icd/index.html
http://www.atmarkit.co.jp/misc/search/search.php?query=
+ shift_jis
³ÈÄ¥»Ò¼­Åµ http://www.jisyo.com/viewer/search/search.html
http://www.jisyo.com/cgibin/view.cgi?EXT=
&submit=CALL + euc-jp
ebview-0.3.6.2/po/0000755000175000017500000000000011241637663013106 5ustar mhattamhattaebview-0.3.6.2/po/ebview.pot0000644000175000017500000006246311241636551015121 0ustar mhattamhatta# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-08-16 07:57+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/cellrenderercolor.c:159 src/cellrenderercolor.c:160 src/preference.c:81 msgid "Color" msgstr "" #: src/cellrendererebook.c:161 src/mainwindow.c:985 msgid "Text" msgstr "" #: src/cellrendererebook.c:162 msgid "Text to render" msgstr "" #: src/cellrendererebook.c:170 msgid "BookInfo" msgstr "" #: src/cellrendererebook.c:171 msgid "Book Information" msgstr "" #: src/dictbar.c:202 msgid "Push to enable this dictionary." msgstr "" #: src/dictbar.c:325 msgid "Select dictionary group." msgstr "" #: src/dump.c:217 src/dump.c:356 msgid "Close" msgstr "" #: src/dump.c:229 src/dump.c:367 msgid "page" msgstr "" #: src/dump.c:376 msgid "offset" msgstr "" #: src/eb.c:375 src/eb.c:442 src/mainmenu.c:478 src/mainwindow.c:482 #: src/mainwindow.c:1138 msgid "Automatic Search" msgstr "" #: src/eb.c:380 src/eb.c:446 src/mainmenu.c:486 src/mainwindow.c:1149 msgid "Exactword Search" msgstr "" #: src/eb.c:386 src/eb.c:450 src/mainmenu.c:492 src/mainwindow.c:1161 msgid "Forward Search" msgstr "" #: src/eb.c:392 src/eb.c:454 src/mainmenu.c:499 src/mainwindow.c:1173 msgid "Backward Search" msgstr "" #: src/eb.c:398 src/eb.c:458 src/mainmenu.c:506 src/mainwindow.c:1185 msgid "Keyword Search" msgstr "" #: src/eb.c:404 src/eb.c:462 src/mainmenu.c:513 src/mainwindow.c:490 #: src/mainwindow.c:491 src/mainwindow.c:1197 msgid "Multiword Search" msgstr "" #: src/eb.c:423 src/eb.c:476 msgid "Full Text Search" msgstr "" #: src/eb.c:427 src/eb.c:480 src/mainmenu.c:547 src/mainwindow.c:481 #: src/mainwindow.c:499 src/mainwindow.c:500 src/mainwindow.c:1224 #: src/preference.c:94 msgid "Internet Search" msgstr "" #: src/eb.c:431 src/eb.c:484 src/grep.c:77 src/mainmenu.c:554 #: src/mainwindow.c:507 src/mainwindow.c:508 src/mainwindow.c:1238 #: src/preference.c:88 msgid "File Search" msgstr "" #. Cancelable #. Non-cancelable #: src/eb.c:1617 src/eb.c:1621 msgid "Fulltext search" msgstr "" #: src/ebview.c:109 msgid "Failed to execute command. Please check setting." msgstr "" #: src/external.c:208 msgid "Web browser not set" msgstr "" #. Create file list #: src/grep.c:442 msgid "Listing files..." msgstr "" #: src/grep.c:456 src/grep.c:1018 src/grep.c:1155 src/grep.c:1182 #: src/pref_io.c:1575 src/shortcutfunc.c:85 src/shortcutfunc.c:113 #: src/shortcutfunc.c:189 src/shortcutfunc.c:234 msgid "Manual Select" msgstr "" #: src/grep.c:545 msgid "done\n" msgstr "" #: src/grep.c:555 msgid "Force ordinary text.\n" msgstr "" #: src/grep.c:560 msgid "Seems like regular expression.\n" msgstr "" #: src/grep.c:567 msgid "Force regular expression.\n" msgstr "" #: src/grep.c:572 msgid "Seems like ordinary text.\n" msgstr "" #: src/grep.c:601 msgid "Failed to compile pattern.\n" msgstr "" #: src/grep.c:608 msgid "" "\n" "Searching following files...\n" msgstr "" #: src/grep.c:655 msgid "" "\n" "File search completed.\n" msgstr "" #: src/grep.c:1113 msgid "Suppress Hidden Files" msgstr "" #: src/grep.c:1119 msgid "Suppress files whose name start with dot." msgstr "" #: src/grep.c:1121 msgid "Ignore Case" msgstr "" #: src/grep.c:1127 msgid "" "When checked, uppercase letters and lowercase letters are regarded as " "identical." msgstr "" #: src/headword.c:776 msgid "Go to previous hit list." msgstr "" #: src/headword.c:795 msgid "Go to next hit list." msgstr "" #: src/mainmenu.c:520 src/mainwindow.c:1209 msgid "Fulltext Search" msgstr "" #: src/mainmenu.c:530 msgid "Menu" msgstr "" #: src/mainmenu.c:537 msgid "Copyright" msgstr "" #: src/mainmenu.c:593 msgid "Exit" msgstr "" #: src/mainmenu.c:598 msgid "File" msgstr "" #: src/mainmenu.c:606 msgid "Show/Hide" msgstr "" #: src/mainmenu.c:613 msgid "Menu Bar" msgstr "" #: src/mainmenu.c:622 msgid "Dictionary Selection Bar" msgstr "" #: src/mainmenu.c:631 msgid "Status Bar" msgstr "" #: src/mainmenu.c:638 msgid "Tree Pane Tab" msgstr "" #: src/mainmenu.c:649 msgid "Contents" msgstr "" #: src/mainmenu.c:656 msgid "Emphasize Keyword" msgstr "" #: src/mainmenu.c:664 msgid "Show Image Inline" msgstr "" #. text size #: src/mainmenu.c:678 src/pref_shortcut.c:103 msgid "Increase Font Size" msgstr "" #: src/mainmenu.c:684 src/pref_shortcut.c:104 msgid "Decrease Font Size" msgstr "" #. Space between lines #: src/mainmenu.c:695 src/pref_shortcut.c:105 msgid "Expand Lines" msgstr "" #: src/mainmenu.c:701 src/pref_shortcut.c:106 msgid "Shrink Lines" msgstr "" #. Result list #: src/mainmenu.c:709 msgid "Result List" msgstr "" #. Sort by dictionary. #: src/mainmenu.c:716 msgid "Sort By Dictionary" msgstr "" #. Show filename #: src/mainmenu.c:725 msgid "Show Filename" msgstr "" #. Pane direction #: src/mainmenu.c:740 msgid "Pane Direction" msgstr "" #: src/mainmenu.c:749 msgid "Horizontal" msgstr "" #: src/mainmenu.c:762 msgid "Vertical" msgstr "" #. Tab position #: src/mainmenu.c:778 msgid "Tab Position" msgstr "" #: src/mainmenu.c:786 msgid "Top" msgstr "" #: src/mainmenu.c:796 msgid "Bottom" msgstr "" #: src/mainmenu.c:806 msgid "Left" msgstr "" #: src/mainmenu.c:816 msgid "Right" msgstr "" #: src/mainmenu.c:826 msgid "View" msgstr "" #: src/mainmenu.c:834 msgid "Search Method" msgstr "" #: src/mainmenu.c:841 msgid "Tools" msgstr "" #. #. item = gtk_menu_item_new_with_label(_("Add/Remove Dictionary")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.dict"); #. #. item = gtk_menu_item_new_with_label(_("Stemming")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.ending"); #. #. item = gtk_menu_item_new_with_label(_("Shortcut")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.shortcut"); #. #. item = gtk_menu_item_new_with_label(_("Search Engines")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.web"); #. #. item = gtk_menu_item_new_with_label(_("External Program")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.external"); #. #. item = gtk_menu_item_new_with_label(_("Font")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.font"); #. #. item = gtk_menu_item_new_with_label(_("Color")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.color"); #. #. item = gtk_menu_item_new_with_label(_("Misc")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.misc"); #. #. #. Selection search #: src/mainmenu.c:896 src/preference.c:85 msgid "Selection" msgstr "" #: src/mainmenu.c:904 msgid "Do Nothing" msgstr "" #: src/mainmenu.c:914 msgid "Copy Only" msgstr "" #: src/mainmenu.c:924 msgid "Search In Main Window" msgstr "" #: src/mainmenu.c:934 msgid "Search In Main Window + Top" msgstr "" #: src/mainmenu.c:944 msgid "Search In Popup" msgstr "" #. if(selection_mode == SELECTION_POPUP) #. gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); #. Dump #: src/mainmenu.c:954 msgid "Dump" msgstr "" #: src/mainmenu.c:961 msgid "Hex Dump" msgstr "" #: src/mainmenu.c:967 msgid "Text Dump" msgstr "" #. Option #: src/mainmenu.c:978 msgid "Options..." msgstr "" #: src/mainmenu.c:988 msgid "Usage" msgstr "" #: src/mainmenu.c:994 msgid "Show EBView Home" msgstr "" #: src/mainmenu.c:1000 msgid "About" msgstr "" #: src/mainmenu.c:1007 msgid "Help" msgstr "" #: src/mainwindow.c:101 src/websearch.c:108 msgid "Please enter search word." msgstr "" #: src/mainwindow.c:118 src/selection.c:169 src/textview.c:84 #: src/thread_search.c:64 src/thread_search.c:150 msgid "No hit." msgstr "" #: src/mainwindow.c:302 src/misc.c:146 #, c-format msgid "Couldn't find %s. Check installation." msgstr "" #: src/mainwindow.c:341 msgid "Help will be shown in external web browser." msgstr "" #: src/mainwindow.c:748 msgid "Search Word" msgstr "" #: src/mainwindow.c:768 msgid "" "Type word here. You can type multiple space-separated words for keyword " "search. For file search, specify words or regular expression." msgstr "" #: src/mainwindow.c:784 src/multi.c:294 msgid "Start search" msgstr "" #: src/mainwindow.c:810 msgid "Select search method." msgstr "" #: src/mainwindow.c:836 msgid "When enabled, X selection is searched automatically" msgstr "" #: src/mainwindow.c:854 msgid "" "When enabled, result of X selection search will be shown in popup window" msgstr "" #: src/mainwindow.c:870 msgid "Previous Item" msgstr "" #: src/mainwindow.c:882 msgid "Next Item" msgstr "" #: src/mainwindow.c:897 msgid "show next in history" msgstr "" #: src/mainwindow.c:908 msgid "show previous in history" msgstr "" #: src/mainwindow.c:994 msgid "Candidate" msgstr "" #. rp->heading = strdup(_("menu")); #: src/menu.c:70 msgid "menu" msgstr "" #. rp->heading = strdup(_("copyright")); #: src/menu.c:130 msgid "copyright" msgstr "" #: src/misc.c:160 #, c-format msgid "Couldn't open %s. Check installation." msgstr "" #: src/multi.c:241 src/pref_color.c:238 msgid "Keyword" msgstr "" #: src/multi.c:283 src/multi.c:303 msgid "Candidates" msgstr "" #: src/pref_color.c:95 src/pref_dictgroup.c:1160 msgid "Choose Color" msgstr "" #: src/pref_color.c:220 msgid "Link" msgstr "" #: src/pref_color.c:230 src/pref_color.c:248 src/pref_color.c:266 #: src/pref_color.c:283 src/pref_color.c:301 src/pref_color.c:321 #: src/pref_font.c:176 src/pref_font.c:193 src/pref_font.c:210 #: src/pref_font.c:227 msgid "Choose" msgstr "" #: src/pref_color.c:256 msgid "Sound" msgstr "" #: src/pref_color.c:272 msgid "Movie" msgstr "" #: src/pref_color.c:290 msgid "Emphasis" msgstr "" #: src/pref_color.c:310 msgid "Reverse Background" msgstr "" #: src/pref_dictgroup.c:148 src/pref_dirgroup.c:132 src/pref_weblist.c:201 msgid "Please select group." msgstr "" #: src/pref_dictgroup.c:163 src/pref_dictgroup.c:315 msgid "Failed to load dictionary." msgstr "" #: src/pref_dictgroup.c:383 src/pref_dictgroup.c:503 src/pref_weblist.c:75 #: src/pref_weblist.c:111 msgid "Please select dictionary." msgstr "" #: src/pref_dictgroup.c:689 msgid "Failed to get subbook directory." msgstr "" #: src/pref_dictgroup.c:698 msgid "Failed to get title." msgstr "" #: src/pref_dictgroup.c:721 msgid "Failed to load book." msgstr "" #: src/pref_dictgroup.c:847 msgid "Please enter directory name" msgstr "" #: src/pref_dictgroup.c:899 msgid "Please specify title." msgstr "" #: src/pref_dictgroup.c:905 msgid "Please specify book path." msgstr "" #: src/pref_dictgroup.c:915 msgid "Subbook number incorrect." msgstr "" #: src/pref_dictgroup.c:1070 src/pref_dictgroup.c:1072 #: src/pref_dictgroup.c:1075 src/pref_dictgroup.c:1077 #: src/pref_dictgroup.c:1123 src/pref_dictgroup.c:1125 #: src/pref_dictgroup.c:1128 src/pref_dictgroup.c:1130 #: src/pref_dictgroup.c:1200 src/pref_dictgroup.c:1525 #, c-format msgid "Sample" msgstr "" #: src/pref_dictgroup.c:1286 src/pref_dictgroup.c:1475 src/pref_dirgroup.c:315 #: src/pref_weblist.c:535 msgid "Name" msgstr "" #: src/pref_dictgroup.c:1388 src/pref_weblist.c:480 msgid "Group name" msgstr "" #: src/pref_dictgroup.c:1398 src/pref_dirgroup.c:355 src/pref_grep.c:285 #: src/pref_shortcut.c:441 src/pref_shortcut.c:533 src/pref_stemming.c:232 #: src/pref_weblist.c:488 src/pref_weblist.c:613 msgid "Add" msgstr "" #: src/pref_dictgroup.c:1405 src/pref_dirgroup.c:368 src/pref_grep.c:292 #: src/pref_shortcut.c:422 src/pref_stemming.c:239 src/pref_weblist.c:499 msgid "Remove" msgstr "" #: src/pref_dictgroup.c:1412 src/pref_weblist.c:506 msgid "Up" msgstr "" #: src/pref_dictgroup.c:1418 src/pref_weblist.c:512 msgid "Down" msgstr "" #: src/pref_dictgroup.c:1429 src/pref_dictgroup.c:1483 msgid "Path" msgstr "" #: src/pref_dictgroup.c:1439 msgid "Depth" msgstr "" #: src/pref_dictgroup.c:1453 msgid "Specify search depth. 0 means to search only specified directory." msgstr "" #: src/pref_dictgroup.c:1457 msgid "Search Disk" msgstr "" #: src/pref_dictgroup.c:1493 msgid "Subbook Number" msgstr "" #: src/pref_dictgroup.c:1503 msgid "Appendix Path" msgstr "" #: src/pref_dictgroup.c:1511 msgid "Appendix Subbook Number" msgstr "" #: src/pref_dictgroup.c:1530 msgid "FG" msgstr "" #: src/pref_dictgroup.c:1536 msgid "BG" msgstr "" #: src/pref_dictgroup.c:1542 msgid "Clear" msgstr "" #: src/pref_dirgroup.c:209 msgid "Select directory" msgstr "" #: src/pref_dirgroup.c:261 msgid "Directory group list" msgstr "" #: src/pref_dirgroup.c:308 msgid "Detail" msgstr "" #: src/pref_dirgroup.c:323 msgid "Enter the name of directory group." msgstr "" #: src/pref_dirgroup.c:325 msgid "Directory list" msgstr "" #: src/pref_dirgroup.c:345 msgid "" "Specify directory names one per line. You can specify extension of files " "that will be searched. For example, \"/some/dir/name,.txt\" searches all " "files under /some/dir/name which have the extension .txt." msgstr "" #: src/pref_dirgroup.c:361 msgid "Change" msgstr "" #: src/pref_dirgroup.c:375 msgid "Choose.." msgstr "" #. gtk_container_add(GTK_CONTAINER(frame), vbox); #: src/pref_external.c:80 msgid "Play sound internally" msgstr "" #: src/pref_external.c:84 msgid "Use internal routine to play sound. Valid only on windows." msgstr "" #: src/pref_external.c:94 msgid "Command to play sound " msgstr "" #: src/pref_external.c:106 #, c-format msgid "" "External command to play WAVE sound. %f will be replaced by data file name." msgstr "" #: src/pref_external.c:116 msgid "Command to play movie " msgstr "" #: src/pref_external.c:128 #, c-format msgid "" "External command to play MPEG movie. %f will be replaced by data file name." msgstr "" #: src/pref_external.c:138 msgid "Command to launch web browser " msgstr "" #: src/pref_external.c:150 #, c-format msgid "External command to launch Web browser. %f will be replaced by URL." msgstr "" #: src/pref_external.c:161 msgid "Standard command to open file " msgstr "" #: src/pref_external.c:173 msgid "" "Standard command to open file. %f will be replaced by filename, %l by line " "number." msgstr "" #: src/pref_font.c:166 src/pref_stemming.c:281 msgid "Normal" msgstr "" #: src/pref_font.c:183 msgid "Bold" msgstr "" #: src/pref_font.c:200 msgid "Italic" msgstr "" #: src/pref_font.c:216 msgid "Superscript" msgstr "" #: src/pref_grep.c:132 msgid "Additional Lines To Display" msgstr "" #: src/pref_grep.c:150 msgid "" "In addition to matched line, additional lines will be shown in contents." msgstr "" #: src/pref_grep.c:157 msgid "Additional Chars To Display" msgstr "" #: src/pref_grep.c:176 msgid "" "When matched line is too long, several characters around keyword will be " "shown in heading." msgstr "" #: src/pref_grep.c:239 msgid "Extension" msgstr "" #: src/pref_grep.c:250 msgid "Filter Command" msgstr "" #: src/pref_grep.c:261 msgid "Open Command" msgstr "" #: src/pref_grep.c:387 msgid "Maximum Cache Size (MB)" msgstr "" #: src/pref_grep.c:406 msgid "Specify maximum cache size in MB." msgstr "" #: src/pref_grep.c:408 msgid "Clear Cache" msgstr "" #: src/pref_gui.c:75 msgid "Maximum words in history" msgstr "" #: src/pref_gui.c:94 msgid "Maximum number of words to remember in word history" msgstr "" #: src/pref_gui.c:103 msgid "Chars in dictionary bar" msgstr "" #: src/pref_gui.c:122 msgid "" "Specify the number of characters to display on top of each toggle buttons in " "dictionary bar." msgstr "" #: src/pref_gui.c:126 msgid "Show splash screen" msgstr "" #: src/pref_gui.c:128 msgid "Show splash screen on loading." msgstr "" #: src/pref_gui.c:136 msgid "Calculate heading automatically" msgstr "" #: src/pref_gui.c:138 msgid "Calculate the number of cells in heading list to suit the window size." msgstr "" #: src/pref_gui.c:152 msgid "Maximum hits to display" msgstr "" #: src/pref_gui.c:171 msgid "" "Maximum number of hits to be displayed at once.\n" "You can go forward and backward using buttons. Valid only if automatic " "calculation is disabled." msgstr "" #. #: src/pref_gui.c:174 msgid "Enable dictionary button color" msgstr "" #: src/pref_gui.c:176 msgid "Enable background color of dictionary button." msgstr "" #: src/pref_io.c:124 msgid "Couldn't open preference. Will use default value." msgstr "" #: src/pref_io.c:130 src/pref_io.c:138 src/pref_io.c:269 src/pref_io.c:277 #: src/pref_io.c:284 src/pref_io.c:299 src/pref_io.c:336 src/pref_io.c:539 #: src/pref_io.c:548 src/pref_io.c:555 src/pref_io.c:573 src/pref_io.c:637 #: src/pref_io.c:646 src/pref_io.c:653 src/pref_io.c:670 src/pref_io.c:844 #: src/pref_io.c:853 src/pref_io.c:861 src/pref_io.c:875 src/pref_io.c:898 #: src/pref_io.c:906 src/pref_io.c:1079 src/pref_io.c:1087 src/pref_io.c:1094 #: src/pref_io.c:1111 src/pref_io.c:1263 src/pref_io.c:1271 src/pref_io.c:1281 #: src/pref_io.c:1349 src/pref_io.c:1357 src/pref_io.c:1367 src/pref_io.c:1412 #: src/pref_io.c:1420 src/pref_io.c:1427 src/pref_io.c:1447 src/pref_io.c:1640 #: src/pref_io.c:1649 src/pref_io.c:1658 src/pref_io.c:1675 #, c-format msgid "Failed to parse %s. Check contents." msgstr "" #: src/pref_search.c:66 msgid "Maximum hits to search" msgstr "" #: src/pref_search.c:84 msgid "" "Maximum number of hits to be searched.\n" "If you increase this number, it takes time to search." msgstr "" #: src/pref_search.c:87 msgid "Perform word search in automatic search" msgstr "" #: src/pref_search.c:89 msgid "Perform word search in automatic search." msgstr "" #: src/pref_selection.c:72 msgid "Lookup interval (ms)" msgstr "" #: src/pref_selection.c:91 msgid "" "Interval to check selection. \n" "Increasing this number may eat up your CPU.\n" "Ignored on Windows." msgstr "" #: src/pref_selection.c:99 msgid "Minimum chars for selection lookup" msgstr "" #: src/pref_selection.c:120 msgid "" "When the number of characters in selection is less than this number, it will " "not be looked up." msgstr "" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:130 msgid "Maximum chars for automatic lookup" msgstr "" #: src/pref_selection.c:151 msgid "" "When the number of characters in selection is larger than this number, it " "will not be looked up." msgstr "" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:161 msgid "Popup window size" msgstr "" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:213 msgid "Show popup title" msgstr "" #: src/pref_selection.c:215 msgid "Show title of popup window." msgstr "" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:230 msgid "Beep on no hit" msgstr "" #: src/pref_selection.c:232 msgid "Beep when no hit." msgstr "" #: src/pref_shortcut.c:59 msgid "Toggle Menu Mar" msgstr "" #: src/pref_shortcut.c:60 msgid "Toggle Status Bar" msgstr "" #: src/pref_shortcut.c:61 msgid "Toggle Dictionary Bar" msgstr "" #: src/pref_shortcut.c:62 msgid "Switch Pane Direction" msgstr "" #: src/pref_shortcut.c:63 msgid "Select Automatic Search" msgstr "" #: src/pref_shortcut.c:64 msgid "Select Exactword Search" msgstr "" #: src/pref_shortcut.c:65 msgid "Select Word Search" msgstr "" #: src/pref_shortcut.c:66 msgid "Select Endword Search" msgstr "" #: src/pref_shortcut.c:67 msgid "Select Keyword Search" msgstr "" #: src/pref_shortcut.c:68 msgid "Select Multi Search" msgstr "" #: src/pref_shortcut.c:69 msgid "Select Fulltext Search" msgstr "" #: src/pref_shortcut.c:70 msgid "Select Internet Search" msgstr "" #: src/pref_shortcut.c:71 msgid "Select File Search" msgstr "" #: src/pref_shortcut.c:72 msgid "Next Dictionary Group" msgstr "" #: src/pref_shortcut.c:73 msgid "Previous Dictionary Group" msgstr "" #: src/pref_shortcut.c:74 msgid "Toggle Dictionary No. 1" msgstr "" #: src/pref_shortcut.c:75 msgid "Toggle Dictionary No. 2" msgstr "" #: src/pref_shortcut.c:76 msgid "Toggle Dictionary No. 3" msgstr "" #: src/pref_shortcut.c:77 msgid "Toggle Dictionary No. 4" msgstr "" #: src/pref_shortcut.c:78 msgid "Toggle Dictionary No. 5" msgstr "" #: src/pref_shortcut.c:79 msgid "Toggle Dictionary No. 6" msgstr "" #: src/pref_shortcut.c:80 msgid "Toggle Dictionary No. 7" msgstr "" #: src/pref_shortcut.c:81 msgid "Toggle Dictionary No. 8" msgstr "" #: src/pref_shortcut.c:82 msgid "Toggle Dictionary No. 9" msgstr "" #: src/pref_shortcut.c:83 msgid "Toggle Dictionary No. 10" msgstr "" #: src/pref_shortcut.c:84 msgid "Next Hit" msgstr "" #: src/pref_shortcut.c:85 msgid "Previous Hit" msgstr "" #: src/pref_shortcut.c:86 msgid "Copy To Clipboard" msgstr "" #: src/pref_shortcut.c:87 msgid "Paste From Clipboard" msgstr "" #: src/pref_shortcut.c:88 msgid "Start Search" msgstr "" #: src/pref_shortcut.c:89 msgid "Go Back In History" msgstr "" #: src/pref_shortcut.c:90 msgid "Go Forward In History" msgstr "" #: src/pref_shortcut.c:91 msgid "Show Previous Text" msgstr "" #: src/pref_shortcut.c:92 msgid "Show Next Text" msgstr "" #. { N_("Toggle Selection Search"), toggle_auto}, #. { N_("Toggle Popup"), toggle_popup}, #: src/pref_shortcut.c:95 msgid "Show Help" msgstr "" #: src/pref_shortcut.c:96 msgid "Clear Word" msgstr "" #: src/pref_shortcut.c:97 msgid "Quit Program" msgstr "" #: src/pref_shortcut.c:98 msgid "Iconify Window" msgstr "" #: src/pref_shortcut.c:99 msgid "Scroll Mainview Down" msgstr "" #: src/pref_shortcut.c:100 msgid "Scroll Mainview Up" msgstr "" #: src/pref_shortcut.c:101 msgid "Next Hits" msgstr "" #: src/pref_shortcut.c:102 msgid "Prev. Hits" msgstr "" #: src/pref_shortcut.c:377 src/preference.c:93 msgid "Shortcut" msgstr "" #: src/pref_shortcut.c:400 msgid "Key" msgstr "" #: src/pref_shortcut.c:408 src/pref_shortcut.c:522 msgid "Command" msgstr "" #: src/pref_shortcut.c:464 msgid "Grab" msgstr "" #: src/pref_shortcut.c:540 msgid "Ignore locks" msgstr "" #: src/pref_shortcut.c:544 msgid "Ignore Caps Lock and Num Lock key." msgstr "" #: src/pref_stemming.c:166 msgid "Perform stemming" msgstr "" #: src/pref_stemming.c:168 msgid "" "When ending of each words matches the pattern in the list, normal form of " "the word will also be tried. It takes longer." msgstr "" #: src/pref_stemming.c:175 msgid "Stemming only when no hit" msgstr "" #: src/pref_stemming.c:177 msgid "Do not perform stemming when original words hit." msgstr "" #: src/pref_stemming.c:187 msgid "English" msgstr "" #: src/pref_stemming.c:190 msgid "Japanese" msgstr "" #: src/pref_stemming.c:211 src/pref_stemming.c:273 msgid "Pattern" msgstr "" #: src/pref_stemming.c:224 msgid "Correction" msgstr "" #: src/pref_weblist.c:352 msgid "Please specify name" msgstr "" #: src/pref_weblist.c:359 msgid "Please specify pre string" msgstr "" #: src/pref_weblist.c:428 msgid "Search engines" msgstr "" #: src/pref_weblist.c:519 msgid "Search engine" msgstr "" #: src/pref_weblist.c:545 msgid "Homepage" msgstr "" #: src/pref_weblist.c:555 msgid "Pre string" msgstr "" #: src/pref_weblist.c:565 msgid "Post string" msgstr "" #: src/pref_weblist.c:575 msgid "Glue string" msgstr "" #: src/pref_weblist.c:586 msgid "Character Code" msgstr "" #: src/preference.c:79 msgid "Appearance" msgstr "" #: src/preference.c:80 msgid "Font" msgstr "" #: src/preference.c:82 src/preference.c:92 msgid "Misc." msgstr "" #: src/preference.c:83 msgid "Dictionary Search" msgstr "" #: src/preference.c:84 msgid "Dictionary Group" msgstr "" #: src/preference.c:86 msgid "Stemming" msgstr "" #: src/preference.c:87 msgid "Misc" msgstr "" #: src/preference.c:89 msgid "Directory Group" msgstr "" #: src/preference.c:90 msgid "Filter" msgstr "" #: src/preference.c:91 msgid "Cache" msgstr "" #: src/preference.c:95 msgid "External Program" msgstr "" #: src/preference.c:573 msgid "Items" msgstr "" #: src/preference.c:634 msgid "Ok" msgstr "" #: src/render.c:869 msgid " [Movie] " msgstr "" #: src/splash.c:120 msgid "Loading dictionary..." msgstr "" #: src/textview.c:47 msgid "/Search This Word" msgstr "" #: src/textview.c:48 msgid "/Copy To Clipboard" msgstr "" #: src/textview.c:49 msgid "/Display" msgstr "" #: src/textview.c:50 msgid "/Display/Menu bar" msgstr "" #: src/textview.c:51 msgid "/Display/Dictionary Selection Bar" msgstr "" #: src/textview.c:52 msgid "/Display/Status Bar" msgstr "" #: src/textview.c:53 msgid "/Display/Tree Frame Tab" msgstr "" #: src/thread_search.c:61 msgid "Canceled" msgstr "" #: src/thread_search.c:100 msgid "Cancel" msgstr "" #: src/thread_search.c:106 msgid "Searching" msgstr "" #: src/thread_search.c:136 #, c-format msgid "%d hit" msgstr "" #: src/websearch.c:42 msgid "/Go Home" msgstr "" #: src/websearch.c:43 msgid "/Search" msgstr "" #: src/websearch.c:116 src/websearch.c:178 msgid "Please select web site" msgstr "" ebview-0.3.6.2/po/ja.po0000644000175000017500000007744111241637344014051 0ustar mhattamhatta# Japanese translation for EBview. # Copyright (C) 2009 Free Software Foundation, Inc. # Kenichi SUTO , 2004. # msgid "" msgstr "" "Project-Id-Version: EBView 0.3.6.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-08-15 09:21+0900\n" "PO-Revision-Date: 2004-02-15 23:28+0900\n" "Last-Translator: Masayuki Hatta \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=euc-jp\n" "Content-Transfer-Encoding: 8-bit\n" #: src/cellrenderercolor.c:159 src/cellrenderercolor.c:160 src/preference.c:81 msgid "Color" msgstr "¿§" #: src/cellrendererebook.c:161 src/mainwindow.c:985 msgid "Text" msgstr "¥Æ¥­¥¹¥È" #: src/cellrendererebook.c:162 msgid "Text to render" msgstr "ɽ¼¨¤¹¤ë¥Æ¥­¥¹¥È" #: src/cellrendererebook.c:170 msgid "BookInfo" msgstr "BookInfo" #: src/cellrendererebook.c:171 msgid "Book Information" msgstr "Book Information" #: src/dictbar.c:202 msgid "Push to enable this dictionary." msgstr "²¡¤¹¤È¼­½ñ¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£" #: src/dictbar.c:325 msgid "Select dictionary group." msgstr "¼­½ñ¥°¥ë¡¼¥×¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤" #: src/dump.c:217 src/dump.c:356 msgid "Close" msgstr "ÊĤ¸¤ë" #: src/dump.c:229 src/dump.c:367 msgid "page" msgstr "¥Ú¡¼¥¸" #: src/dump.c:376 msgid "offset" msgstr "¥ª¥Õ¥»¥Ã¥È" #: src/eb.c:375 src/eb.c:442 src/mainmenu.c:478 src/mainwindow.c:482 #: src/mainwindow.c:1138 msgid "Automatic Search" msgstr "¤ª¤Þ¤«¤»¸¡º÷" #: src/eb.c:380 src/eb.c:446 src/mainmenu.c:486 src/mainwindow.c:1149 msgid "Exactword Search" msgstr "´°Á´°ìÃ׸¡º÷" #: src/eb.c:386 src/eb.c:450 src/mainmenu.c:492 src/mainwindow.c:1161 msgid "Forward Search" msgstr "Á°Êý°ìÃ׸¡º÷" #: src/eb.c:392 src/eb.c:454 src/mainmenu.c:499 src/mainwindow.c:1173 msgid "Backward Search" msgstr "¸åÊý°ìÃ׸¡º÷" #: src/eb.c:398 src/eb.c:458 src/mainmenu.c:506 src/mainwindow.c:1185 msgid "Keyword Search" msgstr "¾ò·ï¸¡º÷" #: src/eb.c:404 src/eb.c:462 src/mainmenu.c:513 src/mainwindow.c:490 #: src/mainwindow.c:491 src/mainwindow.c:1197 msgid "Multiword Search" msgstr "Ê£¹ç¸¡º÷" #: src/eb.c:423 src/eb.c:476 msgid "Full Text Search" msgstr "Á´Ê¸¸¡º÷" #: src/eb.c:427 src/eb.c:480 src/mainmenu.c:547 src/mainwindow.c:481 #: src/mainwindow.c:499 src/mainwindow.c:500 src/mainwindow.c:1224 #: src/preference.c:94 msgid "Internet Search" msgstr "¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷" #: src/eb.c:431 src/eb.c:484 src/grep.c:77 src/mainmenu.c:554 #: src/mainwindow.c:507 src/mainwindow.c:508 src/mainwindow.c:1238 #: src/preference.c:88 msgid "File Search" msgstr "¥Õ¥¡¥¤¥ë¸¡º÷" #. Cancelable #. Non-cancelable #: src/eb.c:1615 src/eb.c:1619 msgid "Fulltext search" msgstr "Á´Ê¸¸¡º÷" #: src/ebview.c:109 msgid "Failed to execute command. Please check setting." msgstr "¥³¥Þ¥ó¥É¤òµ¯Æ°¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£ÀßÄê¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£" #: src/external.c:208 msgid "Web browser not set" msgstr "¥¦¥§¥Ö¥Ö¥é¥¦¥¶¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" #. Create file list #: src/grep.c:442 msgid "Listing files..." msgstr "¥Õ¥¡¥¤¥ë°ìÍ÷ºîÀ®Ãæ..." #: src/grep.c:456 src/grep.c:1018 src/grep.c:1155 src/grep.c:1182 #: src/pref_io.c:1575 src/shortcutfunc.c:85 src/shortcutfunc.c:113 #: src/shortcutfunc.c:189 src/shortcutfunc.c:234 msgid "Manual Select" msgstr "¼êư¤ÇÁªÂò" #: src/grep.c:545 msgid "done\n" msgstr "´°Î»\n" #: src/grep.c:555 msgid "Force ordinary text.\n" msgstr "¥æ¡¼¥¶»ØÄê¤Ë¤è¤ëÄ̾︡º÷\n" #: src/grep.c:560 msgid "Seems like regular expression.\n" msgstr "Àµµ¬É½¸½¤¬ÆþÎϤµ¤ì¤Þ¤·¤¿¡£\n" #: src/grep.c:567 msgid "Force regular expression.\n" msgstr "¥æ¡¼¥¶»ØÄê¤Ë¤è¤ëÀµµ¬É½¸½¸¡º÷\n" #: src/grep.c:572 msgid "Seems like ordinary text.\n" msgstr "Ä̾ï¤Î¸¡º÷¸ì¤¬ÆþÎϤµ¤ì¤Þ¤·¤¿¡£\n" #: src/grep.c:601 msgid "Failed to compile pattern.\n" msgstr "¥Ñ¥¿¡¼¥ó¤Î¥³¥ó¥Ñ¥¤¥ë¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£\n" #: src/grep.c:608 msgid "" "\n" "Searching following files...\n" msgstr "" "\n" "¼¡¤Î¥Õ¥¡¥¤¥ë¤ò¸¡º÷Ãæ...\n" #: src/grep.c:655 msgid "" "\n" "File search completed.\n" msgstr "" "\n" "¥Õ¥¡¥¤¥ë¸¡º÷´°Î»¡£\n" #: src/grep.c:1113 msgid "Suppress Hidden Files" msgstr "±£¤·¥Õ¥¡¥¤¥ë¤òɽ¼¨¤·¤Ê¤¤" #: src/grep.c:1119 msgid "Suppress files whose name start with dot." msgstr "¥É¥Ã¥È¤Ç»Ï¤Þ¤ë¥Õ¥¡¥¤¥ë¤òɽ¼¨¤·¤Þ¤»¤ó¡£" #: src/grep.c:1121 msgid "Ignore Case" msgstr "Âçʸ»ú/¾®Ê¸»ú¤ò̵»ë" #: src/grep.c:1127 msgid "" "When checked, uppercase letters and lowercase letters are regarded as " "identical." msgstr "¥Á¥§¥Ã¥¯¤¹¤ë¤È¡¢Âçʸ»ú¤È¾®Ê¸»ú¤Ï¶èÊ̤µ¤ì¤Þ¤»¤ó¡£" #: src/headword.c:776 msgid "Go to previous hit list." msgstr "Á°¤Î¸«½Ð¤·¤òɽ¼¨¤¹¤ë¡£" #: src/headword.c:795 msgid "Go to next hit list." msgstr "¼¡¤Î¸«½Ð¤·¤òɽ¼¨¤¹¤ë¡£" #: src/mainmenu.c:520 src/mainwindow.c:1209 msgid "Fulltext Search" msgstr "Á´Ê¸¸¡º÷" #: src/mainmenu.c:530 msgid "Menu" msgstr "¥á¥Ë¥å¡¼" #: src/mainmenu.c:537 msgid "Copyright" msgstr "Ãøºî¸¢É½¼¨" #: src/mainmenu.c:593 msgid "Exit" msgstr "½ªÎ»" #: src/mainmenu.c:598 msgid "File" msgstr "¥Õ¥¡¥¤¥ë" #: src/mainmenu.c:606 msgid "Show/Hide" msgstr "ɽ¼¨/Èóɽ¼¨" #: src/mainmenu.c:613 msgid "Menu Bar" msgstr "¥á¥Ë¥å¡¼¥Ð¡¼" #: src/mainmenu.c:622 msgid "Dictionary Selection Bar" msgstr "¼­½ñÁªÂò¥Ð¡¼" #: src/mainmenu.c:631 msgid "Status Bar" msgstr "¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼" #: src/mainmenu.c:638 msgid "Tree Pane Tab" msgstr "¥Ä¥ê¡¼¥Ú¥¤¥ó¤Î¥¿¥Ö" #: src/mainmenu.c:649 msgid "Contents" msgstr "ËÜʸ" #: src/mainmenu.c:656 msgid "Emphasize Keyword" msgstr "¥­¡¼¥ï¡¼¥É¤ò¶¯Ä´É½¼¨¤¹¤ë" #: src/mainmenu.c:664 msgid "Show Image Inline" msgstr "²èÁü¤ò¥¤¥ó¥é¥¤¥óɽ¼¨¤¹¤ë" #. text size #: src/mainmenu.c:678 src/pref_shortcut.c:103 msgid "Increase Font Size" msgstr "¥Õ¥©¥ó¥È¤ò³ÈÂç" #: src/mainmenu.c:684 src/pref_shortcut.c:104 msgid "Decrease Font Size" msgstr "¥Õ¥©¥ó¥È¤ò½Ì¾®" #. Space between lines #: src/mainmenu.c:695 src/pref_shortcut.c:105 msgid "Expand Lines" msgstr "¹Ô´Ö¤ò³ÈÂç" #: src/mainmenu.c:701 src/pref_shortcut.c:106 msgid "Shrink Lines" msgstr "¹Ô´Ö¤ò½Ì¾®" #. Result list #: src/mainmenu.c:709 msgid "Result List" msgstr "·ë²Ì°ìÍ÷" #. Sort by dictionary. #: src/mainmenu.c:716 msgid "Sort By Dictionary" msgstr "¸¡º÷·ë²Ì¤ò¼­½ñ¤´¤È¤Ëɽ¼¨" #. Show filename #: src/mainmenu.c:725 msgid "Show Filename" msgstr "¥Õ¥¡¥¤¥ë̾¤òɽ¼¨" #. Pane direction #: src/mainmenu.c:740 msgid "Pane Direction" msgstr "¥Õ¥ì¡¼¥àʬ³äÊý¸þ" #: src/mainmenu.c:749 msgid "Horizontal" msgstr "º¸±¦" #: src/mainmenu.c:762 msgid "Vertical" msgstr "¾å²¼" #. Tab position #: src/mainmenu.c:778 msgid "Tab Position" msgstr "¥¿¥Ö¤Î°ÌÃÖ" #: src/mainmenu.c:786 msgid "Top" msgstr "¾å" #: src/mainmenu.c:796 msgid "Bottom" msgstr "²¼" #: src/mainmenu.c:806 msgid "Left" msgstr "º¸" #: src/mainmenu.c:816 msgid "Right" msgstr "±¦" #: src/mainmenu.c:826 msgid "View" msgstr "ɽ¼¨" #: src/mainmenu.c:834 msgid "Search Method" msgstr "¸¡º÷ÊýË¡" #: src/mainmenu.c:841 msgid "Tools" msgstr "¥Ä¡¼¥ë" #. #. item = gtk_menu_item_new_with_label(_("Add/Remove Dictionary")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.dict"); #. #. item = gtk_menu_item_new_with_label(_("Stemming")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.ending"); #. #. item = gtk_menu_item_new_with_label(_("Shortcut")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.shortcut"); #. #. item = gtk_menu_item_new_with_label(_("Search Engines")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.web"); #. #. item = gtk_menu_item_new_with_label(_("External Program")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.external"); #. #. item = gtk_menu_item_new_with_label(_("Font")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.font"); #. #. item = gtk_menu_item_new_with_label(_("Color")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.color"); #. #. item = gtk_menu_item_new_with_label(_("Misc")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.misc"); #. #. #. Selection search #: src/mainmenu.c:896 src/preference.c:85 msgid "Selection" msgstr "¥»¥ì¥¯¥·¥ç¥ó¤Î¸¡º÷" #: src/mainmenu.c:904 msgid "Do Nothing" msgstr "²¿¤â¤·¤Ê¤¤" #: src/mainmenu.c:914 msgid "Copy Only" msgstr "¥³¥Ô¡¼¤Î¤ß" #: src/mainmenu.c:924 msgid "Search In Main Window" msgstr "¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤Ç¸¡º÷" #: src/mainmenu.c:934 msgid "Search In Main Window + Top" msgstr "¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤Ç¸¡º÷¤·Á°Ì̤Ø" #: src/mainmenu.c:944 msgid "Search In Popup" msgstr "¥Ý¥Ã¥×¥¢¥Ã¥×¤Ç¸¡º÷" #. if(selection_mode == SELECTION_POPUP) #. gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); #. Dump #: src/mainmenu.c:954 msgid "Dump" msgstr "¥À¥ó¥×" #: src/mainmenu.c:961 msgid "Hex Dump" msgstr "Hex¥À¥ó¥×" #: src/mainmenu.c:967 msgid "Text Dump" msgstr "Text¥À¥ó¥×" #. Option #: src/mainmenu.c:978 msgid "Options..." msgstr "¥ª¥×¥·¥ç¥ó..." #: src/mainmenu.c:988 msgid "Usage" msgstr "»È¤¤Êý" #: src/mainmenu.c:994 msgid "Show EBView Home" msgstr "¥Û¡¼¥à¥Ú¡¼¥¸¤òɽ¼¨" #: src/mainmenu.c:1000 msgid "About" msgstr "¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Ë¤Ä¤¤¤Æ" #: src/mainmenu.c:1007 msgid "Help" msgstr "¥Ø¥ë¥×" #: src/mainwindow.c:101 src/websearch.c:108 msgid "Please enter search word." msgstr "¸¡º÷¸ì¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£" #: src/mainwindow.c:118 src/selection.c:169 src/textview.c:84 #: src/thread_search.c:64 src/thread_search.c:150 msgid "No hit." msgstr "¥Ò¥Ã¥È¤·¤Þ¤»¤ó¤Ç¤·¤¿¡£" #: src/mainwindow.c:302 src/misc.c:146 #, c-format msgid "Couldn't find %s. Check installation." msgstr "¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¡£¥¤¥ó¥¹¥È¡¼¥ë¤¬Àµ¤·¤¯¤Ê¤¤²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£" #: src/mainwindow.c:341 msgid "Help will be shown in external web browser." msgstr "»È¤¤Êý¤ÏWeb¥Ö¥é¥¦¥¶¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£" #: src/mainwindow.c:748 msgid "Search Word" msgstr "¸¡º÷¸ì" #: src/mainwindow.c:768 msgid "" "Type word here. You can type multiple space-separated words for keyword " "search. For file search, specify words or regular expression." msgstr "" "¤³¤³¤Ë¸¡º÷¤·¤¿¤¤¸ì¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£Ê£¹ç¸¡º÷¤È¾ò·ï¸¡º÷¤Î¾ì¹ç¤Ë¤ÏÊ£¿ô¤Îñ¸ì" "¤òÆþ¤ì¤Æ¹½¤¤¤Þ¤»¤ó¡£¥Õ¥¡¥¤¥ë¸¡º÷¤Î¾ì¹ç¤Ë¤Ï¡¢¸¡º÷¸ì¤«Àµµ¬É½¸½¤òÆþ¤ì¤Æ¤¯¤À¤µ" "¤¤¡£" #: src/mainwindow.c:784 src/multi.c:294 msgid "Start search" msgstr "¸¡º÷¤ò³«»Ï" #: src/mainwindow.c:810 msgid "Select search method." msgstr "¸¡º÷ÊýË¡¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£" #: src/mainwindow.c:836 msgid "When enabled, X selection is searched automatically" msgstr "¥Á¥§¥Ã¥¯¤¹¤ë¤È¡¢X¤Î¥»¥ì¥¯¥·¥ç¥ó¤ò¼«Æ°Åª¤Ë¸¡º÷¤·¤Þ¤¹¡£" #: src/mainwindow.c:854 msgid "" "When enabled, result of X selection search will be shown in popup window" msgstr "" "¥Á¥§¥Ã¥¯¤¹¤ë¤È¡¢X¤Î¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷·ë²Ì¤ò¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤·" "¤Þ¤¹" #: src/mainwindow.c:870 msgid "Previous Item" msgstr "Á°¤Î¹àÌÜ" #: src/mainwindow.c:882 msgid "Next Item" msgstr "¼¡¤Î¹àÌÜ" #: src/mainwindow.c:897 msgid "show next in history" msgstr "¼¡¤Ø" #: src/mainwindow.c:908 msgid "show previous in history" msgstr "Ìá¤ë" #: src/mainwindow.c:994 msgid "Candidate" msgstr "¸õÊä" #. rp->heading = strdup(_("menu")); #: src/menu.c:70 msgid "menu" msgstr "¥á¥Ë¥å¡¼" #. rp->heading = strdup(_("copyright")); #: src/menu.c:130 msgid "copyright" msgstr "Ãøºî¸¢É½¼¨" #: src/misc.c:160 #, c-format msgid "Couldn't open %s. Check installation." msgstr "¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó¡£¥¤¥ó¥¹¥È¡¼¥ë¤¬Àµ¤·¤¯¤Ê¤¤²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£" #: src/multi.c:241 src/pref_color.c:238 msgid "Keyword" msgstr "¥­¡¼¥ï¡¼¥É" #: src/multi.c:283 src/multi.c:303 msgid "Candidates" msgstr "¸õÊä" #: src/pref_color.c:95 src/pref_dictgroup.c:1160 msgid "Choose Color" msgstr "¿§¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤" #: src/pref_color.c:220 msgid "Link" msgstr "¥ê¥ó¥¯" #: src/pref_color.c:230 src/pref_color.c:248 src/pref_color.c:266 #: src/pref_color.c:283 src/pref_color.c:301 src/pref_color.c:321 #: src/pref_font.c:176 src/pref_font.c:193 src/pref_font.c:210 #: src/pref_font.c:227 msgid "Choose" msgstr "ÁªÂò" #: src/pref_color.c:256 msgid "Sound" msgstr "¥µ¥¦¥ó¥É" #: src/pref_color.c:272 msgid "Movie" msgstr "¥à¡¼¥Ó¡¼" #: src/pref_color.c:290 msgid "Emphasis" msgstr "¶¯Ä´É½¼¨" #: src/pref_color.c:310 msgid "Reverse Background" msgstr "ȿžɽ¼¨¤ÎÇØ·Ê" #: src/pref_dictgroup.c:148 src/pref_dirgroup.c:132 src/pref_weblist.c:201 msgid "Please select group." msgstr "¥°¥ë¡¼¥×¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤" #: src/pref_dictgroup.c:163 src/pref_dictgroup.c:315 msgid "Failed to load dictionary." msgstr "½ñÀÒ°ìÍ÷¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£" #: src/pref_dictgroup.c:383 src/pref_dictgroup.c:503 src/pref_weblist.c:75 #: src/pref_weblist.c:111 msgid "Please select dictionary." msgstr "¼­½ñ¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£" #: src/pref_dictgroup.c:689 msgid "Failed to get subbook directory." msgstr "½ñÀҤΥǥ£¥ì¥¯¥È¥ê¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£" #: src/pref_dictgroup.c:698 msgid "Failed to get title." msgstr "¥¿¥¤¥È¥ë¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£" #: src/pref_dictgroup.c:721 msgid "Failed to load book." msgstr "½ñÀÒ°ìÍ÷¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£½ñÀÒ¤¬´Ö°ã¤Ã¤Æ¤¤¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£" #: src/pref_dictgroup.c:847 msgid "Please enter directory name" msgstr "¥Ç¥£¥ì¥¯¥È¥ê̾¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£" #: src/pref_dictgroup.c:899 msgid "Please specify title." msgstr "¥¿¥¤¥È¥ë¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£" #: src/pref_dictgroup.c:905 msgid "Please specify book path." msgstr "¼­½ñ¤Î¥Ñ¥¹¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤" #: src/pref_dictgroup.c:915 msgid "Subbook number incorrect." msgstr "ÉûËÜÈֹ椬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó¡£" #: src/pref_dictgroup.c:1070 src/pref_dictgroup.c:1072 #: src/pref_dictgroup.c:1075 src/pref_dictgroup.c:1077 #: src/pref_dictgroup.c:1123 src/pref_dictgroup.c:1125 #: src/pref_dictgroup.c:1128 src/pref_dictgroup.c:1130 #: src/pref_dictgroup.c:1200 src/pref_dictgroup.c:1525 #, c-format msgid "Sample" msgstr "¥µ¥ó¥×¥ë" #: src/pref_dictgroup.c:1286 src/pref_dictgroup.c:1475 src/pref_dirgroup.c:315 #: src/pref_weblist.c:535 msgid "Name" msgstr "̾¾Î" #: src/pref_dictgroup.c:1388 src/pref_weblist.c:480 msgid "Group name" msgstr "¥°¥ë¡¼¥×̾" #: src/pref_dictgroup.c:1398 src/pref_dirgroup.c:355 src/pref_grep.c:285 #: src/pref_shortcut.c:441 src/pref_shortcut.c:533 src/pref_stemming.c:232 #: src/pref_weblist.c:488 src/pref_weblist.c:613 msgid "Add" msgstr "ÄɲÃ" #: src/pref_dictgroup.c:1405 src/pref_dirgroup.c:368 src/pref_grep.c:292 #: src/pref_shortcut.c:422 src/pref_stemming.c:239 src/pref_weblist.c:499 msgid "Remove" msgstr "ºï½ü" #: src/pref_dictgroup.c:1412 src/pref_weblist.c:506 msgid "Up" msgstr "¾å¤Ø" #: src/pref_dictgroup.c:1418 src/pref_weblist.c:512 msgid "Down" msgstr "²¼¤Ø" #: src/pref_dictgroup.c:1429 src/pref_dictgroup.c:1483 msgid "Path" msgstr "¥Ñ¥¹" #: src/pref_dictgroup.c:1439 msgid "Depth" msgstr "¿¼¤µ" #: src/pref_dictgroup.c:1453 msgid "Specify search depth. 0 means to search only specified directory." msgstr "" "¸¡º÷¤Î¿¼¤µ¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£ 0¤Ï¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Îľ²¼¤À¤±¤òõ¤¹¤³¤È¤ò°ÕÌ£" "¤·¤Þ¤¹¡£" #: src/pref_dictgroup.c:1457 msgid "Search Disk" msgstr "¥Ç¥£¥¹¥¯¤ò¸¡º÷" #: src/pref_dictgroup.c:1493 msgid "Subbook Number" msgstr "ÉûËÜÈÖ¹æ" #: src/pref_dictgroup.c:1503 msgid "Appendix Path" msgstr "Appendix¤Î¥Ñ¥¹" #: src/pref_dictgroup.c:1511 msgid "Appendix Subbook Number" msgstr "Appendix¤ÎÉûËÜÈÖ¹æ" #: src/pref_dictgroup.c:1530 msgid "FG" msgstr "Á°·Ê" #: src/pref_dictgroup.c:1536 msgid "BG" msgstr "ÇØ·Ê" #: src/pref_dictgroup.c:1542 msgid "Clear" msgstr "¥¯¥ê¥¢" #: src/pref_dirgroup.c:209 msgid "Select directory" msgstr "¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤" #: src/pref_dirgroup.c:261 msgid "Directory group list" msgstr "¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×°ìÍ÷" #: src/pref_dirgroup.c:308 msgid "Detail" msgstr "¾ÜºÙ" #: src/pref_dirgroup.c:323 msgid "Enter the name of directory group." msgstr "¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤Î̾Á°¤òÆþÎϤ·¤Þ¤¹¡£" #: src/pref_dirgroup.c:325 msgid "Directory list" msgstr "¥Ç¥£¥ì¥¯¥È¥ê°ìÍ÷" #: src/pref_dirgroup.c:345 msgid "" "Specify directory names one per line. You can specify extension of files " "that will be searched. For example, \"/some/dir/name,.txt\" searches all " "files under /some/dir/name which have the extension .txt." msgstr "" "¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£Ê£¿ô»ØÄꤹ¤ë¾ì¹ç¤Ë¤Ï²þ¹Ô¤Ç¶èÀÚ¤ê¤Þ¤¹¡£¸¡º÷¤¹¤ë¥Õ¥¡" "¥¤¥ë¤Î³ÈÄ¥»Ò¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤¿¤È¤¨¤Ð \\\"/some/dir/name,.txt\\\" ¤È" "»ØÄꤹ¤ë¤È¡¢/some/dir/name ¤Î²¼¤Î¡¢³ÈÄ¥»Ò .txt ¤ÎÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤¬¸¡º÷¤µ¤ì¤Þ" "¤¹¡£" #: src/pref_dirgroup.c:361 msgid "Change" msgstr "¹¹¿·" #: src/pref_dirgroup.c:375 msgid "Choose.." msgstr "ÁªÂò.." #. gtk_container_add(GTK_CONTAINER(frame), vbox); #: src/pref_external.c:80 msgid "Play sound internally" msgstr "ÆâÉô¤Ç²»À¼¤òºÆÀ¸" #: src/pref_external.c:84 msgid "Use internal routine to play sound. Valid only on windows." msgstr "ÆâÉô¥ë¡¼¥Á¥ó¤ò»È¤Ã¤Æ²»À¼¤òÀ¸À®¤·¤Þ¤¹¡£Windows¤Ç¤Î¤ßÍ­¸ú¤Ç¤¹¡£" #: src/pref_external.c:94 msgid "Command to play sound " msgstr "²»À¼ºÆÀ¸¥×¥í¥°¥é¥à" #: src/pref_external.c:106 #, c-format msgid "" "External command to play WAVE sound. %f will be replaced by data file name." msgstr "" "WAVE²»À¼¤òºÆÀ¸¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Þ¤¹¡£%f¤Ï¥Õ¥¡¥¤¥ë̾¤ÇÃÖ¤­´¹¤¨¤é¤ì" "¤Þ¤¹¡£" #: src/pref_external.c:116 msgid "Command to play movie " msgstr "ư²èºÆÀ¸¥×¥í¥°¥é¥à" #: src/pref_external.c:128 #, c-format msgid "" "External command to play MPEG movie. %f will be replaced by data file name." msgstr "" "MPEGư²è¤òºÆÀ¸¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Þ¤¹¡£%f¤Ï¥Õ¥¡¥¤¥ë̾¤ÇÃÖ¤­´¹¤¨¤é¤ì" "¤Þ¤¹¡£" #: src/pref_external.c:138 msgid "Command to launch web browser " msgstr "Web¥Ö¥é¥¦¥¶µ¯Æ°¥³¥Þ¥ó¥É" #: src/pref_external.c:150 #, c-format msgid "External command to launch Web browser. %f will be replaced by URL." msgstr "" "Web¥Ö¥é¥¦¥¶¤òµ¯Æ°¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Þ¤¹¡£%f¤ÏURL¤ÇÃÖ¤­´¹¤¨¤é¤ì¤Þ" "¤¹¡£" #: src/pref_external.c:161 msgid "Standard command to open file " msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¯¥Ç¥Õ¥©¥ë¥È¤Î¥³¥Þ¥ó¥É" #: src/pref_external.c:173 msgid "" "Standard command to open file. %f will be replaced by filename, %l by line " "number." msgstr "" "¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤¹¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Þ¤¹¡£%f ¤Ï¥Õ¥¡¥¤¥ë̾¤Ç¡¢%l ¤Ï" "¹ÔÈÖ¹æ¤ÇÃÖ¤­´¹¤¨¤é¤ì¤Þ¤¹¡£" #: src/pref_font.c:166 src/pref_stemming.c:281 msgid "Normal" msgstr "Ä̾ï" #: src/pref_font.c:183 msgid "Bold" msgstr "¥Ü¡¼¥ë¥É" #: src/pref_font.c:200 msgid "Italic" msgstr "¥¤¥¿¥ê¥Ã¥¯" #: src/pref_font.c:216 msgid "Superscript" msgstr "¾åÉÕ¤­Ê¸»ú" #: src/pref_grep.c:132 msgid "Additional Lines To Display" msgstr "Á°¸å¤Ëɽ¼¨¤¹¤ë¹Ô¿ô" #: src/pref_grep.c:150 msgid "" "In addition to matched line, additional lines will be shown in contents." msgstr "¥Þ¥Ã¥Á¤·¤¿¹Ô¤ÎÁ°¸å¤Ë¡¢¤³¤³¤Ç»ØÄꤷ¤¿¹Ô¿ôʬ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£" #: src/pref_grep.c:157 msgid "Additional Chars To Display" msgstr "Á°¸å¤Îʸ»ú¿ô" #: src/pref_grep.c:176 msgid "" "When matched line is too long, several characters around keyword will be " "shown in heading." msgstr "¸¡º÷¸ì¤ÎÁ°¸å¤Ë¡¢¤³¤³¤Ç»ØÄꤷ¤¿¿ô¤Îʸ»ú¤¬¸«½Ð¤·¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£" #: src/pref_grep.c:239 msgid "Extension" msgstr "³ÈÄ¥»Ò" #: src/pref_grep.c:250 msgid "Filter Command" msgstr "¥Õ¥£¥ë¥¿¥³¥Þ¥ó¥É" #: src/pref_grep.c:261 msgid "Open Command" msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤¯¥³¥Þ¥ó¥É" #: src/pref_grep.c:387 msgid "Maximum Cache Size (MB)" msgstr "ºÇÂ祭¥ã¥Ã¥·¥å¥µ¥¤¥º" #: src/pref_grep.c:406 msgid "Specify maximum cache size in MB." msgstr "ºÇÂ祭¥ã¥Ã¥·¥å¥µ¥¤¥º¤òMBñ°Ì¤Ç»ØÄꤷ¤Þ¤¹¡£" #: src/pref_grep.c:408 msgid "Clear Cache" msgstr "¥­¥ã¥Ã¥·¥å¤ò¥¯¥ê¥¢" #: src/pref_gui.c:75 msgid "Maximum words in history" msgstr "¸¡º÷ÍúÎò¤Ë»Ä¤¹Ã±¸ì¿ô" #: src/pref_gui.c:94 msgid "Maximum number of words to remember in word history" msgstr "¸¡º÷ÍúÎò¤Ë»Ä¤¹ºÇÂç¤Îñ¸ì¿ô¤ò»ØÄꤷ¤Þ¤¹¡£" #: src/pref_gui.c:103 msgid "Chars in dictionary bar" msgstr "¼­½ñ̾¤Îʸ»ú¿ô" #: src/pref_gui.c:122 msgid "" "Specify the number of characters to display on top of each toggle buttons in " "dictionary bar." msgstr "¼­½ñÁªÂò¥Ð¡¼¤Î¥È¥°¥ë¥Ü¥¿¥ó¤Ëɽ¼¨¤¹¤ë¼­½ñ̾¤Îʸ»ú¿ô¤ò»ØÄꤷ¤Þ¤¹¡£" #: src/pref_gui.c:126 msgid "Show splash screen" msgstr "µ¯Æ°¥¦¥£¥ó¥É¥¦¤òɽ¼¨" #: src/pref_gui.c:128 msgid "Show splash screen on loading." msgstr "µ¯Æ°»þ¤Ëµ¯Æ°¥¦¥£¥ó¥É¥¦¤òɽ¼¨¤·¤Þ¤¹¡£" #: src/pref_gui.c:136 msgid "Calculate heading automatically" msgstr "¸«½Ð¤Î¿ô¤ò¼«Æ°·×»»" #: src/pref_gui.c:138 msgid "Calculate the number of cells in heading list to suit the window size." msgstr "¸«½Ð°ìÍ÷¤Ëɽ¼¨¤¹¤ë¿ô¤ò¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤«¤é·×»»¤·¤Þ¤¹¡£" #: src/pref_gui.c:152 msgid "Maximum hits to display" msgstr "ɽ¼¨¤¹¤ë¸¡º÷·ë²Ì¤ÎºÇÂç¿ô" #: src/pref_gui.c:171 msgid "" "Maximum number of hits to be displayed at once.\n" "You can go forward and backward using buttons. Valid only if automatic " "calculation is disabled." msgstr "" "°ìÅÙ¤Ëɽ¼¨¤¹¤ë¸«½Ð¤ÎºÇÂç¿ô¤ò»ØÄꤷ¤Þ¤¹¡£\n" "¥Ü¥¿¥ó¤ò»È¤Ã¤ÆÁ°¸å¤Ë°Üư¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤«¤é¤Î¼«Æ°·×»»¤ò" "¤·¤Ê¤¤¤È¤­¤À¤±Í­¸ú¤Ç¤¹¡£" #. #: src/pref_gui.c:174 msgid "Enable dictionary button color" msgstr "¼­½ñ¥Ü¥¿¥ó¤Ë¿§¤ò¤Ä¤±¤ë" #: src/pref_gui.c:176 msgid "Enable background color of dictionary button." msgstr "¼­½ñ¥Ü¥¿¥ó¤Ë¿§¤ò¤Ä¤±¤Þ¤¹¡£" #: src/pref_io.c:124 msgid "Couldn't open preference. Will use default value." msgstr "ÀßÄê¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó¡£¥Ç¥Õ¥©¥ë¥È¤ÎÃͤò»È¤¤¤Þ¤¹¡£" #: src/pref_io.c:130 src/pref_io.c:138 src/pref_io.c:269 src/pref_io.c:277 #: src/pref_io.c:284 src/pref_io.c:299 src/pref_io.c:336 src/pref_io.c:539 #: src/pref_io.c:548 src/pref_io.c:555 src/pref_io.c:573 src/pref_io.c:637 #: src/pref_io.c:646 src/pref_io.c:653 src/pref_io.c:670 src/pref_io.c:844 #: src/pref_io.c:853 src/pref_io.c:861 src/pref_io.c:875 src/pref_io.c:898 #: src/pref_io.c:906 src/pref_io.c:1079 src/pref_io.c:1087 src/pref_io.c:1094 #: src/pref_io.c:1111 src/pref_io.c:1263 src/pref_io.c:1271 src/pref_io.c:1281 #: src/pref_io.c:1349 src/pref_io.c:1357 src/pref_io.c:1367 src/pref_io.c:1412 #: src/pref_io.c:1420 src/pref_io.c:1427 src/pref_io.c:1447 src/pref_io.c:1640 #: src/pref_io.c:1649 src/pref_io.c:1658 src/pref_io.c:1675 #, c-format msgid "Failed to parse %s. Check contents." msgstr "%s ¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£ÆâÍÆ¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£¤¹¡£" #: src/pref_search.c:66 msgid "Maximum hits to search" msgstr "¸¡º÷¤¹¤ëºÇÂç¥Ò¥Ã¥È¿ô" #: src/pref_search.c:84 msgid "" "Maximum number of hits to be searched.\n" "If you increase this number, it takes time to search." msgstr "" "¸¡º÷¤¹¤ëºÇÂç¤Î¥Ò¥Ã¥È¿ô¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£\n" "¿ô¤òÁý¤ä¤¹¤È¡¢¸¡º÷¤Ë»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£" #: src/pref_search.c:87 msgid "Perform word search in automatic search" msgstr "¤ª¤Þ¤«¤»¸¡º÷¤ÇÁ°Êý°ìÃ׸¡º÷¤ò¼Â¹Ô" #: src/pref_search.c:89 msgid "Perform word search in automatic search." msgstr "¤ª¤Þ¤«¤»¸¡º÷¤ÇÁ°Êý°ìÃ׸¡º÷¤ò¹Ô¤¤¤Þ¤¹¡£" #: src/pref_selection.c:72 msgid "Lookup interval (ms)" msgstr "¸¡º÷¤Î´Ö³Ö(¥ß¥êÉÃñ°Ì)" #: src/pref_selection.c:91 msgid "" "Interval to check selection. \n" "Increasing this number may eat up your CPU.\n" "Ignored on Windows." msgstr "" "¥»¥ì¥¯¥·¥ç¥ó¤ò¸¡º÷¤¹¤ë´Ö³Ö¤ò»ØÄꤷ¤Þ¤¹¡£¤³¤Î¿ô¤ò¾®¤µ¤¯¤¹¤ë¤È¤è¤ê¿¤¯¤ÎCPU¤ò»È" "¤¦¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£Windows¤Ç¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£" #: src/pref_selection.c:99 msgid "Minimum chars for selection lookup" msgstr "ºÇ¾®Ê¸»ú¿ô" #: src/pref_selection.c:120 msgid "" "When the number of characters in selection is less than this number, it will " "not be looked up." msgstr "" "¥»¥ì¥¯¥·¥ç¥ó¤ò¸¡º÷¤¹¤ë¾ì¹ç¤ÎºÇ¾®¤Îʸ»ú¿ô¤ò»ØÄꤷ¤Þ¤¹¡£¤³¤Î¿ô¤è¤ê¤â¾®¤µ¤¤Ê¸»ú" "Îó¤Ï¸¡º÷¤µ¤ì¤Þ¤»¤ó¡£" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:130 msgid "Maximum chars for automatic lookup" msgstr "ºÇÂçʸ»ú¿ô" #: src/pref_selection.c:151 msgid "" "When the number of characters in selection is larger than this number, it " "will not be looked up." msgstr "" "¥»¥ì¥¯¥·¥ç¥ó¤ò¸¡º÷¤¹¤ë¾ì¹ç¤ÎºÇÂç¤Îʸ»ú¿ô¤ò»ØÄꤷ¤Þ¤¹¡£¤³¤Î¿ô¤è¤ê¤âÂ礭¤¤Ê¸»ú" "Îó¤Ï¸¡º÷¤µ¤ì¤Þ¤»¤ó¡£" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:161 msgid "Popup window size" msgstr "¥Ý¥Ã¥×¥¢¥Ã¥×¤Î¥µ¥¤¥º" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:213 msgid "Show popup title" msgstr "¥Ý¥Ã¥×¥¢¥Ã¥×¤Î¥¿¥¤¥È¥ë¤òɽ¼¨" #: src/pref_selection.c:215 msgid "Show title of popup window." msgstr "¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë¤òɽ¼¨¤·¤Þ¤¹¡£" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:230 msgid "Beep on no hit" msgstr "¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¤é¥Ù¥ë¤òÌĤ餹" #: src/pref_selection.c:232 msgid "Beep when no hit." msgstr "¸¡º÷¤·¤¿·ë²Ì¡¢¤Ò¤È¤Ä¤â°ìÃפ·¤Ê¤«¤Ã¤¿¤é¥Ù¥ë¤òÌĤ餷¤Þ¤¹¡£" #: src/pref_shortcut.c:59 msgid "Toggle Menu Mar" msgstr "¥á¥Ë¥å¡¼¥Ð¡¼¤Îɽ¼¨/Èóɽ¼¨ÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:60 msgid "Toggle Status Bar" msgstr "¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼¤Îɽ¼¨/Èóɽ¼¨ÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:61 msgid "Toggle Dictionary Bar" msgstr "¼­½ñÁªÂò¥Ð¡¼¤Îɽ¼¨/Èóɽ¼¨ÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:62 msgid "Switch Pane Direction" msgstr "¥Ú¥¤¥óʬ³äÊý¸þ¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:63 msgid "Select Automatic Search" msgstr "¸¡º÷ÊýË¡¡§¤ª¤Þ¤«¤»¸¡º÷" #: src/pref_shortcut.c:64 msgid "Select Exactword Search" msgstr "¸¡º÷ÊýË¡¡§´°Á´°ìÃ׸¡º÷" #: src/pref_shortcut.c:65 msgid "Select Word Search" msgstr "¸¡º÷ÊýË¡¡§Á°Êý°ìÃ׸¡º÷" #: src/pref_shortcut.c:66 msgid "Select Endword Search" msgstr "¸¡º÷ÊýË¡¡§¸åÊý°ìÃ׸¡º÷" #: src/pref_shortcut.c:67 msgid "Select Keyword Search" msgstr "¸¡º÷ÊýË¡¡§¾ò·ï¸¡º÷" #: src/pref_shortcut.c:68 msgid "Select Multi Search" msgstr "¸¡º÷ÊýË¡¡§Ê£¹ç¸¡º÷" #: src/pref_shortcut.c:69 msgid "Select Fulltext Search" msgstr "¸¡º÷ÊýË¡¡§Á´Ê¸°ìÃ׸¡º÷" #: src/pref_shortcut.c:70 msgid "Select Internet Search" msgstr "¸¡º÷ÊýË¡¡§¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷" #: src/pref_shortcut.c:71 msgid "Select File Search" msgstr "¸¡º÷ÊýË¡¡§¥Õ¥¡¥¤¥ë¸¡º÷" #: src/pref_shortcut.c:72 msgid "Next Dictionary Group" msgstr "¼¡¤Î¼­½ñ¥°¥ë¡¼¥×" #: src/pref_shortcut.c:73 msgid "Previous Dictionary Group" msgstr "Á°¤Î¼­½ñ¥°¥ë¡¼¥×" #: src/pref_shortcut.c:74 msgid "Toggle Dictionary No. 1" msgstr "¼­½ñ1¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:75 msgid "Toggle Dictionary No. 2" msgstr "¼­½ñ2¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:76 msgid "Toggle Dictionary No. 3" msgstr "¼­½ñ3¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:77 msgid "Toggle Dictionary No. 4" msgstr "¼­½ñ4¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:78 msgid "Toggle Dictionary No. 5" msgstr "¼­½ñ5¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:79 msgid "Toggle Dictionary No. 6" msgstr "¼­½ñ6¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:80 msgid "Toggle Dictionary No. 7" msgstr "¼­½ñ7¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:81 msgid "Toggle Dictionary No. 8" msgstr "¼­½ñ8¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:82 msgid "Toggle Dictionary No. 9" msgstr "¼­½ñ9¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:83 msgid "Toggle Dictionary No. 10" msgstr "¼­½ñ10¤ÎÀÚ¤êÂØ¤¨" #: src/pref_shortcut.c:84 msgid "Next Hit" msgstr "¼¡¤Î¥Ò¥Ã¥È" #: src/pref_shortcut.c:85 msgid "Previous Hit" msgstr "Á°¤Î¥Ò¥Ã¥È" #: src/pref_shortcut.c:86 msgid "Copy To Clipboard" msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼" #: src/pref_shortcut.c:87 msgid "Paste From Clipboard" msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤«¤é¥Ú¡¼¥¹¥È" #: src/pref_shortcut.c:88 msgid "Start Search" msgstr "¸¡º÷¤ò³«»Ï" #: src/pref_shortcut.c:89 msgid "Go Back In History" msgstr "¥Ò¥¹¥È¥ê¤òÌá¤ë" #: src/pref_shortcut.c:90 msgid "Go Forward In History" msgstr "¥Ò¥¹¥È¥ê¤ò¿Ê¤à" #: src/pref_shortcut.c:91 msgid "Show Previous Text" msgstr "Á°¤Î¹àÌܤòɽ¼¨" #: src/pref_shortcut.c:92 msgid "Show Next Text" msgstr "¼¡¤Î¹àÌܤòɽ¼¨" #. { N_("Toggle Selection Search"), toggle_auto}, #. { N_("Toggle Popup"), toggle_popup}, #: src/pref_shortcut.c:95 msgid "Show Help" msgstr "¥Ø¥ë¥×¤Îɽ¼¨" #: src/pref_shortcut.c:96 msgid "Clear Word" msgstr "¸¡º÷¸ì¤Î¥¯¥ê¥¢" #: src/pref_shortcut.c:97 msgid "Quit Program" msgstr "¥×¥í¥°¥é¥à¤Î½ªÎ»" #: src/pref_shortcut.c:98 msgid "Iconify Window" msgstr "¥¦¥£¥ó¥É¥¦¤ÎºÇ¾®²½" #: src/pref_shortcut.c:99 msgid "Scroll Mainview Down" msgstr "¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤ò²¼¤Ë¥¹¥¯¥í¡¼¥ë" #: src/pref_shortcut.c:100 msgid "Scroll Mainview Up" msgstr "¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤ò¾å¤Ë¥¹¥¯¥í¡¼¥ë" #: src/pref_shortcut.c:101 msgid "Next Hits" msgstr "¼¡¤Î¸¡º÷·ë²Ì" #: src/pref_shortcut.c:102 msgid "Prev. Hits" msgstr "Á°¤Î¸¡º÷·ë²Ì" #: src/pref_shortcut.c:377 src/preference.c:93 msgid "Shortcut" msgstr "¥·¥ç¡¼¥È¥«¥Ã¥È" #: src/pref_shortcut.c:400 msgid "Key" msgstr "¥­¡¼" #: src/pref_shortcut.c:408 src/pref_shortcut.c:522 msgid "Command" msgstr "¥³¥Þ¥ó¥É" #: src/pref_shortcut.c:464 msgid "Grab" msgstr "¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥­¡¼ÆþÎÏ" #: src/pref_shortcut.c:540 msgid "Ignore locks" msgstr "¥í¥Ã¥¯¥­¡¼¤ò̵»ë" #: src/pref_shortcut.c:544 msgid "Ignore Caps Lock and Num Lock key." msgstr "Caps Lock ¥­¡¼¤È Num Lock ¥­¡¼¤ò̵»ë¤·¤Þ¤¹" #: src/pref_stemming.c:166 msgid "Perform stemming" msgstr "¸ìÈøÊäÀµ¤ò¹Ô¤¦" #: src/pref_stemming.c:168 msgid "" "When ending of each words matches the pattern in the list, normal form of " "the word will also be tried. It takes longer." msgstr "" "¸ìÈø¤¬ÊѲ½¤·¤Æ¤¤¤ëñ¸ì¤¬¤³¤Î¥ê¥¹¥È¤Î¥Ñ¥¿¡¼¥ó¤Ë¥Þ¥Ã¥Á¤·¤¿¾ì¹ç¡¢¸µ¤Î·Á¤Ç¸¡º÷¤ò" "¹Ô¤¤¤Þ¤¹¡£»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£" #: src/pref_stemming.c:175 msgid "Stemming only when no hit" msgstr "¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Î¤ß" #: src/pref_stemming.c:177 msgid "Do not perform stemming when original words hit." msgstr "¸µ¤Îñ¸ì¤Ç¸¡º÷¤Ë¥Ò¥Ã¥È¤·¤¿¾ì¹ç¤Ë¤Ï¸ìÈøÊäÀµ¤Ï¹Ô¤¤¤Þ¤»¤ó" #: src/pref_stemming.c:187 msgid "English" msgstr "±Ñ¸ì" #: src/pref_stemming.c:190 msgid "Japanese" msgstr "ÆüËܸì" #: src/pref_stemming.c:211 src/pref_stemming.c:273 msgid "Pattern" msgstr "ÊäÀµÁ°¤Î¸ìÈø" #: src/pref_stemming.c:224 msgid "Correction" msgstr "ÊäÀµ¸å¤Î¸ìÈø" #: src/pref_weblist.c:352 msgid "Please specify name" msgstr "̾¾Î¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£" #: src/pref_weblist.c:359 msgid "Please specify pre string" msgstr "Á°¤Ë¤Ä¤±¤ëʸ»úÎó¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£" #: src/pref_weblist.c:428 msgid "Search engines" msgstr "¸¡º÷¥¨¥ó¥¸¥ó" #: src/pref_weblist.c:519 msgid "Search engine" msgstr "¸¡º÷¥¨¥ó¥¸¥ó" #: src/pref_weblist.c:545 msgid "Homepage" msgstr "¥Û¡¼¥à" #: src/pref_weblist.c:555 msgid "Pre string" msgstr "Á°¤Ë¤Ä¤±¤ëʸ»úÎó" #: src/pref_weblist.c:565 msgid "Post string" msgstr "¸å¤í¤Ë¤Ä¤±¤ëʸ»úÎó" #: src/pref_weblist.c:575 msgid "Glue string" msgstr "·ë¹çʸ»úÎó" #: src/pref_weblist.c:586 msgid "Character Code" msgstr "ʸ»ú¥³¡¼¥É" #: src/preference.c:79 msgid "Appearance" msgstr "³°´Ñ" #: src/preference.c:80 msgid "Font" msgstr "¥Õ¥©¥ó¥È" #: src/preference.c:82 src/preference.c:92 msgid "Misc." msgstr "¤½¤Î¾" #: src/preference.c:83 msgid "Dictionary Search" msgstr "¼­½ñ¸¡º÷" #: src/preference.c:84 msgid "Dictionary Group" msgstr "¼­½ñ¥°¥ë¡¼¥×" #: src/preference.c:86 msgid "Stemming" msgstr "¸ìÈøÊäÀµ" #: src/preference.c:87 msgid "Misc" msgstr "¤½¤Î¾" #: src/preference.c:89 msgid "Directory Group" msgstr "¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×" #: src/preference.c:90 msgid "Filter" msgstr "¥Õ¥£¥ë¥¿" #: src/preference.c:91 msgid "Cache" msgstr "¥­¥ã¥Ã¥·¥å" #: src/preference.c:95 msgid "External Program" msgstr "³°Éô¥×¥í¥°¥é¥à" #: src/preference.c:573 msgid "Items" msgstr "ÀßÄê¹àÌÜ" #: src/preference.c:634 msgid "Ok" msgstr "´°Î»" #: src/render.c:869 msgid " [Movie] " msgstr "[ư²è]" #: src/splash.c:120 msgid "Loading dictionary..." msgstr "¼­½ñ¤ÎÆÉ¤ß¹þ¤ßÃæ..." #: src/textview.c:47 msgid "/Search This Word" msgstr "/ÁªÂò¤·¤¿¸ì¤ò¸¡º÷" #: src/textview.c:48 msgid "/Copy To Clipboard" msgstr "/¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼" #: src/textview.c:49 msgid "/Display" msgstr "/ɽ¼¨" #: src/textview.c:50 msgid "/Display/Menu bar" msgstr "/ɽ¼¨/¥á¥Ë¥å¡¼¥Ð¡¼" #: src/textview.c:51 msgid "/Display/Dictionary Selection Bar" msgstr "/ɽ¼¨/¼­½ñÁªÂò¥Ð¡¼" #: src/textview.c:52 msgid "/Display/Status Bar" msgstr "/ɽ¼¨/¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼" #: src/textview.c:53 msgid "/Display/Tree Frame Tab" msgstr "/ɽ¼¨/¥Ä¥ê¡¼¥Õ¥ì¡¼¥à¤Î¥¿¥Ö" #: src/thread_search.c:61 msgid "Canceled" msgstr "¥­¥ã¥ó¥»¥ë¤·¤Þ¤·¤¿" #: src/thread_search.c:100 msgid "Cancel" msgstr "¥­¥ã¥ó¥»¥ë" #: src/thread_search.c:106 msgid "Searching" msgstr "¸¡º÷Ãæ" #: src/thread_search.c:136 #, c-format msgid "%d hit" msgstr "%d ¹àÌܤΥҥåÈ" #: src/websearch.c:42 msgid "/Go Home" msgstr "/¥Û¡¼¥à¤Ø" #: src/websearch.c:43 msgid "/Search" msgstr "/¸¡º÷" #: src/websearch.c:116 src/websearch.c:178 msgid "Please select web site" msgstr "¥¦¥§¥Ö¥µ¥¤¥È¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£" ebview-0.3.6.2/po/README0000644000175000017500000000017510013675513013761 0ustar mhattamhattaupdate POTFILE.in ls -1 src/*.c > POTFILES.in make ja.pox edit ja.pox and rename it as ja.po make ja.mo make ja.gmo ebview-0.3.6.2/po/POTFILES.in0000644000175000017500000000142611241367353014662 0ustar mhattamhattasrc/bmh.c src/cellrenderercolor.c src/cellrendererebook.c src/dialog.c src/dictbar.c src/dirtree.c src/dump.c src/eb.c src/ebview-client.c src/ebview.c src/external.c src/filter.c src/grep.c src/headword.c src/history.c src/hook.c src/jcode.c src/link.c src/log.c src/mainmenu.c src/mainwindow.c src/menu.c src/misc.c src/multi.c src/pixmap.c src/popup.c src/pref_color.c src/pref_dictgroup.c src/pref_dirgroup.c src/pref_external.c src/pref_font.c src/pref_grep.c src/pref_gui.c src/pref_io.c src/pref_search.c src/pref_selection.c src/pref_shortcut.c src/pref_stemming.c src/pref_weblist.c src/preference.c src/reg.c src/render.c src/selection.c src/shortcut.c src/shortcutfunc.c src/splash.c src/statusbar.c src/textview.c src/thread_search.c src/websearch.c src/xml.c src/xmlinternal.c ebview-0.3.6.2/po/Makefile.in.in0000644000175000017500000001557510016046602015557 0ustar mhattamhatta# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = $(prefix)/@DATADIRNAME@ localedir = $(datadir)/locale gnulocaledir = $(prefix)/share/locale gettextsrcdir = $(prefix)/share/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ MSGMERGE = PATH=../src:$$PATH msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = cat-id-tbl.c POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox .po.mo: rm -f $*.po.utf-8 iconv -f euc-jp -t utf-8 $< | sed -e "s/euc-jp/utf-8/" > $*.po.utf-8 $(MSGFMT) -o $@ $*.po.utf-8 rm -f $*.po.utf-8 .po.gmo: rm -f $*.po.utf-8 iconv -f euc-jp -t utf-8 $< | sed -e "s/euc-jp/utf-8/" > $*.po.utf-8 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $*.po.utf-8 .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: cat-id-tbl.c $(CATALOGS) all-no: $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(PACKAGE).po \ || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) $(srcdir)/cat-id-tbl.c: stamp-cat-id; @: $(srcdir)/stamp-cat-id: $(PACKAGE).pot rm -f cat-id-tbl.tmp sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" $(srcdir)/$(PACKAGE).pot > cat-id-tbl.tmp if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ rm cat-id-tbl.tmp; \ else \ echo cat-id-tbl.c changed; \ rm -f $(srcdir)/cat-id-tbl.c; \ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ fi cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "gettext"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ done rm -f $(gettextsrcdir)/po-Makefile.in.in check: all cat-id-tbl.o: ../intl/libgettext.h dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(PACKAGE).pot PATH=`pwd`/../src:$$PATH; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ mv $$lang.po $$lang.old.po; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ rm -f $$lang.old.po; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$lang.po; \ mv $$lang.old.po $$lang.po; \ fi; \ done POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/po/stamp-cat-id0000644000175000017500000000001211241636551015300 0ustar mhattamhattatimestamp ebview-0.3.6.2/po/cat-id-tbl.c0000644000175000017500000006246311241636551015200 0ustar mhattamhatta# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-08-16 07:57+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/cellrenderercolor.c:159 src/cellrenderercolor.c:160 src/preference.c:81 msgid "Color" msgstr "" #: src/cellrendererebook.c:161 src/mainwindow.c:985 msgid "Text" msgstr "" #: src/cellrendererebook.c:162 msgid "Text to render" msgstr "" #: src/cellrendererebook.c:170 msgid "BookInfo" msgstr "" #: src/cellrendererebook.c:171 msgid "Book Information" msgstr "" #: src/dictbar.c:202 msgid "Push to enable this dictionary." msgstr "" #: src/dictbar.c:325 msgid "Select dictionary group." msgstr "" #: src/dump.c:217 src/dump.c:356 msgid "Close" msgstr "" #: src/dump.c:229 src/dump.c:367 msgid "page" msgstr "" #: src/dump.c:376 msgid "offset" msgstr "" #: src/eb.c:375 src/eb.c:442 src/mainmenu.c:478 src/mainwindow.c:482 #: src/mainwindow.c:1138 msgid "Automatic Search" msgstr "" #: src/eb.c:380 src/eb.c:446 src/mainmenu.c:486 src/mainwindow.c:1149 msgid "Exactword Search" msgstr "" #: src/eb.c:386 src/eb.c:450 src/mainmenu.c:492 src/mainwindow.c:1161 msgid "Forward Search" msgstr "" #: src/eb.c:392 src/eb.c:454 src/mainmenu.c:499 src/mainwindow.c:1173 msgid "Backward Search" msgstr "" #: src/eb.c:398 src/eb.c:458 src/mainmenu.c:506 src/mainwindow.c:1185 msgid "Keyword Search" msgstr "" #: src/eb.c:404 src/eb.c:462 src/mainmenu.c:513 src/mainwindow.c:490 #: src/mainwindow.c:491 src/mainwindow.c:1197 msgid "Multiword Search" msgstr "" #: src/eb.c:423 src/eb.c:476 msgid "Full Text Search" msgstr "" #: src/eb.c:427 src/eb.c:480 src/mainmenu.c:547 src/mainwindow.c:481 #: src/mainwindow.c:499 src/mainwindow.c:500 src/mainwindow.c:1224 #: src/preference.c:94 msgid "Internet Search" msgstr "" #: src/eb.c:431 src/eb.c:484 src/grep.c:77 src/mainmenu.c:554 #: src/mainwindow.c:507 src/mainwindow.c:508 src/mainwindow.c:1238 #: src/preference.c:88 msgid "File Search" msgstr "" #. Cancelable #. Non-cancelable #: src/eb.c:1617 src/eb.c:1621 msgid "Fulltext search" msgstr "" #: src/ebview.c:109 msgid "Failed to execute command. Please check setting." msgstr "" #: src/external.c:208 msgid "Web browser not set" msgstr "" #. Create file list #: src/grep.c:442 msgid "Listing files..." msgstr "" #: src/grep.c:456 src/grep.c:1018 src/grep.c:1155 src/grep.c:1182 #: src/pref_io.c:1575 src/shortcutfunc.c:85 src/shortcutfunc.c:113 #: src/shortcutfunc.c:189 src/shortcutfunc.c:234 msgid "Manual Select" msgstr "" #: src/grep.c:545 msgid "done\n" msgstr "" #: src/grep.c:555 msgid "Force ordinary text.\n" msgstr "" #: src/grep.c:560 msgid "Seems like regular expression.\n" msgstr "" #: src/grep.c:567 msgid "Force regular expression.\n" msgstr "" #: src/grep.c:572 msgid "Seems like ordinary text.\n" msgstr "" #: src/grep.c:601 msgid "Failed to compile pattern.\n" msgstr "" #: src/grep.c:608 msgid "" "\n" "Searching following files...\n" msgstr "" #: src/grep.c:655 msgid "" "\n" "File search completed.\n" msgstr "" #: src/grep.c:1113 msgid "Suppress Hidden Files" msgstr "" #: src/grep.c:1119 msgid "Suppress files whose name start with dot." msgstr "" #: src/grep.c:1121 msgid "Ignore Case" msgstr "" #: src/grep.c:1127 msgid "" "When checked, uppercase letters and lowercase letters are regarded as " "identical." msgstr "" #: src/headword.c:776 msgid "Go to previous hit list." msgstr "" #: src/headword.c:795 msgid "Go to next hit list." msgstr "" #: src/mainmenu.c:520 src/mainwindow.c:1209 msgid "Fulltext Search" msgstr "" #: src/mainmenu.c:530 msgid "Menu" msgstr "" #: src/mainmenu.c:537 msgid "Copyright" msgstr "" #: src/mainmenu.c:593 msgid "Exit" msgstr "" #: src/mainmenu.c:598 msgid "File" msgstr "" #: src/mainmenu.c:606 msgid "Show/Hide" msgstr "" #: src/mainmenu.c:613 msgid "Menu Bar" msgstr "" #: src/mainmenu.c:622 msgid "Dictionary Selection Bar" msgstr "" #: src/mainmenu.c:631 msgid "Status Bar" msgstr "" #: src/mainmenu.c:638 msgid "Tree Pane Tab" msgstr "" #: src/mainmenu.c:649 msgid "Contents" msgstr "" #: src/mainmenu.c:656 msgid "Emphasize Keyword" msgstr "" #: src/mainmenu.c:664 msgid "Show Image Inline" msgstr "" #. text size #: src/mainmenu.c:678 src/pref_shortcut.c:103 msgid "Increase Font Size" msgstr "" #: src/mainmenu.c:684 src/pref_shortcut.c:104 msgid "Decrease Font Size" msgstr "" #. Space between lines #: src/mainmenu.c:695 src/pref_shortcut.c:105 msgid "Expand Lines" msgstr "" #: src/mainmenu.c:701 src/pref_shortcut.c:106 msgid "Shrink Lines" msgstr "" #. Result list #: src/mainmenu.c:709 msgid "Result List" msgstr "" #. Sort by dictionary. #: src/mainmenu.c:716 msgid "Sort By Dictionary" msgstr "" #. Show filename #: src/mainmenu.c:725 msgid "Show Filename" msgstr "" #. Pane direction #: src/mainmenu.c:740 msgid "Pane Direction" msgstr "" #: src/mainmenu.c:749 msgid "Horizontal" msgstr "" #: src/mainmenu.c:762 msgid "Vertical" msgstr "" #. Tab position #: src/mainmenu.c:778 msgid "Tab Position" msgstr "" #: src/mainmenu.c:786 msgid "Top" msgstr "" #: src/mainmenu.c:796 msgid "Bottom" msgstr "" #: src/mainmenu.c:806 msgid "Left" msgstr "" #: src/mainmenu.c:816 msgid "Right" msgstr "" #: src/mainmenu.c:826 msgid "View" msgstr "" #: src/mainmenu.c:834 msgid "Search Method" msgstr "" #: src/mainmenu.c:841 msgid "Tools" msgstr "" #. #. item = gtk_menu_item_new_with_label(_("Add/Remove Dictionary")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.dict"); #. #. item = gtk_menu_item_new_with_label(_("Stemming")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.ending"); #. #. item = gtk_menu_item_new_with_label(_("Shortcut")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.shortcut"); #. #. item = gtk_menu_item_new_with_label(_("Search Engines")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.web"); #. #. item = gtk_menu_item_new_with_label(_("External Program")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.external"); #. #. item = gtk_menu_item_new_with_label(_("Font")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.font"); #. #. item = gtk_menu_item_new_with_label(_("Color")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.color"); #. #. item = gtk_menu_item_new_with_label(_("Misc")); #. gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); #. g_signal_connect(G_OBJECT(item), "activate", #. G_CALLBACK(menuitem_handler), #. (gpointer)"pref.misc"); #. #. #. Selection search #: src/mainmenu.c:896 src/preference.c:85 msgid "Selection" msgstr "" #: src/mainmenu.c:904 msgid "Do Nothing" msgstr "" #: src/mainmenu.c:914 msgid "Copy Only" msgstr "" #: src/mainmenu.c:924 msgid "Search In Main Window" msgstr "" #: src/mainmenu.c:934 msgid "Search In Main Window + Top" msgstr "" #: src/mainmenu.c:944 msgid "Search In Popup" msgstr "" #. if(selection_mode == SELECTION_POPUP) #. gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); #. Dump #: src/mainmenu.c:954 msgid "Dump" msgstr "" #: src/mainmenu.c:961 msgid "Hex Dump" msgstr "" #: src/mainmenu.c:967 msgid "Text Dump" msgstr "" #. Option #: src/mainmenu.c:978 msgid "Options..." msgstr "" #: src/mainmenu.c:988 msgid "Usage" msgstr "" #: src/mainmenu.c:994 msgid "Show EBView Home" msgstr "" #: src/mainmenu.c:1000 msgid "About" msgstr "" #: src/mainmenu.c:1007 msgid "Help" msgstr "" #: src/mainwindow.c:101 src/websearch.c:108 msgid "Please enter search word." msgstr "" #: src/mainwindow.c:118 src/selection.c:169 src/textview.c:84 #: src/thread_search.c:64 src/thread_search.c:150 msgid "No hit." msgstr "" #: src/mainwindow.c:302 src/misc.c:146 #, c-format msgid "Couldn't find %s. Check installation." msgstr "" #: src/mainwindow.c:341 msgid "Help will be shown in external web browser." msgstr "" #: src/mainwindow.c:748 msgid "Search Word" msgstr "" #: src/mainwindow.c:768 msgid "" "Type word here. You can type multiple space-separated words for keyword " "search. For file search, specify words or regular expression." msgstr "" #: src/mainwindow.c:784 src/multi.c:294 msgid "Start search" msgstr "" #: src/mainwindow.c:810 msgid "Select search method." msgstr "" #: src/mainwindow.c:836 msgid "When enabled, X selection is searched automatically" msgstr "" #: src/mainwindow.c:854 msgid "" "When enabled, result of X selection search will be shown in popup window" msgstr "" #: src/mainwindow.c:870 msgid "Previous Item" msgstr "" #: src/mainwindow.c:882 msgid "Next Item" msgstr "" #: src/mainwindow.c:897 msgid "show next in history" msgstr "" #: src/mainwindow.c:908 msgid "show previous in history" msgstr "" #: src/mainwindow.c:994 msgid "Candidate" msgstr "" #. rp->heading = strdup(_("menu")); #: src/menu.c:70 msgid "menu" msgstr "" #. rp->heading = strdup(_("copyright")); #: src/menu.c:130 msgid "copyright" msgstr "" #: src/misc.c:160 #, c-format msgid "Couldn't open %s. Check installation." msgstr "" #: src/multi.c:241 src/pref_color.c:238 msgid "Keyword" msgstr "" #: src/multi.c:283 src/multi.c:303 msgid "Candidates" msgstr "" #: src/pref_color.c:95 src/pref_dictgroup.c:1160 msgid "Choose Color" msgstr "" #: src/pref_color.c:220 msgid "Link" msgstr "" #: src/pref_color.c:230 src/pref_color.c:248 src/pref_color.c:266 #: src/pref_color.c:283 src/pref_color.c:301 src/pref_color.c:321 #: src/pref_font.c:176 src/pref_font.c:193 src/pref_font.c:210 #: src/pref_font.c:227 msgid "Choose" msgstr "" #: src/pref_color.c:256 msgid "Sound" msgstr "" #: src/pref_color.c:272 msgid "Movie" msgstr "" #: src/pref_color.c:290 msgid "Emphasis" msgstr "" #: src/pref_color.c:310 msgid "Reverse Background" msgstr "" #: src/pref_dictgroup.c:148 src/pref_dirgroup.c:132 src/pref_weblist.c:201 msgid "Please select group." msgstr "" #: src/pref_dictgroup.c:163 src/pref_dictgroup.c:315 msgid "Failed to load dictionary." msgstr "" #: src/pref_dictgroup.c:383 src/pref_dictgroup.c:503 src/pref_weblist.c:75 #: src/pref_weblist.c:111 msgid "Please select dictionary." msgstr "" #: src/pref_dictgroup.c:689 msgid "Failed to get subbook directory." msgstr "" #: src/pref_dictgroup.c:698 msgid "Failed to get title." msgstr "" #: src/pref_dictgroup.c:721 msgid "Failed to load book." msgstr "" #: src/pref_dictgroup.c:847 msgid "Please enter directory name" msgstr "" #: src/pref_dictgroup.c:899 msgid "Please specify title." msgstr "" #: src/pref_dictgroup.c:905 msgid "Please specify book path." msgstr "" #: src/pref_dictgroup.c:915 msgid "Subbook number incorrect." msgstr "" #: src/pref_dictgroup.c:1070 src/pref_dictgroup.c:1072 #: src/pref_dictgroup.c:1075 src/pref_dictgroup.c:1077 #: src/pref_dictgroup.c:1123 src/pref_dictgroup.c:1125 #: src/pref_dictgroup.c:1128 src/pref_dictgroup.c:1130 #: src/pref_dictgroup.c:1200 src/pref_dictgroup.c:1525 #, c-format msgid "Sample" msgstr "" #: src/pref_dictgroup.c:1286 src/pref_dictgroup.c:1475 src/pref_dirgroup.c:315 #: src/pref_weblist.c:535 msgid "Name" msgstr "" #: src/pref_dictgroup.c:1388 src/pref_weblist.c:480 msgid "Group name" msgstr "" #: src/pref_dictgroup.c:1398 src/pref_dirgroup.c:355 src/pref_grep.c:285 #: src/pref_shortcut.c:441 src/pref_shortcut.c:533 src/pref_stemming.c:232 #: src/pref_weblist.c:488 src/pref_weblist.c:613 msgid "Add" msgstr "" #: src/pref_dictgroup.c:1405 src/pref_dirgroup.c:368 src/pref_grep.c:292 #: src/pref_shortcut.c:422 src/pref_stemming.c:239 src/pref_weblist.c:499 msgid "Remove" msgstr "" #: src/pref_dictgroup.c:1412 src/pref_weblist.c:506 msgid "Up" msgstr "" #: src/pref_dictgroup.c:1418 src/pref_weblist.c:512 msgid "Down" msgstr "" #: src/pref_dictgroup.c:1429 src/pref_dictgroup.c:1483 msgid "Path" msgstr "" #: src/pref_dictgroup.c:1439 msgid "Depth" msgstr "" #: src/pref_dictgroup.c:1453 msgid "Specify search depth. 0 means to search only specified directory." msgstr "" #: src/pref_dictgroup.c:1457 msgid "Search Disk" msgstr "" #: src/pref_dictgroup.c:1493 msgid "Subbook Number" msgstr "" #: src/pref_dictgroup.c:1503 msgid "Appendix Path" msgstr "" #: src/pref_dictgroup.c:1511 msgid "Appendix Subbook Number" msgstr "" #: src/pref_dictgroup.c:1530 msgid "FG" msgstr "" #: src/pref_dictgroup.c:1536 msgid "BG" msgstr "" #: src/pref_dictgroup.c:1542 msgid "Clear" msgstr "" #: src/pref_dirgroup.c:209 msgid "Select directory" msgstr "" #: src/pref_dirgroup.c:261 msgid "Directory group list" msgstr "" #: src/pref_dirgroup.c:308 msgid "Detail" msgstr "" #: src/pref_dirgroup.c:323 msgid "Enter the name of directory group." msgstr "" #: src/pref_dirgroup.c:325 msgid "Directory list" msgstr "" #: src/pref_dirgroup.c:345 msgid "" "Specify directory names one per line. You can specify extension of files " "that will be searched. For example, \"/some/dir/name,.txt\" searches all " "files under /some/dir/name which have the extension .txt." msgstr "" #: src/pref_dirgroup.c:361 msgid "Change" msgstr "" #: src/pref_dirgroup.c:375 msgid "Choose.." msgstr "" #. gtk_container_add(GTK_CONTAINER(frame), vbox); #: src/pref_external.c:80 msgid "Play sound internally" msgstr "" #: src/pref_external.c:84 msgid "Use internal routine to play sound. Valid only on windows." msgstr "" #: src/pref_external.c:94 msgid "Command to play sound " msgstr "" #: src/pref_external.c:106 #, c-format msgid "" "External command to play WAVE sound. %f will be replaced by data file name." msgstr "" #: src/pref_external.c:116 msgid "Command to play movie " msgstr "" #: src/pref_external.c:128 #, c-format msgid "" "External command to play MPEG movie. %f will be replaced by data file name." msgstr "" #: src/pref_external.c:138 msgid "Command to launch web browser " msgstr "" #: src/pref_external.c:150 #, c-format msgid "External command to launch Web browser. %f will be replaced by URL." msgstr "" #: src/pref_external.c:161 msgid "Standard command to open file " msgstr "" #: src/pref_external.c:173 msgid "" "Standard command to open file. %f will be replaced by filename, %l by line " "number." msgstr "" #: src/pref_font.c:166 src/pref_stemming.c:281 msgid "Normal" msgstr "" #: src/pref_font.c:183 msgid "Bold" msgstr "" #: src/pref_font.c:200 msgid "Italic" msgstr "" #: src/pref_font.c:216 msgid "Superscript" msgstr "" #: src/pref_grep.c:132 msgid "Additional Lines To Display" msgstr "" #: src/pref_grep.c:150 msgid "" "In addition to matched line, additional lines will be shown in contents." msgstr "" #: src/pref_grep.c:157 msgid "Additional Chars To Display" msgstr "" #: src/pref_grep.c:176 msgid "" "When matched line is too long, several characters around keyword will be " "shown in heading." msgstr "" #: src/pref_grep.c:239 msgid "Extension" msgstr "" #: src/pref_grep.c:250 msgid "Filter Command" msgstr "" #: src/pref_grep.c:261 msgid "Open Command" msgstr "" #: src/pref_grep.c:387 msgid "Maximum Cache Size (MB)" msgstr "" #: src/pref_grep.c:406 msgid "Specify maximum cache size in MB." msgstr "" #: src/pref_grep.c:408 msgid "Clear Cache" msgstr "" #: src/pref_gui.c:75 msgid "Maximum words in history" msgstr "" #: src/pref_gui.c:94 msgid "Maximum number of words to remember in word history" msgstr "" #: src/pref_gui.c:103 msgid "Chars in dictionary bar" msgstr "" #: src/pref_gui.c:122 msgid "" "Specify the number of characters to display on top of each toggle buttons in " "dictionary bar." msgstr "" #: src/pref_gui.c:126 msgid "Show splash screen" msgstr "" #: src/pref_gui.c:128 msgid "Show splash screen on loading." msgstr "" #: src/pref_gui.c:136 msgid "Calculate heading automatically" msgstr "" #: src/pref_gui.c:138 msgid "Calculate the number of cells in heading list to suit the window size." msgstr "" #: src/pref_gui.c:152 msgid "Maximum hits to display" msgstr "" #: src/pref_gui.c:171 msgid "" "Maximum number of hits to be displayed at once.\n" "You can go forward and backward using buttons. Valid only if automatic " "calculation is disabled." msgstr "" #. #: src/pref_gui.c:174 msgid "Enable dictionary button color" msgstr "" #: src/pref_gui.c:176 msgid "Enable background color of dictionary button." msgstr "" #: src/pref_io.c:124 msgid "Couldn't open preference. Will use default value." msgstr "" #: src/pref_io.c:130 src/pref_io.c:138 src/pref_io.c:269 src/pref_io.c:277 #: src/pref_io.c:284 src/pref_io.c:299 src/pref_io.c:336 src/pref_io.c:539 #: src/pref_io.c:548 src/pref_io.c:555 src/pref_io.c:573 src/pref_io.c:637 #: src/pref_io.c:646 src/pref_io.c:653 src/pref_io.c:670 src/pref_io.c:844 #: src/pref_io.c:853 src/pref_io.c:861 src/pref_io.c:875 src/pref_io.c:898 #: src/pref_io.c:906 src/pref_io.c:1079 src/pref_io.c:1087 src/pref_io.c:1094 #: src/pref_io.c:1111 src/pref_io.c:1263 src/pref_io.c:1271 src/pref_io.c:1281 #: src/pref_io.c:1349 src/pref_io.c:1357 src/pref_io.c:1367 src/pref_io.c:1412 #: src/pref_io.c:1420 src/pref_io.c:1427 src/pref_io.c:1447 src/pref_io.c:1640 #: src/pref_io.c:1649 src/pref_io.c:1658 src/pref_io.c:1675 #, c-format msgid "Failed to parse %s. Check contents." msgstr "" #: src/pref_search.c:66 msgid "Maximum hits to search" msgstr "" #: src/pref_search.c:84 msgid "" "Maximum number of hits to be searched.\n" "If you increase this number, it takes time to search." msgstr "" #: src/pref_search.c:87 msgid "Perform word search in automatic search" msgstr "" #: src/pref_search.c:89 msgid "Perform word search in automatic search." msgstr "" #: src/pref_selection.c:72 msgid "Lookup interval (ms)" msgstr "" #: src/pref_selection.c:91 msgid "" "Interval to check selection. \n" "Increasing this number may eat up your CPU.\n" "Ignored on Windows." msgstr "" #: src/pref_selection.c:99 msgid "Minimum chars for selection lookup" msgstr "" #: src/pref_selection.c:120 msgid "" "When the number of characters in selection is less than this number, it will " "not be looked up." msgstr "" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:130 msgid "Maximum chars for automatic lookup" msgstr "" #: src/pref_selection.c:151 msgid "" "When the number of characters in selection is larger than this number, it " "will not be looked up." msgstr "" #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #: src/pref_selection.c:161 msgid "Popup window size" msgstr "" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:213 msgid "Show popup title" msgstr "" #: src/pref_selection.c:215 msgid "Show title of popup window." msgstr "" #. #. hbox = gtk_hbox_new(FALSE,10); #. gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); #. gtk_box_pack_start (GTK_BOX(vbox) #. , hbox,FALSE, FALSE, 0); #. #: src/pref_selection.c:230 msgid "Beep on no hit" msgstr "" #: src/pref_selection.c:232 msgid "Beep when no hit." msgstr "" #: src/pref_shortcut.c:59 msgid "Toggle Menu Mar" msgstr "" #: src/pref_shortcut.c:60 msgid "Toggle Status Bar" msgstr "" #: src/pref_shortcut.c:61 msgid "Toggle Dictionary Bar" msgstr "" #: src/pref_shortcut.c:62 msgid "Switch Pane Direction" msgstr "" #: src/pref_shortcut.c:63 msgid "Select Automatic Search" msgstr "" #: src/pref_shortcut.c:64 msgid "Select Exactword Search" msgstr "" #: src/pref_shortcut.c:65 msgid "Select Word Search" msgstr "" #: src/pref_shortcut.c:66 msgid "Select Endword Search" msgstr "" #: src/pref_shortcut.c:67 msgid "Select Keyword Search" msgstr "" #: src/pref_shortcut.c:68 msgid "Select Multi Search" msgstr "" #: src/pref_shortcut.c:69 msgid "Select Fulltext Search" msgstr "" #: src/pref_shortcut.c:70 msgid "Select Internet Search" msgstr "" #: src/pref_shortcut.c:71 msgid "Select File Search" msgstr "" #: src/pref_shortcut.c:72 msgid "Next Dictionary Group" msgstr "" #: src/pref_shortcut.c:73 msgid "Previous Dictionary Group" msgstr "" #: src/pref_shortcut.c:74 msgid "Toggle Dictionary No. 1" msgstr "" #: src/pref_shortcut.c:75 msgid "Toggle Dictionary No. 2" msgstr "" #: src/pref_shortcut.c:76 msgid "Toggle Dictionary No. 3" msgstr "" #: src/pref_shortcut.c:77 msgid "Toggle Dictionary No. 4" msgstr "" #: src/pref_shortcut.c:78 msgid "Toggle Dictionary No. 5" msgstr "" #: src/pref_shortcut.c:79 msgid "Toggle Dictionary No. 6" msgstr "" #: src/pref_shortcut.c:80 msgid "Toggle Dictionary No. 7" msgstr "" #: src/pref_shortcut.c:81 msgid "Toggle Dictionary No. 8" msgstr "" #: src/pref_shortcut.c:82 msgid "Toggle Dictionary No. 9" msgstr "" #: src/pref_shortcut.c:83 msgid "Toggle Dictionary No. 10" msgstr "" #: src/pref_shortcut.c:84 msgid "Next Hit" msgstr "" #: src/pref_shortcut.c:85 msgid "Previous Hit" msgstr "" #: src/pref_shortcut.c:86 msgid "Copy To Clipboard" msgstr "" #: src/pref_shortcut.c:87 msgid "Paste From Clipboard" msgstr "" #: src/pref_shortcut.c:88 msgid "Start Search" msgstr "" #: src/pref_shortcut.c:89 msgid "Go Back In History" msgstr "" #: src/pref_shortcut.c:90 msgid "Go Forward In History" msgstr "" #: src/pref_shortcut.c:91 msgid "Show Previous Text" msgstr "" #: src/pref_shortcut.c:92 msgid "Show Next Text" msgstr "" #. { N_("Toggle Selection Search"), toggle_auto}, #. { N_("Toggle Popup"), toggle_popup}, #: src/pref_shortcut.c:95 msgid "Show Help" msgstr "" #: src/pref_shortcut.c:96 msgid "Clear Word" msgstr "" #: src/pref_shortcut.c:97 msgid "Quit Program" msgstr "" #: src/pref_shortcut.c:98 msgid "Iconify Window" msgstr "" #: src/pref_shortcut.c:99 msgid "Scroll Mainview Down" msgstr "" #: src/pref_shortcut.c:100 msgid "Scroll Mainview Up" msgstr "" #: src/pref_shortcut.c:101 msgid "Next Hits" msgstr "" #: src/pref_shortcut.c:102 msgid "Prev. Hits" msgstr "" #: src/pref_shortcut.c:377 src/preference.c:93 msgid "Shortcut" msgstr "" #: src/pref_shortcut.c:400 msgid "Key" msgstr "" #: src/pref_shortcut.c:408 src/pref_shortcut.c:522 msgid "Command" msgstr "" #: src/pref_shortcut.c:464 msgid "Grab" msgstr "" #: src/pref_shortcut.c:540 msgid "Ignore locks" msgstr "" #: src/pref_shortcut.c:544 msgid "Ignore Caps Lock and Num Lock key." msgstr "" #: src/pref_stemming.c:166 msgid "Perform stemming" msgstr "" #: src/pref_stemming.c:168 msgid "" "When ending of each words matches the pattern in the list, normal form of " "the word will also be tried. It takes longer." msgstr "" #: src/pref_stemming.c:175 msgid "Stemming only when no hit" msgstr "" #: src/pref_stemming.c:177 msgid "Do not perform stemming when original words hit." msgstr "" #: src/pref_stemming.c:187 msgid "English" msgstr "" #: src/pref_stemming.c:190 msgid "Japanese" msgstr "" #: src/pref_stemming.c:211 src/pref_stemming.c:273 msgid "Pattern" msgstr "" #: src/pref_stemming.c:224 msgid "Correction" msgstr "" #: src/pref_weblist.c:352 msgid "Please specify name" msgstr "" #: src/pref_weblist.c:359 msgid "Please specify pre string" msgstr "" #: src/pref_weblist.c:428 msgid "Search engines" msgstr "" #: src/pref_weblist.c:519 msgid "Search engine" msgstr "" #: src/pref_weblist.c:545 msgid "Homepage" msgstr "" #: src/pref_weblist.c:555 msgid "Pre string" msgstr "" #: src/pref_weblist.c:565 msgid "Post string" msgstr "" #: src/pref_weblist.c:575 msgid "Glue string" msgstr "" #: src/pref_weblist.c:586 msgid "Character Code" msgstr "" #: src/preference.c:79 msgid "Appearance" msgstr "" #: src/preference.c:80 msgid "Font" msgstr "" #: src/preference.c:82 src/preference.c:92 msgid "Misc." msgstr "" #: src/preference.c:83 msgid "Dictionary Search" msgstr "" #: src/preference.c:84 msgid "Dictionary Group" msgstr "" #: src/preference.c:86 msgid "Stemming" msgstr "" #: src/preference.c:87 msgid "Misc" msgstr "" #: src/preference.c:89 msgid "Directory Group" msgstr "" #: src/preference.c:90 msgid "Filter" msgstr "" #: src/preference.c:91 msgid "Cache" msgstr "" #: src/preference.c:95 msgid "External Program" msgstr "" #: src/preference.c:573 msgid "Items" msgstr "" #: src/preference.c:634 msgid "Ok" msgstr "" #: src/render.c:869 msgid " [Movie] " msgstr "" #: src/splash.c:120 msgid "Loading dictionary..." msgstr "" #: src/textview.c:47 msgid "/Search This Word" msgstr "" #: src/textview.c:48 msgid "/Copy To Clipboard" msgstr "" #: src/textview.c:49 msgid "/Display" msgstr "" #: src/textview.c:50 msgid "/Display/Menu bar" msgstr "" #: src/textview.c:51 msgid "/Display/Dictionary Selection Bar" msgstr "" #: src/textview.c:52 msgid "/Display/Status Bar" msgstr "" #: src/textview.c:53 msgid "/Display/Tree Frame Tab" msgstr "" #: src/thread_search.c:61 msgid "Canceled" msgstr "" #: src/thread_search.c:100 msgid "Cancel" msgstr "" #: src/thread_search.c:106 msgid "Searching" msgstr "" #: src/thread_search.c:136 #, c-format msgid "%d hit" msgstr "" #: src/websearch.c:42 msgid "/Go Home" msgstr "" #: src/websearch.c:43 msgid "/Search" msgstr "" #: src/websearch.c:116 src/websearch.c:178 msgid "Please select web site" msgstr "" ebview-0.3.6.2/po/ja.gmo0000644000175000017500000005524011241637552014207 0ustar mhattamhattaÞ•%D l ¡º Ùãêý!(:Nfow‰“¯ Ë Öäü  /AFW`gmFÔÛ ä îù' .;D J Vagmu”«Â ËÕ ç ñ%ü%"1Hz“š«½Öæû 0FKPY-k™¸"Àãô ù C!KeK±ý0 Mnƒ˜#³× Üèïþ  4 C T d t € “ © ¾ × Ü ç +ì !!! *!5!"D! g! s!H€!É!Ü!]ì!J"Q"W"`"d"l"{"€"…"–"¬" Á"Ï""ç" #"#9#\É#3&$Z$s$x$"$¤$©$¯$µ$Æ$Ë$á$ ê$ ô$þ$% % % %(%7%L%Q%Y%'j%(’%»%Ñ%í%&!&6&M&g&{&•&«& ½& É& Ô&ß& ù& '' 4'A' H'T'g'm't'‰' œ'¨'¾'Ú' ê' ø' (( !(+(F(f(~(”(¬(¿(Ö(í())*)C)T) j)t)}) Ž) œ)¦)¸)Ç)Ú)ë)þ)* 9* C*P*c*Éi*!3+AU+\—+ô+R, f, s, €,‹,”,®,½, ×,ã,)ù,#- 9-F- K-U-d-z-’-«-Ã-Û-ó- .#.;.S.k.{..“. —.…¥.+/./:4/o/x/}/P‘/3â/H0w_0Z×0`21^“1 ò1ü12222(2;A2}3#›3¿3È3"Þ34 4$4?4&]4 „4’4š4$´4Ù4à4ó455(5@5S5Z5-m5T›5 ð5ý5666+6QG6™6©6Å6Ì6Ó6Ú6ê677&7 /797U7 k7u7 y7!†7¨7Ä7à7ç7!÷78)8d<8d¡8N9U9k9r9y9 Œ9™9¬9$Ë9ð9 :Q:k: r: |:$‰:'®:!Ö:ø:<ÿ:<;O;V; f;p;q†;xø;xq<ê<7ñ<T)=?~=0¾=cï=-S>W> Ù>æ> ù>? ?%,?+R?~? ‘? ž? «?¸?È?Þ?!ô?!@!8@Z@ j@3t@ ¨@ µ@¿@Æ@5â@A5AWNA¦A¼A¯ØAˆB ˜B ¥B¯B¶B ÆBÓB ×BáBC C=CMClC$|C¡CÓÀCy”D<EKE jEwEŠE šE ¤E ®E »EÈEÏEèEøE F!F:FAF!HFjF}F'–F¾FÅFØF0îF9GYG3rG'¦G$ÎG'óG0H*LH$wH6œH*ÓHþHI9IRIeI~I ŽI*›IÆIßI æIóI J J0J0KJ|J!’J-´JâJ þJ KK(K ;K.EK(tK!K!¿K!áK!L!%L*GLrLŽL!ªL-ÌL9úL*4M_M{M‘M­MÆM$ÙMþMN**NUN6tNE«NñNO$O 7O?DO>„P}ÃP`AQ3¢Q–ÖQmR}RR £R$°R ÕR*âR S$S9BS$|S¡S ±S ¾SÌS1åST.TFT]TtT‹T¢T¹TÐTçT1þT40U eUoUsUçUwV ~VXˆVáVèV3ïVH#WOlWy¼Wœ6X]ÓX1YÂYSZcZ kZxZ ˆZ’Z™ZŠ GØXÇ¢–‘Œ’¬ø %šÞYüól<bòiÝW¿gjã嫱'4|({è¤Üôx ý#!pfÏÕºHä_¶.û¨^цœðKÓËM*æA-€7©r$ï:ÀçÿÉ"­éß#L¼Ãƒ£@ˆáªÔSõP×!¡êN5nR®»à]"™÷² dÛ)Å`VþíÂÍ>u2DE·s¹Ÿ„\6ö—J¸U}Ð[BÁŽ+…;aokÌ%qeȇ‹žwI ?9°Æ‚ñy Zh ³”¾½´Q$ ù쵘1,FëÊ C 0¦c=Ö¯ 3tvâÄú~‰m8Ù›ÚîO&•“¥ /§ÒÎTz  File search completed. Searching following files... [Movie] %d hit/Copy To Clipboard/Display/Display/Dictionary Selection Bar/Display/Menu bar/Display/Status Bar/Display/Tree Frame Tab/Go Home/Search/Search This WordAboutAddAdditional Chars To DisplayAdditional Lines To DisplayAppearanceAppendix PathAppendix Subbook NumberAutomatic SearchBGBackward SearchBeep on no hitBeep when no hit.BoldBook InformationBookInfoBottomCacheCalculate heading automaticallyCalculate the number of cells in heading list to suit the window size.CancelCanceledCandidateCandidatesChangeCharacter CodeChars in dictionary barChooseChoose ColorChoose..ClearClear CacheClear WordCloseColorCommandCommand to launch web browser Command to play movie Command to play sound ContentsCopy OnlyCopy To ClipboardCopyrightCorrectionCouldn't find %s. Check installation.Couldn't open %s. Check installation.Couldn't open preference. Will use default value.Decrease Font SizeDepthDetailDictionary GroupDictionary SearchDictionary Selection BarDirectory GroupDirectory group listDirectory listDo NothingDo not perform stemming when original words hit.DownDumpEmphasisEmphasize KeywordEnable background color of dictionary button.Enable dictionary button colorEnglishEnter the name of directory group.Exactword SearchExitExpand LinesExtensionExternal ProgramExternal command to launch Web browser. %f will be replaced by URL.External command to play MPEG movie. %f will be replaced by data file name.External command to play WAVE sound. %f will be replaced by data file name.FGFailed to compile pattern. Failed to execute command. Please check setting.Failed to get subbook directory.Failed to get title.Failed to load book.Failed to load dictionary.Failed to parse %s. Check contents.FileFile SearchFilterFilter CommandFontForce ordinary text. Force regular expression. Forward SearchFull Text SearchFulltext SearchFulltext searchGlue stringGo Back In HistoryGo Forward In HistoryGo to next hit list.Go to previous hit list.GrabGroup nameHelpHelp will be shown in external web browser.Hex DumpHomepageHorizontalIconify WindowIgnore Caps Lock and Num Lock key.Ignore CaseIgnore locksIn addition to matched line, additional lines will be shown in contents.Increase Font SizeInternet SearchInterval to check selection. Increasing this number may eat up your CPU. Ignored on Windows.ItalicItemsJapaneseKeyKeywordKeyword SearchLeftLinkListing files...Loading dictionary...Lookup interval (ms)Manual SelectMaximum Cache Size (MB)Maximum chars for automatic lookupMaximum hits to displayMaximum hits to searchMaximum number of hits to be displayed at once. You can go forward and backward using buttons. Valid only if automatic calculation is disabled.Maximum number of hits to be searched. If you increase this number, it takes time to search.Maximum number of words to remember in word historyMaximum words in historyMenuMenu BarMinimum chars for selection lookupMiscMisc.MovieMultiword SearchNameNext Dictionary GroupNext HitNext HitsNext ItemNo hit.NormalOkOpen CommandOptions...Pane DirectionPaste From ClipboardPathPatternPerform stemmingPerform word search in automatic searchPerform word search in automatic search.Play sound internallyPlease enter directory namePlease enter search word.Please select dictionary.Please select group.Please select web sitePlease specify book path.Please specify namePlease specify pre stringPlease specify title.Popup window sizePost stringPre stringPrev. HitsPrevious Dictionary GroupPrevious HitPrevious ItemPush to enable this dictionary.Quit ProgramRemoveResult ListReverse BackgroundRightSampleScroll Mainview DownScroll Mainview UpSearch DiskSearch In Main WindowSearch In Main Window + TopSearch In PopupSearch MethodSearch WordSearch engineSearch enginesSearchingSeems like ordinary text. Seems like regular expression. Select Automatic SearchSelect Endword SearchSelect Exactword SearchSelect File SearchSelect Fulltext SearchSelect Internet SearchSelect Keyword SearchSelect Multi SearchSelect Word SearchSelect dictionary group.Select directorySelect search method.SelectionShortcutShow EBView HomeShow FilenameShow HelpShow Image InlineShow Next TextShow Previous TextShow popup titleShow splash screenShow splash screen on loading.Show title of popup window.Show/HideShrink LinesSort By DictionarySoundSpecify directory names one per line. You can specify extension of files that will be searched. For example, "/some/dir/name,.txt" searches all files under /some/dir/name which have the extension .txt.Specify maximum cache size in MB.Specify search depth. 0 means to search only specified directory.Specify the number of characters to display on top of each toggle buttons in dictionary bar.Standard command to open file Standard command to open file. %f will be replaced by filename, %l by line number.Start SearchStart searchStatus BarStemmingStemming only when no hitSubbook NumberSubbook number incorrect.SuperscriptSuppress Hidden FilesSuppress files whose name start with dot.Switch Pane DirectionTab PositionTextText DumpText to renderToggle Dictionary BarToggle Dictionary No. 1Toggle Dictionary No. 10Toggle Dictionary No. 2Toggle Dictionary No. 3Toggle Dictionary No. 4Toggle Dictionary No. 5Toggle Dictionary No. 6Toggle Dictionary No. 7Toggle Dictionary No. 8Toggle Dictionary No. 9Toggle Menu MarToggle Status BarToolsTopTree Pane TabType word here. You can type multiple space-separated words for keyword search. For file search, specify words or regular expression.UpUsageUse internal routine to play sound. Valid only on windows.VerticalViewWeb browser not setWhen checked, uppercase letters and lowercase letters are regarded as identical.When enabled, X selection is searched automaticallyWhen enabled, result of X selection search will be shown in popup windowWhen ending of each words matches the pattern in the list, normal form of the word will also be tried. It takes longer.When matched line is too long, several characters around keyword will be shown in heading.When the number of characters in selection is larger than this number, it will not be looked up.When the number of characters in selection is less than this number, it will not be looked up.copyrightdone menuoffsetpageshow next in historyshow previous in historyProject-Id-Version: EBView 0.3.6.2 Report-Msgid-Bugs-To: POT-Creation-Date: 2009-08-15 09:21+0900 PO-Revision-Date: 2004-02-15 23:28+0900 Last-Translator: Masayuki Hatta Language-Team: Japanese MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8-bit ファイル検索完了。 次ã®ãƒ•ァイルを検索中... [å‹•ç”»]%d é …ç›®ã®ãƒ’ット/クリップボードã«ã‚³ãƒ”ー/表示/表示/è¾žæ›¸é¸æŠžãƒãƒ¼/表示/メニューãƒãƒ¼/表示/ステータスãƒãƒ¼/表示/ツリーフレームã®ã‚¿ãƒ–/ホームã¸/検索/é¸æŠžã—ãŸèªžã‚’検索ã“ã®ã‚½ãƒ•トウェアã«ã¤ã„ã¦è¿½åŠ å‰å¾Œã®æ–‡å­—æ•°å‰å¾Œã«è¡¨ç¤ºã™ã‚‹è¡Œæ•°å¤–観Appendixã®ãƒ‘スAppendixã®å‰¯æœ¬ç•ªå·ãŠã¾ã‹ã›æ¤œç´¢èƒŒæ™¯å¾Œæ–¹ä¸€è‡´æ¤œç´¢ãƒ’ットã—ãªã‹ã£ãŸã‚‰ãƒ™ãƒ«ã‚’é³´ã‚‰ã™æ¤œç´¢ã—ãŸçµæžœã€ã²ã¨ã¤ã‚‚一致ã—ãªã‹ã£ãŸã‚‰ãƒ™ãƒ«ã‚’鳴らã—ã¾ã™ã€‚ボールドBook InformationBookInfoä¸‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥è¦‹å‡ºã®æ•°ã‚’自動計算見出一覧ã«è¡¨ç¤ºã™ã‚‹æ•°ã‚’ウィンドウサイズã‹ã‚‰è¨ˆç®—ã—ã¾ã™ã€‚キャンセルキャンセルã—ã¾ã—ãŸå€™è£œå€™è£œæ›´æ–°æ–‡å­—コード辞書åã®æ–‡å­—æ•°é¸æŠžè‰²ã‚’é¸æŠžã—ã¦ãã ã•ã„é¸æŠž..クリアキャッシュをクリア検索語ã®ã‚¯ãƒªã‚¢é–‰ã˜ã‚‹è‰²ã‚³ãƒžãƒ³ãƒ‰Webブラウザ起動コマンド動画å†ç”Ÿãƒ—ログラム音声å†ç”Ÿãƒ—ログラム本文コピーã®ã¿ã‚¯ãƒªãƒƒãƒ—ボードã«ã‚³ãƒ”ー著作権表示補正後ã®èªžå°¾ãƒ•ァイル %s ã‚’é–‹ã‘ã¾ã›ã‚“ã€‚ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒæ­£ã—ããªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ファイル %s ã‚’é–‹ã‘ã¾ã›ã‚“ã€‚ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãŒæ­£ã—ããªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚設定ファイルを開ã‘ã¾ã›ã‚“。デフォルトã®å€¤ã‚’使ã„ã¾ã™ã€‚ãƒ•ã‚©ãƒ³ãƒˆã‚’ç¸®å°æ·±ã•è©³ç´°è¾žæ›¸ã‚°ãƒ«ãƒ¼ãƒ—è¾žæ›¸æ¤œç´¢è¾žæ›¸é¸æŠžãƒãƒ¼ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚°ãƒ«ãƒ¼ãƒ—ディレクトリグループ一覧ディレクトリ一覧何もã—ãªã„å…ƒã®å˜èªžã§æ¤œç´¢ã«ãƒ’ットã—ãŸå ´åˆã«ã¯èªžå°¾è£œæ­£ã¯è¡Œã„ã¾ã›ã‚“下ã¸ãƒ€ãƒ³ãƒ—強調表示キーワードを強調表示ã™ã‚‹è¾žæ›¸ãƒœã‚¿ãƒ³ã«è‰²ã‚’ã¤ã‘ã¾ã™ã€‚辞書ボタンã«è‰²ã‚’ã¤ã‘る英語ディレクトリグループã®åå‰ã‚’入力ã—ã¾ã™ã€‚完全一致検索終了行間を拡大拡張å­å¤–部プログラムWebブラウザを起動ã™ã‚‹ãŸã‚ã®ãƒ—ログラムを指定ã—ã¾ã™ã€‚%fã¯URLã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚MPEG動画をå†ç”Ÿã™ã‚‹ãŸã‚ã®ãƒ—ログラムを指定ã—ã¾ã™ã€‚%fã¯ãƒ•ァイルåã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚WAVE音声をå†ç”Ÿã™ã‚‹ãŸã‚ã®ãƒ—ログラムを指定ã—ã¾ã™ã€‚%fã¯ãƒ•ァイルåã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚剿™¯ãƒ‘ターンã®ã‚³ãƒ³ãƒ‘イルã«å¤±æ•—ã—ã¾ã—ãŸã€‚ コマンドを起動ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚設定を確èªã—ã¦ãã ã•ã„。書ç±ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’å–å¾—ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚タイトルをå–å¾—ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚書ç±ä¸€è¦§ã®å–å¾—ã«å¤±æ•—ã—ã¾ã—ãŸã€‚書ç±ãŒé–“é•ã£ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚書ç±ä¸€è¦§ã®å–å¾—ã«å¤±æ•—ã—ã¾ã—ãŸã€‚%s をオープンã§ãã¾ã›ã‚“ã§ã—ãŸã€‚内容を確èªã—ã¦ãã ã•ã„。ã™ã€‚ファイルファイル検索フィルタフィルタコマンドフォントユーザ指定ã«ã‚ˆã‚‹é€šå¸¸æ¤œç´¢ ユーザ指定ã«ã‚ˆã‚‹æ­£è¦è¡¨ç¾æ¤œç´¢ 剿–¹ä¸€è‡´æ¤œç´¢å…¨æ–‡æ¤œç´¢å…¨æ–‡æ¤œç´¢å…¨æ–‡æ¤œç´¢çµåˆæ–‡å­—列ヒストリを戻るヒストリを進む次ã®è¦‹å‡ºã—を表示ã™ã‚‹ã€‚å‰ã®è¦‹å‡ºã—を表示ã™ã‚‹ã€‚ボタンを押ã—ã¦ã‚­ãƒ¼å…¥åŠ›ã‚°ãƒ«ãƒ¼ãƒ—åãƒ˜ãƒ«ãƒ—ä½¿ã„æ–¹ã¯Webブラウザã«è¡¨ç¤ºã•れã¾ã™ã€‚Hexダンプホーム左å³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å°åŒ–Caps Lock キー㨠Num Lock キーを無視ã—ã¾ã™å¤§æ–‡å­—/å°æ–‡å­—を無視ロックキーを無視マッãƒã—ãŸè¡Œã®å‰å¾Œã«ã€ã“ã“ã§æŒ‡å®šã—ãŸè¡Œæ•°åˆ†ãŒè¡¨ç¤ºã•れã¾ã™ã€‚フォントを拡大インターãƒãƒƒãƒˆæ¤œç´¢ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’検索ã™ã‚‹é–“隔を指定ã—ã¾ã™ã€‚ã“ã®æ•°ã‚’å°ã•ãã™ã‚‹ã¨ã‚ˆã‚Šå¤šãã®CPUを使ã†ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚Windowsã§ã¯ç„¡è¦–ã•れã¾ã™ã€‚イタリック設定項目日本語キーキーワードæ¡ä»¶æ¤œç´¢å·¦ãƒªãƒ³ã‚¯ãƒ•ァイル一覧作æˆä¸­...辞書ã®èª­ã¿è¾¼ã¿ä¸­...検索ã®é–“éš”(ミリ秒å˜ä½)手動ã§é¸æŠžæœ€å¤§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºæœ€å¤§æ–‡å­—数表示ã™ã‚‹æ¤œç´¢çµæžœã®æœ€å¤§æ•°æ¤œç´¢ã™ã‚‹æœ€å¤§ãƒ’ット数一度ã«è¡¨ç¤ºã™ã‚‹è¦‹å‡ºã®æœ€å¤§æ•°ã‚’指定ã—ã¾ã™ã€‚ ボタンを使ã£ã¦å‰å¾Œã«ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ウィンドウサイズã‹ã‚‰ã®è‡ªå‹•計算をã—ãªã„ã¨ãã ã‘有効ã§ã™ã€‚検索ã™ã‚‹æœ€å¤§ã®ãƒ’ット数を指定ã—ã¦ãã ã•ã„。 数を増やã™ã¨ã€æ¤œç´¢ã«æ™‚é–“ãŒã‹ã‹ã‚Šã¾ã™ã€‚æ¤œç´¢å±¥æ­´ã«æ®‹ã™æœ€å¤§ã®å˜èªžæ•°ã‚’指定ã—ã¾ã™ã€‚æ¤œç´¢å±¥æ­´ã«æ®‹ã™å˜èªžæ•°ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼æœ€å°æ–‡å­—æ•°ãã®ä»–ãã®ä»–ãƒ ãƒ¼ãƒ“ãƒ¼è¤‡åˆæ¤œç´¢å称次ã®è¾žæ›¸ã‚°ãƒ«ãƒ¼ãƒ—次ã®ãƒ’ãƒƒãƒˆæ¬¡ã®æ¤œç´¢çµæžœæ¬¡ã®é …目ヒットã—ã¾ã›ã‚“ã§ã—ãŸã€‚通常完了ファイルを開ãコマンドオプション...フレーム分割方å‘クリップボードã‹ã‚‰ãƒšãƒ¼ã‚¹ãƒˆãƒ‘ス補正å‰ã®èªžå°¾èªžå°¾è£œæ­£ã‚’行ã†ãŠã¾ã‹ã›æ¤œç´¢ã§å‰æ–¹ä¸€è‡´æ¤œç´¢ã‚’実行ãŠã¾ã‹ã›æ¤œç´¢ã§å‰æ–¹ä¸€è‡´æ¤œç´¢ã‚’行ã„ã¾ã™ã€‚内部ã§éŸ³å£°ã‚’å†ç”Ÿãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåを入力ã—ã¦ãã ã•ã„。検索語を入力ã—ã¦ãã ã•ã„ã€‚è¾žæ›¸ã‚’é¸æŠžã—ã¦ãã ã•ã„ã€‚ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã¦ãã ã•ã„ã‚¦ã‚§ãƒ–ã‚µã‚¤ãƒˆã‚’é¸æŠžã—ã¦ãã ã•ã„。辞書ã®ãƒ‘ã‚¹ã‚’é¸æŠžã—ã¦ãã ã•ã„å称を入力ã—ã¦ãã ã•ã„。å‰ã«ã¤ã‘る文字列を入力ã—ã¦ãã ã•ã„。タイトルを指定ã—ã¦ãã ã•ã„。ãƒãƒƒãƒ—アップã®ã‚µã‚¤ã‚ºå¾Œã‚ã«ã¤ã‘る文字列å‰ã«ã¤ã‘る文字列å‰ã®æ¤œç´¢çµæžœå‰ã®è¾žæ›¸ã‚°ãƒ«ãƒ¼ãƒ—å‰ã®ãƒ’ットå‰ã®é …目押ã™ã¨è¾žæ›¸ãŒæœ‰åйã«ãªã‚Šã¾ã™ã€‚プログラムã®çµ‚äº†å‰Šé™¤çµæžœä¸€è¦§å転表示ã®èƒŒæ™¯å³ã‚µãƒ³ãƒ—ルメインウィンドウを下ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒ¡ã‚¤ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’上ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒ‡ã‚£ã‚¹ã‚¯ã‚’æ¤œç´¢ãƒ¡ã‚¤ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§æ¤œç´¢ãƒ¡ã‚¤ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§æ¤œç´¢ã—å‰é¢ã¸ãƒãƒƒãƒ—ã‚¢ãƒƒãƒ—ã§æ¤œç´¢æ¤œç´¢æ–¹æ³•æ¤œç´¢èªžæ¤œç´¢ã‚¨ãƒ³ã‚¸ãƒ³æ¤œç´¢ã‚¨ãƒ³ã‚¸ãƒ³æ¤œç´¢ä¸­é€šå¸¸ã®æ¤œç´¢èªžãŒå…¥åŠ›ã•れã¾ã—ãŸã€‚ æ­£è¦è¡¨ç¾ãŒå…¥åŠ›ã•れã¾ã—ãŸã€‚ 検索方法:ãŠã¾ã‹ã›æ¤œç´¢æ¤œç´¢æ–¹æ³•:後方一致検索検索方法:完全一致検索検索方法:ファイル検索検索方法:全文一致検索検索方法:インターãƒãƒƒãƒˆæ¤œç´¢æ¤œç´¢æ–¹æ³•:æ¡ä»¶æ¤œç´¢æ¤œç´¢æ–¹æ³•ï¼šè¤‡åˆæ¤œç´¢æ¤œç´¢æ–¹æ³•ï¼šå‰æ–¹ä¸€è‡´æ¤œç´¢è¾žæ›¸ã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã¦ãã ã•ã„ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã¦ãã ã•ã„æ¤œç´¢æ–¹æ³•を指定ã—ã¦ãã ã•ã„ã€‚ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æ¤œç´¢ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã‚’表示ファイルåを表示ヘルプã®è¡¨ç¤ºç”»åƒã‚’インライン表示ã™ã‚‹æ¬¡ã®é …目を表示å‰ã®é …目を表示ãƒãƒƒãƒ—アップã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’表示起動ウィンドウを表示起動時ã«èµ·å‹•ウィンドウを表示ã—ã¾ã™ã€‚ãƒãƒƒãƒ—アップウィンドウã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’表示ã—ã¾ã™ã€‚表示/éžè¡¨ç¤ºè¡Œé–“ã‚’ç¸®å°æ¤œç´¢çµæžœã‚’辞書ã”ã¨ã«è¡¨ç¤ºã‚µã‚¦ãƒ³ãƒ‰ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’指定ã—ã¾ã™ã€‚複数指定ã™ã‚‹å ´åˆã«ã¯æ”¹è¡Œã§åŒºåˆ‡ã‚Šã¾ã™ã€‚検索ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãŸã¨ãˆã° \"/some/dir/name,.txt\" ã¨æŒ‡å®šã™ã‚‹ã¨ã€/some/dir/name ã®ä¸‹ã®ã€æ‹¡å¼µå­ .txt ã®å…¨ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ¤œç´¢ã•れã¾ã™ã€‚最大キャッシュサイズをMBå˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚æ¤œç´¢ã®æ·±ã•を指定ã—ã¦ãã ã•ã„。 0ã¯ãã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ç›´ä¸‹ã ã‘を探ã™ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚è¾žæ›¸é¸æŠžãƒãƒ¼ã®ãƒˆã‚°ãƒ«ãƒœã‚¿ãƒ³ã«è¡¨ç¤ºã™ã‚‹è¾žæ›¸åã®æ–‡å­—数を指定ã—ã¾ã™ã€‚ファイルを開ãデフォルトã®ã‚³ãƒžãƒ³ãƒ‰ãƒ•ァイルをオープンã™ã‚‹ãŸã‚ã®ãƒ—ログラムを指定ã—ã¾ã™ã€‚%f ã¯ãƒ•ァイルåã§ã€%l ã¯è¡Œç•ªå·ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚検索を開始検索を開始ステータスãƒãƒ¼èªžå°¾è£œæ­£ãƒ’ットã—ãªã‹ã£ãŸå ´åˆã®ã¿å‰¯æœ¬ç•ªå·å‰¯æœ¬ç•ªå·ãŒæ­£ã—ãã‚りã¾ã›ã‚“ã€‚ä¸Šä»˜ãæ–‡å­—éš ã—ファイルを表示ã—ãªã„ドットã§å§‹ã¾ã‚‹ãƒ•ァイルを表示ã—ã¾ã›ã‚“。ペイン分割方å‘ã®åˆ‡ã‚Šæ›¿ãˆã‚¿ãƒ–ã®ä½ç½®ãƒ†ã‚­ã‚¹ãƒˆTextダンプ表示ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆè¾žæ›¸é¸æŠžãƒãƒ¼ã®è¡¨ç¤º/éžè¡¨ç¤ºåˆ‡ã‚Šæ›¿ãˆè¾žæ›¸1ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸10ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸2ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸3ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸4ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸5ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸6ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸7ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸8ã®åˆ‡ã‚Šæ›¿ãˆè¾žæ›¸9ã®åˆ‡ã‚Šæ›¿ãˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®è¡¨ç¤º/éžè¡¨ç¤ºåˆ‡ã‚Šæ›¿ãˆã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®è¡¨ç¤º/éžè¡¨ç¤ºåˆ‡ã‚Šæ›¿ãˆãƒ„ール上ツリーペインã®ã‚¿ãƒ–ã“ã“ã«æ¤œç´¢ã—ãŸã„語を入力ã—ã¦ãã ã•ã„ã€‚è¤‡åˆæ¤œç´¢ã¨æ¡ä»¶æ¤œç´¢ã®å ´åˆã«ã¯è¤‡æ•°ã®å˜èªžã‚’å…¥ã‚Œã¦æ§‹ã„ã¾ã›ã‚“。ファイル検索ã®å ´åˆã«ã¯ã€æ¤œç´¢èªžã‹æ­£è¦è¡¨ç¾ã‚’入れã¦ãã ã•ã„。上ã¸ä½¿ã„方内部ルーãƒãƒ³ã‚’使ã£ã¦éŸ³å£°ã‚’生æˆã—ã¾ã™ã€‚Windowsã§ã®ã¿æœ‰åйã§ã™ã€‚上下表示ウェブブラウザãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€å¤§æ–‡å­—ã¨å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã›ã‚“。ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€Xã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è‡ªå‹•çš„ã«æ¤œç´¢ã—ã¾ã™ã€‚ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€Xã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è‡ªå‹•æ¤œç´¢çµæžœã‚’ãƒãƒƒãƒ—アップウィンドウã«è¡¨ç¤ºã—ã¾ã™èªžå°¾ãŒå¤‰åŒ–ã—ã¦ã„ã‚‹å˜èªžãŒã“ã®ãƒªã‚¹ãƒˆã®ãƒ‘ターンã«ãƒžãƒƒãƒã—ãŸå ´åˆã€å…ƒã®å½¢ã§æ¤œç´¢ã‚’行ã„ã¾ã™ã€‚時間ãŒã‹ã‹ã‚Šã¾ã™ã€‚検索語ã®å‰å¾Œã«ã€ã“ã“ã§æŒ‡å®šã—ãŸæ•°ã®æ–‡å­—ãŒè¦‹å‡ºã—ã«è¡¨ç¤ºã•れã¾ã™ã€‚セレクションを検索ã™ã‚‹å ´åˆã®æœ€å¤§ã®æ–‡å­—数を指定ã—ã¾ã™ã€‚ã“ã®æ•°ã‚ˆã‚Šã‚‚大ãã„æ–‡å­—åˆ—ã¯æ¤œç´¢ã•れã¾ã›ã‚“。セレクションを検索ã™ã‚‹å ´åˆã®æœ€å°ã®æ–‡å­—数を指定ã—ã¾ã™ã€‚ã“ã®æ•°ã‚ˆã‚Šã‚‚å°ã•ã„æ–‡å­—åˆ—ã¯æ¤œç´¢ã•れã¾ã›ã‚“。著作権表示完了 ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ªãƒ•ã‚»ãƒƒãƒˆãƒšãƒ¼ã‚¸æ¬¡ã¸æˆ»ã‚‹ebview-0.3.6.2/install-sh0000755000175000017500000003253711241362041014467 0ustar mhattamhatta#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ebview-0.3.6.2/configure.in0000644000175000017500000000322611241636734015002 0ustar mhattamhattadnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) AC_INIT(ebview, 0.3.6.2, http://ebview.sourceforge.net/) AC_CONFIG_SRCDIR(src/ebview.c) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) ALL_LINGUAS="ja" AM_GLIB_GNU_GETTEXT dnl AC_FUNC_SETVBUF_REVERSED dnl Checks for programs. AC_PROG_CC dnl AC_PROG_INSTALL dnl AC_PROG_AWK AC_PROG_LN_S dnl Checks for libraries. PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) PKG_CHECK_MODULES(PANGOX, pangox) AC_SUBST(PANGOX_CFLAGS) AC_SUBST(PANGOX_LIBS) eb_LIB_EB4 dnl Checks for header files. AC_PATH_X AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h sys/time.h unistd.h eb/eb.h iconv.h libintl.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_PROG_GCC_TRADITIONAL AC_C_CONST AC_TYPE_PID_T AC_HEADER_TIME AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SIGNAL dnl Checks for library functions. AC_CHECK_FUNCS(mkdir select strdup strtol) AC_DEFINE_UNQUOTED(LOCALEDIR, "${PREFIX}/share/locale", Where .mo file is.) AC_DEFINE_UNQUOTED(PACKAGEDIR, "${PREFIX}/share/${PACKAGE}", Where EBView data goes.) case "`uname -s`" in CYGWIN_*) THREAD_LIBS=-lpthreadGC ;CYGWIN_CFLAGS="-mno-cygwin -mwindows -mms-bitfields";RES_FILE=ebview.res;EXTRA_LIBS="-lregex -lwinmm" ;; FreeBSD*) THREAD_LIBS=-pthread ;; Linux*) THREAD_LIBS=-lpthread ;; *) THREAD_LIBS=-lpthread ;; esac AC_SUBST(THREAD_LIBS) AC_SUBST(CYGWIN_CFLAGS) AC_SUBST(RES_FILE) AC_SUBST(EXTRA_LIBS) AC_OUTPUT(po/Makefile.in src/Makefile Makefile m4/Makefile data/Makefile doc/Makefile data/about.jp data/about.en) ebview-0.3.6.2/COPYING0000644000175000017500000004307610013675512013524 0ustar mhattamhatta GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ebview-0.3.6.2/config.sub0000644000175000017500000010242511241402747014445 0ustar mhattamhatta#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ebview-0.3.6.2/INSTALL.win320000644000175000017500000001136510013675513014460 0ustar mhattamhattaEBView‚̃Rƒ“ƒpƒCƒ‹(Windows•Ò) *** Œx *** ƒ\[ƒX‚©‚çƒRƒ“ƒpƒCƒ‹‚·‚é‚Ì‚ÍAŠÂ‹«€”õ‚ðŠÜ‚ßA‚ƂĂà‘å•ςł·B‚æ‚قǂ̂±‚Æ‚ª‚È‚¢ŒÀ‚èAƒoƒCƒiƒŠ‚ðŽg‚¤‚Ì‚ª‚¢‚¢‚ÆŽv‚¢‚Ü‚·¡ ************ Windows‚Å‚ÍACygwin‚ðŽg‚Á‚ăRƒ“ƒpƒCƒ‹‚µ‚Ü‚·B‚½‚¾‚µA-mno-cygwin‚ŃRƒ“ƒpƒCƒ‹‚³‚ê‚é‚Ì‚ÅA“®ìŠÂ‹«‚É‚ÍCygwin‚Í•K—v‚ ‚è‚Ü‚¹‚ñBMinGW‚Å‚à‚¢‚¢‚Ì‚©‚à‚µ‚ê‚Ü‚¹‚ñ‚ªAŽŽ‚µ‚Ä‚¢‚Ü‚¹‚ñB ‚±‚Ì‚ ‚½‚è‚ɂ‚¢‚Ä‚ÍA"cygwin mingw"‚ȂǂŃCƒ“ƒ^[ƒlƒbƒg‚ðŒŸõ‚·‚邯A‰ðà‚µ‚Ä‚¢‚éƒy[ƒW‚ª‚ ‚è‚Ü‚·B 1. Cygwin‚̃Cƒ“ƒXƒg[ƒ‹ ˆÈ‰º‚©‚çCygwin‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B http://www.cygwin.com/ ‚¿‚Ȃ݂ÉAŽ„‚ÍGCC‚̓o[ƒWƒ‡ƒ“3‚ł͂Ȃ­Aƒo[ƒWƒ‡ƒ“2.95.3-9‚ðŽg‚Á‚Ä‚¢‚Ü‚·B 2Dƒ‰ƒCƒuƒ‰ƒŠ‚̃Cƒ“ƒXƒg[ƒ‹ ˆÈ‰º‚©‚çGTK‚Ȃǂ̃‰ƒCƒuƒ‰ƒŠˆêŽ®‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B http://www.gimp.org/~tml/gimp/win32/ ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚͂ǂ±‚Å‚à\‚¢‚Ü‚¹‚ñ‚ªAC:\cygwin\usr\local(CygwinŠÂ‹«“à‚Å‚Í /usr/local ‚ɂȂé)‚̉º‚É‚·‚é‚©AC:\gtk ‚Ȃǂ̂悤‚ɕʂ̃fƒBƒŒƒNƒgƒŠ‚É‚µ‚Ü‚·BŽ„‚ÍŒãŽÒ‚Æ‚µ‚Ü‚µ‚½B ‚Ü‚½AˆÈ‰º‚©‚çPOSIX Threads for Win32‚ðŽæ‚Á‚Ä‚«‚ăCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B http://sources.redhat.com/pthreads-win32/ ‚³‚ç‚ÉAˆÈ‰º‚©‚糋K•\Œ»ƒ‰ƒCƒuƒ‰ƒŠ‚ð‚Æ‚Á‚Ä‚«‚Ü‚·B http://www2.odn.ne.jp/munesato/sylpheed/ ‘S•”‚ňȉº‚̃A[ƒJƒCƒu‚ª•K—v‚ɂȂè‚Ü‚·(2003”N6ŒŽ25“úŽž“_)B dirent.zip freetype-2.1.2-1-lib.zip freetype-2.1.2-bin.zip gettext-dev-0.10.40-20020904.zip libiconv-1.8.w32-1.bin.zip libintl-0.10.40-tml-20020904.zip libjpeg-6b-bin.zip libjpeg-6b-lib.zip libpng-1.2.4-1-bin.zip libpng-1.2.4-1-lib.zip pkgconfig-0.14.zip tiff-3.5.7-bin.zip tiff-3.5.7-lib.zip zlib-1.1.4-bin.zip zlib-1.1.4-lib.zip atk-1.0.3-20020821.zip atk-dev-1.0.3-20020821.zip glib-2.2.1.zip glib-dev-2.2.1.zip gtk+-2.2.1.zip gtk+-dev-2.2.1.zip pango-1.2.1.zip pango-dev-1.2.1.zip pthreads-2003-05-10.exe regex-dev-20020423.lzh 3. EB Library‚̃Cƒ“ƒXƒg[ƒ‹ ˆÈ‰º‚©‚çƒ\[ƒX‚ðŽæ‚Á‚Ä‚«‚Ü‚·i‚±‚ê‚ð‘‚¢‚Ä‚¢‚鎞“_‚Å‚Í3.3.2j¡ http://www.sra.co.jp/people/m-kasahr/eb/index-ja.html “K“–‚É“WŠJ‚µ‚Ü‚·Bconfigure‚ðŽÀs‚·‚é‘O‚Ɋ‹«•Ï”‚ðݒ肵‚Ü‚·B export CFLAGS="-mno-cygwin -fnative-struct" export CPPFLAGS="-DWIN32 -DDOS_FILE_PATH -I/cygdrive/c/gtk/include" export LDFLAGS="-L/usr/local/lib -L/cygdrive/c/gtk/lib" export CC=gcc-2 ƒpƒX‚ÍAGTK‚Ȃǂ̃‰ƒCƒuƒ‰ƒŠ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B ƒRƒ“ƒpƒCƒ‹‚µ‚Ü‚·B ./configure make cd eb make install cd .. make eb.conf cp eb.conf /usr/local/etc make‚Ì“r’†‚ÅgetoptŠÖŒW‚̃Gƒ‰[‚ɂȂÁ‚Ä‚àA‚Ƃ肠‚¦‚¸–³Ž‹‚µ‚Ü‚·B 4. EBView‚̃Rƒ“ƒpƒCƒ‹ ˆÈ‰º‚ðŽÀs‚µ‚Ü‚·B ./configure make o—ˆ‚½ƒoƒCƒiƒŠ‚âƒf[ƒ^ƒtƒ@ƒCƒ‹‚ÍA‚±‚̃hƒLƒ…ƒƒ“ƒg‚ÌÅŒã‚É‚ ‚éƒfƒBƒŒƒNƒgƒŠ\¬‚É]‚Á‚ÄAŽè“®‚ŃRƒs[‚µ‚Ü‚·B 5. GTK‚ÌIME—pIMƒ‚ƒWƒ…[ƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B ƒtƒ@ƒCƒ‹‚͈ȉº‚É‚ ‚è‚Ü‚·i‚±‚ê‚ð‘‚¢‚Ä‚¢‚鎞“_‚Å‚ÌÅV‚Í0.0.3jB http://imime.sourceforge.jp/ ’Êí‚É./configure, make‚µ‚Ä‚àDLL‚ª‚Å‚«‚È‚¢‚Ì‚ÅAˆÈ‰º‚̂悤‚ȃVƒFƒ‹ƒXƒNƒŠƒvƒg‚ðì‚Á‚ÄŽÀs‚µ‚Ü‚·B ****** ‚±‚±‚©‚ç****** #!/bin/sh CC=gcc-2 LD=ld DLLTOOL=dlltool DLLNAME=im-ime.dll OBJS="imime.o gtkimcontextime.o" CFLAGS="-I/cygdrive/c/gtk/include -I/cygdrive/c/gtk/include/atk-1.0 -I/cygdrive/c/gtk/include/glib-2.0 -I/cygdrive/c/gtk/include/gtk-2.0 -I/cygdrive/c/gtk/include/pango-1.0 -I/cygdrive/c/gtk/lib/glib-2.0/include -I/cygdrive/c/gtk/lib/gtk-2.0/include -mno-cygwin -fnative-struct" LIBS="-lintl -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -limm32" LDFLAGS="-L/usr/local/lib -L/cygdrive/c/gtk/lib -mno-cygwin -fnative-struct -mwindows" ${CC} -c ${CFLAGS} imime.c ${CC} -c ${CFLAGS} gtkimcontextime.c dlltool --export-all --output-def im-ime.def ${OBJS} dllwrap --target i386-mingw32 --mno-cygwin --export-all --def im-ime.def --driver-name gcc-2 -o im-ime.dll ${OBJS} ${LDFLAGS} ${LIBS} ****** ‚±‚±‚Ü‚Å****** ‚Å‚«‚½im-ime.dll‚ðAlib/gtk-2.0/2.2.0/immodules/ ‚ɃRƒs[‚µA etc/gkt-2.0/gtk.immodules ‚Ɉȉº‚Ìs‚ð’ljÁ‚µ‚Ü‚·B "/target/build/lib/gtk-2.0/2.2.0/immodules/im-ime.dll" "win32ime" "Windows IME" "gtk+" "" "*" ‚Ü‚½‚ÍAƒtƒ@ƒCƒ‹Ž©‘Ì‚ð gtk-query-immodules-2.0.exe ƒRƒ}ƒ“ƒh‚Å쬂µ‚Ü‚·B 6. Windows”ŌŗL‚ÌŽ–€ Windows”łłÍAebview.exe‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Édata‚Æ‚¢‚¤ƒfƒBƒŒƒNƒgƒŠ‚ð쬂µA‚»‚±‚ɃƒbƒZ[ƒWƒJƒ^ƒƒOƒtƒ@ƒCƒ‹Aƒwƒ‹ƒvƒtƒ@ƒCƒ‹Agtkrcƒtƒ@ƒCƒ‹AŠeŽí’è‹`ƒtƒ@ƒCƒ‹‚ð“ü‚ê‚Ü‚·¡—Ⴆ‚ÎAebview.exe‚ðC:\Program Files\ebview‚É“ü‚ê‚éê‡AˆÈ‰º‚̂悤‚ɂȂè‚Ü‚·B C:\Program Files\ebview: ebview.exe C:\Program Files\ebview\data gtkrc about.en about.jp endinglist.xml endinglist-ja.xml searchengines.xml shortcut.xml C:\Program Files\ebview\data\help *.html C:\Program Files\ebview\data\ja\LC_MESSAGES ebview.mo ebview-0.3.6.2/stamp-h0000644000175000017500000000001210013675516013750 0ustar mhattamhattatimestamp ebview-0.3.6.2/doc/0000755000175000017500000000000011241637662013234 5ustar mhattamhattaebview-0.3.6.2/doc/Makefile.am0000644000175000017500000000107710013675512015265 0ustar mhattamhattadir = ja en data = index.html menu.html body.html all: check: all install: dir="$(dir)"; \ for lang in $$dir; do \ if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(pkgdatadir)/help/$$lang; \ else \ $(top_srcdir)/mkinstalldirs $(pkgdatadir)/help/$$lang; \ fi; \ done; \ data="$(data)"; \ for lang in $$dir; do \ for file in $$data; do \ $(INSTALL_DATA) $(srcdir)/$$lang/$$file $(pkgdatadir)/help/$$lang/$$file; \ done; \ done; # Define this as empty until I found a useful application. installcheck: uninstall: rm -fr $(pkgdatadir)/help ebview-0.3.6.2/doc/en/0000755000175000017500000000000011241637135013631 5ustar mhattamhattaebview-0.3.6.2/doc/en/menu.html0000644000175000017500000000005210013675512015455 0ustar mhattamhatta dummy file ebview-0.3.6.2/doc/en/body.html0000644000175000017500000000005210013675512015446 0ustar mhattamhatta dummy file ebview-0.3.6.2/doc/en/index.html0000644000175000017500000004743011241637134015635 0ustar mhattamhattaEBView Manual

How to use EBView 0.3.6.2



1. Introduction
2. Preparation
3. Searching
4. Selection Lookup
5. Stemming
6. Playing Multimedia Data
7. Internet Search
8. Keyboard Shortcuts
9. Customizing the View
10. Remote Commands
11. Other Settings


1. Introduction


EBView is a program to display dictionaries in the EPWING format. Notable feature is :
  • Multi-lexicon retrieval
  • Automatic search of words in the selection buffer
  • Stemming
  • Multimedia support
As it uses Japanese you must set the character locale (LC_CTYPE) to a suitable value (ja_JP.EUC-JP). For example, calling the program as follows "env LC_CTYPE=ja_JP.EUC-JP /usr/bin/ebview".

2. Preparation

Getting Dictionaries


First, one or more dictionaries are necessary to use this software. Both free and commercial dictionaries can be used. You can use dictionaries in the EPWING format, and sometimes in the EB, EBG, EBXA and EBXA-C formats. There are some free dictionaries distributed on the internet. For example, there is a list of "Dictionaries that work with FreePWING" here .
Once you have the dictionaries place them in some suitable directory. If you purchased dictionaries on CD-ROM then the manuals that come with them should tell you how to copy them. Normally, you can just copy the whole CDROM as is. Make sure you DO NOT VIOLATE the copyright restrictions of any dictionaries.

Adding Dictionaries


The first time you use the program, add one or more dictionaries using the "Add/Remove Dictionary" entry from the "Settings" menu. Follow the steps bellow:

1. Add a Dictionary Group

You need to add dictionary group. Put the name in the "Group Name" box and click the "Add" button. "EtoJ" or "JtoE" will be fine.

If you want to use "Selection Lookup" feature, you might want to add a group named "selection". If it exists, EBView will always use this group on Selsction Lookup.


2. Identify Avaliable Dictionaries

Then, identify dictionaries in hard disk. Enter the directory that contains the dictionary information (it should contain a file called or ). Then press the "Search Disk" button and it will read the catalog. You can specify the depth of directories to recursively search using the number next to the directory name. "0" means search no subdirectories.

3. Choose Selected Dictionaries to add to the Dictionary Group

Choose the dictionary or dictionaries to add to the dictionary group and click the "Add" button. You can change the name of the dictionary as you desire.

Now, you can start searching. All the information about setting is stored in a file in a directory called .ebview in the user's home directory.

3. Searching


Here is a steps to search.

The Dictionary Selection Toolbar


The Dictionary Selection Toolbar allows you to choose a dictionary group, and then select which dictionaries will be used from within that group. Only selected dictionaries will be searched. If you want to stop searching one or more dictionaries you can toggle them by pushing their buttons. If a dictionary cannot be found, then its button cannot be pushed. In this case, check whether the dictionary file still exists or if its CD-ROM has been mounted. You can change how many characters of the dictionary names appear on the buttons using the Settings/Misc/Bytes in Dictionary Bar.

The Search Toolbar


You can choose the search method either from the search menu or the toolbar. Bellow is the meaning of each methods.

Search Method
Meaning
Automatic Search
Execute both "Exactword Search" and "Keyword Search".
Exectword Search
Entries which exactly matches the search word will be listed.
Forward Search
Entries beginning with the search word will be listed. For example, when you enter "difficult" as search word, it matches both "difficult" and "difficulty".
Backward Search
Entries end in the search word will be listed. For example, when you enter "tist" as search word, it matches "dentist" and "systematist" etc.
Keyword Search
This enables you to specify multiple words, then entries which contain all the words will be listed. For example, when you enter "grow" and "up" , it may matches "grow up".
Multiword Search
This also enables you to specify multiple words, but each words has a meaning. You may also choose words from the list if available.
Full Text Search
This lists all the entries which contains search word in its content. It takes times since EBView has to read whole dictionary.
Internet Search
Lanuch external Web browser to search keywords from Internet.
Menu
Show menu data if available.
Copyright
Show copyright information if available.


Entering Search Words


Then you should enter a keyword or space-separated keywords in the text box and hit the enter key, or click the search icon.

Search Result


A list of hits will be displayed in the box on the left of the result frame. The detailed informaiton of the first result will be displayed on the right. You can see more information about other entries by selecting them from the hit list. You can also move up and down the list using shortcut key. When there are so manyu hits, only limited number of hits will be listed. You can tune this number with [Settings]->[Misc]->"Maximum hits to display".

Jumping


Some words are highlighted in blue in the search results. These are hyperlinks to other entries in the dictionary. Your cursor should change as it passes over them, and if you click the left mouse button, you can jump to the hyperlinked entry. Your search history is stored, so you can go back using the back button and then forward again using the forward button.

Selecting Content


You can choose the index word using the mouse to mark a region (such as by dragging the mouse accross a word or double clicking on it). Double clicking will choose all characters of the same type around the cursor (where type is hiragana/katakana or kanji). For example, in the text "¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Ï..." (This software-TOPIC) if you click on the "¥¦" it will select "¥½¥Õ¥È¥¦¥§¥¢" (software). In the same way, for the text "¼­½ñ¤ÎÄɲäȺï½ü", clicking on "ÄÉ" will select "ÄɲÃ".
The selected text will be placed in the X-selection, so you can paste it into other applications by clicking the middle button (assuming that "Selection Lookup" is off).

Clicking the right button gives a menu with three options: + Search Selected Word + Copy to Clipboard (Ctrl-C) + Display - Menubar - Dictionary Selection Toolbar - Statusbar If you choose "search selected word", EBview will search for the selected word. If you choose "copy to clipboard" the selected word will be copied to the clipboard. You can also do this by hitting Ctrl-c (Holding down the control key and pressing "c"). Once a word is in the clipboard, you can then paste it into other applications (for example using Ctrl-v, or Ctrl-y in emacs. How to paste depends on the application).

4. Selection Lookup


Selection lookup makes it possible to look up words automatically even from other applications. For example, you can look up unknown words as you are browsing.
In general, in order not to get too many useless lookups, it is a good idea to choose "exact match" as the search method, and not select too many dictionaries.

If a dictionary group named "selection" exists, EBView will use that group regardless of the current group.

In addition to getting results in the EBView result window, you can choose to display them in a pop-up window. To do this you must select both "selection lookup" and "pop-up display".
Mouse operation on popup display:
Left Button Close popup window.
Middle Button Back to previous hits.
Right Button Go to next hits.

Clicking on hypertext links with the left button works normally, clicking anywhere else with the left button closes the pop-up window.
You can't look up the same word twice using selection lookup. If you want to look a word up again, you must first select something else, and then select the word you want to look up again.

5. Stemming


When looking up inflected words, such as "dictionaries", we need to search for the base form: "dictionary". The user can check each word and convert them as necessary,but this is tedious and inconvenient for automatic lookup of the X-selection. So, EBview automatically stems inflected words, so that it can lookup the base form. We call this feature "stemming". You can let EBView to only stem if the original form could not be found (this is the default).
EBview looks at the end of a word, and if it matches a set of patterns, converts it to the base form. Therefore, if you turn stemming on, lookup takes more time. You can turn stemming on or off, and customize the patterns used in the Settings menu, Stemming sub-menu. Adding many patterns makes the lookup very slow, so be careful. You can also change the order in which patterns match by dragging and dropping patterns in the Stemming Setting box.
Starting from version 0.1.6, EBView performs stemming for Japanese words. For example, when you specify ¡Ö½Ð¤é¤ì¤Ê¤¤¡× as search word,¡Ö½Ð¤ë¡× will hit. Algorithm used in Japanese stemming is almost the same as that of English, there is a slight difference. When normal stemming resulted in no hit, then EBView will try searching with kanji characters in keyword. Yor cannot customize Japanese stemming pattern for the present.

6. Playing Multimedia Data


EBView supports multimedia data such as sound and movie. References to such data are shown green charancter. Your cursor should change as it passes over them, and if you click the left mouse button, you can play sound or movie.

EBView uses external program to play multimedia, so you need to specify programs which are capable to play actual data. Open [Settings]->[External Program] and enter the name of external program. For example, "playwave %f" for sound. %f is mandatory. Prior to lanuch external program, EBView will store multimedia data to temporally file. %f will be replaced by temporally file internally.

7. Internet Search


EBView can launch external browser to perform searching by Internet Search Engines. It is convenient when you cannot find desired information from your local dctionary, or you want to perform internet search on multiple search engines.

Choose "Internet Search" as search method. Search engines are listed in left frame. Choose one of them, enter keywords, press enter key or start button. Double click on search engine name will also start search. Right clicking on search engine name will popup menus. You can jump to Homepage from here. You may need this when you want to specify detailed optional parameter.

If nothing happens, please check command to launch browser. [Settings]->[External Program] has an entry. Example is "gnome-moz-remote %f". %f is mandatory and will be replaced by URL.

You can customize the list of search engine in [Settings]->[Search Engines]. Final URL will be the conjunction of "Pre string" and keyword and "Post string". If you specify multiple words, each words will be concatenated with "Glue string". Character code of keyword will be converted to specified code, as some search engine requires specific character code. Please note that you can only use search engine which uses "get" method rather than "post" method.

Some search engines such as "±Ñ¼­Ïº on the Web" prohibits these kind of searching. They only permits access from its Homepage.

8. Keyboard shortcuts


You can assign keyboard shortcuts to some function, such as selecting dictionary group. Multiple shortcuts will be assigned to a function. Here is a default shortcuts:

Key
Function
F1 Choose Automatic Search
F2 Choose Exactword Search
F3
Choose Forward Search
F4
Choose Endword Search
F5
Choose Keyword Search
F6
Choose Mutiword Search
F7
Choose Full Text Search
F8
Choose Internet Search
Return Start searching
Escape clear keywords
Ctrl + p
Previous hit
Ctrl + n Next hit
Ctrl + c
Copy to clipboard
Ctrl + h
Show help
Ctrl + q
Quit program
Ctrl + Up
Choose previous dictionary group
Ctrl + Down
Choose next dictionary group
Ctrl + Number
Toggle Xth dictionary
Alt + Left
Go back in history
Alt + Right
Go forward in history

You can cosutomize shortcuts in [Settings]->[Shortcut] Enter key combination, choose command, then press [Add] button.

9. Customizing the View


You can toggle the display of the following toolbars from the View Menu:

  • Menubar
  • Dictionary Selection Toolbar
  • Statusbar
You can also toggle them from a context menu that pops up with a right button click. This is the only way to get the menubar back if you toggle it off.

10. Remote Commands


You can send commands to already running EBView and let it perform some action. You may, for example, assign commands as shortcut for Window Manager or other programs. "ebview-client" is the program to send commands to EBView. Specifying function as a parameter to this client program will let EBView perform it. If there is no EBView running, client program first lanuch one. Formats of parameters are as follows.

ebview-remote --search keywords
Perform search with specified parameter. You can pass space-separated words.

ebview-remote --selection
Perform selection lookup only once.

ebview-remote --popup
Perform selection lookup only once. Result will be shown in popup window.

11. Other Settings

Fonts

Fonts can be customized from [Settings]->[Font]. EBView automatically chooses the size of book-specific (Gaiji) font. Even so, 14 - 16 pt is recommended. Some dictionary only have 16 dot book-specific font.

If you want to use different fonts for different encodings, you can specify comma-separated fonts to construct fontset.

Size Of Popup Window

You can change the size of popup window. As a rule, popup window will be shown at right buttom of the mouse location. EBView moves the popup window when it does not fit in screen.





ebview-0.3.6.2/doc/Makefile.in0000644000175000017500000002517711241636761015314 0ustar mhattamhatta# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 \ $(top_srcdir)/m4/glib-gettext.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FGREP = @FGREP@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOX_CFLAGS = @PANGOX_CFLAGS@ PANGOX_LIBS = @PANGOX_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dir = ja en data = index.html menu.html body.html all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install-exec: install-exec-am install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am all: check: all install: dir="$(dir)"; \ for lang in $$dir; do \ if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(pkgdatadir)/help/$$lang; \ else \ $(top_srcdir)/mkinstalldirs $(pkgdatadir)/help/$$lang; \ fi; \ done; \ data="$(data)"; \ for lang in $$dir; do \ for file in $$data; do \ $(INSTALL_DATA) $(srcdir)/$$lang/$$file $(pkgdatadir)/help/$$lang/$$file; \ done; \ done; # Define this as empty until I found a useful application. installcheck: uninstall: rm -fr $(pkgdatadir)/help # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/doc/ja/0000755000175000017500000000000011241637444013624 5ustar mhattamhattaebview-0.3.6.2/doc/ja/menu.html0000644000175000017500000001005410015070533015442 0ustar mhattamhatta EBView ¥Þ¥Ë¥å¥¢¥ë(¥á¥Ë¥å¡¼)

Ìܼ¡

¤Ï¤¸¤á¤Ë

¼­½ñ¤Î½àÈ÷

¼­½ñ¥°¥ë¡¼¥×¤ÎÄêµÁ

´ðËÜŪ¤Ê¸¡º÷

¸¡º÷·ë²Ì¤Îɽ¼¨

¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷

¸ìÈø¤Î¼«Æ°ÊäÀµ

¥Õ¥¡¥¤¥ë¸¡º÷

¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷

¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È

²èÌ̤Υ«¥¹¥¿¥Þ¥¤¥º

¥«¥¹¥¿¥Þ¥¤¥º

¥é¥¤¥»¥ó¥¹¡¦ÌÈÀÕ»ö¹à

¼Õ¼­

ºî¼Ô¤Ø¤ÎÏ¢ÍíÀè


ebview-0.3.6.2/doc/ja/body.html0000644000175000017500000015303211241637443015452 0ustar mhattamhatta EBView ¥Þ¥Ë¥å¥¢¥ë

EBView ¥Þ¥Ë¥å¥¢¥ë

ver 0.3.6.2




¡¡

1. ¤Ï¤¸¤á¤Ë

¡¡


EBView ¤Ï¡¢Linux¡¢FreeBSD¡¢Windows¤Çưºî¤¹¤ë EPWING ¼­½ñ¥Ö¥é¥¦¥¶¤Ç¡¢°Ê²¼¤ÎÆÃħ¤¬¤¢¤ê¤Þ¤¹¡£


EPWING ¼­½ñ¤Î¸¡º÷

  • ¶ú»É¤·¸¡º÷
    °ìÅÙ¤ËÊ£¿ô¤Î¼­½ñ¤ò¸¡º÷¤·¤Þ¤¹¡£¼­½ñ¤Ï¥°¥ë¡¼¥×²½¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¤Î¤Ç¡¢Â¿¿ô¤Î¼­½ñ¤ò°·¤¦¾ì¹ç¤Ç¤âÂç¾æÉפǤ¹¡£¤Þ¤¿¡¢¸¡º÷·ë²Ì¤ä¥Ü¥¿¥ó¤Ë¿§¤òÉÕ¤±¤é¤ì¤ë¤¿¤á¡¢¤É¤Î¼­½ñ¤Î¸¡º÷·ë²Ì¤Ê¤Î¤«¤¬°ìÌܤÇʬ¤«¤ê¤Þ¤¹¡£
  • ¸ìÈøÊäÀµ
    ±Ññ¸ì¤Î²áµî·Á¤äÊ£¿ô·Á¡¢ÆüËܸì¤Î³èÍѤʤɤâÀµ¤·¤¯¸¡º÷¤µ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¡Östudies¡×¤Ï¡Östudy¡×¤Ë¡¢¡Ö¸«¤ì¤Ð¡×¤Ï¡Ö¸«¤ë¡×¤Ë¥Ò¥Ã¥È¤·¤Þ¤¹¡£
  • ¥Þ¥ë¥Á¥á¥Ç¥£¥¢¥Ç¡¼¥¿¤Î¥µ¥Ý¡¼¥È
    ¥â¥Î¥¯¥í²èÁü¡¢¥«¥é¡¼²èÁü¡¢²»À¼¡¢Æ°²è¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
  • ¿ºÌ¤Ê¸¡º÷ÊýË¡
    ¸¡º÷ÊýË¡¤È¤·¤Æ¤Ï¡¢Á°Êý°ìÃס¢¸åÊý°ìÃס¢´°Á´°ìÃס¢¾ò·ï°ìÃס¢Ê£¹ç¸¡º÷¤Ë²Ã¤¨¤Æ¡¢¤ª¤Þ¤«¤»¸¡º÷¡¢Á´Ê¸°ìÃ׸¡º÷¤âÍѰդµ¤ì¤Æ¤¤¤Þ¤¹¡£

¥Õ¥¡¥¤¥ë¸¡º÷

¥Õ¥¡¥¤¥ë¤«¤é¤Î¸¡º÷¤¬ GUI Áàºî¤Ç¹Ô¤Ê¤¨¤Þ¤¹¡£Ê¸»úÎó¤Î¸¡º÷¤Ï°ìÈÌŪ¤Ê grep ¤è¤ê¤â¹â®¤Ç¤¹¡£¥Õ¥£¥ë¥¿¤òÄêµÁ¤¹¤ì¤Ð¡¢¥Æ¥­¥¹¥È·Á¼°°Ê³°¤Î¥Õ¥¡¥¤¥ë¤Ç¤â¸¡º÷¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£Àµµ¬É½¸½¤â»È¤¨¡¢ÆüËܸì¤Îʸ»ú¥³¡¼¥É¤Ï¼«Æ°Åª¤Ëǧ¼±¤µ¤ì¤Þ¤¹¡£

¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷

¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î¸¡º÷¥¨¥ó¥¸¥ó¤òÅÐÏ¿¤·¤Æ¤ª¤±¤Ð¡¢¤¤¤Á¤¤¤Á¥Ö¥é¥¦¥¶¤Ç¥­¡¼¥ï¡¼¥É¤òÆþÎϤ·Ä¾¤¹É¬Íפ¬¤¢¤ê¤Þ¤»¤ó¡£¼ê»ý¤Á¤Î¼­½ñ¤Ë¤ÏɬÍפʾðÊ󤬺ܤäƤ¤¤Ê¤¤¾ì¹ç¤Ë¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î¼­½ñ¤Ç¸¡º÷¤·¤¿¤ê¡¢¥µ¡¼¥Á¥¨¥ó¥¸¥ó¤Ç¸¡º÷¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¤½¤Î¾¤ÎÊØÍø¤Êµ¡Ç½

  • X¥»¥ì¥¯¥·¥ç¥ó(*1)¤Î¼«Æ°¸¡º÷¤È¥Ý¥Ã¥×¥¢¥Ã¥×ɽ¼¨
    ¥Þ¥¦¥¹¤ÇÁªÂò¤·¤¿Ã±¸ì¤Î¼«Æ°¸¡º÷¤¬²Äǽ¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢Web ¥Ö¥é¥¦¥¶¤Ç±Ñʸ¥Ú¡¼¥¸¤òÆÉ¤ó¤Ç¤¤¤ë¤È¤­¤Ë¡¢Ê¬¤«¤é¤Ê¤¤Ã±¸ì¤òȿž¤µ¤»¤ë¤À¤±¤Ç¡¢¤½¤Îñ¸ì¤¬¼«Æ°Åª¤Ë¸¡º÷¤µ¤ì¤Þ¤¹¡£ ¸¡º÷·ë²Ì¤Ï¥Þ¥¦¥¹¤Î°ÌÃ֤˥ݥåץ¢¥Ã¥×ɽ¼¨¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£

    (*1) Windows¤Ç¤Ï¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Î¸¡º÷¤Ç¤¹¡£
  • ¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È
    ¤Û¤È¤ó¤É¤ÎÁàºî¤Ë¤Ï¡¢¼«Í³¤Ë¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
EBView ¤Ï¡¢EB ¥é¥¤¥Ö¥é¥ê ¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£

2. ¼­½ñ¤Î½àÈ÷

¡¡

EBView ¤ò»ÈÍѤ¹¤ë¤Ë¤Ï¼­½ñ¥Ç¡¼¥¿¤¬É¬ÍפǤ¹¡£¼­½ñ¤Ë¤Ï CD-ROM Åù¤Ç»ÔÈΤµ¤ì¤Æ¤¤¤ë¤â¤Î¤ä¡¢ÌµÎÁ¤ÇÍøÍѤǤ­¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£

2.1 »ÔÈΤμ­½ñ


»ÔÈΤμ­½ñ¤Î¾ì¹ç¤Ë¤Ï¡¢EPWING¡¢EB¡¢EBG¡¢EBXA¡¢EBXA-C ·Á¼°¤Î¼­½ñ¤¬ÍøÍѤǤ­¤Þ¤¹¡£¤³¤ì°Ê³°¤Î·Á¼°¤Ç¤â¡¢ÊÑ´¹¤¹¤ë¤³¤È¤ÇÍøÍѤǤ­¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£

EPWING ·Á¼°¤Î¼­½ñ¤ò¹ØÆþ¤·¤¿¤é¡¢¥Ï¡¼¥É¥Ç¥£¥¹¥¯¤ÎŬÅö¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥³¥Ô¡¼¤·¤Þ¤¹¡£´ðËÜŪ¤Ë¤ÏÁ´ÂΤò¥³¥Ô¡¼¤¹¤ë¤³¤È¤Ë¤Ê¤ë¤È»× ¤¤¤Þ¤¹¤¬¡¢¥³¥Ô¡¼¼ê½ç¤¬¥Þ¥Ë¥å¥¢¥ë¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¤½¤ì¤Ë½¾¤Ã¤Æ²¼¤µ¤¤¡£¤Þ¤¿¡¢¼­½ñ¤Ë¤è¤Ã¤Æ¤Ï¥Ï¡¼¥É¥Ç¥£¥¹¥¯¤Ø¤Î¥³¥Ô¡¼¤ò¶Ø»ß¡¦À©¸Â¤·¤Æ¤¤¤ë¤â¤Î¤â¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤´Ãí°Õ¤¯¤À¤µ¤¤¡£

2.2 ¥Õ¥ê¡¼¤Ê¼­½ñ


̵ÎÁ¤ÇÍøÍѤǤ­¤ë¼­½ñ¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ÇÇÛÉÛ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¤³¤Î¥Ú¡¼¥¸¤«¤é¤Ï¡¢EPWING ·Á¼°¤Î¤µ¤Þ¤¶¤Þ¤Ê¼­½ñ¤òÆþ¼ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ºÆÇÛÉÛ¤¬¶Ø»ß¤µ¤ì¤Æ¤¤¤ë¼­½ñ¤Ï¡¢¸µ¤È¤Ê¤ë¥Ç¡¼¥¿¤òÆþ¼ê¤·¤Æ¡¢¼¡¤Ë½Ò¤Ù¤ëÊýË¡¤ÇÊÑ´¹¤·¤Þ¤¹¡£

2.3 ¥Õ¥¡¥¤¥ë·Á¼°¤ÎÊÑ´¹

³¤³°¤Î¼­½ñ¤Î¤Û¤È¤ó¤É¤Ï EPWING ·Á¼°¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢¡Ö¥í¥ó¥°¥Þ¥ó¸½Âå±Ñ±Ñ¼­Åµ¡×¡¢¡ÖCollins COBUILD on CD-ROM¡×¤Ê¤É¤¬¤³¤ì¤Ë³ºÅö¤·¤Þ¤¹¡£¤Þ¤¿¡¢¡Ö±Ñ¼­Ïº¡×¥·¥ê¡¼¥º¤Ê¤É¤â EPWING ·Á¼°¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤³¤ì¤é¤Î CD-ROM ¤Ë¤Ï¡¢¤¿¤¤¤Æ¤¤ÀìÍѤΥ½¥Õ¥È¥¦¥§¥¢¤¬ÉÕ°¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤¤¤í¤¤¤í¤Ê¼­½ñ¤ò»²¾È¤¹¤ëɬÍפ¬¤¢¤ë¿Í¤Ï¡¢¤¤¤¯¤Ä¤â¤ÎÀìÍÑ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òµ¯Æ°¤¹¤ë ¤³¤È¤Ë¤Ê¤ê¡¢¤È¤Æ¤âÌÌÅݤǤ¹¡£

¼­½ñ¤ò EPWING ·Á¼°¤ËÊÑ´¹¤·¤Æ¤·¤Þ¤¨¤Ð¡¢EBView¤Ç°ì³ç¤·¤Æ¸¡º÷¤Ç¤­¤ë¤¿¤á¡¢¤È¤Æ¤âÊØÍø¤Ç¤¹¡£¥Ç¡¼¥¿¤ò EPWING ¤ËÊÑ´¹¤¹¤ë¤¿¤á¤Î¥½¥Õ¥È¥¦¥§¥¢¤È¤·¤Æ¤Ï¡¢¡ÖFreePWING¡×¤È¡ÖEBStudio¡×¤¬¤¢¤ê¤Þ¤¹¡£

FreePWING
JIS-X4081 ·Á¼°¤Î½ñÀҥǡ¼¥¿¤ÎÀ¸À®¤ò¹Ô¤¦¥½¥Õ¥È¥¦¥§¥¢¤Ç¡¢¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£
http://www.sra.co.jp/people/m-kasahr/freepwing/

EBStudio
JIS-X4081 (EPWING¤Î¥µ¥Ö¥»¥Ã¥È) ¤Þ¤¿¤ÏÅŻҥ֥寷Á¼°¤Ç¸Ä¿ÍÍÑÅÓ¤ÎÅŻҼ­½ñ¡¦ÅŻҽñÀÒ¤òºîÀ®¤¹¤ë¥Ä¡¼¥ë¤Ç¤¹¡£Windows ÍѤΥ·¥§¥¢¥¦¥§¥¢¤Ç¤¹¡£Á°Êý°ìÃ׸¡º÷¤À¤±¤Ê¤é̵ÎÁ¤ÇÍøÍѤǤ­¤Þ¤¹¡£
http://www31.ocn.ne.jp/~h_ishida/


ÊÑ´¹ÊýË¡¤Ê¤É¤Ë¤Ä¤¤¤Æ¤Ï¡¢°Ê²¼¤Î¥Ú¡¼¥¸¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£

FreePWING ¤Ë¤è¤ë³Æ¼ï¼­½ñ

EBStudio¡¦ÊÑ´¹¥¹¥¯¥ê¥×¥È½¸

UNIX¤ÇÅŻҼ­½ñ¤ò¤·¤ã¤Ö¤ê¤Ä¤¯¤½¤¦


Ãí : ÊÑ´¹¥Ç¡¼¥¿¤ÏÃøºî¸¢¤ò¿¯³²¤¹¤ë¶²¤ì¤¬¤¢¤ê¤Þ¤¹¡£»ÈÍѤϸĿͤÎÈÏ°Ï¤Ë¤È¤É¤á¤Æ¤¯¤À¤µ¤¤¡£

3. ¼­½ñ¥°¥ë¡¼¥×¤ÎÄêµÁ

¡¡

¼­½ñ¤Î½àÈ÷¤¬¤Ç¤­¤¿¤é¡¢¼­½ñ¥°¥ë¡¼¥×¤òÄêµÁ¤·¤Þ¤¹¡£

¼ê½ç¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£

  1. ÀßÄê²èÌ̤ò³«¤¯

    EBView ¤òµ¯Æ°¤·¡¢¥á¥Ë¥å¡¼¤«¤é[¥Ä¡¼¥ë]¢ª[¥ª¥×¥·¥ç¥ó...]¥á¥Ë¥å¡¼¤ò¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£ÀßÄꥦ¥£¥ó¥É¥¦¤¬³«¤­¤Þ¤¹¤Î¤Ç¡¢[¼­½ñ¸¡º÷]->[¼­½ñ¥°¥ë¡¼¥×]¤òÁªÂò¤·¤Þ¤¹¡£

  2. ¼­½ñ¥°¥ë¡¼¥×¤ÎºîÀ®

    ¼­½ñ¤òʬÎह¤ë¤¿¤á¤Î¼­½ñ¥°¥ë¡¼¥×¤òºî¤ê¤Þ¤¹¡£¼­½ñ¥°¥ë¡¼¥×¤Ïɬ¤º 1 ¤Ä°Ê¾åºî¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥À¥¤¥¢¥í¥°¤Îº¸Â¦¤Î[¥°¥ë¡¼¥×̾]¤È¤¤¤¦ÆþÎϥܥ寥¹¤Ë̾¾Î¤òÆþÎϤ·¡¢[ÄɲÃ]¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£¡Ö±ÑÏ¡ס¢¡Öϱѡפʤɡ¢¼­ ½ñ¤Î¼ïÎà¤ÇʬÎह¤ë¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡£

    ¤Ê¤ª¡¢"selection" ¤È¤¤¤¦¥°¥ë¡¼¥×¤òºî¤Ã¤Æ¤ª¤¯¤È¡¢¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤ÎºÝ¤Ë¡¢ÁªÂò¤µ¤ì¤Æ¤¤¤ë¼­½ñ¥°¥ë¡¼¥×¤Ë´Ø·¸¤Ê¤¯¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤Î¼­½ñ¤¬»È¤ï¤ì¤Þ¤¹¡£

  3. ¥Ç¥£¥¹¥¯¾å¤Î¼­½ñ¤Î¸¡º÷

    ¥Ç¥£¥¹¥¯¤«¤é¼­½ñ¤ò¸¡º÷¤·¤Þ¤¹¡£[¥Ç¥£¥ì¥¯¥È¥ê̾] ¤È¤¤¤¦ÆþÎϥܥ寥¹¤Ë¡¢¸¡º÷¤¹¤ë¥È¥Ã¥×¥Ç¥£¥ì¥¯¥È¥ê̾¤òÆþÎϤ·¡¢[¥Ç¥£¥¹¥¯¤ò¸¡º÷] ¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£¤¹¤ë¤È¡¢»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¤«¤é¼­½ñ¤¬¸¡º÷¤µ¤ì¤Þ¤¹¡£¸¡º÷¤Ï¡¢»ØÄꤷ¤¿¿¼¤µ¤Þ¤Ç¹Ô¤ï¤ì¡¢catalog ¤â¤·¤¯¤Ï catalogs ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ë¤È¼­½ñ¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£¿¼¤µ 0 ¤Ï»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤À¤± (¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤Ï´Þ¤Þ¤Ê¤¤) ¤ò¸¡º÷¤¹¤ë¤³¤È¤ò¼¨¤·¤Þ¤¹¡£¼­½ñ¤¬¸«¤Ä¤«¤é¤Ê¤¤¤È¤­¤Ï¡¢¿¼¤µ¤òÄ´Àᤷ¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£

    ¸¡º÷¤¬½ª¤ï¤ë¤È¡¢¡ÖDisk Search Result¡×¤È¤¤¤¦Ì¾Á°¤Î¥°¥ë¡¼¥×¤¬ºîÀ®¤µ¤ì¡¢¸«¤Ä¤«¤Ã¤¿¼­½ñ¤¬¤½¤ÎÃæ¤ËÅÐÏ¿¤µ¤ì¤Þ¤¹¡£

  4. ¸¡º÷¤·¤¿¼­½ñ¤Î¥°¥ë¡¼¥×¤Ø¤ÎÄɲÃ

    ¸¡º÷¤·¤¿¼­½ñ¤òÁªÂò¤·¡¢¡Ö¾å¤Ø¡×¤Þ¤¿¤Ï¡Ö²¼¤Ø¡×¥Ü¥¿¥ó¤ò»È¤Ã¤Æ¡¢2. ¤Çºî¤Ã¤¿¼­½ñ¥°¥ë¡¼¥×¤Ë°Üư¤·¤Þ¤¹¡£Æ±¤¸¤Î¼­½ñ¤òÊ£¿ô¤Î¥°¥ë¡¼¥×¤ËÅÐÏ¿¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£¤Þ¤¿¡¢¼­½ñ¤ä¼­½ñ¥°¥ë¡¼¥×¤ò¥É ¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤Ç°Üư¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹(¶õ¤Î¼­½ñ¥°¥ë¡¼¥×¤Ë¤Ï¥É¥í¥Ã¥×¤Ç¤­¤Þ¤»¤ó)¡£
  5. ̾Á°¤ÎÊѹ¹¤È Appendix ¤Î»ØÄê

    ¼­½ñ¤Î̾Á°¤Ï¡¢¥Ç¥£¥¹¥¯¤«¤é¸¡º÷¤·¤¿Ä¾¸å¤Ï¼­½ñ¥Ç¡¼¥¿¤ÇÄêµÁ¤µ¤ì¤¿Ì¾Á°¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢¼«Í³¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤³¤Ç»ØÄꤷ¤¿Ì¾Á°¤Ï¡¢¼­½ñ¤Î¥Ü¥¿¥ó¤È¸¡º÷·ë²Ì¤Î°ìÍ÷¤Ç»È¤ï¤ì¤Þ¤¹¡£¼­½ñ¥Ç¡¼¥¿¼«ÂΤ¬Êѹ¹¤µ¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥Ä¥ê¡¼²èÌ̾å¤Ç¼­½ñ̾¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢±¦Â¦¤Î¥Ü¥Ã¥¯¥¹¤Ë¤½¤Î¾ÜºÙ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤³¤³¤Ç̾Á°¤äAppendix (*1) ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹¡¢ÉûËÜÈÖ¹æ¤Ê¤É¤òÆþÎϤ·¤Þ¤¹¡£

    ¤Þ¤¿¡¢¼­½ñ¤Ë¤Ï¿§¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤³¤Ç»ØÄꤷ¤¿¿§¤Ï¡¢¼­½ñ¤Î¥Ü¥¿¥ó¤È¸¡º÷·ë²Ì¤Î°ìÍ÷¤Ç»È¤ï¤ì¤Þ¤¹¡£

(*1) Appendix ¤È¤Ï¡¢ ¼­½ñ¤Î¶èÀÚ¤ê¥Ç¡¼¥¿¤Ê¤É¤¬Æþ¤Ã¤¿¥Õ¥¡¥¤¥ë¤Ç¡¢ËÜʸ¤¬Àµ¤·¤¯É½¼¨¤µ¤ì¤Ê¤¤¾ì¹ç¤Ê¤É¤Ë»ÈÍѤ¹¤ë¤È¡¢²þÁ±¤µ¤ì¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£Appendix ¥Ç¡¼¥¿¤Ï¤³¤³¤« ¤éÆþ¼ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£


°Ê¾å¤Ç½àÈ÷¤Ï´°Î»¤Ç¤¹¡£

4. ´ðËÜŪ¤Ê¸¡º÷


¸¡º÷¤ò¹Ô¤¦¼ê½ç¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
  1. ¼­½ñ¤ÎÁªÂò
  2. ¸¡º÷ÊýË¡¤ÎÁªÂò
  3. ¸¡º÷¸ì¤ÎÆþÎÏ
  4. ¸¡º÷¤Î³«»Ï

4.1 ¼­½ñ¤ÎÁªÂò


»ÈÍѤ·¤¿¤¤¼­½ñ¥°¥ë¡¼¥×¤ò¡¢ ¼­½ñÁªÂò¥Ð¡¼¤«¤éÁªÂò¤·¤Þ¤¹¡£¤¹¤ë¤È¡¢¤½¤Î¥°¥ë¡¼¥×¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¼­½ñ¤Î°ìÍ÷¤¬¥Ü¥¿¥ó¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£¥Ü¥¿¥ó¤Î¾õÂ֤ˤè¤ê¼­½ñ¤Î»ÈÍѤÈÉÔ»ÈÍѤ¬ÀÚ¤ê ÂØ¤ï¤ê¤Þ¤¹¡£¥Ü¥¿¥ó¤¬²¡¤µ¤ì¤¿¾õÂ֤Ϥ½¤Î¼­½ñ¤ò¸¡º÷¤Ç»È¤¦¤³¤È¤ò¼¨¤·¡¢²¡¤µ¤ì¤Æ¤¤¤Ê¤¤¾õÂ֤Ϥ½¤Î¼­½ñ¤ò¸¡º÷¤Ç»È¤ï¤Ê¤¤¤³¤È¤ò¼¨¤·¤Þ¤¹¡£¤Ê¤ª¡¢¥Ü¥¿¥ó¤¬²¡¤» ¤Ê¤¤¾õÂ֤ˤʤäƤ¤¤ë¤â¤Î¤Ë¤Ä¤¤¤Æ¤Ï¡¢¤½¤Î¼­½ñ¤ÎÆÉ¤ß¤³¤ß¤Ë¼ºÇÔ¤·¤¿¤³¤È¤ò¼¨¤·¤Þ¤¹¡£¼­½ñ¤¬ºï½ü¤µ¤ì¤¿¤«¡¢CD-ROM ¤¬¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Ê¤É¤Î¸¶°ø¤¬¹Í¤¨¤é¤ì¤Þ¤¹¡£¤Ê¤ª¡¢³Æ¥Ü¥¿¥ó¤Ëɽ¼¨¤¹¤ëʸ»ú¿ô¤È¿§¤ÏÀßÄê¤Ë¤è¤êÊѹ¹¤¬²Äǽ¤Ç¤¹¡£

4.2 ¸¡º÷ÊýË¡¤Î»ØÄê

¥á¥Ë¥å¡¼¤Þ¤¿¤Ï¥Ä¡¼¥ë¥Ð¡¼¤«¤é¡¢¼Â¹Ô¤·¤¿¤¤¸¡º÷ÊýË¡¤òÁªÂò¤·¤Þ¤¹¡£¸¡º÷ÊýË¡¤Î°ÕÌ£¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£


¼­½ñ¤òÂоݤȤ·¤¿¸¡º÷
¸¡º÷ ÊýË¡
°ÕÌ£
¤ª¤Þ¤«¤»¸¡º÷
´°Á´°ìÃ׸¡º÷¤È¾ò·ï°ìÃ׸¡º÷¤ò¼«Æ°Åª¤Ë¹Ô¤¤¤Þ¤¹¡£»ØÄê¤Ë¤è¤ê¡¢Á°Êý°ìÃ׸¡º÷¤â¹Ô¤¤¤Þ¤¹¡£
´°Á´°ìÃ׸¡º÷
ÆþÎϸì¤Ë´°Á´¤Ë°ìÃפ·¤¿¹àÌܤÀ¤±¤¬¸¡º÷·ë²Ì¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£
Á°Êý°ìÃ׸¡º÷
ÆþÎϸì¤Ç»Ï¤Þ¤ë¹àÌܤ¬¸¡º÷·ë²Ì¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£Î㤨¤Ð¡¢"difficult" ¤ÈÆþÎϤ¹¤ì¤Ð "difficult" ¤ä "difficulty" ¤Ê¤É¤Ë¥Ò¥Ã¥È¤·¤Þ¤¹¡£
¸åÊý°ìÃ׸¡º÷
ÆþÎϸì¤Ç½ª¤ï¤ë¹àÌܤ¬¸¡º÷·ë²Ì¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£Î㤨¤Ð¡¢ "tist" ¤ÈÆþÎϤ¹¤ì¤Ð "dentist" ¤ä "systematist" ¤Ê¤É¤Ë¥Ò¥Ã¥È¤·¤Þ¤¹¡£
¾ò·ï¸¡º÷
Ê£¿ô¤Î¥­¡¼¥ï¡¼¥É¤ò»ØÄꤷ¤Æ¸¡º÷¤¹¤ëÊýË¡¤Ç¤¹¡£Î㤨¤Ð¡¢ "grow" ¤È "up" ¤Î2¤Ä¤ò¸¡º÷¸ì¤È¤·¤Æ»ØÄꤹ¤ë¤³¤È¤Ç¡¢"grow up"¤Ë¥Ò¥Ã¥È¤·¤Þ¤¹¡£
Ê£¹ç¸¡º÷
Ê£¿ô¤Î¥­¡¼¥ï¡¼¥É¤ò»ØÄꤷ¤Æ¸¡º÷¤·¤Þ¤¹¤¬¡¢³Æ¥­¡¼¥ï¡¼¥É¤Ë¤Ï¤¢¤é¤«¤¸¤á°ÕÌ£¤¬¤Ä¤±¤é¤ì¤Æ¤¤¤Þ¤¹¡£¥­¡¼ ¥ï¡¼¥É¤ò°ìÍ÷¤ÎÃæ¤«¤é»ØÄꤹ¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
Á´Ê¸¸¡º÷
¼­½ñ¤ÎÃæ¤«¤é¡¢»ØÄꤷ¤¿¸¡º÷¸ì¤òËÜʸ¤ÎÃæ¤Ë´Þ¤ó¤Ç¤¤¤ë¹àÌܤòÁ´¤Æ¸¡º÷¤¹¤ëÊýË¡¤Ç¤¹¡£¼­½ñ¤ÎÃæ¤òºÇ½é¤« ¤é½ª¤ï¤ê¤Þ¤Ç¸¡º÷¤¹¤ë¤¿¤á¡¢¸¡º÷¤Ë¤Ï»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£
¥á¥Ë¥å¡¼
¼­½ñ¤Î¥á¥Ë¥å¡¼¥Ç¡¼¥¿ (Ä̾ï¤Ï»ÈÍÑÊýË¡¤ÏËÞÎã¤Ê¤É) ¤òɽ¼¨¤·¤Þ¤¹¡£¼­½ñ¤Ë¤è¤Ã¤Æ¤Ï¥á¥Ë¥å¡¼¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç¤â¤¢¤ê¤Þ¤¹¡£
Ãøºî¸¢É½¼¨
¼­½ñ¤ÎÃøºî¸¢¥Ç¡¼¥¿¤òɽ¼¨¤·¤Þ¤¹¡£¼­½ñ¤Ë¤è¤Ã¤Æ¤Ï¤Ê¤¤¾ì¹ç¤â¤¢¤ê¤Þ¤¹¡£

¤½¤Î¾¤Î¸¡º÷
¸¡º÷ ÊýË¡
°ÕÌ£
¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷
¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¸¡º÷¥¨¥ó¥¸¥ó¤ò»È¤Ã¤Æ¸¡º÷¤·¤Þ¤¹¡£·ë²Ì¤Ï Web ¥Ö¥é¥¦¥¶¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
¥Õ¥¡¥¤¥ë¸¡º÷
¥Õ¥¡¥¤¥ë¤ÎÃæ¤«¤é»ØÄꤷ¤¿¸ì¤ò´Þ¤à¹Ô¤òõ¤·¤Þ¤¹¡£

¸¡º÷ÊýË¡¤Ï¡¢¥Ä¥ê¡¼¥Õ¥ì¡¼¥à (¥Ç¥Õ¥©¥ë¥È¤Ç²èÌ̤κ¸¤ÎÉôʬ) ¤Î¥¿¥Ö¤Ç¥Ú¡¼¥¸¤òÀÚ¤êÂØ¤¨¤ë¤³¤È¤Ç¤âÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

4.3 ¸¡º÷¸ì¤ÎÆþÎÏ


¥Ä¡¼¥ë¥Ð¡¼¤ÎÆþÎϥܥ寥¹¤Ë¸¡º÷¤·¤¿¤¤¸ì¶ç¤òÆþÎϤ·¤Þ¤¹¡£¤ª¤Þ¤«¤»¸¡º÷¤ä¾ò·ï¸¡º÷¤ò¹Ô¤¦¾ì¹ç¤Ë¤Ï¡¢Ê£¿ô¤Î¸ì¤ò¥¹¥Ú¡¼¥¹¤Ç¶èÀڤà ¤Æ»ØÄꤷ¤Þ¤¹¡£

°ìÅÙÆþÎϤ·¤¿¸¡º÷¸ì¤ÏÍúÎò¤È¤·¤Æ»Ä¤ê¤Þ¤¹¡£Æ±¤¸¸ì¤ò¸¡º÷¤¹¤ë¤Ë¤Ï¡¢ÆþÎϥܥ寥¹¤Î²£¤Ë¤¢¤ë²¼Ìð°õ¥Ü¥¿¥ó¤ò²¡¤¹¤«¡¢¥«¡¼¥½¥ë¥­¡¼¤Î¾å²¼¤ÇÁªÂò¤·¤Þ¤¹¡£

4.4 ¸¡º÷¤Î³«»Ï

¸¡º÷¸ì¤òÆþÎϤ·¤¿¤é¡¢¥¨¥ó¥¿¡¼¥­¡¼¤ò²¡¤¹¤«¡¢¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Î±¦¤Ë¤¢¤ë¸¡º÷³«»Ï¥Ü¥¿¥ó (Ãî´ã¶À¤Î¥¢¥¤¥³¥ó) ¤ò²¡¤·¤Þ¤¹¡£¤³¤ì¤Ç¸¡º÷¤¬»Ï¤Þ¤ê¤Þ¤¹¡£¸¡º÷¤ËÍפ¹¤ë»þ´Ö¤Ï¡¢¸¡º÷ÊýË¡¤ä¸¡º÷¸ì¡¢ºÇÂç¥Ò¥Ã¥È¿ô¤Î»ØÄê¤Ë¤è¤Ã¤ÆÊѤï¤ê¤Þ¤¹¡£


Á´Ê¸¸¡º÷¤È¥Õ¥¡¥¤¥ë¸¡º÷¤Ï»þ´Ö¤¬¤«¤«¤ë¤¿¤á¡¢¿Ê¹Ô¾õ¶·¤ò¼¨¤¹¥À¥¤¥¢¥í¥°¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ÅÓÃæ¤Ç¥­¥ã¥ó¥»¥ë¤¹¤ë¤Ë¤Ï¥À¥¤¥¢¥í¥°¤Î [¥­¥ã¥ó¥»¥ë] ¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£

¡¡

5. ¸¡º÷·ë²Ì¤Îɽ¼¨

5.1 ¸«½Ð¤·¤ÎÁªÂò


¸¡º÷¤¬½ªÎ»¤¹¤ë¤È¡¢¸¡º÷·ë²Ì¤Î¸«½Ð¤·¤¬²èÌ̺¸Â¦ (¥Ç¥Õ¥©¥ë¥È¾õÂ֤ξì¹ç) ¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£»²¾È¤·¤¿¤¤¹àÌܤò¥Þ¥¦¥¹¤ÇÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£ÁªÂò¤·¤¿¹àÌܤËÂбþ¤¹¤ëËÜʸ¤¬²èÌ̱¦Â¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£


¸¡º÷·ë²Ì°ìÍ÷¤Ç¤Ï¡¢¥·¥ç¡¼¥È¥«¥Ã¥È¥­¡¼¤ò»È¤Ã¤Æ¾å²¼¤Ë°Üư¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤Ê¤ª¡¢¸¡º÷·ë²Ì¤¬Â¿¤¤¾ì¹ç¤Ï¡¢ÀßÄꤷ¤¿¸Ä¿ô¤Þ¤Ç¤·¤«É½¼¨¤µ¤ì¤Þ¤»¤ó¡£Â³¤­¤¬ ¤¢¤ë¾ì¹ç¤Ï¡¢°ìÍ÷¤Î²¼¤Ë¤¢¤ë¥Ü¥¿¥ó¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤³¤ì¤Ë¤è¤ê³¤­¤ò»²¾È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¸¡º÷·ë²Ì¤Ç¤Ï¡¢[ɽ¼¨]¢ª[·ë²Ì°ìÍ÷]¢ª[¸¡º÷·ë²Ì¤ò¼­½ñ¤´¤È¤Ëɽ¼¨]¤Ë¥Á¥§¥Ã¥¯¤·¤Æ¤ª¤¯¤È¡¢¼­½ñ¤´¤È¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¥Á¥§¥Ã¥¯¤·¤Ê¤¤¤È¡¢Ê£¿ô¤Î¼­½ñ¤Î·ë²Ì¤¬¼¡¤Î½ç½ø¤Ç¥½¡¼¥È¤µ¤ì¤Þ¤¹¡£

  • ´°Á´°ìÃ׸¡º÷¤Î·ë²Ì
  • ¸«½Ð¸ì¤È¸¡º÷¸ì¤¬´°Á´°ìÃפ¹¤ë¤â¤Î
  • ¸«½Ð¸ì¤È¸¡º÷¸ì¤¬Á°Êý°ìÃפ¹¤ë¤â¤Î
  • ¸«½Ð¸ì¤È¸¡º÷¸ì¤¬Éôʬ°ìÃפ¹¤ë¤â¤Î
  • ¸«½Ð¸ìÆâ¤Ë¸¡º÷¸ì¤ÎÁ´¤Æ¤¬´Þ¤Þ¤ì¤ë¤â¤Î
  • ¤½¤ì°Ê³°

¡¡

5.2 ¥ê¥ó¥¯


ËÜʸ¤Î¤¦¤Á¡¢ÀÄ (¥Ç¥Õ¥©¥ë¥È¾õÂÖ) ¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ëÉôʬ¤Ï¡¢ÊÌ¤Î²Õ½ê¤Ø¤Î¥ê¥ó¥¯¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ò¼¨¤·¤Þ¤¹¡£¤½¤Î¾å¤Ë¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ò»ý¤Ã¤Æ¹Ô¤¯¤È¡¢¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬¼ê¤Î·Á¤ËÊѲ½¤·¤Þ¤¹¡£¤½¤Î¾õÂ֤ǥޥ¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤Ç»²¾ÈÀè¤Ë¥¸¥ã¥ó¥×¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

5.3 ²»¤Èư²è¤ÎºÆÀ¸


ËÜʸ¤Î¤¦¤Á¡¢ÎÐ (¥Ç¥Õ¥©¥ë¥È¾õÂÖ) ¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ëÉôʬ¤Ï¡¢²»À¼¤äư²è¤Ê¤É¤Î¥Þ¥ë¥Á¥á¥Ç¥£¥¢¥Ç¡¼¥¿¤ò¼¨¤·¤Þ¤¹¡£¤½¤Î¾å¤Ë¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ò»ý¤Ã¤Æ¤¤¤¯¤È¡¢¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬¼ê¤Î·Á¤ËÊѲ½¤·¤Þ¤¹¡£¤½¤Î¾õÂÖ¤Ç ¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Þ¥ë¥Á¥á¥Ç¥£¥¢¥Ç¡¼¥¿¤ÎºÆÀ¸¤¬»Ï¤Þ¤ê¤Þ¤¹¡£

¥Þ¥ë¥Á¥á¥Ç¥£¥¢¥Ç¡¼¥¿¤ÎºÆÀ¸¤Ë¤Ï³°Éô¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò»ÈÍѤ·¤Þ¤¹¡£»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¥«¥¹¥¿¥Þ¥¤¥º¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£¤Ê¤ª Windows ¤Ç¤Ï¡¢»ØÄê¤Ë¤è¤ê EBView ¼«¿È¤Ç²»À¼¤òºÆÀ¸¤·¤Þ¤¹¡£

¡¡

5.4 ÍúÎò

ËÜʸ¤È¤·¤ÆÉ½¼¨¤·¤¿ÆâÍÆ (¼­½ñÆâ¤Î°ÌÃÖ) ¤Ïɽ¼¨ÍúÎò¤Ë³ÊǼ¤µ¤ì¤Æ¤ª¤ê¡¢¡ÖÌá¤ë¡×¡Ö¿Ê¤à¡×¥Ü¥¿¥ó¤ÇÁ°¸å¤Ë°Üư¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Êݸ¤Ç¤­¤ëÍúÎò¤Î¿ô¤ËÀ©¸Â¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢EBView ¤òºÆµ¯Æ°¤¹¤ë¤ÈÍúÎò¤Ï¥¯¥ê¥¢¤µ¤ì¤Þ¤¹¡£

5.5 ÆâÍÆÁªÂò


ɽ¼¨ÆâÍÆ¤ò¥Þ¥¦¥¹¤ÇÈϰÏÁªÂò¤¹¤ë¤È¡¢ÁªÂò¤·¤¿ÆâÍÆ¤Ï X ¤Î¥»¥ì¥¯¥·¥ç¥ó¤Ë³ÊǼ¤µ¤ì¡¢Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¥Ú¡¼¥¹¥È¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£

¥Þ¥¦¥¹¤Î±¦¥Ü¥¿¥ó¤ò²¡¤¹¤È¥á¥Ë¥å¡¼¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£[ÁªÂò¤·¤¿¸ì¤ò¸¡º÷] ¤òÁª¤Ö¤È¡¢ÁªÂò¤·¤¿¸ì¤ò¸¡º÷¸ì¤È¤·¤Æ¸¡º÷¤¬¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£ ¤Þ¤¿¡¢[¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼] ¤òÁª¤Ö¤È¡¢ÁªÂò¤·¤¿ÆâÍÆ¤¬¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼¤·¤¿ÆâÍÆ¤Ï¡¢Ctrl + v ¤Ê¤É (¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë) ¤ÇÊ̤Υ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËޤêÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¡¡

6. ¥»¥ì¥¯¥·¥ç¥ó(¥¯¥ê¥Ã¥×¥Ü¡¼¥É)¤Î¸¡º÷

¡¡


¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤È¤Ï¡¢Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¾å¤Ç¥Þ¥¦¥¹ÁªÂò¤µ¤ì¤Æ¤¤¤ëʸ»úÎó¤ò¼«Æ°Åª¤Ë¸¡º÷¤¹¤ë¤â¤Î¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢Web ¥Ö¥é¥¦¥¶¤Ç±Ñ¸ì¤Îʸ¾Ï¤òÆÉ¤ó¤Ç¤¤¤ë¤È¤­¤Ë¤ï¤«¤é¤Ê¤¤Ã±¸ì¤¬½Ð¤Æ¤­¤¿¤é¡¢Ã±¸ì¤òÁªÂò¤·¤ÆÈ¿Å¾¤µ¤»¤ì¤Ð¡¢¤½¤Îñ¸ì¤¬¼«Æ°Åª¤Ë¸¡º÷¤µ¤ì¤Þ¤¹¡£

¤Ê¤ª¡¢Windows ¤Ç¤Ï¥»¥ì¥¯¥·¥ç¥ó¤Ç¤Ï¤Ê¤¯¡¢¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Î¸¡º÷¤È¤Ê¤ê¤Þ¤¹¡£Ê¸»úÎó¤òÁªÂò¤·¤Æ Ctrl+C ¤Ê¤É¤Ç¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼¤¹¤ë¤³¤È¤Ç¸¡º÷¤µ¤ì¤Þ¤¹¡£

¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢¥á¥Ë¥å¡¼¤Î[¥Ä¡¼¥ë]¢ª[¥»¥ì¥¯¥·¥ç¥ó¤Î¸¡º÷]¤«¤é¼Â¹Ô¤·¤¿¤¤½èÍý¤òÁªÂò¤·¤Þ¤¹¡£

¸¡º÷¤·¤¿·ë²Ì¤Ï¡¢Ä̾ï¤Î¸¡º÷¤ÈƱÍͤ˥ᥤ¥ó¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤¹¤ë¾¤Ë¡¢¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬¤¢¤ë°ÌÃ֤˥ݥåץ¢¥Ã¥×ɽ¼¨¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¥Ý¥Ã¥×¥¢¥Ã¥× ¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤¹¤ë¤Ë¤Ï¡¢[¥Ä¡¼¥ë]¢ª[¥»¥ì¥¯¥·¥ç¥ó¤Î¸¡º÷]¢ª[¥Ý¥Ã¥×¥¢¥Ã¥×¤Ç¸¡º÷]¤òÁªÂò¤·¤Þ¤¹¡£¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¾å¤Ç¤Î¥Þ¥¦¥¹Áàºî¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£

¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó
°ÕÌ£
º¸¥Ü¥¿¥ó ¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤òÊĤ¸¤ë¡£¥ê¥ó¥¯¤ä¥Þ¥ë¥Á¥á¥Ç¥£¥¢¥Ç¡¼¥¿¾å¤Ç¤Ï¥ê¥ó¥¯Àè¤Ë¥¸¥ã¥ó¥×¤Þ¤¿¤ÏºÆÀ¸¤¬»Ï¤Þ¤ë¡£
Ãæ±û¥Ü¥¿¥ó Á°¤Î¸õÊä¤òɽ¼¨¤¹¤ë¡£
±¦¥Ü¥¿¥ó ¼¡¤Î¸õÊä¤òɽ¼¨¤¹¤ë¡£
¡¡
¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Ë¤Ï¡¢ÀßÄê¤Ë¤è¤ê¥¿¥¤¥È¥ë¥Ð¡¼¤òɽ¼¨¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥¿¥¤¥È¥ë¥Ð¡¼¤òɽ¼¨¤·¤Æ¤¤¤ë¤È¡¢Á´ÂΤDz¿·ï¥Ò¥Ã¥È¤·¤¿¤«¤¬É½¼¨¤µ¤ì¡¢¥¿ ¥¤¥È¥ë¥Ð¡¼¤ò¥É¥é¥Ã¥°¤·¤Æ¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤ò°Üư¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¤Þ¤¿¡¢º¸¾å¤Î¥×¥Ã¥·¥å¥Ô¥ó¤Î¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥¦¥£¥ó¥É¥¦¤ò¥Þ¥¦¥¹º¸¥Ü¥¿¥ó¤Ç¥¯ ¥ê¥Ã¥¯¤·¤Æ¤âÊĤ¸¤Ê¤¤¤è¤¦¤Ë¤Ê¤ê¡¢¼¡²ó¤Îɽ¼¨¤¬¹â®¤Ë¤Ê¤ê¤Þ¤¹¡£

"selection" ¤È¤¤¤¦¼­½ñ¥°¥ë¡¼¥×¤òºîÀ®¤·¤Æ¤ª¤¯¤È¡¢¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¼­½ñ¥°¥ë¡¼¥×¤Ë´Ø·¸¤Ê¤¯¤½¤Î¥°¥ë¡¼¥×¤Î¼­½ñ¤ò»È¤Ã¤Æ¸¡º÷¤¬¹Ô¤ï¤ì¤Þ¤¹¡£¸¡º÷·ë²Ì¤ò¥Ý¥Ã¥×¥¢¥Ã¥×ɽ¼¨¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢ ËÜʸ¤¬Ã»¤á¤Î¼­½ñ¤ò»È¤¦¤Î¤¬¤ª´«¤á¤Ç¤¹¡£

¤Ê¤ª¡¢¤à¤ä¤ß¤Ë¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤¬³«¤¯¤Î¤òËɤ°¤¿¤á¡¢°ìÅÙ¸¡º÷¤·¤¿Ê¸»úÎó(¤ÈƱ¤¸ÆâÍÆ¤Îʸ»úÎó ¤ò³¤±¤ÆÁªÂò¤·¤Æ¤â¸¡º÷¤Ï¹Ô¤ï¤ì¤Þ¤»¤ó¡£Æ±¤¸¸ì¤ò¤â¤¦°ìÅÙ¸¡º÷¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢¤¤¤Ã¤¿¤óÊ̤θì¤òÁªÂò¤·¤Æ¤«¤é¤â¤¦°ìÅÙ¤½¤Î¸ì¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£

7. ¸ìÈø¤Î¼«Æ°ÊäÀµ

¡¡

dictionaries ¤Î¤è¤¦¤Ë¡¢¸ìÈø¤¬ÊѲ½¤·¤Æ¤¤¤ëñ¸ì¤ò¸¡º÷¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¸µ¤Îñ¸ì¤Ç¤¢¤ë dictionary ¤Ç¸¡º÷¤¹¤ë¤Î¤¬ÉáÄ̤Ǥ¹¡£¥­¡¼¥ï¡¼¥É¤ò¿Í´Ö¤¬ÆþÎϤ¹¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢ÍøÍѼԤ¬È½ÃǤ·¤ÆÀµ¤·¤¤¸ì¤òÆþ¤ì¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¤¬¡¢¾å½Ò¤Î¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤Î¾ì¹ç¤Ë¤Ï¤³¤ì¤Ç¤ÏÉÔÅÔ¹ç¤Ç¤¹¡£

¤½¤³¤Ç EBView ¤Ç¤Ï¡¢¸ìÈø¤¬ÊѲ½¤·¤Æ¤¤¤ëñ¸ì¤ò¼«Æ°Åª¤Ë¸µ¤Îñ¸ì¤Ç¸¡º÷¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤Îµ¡Ç½¤ò¸ìÈøÊäÀµ¤È¸Æ¤Ó¤Þ¤¹¡£EBView ¤Ç¤Ï¡¢¸ìÈø¤¬ÆÃÄê¤Î¥Ñ¥¿¡¼¥ó¤Ë¥Þ¥Ã¥Á¤·¤¿¤é¸µ¤Î·Á¤ò»î¤¹¤È¤¤¤¦ÊýË¡¤ò¤È¤Ã¤Æ¤¤¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢¸ìÈøÊäÀµ¤òÍ­¸ú¤Ë¤¹¤ë¤È¸¡º÷¤Ë;·×¤Ë»þ´Ö¤¬¤«¤«¤ë¤è¤¦¤Ë¤Ê ¤ê¤Þ¤¹¡£

¸ìÈøÊäÀµ¤ò¹Ô¤¦¤«¤É¤¦¤«¡¢¤É¤¦¤¤¤¦¥Ñ¥¿¡¼¥ó¤Î»þ¤Ë¤É¤¦ÊäÀµ¤¹¤ë¤Î¤«¤Ï¥«¥¹¥¿¥Þ¥¤¥º¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢ÆþÎϤ·¤¿Ã±¸ì¤Ë¥Þ¥Ã¥Á¤·¤Ê¤¤¾ì¹ç¤Ë¤À¤±¸ìÈøÊä Àµ¤ò¹Ô¤¦¤è¤¦¤Ë»ØÄꤹ¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£

¸ìÈøÊäÀµµ¡Ç½¤Ï¡¢ÆüËܸì¤Ë¤Ä¤¤¤Æ¤âÍ­¸ú¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢¡Ö½Ð¤é¤ì¤Ê¤¤¡×¤Ç¸¡º÷¤¹¤ë¤È¡¢¡Ö½Ð¤ë¡×¤¬¥Ò¥Ã¥È¤·¤Þ¤¹¡£ÆüËܸì¤Î¸ìÈøÊäÀµ¤â±Ñ¸ì¤ÈƱÍͤλÅÁȤߤǤ¹¤¬¡¢¸ìÈø¤òÊäÀµ¤·¤Æ¸¡º÷¤·¤¿¤Ë¤â¤«¤«¤ï¤é¤º¤Ò¤È¤Ä¤â¥Þ¥Ã¥Á¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢¤µ¤é¤Ë¸¡º÷¸ì¤«¤é¤Ò¤é¤¬¤Ê¤ò½ü¤¤¤¿Éôʬ¤Ç¸¡º÷¤ò»î¤ß¤Þ¤¹¡£



8. ¥Õ¥¡¥¤¥ë¸¡º÷

¡¡

¼ÒÆâ¤Ç¥í¡¼¥«¥ë¤Ë»È¤Ã¤Æ¤¤¤ëÍѸ콸¤Ê¤É¤Ï¡¢°ìÈ̤˥ƥ­¥¹¥È¥Õ¥¡¥¤¥ë¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¤³¤È¤¬Â¿¤¤¤È»×¤¤¤Þ¤¹¡£¤³¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤ò EPWING ¤ËÊÑ´¹¤¹¤ì¤Ð¸¡º÷¥¹¥Ô¡¼¥É¤Ï®¤¯¤Ê¤ê¤Þ¤¹¤¬¡¢ºî¤ê¼ê¤Ë¤è¤Ã¤Æ¥Õ¥©¡¼¥Þ¥Ã¥È¤¬¤Þ¤Á¤Þ¤Á¤À¤Ã¤¿¤ê¡¢ÉÑÈˤ˹¹¿·¤µ¤ì¤ë¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¡¢¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤Î¤Þ¤Þ¸¡ º÷¤·¤¿¤Û¤¦¤¬Áᤤ¤³¤È¤â¤¢¤ê¤Þ¤¹¡£¤³¤Î¤è¤¦¤Ê»þ¤Ë°ÒÎϤòȯ´ø¤¹¤ë¤Î¤¬¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¤¹¡£

¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤ò¹Ôñ°Ì¤Ëʬ³ä¤·¡¢¤½¤ì¤¾¤ì¤Î¹Ô¤ËÂФ·¤Æ»ØÄꤷ¤¿¸ì¤ò´Þ¤à¤«¤É¤¦¤«¤ò¸¡ºº¤·¡¢¥Þ¥Ã¥Á¤·¤¿¹Ô¤òÃæ¿´¤È¤·¤¿Á°¸å¿ô¹Ô¤òɽ¼¨¤·¤Þ¤¹¡£

¤Þ¤¿¡¢ÆüËܸì¤Îʸ»ú¥³¡¼¥É (EUC¡¢¥·¥Õ¥ÈJIS¡¢JIS) ¤Ï¼«Æ°Åª¤Ëǧ¼±¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ä̾ï¤Ï¼êºî¶È¤Ç¥³¡¼¥É¤òÊÑ´¹¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£ ¤¿¤À¤·¡¢´Á»ú¥³¡¼¥É¤Îǧ¼±¤Ï´Ö°ã¤¦¤³¤È¤â¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢Æ°ºî¤¬¤ª¤«¤·¤¤¤È»×¤Ã¤¿¾ì¹ç¤ä¡¢Unicode ¤Î¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤¹¤ë¾ì¹ç¤Ê¤É¤Ï¡¢¥Õ¥¡¥¤¥ë¤ò EUC ¤ËÊÑ´¹¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£


¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¤Ï¡¢¸¡º÷¸ì¤Î»ØÄêÊýË¡¤È¤·¤Æ¡¢¼¡¤Î 2 ¼ïÎà¤ÎÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£¤Ê¤ª¡¢¤É¤Á¤é¤Î¾ì¹ç¤Ç¤â [Âçʸ»ú/¾®Ê¸»ú¤ò̵»ë] ¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤Ç¡¢Âçʸ»ú¤È¾®Ê¸»ú¤¬Æ±°ì»ë¤µ¤ì¤Þ¤¹¡£

8.1 Ä̾ï¤Î¥Æ¥­¥¹¥È¸¡º÷


ÆÃ¼ìʸ»ú¤ò´Þ¤Þ¤Ê¤¤Ä̾ï¤Îʸ»ú¤ò»ØÄꤷ¤¿¸¡º÷¤Ç¤¹¡£¸¡º÷¤Ë¤Ï BMH Ë¡¤ò»È¤¦¤¿¤á¡¢¹â®¤Ê¸¡º÷¤¬²Äǽ¤Ç¤¹¡£¤Þ¤¿¡¢Ê£¿ô¤Î¸ì¤ò»ØÄꤷ¤¿¾ì¹ç¤Ë¤Ï AND ¸¡º÷¤È¤Ê¤ê¤Þ¤¹¡£

8.2 Àµµ¬É½¸½


POSIX ³ÈÄ¥Àµµ¬É½¸½¤ò»È¤Ã¤¿¸¡º÷¤Ç¤¹¡£EBView ¤Ç¤Ï¡¢¸¡º÷¸ì¤Ë¥á¥¿¥­¥ã¥é¥¯¥¿¤¬¸«¤Ä¤«¤ë¤È¡¢¼«Æ°Åª¤ËÀµµ¬É½¸½¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£»ÈÍѤǤ­¤ë¥á¥¿¥­¥ã¥é¥¯¥¿¤È¤½¤Î°ÕÌ£¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£


¥á¥¿¥­¥ã¥é¥¯¥¿
°ÕÌ£
Îã
|
¤É¤ì¤«¤Ë¥Þ¥Ã¥Á
A|B|C A¤Þ¤¿¤ÏB¤Þ¤¿¤ÏC¤Ë¥Þ¥Ã¥Á
.
¶õʸ»ú¤ò½ü¤¯Ç¤°Õ¤Î1ʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë

^
ʸ»úÎóÀèÆ¬¤Î¶õʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë ^abc : abc¤Ç»Ï¤Þ¤ë¹Ô¤Ë¥Þ¥Ã¥Á
$
ʸ»úÎóËöÈø¤Î¶õʸ»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë xyz$ : xyz¤Ç½ª¤ï¤ë¹Ô¤Ë¥Þ¥Ã¥Á
(¡¢)
¤½¤ÎÀµµ¬É½¸½¤¬°ìÃפ¹¤ëʸ»úÎó¤Ë¥Þ¥Ã¥Á¤¹¤ë
()
nullʸ»úÎó¤Ë¥Þ¥Ã¥Á¤¹¤ë
[¡¢] ¥Ö¥é¥±¥Ã¥Èɽ¸½
[¤È]¤Î´Ö¤Ë»ØÄꤷ¤¿Ê¸»ú¤Ë¥Þ¥Ã¥Á¤¹¤ë
[abc] : abc¤Î¤É¤ì¤«¤Ë¥Þ¥Ã¥Á
[0-9] : 0¤«¤é9¤Î¤É¤ì¤«¤Ë¥Þ¥Ã¥Á
[^abc] : a¤Èb¤Èc°Ê³°¤Ë¥Þ¥Ã¥Á
*
0 ¸Ä°Ê¾å¤ÎʤÓ
a* : ¶õʸ»ú¡¢a¡¢aa¡¢aaa....¤Ë¥Þ¥Ã¥Á
+
1 ¸Ä°Ê¾å¤ÎʤÓ
a+ : a¡¢aa¡¢aaa....¤Ë¥Þ¥Ã¥Á
?
0 ¸Ä¤Þ¤¿¤Ï 1 ¸Ä
a? : ¶õʸ»ú¡¢a¤Ë¥Þ¥Ã¥Á
{¡¢}
·«ÊÖ¤·É½¸½
a{1,5} : a¤Î1¤«¤é5²ó¤Î·«ÊÖ¤·¤Ë¥Þ¥Ã¥Á


¶¯À©Åª¤ËÀµµ¬É½¸½¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¸¡º÷¸ì¤ò¥¹¥é¥Ã¥·¥å (/) ¤Ç°Ï¤ß¤Þ¤¹¡£ ¤Þ¤¿¡¢¥á¥¿¥­¥ã¥é¥¯¥¿¤ò´Þ¤ó¤Ç¤¤¤Æ¤â¶¯À©Åª¤ËÄ̾ï¤Î¥Æ¥­¥¹¥È¸¡º÷¤ò¹Ô¤¤¤¿¤¤¾ì¹ç¤Ï¡¢¸¡º÷¸ì¤ò¥À¥Ö¥ë¥¯¥ª¡¼¥È (") ¤Ç°Ï¤ß¤Þ¤¹¡£


8.3 ¸¡º÷ÂоݤλØÄê

¸¡º÷Âоݤϡ¢¼¡¤Î £² ¤Ä¤ÎÊýË¡¤Î¤É¤Á¤é¤«¤Ç»ØÄê¤Ç¤­¤Þ¤¹¡£
  • »öÁ°¤Ë»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×
  • ¼êư¤Ë¤è¤ë»ØÄê

¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤Ë¤è¤ë»ØÄê

¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤Ï¡¢ÀßÄê²èÌ̤ǻöÁ°¤ËÀßÄꤷ¤Æ¤ª¤­¤Þ¤¹¡£Ê£¿ô¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÂФ·¤ÆÌ¾Á°¤ò¤Ä¤±¤Æ¤ª¤±¤Ð¡¢¤½¤Î̾Á°¤òÁªÂò¤¹¤ë¤À¤±¤Ç¡¢»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¤Ë¤¢¤ë¥Õ¥¡¥¤¥ë¤¬¸¡º÷Âоݤˤʤê¤Þ¤¹(¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ò´Þ¤à)¡£

¤Þ¤¿¡¢¸¡º÷ÂоݤΥե¡¥¤¥ë¤ò¸ÂÄꤷ¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢¥«¥ó¥Þ¤Ë³¤±¤Æ³ÈÄ¥»Ò¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢/some/directory,.html ¤È»ØÄꤹ¤ë¤È¡¢/some/directory °Ê²¼¤Î¡¢³ÈÄ¥»Ò .html ¤Î¥Õ¥¡¥¤¥ë¤¬¸¡º÷Âоݤˤʤê¤Þ¤¹¡£


¼êư¤Ë¤è¤ë»ØÄê

¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤Ç¡¢¡Ö¼êư¤ÇÁªÂò¡×¤òÁª¤Ö¤³¤È¤Ç¡¢¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë¤ò¤½¤Î¾ì¤ÇÁª¤Ö¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Ä¥ê¡¼¾õ¤Ëɽ¼¨¤µ¤ì¤¿¥Ç¥£¥ì¥¯ ¥È¥ê¥ê¥¹¥È¤«¤é¡¢¥Ç¥£¥ì¥¯¥È¥ê¤«¥Õ¥¡¥¤¥ë¤òÁªÂò (¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¤Ë¥Á¥§¥Ã¥¯) ¤·¤Æ»ØÄꤷ¤Þ¤¹¡£¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤ÎÁ´¤Æ¤Î¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤È¥Õ¥¡¥¤¥ë¤¬¸¡º÷Âоݤˤʤê¤Þ¤¹¡£

¥Ç¥£¥ì¥¯¥È¥ê¥Ä¥ê¡¼¤Ç¤ÎÁàºî¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£


Áàºî
ưºî
Ctrl + º¸¥·¥ó¥°¥ë¥¯¥ê¥Ã¥¯ ¤½¤Î¥¢¥¤¥Æ¥à¤ò¥Á¥§¥Ã¥¯
¥Ç¥£¥ì¥¯¥È¥ê¤òº¸¥À¥Ö¥ë¥¯¥ê¥Ã¥¯ ¥Ç¥£¥ì¥¯¥È¥ê¤òŸ³«¤Þ¤¿¤ÏÊĤ¸¤ë¡£
¥Õ¥¡¥¤¥ë¤òº¸¥À¥Ö¥ë¥¯¥ê¥Ã¥¯ ¥Õ¥¡¥¤¥ë¤ò¥Õ¥£¥ë¥¿¤Ç»ØÄꤷ¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç³«¤¯¡£¤Ê¤ª¡¢¥Ú¡¼¥¸¤È ¹ÔÈÖ¹æ¤Ï¤È¤â¤Ë 1 ¤Ë¤Ê¤ë¡£
Ãæ±û¤Þ¤¿¤Ï±¦¥Ü¥¿¥ó¥¯¥ê¥Ã¥¯
¤½¤Î¥¢¥¤¥Æ¥à¤ò¥Á¥§¥Ã¥¯


[±£¤·¥Õ¥¡¥¤¥ë¤òɽ¼¨¤·¤Ê¤¤] ¤Ë¥Á¥§¥Ã¥¯¤¹¤ë¤È¡¢¥É¥Ã¥È (.) ¤Ç¤Ï¤¸¤Þ¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ä¥Õ¥¡¥¤¥ë¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó (¸¡º÷Âоݤˤϴޤޤì¤Þ¤¹)¡£


8.4 ¸¡º÷¤Î³«»Ï


¸¡º÷¸ì¤È¸¡º÷Âоݤò»ØÄꤷ¤Æ¥¨¥ó¥¿¡¼¥­¡¼¤«¸¡º÷³«»Ï¥Ü¥¿¥ó¤ò²¡¤¹¤³¤È¤Ç¡¢¸¡º÷¤¬»Ï¤Þ¤ê¤Þ¤¹¡£¸¡º÷¤¬»Ï¤Þ¤ë¤È¡¢¿Ê¹Ô¾õ¶·¤ò¼¨¤¹¥À¥¤¥¢¥í¥°¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ÅÓÃæ¤Ç¥­¥ã¥ó¥»¥ë¤¹¤ë¾ì¹ç¤Ë¤Ï¡£¥À¥¤¥¢¥í¥°Æâ¤Î [¥­¥ã¥ó¥»¥ë] ¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£Linux¡¢FreeBSD ¤Ç¤Ï¡¢¸¡º÷¤Î·ë²Ì¤ò¼¨¤¹¥á¥Ã¥»¡¼¥¸¤¬ËÜʸ¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£

8.5 ·ë²Ì¤Îɽ¼¨

¸¡º÷·ë²Ì¤Î°ìÍ÷¤Ë¡¢»ØÄꤷ¤¿¥­¡¼¥ï¡¼¥É¤ò´Þ¤à¹Ô¤¬É½¼¨¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¤½¤ÎÃæ¤«¤éÆâÍÆ¤òɽ¼¨¤µ¤»¤¿¤¤¤â¤Î¤òÁªÂò¤·¤Þ¤¹¡£¤¹¤ë¤È¡¢°ìÃפ·¤¿¹Ô¤òÃæ¿´¤È¤¹¤ëÁ°¸å¿ô¹Ô (¥ª¥×¥·¥ç¥ó¤ÇÀßÄê) ¤¬ËÜʸ¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£°ìÃפ·¤¿¹ÔÁ´ÂΤ¬¶¯Ä´É½¼¨¤µ¤ì¡¢¸¡º÷¸ì¤¬È¿Å¾É½¼¨¤µ¤ì¤Þ¤¹¡£

8.6 ¥Õ¥£¥ë¥¿


ŬÀڤʥե£¥ë¥¿¤ò»ØÄꤹ¤ë¤³¤È¤Ç¡¢¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë°Ê³°¤Î¥Õ¥¡¥¤¥ë¤Ç¤â¸¡º÷¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢pdftotext (xpdf ¤ËÉÕ°) ¥³¥Þ¥ó¥É¤ò»È¤¨¤Ð PDF ¥Õ¥¡¥¤¥ë¤Î¸¡º÷¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹(*1)¡£

ÆâÉôŪ¤Ë¤Ï¤¤¤Ã¤¿¤ó¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢ÊÑ´¹¤Ë»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¤¬¡¢¤¤¤Ã¤¿¤óÊÑ´¹¤·¤¿¥Õ¥¡¥¤¥ë¤Ï¥Ç¥£¥¹¥¯¤Ë¥­¥ã¥Ã¥·¥å¤µ¤ì¡¢¼¡²ó¤«¤é¤Ï¥Æ ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ÈƱÍͤ˹⮤˸¡º÷¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¥Ç¥£¥¹¥¯¤ËÊÝ»ý¤¹¤ë¥­¥ã¥Ã¥·¥å¤Î¥µ¥¤¥º¤Ï¥ª¥×¥·¥ç¥ó¤ÇÊѹ¹¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£¤Þ¤¿¡¢¥­¥ã¥Ã¥·¥å¤Î¥¯¥ê¥¢¤âÀßÄê²èÌ̤«¤é¹Ô¤Ê¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Õ¥£¥ë¥¿ ¤Ï¡¢³ÈÄ¥»ÒËè¤ËÅÐÏ¿¤·¤Þ¤¹¡£

*1 pdftotext ¤Ç¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¾õÂ֤Ǥϥ¢¥ë¥Õ¥¡¥Ù¥Ã¥È¤¬Á´³Ñ¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£¾Ü¤·¤¯¤Ï EBView ¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

8.7 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç³«¤¯


¸¡º÷·ë²Ì¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤Ç¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç³«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢³ÈÄ¥»ÒËè¤ËÅÐÏ¿¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÂФ¹¤ë¥Ñ¥é¥á¡¼¥¿¤òŬÀڤ˻ØÄꤹ¤ì¤Ð¡¢³ºÅö¤¹¤ë¹Ô¤ä¥Ú¡¼¥¸¤òɽ¼¨¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£



9. ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷

¡¡

¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Ç¤Ï¡¢¥Ý¡¼¥¿¥ë¥µ¥¤¥È¤òÃæ¿´¤Ë¼­½ñ¤Î¸¡º÷µ¡Ç½¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤ì¤ò»È¤ï¤Ê¤¤¼ê¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤Þ¤¿¡¢¥³¥ó¥Ô¥å¡¼¥¿¡¼ÍѸ콸¤Ê¤É¤ÎÆü¡¹¹¹¿·¤µ¤ì¤ëÍѸì¤â¡¢¥³¥ó¥Ô¥å¡¼¥¿¡¼´ØÏ¢¥µ¥¤¥È¤Ç¸¡º÷¤Ç¤­¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤µ¤é¤Ë¡¢Ä´¤Ù¤Æ¤¤¤ë¸ÀÍÕ¤¬¼­½ñ¤ËºÜ¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤ËºÇ¸å¤ÎÍê¤ß¤È¤Ê¤ë¤Î¤¬¡¢Google ¤ò¤Ï¤¸¤á¤È¤¹¤ë¥Ú¡¼¥¸¸¡º÷¤Ç¤¹¡£

°ìÈ̤ˡ¢Ê¬¤«¤é¤Ê¤¤ÍѸì¤Ë½Ð²ñ¤Ã¤¿¤é¡¢¤Þ¤º¼ê»ý¤Î¼­½ñ¤Ç¸¡º÷¤·¡¢ºÜ¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¥¦¥§¥Ö¥Ö¥é¥¦¥¶¤ò³«¤¤¤Æ¥Ö¥Ã¥¯¥Þ¡¼¥¯¤«¤é¸¡º÷¥µ¥¤¥È¤òÁª¤Ó¡¢¸¡º÷¸ì¤òÆþÎϤ·Ä¾¤¹¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

EBView ¤Ë¤Ï¡¢¤³¤ì¤ò´Êñ¤Ë¹Ô¤Ê¤¦¤¿¤á¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷¤Îµ¡Ç½¤¬¤¢¤ê¤Þ¤¹¡£¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥µ¡¼¥Á¥¨¥ó¥¸¥ó¤ò¤¢¤é¤«¤¸¤áÅÐÏ¿¤·¤Æ¤ª¤­¡¢EBView ¤«¤é Web ¥Ö¥é¥¦¥¶¤ò¸Æ¤Ó½Ð¤·¤Æ¸¡º÷¤ò¹Ô¤¦µ¡Ç½¤Ç¤¹¡£

¸¡º÷¤¹¤ë¤Ë¤Ï¡¢¸¡º÷ÊýË¡¤Ç¡Ö¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷¡×¤òÁªÂò¤·¤Þ¤¹¡£²èÌ̺¸Â¦¤Ë¸¡º÷¥µ¥¤¥È¤Î°ìÍ÷¤¬É½¼¨¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¥µ¥¤¥È̾¤òÁª¤ó¤Ç¡¢Ä̾ïÄ̤ê¤Ë¸¡º÷¤·¤Þ¤¹¡£¸¡º÷¥µ¥¤¥È̾¤ò¥Þ¥¦¥¹¤Ç¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤Æ¤â¸¡º÷¤¬³«»Ï¤µ¤ì¤Þ¤¹¡£¤¹¤ë¤È¡¢¥¦¥§¥Ö¥Ö¥é¥¦¥¶¤¬³«¤¤¤Æ (¤Þ¤¿¤Ï´û¤Ë³«¤¤¤Æ¤¤¤ë¥¦¥§¥Ö¥Ö¥é¥¦¥¶¤Ë) ¡¢¸¡º÷·ë²Ì¤Î¥Ú¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£

¸¡º÷¥µ¥¤¥È¤Ë¤è¤Ã¤Æ¤Ï¡¢¥Û¡¼¥à¥Ú¡¼¥¸¤«¤éºÙ¤«¤Ê¥ª¥×¥·¥ç¥ó¤¬»ØÄê¤Ç¤­¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¤¬¡¢EBView ¤Ç¤ÏÁ´¤Æ¤Î¥µ¥¤¥È¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤òÌÖÍ夹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¤Î¤Ç¡¢¤¢¤é¤«¤¸¤á·è¤á¤é¤ì¤¿ÆâÍÆ¤Ç¸¡º÷¤µ¤ì¤Þ¤¹¡£¥µ¥¤¥È̾¤ÎÉôʬ¤Ç¥Þ¥¦¥¹¤Î±¦¥Ü¥¿¥ó¤ò²¡¤¹¤È¥á¥Ë¥å¡¼¤¬É½¼¨¤µ¤ì¡¢¤½¤Î¥µ¥¤¥È¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤ò³«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹¤Î¤Ç¡¢ºÙ¤«¤¤»ØÄê¤ò¤¹¤ë¤Ë¤Ï¡¢¤¤¤Ã¤¿¤ó¤½¤Î¥µ¥¤¥È¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤ò³«¤¤¤Æ¤¯¤À¤µ ¤¤¡£

¸¡º÷¤ò³«»Ï¤·¤Æ¤â²¿¤âµ¯¤­¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥Ö¥é¥¦¥¶¤ÎÀßÄ꤬Àµ¤·¤¤¤«³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£»ÈÍѤ¹¤ë¥Ö¥é¥¦¥¶¤Ï¥ª¥×¥·¥ç¥ó¤Ç»ØÄꤷ¤Þ¤¹¡£

¡¡

10. ¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È

¡¡


»ÈÍѤ¹¤ë¼­½ñ¥°¥ë¡¼¥×¤ÎÀÚ¤êÂØ¤¨¤ä¡¢¸¡º÷·ë²Ì¤Î¸«½Ð¤·¤Î°Üư¤Ê¤É¡¢¤Û¤È¤ó¤É¤Îµ¡Ç½¤Ë¤Ï¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Æ±¤¸µ¡Ç½¤ËÊ£¿ô¤Î¥­¡¼¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£°Ê²¼¤Ë¼¨¤¹¤Î¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¾õÂ֤dzä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ë¥­¡¼¤Î°ìÉô¤Ç¤¹¡£¤³¤ì°Ê³°¤Ë¤â³ä¤êÅö¤Æ¤ë¤³¤È¤Î¤Ç¤­¤ëµ¡Ç½¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£Á´¤Æ¤Î¥­¡¼³ä¤êÅö¤Æ¤Ï¡¢[¥Ä¡¼¥ë]¢ª[¥ª¥×¥·¥ç¥ó...]¢ª [¥·¥ç¡¼¥È¥«¥Ã¥È]¤Ç³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£

¥­¡¼
³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤ëµ¡Ç½
F1 ¤ª¤Þ¤«¤»¸¡º÷
F2 ´°Á´°ìÃ׸¡º÷
F3
Á°Êý°ìÃ׸¡º÷
F4
¸åÊý°ìÃ׸¡º÷
F5
¾ò·ï¸¡º÷
F6
Ê£¹ç¸¡º÷
F7
Á´Ê¸¸¡º÷
F8
¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷
F9
¥Õ¥¡¥¤¥ë¸¡º÷
Return ¸¡º÷¤ò³«»Ï
Escape ¸¡º÷¸ì¤Î¥¯¥ê¥¢
Ctrl + p
Á°¤Î¥Ò¥Ã¥È
Ctrl + n ¼¡¤Î¥Ò¥Ã¥È
Ctrl + c
¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼
Ctrl + h
¥Ø¥ë¥×¤Îɽ¼¨
Ctrl + q
¥×¥í¥°¥é¥à¤Î½ªÎ»
Ctrl + Up
Á°¤Î¼­½ñ¥°¥ë¡¼¥×
Ctrl + Down
¼¡¤Î¼­½ñ¥°¥ë¡¼¥×
Ctrl + ¿ô»ú
¼­½ñX¤ÎÀÚ¤êÂØ¤¨
Alt + Left
¥Ò¥¹¥È¥ê¤òÌá¤ë
Alt + Right
¥Ò¥¹¥È¥ê¤ò¿Ê¤à

¡¡

11. ²èÌ̤Υ«¥¹¥¿¥Þ¥¤¥º

¡¡

11.1 ɽ¼¨/Èóɽ¼¨¤ÎÀÚ¤êÂØ¤¨


²èÌ̤Τ¦¤Á¡¢°Ê²¼¤Î¤â¤Î¤Ï²èÌ̤«¤éÈóɽ¼¨¤Ë¤·¤¿¤êºÆÉ½¼¨¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • ¥á¥Ë¥å¡¼¥Ð¡¼
  • ¼­½ñÁªÂò¥Ð¡¼
  • ¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼
  • ¥Ä¥ê¡¼¥Õ¥ì¡¼¥à¤Î¥¿¥Ö

ɽ¼¨/Èóɽ¼¨¤òÀÚ¤êÂØ¤¨¤ë¤Ë¤Ï¡¢[ɽ¼¨] ¥á¥Ë¥å¡¼¤«¤é³ºÅö¤¹¤ë¹àÌܤòÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢¥³¥ó¥Æ¥ó¥Ä¥¦¥£¥ó¥É¥¦¾å¤Ç¥Þ¥¦¥¹¤Î±¦¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ý¥Ã¥×¥¢¥Ã¥×¥á¥Ë¥å¡¼¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ ¤³¤Î¥á¥Ë¥å¡¼¤«¤é¤â¡¢±£¤ì¤Æ¤¤¤ë¤â¤Î¤òɽ¼¨¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼¥Ð¡¼¼«ÂΤòÈóɽ¼¨¤Ë¤·¤¿¾ì¹ç¤Ë¤Ï¤³¤ÎÊýË¡¤Ç¤·¤«É½¼¨¾õÂÖ¤ËÌ᤹¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£

11.2 ²èÌÌʬ³äÊýË¡¤ÎÀÚ¤êÂØ¤¨


¥Ç¥Õ¥©¥ë¥È¾õÂ֤Ǥϡ¢²èÌ̤Ϻ¸±¦¤Ëʬ³ä¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤·¤«¤·¡¢¸«½Ð¤·¤¬Ä¹¤¤¾ì¹ç¤Ê¤É¡¢¸«¤¨¤Ë¤¯¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤½¤Î¤è¤¦¤Ê¤È¤­¤Ï¡¢¥á¥Ë¥å¡¼ ¤Î[ɽ¼¨]->[¥Õ¥ì¡¼¥àʬ³äÊýË¡]¤Çʬ³äÊý¸þ¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¤Ê¤ª¡¢¤³¤ì°Ê³°¤Ë¤â°Ê²¼¤Î»ØÄ꤬²Äǽ¤Ç¤¹¡£

  • ¥¿¥Ö¤Î°ÌÃÖ
  • ¥­¡¼¥ï¡¼¥É¤Î¶¯Ä´É½¼¨
  • ²èÁü¤Î¥¤¥ó¥é¥¤¥óɽ¼¨
  • ¥Õ¥©¥ó¥È¤Î³ÈÂç/½Ì¾®
  • ¹Ô´Ö¤Î³ÈÂç/½Ì¾®
¡¡

12. ¥«¥¹¥¿¥Þ¥¤¥º

¡¡

¤³¤³¤Ç¤Ï¡¢EBView ¤Îưºî¤ò¥«¥¹¥¿¥Þ¥¤¥º¤¹¤ëÊýË¡¤òÀâÌÀ¤·¤Þ¤¹¡£

¥«¥¹¥¿¥Þ¥¤¥º¤·¤¿ÆâÍÆ¤Ï¡¢°Ê²¼¤Î¥Õ¥©¥ë¥À¤Ë XML ·Á¼°¤Î¥Õ¥¡¥¤¥ë¤È¤·¤ÆÊݸ¤µ¤ì¤Þ¤¹¡£

Linux¡¢FreeBSD : ~/.ebview

Windows : C:\Documents and Settings\¥æ¡¼¥¶¡¼Ì¾\Application Data\EBView


ÀßÄê¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢°Ê²¼¤Î¼ïÎब¤¢¤ê¤Þ¤¹¡£

̾Á°
ÆâÍÆ
shortcut.xml
¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È¤ÎÄêµÁ
endinglist.xml
±Ñ¸ì¤Î¸ìÈøÊäÀµ¥Ñ¥¿¡¼¥ó
endinglist-ja.xml
ÆüËܸì¤Î¸ìÈøÊäÀµ¥Ñ¥¿¡¼¥ó
searchengines.xml
¸¡º÷¥¨¥ó¥¸¥ó¤Î¥ê¥¹¥È
dictgroup.xml
¼­½ñ¥°¥ë¡¼¥×¤ÎÄêµÁ
history.xml
¸¡º÷¸ì¡¢¸¡º÷¥Ç¥£¥ì¥¯¥È¥ê¤ÎÍúÎò
dirlist.xml
¥Õ¥¡¥¤¥ë¸¡º÷¤Ç»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥ê
filter.xml ¥Õ¥£¥ë¸¡º÷¤Î¥Õ¥£¥ë¥¿¤ÎÄêµÁ
dirgroup.xml ¥Ç¥£¥ì¥¯¥È¥ê¥°¥ë¡¼¥×¤ÎÄêµÁ
preference.xml
¾åµ­°Ê³°¤ÎÀßÄê


12.1 ³°´Ñ


12.1.1 ¥Õ¥©¥ó¥È


»ÈÍѤ¹¤ë¥Õ¥©¥ó¥È¤ò»ØÄꤷ¤Þ¤¹¡£¡ÖÄ̾ï¡×¡¢¡Ö¥Ü¡¼¥ë¥É¡×¡¢¡Ö¥¤¥¿¥ê¥Ã¥¯¡×¡¢¡Ö¾åÉÕ¤­Ê¸»ú¡×¤ËÂФ·¤Æ»ØÄꤷ¤Þ¤¹¡£¤Ê¤ª¡¢¡Ö¾åÉÕ¤­Ê¸»ú¡×¤Ç»ØÄꤷ¤¿¥Õ¥©¥ó¥È ¤Ï¡¢²¼ÉÕ¤­Ê¸»ú¤Ç¤â»ÈÍѤµ¤ì¤Þ¤¹¡£

12.1.2 ¿§


¥ê¥ó¥¯
¾¤Î¾ì½ê¤Ø¤Î¥ê¥ó¥¯¤¬¤¢¤ë¤È¤­¤Î¿§¤Ç¤¹¡£

¥­¡¼¥ï¡¼¥É
¥­¡¼¥ï¡¼¥É¤È¤·¤Æ»ØÄꤵ¤ì¤Æ¤¤¤ëÉôʬ¤òɽ¼¨¤¹¤ë¤È¤­¤Î¿§¤Ç¤¹¡£

¥µ¥¦¥ó¥É
¥µ¥¦¥ó¥É¥Ç¡¼¥¿¤Ø¤Î»²¾È¤¬¤¢¤ë¤È¤­¤Î¿§¤Ç¤¹¡£

¥à¡¼¥Ó¡¼
¥à¡¼¥Ó¡¼¥Ç¡¼¥¿¤Ø¤Î»²¾È¤¬¤¢¤ë¤È¤­¤Î¿§¤Ç¤¹¡£

¶¯Ä´É½¼¨
¸¡º÷¸ì¤ò¶¯Ä´É½¼¨¤µ¤»¤ë¤È¤­¤Î¿§¤Ç¤¹¡£

ȿžɽ¼¨¤ÎÇØ·Ê
¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¡¢ËÜʸÆâ¤Î¸¡º÷¸ì¤òȿž¤µ¤»¤ë¤È¤­¤ÎÇØ·Ê¿§¤Ç¤¹¡£

12.1.3 ¤½¤Î¾


¸¡º÷Íú Îò¤Ë»Ä¤¹Ã±¸ì¿ô
¸¡º÷¸ì¤ÎÍúÎò¤Ë»Ä¤¹¥Ç¡¼¥¿¤Î·ï¿ô¤Ç¤¹¡£

¼­½ñ̾¤Îʸ»ú¿ô
¼­½ñÁªÂò¥Ð¡¼¤Ëɽ¼¨¤¹¤ëʸ»ú¿ô¤Ç¤¹¡£¼­½ñ¤Î̾Á°¤¬Ä¹¤¤¤È¡¢¤³¤³¤Ç»ØÄꤷ¤¿Ê¸»ú¿ôʬ¤À¤±¤¬¥Ü¥¿¥ó¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£

µ¯Æ°¥¦¥£¥ó¥É¥¦¤òɽ¼¨
µ¯Æ°»þ¤Ë¥¹¥×¥é¥Ã¥·¥å²èÌ̤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£

¸«½Ð¤Î¿ô¤ò¼«Æ°·×»»
°ìÅÙ¤Ëɽ¼¨¤¹¤ë¸¡º÷·ë²Ì¤Î¿ô¤ò¡¢¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤«¤é¼«Æ°Åª¤Ë·×»»¤·¤Þ¤¹¡£
¡¡
ɽ¼¨¤¹¤ë¸¡º÷·ë²Ì¤ÎºÇÂç¿ô
¸¡º÷·ë²Ì¤Î¤¦¤Á¡¢°ìÅÙ¤Ëɽ¼¨¤¹¤ë¸«½Ð¤·¤Î¿ô¤ò»ØÄꤷ¤Þ¤¹¡£°ìÍ÷¤Î²¼¤Ë¤¢¤ëº¸±¦¤Î¥Ü¥¿¥ó¤ò²¡¤¹¤³¤È¤Ç¡¢»Ä¤ê¤Î·ë²Ì¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¸«½Ð¤·¤Î¿ô¤ò¼«Æ°·× »»¤·¤Ê¤¤¾ì¹ç¤Ë¡¢¤³¤³¤Ç»ØÄꤷ¤¿¿ô¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
¡¡
¼­½ñ¥Ü¥¿¥ó¤Ë¿§¤ò¤Ä¤±¤ë
¼­½ñ¥Ð¡¼¤Î¥Ü¥¿¥ó¤Ë¡¢¼­½ñ¥°¥ë¡¼¥×¤Î»ØÄê¤Ç¼­½ñ¤´¤È¤Ë»ØÄꤷ¤¿¿§¤ò¤Ä¤±¤Þ¤¹¡£

12.2 ¼­½ñ¸¡º÷

12.2.1 ¼­½ñ¥°¥ë¡¼¥×


¼­½ñ¥°¥ë¡¼¥×¤ÎÄêµÁ¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£¡Ö3. ¼­½ñ¥°¥ë¡¼¥×¤ÎÄêµÁ¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

12.2.2 ¥»¥ì¥¯¥·¥ç¥ó¤Î¸¡º÷


¸¡º÷¤Î´Ö³Ö
X¤Î¥»¥ì¥¯¥·¥ç¥ó¤ò¡¢¤³¤³¤Ç»ØÄꤷ¤¿»þ´ÖËè¤Ë¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£¥»¥ì¥¯¥·¥ç¥ó¤ÎÆâÍÆ¤ËÊѲ½¤¬¤¢¤ë¤È¡¢¼«Æ°Åª¤Ë¸¡º÷¤¬¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£Windows¤Ç¤Ï¡¢¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ë¥³¥Ô¡¼¤¹¤ë¤È¤¹¤°¤Ë¸¡º÷¤¬³«»Ï¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¤³¤³¤Ç¤Î»ØÄê¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£

ºÇ¾®Ê¸»ú¿ô
¤³¤³¤Ç»ØÄꤷ¤¿Ê¸»ú¿ô¤è¤ê¤â¾®¤µ¤¤Ê¸»ú¿ô¤Î¥Ç¡¼¥¿¤Ï¡¢¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤Ç¤Î¸¡º÷Âоݤˤʤê¤Þ¤»¤ó¡£°Õ¿Þ¤»¤º¤Ë¥Þ¥¦¥¹¤ò¥¯¥ê¥Ã¥¯¤·¤¿¾ì¹ç¤Ë¤â¼«Æ°¸¡º÷ ¤¬»Ï¤Þ¤ë¤Î¤òËɤ°¤¿¤á¤ÎÀßÄê¤Ç¤¹¡£

ºÇÂçʸ»ú¿ô
¤³¤³¤Ç»ØÄꤷ¤¿Ê¸»ú¿ô¤è¤ê¤âÂ礭¤¤Ê¸»ú¿ô¤Î¥Ç¡¼¥¿¤Ï¡¢¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤Ç¤Î¸¡º÷Âоݤˤʤê¤Þ¤»¤ó¡£¥¨¥Ç¥£°¡¤Çʸ»úÎó¤ò¥«¥Ã¥È¤·¤¿¤è¤¦¤Ê¾ì¹ç¤Ë¤â¼«Æ° ¸¡º÷¤¬»Ï¤Þ¤ë¤Î¤òËɤ°¤¿¤á¤ÎÀßÄê¤Ç¤¹¡£

¥Ý¥Ã¥×¥¢¥Ã¥×¤Î¥µ¥¤¥º
¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤ò»ØÄꤷ¤Þ¤¹¡£

¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¤Î¥¿¥¤¥È¥ë¤òɽ¼¨
¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Ë¥¿¥¤¥È¥ë¥Ð¡¼¤òɽ¼¨¤¹¤ë¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£

¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¤é¥Ù¥ë¤òÌĤ餹
¥»¥ì¥¯¥·¥ç¥ó¤Î¼«Æ°¸¡º÷¤Ç¡¢¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¥Ù¥ë¤òÌĤ餹¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£


12.2.3 ¸ìÈøÊäÀµ


¸ìÈøÊäÀµ¤ÎÀßÄê¤È¡¢¥Ñ¥¿¡¼¥ó¤ÎÅÐÏ¿¤ò¹Ô¤¤¤Þ¤¹¡£±Ñ¸ì¤ÈÆüËܸì¤Î¸ìÈøÊäÀµ¥Ñ¥¿¡¼¥ó¤¬ÅÐÏ¿¤Ç¤­¤Þ¤¹¡£

¸ìÈøÊä Àµ¤ò¹Ô¤Ê¤¦
¸ìÈøÊäÀµ¤ò¹Ô¤¦¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£

¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Î¤ß
Í­¸ú¤Ë¤¹¤ë¤È¡¢Ä̾ï¤Î¸¡º÷¤Ç¥Ò¥Ã¥È¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤À¤±¸ìÈøÊäÀµ¤ò¹Ô¤¤¤Þ¤¹¡£

¥Ñ¥¿¡¼¥ó¤ÎÅÐÏ¿¤Ï¡¢¡ÖÊäÀµÁ°¤Î¸ìÈø¡×¤È¡ÖÊäÀµ¸å¤Î¸ìÈø¡×¤Î¥Ú¥¢¤ÇÅÐÏ¿¤·¤Þ¤¹¡£¸¡º÷¸ì¤Î¸ìÈø¤¬¡ÖÊäÀµÁ°¤Î¸ìÈø¡×¤Ë¥Þ¥Ã¥Á¤¹¤ë¤È¡¢¤½¤ÎÉôʬ¤ò¡ÖÊäÀµ¸ì¤Î¸ìÈø¡× ¤ÇÃÖ¤­´¹¤¨¤¿¸ì¤ò»È¤Ã¤Æ¸¡º÷¤µ¤ì¤Þ¤¹¡£¤¢¤Þ¤ê¤¿¤¯¤µ¤ó¤Î¥Ñ¥¿¡¼¥ó¤ò»ØÄꤹ¤ë¤È¸¡º÷¤Ë»þ´Ö¤¬¤«¤«¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¤Î¤ÇÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤Ê¤ª¡¢¸ìÈøÊäÀµ¤Ï¾å¤«¤é½ç¤Ë»î¤µ¤ì¤Þ¤¹¡£½ç½ø¤Ï¥É¥é¥Ã¥° & ¥É¥í¥Ã¥×¤ÇÊѹ¹¤Ç¤­¤Þ¤¹¡£

12.2.4 ¤½¤Î¾


¸¡º÷¤¹¤ëºÇÂç¥Ò¥Ã¥È¿ô
°ìÅ٤θ¡º÷¤Ç¥Ò¥Ã¥È¤·¤¿¿ô¤¬¤³¤³¤Ç»ØÄꤷ¤¿¿ô¤òͤ¨¤ë¤È¡¢¤½¤³¤Ç¸¡º÷¤¬ÂǤÁÀÚ¤é¤ì¤Þ¤¹¡£

¤ª¤Þ¤«¤»¸¡º÷¤ÇÁ°Êý°ìÃ׸¡º÷¤ò¼Â¹Ô
¤ª¤Þ¤«¤»¸¡º÷¤Ç¤Ï¡¢´°Á´°ìÃ׸¡º÷¡¢¾ò·ï°ìÃ׸¡º÷¤¬¹Ô¤ï¤ì¤Þ¤¹¤¬¡¢¤³¤ì¤òÍ­¸ú¤Ë¤¹¤ë¤È¡¢Á°Êý°ìÃ׸¡º÷¤â¹Ô¤¦¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

12.3 ¥Õ¥¡¥¤¥ë¸¡º÷

12.3.1 ¥Õ¥£¥ë¥¿


¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¡¢¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤¹¤ëºÝ¤Ë»È¤¦¥Õ¥£¥ë¥¿¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Þ¤¹¡£[ÄɲÃ] ¥Ü¥¿¥ó¤ò²¡¤¹¤³¤È¤Ç¿·µ¬¥¨¥ó¥È¥ê¤¬Äɲ䵤ì¤Þ¤¹¤Î¤Ç¡¢¥ê¥¹¥ÈÆâ¤Î¥»¥ë¤òľÀÜÊѹ¹¤·¤Þ¤¹¡£³Æ¥¨¥ó¥È¥ê¤Ï¡Ö³ÈÄ¥»Ò¡×¡¢¡Ö¥Õ¥£¥ë¥¿¥³¥Þ¥ó¥É¡×¡¢¡Ö¥Õ¥¡¥¤¥ë¤ò³«¤¯ ¥³¥Þ¥ó¥É¡×¤Î 3 ¤Ä¤«¤é¤Ê¤ê¤Þ¤¹¡£

³ÈÄ¥»Ò¤Ë¤Ï¡¢¥Ô¥ê¥ª¥É¤ò´Þ¤à³ÈÄ¥»Ò¤ò»ØÄꤷ¤Þ¤¹¡£³ÈÄ¥»Ò¤Ï¡¢Âçʸ»ú¤È¾®Ê¸»ú¤Î¤É¤Á¤é¤Ë¤Ç¤â¥Þ¥Ã¥Á¤·¤Þ¤¹¡£Ê£¿ô¤Î³ÈÄ¥»Ò¤ò»ØÄꤹ¤ë¾ì¹ç¤Ë¤Ï¡¢¥«¥ó¥Þ¤Ç¶èÀڤà ¤ÆÎóµó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¡Ö¥Õ¥£¥ë¥¿¥³¥Þ¥ó¥É¡×¡¢¡Ö¥Õ¥¡¥¤¥ë¤ò³«¤¯¥³¥Þ¥ó¥É¡×¤Ï¾Êά¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£¾Êά¤·¤¿¾ì¹ç¤Ë¤Ï¡¢¥Õ¥£¥ë¥¿¤¬¼Â¹Ô¤µ¤ì¤Ê¤¤¤«¡¢¥Õ¥¡¥¤¥ë¤«¤é³«¤¯ºÝ¤Ë¥Ç¥Õ¥©¥ë ¥È¤Î¥³¥Þ¥ó¥É¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£


¡Ö¥Õ¥£¥ë¥¿¥³¥Þ¥ó¥É¡×¡¢¡Ö¥Õ¥¡¥¤¥ë¤ò³«¤¯¥³¥Þ¥ó¥É¡×¤Ç¤Ï¡¢°Ê²¼¤Ë¼¨¤¹ÆÃ¼ìʸ»ú¤¬»ÈÍѤǤ­¤Þ¤¹¡£

%f : ¥Õ¥¡¥¤¥ë̾¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë
%p : ¥Ú¡¼¥¸¿ô¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë (*1)
%l : ¹ÔÈÖ¹æ¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë (*2)

Îã) xpdf -remove ebview %f %p
xpdf¤ò»È¤Ã¤Æ¡¢»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤Î³ºÅö¥Ú¡¼¥¸¤òɽ¼¨¤·¤Þ¤¹¡£

*1 ¥Ú¡¼¥¸ÈÖ¹æ¤Ï 1 ¤«¤é¤Ï¤¸¤Þ¤ê¡¢¥Õ¥¡¥¤¥ëÆâ¤Ë 0x0c ¤¬¤¢¤ë¤È¥¤¥ó¥¯¥ê¥á¥ó¥È¤µ¤ì¤Þ¤¹¡£
*2 ¹ÔÈÖ¹æ¤Ï 1 ¤«¤é¤Ï¤¸¤Þ¤ê¡¢¥Õ¥¡¥¤¥ëÆâ¤Ë 0x0a ¤¬¤¢¤ë¤È¥¤¥ó¥¯¥ê¥á¥ó¥È¤µ¤ì¤Þ¤¹¡£

¤Ê¤ª¡¢¥Ç¥£¥ì¥¯¥È¥ê¥Ä¥ê¡¼ (¸¡º÷Âоݤò»ØÄꤹ¤ë¤¿¤á¤Î¥Ä¥ê¡¼²èÌÌ) ¤Ç¥Õ¥¡¥¤¥ë¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤¿¾ì¹ç¤Ë¤â¡¢¤³¤³¤Ç»ØÄꤷ¤¿¡Ö¥Õ¥¡¥¤¥ë¤ò³«¤¯¥³¥Þ¥ó¥É¡×¤ò»È¤¤¤Þ¤¹¤¬¡¢¥Ú¡¼¥¸¿ô¤È¹ÔÈÖ¹æ¤Ï¶¦¤Ë 1 ¤Ë¤Ê¤ê¤Þ¤¹¡£

12.3.2 ¥­¥ã¥Ã¥·¥å

ºÇÂ祭¥ã¥Ã¥·¥å¥µ¥¤¥º¤ò MB ñ°Ì¤Ç»ØÄꤷ¤Þ¤¹¡£

¸¡º÷¤ò¹â®¤Ë¤¹¤ë¤¿¤á¡¢¥Õ¥£¥ë¥¿¤ÇÊÑ´¹¤·¤¿¥Õ¥¡¥¤¥ë¤Ï¡¢¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤È¤·¤ÆÊÝ»ý¤µ¤ì¡¢¼¡²ó¸¡º÷»þ¤ËÍøÍѤµ¤ì¤Þ¤¹¡£¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤Î¹ç·×¤¬¤³¤³¤Ç»ØÄꤷ¤¿¥µ¥¤¥º¤òͤ¨¤ë¤È¡¢¸Å¤¤¥Õ¥¡¥¤¥ë¤«¤éºï½ü¤µ¤ì¤Æ¤¤¤­¤Þ¤¹¡£

¥­¥ã¥Ã¥·¥å¤ò¥¯¥ê¥¢¤¹¤ë¤Ë¤Ï [¥­¥ã¥Ã¥·¥å¤ò¥¯¥ê¥¢] ¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£

12.3.3 ¤½¤Î¾


Á°¸å¤Ë ɽ¼¨¤¹¤ë¹Ô¿ô
¸¡º÷¤·¤¿·ë²Ì¡¢¥Þ¥Ã¥Á¤·¤¿¹Ô¤òÃæ¿´¤È¤·¤Æ¡¢¤³¤³¤Ç»ØÄꤷ¤¿¿ô¤Î¹Ô¤¬Á°¸å¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¿ôÃͤòÂ礭¤¯¤¹¤ë¤Èɽ¼¨¤Ë»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£

Á°¸å¤Îʸ»ú¿ô
¸¡º÷¸ì¤ÎÁ°¸å¤Ë¤³¤³¤Ç»ØÄꤷ¤¿¿ô¤Îʸ»ú¤ò¹ç¤ï¤»¤¿¤â¤Î¤¬¸«½Ð¤·¸ì¤È¤·¤ÆÉ½¼¨¤µ¤ì¤Þ¤¹¡£

12.4 ¥·¥ç¡¼¥È¥«¥Ã¥È


¥­¡¼¥Ü¡¼¥É¥·¥ç¡¼¥È¥«¥Ã¥È¤òÄêµÁ¤·¤Þ¤¹¡£ ²èÌ̺¸Â¦¤¬ÄêµÁºÑ¤Î¥·¥ç¡¼¥È¥«¥Ã¥È¡¢²èÌ̱¦Â¦¤¬³ä¤êÅö¤Æ¤ë¤³¤È¤Î¤Ç¤­¤ë¥³¥Þ¥ó¥É¤Î°ìÍ÷¤Ç¤¹¡£±¦¾å¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤«¤é¥·¥ç¡¼¥È¥«¥Ã¥È¥­¡¼¤ò²¡¤·¡¢³ä¤êÅö¤Æ ¤¿¤¤¥³¥Þ¥ó¥É¤òÁªÂò¤·¤Æ [ÄɲÃ] ¥Ü¥¿¥ó¤ò²¡¤·¤Þ¤¹¡£

Ʊ°ì¤Î¥³¥Þ¥ó¥É¤Ë°Û¤Ê¤ëÊ£¿ô¤Î¥­¡¼¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£µÕ¤ËƱ°ì¤Î¥­¡¼¤Ë°Û¤Ê¤ë¥³¥Þ¥ó¥É¤ò³ä¤êÅö¤Æ¤Æ¤â¡¢ºÇ½é¤Î¥³¥Þ¥ó¥É¤À¤±¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£

[¥í¥Ã¥¯¥­¡¼¤ò̵»ë]¤òÍ­¸ú¤Ë¤·¤Æ¤¤¤Ê¤¤¤È¡¢¥í¥Ã¥¯¥­¡¼¤Þ¤Ç´Þ¤á¤¿¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤¬¥·¥ç¡¼¥È¥«¥Ã¥È¤È¤Ê¤ê¤Þ¤¹¡£


12.5 ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷


¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷¤Ç»È¤¦¸¡º÷¥¨¥ó¥¸¥ó¤òÅÐÏ¿¤·¤Þ¤¹¡£¤³¤³¤ÇÅÐÏ¿¤·¤¿ÆâÍÆ¤Ë½¾¤Ã¤Æ URL ¤¬ÁȤßΩ¤Æ¤é¤ì¡¢Web ¥Ö¥é¥¦¥¶¤ËÁ÷¤é¤ì¤Þ¤¹¡£ºÇ½ªÅª¤Ê URL ¤Ï¡¢[Á°¤Ë¤Ä¤±¤ëʸ»úÎó]¡¢[¸¡º÷¸ì]¡¢[¸å¤í¤Ë¤Ä¤±¤ëʸ»úÎó]¤Î½ç¤Çʸ»úÎó¤ò·ë¹ç¤·¤¿¤â¤Î¤Ë¤Ê¤ê¤Þ¤¹¡£¸¡º÷¸ì¤òÊ£¿ô»ØÄꤷ¤¿¾ì¹ç¤Ë¤Ï¡¢³Æ¸¡º÷¸ì¤Ï [·ë¹çʸ»úÎó] ¤Ç·ë¹ç¤µ¤ì¤Þ¤¹¡£

¸¡º÷¸ì¤È¤·¤ÆÆüËܸì¤òÆþÎϤ¹¤ë¤È¡¢"%B8%A1%BA%F7" ¤Î¤è¤¦¤Ê¡¢Ê¸»ú¥³¡¼¥É¤ò¼¨¤¹±Ñ¿ô»ú¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¤¬¡¢¤½¤ÎºÝ [ʸ»ú¥³¡¼¥É] ¤Ç»ØÄꤷ¤¿¥³¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£¸¡º÷¥¨¥ó¥¸¥ó¤Ë¤è¤Ã¤Æ¤ÏÆÃÄê¤Îʸ»ú¥³¡¼¥É¤·¤«»È¤¨¤Ê¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤½¤Î¤è¤¦¤Ê»þ¤Ë»ØÄꤷ¤Þ¤¹¡£

¤Ê¤ª¡¢¸¡º÷¥¨¥ó¥¸¥ó¤È¤·¤Æ»ÈÍѤǤ­¤ë¤Î¤Ï HTTP ¤Î "get" ¥á¥½¥Ã¥É¤ò»È¤Ã¤¿¥µ¥¤¥È¤À¤±¤Ç¤¹¡£"put" ¥á¥½¥Ã¥É¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£

¤Þ¤¿¡¢¡Ö±Ñ¼­Ïº on the Web¡×¤Î¤è¤¦¤Ë¡¢¸¡º÷¥µ¥¤¥È¤Ë¤è¤Ã¤Æ¤Ï¥Ö¥é¥¦¥¶¤Ë¤è¤ë¥È¥Ã¥×¥Ú¡¼¥¸¤«¤é¤Î¸¡º÷°Ê³°¤Î»È¤¤Êý¤ò¶Ø»ß¤·¤Æ¤¤¤ë¾ì¹ç¤â¤¢¤ê¤Þ¤¹¡£¤³¤Î¤è¤¦¤Ê¥µ¥¤¥È¤òÅÐÏ¿¤¹¤ë¤Èµ¬Ìó°ãÈ¿¤È¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤´Ãí°Õ¤¯¤À¤µ¤¤¡£


12.6 ³°Éô¥×¥í¥°¥é¥à


EBView ¤¬»È¤¦³°Éô¥×¥í¥°¥é¥à¤òÅÐÏ¿¤·¤Þ¤¹¡£Windows¤Ç¤Ï¡¢³°Éô¥×¥í¥°¥é¥à¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤È¡¢¥¨¥¯¥¹¥×¥í¡¼¥é¤Î¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬µ¯Æ°¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢Web ¥Ö¥é¥¦¥¶µ¯Æ°¥³¥Þ¥ó¥É¤Ë²¿¤â»ØÄꤷ¤Ê¤¤¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï InternetExplorer ¤¬µ¯Æ°¤·¤Þ¤¹¡£

ÆâÉô¤Ç²»À¼¤òºÆÀ¸
¤³¤ì¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤È¡¢EBView ¤ÎÆâÉô¥ë¡¼¥Á¥ó¤ò»È¤Ã¤Æ²»À¼¤òºÆÀ¸¤·¤Þ¤¹¡£Windows ¤À¤±¤ÇÍ­¸ú¤Ç¤¹¡£

²»À¼ºÆÀ¸¥×¥í¥°¥é¥à
²»À¼¤òºÆÀ¸¤¹¤ëºÝ¤Ë»È¤¦¥×¥í¥°¥é¥à¤Ç¤¹¡£WAVE ¥Õ¥¡¥¤¥ë¤¬ºÆÀ¸¤Ç¤­¤ë¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£

ư²èºÆÀ¸¥×¥í¥°¥é¥à
ư²è¤òºÆÀ¸¤¹¤ëºÝ¤Ë»È¤¦¥×¥í¥°¥é¥à¤Ç¤¹¡£MPEG ¥Õ¥¡¥¤¥ë¤¬ºÆÀ¸¤Ç¤­¤ë¥×¥í¥°¥é¥à¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£

Web ¥Ö¥é¥¦¥¶µ¯Æ°¥³¥Þ¥ó¥É
Web ¥Ö¥é¥¦¥¶¤òµ¯Æ°¤¹¤ë¤¿¤á¤Î¥³¥Þ¥ó¥É¤Ç¤¹¡£

¥Õ¥¡¥¤¥ë¤ò³«¤¯¥Ç¥Õ¥©¥ë¥È¤Î¥³¥Þ¥ó¥É
¥Õ¥¡¥¤¥ë¸¡º÷¤Ç¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¯¤¿¤á¤Î¥³¥Þ¥ó¥É¤¬¥Õ¥£¥ë¥¿ÄêµÁÆâ¤Ë¤Ê¤¤¾ì¹ç¡¢¤³¤³¤Ç»ØÄꤷ¤¿¥³¥Þ¥ó¥É¤¬»È¤ï¤ì¤Þ¤¹¡£


¤¤¤º¤ì¤Î¾ì¹ç¤â¡¢°Ê²¼¤ÎÆÃ¼ìʸ»ú¤¬»ÈÍѤǤ­¤Þ¤¹¡£

%f : ¥Õ¥¡¥¤¥ë̾¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë
%p : ¥Ú¡¼¥¸¿ô¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë (¥Õ¥¡¥¤¥ë¸¡º÷¤Î¤ß)
%l : ¹ÔÈÖ¹æ¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë (¥Õ¥¡¥¤¥ë¸¡º÷¤Î¤ß)


¡¡

¡¡

13. ¥é¥¤¥»¥ó¥¹¡¦ÌÈÀÕ»ö¹à

¡¡


EBView ¤Ï GNU General Public License ¤Ë½¾¤Ã¤¿¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£¤³¤Î
¥×¥í¥°¥é¥à¤ÎÍøÍѤËÅö¤¿¤Ã¤Æ¤Ïºî¼Ô¤Ï¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤¤¤Þ¤»¤ó¡£¾Ü¤·¤¯¤Ï
COPYING ¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£


¡¡

14. ¼Õ¼­

¡¡


EB ¥é¥¤¥Ö¥é¥ê¤ò³«È¯¤µ¤ì¤¿³Þ¸¶¤µ¤ó¤Ë´¶¼Õ¤·¤Þ¤¹¡£EB ¥é¥¤¥Ö¥é¥ê¤¬¤Ê¤±¤ì¤Ð¡¢¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤â³«È¯¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£

¤Þ¤¿¡¢EBView ¤Î³«È¯¤Ë¤¢¤¿¤ê¡¢°Ê²¼¤ÎÊý¡¹¤Ë¤´¶¨ÎϤ¤¤¿¤À¤­¤Þ¤·¤¿¡£¤³¤Î¾ì¤ò¼Ú¤ê¤Þ¤·¤Æ¤ªÎ鿽¤·¾å¤²¤Þ¤¹¡£


¤ä¤Þ¤À ¤¢¤­¤é ¤µ¤ó
Æ£°æ ¹¨·û ¤µ¤ó
º´¸ÅÅÄ ¤µ¤ó
ȬÅÄ ¿¿¹Ô ¤µ¤ó
¾®ÌîÅÄ ¿· ¤µ¤ó
ë¼ ¿¸ ¤µ¤ó
Francis Bond ¤µ¤ó
¾®Ìî ůÃË ¤µ¤ó
½Å¼ Ë¡¹î ¤µ¤ó
KATO Tsuguru ¤µ¤ó
¾¾ËÜ ¤µ¤ó
­±Ê ÂóϺ ¤µ¤ó
Kazuki Ohta ¤µ¤ó
Åĸ¶ ½Ó°ì ¤µ¤ó
Masatake YAMATO ¤µ¤ó


¡¡

15. ºî¼Ô¤Ø¤ÎÏ¢ÍíÀè

¡¡


¥Ð¥°¤ÎÊó¹ð¡¢¼ÁÌäÅù¤Ï°Ê²¼¤Ë¤ª´ê¤¤¤·¤Þ¤¹¡£¤Þ¤¿¡¢¤¤¤í¤¤¤í¤Ê¥Õ¥£¡¼¥É¥Ð¥Ã¥¯¤òÆÃ¤Ë´¿·Þ¤·¤Þ¤¹¡£

¿ÜÆ£¸­°ì (Kenichi SUTO)

E-Mail : <deep_blue@users.sourceforge.net>








ebview-0.3.6.2/doc/ja/index.html0000644000175000017500000000053110015070533015604 0ustar mhattamhatta EBView ¥Þ¥Ë¥å¥¢¥ë ebview-0.3.6.2/configure0000755000175000017500000156110711241636762014411 0ustar mhattamhatta#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for ebview 0.3.6.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software # Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://ebview.sourceforge.net/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ebview' PACKAGE_TARNAME='ebview' PACKAGE_VERSION='0.3.6.2' PACKAGE_STRING='ebview 0.3.6.2' PACKAGE_BUGREPORT='http://ebview.sourceforge.net/' PACKAGE_URL='' ac_unique_file="src/ebview.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS EXTRA_LIBS RES_FILE CYGWIN_CFLAGS THREAD_LIBS XMKMF EBCONF_INTLLIBS EBCONF_INTLINCS EBCONF_PTHREAD_LDFLAGS EBCONF_PTHREAD_CFLAGS EBCONF_PTHREAD_CPPFLAGS EBCONF_ZLIBLIBS EBCONF_ZLIBINCS EBCONF_EBLIBS EBCONF_EBINCS OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL PANGOX_LIBS PANGOX_CFLAGS GTK_LIBS GTK_CFLAGS PKG_CONFIG LN_S MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_eb_conf with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GTK_CFLAGS GTK_LIBS PANGOX_CFLAGS PANGOX_LIBS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ebview 0.3.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ebview] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ebview 0.3.6.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-eb-conf=FILE eb.conf file is FILE [SYSCONFDIR/eb.conf] --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config PANGOX_CFLAGS C compiler flags for PANGOX, overriding pkg-config PANGOX_LIBS linker flags for PANGOX, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ebview configure 0.3.6.2 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## --------------------------------------------- ## ## Report this to http://ebview.sourceforge.net/ ## ## --------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ebview $as_me 0.3.6.2, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=ebview VERSION=0.3.6.2 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" ALL_LINGUAS="ja" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = x""yes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0.0"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 as_fn_error "Package requirements (gtk+-2.0 >= 2.0.0) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANGOX" >&5 $as_echo_n "checking for PANGOX... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PANGOX_CFLAGS"; then pkg_cv_PANGOX_CFLAGS="$PANGOX_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pangox\""; } >&5 ($PKG_CONFIG --exists --print-errors "pangox") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGOX_CFLAGS=`$PKG_CONFIG --cflags "pangox" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PANGOX_LIBS"; then pkg_cv_PANGOX_LIBS="$PANGOX_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pangox\""; } >&5 ($PKG_CONFIG --exists --print-errors "pangox") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PANGOX_LIBS=`$PKG_CONFIG --libs "pangox" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PANGOX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pangox"` else PANGOX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangox"` fi # Put the nasty error message in config.log where it belongs echo "$PANGOX_PKG_ERRORS" >&5 as_fn_error "Package requirements (pangox) were not met: $PANGOX_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PANGOX_CFLAGS and PANGOX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PANGOX_CFLAGS and PANGOX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." "$LINENO" 5; } else PANGOX_CFLAGS=$pkg_cv_PANGOX_CFLAGS PANGOX_LIBS=$pkg_cv_PANGOX_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6' macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:6506: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:6509: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:6512: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 7706 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8964: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8968: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9303: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9307: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9408: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9412: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9463: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9467: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 11846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 11942 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi for ac_header in limits.h do : ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIMITS_H 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi # Check whether --with-eb-conf was given. if test "${with_eb_conf+set}" = set; then : withval=$with_eb_conf; ebconf="${withval}" else ebconf=$sysconfdir/eb.conf fi if test X$prefix = XNONE; then PREFIX=$ac_default_prefix else PREFIX=$prefix fi ebconf=`echo X$ebconf | sed -e 's/^X//' -e 's;\${prefix};'"$PREFIX;g" \ -e 's;\$(prefix);'"$PREFIX;g"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eb.conf" >&5 $as_echo_n "checking for eb.conf... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ebconf" >&5 $as_echo "$ebconf" >&6; } if test -f ${ebconf}; then . ${ebconf} else as_fn_error "$ebconf not found" "$LINENO" 5 fi if test X$EBCONF_ENABLE_PTHREAD = Xyes; then $as_echo "#define EBCONF_ENABLE_PTHREAD 1" >>confdefs.h fi if test X$EBCONF_ENABLE_NLS = Xyes; then $as_echo "#define EBCONF_ENABLE_NLS 1" >>confdefs.h fi if test X$EBCONF_ENABLE_EBNET = Xyes; then $as_echo "#define EBCONF_ENABLE_EBNET 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EB Library" >&5 $as_echo_n "checking for EB Library... " >&6; } save_CPPFLAGS=$CPPFLAGS save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS save_LIBS=$LIBS CPPFLAGS="$CPPFLAGS $EBCONF_PTHREAD_CPPFLAGS $EBCONF_EBINCS $EBCONF_ZLIBINCS $EBCONF_INTLINCS" CFLAGS="$CFLAGS $EBCONF_PTHREAD_CFLAGS" LDFLAGS="$LDFAGS $EBCONF_PTHREAD_LDFLAGS" LIBS="$LIBS $EBCONF_EBLIBS $EBCONF_ZLIBLIBS $EBCONF_INTLLIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { eb_initialize_library(); return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : try_eb=yes else try_eb=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS=$save_CPPFLAGS CFLAGS=$save_CFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_eb" >&5 $as_echo "$try_eb" >&6; } if test ${try_eb} != yes; then as_fn_error "EB Library not available" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in fcntl.h malloc.h sys/ioctl.h sys/time.h unistd.h eb/eb.h iconv.h libintl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in mkdir select strdup strtol do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<_ACEOF #define LOCALEDIR "${PREFIX}/share/locale" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGEDIR "${PREFIX}/share/${PACKAGE}" _ACEOF case "`uname -s`" in CYGWIN_*) THREAD_LIBS=-lpthreadGC ;CYGWIN_CFLAGS="-mno-cygwin -mwindows -mms-bitfields";RES_FILE=ebview.res;EXTRA_LIBS="-lregex -lwinmm" ;; FreeBSD*) THREAD_LIBS=-pthread ;; Linux*) THREAD_LIBS=-lpthread ;; *) THREAD_LIBS=-lpthread ;; esac ac_config_files="$ac_config_files po/Makefile.in src/Makefile Makefile m4/Makefile data/Makefile doc/Makefile data/about.jp data/about.en" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by ebview $as_me 0.3.6.2, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ ebview config.status 0.3.6.2 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "data/about.jp") CONFIG_FILES="$CONFIG_FILES data/about.jp" ;; "data/about.en") CONFIG_FILES="$CONFIG_FILES data/about.en" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ebview-0.3.6.2/missing0000755000175000017500000002623311241363020014054 0ustar mhattamhatta#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ebview-0.3.6.2/src/0000755000175000017500000000000011241637665013261 5ustar mhattamhattaebview-0.3.6.2/src/pref_search.c0000644000175000017500000000627710013675516015713 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "headword.h" static GtkWidget *spin_max_search; static GtkWidget *check_word_search; gboolean pref_end_search(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : pref_end_search()"); max_search = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_max_search)); bword_search_automatic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_word_search)); update_tree_view(); LOG(LOG_DEBUG, "OUT : pref_end_search()"); return(TRUE); } GtkWidget *pref_start_search() { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkObject *adj; GtkWidget *table; GtkAttachOptions xoption=0, yoption=0; LOG(LOG_DEBUG, "IN : pref_start_search()"); vbox = gtk_vbox_new(FALSE,10); gtk_widget_set_size_request(vbox, 300, 200); xoption = GTK_SHRINK|GTK_FILL; yoption = GTK_SHRINK; table = gtk_table_new(3, 5, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1, xoption, yoption, 10, 10); label = gtk_label_new(_("Maximum hits to search")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 100, //value 0, // lower 1000, //upper 1, // step increment 10,// page_increment, 0.0); spin_max_search = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_max_search), max_search ); gtk_widget_set_size_request(spin_max_search,60,20); gtk_table_attach(GTK_TABLE(table), spin_max_search, 1, 2, 0, 1, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_max_search, _("Maximum number of hits to be searched.\nIf you increase this number, it takes time to search."),"Private"); check_word_search = gtk_check_button_new_with_label(_("Perform word search in automatic search")); gtk_tooltips_set_tip(tooltip, check_word_search, _("Perform word search in automatic search."),"Private"); gtk_table_attach(GTK_TABLE(table), check_word_search, 0, 1, 2, 3, xoption, yoption, 10, 10); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_word_search), bword_search_automatic); LOG(LOG_DEBUG, "OUT : pref_start_search()"); return(vbox); } ebview-0.3.6.2/src/popup.c0000644000175000017500000003607411241403610014557 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "link.h" #include "render.h" #include "eb.h" #include "history.h" #include "popup.h" #include "textview.h" #include "jcode.h" #include "pixmap.h" GtkWidget *popup=NULL; static GtkWidget *popup_scroll=NULL; static GtkWidget *title_label=NULL; static GtkWidget *image_pushpin=NULL; GtkWidget *popup_view=NULL; static const int title_height = 22; static gboolean bbutton_down=FALSE; static gboolean bpushpin_down=FALSE; static gfloat previous_x; static gfloat previous_y; static gint prev_x; static gint prev_y; static gint align_x = 10; static gint align_y = 10; GList *current_in_result=NULL; extern GtkWidget *main_view; extern GtkTextBuffer *text_buffer; extern GtkTextTagTable *tag_table; //static CONTENT_AREA *popup_area=NULL; static void update_result(RESULT *result); gint close_popup(GtkWidget *widget, gpointer data) { LOG(LOG_DEBUG, "IN : close_popup()"); if(popup != NULL){ gtk_text_view_set_buffer(GTK_TEXT_VIEW(popup_view), NULL); gtk_widget_destroy(popup_view); gtk_widget_destroy(popup); popup = NULL; bpushpin_down = FALSE; } LOG(LOG_DEBUG, "OUT : close_popup()"); return(TRUE); } static gint popup_button_press_event(GtkWidget *widget, GdkEventButton *event) { RESULT *rp; GtkTextIter iter; guint offset; gint buffer_x, buffer_y; LOG(LOG_DEBUG, "IN : popup_button_press_event()"); if(event->type == GDK_BUTTON_PRESS){ if (event->button == 1){ gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT, (gint)(event->x), (gint)(event->y), &buffer_x, &buffer_y); gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(widget), &iter, buffer_x, buffer_y); offset = gtk_text_iter_get_offset(&iter); if(follow_link(offset) == TRUE){ LOG(LOG_DEBUG, "OUT : popup_button_press_event() = TRUE"); return(TRUE); } else { if(bpushpin_down == FALSE){ gtk_widget_destroy(popup); popup = NULL; } } } else if ((event->button == 2) || (event->button == 3)){ if(!current_in_result) return(TRUE); if (event->button == 2) { if(g_list_previous(current_in_result) == NULL){ return(TRUE); } current_in_result = g_list_previous(current_in_result); } else { if(g_list_next(current_in_result) == NULL){ return(TRUE); } current_in_result = g_list_next(current_in_result); } if(current_in_result == NULL) return(TRUE); rp = (RESULT *)(current_in_result->data); if(current_in_result){ show_popup(rp); } } } LOG(LOG_DEBUG, "OUT : popup_button_press_event()"); return(TRUE); } static gint title_click_event (GtkWidget *widget, GdkEventButton *event, gpointer data) { RESULT *rp; GdkModifierType mask; static GdkWindow *root_win = NULL; LOG(LOG_DEBUG, "IN : title_click_event()"); if(event->type == GDK_BUTTON_PRESS){ if ((event->button == 2) || (event->button == 3)){ return(FALSE); } if((strcmp(data, "<") == 0) || (strcmp(data, ">") == 0)){ if(strcmp(data, "<") == 0){ if(g_list_previous(current_in_result) == NULL){ return(FALSE); } current_in_result = g_list_previous(current_in_result); } else { if(g_list_next(current_in_result) == NULL){ return(FALSE); } current_in_result = g_list_next(current_in_result); } if(current_in_result == NULL) return(0); rp = (RESULT *)(current_in_result->data); if(current_in_result){ update_result(rp); } } else if(strcmp(data, "X") == 0){ gtk_widget_destroy(popup); popup = NULL; } else if(strcmp(data, "t") == 0){ bbutton_down = TRUE; root_win = gdk_window_foreign_new (GDK_ROOT_WINDOW ()); gdk_window_get_pointer (root_win, &prev_x, &prev_y, &mask); previous_x = event->x; previous_y = event->y; } else if(strcmp(data, "p") == 0){ GdkPixbuf *pixbuf; bbutton_down = TRUE; if(bpushpin_down == FALSE){ bpushpin_down = TRUE; pixbuf = create_pixbuf(IMAGE_PUSH_ON); gtk_image_set_from_pixbuf(GTK_IMAGE(image_pushpin), pixbuf); destroy_pixbuf(pixbuf); } else { bpushpin_down = FALSE; pixbuf = create_pixbuf(IMAGE_PUSH_OFF); gtk_image_set_from_pixbuf(GTK_IMAGE(image_pushpin), pixbuf); destroy_pixbuf(pixbuf); gtk_widget_destroy(popup); popup = NULL; } } } else if((event->button == 1) && (event->type == GDK_2BUTTON_PRESS)){ // Double click } LOG(LOG_DEBUG, "OUT : title_click_event()"); return(TRUE); } static gint title_release_event (GtkWidget *widget, GdkEventButton *event, gpointer data) { bbutton_down = FALSE; return(FALSE); } gint title_motion_event(GtkWidget *widget, GdkEventMotion *event) { gint mov_x, mov_y; gint win_x, win_y; gint xp, yp; GdkModifierType mask; static GdkWindow *root_win = NULL; //LOG(LOG_DEBUG, "IN : title_motion_event()"); if((event->state & GDK_BUTTON1_MASK) && bbutton_down){ root_win = gdk_window_foreign_new (GDK_ROOT_WINDOW ()); gdk_window_get_pointer (root_win, &xp, &yp, &mask); mov_x = xp - prev_x; mov_y = yp - prev_y; gdk_window_get_root_origin(popup->window, &win_x, &win_y); gtk_window_move(GTK_WINDOW(popup), win_x + mov_x, win_y + mov_y); prev_x = xp; prev_y = yp; } //LOG(LOG_DEBUG, "OUT : title_motion_event()"); return(FALSE); } static void move_popup_window() { GdkModifierType mask; gint pos_x, pos_y; gint pointer_x, pointer_y; gint root_x, root_y; gint window_width, window_height; GdkWindow *root_win = NULL; #ifdef __WIN32__ root_x = GetSystemMetrics(SM_CXSCREEN); root_y = GetSystemMetrics(SM_CYSCREEN); #else root_win = gdk_window_foreign_new (GDK_ROOT_WINDOW ()); gdk_window_get_size(root_win, &root_x, &root_y); #endif window_width = popup_width; window_height = popup_height; gdk_window_get_pointer(root_win, &pointer_x, &pointer_y, &mask); pos_x = pointer_x + align_x; pos_y = pointer_y + align_y; if(pos_x + window_width > root_x){ pos_x = root_x - window_width; } if(bshow_popup_title) { if(pos_y + window_height + title_height > root_y){ pos_y = root_y - window_height - title_height; } } else { if(pos_y + window_height > root_y){ pos_y = root_y - window_height; } } gtk_window_move(GTK_WINDOW(popup), pos_x, pos_y); } static void create_popup_window(){ gint window_width, window_height; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *eventbox; GtkWidget *image; GtkWidget *frame; GtkWidget *separator; #ifdef __WIN32__ HWND hWnd; long nStyle; #endif LOG(LOG_DEBUG, "IN : create_popup_window()"); // If there already is an window, use that position. // Move if the window is out of the screen. // gdk_window_get_position(popup->window, &pos_x, &pos_y); // gtk_widget_destroy(popup); // redraw = TRUE; window_width = popup_width; window_height = popup_height; /* popup = gtk_widget_new (GTK_TYPE_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "allow-shrink", TRUE, "allow-grow", TRUE, "default-width", window_width, "default-height", window_height, NULL); */ popup = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_resizable(GTK_WINDOW(popup), TRUE); gtk_window_set_default_size(GTK_WINDOW(popup), window_width, window_height); gtk_window_set_accept_focus(GTK_WINDOW(popup), FALSE); move_popup_window(); gtk_window_set_wmclass(GTK_WINDOW(popup), "Popup", "EBView"); g_signal_connect(G_OBJECT(popup), "delete_event", G_CALLBACK(close_popup), NULL); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (popup), vbox); if(bshow_popup_title){ frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add( GTK_CONTAINER(frame), hbox); eventbox = gtk_event_box_new(); gtk_box_pack_start(GTK_BOX(hbox), eventbox, FALSE, FALSE, 2); g_signal_connect(G_OBJECT(eventbox),"button_press_event", G_CALLBACK(title_click_event), (gpointer)"p"); image_pushpin = create_image(IMAGE_PUSH_OFF); gtk_container_add( GTK_CONTAINER(eventbox), image_pushpin); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 0); eventbox = gtk_event_box_new(); gtk_box_pack_start(GTK_BOX(hbox), eventbox, FALSE, FALSE, 2); g_signal_connect(G_OBJECT(eventbox),"button_press_event", G_CALLBACK(title_click_event), (gpointer)"<"); image = create_image(IMAGE_SMALL_LEFT); gtk_container_add( GTK_CONTAINER(eventbox), image); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 0); eventbox = gtk_event_box_new(); gtk_box_pack_start(GTK_BOX(hbox), eventbox, TRUE, TRUE, 2); g_signal_connect(G_OBJECT(eventbox),"button_press_event", G_CALLBACK(title_click_event), (gpointer)"t"); g_signal_connect(G_OBJECT(eventbox),"button_release_event", G_CALLBACK(title_release_event), (gpointer)NULL); g_signal_connect(G_OBJECT(eventbox),"motion_notify_event", G_CALLBACK(title_motion_event), (gpointer)NULL); title_label = gtk_label_new("x of x"); gtk_container_add( GTK_CONTAINER(eventbox), title_label); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 0); eventbox = gtk_event_box_new(); gtk_box_pack_end(GTK_BOX(hbox), eventbox, FALSE, FALSE, 2); g_signal_connect(G_OBJECT(eventbox),"button_press_event", G_CALLBACK(title_click_event), (gpointer)"X"); image = create_image(IMAGE_SMALL_CLOSE); gtk_container_add( GTK_CONTAINER(eventbox), image); separator = gtk_vseparator_new(); gtk_box_pack_end(GTK_BOX(hbox), separator, FALSE, FALSE, 0); eventbox = gtk_event_box_new(); gtk_box_pack_end(GTK_BOX(hbox), eventbox, FALSE, FALSE, 2); g_signal_connect(G_OBJECT(eventbox),"button_press_event", G_CALLBACK(title_click_event), (gpointer)">"); image = create_image(IMAGE_SMALL_RIGHT); gtk_container_add( GTK_CONTAINER(eventbox), image); } frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); popup_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (popup_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(frame), popup_scroll); popup_view = gtk_text_view_new_with_buffer(text_buffer); gtk_text_view_set_editable(GTK_TEXT_VIEW(popup_view), FALSE); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(popup_view), 5); gtk_text_view_set_right_margin(GTK_TEXT_VIEW(popup_view), 5); gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(popup_view), 3); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(popup_view), 3); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(popup_view), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(popup_view), GTK_WRAP_WORD); g_signal_connect(G_OBJECT(popup_view),"motion_notify_event", G_CALLBACK(motion_notify_event), (gpointer)NULL); g_signal_connect(G_OBJECT(popup_view),"button_press_event", G_CALLBACK(popup_button_press_event), (gpointer)NULL); gtk_container_add (GTK_CONTAINER (popup_scroll), popup_view); #ifndef __WIN32__ gtk_widget_realize(popup); gdk_window_set_decorations(popup->window, 0); #endif gtk_widget_show_all(popup); #ifdef __WIN32__ hWnd = GDK_WINDOW_HWND(popup->window); nStyle = GetWindowLong(hWnd, GWL_STYLE ); nStyle &= ~WS_CAPTION; SetWindowLong(hWnd, GWL_STYLE, nStyle ); SetWindowPos(hWnd, HWND_TOPMOST, pos_x, pos_y, window_width, window_height, SWP_FRAMECHANGED); #endif bbutton_down = FALSE; bpushpin_down = FALSE; LOG(LOG_DEBUG, "OUT : create_popup_window()"); } static gint scroll_to_top() { GtkTextIter iter; GtkTextMark *mark; LOG(LOG_DEBUG, "IN : scroll_to_top()"); gtk_text_buffer_get_start_iter (text_buffer, &iter); mark = gtk_text_buffer_create_mark(text_buffer, "start", &iter, TRUE); gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(popup_view), mark, 0.0, TRUE, 0.0, 0.0); gtk_text_buffer_delete_mark(text_buffer, mark); LOG(LOG_DEBUG, "OUT : scroll_to_top()"); return(0); } void show_result_in_popup() { current_in_result = search_result; show_popup(current_in_result->data); } static void update_result(RESULT *result) { gchar *text=NULL; GtkTextIter iter; CANVAS canvas; DRAW_TEXT l_text; gint length; gchar *euc_str; g_assert(result->type == RESULT_TYPE_EB); LOG(LOG_DEBUG, "IN : update_result()"); text = ebook_get_text(result->data.eb.book_info, result->data.eb.pos_text.page, result->data.eb.pos_text.offset); if(text == NULL) return; // Prevent the window from growing. //if(text[strlen(text)-1] == '\n') //text[strlen(text)-1] = '\0'; if(popup == NULL){ create_popup_window(); } // Program aborts if you enable this line. //gtk_text_view_set_buffer(GTK_TEXT_VIEW(main_view), NULL); clear_text_buffer(); gtk_text_buffer_get_start_iter (text_buffer, &iter); length = strlen(text); if(text[length-1] == '\n'){ text[length-1] = '\0'; length --; } l_text.text = text; l_text.length = length; canvas.buffer = text_buffer; canvas.iter = &iter; canvas.indent = 0; if(result->word != NULL){ euc_str = iconv_convert("utf-8", "euc-jp", result->word); draw_content(&canvas, &l_text, result->data.eb.book_info, NULL, euc_str); g_free(euc_str); } else { draw_content(&canvas, &l_text, result->data.eb.book_info, NULL, NULL); } gtk_text_buffer_get_start_iter (text_buffer, &iter); gtk_text_buffer_place_cursor(text_buffer, &iter); if(bshow_popup_title){ gchar title[256]; sprintf(title, "%d of %d", g_list_index(search_result, current_in_result->data) + 1, g_list_length(search_result)); gtk_label_set_text(GTK_LABEL(title_label), title); } gtk_adjustment_set_value( gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(popup_scroll)), 0); gtk_adjustment_set_value( gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(popup_scroll)), 0); g_free(text); set_current_result(result); gtk_timeout_add(10, scroll_to_top, NULL); LOG(LOG_DEBUG, "OUT : update_result()"); } void show_popup(RESULT *result) { LOG(LOG_DEBUG, "IN : show_popup()"); update_result(result); if(bpushpin_down == FALSE){ move_popup_window(); } gdk_window_show(GTK_WIDGET(popup)->window); gdk_window_focus(GTK_WIDGET(popup)->window, gtk_get_current_event_time()); LOG(LOG_DEBUG, "OUT : show_popup()"); } ebview-0.3.6.2/src/splash.c0000644000175000017500000000662610013675516014722 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pref_io.h" #include #define SPLASH_WIDTH 250 #define SPLASH_HEIGHT 120 static gint tag_timeout; static gboolean loading_dictgroup=0; GtkWidget *splash=NULL; GtkWidget *splash_label=NULL; static void *load_thread(void *arg) { load_dictgroup(); loading_dictgroup=0; return(NULL); } void load_dictgroup_background() { gint rc; pthread_attr_t thread_attr; pthread_t tid; LOG(LOG_DEBUG, "IN : load_dictgroup_background()"); pthread_attr_init (&thread_attr) ; pthread_attr_setstacksize (&thread_attr, 512*1024) ; LOG(LOG_DEBUG, "thread_create"); rc = pthread_create(&tid, &thread_attr, load_thread, (void *)NULL); if(rc != 0){ LOG(LOG_ERROR, "pthread_create: %s", strerror(errno)); exit(1); } LOG(LOG_DEBUG, "OUT : load_dictgroup_background()"); pthread_attr_destroy(&thread_attr); } static gint load_watch_thread(gpointer data){ if(loading_dictgroup){ // LOG(LOG_DEBUG, "OUT : watch_thread() : CONTINUE"); return(1); } gtk_timeout_remove(tag_timeout); gtk_widget_destroy(splash); gtk_main_quit(); return(0); } void splash_message(gchar *msg) { if((splash != NULL) && (splash_label != NULL)) gtk_label_set_text(GTK_LABEL(splash_label), msg); } void show_splash() { gint x, y; GdkWindow *root_win = NULL; gint root_x, root_y; GtkWidget *vbox; GtkWidget *label; GtkWidget *frame; #ifdef __WIN32__ root_x = GetSystemMetrics(SM_CXSCREEN); root_y = GetSystemMetrics(SM_CYSCREEN); #else root_win = gdk_window_foreign_new (GDK_ROOT_WINDOW ()); gdk_window_get_size(root_win, &root_x, &root_y); #endif x = (root_x - SPLASH_WIDTH) /2; y = (root_y - SPLASH_HEIGHT) /2; splash = gtk_window_new (GTK_WINDOW_POPUP); gtk_widget_set_size_request(splash, SPLASH_WIDTH, SPLASH_HEIGHT); gtk_window_move(GTK_WINDOW(splash), x, y); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); gtk_container_add (GTK_CONTAINER (splash), frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), "Welcome to EBView"); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(label), TRUE, TRUE, 0); label = gtk_label_new(_("Loading dictionary...")); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(label), TRUE, TRUE, 0); splash_label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(splash_label), TRUE, TRUE, 0); gtk_widget_show_all(splash); loading_dictgroup = 1; tag_timeout = gtk_timeout_add(200, load_watch_thread, NULL); load_dictgroup_background(); gtk_main(); } ebview-0.3.6.2/src/grep.h0000644000175000017500000000172010013675515014357 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GREP_H_ #define __GREP_H_ void grep_search(gchar *word); void show_file(RESULT *rp); void open_file(RESULT *rp); GtkWidget *create_grep_bar(); void update_grep_bar(); #endif /* __GREP_H_ */ ebview-0.3.6.2/src/pref_external.c0000644000175000017500000001322010013675516016252 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" GtkWidget *entry_wave; GtkWidget *entry_mpeg; GtkWidget *entry_browser; GtkWidget *entry_open; static GtkWidget *check_sound; gboolean pref_end_external(){ const gchar *text; LOG(LOG_DEBUG, "IN : pref_end_external()"); text = gtk_entry_get_text(GTK_ENTRY(entry_mpeg)); if(mpeg_template) free(mpeg_template); mpeg_template = strdup(text); text = gtk_entry_get_text(GTK_ENTRY(entry_wave)); if(wave_template) free(wave_template); wave_template = strdup(text); text = gtk_entry_get_text(GTK_ENTRY(entry_browser)); if(browser_template) free(browser_template); browser_template = strdup(text); text = gtk_entry_get_text(GTK_ENTRY(entry_open)); if(open_template) free(open_template); open_template = strdup(text); bplay_sound_internally = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_sound)); LOG(LOG_DEBUG, "OUT : pref_end_external()"); return(TRUE); } GtkWidget *pref_start_external() { GtkWidget *hbox; GtkWidget *vbox; GtkWidget *label; GtkSizeGroup *label_group; GtkSizeGroup *entry_group; label_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); entry_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); LOG(LOG_DEBUG, "IN : pref_start_external()"); vbox = gtk_vbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); // gtk_container_add(GTK_CONTAINER(frame), vbox); check_sound = gtk_check_button_new_with_label(_("Play sound internally")); gtk_box_pack_start (GTK_BOX(vbox) , check_sound,FALSE, FALSE, 5); gtk_tooltips_set_tip(tooltip, check_sound, _("Use internal routine to play sound. Valid only on windows."),"Private"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_sound), bplay_sound_internally); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 5); label = gtk_label_new(_("Command to play sound ")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); gtk_size_group_add_widget (label_group, label); entry_wave = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(hbox) , entry_wave,TRUE, TRUE, 0); gtk_size_group_add_widget (entry_group, entry_wave); gtk_tooltips_set_tip(tooltip, entry_wave, _("External command to play WAVE sound. %f will be replaced by data file name."),"Private"); gtk_entry_set_text(GTK_ENTRY(entry_wave), wave_template); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 5); label = gtk_label_new(_("Command to play movie ")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); gtk_size_group_add_widget (label_group, label); entry_mpeg = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(hbox) , entry_mpeg, TRUE, TRUE, 0); gtk_size_group_add_widget (entry_group, entry_mpeg); gtk_tooltips_set_tip(tooltip, entry_mpeg, _("External command to play MPEG movie. %f will be replaced by data file name."),"Private"); gtk_entry_set_text(GTK_ENTRY(entry_mpeg), mpeg_template); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 5); label = gtk_label_new(_("Command to launch web browser ")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); gtk_size_group_add_widget (label_group, label); entry_browser = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(hbox) , entry_browser, TRUE, TRUE, 0); gtk_size_group_add_widget (entry_group, entry_browser); gtk_tooltips_set_tip(tooltip, entry_browser, _("External command to launch Web browser. %f will be replaced by URL."),"Private"); gtk_entry_set_text(GTK_ENTRY(entry_browser), browser_template); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 5); label = gtk_label_new(_("Standard command to open file ")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); gtk_size_group_add_widget (label_group, label); entry_open = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(hbox) , entry_open, TRUE, TRUE, 0); gtk_size_group_add_widget (entry_group, entry_open); gtk_tooltips_set_tip(tooltip, entry_open, _("Standard command to open file. %f will be replaced by filename, %l by line number."),"Private"); gtk_entry_set_text(GTK_ENTRY(entry_open), open_template); LOG(LOG_DEBUG, "OUT : pref_start_external()"); return(vbox); } ebview-0.3.6.2/src/pref_color.c0000644000175000017500000002231511241635664015557 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "preference.h" #include "selection.h" #include "pref_io.h" static GtkWidget *colorsel_dlg; static GtkWidget *entry_link; static GtkWidget *entry_keyword; static GtkWidget *entry_emphasis; static GtkWidget *entry_sound; static GtkWidget *entry_movie; static GtkWidget *entry_reverse_bg; gint color_no; static void ok_colorsel(GtkWidget *widget,gpointer *data){ GdkColor color; gchar *color_name; LOG(LOG_DEBUG, "IN : ok_colorsel()"); gtk_grab_remove(colorsel_dlg); gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->colorsel), &color); color_name = gtk_color_selection_palette_to_string(&color, 1); switch(color_no){ case COLOR_LINK: gtk_entry_set_text(GTK_ENTRY(entry_link), color_name); break; case COLOR_KEYWORD: gtk_entry_set_text(GTK_ENTRY(entry_keyword), color_name); break; case COLOR_SOUND: gtk_entry_set_text(GTK_ENTRY(entry_sound), color_name); break; case COLOR_MOVIE: gtk_entry_set_text(GTK_ENTRY(entry_movie), color_name); break; case COLOR_EMPHASIS: gtk_entry_set_text(GTK_ENTRY(entry_emphasis), color_name); break; case COLOR_REVERSE_BG: gtk_entry_set_text(GTK_ENTRY(entry_reverse_bg), color_name); break; } gtk_widget_destroy(colorsel_dlg); LOG(LOG_DEBUG, "OUT : ok_colorsel()"); } static void delete_colorsel( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : delete_colorsel()"); ok_colorsel(NULL, NULL); LOG(LOG_DEBUG, "OUT : delete_colorsel()"); } static void show_colorsel(GtkWidget *widget,gpointer *data){ GdkColor color; const gchar *text=NULL; LOG(LOG_DEBUG, "IN : show_colorsel()"); color_no = (gint)(intptr_t)data; colorsel_dlg = gtk_color_selection_dialog_new(_("Choose Color")); g_signal_connect (G_OBJECT(colorsel_dlg), "delete_event", G_CALLBACK(delete_colorsel), NULL); g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->ok_button), "clicked", G_CALLBACK(ok_colorsel), NULL); g_signal_connect_swapped(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)colorsel_dlg); g_assert(color_no < NUM_COLORS); switch(color_no){ case COLOR_LINK: text = gtk_entry_get_text(GTK_ENTRY(entry_link)); break; case COLOR_KEYWORD: text = gtk_entry_get_text(GTK_ENTRY(entry_keyword)); break; case COLOR_SOUND: text = gtk_entry_get_text(GTK_ENTRY(entry_sound)); break; case COLOR_MOVIE: text = gtk_entry_get_text(GTK_ENTRY(entry_movie)); break; case COLOR_EMPHASIS: text = gtk_entry_get_text(GTK_ENTRY(entry_emphasis)); break; case COLOR_REVERSE_BG: text = gtk_entry_get_text(GTK_ENTRY(entry_reverse_bg)); break; } /* if(text[0] == '#'){ strncpy(colorname, &text[1], 2); colorname[2] = '\0'; color_val = strtol(colorname, NULL, 16); color.red = color_val * 256; strncpy(colorname, &text[3], 2); colorname[2] = '\0'; color_val = strtol(colorname, NULL, 16); color.green = color_val * 256; strncpy(colorname, &text[5], 2); colorname[2] = '\0'; color_val = strtol(colorname, NULL, 16); color.blue = color_val * 256; } else { */ gdk_color_parse(text, &color); /* } */ gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->colorsel), &color); gtk_widget_show_all(colorsel_dlg); gtk_grab_add(colorsel_dlg); LOG(LOG_DEBUG, "OUT : show_colorsel()"); } gboolean pref_end_color() { const gchar *colorname; gint i; LOG(LOG_DEBUG, "IN : pref_end_color()"); for(i=0 ; i < NUM_COLORS ; i ++){ if(color_str[i]) free(color_str[i]); } colorname = gtk_entry_get_text(GTK_ENTRY(entry_link)); color_str[COLOR_LINK] = strdup(colorname); colorname = gtk_entry_get_text(GTK_ENTRY(entry_keyword)); color_str[COLOR_KEYWORD] = strdup(colorname); colorname = gtk_entry_get_text(GTK_ENTRY(entry_sound)); color_str[COLOR_SOUND] = strdup(colorname); colorname = gtk_entry_get_text(GTK_ENTRY(entry_movie)); color_str[COLOR_MOVIE] = strdup(colorname); colorname = gtk_entry_get_text(GTK_ENTRY(entry_emphasis)); color_str[COLOR_EMPHASIS] = strdup(colorname); colorname = gtk_entry_get_text(GTK_ENTRY(entry_reverse_bg)); color_str[COLOR_REVERSE_BG] = strdup(colorname); // free_colors(); // alloc_colors(); LOG(LOG_DEBUG, "OUT : pref_end_color()"); return(TRUE); } GtkWidget *pref_start_color(){ GtkWidget *vbox; GtkWidget *button; GtkWidget *table; GtkWidget *label; GtkAttachOptions xoption, yoption; LOG(LOG_DEBUG, "IN : pref_start_colrosel()"); vbox = gtk_vbox_new(FALSE, 0); gtk_widget_set_size_request(vbox, 300, 200); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); xoption = GTK_SHRINK; yoption = GTK_SHRINK; table = gtk_table_new(3, 7, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); label = gtk_label_new(_("Link")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, xoption, yoption, 10, 10); entry_link = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_link), color_str[COLOR_LINK]); gtk_widget_set_size_request(entry_link,100,20); gtk_table_attach(GTK_TABLE(table), entry_link, 1, 2, 0, 1, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)0); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 0, 1, xoption, yoption, 10, 10); label = gtk_label_new(_("Keyword")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, xoption, yoption, 10, 10); entry_keyword = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_keyword), color_str[COLOR_KEYWORD]); gtk_widget_set_size_request(entry_keyword,100,20); gtk_table_attach(GTK_TABLE(table), entry_keyword, 1, 2, 1, 2, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)1); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 1, 2, xoption, yoption, 10, 10); label = gtk_label_new(_("Sound")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, xoption, yoption, 10, 10); entry_sound = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_sound), color_str[COLOR_SOUND]); gtk_widget_set_size_request(entry_sound,100,20); gtk_table_attach(GTK_TABLE(table), entry_sound, 1, 2, 2, 3, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)2); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 2, 3, xoption, yoption, 10, 10); label = gtk_label_new(_("Movie")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, xoption, yoption, 10, 10); entry_movie = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_movie), color_str[COLOR_MOVIE]); gtk_widget_set_size_request(entry_movie,100,20); gtk_table_attach(GTK_TABLE(table), entry_movie, 1, 2, 3, 4, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)3); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 3, 4, xoption, yoption, 10, 10); label = gtk_label_new(_("Emphasis")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, xoption, yoption, 10, 10); entry_emphasis = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_emphasis), color_str[COLOR_EMPHASIS]); gtk_widget_set_size_request(entry_emphasis,100,20); gtk_table_attach(GTK_TABLE(table), entry_emphasis, 1, 2, 4, 5, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)4); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 4, 5, xoption, yoption, 10, 10); label = gtk_label_new(_("Reverse Background")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, xoption, yoption, 10, 10); entry_reverse_bg = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_reverse_bg), color_str[COLOR_REVERSE_BG]); gtk_widget_set_size_request(entry_reverse_bg,100,20); gtk_table_attach(GTK_TABLE(table), entry_reverse_bg, 1, 2, 5, 6, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)5); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 5, 6, xoption, yoption, 10, 10); LOG(LOG_DEBUG, "OUT : pref_start_colrosel()"); return(vbox); } ebview-0.3.6.2/src/splash.h0000644000175000017500000000162510013675516014721 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __SPLASH_H__ #define __SPLASH_H__ #include "defs.h" void show_splash(); void splash_message(gchar *msg); #endif /* __SPLASH_H__ */ ebview-0.3.6.2/src/pref_gui.c0000644000175000017500000001506010016047006015206 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" static GtkWidget *spin_dict_label; static GtkWidget *spin_words; static GtkWidget *check_splash; static GtkWidget *check_heading_auto; static GtkWidget *spin_max_heading; static GtkWidget *check_button_color; gboolean pref_end_gui() { LOG(LOG_DEBUG, "IN : pref_end_gui()"); max_remember_words = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_words)); dict_button_length = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_dict_label)); bshow_splash = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_splash)); max_heading = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_max_heading)); bheading_auto_calc = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_heading_auto)); benable_button_color = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button_color)); LOG(LOG_DEBUG, "OUT : pref_end_gui()"); return(TRUE); } GtkWidget *pref_start_gui(){ GtkWidget *vbox; GtkWidget *hbox; GtkWidget *table; GtkWidget *label; GtkObject *adj; GtkAttachOptions xoption, yoption; LOG(LOG_DEBUG, "IN : pref_start_gui()"); vbox = gtk_vbox_new(FALSE, 0); gtk_widget_set_size_request(vbox, 300, 200); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); xoption = GTK_SHRINK|GTK_FILL; yoption = GTK_SHRINK; table = gtk_table_new(2, 12, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1, xoption, yoption, 10, 10); label = gtk_label_new(_("Maximum words in history")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 10, //value 0, // lower 20, //upper 1, // step increment 10,// page_increment, (gfloat)0.0); spin_words = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_words), max_remember_words ); gtk_widget_set_size_request(spin_words,60,20); gtk_table_attach(GTK_TABLE(table), spin_words, 1, 2, 0, 1, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_words, _("Maximum number of words to remember in word history"), "Private"); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 1, 2, xoption, yoption, 10, 10); label = gtk_label_new(_("Chars in dictionary bar")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 10, //value 1, // lower 32, //upper 1, // step increment 1,// page_increment, 0.0); spin_dict_label = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_dict_label), dict_button_length ); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_dict_label), TRUE); gtk_widget_set_size_request(spin_dict_label,60,20); gtk_table_attach(GTK_TABLE(table), spin_dict_label, 1, 2, 1, 2, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_dict_label, _("Specify the number of characters to display on top of each toggle buttons in dictionary bar."),"Private"); check_splash = gtk_check_button_new_with_label(_("Show splash screen")); gtk_tooltips_set_tip(tooltip, check_splash, _("Show splash screen on loading."),"Private"); gtk_table_attach(GTK_TABLE(table), check_splash, 0, 1, 5, 6, xoption, yoption, 10, 10); // gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_splash), bshow_splash); check_heading_auto = gtk_check_button_new_with_label(_("Calculate heading automatically")); gtk_tooltips_set_tip(tooltip, check_heading_auto, _("Calculate the number of cells in heading list to suit the window size."),"Private"); gtk_table_attach(GTK_TABLE(table), check_heading_auto, 0, 1, 6, 7, xoption, yoption, 10, 10); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_heading_auto), bheading_auto_calc); // hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 7, 8, xoption, yoption, 10, 10); label = gtk_label_new(_("Maximum hits to display")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 100, //value 1, // lower 1000, //upper 1, // step increment 10,// page_increment, 0.0); spin_max_heading = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_max_heading), max_heading ); gtk_widget_set_size_request(spin_max_heading,60,20); gtk_table_attach(GTK_TABLE(table), spin_max_heading, 1, 2, 7, 8, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_max_heading, _("Maximum number of hits to be displayed at once.\nYou can go forward and backward using buttons. Valid only if automatic calculation is disabled."), "Private"); // check_button_color = gtk_check_button_new_with_label(_("Enable dictionary button color")); gtk_tooltips_set_tip(tooltip, check_button_color, _("Enable background color of dictionary button."),"Private"); gtk_table_attach(GTK_TABLE(table), check_button_color, 0, 1, 8, 9, xoption, yoption, 10, 10); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button_color), benable_button_color); LOG(LOG_DEBUG, "OUT : pref_start_gui()"); return(vbox); } ebview-0.3.6.2/src/dump.h0000644000175000017500000000162010013675515014366 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DUMP_H__ #define __DUMP_H__ #include "defs.h" void dump_hex(); void dump_text(); void update_dump(); #endif /* __DUMP_H__ */ ebview-0.3.6.2/src/hook.h0000644000175000017500000000167510013675515014373 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __HOOK_H__ #define __HOOK_H__ #include "defs.h" #include "global.h" #include "eb.h" EB_Error_Code initialize_hooksets(); void finalize_hooksets(); #endif /* __HOOK_H__ */ ebview-0.3.6.2/src/dirtree.h0000644000175000017500000000214610013675515015063 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DIRTREE_H__ #define __DIRTREE_H__ GtkWidget *create_directory_tree(); void refresh_directory_tree(); GList *get_active_dir_list(); gchar *get_selected_directory(); gchar *native_to_generic(gchar *from); gchar *generic_to_native(gchar *from); gchar *fs_to_unicode(gchar *from); gchar *unicode_to_fs(gchar *from); #endif /* __DIRTREE_H__ */ ebview-0.3.6.2/src/render.c0000644000175000017500000005041210104726140014666 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "bmh.h" #include "eb.h" #include "jcode.h" #include "link.h" #include "xml.h" #include "xmlinternal.h" #include #define IMAGE_TYPE_JPEG 1 #define IMAGE_TYPE_COLOR_BMP 2 #define IMAGE_TYPE_MONO_BMP 3 #define IMAGE_TYPE_GRAY_BMP 4 gint calculate_gaiji_size(gint height){ gint size=16; if(height < 24) size = 16; else if(height < 30) size = 24; else if(height < 48) size = 30; else size = 48; return(size); } GdkPixbuf *load_xbm(BOOK_INFO *binfo, gchar *name, gint *w, gint *h, gchar *color){ gint width, height; gchar **data = NULL; GList **gaiji_cache=NULL; GList *gaiji_item; GAIJI_CACHE *gaiji_p=NULL; gint found=0; gint char_no; GdkPixbuf *pixbuf; gint size; char_no = strtol(&name[1], NULL, 16); found = 0; size = calculate_gaiji_size(font_height); size = check_gaiji_size(binfo, size); if(name[0] == 'h'){ switch(size){ case 16: gaiji_cache = &(binfo->gaiji_narrow16); break; case 24: gaiji_cache = &(binfo->gaiji_narrow24); break; case 30: gaiji_cache = &(binfo->gaiji_narrow30); break; case 48: gaiji_cache = &(binfo->gaiji_narrow48); break; } } else { switch(size){ case 16: gaiji_cache = &(binfo->gaiji_wide16); break; case 24: gaiji_cache = &(binfo->gaiji_wide24); break; case 30: gaiji_cache = &(binfo->gaiji_wide30); break; case 48: gaiji_cache = &(binfo->gaiji_wide48); break; } } if(gaiji_cache == NULL){ LOG(LOG_INFO, "gaiji_chache == NULL"); return(NULL); } gaiji_item = g_list_first(*gaiji_cache); while(gaiji_item != NULL){ gaiji_p = gaiji_item->data; if(gaiji_p->code == char_no){ found = 1; break; } gaiji_item = g_list_next(gaiji_item); } if(found){ data = gaiji_p->data; width = gaiji_p->width; height = gaiji_p->height; // Rewrite it since you cannot tell which color is in cache g_free(data[2]); if(color == NULL) data[2] = g_strdup_printf(". c Black"); else data[2] = g_strdup_printf(". c %s", color); pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)data); } else { data = read_gaiji_as_xpm(binfo, name, size, &width, &height, color); if(data == NULL){ LOG(LOG_CRITICAL, "failed to read gaiji : %s", name); return(NULL); } pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)data); gaiji_p = (GAIJI_CACHE *)calloc(sizeof(GAIJI_CACHE), 1); if(gaiji_p == NULL){ LOG(LOG_ERROR, "No memory"); exit(1); } gaiji_p->code = char_no; gaiji_p->data = data; gaiji_p->width = width; gaiji_p->height = height; *gaiji_cache = g_list_append(*gaiji_cache, gaiji_p); } *w = width; *h = height; return(pixbuf); } static void draw_string2(CANVAS *canvas, DRAW_TEXT *text, TAG *tag) { gchar *euc_str; gchar *utf_str; gint tag_count=0; GtkTextTag *tags[8]; //LOG(LOG_DEBUG, "IN : draw_string2()"); euc_str = g_strndup(text->text, text->length); utf_str = iconv_convert("euc-jp", "utf-8", euc_str); if(tag == NULL){ if((0 <= canvas->indent) && (canvas->indent < MAX_INDENT)){ gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tag_plain, tag_indent[canvas->indent], NULL); } else { gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tag_plain, NULL); } goto END; } tag->start = gtk_text_iter_get_offset(canvas->iter); if((!(tag->type & TAG_TYPE_EMPHASIS)) && (!(tag->type & TAG_TYPE_ITALIC)) && (!(tag->type & TAG_TYPE_SUPERSCRIPT)) && (!(tag->type & TAG_TYPE_SUBSCRIPT))) tags[tag_count++] = tag_plain; if(tag->type & TAG_TYPE_KEYWORD){ tags[tag_count++] = tag_keyword; } if(tag->type & TAG_TYPE_EMPHASIS){ tags[tag_count++] = tag_bold; } if(tag->type & TAG_TYPE_ITALIC){ tags[tag_count++] = tag_italic; } if(tag->type & TAG_TYPE_SUBSCRIPT){ tags[tag_count++] = tag_subscript; } if(tag->type & TAG_TYPE_SUPERSCRIPT){ tags[tag_count++] = tag_superscript; } if(tag->type & TAG_TYPE_CENTER){ tags[tag_count++] = tag_center; } if(tag->type & TAG_TYPE_LINK){ tags[tag_count++] = tag_link; } if(tag->type & TAG_TYPE_SOUND){ tags[tag_count++] = tag_sound; } if(tag->type & TAG_TYPE_MOVIE){ tags[tag_count++] = tag_movie; } if(tag->type & TAG_TYPE_COLORED){ if((!(tag->type & TAG_TYPE_KEYWORD)) && (!(tag->type & TAG_TYPE_LINK)) && (!(tag->type & TAG_TYPE_SOUND)) && (!(tag->type & TAG_TYPE_MOVIE))) tags[tag_count++] = tag_colored; } if((0 <= canvas->indent) && (canvas->indent < MAX_INDENT)){ tags[tag_count++] = tag_indent[canvas->indent]; } if(tag_count > 8){ LOG(LOG_INFO, "Too many nested tags. Truncated to 8."); tag_count = 8; } switch(tag_count){ case 1: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], NULL); break; case 2: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], NULL); break; case 3: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], NULL); break; case 4: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], tags[3], NULL); break; case 5: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], tags[3], tags[4], NULL); break; case 6: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], tags[3], tags[4], tags[5], NULL); break; case 7: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], tags[3], tags[4], tags[5], tags[6], NULL); break; case 8: gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, utf_str, -1, tags[0], tags[1], tags[2], tags[3], tags[4], tags[5], tags[6], tags[7], NULL); break; } tag->end = gtk_text_iter_get_offset(canvas->iter); if((tag->type & TAG_TYPE_LINK) || (tag->type & TAG_TYPE_SOUND) || (tag->type & TAG_TYPE_MOVIE)){ set_link(tag); } END: g_free(euc_str); g_free(utf_str); //LOG(LOG_DEBUG, "OUT : draw_string2()"); } static void draw_string(CANVAS *canvas, DRAW_TEXT *text, TAG *tag, gchar *word) { gchar *p; gchar *p0; gchar *r; TAG l_tag; DRAW_TEXT l_text; gint len; //LOG(LOG_DEBUG, "IN : draw_string(word=%s)", word); l_tag.type=0; l_tag.page=0; l_tag.offset=0; l_tag.size=0; if((word == NULL) || (bemphasize_keyword == FALSE)) draw_string2(canvas, text, tag); else { if(tag){ l_tag = *tag; l_tag.type = TAG_TYPE_COLORED | tag->type; } else { l_tag.type = TAG_TYPE_COLORED; } p = text->text; p0 = text->text; len = strlen(word); while(p - text->text < text->length) { r = simple_search(word, p, len, TRUE); if(r == p){ if(p0 != p){ l_text.text = p0; l_text.length = r - p0; draw_string2(canvas, &l_text, tag); } l_text.text = p; l_text.length = len; draw_string2(canvas, &l_text, &l_tag); p0 = p + len; p = p + len; continue; } // For Japanese keyword if(isascii(*p)) p++; else p += 2; } if(p0 != p){ l_text.text = p0; l_text.length = p - p0; draw_string2(canvas, &l_text, tag); } } //LOG(LOG_DEBUG, "OUT : draw_string()"); } static void draw_gaiji(CANVAS *canvas, BOOK_INFO *binfo, TAG *tag, gchar *code) { gint width; gint height; GdkPixbuf *pixbuf; GtkTextIter start_iter; GtkTextIter end_iter; gchar color[128]; gchar *color_name; g_assert(canvas != NULL); g_assert(binfo != NULL); g_assert(code != NULL); //LOG(LOG_DEBUG, "IN : draw_gaiji()"); if(tag) { tag->start = gtk_text_iter_get_offset(canvas->iter); start_iter = *(canvas->iter); } color_name = gtk_color_selection_palette_to_string( &(main_window->style->fg[GTK_STATE_NORMAL]), 1); strcpy(color, color_name); g_free(color_name); if(tag == NULL){ } else if(tag->type & TAG_TYPE_LINK){ strcpy(color, color_str[COLOR_LINK]); } else if(tag->type & TAG_TYPE_KEYWORD){ strcpy(color, color_str[COLOR_KEYWORD]); } else if(tag->type & TAG_TYPE_SOUND){ strcpy(color, color_str[COLOR_SOUND]); } else if(tag->type & TAG_TYPE_MOVIE){ strcpy(color, color_str[COLOR_MOVIE]); } pixbuf = load_xbm(binfo, code, &width, &height, color); gtk_text_buffer_insert_pixbuf( canvas->buffer, canvas->iter, pixbuf); gdk_pixbuf_unref(pixbuf); end_iter = *(canvas->iter); start_iter = *(canvas->iter); if(tag){ tag->end = gtk_text_iter_get_offset(canvas->iter); if(tag->type & TAG_TYPE_LINK){ gtk_text_buffer_apply_tag(canvas->buffer, tag_link, &start_iter, &end_iter); set_link(tag); } else if(tag->type & TAG_TYPE_SOUND){ // gtk_text_buffer_apply_tag(canvas->buffer, tag_sound, &start_iter, &end_iter); set_link(tag); } else if(tag->type & TAG_TYPE_MOVIE){ // gtk_text_buffer_apply_tag(canvas->buffer, tag_movie, &start_iter, &end_iter); set_link(tag); } } gtk_text_iter_backward_char(&start_iter); gtk_text_buffer_apply_tag(canvas->buffer, tag_gaiji, &start_iter, &end_iter); if((0 <= canvas->indent) && (canvas->indent < MAX_INDENT)){ gtk_text_buffer_apply_tag(canvas->buffer, tag_indent[canvas->indent], &start_iter, &end_iter); } } gint image_count=0; static void draw_graphic(CANVAS *canvas, BOOK_INFO *binfo, gint type, gint page, gint offset, gint width, gint height) { char filename[512]; GdkPixbuf *pixbuf; EB_Error_Code error_code=EB_SUCCESS; GtkTextIter start_iter; GtkTextIter end_iter; //LOG(LOG_DEBUG, "IN : draw_graphic()"); g_assert(canvas != NULL); g_assert(binfo != NULL); if(bshow_image != TRUE){ //LOG(LOG_DEBUG, "OUT : draw_graphic() = NOP"); return; } // Save to file sprintf(filename, "%s%s%d-%d.img", temp_dir, DIR_DELIMITER, getpid(), image_count); image_count++; switch(type){ case IMAGE_TYPE_COLOR_BMP: case IMAGE_TYPE_JPEG: error_code = ebook_output_color(binfo, filename, page, offset); break; case IMAGE_TYPE_MONO_BMP: error_code = ebook_output_mono(binfo, filename, page, offset, width, height); break; case IMAGE_TYPE_GRAY_BMP: error_code = ebook_output_gray(binfo, filename, page, offset, width, height); break; } if(error_code != EB_SUCCESS){ return; } // Newline gtk_text_buffer_insert(canvas->buffer, canvas->iter, "\n", 1); // Put space before graphics because indent is not effective to graphics. if((gtk_text_iter_get_line_offset(canvas->iter) == 0) && (0 <= canvas->indent) && (canvas->indent < MAX_INDENT)){ gtk_text_buffer_insert_with_tags( canvas->buffer, canvas->iter, " ", -1, tag_plain, tag_indent[canvas->indent], NULL); } pixbuf = gdk_pixbuf_new_from_file(filename, NULL); if(pixbuf == NULL){ LOG(LOG_CRITICAL, "Failed to load image file : %s", filename); goto END; } gtk_text_buffer_insert_pixbuf( canvas->buffer, canvas->iter, pixbuf); gdk_pixbuf_unref(pixbuf); end_iter = *(canvas->iter); start_iter = *(canvas->iter); /* if((0 <= canvas->indent) && (canvas->indent < MAX_INDENT)){ gtk_text_buffer_apply_tag(canvas->buffer, tag_indent[canvas->indent], &start_iter, &end_iter); } */ // Newline // gtk_text_buffer_insert(canvas->buffer, canvas->iter, "\n", 1); END: unlink(filename); //LOG(LOG_DEBUG, "OUT : draw_graphic()"); } void draw_content(CANVAS *canvas, DRAW_TEXT *text, BOOK_INFO *binfo, TAG *tag, gchar *word){ gchar *p; gchar start_tag[512]; gchar end_tag[512]; gchar tag_name[512]; gchar attr[512]; gchar code[16]; gchar body[65536]; gchar *content; gint content_length; gint body_length; gint l_page=0, l_offset=0, l_size=0; gint l_width, l_height; gint l_indent; TAG l_tag; DRAW_TEXT l_text; g_assert(canvas != NULL); g_assert(text != NULL); g_assert(text->text != NULL); //LOG(LOG_DEBUG, "IN : draw_content()"); l_tag.type=0; l_tag.page=0; l_tag.offset=0; l_tag.size=0; body_length = 0; p = text->text; if(text->length >= 65536){ LOG(LOG_INFO, "Text too long. Truncated to 65535 bytes. (Original %d bytes)", text->length); text->length = 65535; text->text[65535] = '\0'; } while((p - text->text) < text->length){ if(*p == '<'){ if(body_length != 0){ l_text.text = body; l_text.length = body_length; draw_string(canvas, &l_text, tag, word); body_length = 0; } get_start_tag(p, start_tag); get_tag_name(start_tag, tag_name); if((strcmp(tag_name, "reference") == 0) || (strcmp(tag_name, "candidate") == 0)){ get_end_tag(p, tag_name, end_tag); get_attr(end_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(end_tag, "offset", attr); l_offset = strtol(attr, NULL, 16); get_content(p, tag_name, &content, &content_length); if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_LINK | tag->type; } else { l_tag.type = TAG_TYPE_LINK; } l_tag.page = l_page; l_tag.offset = l_offset; l_text.text = content; l_text.length = content_length; draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "keyword") == 0){ get_content(p, tag_name, &content, &content_length); if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_KEYWORD | tag->type; } else { l_tag.type = TAG_TYPE_KEYWORD; } l_text.text = content; l_text.length = content_length; draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "modification") == 0){ get_content(p, tag_name, &content, &content_length); get_attr(start_tag, "method", attr); { gchar *tmps; tmps = g_strndup(content, content_length); g_free(tmps); } if(tag) { l_tag = *tag; if(attr[0] == '1') l_tag.type = TAG_TYPE_ITALIC | tag->type; else l_tag.type = TAG_TYPE_EMPHASIS | tag->type; } else { if(attr[0] == '1') l_tag.type = TAG_TYPE_ITALIC; else l_tag.type = TAG_TYPE_EMPHASIS; } l_text.text = content; l_text.length = content_length; draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "gaiji") == 0){ get_attr(start_tag, "code", code); draw_gaiji(canvas, binfo, tag, code); skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "indent") == 0){ get_attr(start_tag, "position", attr); l_indent = strtol(attr, NULL, 10); // I'm not sure what the parameter to indent is. // Set to the specified location if immediately after the new line or it does not overrup. /* if((canvas->x == h_border + canvas->indent * font_width) || (canvas->x < h_border + l_indent * font_width)) canvas->x = h_border + l_indent * font_width; */ canvas->indent = l_indent - 1; skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "emphasis") == 0){ get_content(p, tag_name, &content, &content_length); l_text = *text; l_text.text = content; l_text.length = content_length; if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_EMPHASIS | tag->type; } else { l_tag.type = TAG_TYPE_EMPHASIS; } draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "sub") == 0){ get_content(p, tag_name, &content, &content_length); l_text = *text; l_text.text = content; l_text.length = content_length; if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_SUBSCRIPT | tag->type; } else { l_tag.type = TAG_TYPE_SUBSCRIPT; } draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "sup") == 0){ get_content(p, tag_name, &content, &content_length); l_text = *text; l_text.text = content; l_text.length = content_length; if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_SUPERSCRIPT | tag->type; } else { l_tag.type = TAG_TYPE_SUPERSCRIPT; } draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "center") == 0){ get_content(p, tag_name, &content, &content_length); l_text = *text; l_text.text = content; l_text.length = content_length; if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_CENTER | tag->type; } else { l_tag.type = TAG_TYPE_CENTER; } draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "nonewline") == 0){ skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "/nonewline") == 0){ skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "narrow") == 0){ skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "/narrow") == 0){ skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "jpeg") == 0){ get_attr(start_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(p, "offset", attr); l_offset = strtol(attr, NULL, 16); draw_graphic(canvas, binfo, IMAGE_TYPE_JPEG, l_page, l_offset, 0, 0); skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "bmp") == 0){ get_attr(start_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(p, "offset", attr); l_offset = strtol(attr, NULL, 16); draw_graphic(canvas, binfo, IMAGE_TYPE_COLOR_BMP, l_page, l_offset, 0, 0); skip_start_tag(&p, tag_name); } else if(strcmp(tag_name, "mono") == 0){ get_attr(start_tag, "width", attr); l_width = strtol(attr, NULL, 10); get_attr(start_tag, "height", attr); l_height = strtol(attr, NULL, 10); get_end_tag(p, tag_name, end_tag); get_attr(end_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(end_tag, "offset", attr); l_offset = strtol(attr, NULL, 16); draw_graphic(canvas, binfo, IMAGE_TYPE_MONO_BMP, l_page, l_offset, l_width, l_height); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "wave") == 0){ get_end_tag(p, tag_name, end_tag); get_attr(end_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(end_tag, "offset", attr); l_offset = strtol(attr, NULL, 16); get_attr(end_tag, "size", attr); l_size = strtol(attr, NULL, 10); get_content(p, tag_name, &content, &content_length); if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_SOUND | tag->type; } else { l_tag.type = TAG_TYPE_SOUND; } l_tag.page = l_page; l_tag.offset = l_offset; l_tag.size = l_size; l_text.text = content; l_text.length = content_length; draw_content(canvas, &l_text, binfo, &l_tag, word); skip_end_tag(&p, tag_name); } else if(strcmp(tag_name, "mpeg") == 0){ gchar *utf_str; gchar *euc_str; get_attr(start_tag, "filename", attr); if(tag) { l_tag = *tag; l_tag.type = TAG_TYPE_MOVIE | tag->type; } else { l_tag.type = TAG_TYPE_MOVIE; } l_tag.page = l_page; l_tag.offset = l_offset; l_tag.size = l_size; sprintf(l_tag.filename, "%s", attr); utf_str = _(" [Movie] "); euc_str = iconv_convert("utf-8", "euc-jp", utf_str); l_text.text = euc_str; l_text.length = strlen(l_text.text); draw_content(canvas, &l_text, binfo, &l_tag, word); g_free(euc_str); skip_start_tag(&p, tag_name); } else { body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; } } else { body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; } } if(body_length != 0){ l_text.text = body; l_text.length = body_length; draw_string(canvas, &l_text, tag, word); } //LOG(LOG_DEBUG, "OUT : draw_content()"); } ebview-0.3.6.2/src/pref_font.h0000644000175000017500000000164010013675516015406 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_FONT_H__ #define __PREF_FONT_H__ #include "defs.h" GtkWidget *pref_start_font(); gboolean pref_end_font(); #endif /* __PREF_FONT_H__ */ ebview-0.3.6.2/src/pref_weblist.h0000644000175000017500000000165710013675516016121 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_WEBLIST_H__ #define __PREF_WEBLIST_H__ #include "defs.h" GtkWidget *pref_start_weblist(); gboolean pref_end_weblist(); #endif /* __PREF_WEBLIST_H__ */ ebview-0.3.6.2/src/Makefile.am0000644000175000017500000000234711241367004015306 0ustar mhattamhattabin_PROGRAMS = ebview AM_CPPFLAGS= @EBCONF_PTHREAD_CPPFLAGS@ @EBCONF_EBINCS@ \ @EBCONF_ZLIBINCS@ @EBCONF_INTLINCS@ AM_CFLAGS = @PANGOX_CFLAGS@ @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ @CYGWIN_CFLAGS@ -Wall AM_CXXFLAGS = @PANGOX_CFLAGS@ @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ ebview_LDADD = @PANGOX_LIBS@ @GTK_LIBS@ @THREAD_LIBS@ @CYGWIN_CFLAGS@ \ @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ @EBCONF_INTLLIBS@ @RES_FILE@ @EXTRA_LIBS@ ebview_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ ebview_SOURCES = \ bmh.c \ cellrendererebook.c \ dialog.c \ dictbar.c \ dirtree.c \ dump.c \ eb.c \ ebview.c \ external.c \ filter.c \ grep.c \ headword.c \ history.c \ hook.c \ jcode.c \ link.c \ log.c \ mainmenu.c \ mainwindow.c \ menu.c \ misc.c \ multi.c \ pixmap.c \ popup.c \ preference.c \ pref_color.c \ pref_dictgroup.c \ pref_dirgroup.c \ pref_external.c \ pref_font.c \ pref_grep.c \ pref_gui.c \ pref_io.c \ pref_search.c \ pref_selection.c \ pref_shortcut.c \ pref_stemming.c \ pref_weblist.c \ reg.c \ render.c \ selection.c \ shortcut.c \ shortcutfunc.c \ splash.c \ statusbar.c \ textview.c \ thread_search.c \ websearch.c \ xml.c \ xmlinternal.c ebview.res: ebview.rc windres -i $< -O coff -o $@ ebview-0.3.6.2/src/intl.h0000644000175000017500000000270110013675515014370 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __INTL_H__ #define __INTL_H__ #include "../config.h" #ifdef HAVE_LIBINTL_H #define ENABLE_NLS 1 #endif #define _INTL_REDIRECT_MACROS #ifdef ENABLE_NLS # include # define _(String) dgettext(PACKAGE,String) # ifdef gettext_noop # define N_(String) gettext_noop(String) # else # define N_(String) (String) # endif /* gettext_noop */ #else # define _(String) (String) # define N_(String) (String) # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,String) (String) # define dcgettext(Domain,String,Type) (String) # define bindtextdomain(Domain,Directory) (Domain) #endif /* ENABLE_NLS */ #endif /* __INTL_H__ */ ebview-0.3.6.2/src/pref_color.h0000644000175000017500000000164510013675516015563 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_COLOR_H__ #define __PREF_COLOR_H__ #include "defs.h" GtkWidget *pref_start_color(); gboolean pref_end_color(); #endif /* __PREF_COLOR_H__ */ ebview-0.3.6.2/src/global.h0000644000175000017500000000703610013675515014670 0ustar mhattamhatta#ifndef __GLOBAL_H__ #define __GLOBAL_H__ #ifdef _GLOBAL #define global #else #define global extern #endif global GtkWidget *main_window; global GtkWidget *hidden_entry; global GtkWidget *word_entry; global GtkWidget *combo_method; global GtkWidget *combo_word; global GtkWidget *button_mode; global GtkWidget *button_start; global GtkWidget *button_auto; global GtkWidget *button_popup; global GtkWidget *button_back; global GtkWidget *button_forward; global GtkWidget *status_bar; global GtkTooltips *tooltip; global GList *search_result; global RESULT *current_result; global GList *ending_list; global GList *ending_list_ja; global GdkFont *font_normal; global GdkFont *font_bold; global GdkFont *font_superscript; global GdkFont *font_italic; global gint font_height; global gint font_width; global gint font_ascent; global gint font_descent; global gchar *fs_codeset; global struct _search_method search_method[64]; global gint bstarting_up; global gint max_search; global gint max_heading; global gint max_remember_words; global gint dict_button_length; global gint auto_interval; global gint auto_minchar; global gint auto_maxchar; global gint bshow_menu_bar; global gint bshow_status_bar; global gint bshow_dict_bar; global gint bshow_tree_tab; global gint bending_only_nohit; global gint bending_correction; global gint bshow_popup_title; global gint bbeep_on_nohit; global gint bignore_locks; global gint popup_width; global gint popup_height; global gchar *wave_template; global gchar *mpeg_template; global gchar *browser_template; global gchar *open_template; global gint bbrowser_external; global gint buse_http_proxy; global gint window_x, window_y; global gint window_width, window_height; global gint tree_width, tree_height; global gint bsmooth_scroll; global gint scroll_step; global gint scroll_time; global gint scroll_margin; global gint bsort_by_dictionary; global gint pane_direction; global gint tab_position; global gint bignore_case; global gint bsuppress_hidden_files; global gint bemphasize_keyword; global gint bshow_image; global gint bshow_splash; global gint bword_search_automatic; global gint additional_lines; global gint additional_chars; global gint cache_size; global gint max_bytes_to_guess; global gint bshow_filename; global gint bheading_auto_calc; global gint benable_button_color; global gint selection_mode; global gint bplay_sound_internally; global gint line_space; global gint h_space; global gint v_space; global gint h_border; global gint v_border; global gint gaiji_adjustment; global gchar *user_dir; global gchar *temp_dir; global gchar *package_dir; global gchar *cache_dir; global gchar *fontset_normal; global gchar *fontset_bold; global gchar *fontset_italic; global gchar *fontset_subscript; global gchar *fontset_superscript; global gchar *color_str[NUM_COLORS]; global GdkColor colors[NUM_COLORS]; global GtkTreeStore *web_store; global GtkTreeStore *dict_store; global GtkListStore *stemming_en_store; global GtkListStore *stemming_ja_store; global GtkListStore *shortcut_store; global GtkListStore *filter_store; global GtkListStore *dirgroup_store; global GtkTextTag *tag_keyword; global GtkTextTag *tag_bold; global GtkTextTag *tag_link; global GtkTextTag *tag_sound; global GtkTextTag *tag_movie; global GtkTextTag *tag_italic; global GtkTextTag *tag_superscript; global GtkTextTag *tag_subscript; global GtkTextTag *tag_center; global GtkTextTag *tag_plain; global GtkTextTag *tag_gaiji; global GtkTextTag *tag_colored; global GtkTextTag *tag_reverse; global GtkTextTag *tag_indent[MAX_INDENT]; #endif /* __GLOBAL_H__ */ ebview-0.3.6.2/src/jcode.c0000644000175000017500000002427511241635664014520 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "jcode.h" #include void hex_dump(const gchar *buf){ const gchar *p =buf; while(*p != '\0'){ g_print("%02x ", (unsigned char)*p); p++; } g_print("\n"); } // Translation talbe. // Comment : Ku and Ten static gchar *replace_table[] = { "(1)", "(2)", "(3)", "(4)", "(5)", "(6)", "(7)", "(8)", // 13-01 - 08 "(9)", "(10)", "(11)", "(12)", "(13)", "(14)", "(15)", "(16)", // 13-09 - 16 "(17)", "(18)", "(19)", "(20)", "I", "II", "III", "IV", // 13-17 - 24 "V", "VI", "VII", "VIII", "IX", "X", NULL, "¥ß¥ê", // 13-25 - 32 "¥­¥í", "¥»¥ó¥Á", "¥á¡¼¥È¥ë", "¥°¥é¥à", "¥È¥ó", "¥¢¡¼¥ë", "¥Ø¥¯¥¿¡¼¥ë", "¥ê¥Ã¥È¥ë", // 13-33 - 40 "¥ï¥Ã¥È", "¥«¥í¥ê¡¼", "¥É¥ë", "¥»¥ó¥È", "¥Ñ¡¼¥»¥ó¥È", "¥ß¥ê¥Ð¡¼¥ë" "¥Ú¡¼¥¸", "mm", // 13-41 - 48 "cm", "km", "mg", "kg", "cc", "m2", NULL, NULL, // 13-49 - 56 NULL, NULL, NULL, NULL, NULL, NULL, "Ê¿À®", "\"", // 13-57 - 64 "\"", "No.", "K.K.", "TEL", "(¾å)", "(Ãæ)", "(²¼)", "(º¸)", // 13-65 - 72 "(±¦)", "(³ô)", "(Í­)", "(Âå)", "ÌÀ¼£", "ÂçÀµ", "¾¼ÏÂ", NULL, // 13-73 - 80 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 13-81 - 88 NULL, NULL, NULL, NULL // 13-89 - 92 }; void replace_char(const guchar *icode, const guchar *ocode, guchar **inbuf, guchar **outbuf, size_t *isize, size_t *osize){ guchar *in, *out; guchar *str; guchar *utf_str; size_t len; in = *inbuf; out = *outbuf; if(strcasecmp(icode, "euc-jp") == 0) { if((in[0] != 0xad) || (in[1] < 0xa1) || (in[1] > 0xfc)) goto UNKNOWN; str = replace_table[in[1] - 0xa1]; if(str == NULL) goto UNKNOWN; } else if(strcasecmp(icode, "shift_jis") == 0) { if((in[0] != 0x87) || (in[1] < 0x40) || (in[1] > 0x9c)) goto UNKNOWN; str = replace_table[in[1] - 0x40]; if(str == NULL) goto UNKNOWN; } else if(strcasecmp(icode, "iso-2022-jp") == 0){ if((in[0] != 0x2d) || (in[1] < 0x21) || (in[1] > 0x7c)) goto UNKNOWN; str = replace_table[in[1] - 0x21]; if(str == NULL) goto UNKNOWN; } else { goto UNKNOWN; } utf_str = iconv_convert("euc-jp", "utf-8", str); if(utf_str == NULL) goto UNKNOWN; len = strlen(utf_str); strcpy(out, utf_str); g_free(utf_str); *osize -= len; *isize -= 2; *inbuf += 2; *outbuf += len; return; UNKNOWN: // skip *isize -= 2; *inbuf += 2; return; } gchar *iconv_convert(const gchar *icode, const gchar *ocode, const gchar *orig){ iconv_t cd; int r = 0; int buflen; size_t isize; size_t osize; guchar *outbuf; guchar *result; guchar *inbuf; size_t origsize; g_assert(icode != NULL); g_assert(ocode != NULL); g_assert(orig != NULL); //LOG(LOG_DEBUG, "IN : iconv_convert(%s, %s, %s)", icode, ocode, orig); if(strlen(orig) == 0){ result = malloc(1); result[0] = '\0'; LOG(LOG_DEBUG, "OUT : iconv_convert() OUT1"); return(result); } if(strcasecmp(icode, ocode) == 0){ LOG(LOG_DEBUG, "OUT : iconv_convert() OUT2"); return(g_strdup(orig)); } cd = iconv_open( ocode, icode ); if(cd == (iconv_t) -1 ) { LOG(LOG_DEBUG, "OUT : iconv_convert() OUT3"); return(NULL); } //hex_dump(inbuf); inbuf = (gchar *)orig; origsize = isize = strlen(inbuf); osize = buflen = isize * 2; result = outbuf = malloc(osize); memset(result, 0x00, osize); while(1){ #ifdef __FreeBSD__ r = iconv(cd, (const char **)&inbuf, &isize, &outbuf, &osize); #else r = iconv(cd, (char **)&inbuf, &isize, (char **)&outbuf, &osize); #endif #ifdef __WIN32__ if((r == -1) && (errno == EILSEQ) && (strcasecmp(icode, "utf-8") == 0)){ *outbuf = 0x5c; outbuf ++; osize -= 1; isize -= 1; inbuf += 1; continue; } #endif // Replace undefined characters if((r == -1) && (errno == EILSEQ)) { LOG(LOG_INFO, "Couldn't convert %02x %02x. Skipped.", (guchar)(*inbuf), (guchar)(*(inbuf+1))); replace_char(icode, ocode, &inbuf, &outbuf, &isize, &osize); continue; } break; } iconv_close(cd); if(r != 0){ int i; LOG(LOG_INFO, "iconv failed at location %d (%s -> %s)", origsize - isize, icode, ocode); LOG(LOG_INFO, "original size %d", origsize); for(i=0; i < 10 ; i ++) { if(inbuf[i] == '\0') break; LOG(LOG_INFO, "[%02x](%c) ", (unsigned char)inbuf[i], (unsigned char)inbuf[i]); } LOG(LOG_CRITICAL, "iconv : %s", strerror(errno)); result[0] = '\0'; LOG(LOG_DEBUG, "OUT : iconv_convert() OUT4"); return(result); } //LOG(LOG_DEBUG, "OUT : iconv_convert()"); return(result); } gchar *iconv_convert2(const gchar *icode, const gchar *ocode, const gchar *orig){ iconv_t cd; int r = 0; int buflen; size_t isize; size_t osize; char *outbuf; char *result; char *inbuf; g_assert(icode != NULL); g_assert(ocode != NULL); g_assert(orig != NULL); if(strcasecmp(icode, ocode) == 0){ return(g_strdup(orig)); } cd = iconv_open( ocode, icode ); if( cd == (iconv_t) -1 ) { return(NULL); } inbuf = (gchar *)orig; isize = strlen(inbuf); osize = buflen = isize * 2; result = outbuf = malloc(osize); memset(result, 0x00, osize); while(1){ #ifdef __FreeBSD__ r = iconv(cd, (const char **)&inbuf, &isize, &outbuf, &osize); #else r = iconv(cd, &inbuf, &isize, &outbuf, &osize); #endif if((r == -1) && (errno == EILSEQ)){ LOG(LOG_INFO, "Couldn't convert %02x %02x. Skipped.", (guchar)(*inbuf), (guchar)(*(inbuf+1))); *outbuf = 0x20; outbuf ++; *outbuf = 0x20; outbuf ++; osize -= 2; isize -= 2; inbuf += 2; } else { break; } } iconv_close(cd); if(r != 0){ LOG(LOG_CRITICAL, "iconv : %s", strerror(errno)); result[0] = '\0'; return(result); } //hex_dump(result); return(result); } inline gboolean isjisp(const gchar *buff){ g_assert(buff != NULL); if((buff[0] >= 0x21) && (buff[0] <= 0x74) && (buff[1] >= 0x21) && (buff[1] <= 0x7E)) return(TRUE); return(FALSE); } gboolean iseuckanji(const guchar *buff){ g_assert(buff != NULL); if((buff[0] >= 0xb0) && (buff[0] <= 0xf4) && (buff[1] >= 0xa1) && (buff[1] <= 0xfe)) return(TRUE); return(FALSE); } gboolean iseuckatakana(const guchar *buff){ g_assert(buff != NULL); if((buff[0] == 0xa5) && (buff[1] >= 0xa1) && (buff[1] <= 0xf6)) return(TRUE); return(FALSE); } gboolean iseuchiragana(const guchar *buff){ g_assert(buff != NULL); if((buff[0] == 0xa4) && (buff[1] >= 0xa1) && (buff[1] <= 0xf3)) return(TRUE); return(FALSE); } void katakana_to_hiragana(gchar *word) { gint i=0; g_assert(word != NULL); while(word[i] != '\0'){ if(isalpha(word[i])) { i++; continue; } if(iseuc(&word[i])) { if(iseuckatakana(&word[i])) { word[i] = 0xa4; } i += 2; continue; } i++; } } void hiragana_to_katakana(gchar *word) { gint i=0; g_assert(word != NULL); while(word[i] != '\0'){ if(isalpha(word[i])) { i++; continue; } if(iseuc(&word[i])) { if(iseuchiragana(&word[i])) { word[i] = 0xa5; } i += 2; continue; } i++; } } gboolean iseuc(const guchar *buff){ g_assert(buff != NULL); if((buff[0] >= 0xa1) && (buff[0] <= 0xf4) && (buff[1] >= 0xa1) && (buff[1] <= 0xfe)) return(TRUE); return(FALSE); } /* * Copied from kf.c * Original author: Haruhiko Okumura Copyright (c) 1995-2000 Haruhiko Okumura * */ #define JIS0208_1978 "\x1b\x24\x40" // ESC $ @ #define JIS0208_1983 "\x1b\x24\x42" // ESC $ B #define JIS0208_1990 "\x1b\x26\x40\x1b\x24\x42" // ESC & @ ESC $ B #define JIS0212 "\x1b\x24\x28\x44" // ESC $ ( D #define JIS_ASC "\x1b\x28\x42" // ESC ( B #define JIS_ASC2 "\x1b\x28\x44" // ESC ( J #define JIS_KANA "\x1b\x28\x49" // ESC ( I #define isjis(c) (((c)>=0x21 && (c)<=0x7e)) #define iseuc(c) (((c)>=0xa1 && (c)<=0xfe)) /* First byte of ShiftJIS */ #define issjis1(c) (((c)>=0x81 && (c)<=0x9f) || ((c)>=0xe0 && (c)<=0xef)) /* Second byte of ShiftJIS */ #define issjis2(c) ((c)>=0x40 && (c)<=0xfc && (c)!=0x7f) /* 1-byte kana */ #define ishankana(c) ((c)>=0xa0 && (c)<=0xdf) gint guess_kanji(gint imax, guchar *buf) { int i, bad_euc, bad_sjis; for (i = 0; i < imax; i++) { if(buf[i+5] == '\0') break; if((strncmp(&buf[i], JIS0208_1978, strlen(JIS0208_1978)) == 0) || (strncmp(&buf[i], JIS0208_1983, strlen(JIS0208_1983)) == 0) || (strncmp(&buf[i], JIS0208_1990, strlen(JIS0208_1990)) == 0) || (strncmp(&buf[i], JIS0212, strlen(JIS0212)) == 0) || (strncmp(&buf[i], JIS_ASC, strlen(JIS_ASC)) == 0) || (strncmp(&buf[i], JIS_ASC2, strlen(JIS_ASC2)) == 0) || (strncmp(&buf[i], JIS_KANA, strlen(JIS_KANA)) == 0)) return(KCODE_JIS); } bad_euc = 0; for (i = 0; i < imax; i++) { if(buf[i+2] == '\0') break; if (iseuc(buf[i]) && ++i < imax) { if (! iseuc(buf[i])) { bad_euc += 10; i--; } else if (buf[i-1] >= 0xd0) bad_euc++; /* Dai 2 Suijun */ /* 1999-02-01 bug fixed. Thanks: massangeana */ } else if (buf[i] == 0x8e && ++i < imax) { if (ishankana(buf[i])) bad_euc++; else { bad_euc += 10; i--; } } else if (buf[i] >= 0x80) bad_euc += 10; } bad_sjis = 0; for (i = 0; i < imax; i++) { if(buf[i+2] == '\0') break; if (issjis1(buf[i]) && ++i < imax) { if (! issjis2(buf[i])) { bad_sjis += 10; i--; } else if ((unsigned) (buf[i-1] * 256U + buf[i]) >= 0x989f) bad_sjis++; /* Dai 2 Suijun */ } else if (buf[i] >= 0x80) { if (ishankana(buf[i])) bad_sjis++; else bad_sjis += 10; } } if(bad_sjis < bad_euc) return(KCODE_SJIS); else if (bad_sjis > bad_euc) return(KCODE_EUC); else if ((bad_euc == 0) && (bad_sjis == 0)) return(KCODE_ASCII); else return(KCODE_UNKNOWN); } ebview-0.3.6.2/src/cellrenderercolor.c0000644000175000017500000002231510013675514017124 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This source derives from gtkcellrenerertext.c of GTK+-2.0.9 * Here is an original copyright. */ /* gtkcellrenderertext.c * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "cellrenderercolor.h" #include "defs.h" #include "global.h" #include "xmlinternal.h" #include "jcode.h" #include "render.h" static void gtk_cell_renderer_color_init (GtkCellRendererColor *cellcolor); static void gtk_cell_renderer_color_class_init (GtkCellRendererColorClass *class); static void gtk_cell_renderer_color_finalize (GObject *object); static void gtk_cell_renderer_color_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); static void gtk_cell_renderer_color_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); static void gtk_cell_renderer_color_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); static void gtk_cell_renderer_color_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags); static void cell_renderer_color_render_color(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GtkStateType state, gchar *text, BOOK_INFO *binfo, gint origin_x, gint origin_y, gboolean render); enum { PROP_0, PROP_COLOR, }; static gpointer parent_class; GtkType gtk_cell_renderer_color_get_type (void) { static GtkType cell_color_type = 0; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_get_type()"); if (!cell_color_type) { static const GTypeInfo cell_color_info = { sizeof (GtkCellRendererColorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) gtk_cell_renderer_color_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkCellRendererColor), 0, /* n_preallocs */ (GInstanceInitFunc) gtk_cell_renderer_color_init, }; cell_color_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererColor", &cell_color_info, 0); } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_get_type()"); return cell_color_type; } static void gtk_cell_renderer_color_init (GtkCellRendererColor *cellcolor) { // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_init()"); GTK_CELL_RENDERER (cellcolor)->xalign = 0.0; GTK_CELL_RENDERER (cellcolor)->yalign = 0.5; GTK_CELL_RENDERER (cellcolor)->xpad = 2; GTK_CELL_RENDERER (cellcolor)->ypad = 2; // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_init()"); } static void gtk_cell_renderer_color_class_init (GtkCellRendererColorClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_class_init()"); parent_class = g_type_class_peek_parent (class); object_class->finalize = gtk_cell_renderer_color_finalize; object_class->get_property = gtk_cell_renderer_color_get_property; object_class->set_property = gtk_cell_renderer_color_set_property; cell_class->get_size = gtk_cell_renderer_color_get_size; cell_class->render = gtk_cell_renderer_color_render; g_object_class_install_property (object_class, PROP_COLOR, g_param_spec_string ("color", _("Color"), _("Color"), NULL, G_PARAM_READWRITE)); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_class_init()"); } static void gtk_cell_renderer_color_finalize (GObject *object) { GtkCellRendererColor *cellcolor = GTK_CELL_RENDERER_COLOR (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_finalize()"); if (cellcolor->color) g_free (cellcolor->color); (* G_OBJECT_CLASS (parent_class)->finalize) (object); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_finalize()"); } static void gtk_cell_renderer_color_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec) { GtkCellRendererColor *cellcolor = GTK_CELL_RENDERER_COLOR (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_get_property()"); switch (param_id) { case PROP_COLOR: g_value_set_string (value, cellcolor->color); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_get_property()"); } static void gtk_cell_renderer_color_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { GtkCellRendererColor *cellcolor = GTK_CELL_RENDERER_COLOR (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_set_property()"); switch (param_id) { case PROP_COLOR: if (cellcolor->color) g_free (cellcolor->color); cellcolor->color = g_strdup (g_value_get_string (value)); // g_object_notify (object, "color"); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_set_property()"); } GtkCellRenderer * gtk_cell_renderer_color_new (void) { // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_new()"); return GTK_CELL_RENDERER (g_object_new (gtk_cell_renderer_color_get_type (), NULL)); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_new()"); } static void gtk_cell_renderer_color_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { GtkCellRendererColor *cellcolor = (GtkCellRendererColor *) cell; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_get_size()"); if(width) *width = 40; if(height) *height = 10; if(x_offset) *x_offset = 2; if(y_offset) *y_offset = 2; // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_get_size()"); } static void gtk_cell_renderer_color_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) { GtkCellRendererColor *cellcolor = (GtkCellRendererColor *) cell; GtkStateType state; gint x_offset; gint y_offset; GtkWidget *button; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_color_render()"); gtk_cell_renderer_color_get_size (cell, widget, cell_area, &x_offset, &y_offset, NULL, NULL); if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED) { if (GTK_WIDGET_HAS_FOCUS (widget)){ state = GTK_STATE_SELECTED; } else { state = GTK_STATE_ACTIVE; } } else { if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE){ state = GTK_STATE_INSENSITIVE; } else { state = GTK_STATE_NORMAL; } } gtk_paint_option // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_color_render()"); } ebview-0.3.6.2/src/cellrenderercolor.h0000644000175000017500000000647610013675514017143 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This source derives from gtkcellrenerertext.h of GTK+-2.0.9 * Here is an original copyright. */ /* gtkcellrenderertext.h * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_CELL_RENDERER_COLOR_H__ #define __GTK_CELL_RENDERER_COLOR_H__ #include #include #include "defs.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_TYPE_CELL_RENDERER_COLOR (gtk_cell_renderer_color_get_type ()) #define GTK_CELL_RENDERER_COLOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER_COLOR, GtkCellRendererColor)) #define GTK_CELL_RENDERER_COLOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_COLOR, GtkCellRendererColorClass)) #define GTK_IS_CELL_RENDERER_COLOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER_COLOR)) #define GTK_IS_CELL_RENDERER_COLOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_COLOR)) #define GTK_CELL_RENDERER_COLOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_COLOR, GtkCellRendererColorClass)) typedef struct _GtkCellRendererColor GtkCellRendererColor; typedef struct _GtkCellRendererColorClass GtkCellRendererColorClass; struct _GtkCellRendererColor { GtkCellRenderer parent; gchar *color; gint width; gint height; }; struct _GtkCellRendererColorClass { GtkCellRendererClass parent_class; /* Padding for future expansion */ void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); void (*_gtk_reserved3) (void); void (*_gtk_reserved4) (void); }; GtkType gtk_cell_renderer_color_get_type (void); GtkCellRenderer *gtk_cell_renderer_color_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_CELL_RENDERER_COLOR_H__ */ ebview-0.3.6.2/src/selection.h0000644000175000017500000000202710013675516015411 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __SELECTION_H__ #define __SELECTION_H__ #include "defs.h" void selection_received (GtkWidget *widget, GtkSelectionData *data); void auto_lookup_start(); void auto_lookup_stop(); void auto_lookup_suspend(); void auto_lookup_resume(); #endif /* __SELECTION_H__ */ ebview-0.3.6.2/src/textview.c0000644000175000017500000004563010016046441015275 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "dialog.h" #include "dictbar.h" #include "grep.h" #include "headword.h" #include "history.h" #include "mainmenu.h" #include "mainwindow.h" #include "statusbar.h" #include "link.h" #include "jcode.h" #include "misc.h" #include "pref_io.h" #include "textview.h" #include "websearch.h" GtkTextBuffer *text_buffer=NULL; GtkWidget *main_view; GtkWidget *dict_scroll=NULL; static GtkTextTagTable *tag_table=NULL; static void search_selection(); static GtkItemFactory *text_item_factory; static GtkItemFactoryEntry text_menu_items[] = { { N_("/Search This Word"), NULL, search_selection, 0, NULL }, { N_("/Copy To Clipboard"), NULL, copy_to_clipboard, 0, NULL }, { N_("/Display"), NULL, NULL, 0, "" }, { N_("/Display/Menu bar"), NULL, show_menu_bar, 0, NULL }, { N_("/Display/Dictionary Selection Bar"), NULL, show_dict_bar, 0, NULL }, { N_("/Display/Status Bar"), NULL, show_status_bar, 0, NULL }, { N_("/Display/Tree Frame Tab"), NULL, show_tree_tab, 0, NULL }, }; static void search_selection() { GtkTextIter start; GtkTextIter end; gchar *text; gchar *euc_str; gint method; LOG(LOG_DEBUG, "IN : search_selection()"); gtk_text_buffer_get_selection_bounds(text_buffer, &start, &end); text = gtk_text_buffer_get_text(text_buffer, &start, &end, FALSE); if(strlen(text) == 0) return; gtk_entry_set_text(GTK_ENTRY(word_entry), text); euc_str = iconv_convert("utf-8", "euc-jp", text); method = ebook_search_method(); if(method == SEARCH_METHOD_INTERNET){ web_search(); } else if(method == SEARCH_METHOD_GREP){ clear_message(); grep_search(euc_str); } else { clear_message(); ebook_search(euc_str, method); if(search_result == NULL) push_message(_("No hit.")); } save_word_history(text); gtk_editable_select_region(GTK_EDITABLE(word_entry), 0, GTK_ENTRY(word_entry)->text_length); // show_result_tree(); g_free(euc_str); LOG(LOG_DEBUG, "OUT : search_selection()"); } void copy_to_clipboard() { gtk_text_buffer_copy_clipboard(text_buffer, gtk_clipboard_get(NULL)); } void create_text_buffer() { gint i; LOG(LOG_DEBUG, "IN : create_text_buffer()"); if(text_buffer != NULL){ g_object_unref(G_OBJECT(text_buffer)); /* g_object_unref(G_OBJECT(text_buffer)); g_object_unref(tag_keyword); g_object_unref(tag_bold); g_object_unref(tag_link); g_object_unref(tag_sound); g_object_unref(tag_movie); g_object_unref(tag_italic); g_object_unref(tag_subscript); g_object_unref(tag_superscript); g_object_unref(tag_gaiji); g_object_unref(tag_plain); g_object_unref(tag_colored); g_object_unref(tag_reverse); for(i=0; i < MAX_INDENT ; i ++){ g_object_unref(tag_indent[i]); } */ } tag_table = gtk_text_tag_table_new(); text_buffer = gtk_text_buffer_new (tag_table); /* g_object_set(text_buffer, "tag-table", tag_table); */ tag_keyword = gtk_text_tag_new("keyword"); g_object_set(tag_keyword, "weight", PANGO_WEIGHT_BOLD, "foreground", color_str[COLOR_KEYWORD], "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_keyword); tag_bold = gtk_text_tag_new("bold"); g_object_set(tag_bold, "weight", PANGO_WEIGHT_BOLD, "font", fontset_bold, NULL); gtk_text_tag_table_add(tag_table, tag_bold); tag_link = gtk_text_tag_new("link"); g_object_set(tag_link, "foreground", color_str[COLOR_LINK], "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_link); tag_sound = gtk_text_tag_new("sound"); g_object_set(tag_sound, "foreground", color_str[COLOR_SOUND], "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_sound); tag_movie = gtk_text_tag_new("movie"); g_object_set(tag_movie, "foreground", color_str[COLOR_MOVIE], "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_movie); tag_italic = gtk_text_tag_new("italic"); g_object_set(tag_italic, "style", PANGO_STYLE_ITALIC, "font", fontset_italic, NULL); gtk_text_tag_table_add(tag_table, tag_italic); tag_superscript = gtk_text_tag_new("superscript"); g_object_set(tag_superscript, "rise", 5 * PANGO_SCALE, "rise", 3, "font", fontset_superscript, NULL); gtk_text_tag_table_add(tag_table, tag_superscript); tag_subscript = gtk_text_tag_new("subscript"); g_object_set(tag_subscript, // "rise", -5 * PANGO_SCALE, "rise", -3, "font", fontset_superscript, NULL); gtk_text_tag_table_add(tag_table, tag_subscript); tag_gaiji = gtk_text_tag_new("gaiji"); g_object_set(tag_gaiji, "rise", -2 * PANGO_SCALE, NULL); gtk_text_tag_table_add(tag_table, tag_gaiji); tag_center = gtk_text_tag_new("center"); g_object_set(tag_center, "justification", GTK_JUSTIFY_CENTER, "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_center); tag_plain = gtk_text_tag_new("plain"); g_object_set(tag_plain, "wrap_mode", GTK_WRAP_WORD, "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_plain); tag_colored = gtk_text_tag_new("colored"); g_object_set(tag_colored, "foreground", color_str[COLOR_EMPHASIS], NULL); gtk_text_tag_table_add(tag_table, tag_colored); tag_reverse = gtk_text_tag_new("reverse"); g_object_set(tag_reverse, "background", color_str[COLOR_REVERSE_BG], // "foreground", color_str[COLOR_EMPHASIS], // "foreground", "#ff0000", // "font", fontset_normal, NULL); gtk_text_tag_table_add(tag_table, tag_reverse); for(i=0; i < MAX_INDENT ; i ++){ gchar name[16]; sprintf(name, "tag%d", i); tag_indent[i] = gtk_text_tag_new(name); g_object_set(tag_indent[i], "left_margin", i * INDENT_LEFT_MARGIN + INITIAL_LEFT_MARGIN, NULL); gtk_text_tag_table_add(tag_table, tag_indent[i]); } /* tag_keyword = gtk_text_buffer_create_tag(text_buffer, "keyword", "weight", PANGO_WEIGHT_BOLD, "foreground", color_str[COLOR_KEYWORD], "font", fontset_normal, NULL); tag_bold = gtk_text_buffer_create_tag(text_buffer, "bold", "weight", PANGO_WEIGHT_BOLD, "font", fontset_bold, NULL); tag_link = gtk_text_buffer_create_tag(text_buffer, "link", "foreground", color_str[COLOR_LINK], "font", fontset_normal, NULL); tag_sound = gtk_text_buffer_create_tag(text_buffer, "sound", "foreground", color_str[COLOR_SOUND], "font", fontset_normal, NULL); tag_movie = gtk_text_buffer_create_tag(text_buffer, "movie", "foreground", color_str[COLOR_MOVIE], "font", fontset_normal, NULL); tag_italic = gtk_text_buffer_create_tag(text_buffer, "italic", "style", PANGO_STYLE_ITALIC, "font", fontset_italic, NULL); tag_superscript = gtk_text_buffer_create_tag(text_buffer, "superscript", // "rise", 5 * PANGO_SCALE, "rise", 3, "font", fontset_superscript, NULL); tag_subscript = gtk_text_buffer_create_tag(text_buffer, "subscript", // "rise", -5 * PANGO_SCALE, "rise", -3, "font", fontset_superscript, NULL); tag_gaiji = gtk_text_buffer_create_tag(text_buffer, "gaiji", "rise", -2 * PANGO_SCALE, NULL); tag_center = gtk_text_buffer_create_tag(text_buffer, "center", "justification", GTK_JUSTIFY_CENTER, "font", fontset_normal, NULL); tag_plain = gtk_text_buffer_create_tag(text_buffer, "plain", "wrap_mode", GTK_WRAP_WORD, "font", fontset_normal, NULL); for(i=0; i < MAX_INDENT ; i ++){ gchar name[16]; sprintf(name, "tag%d", i); tag_indent[i] = gtk_text_buffer_create_tag(text_buffer, name, "left_margin", i * INDENT_LEFT_MARGIN + INITIAL_LEFT_MARGIN, NULL); } */ LOG(LOG_DEBUG, "OUT : create_text_buffer()"); } gint motion_notify_event(GtkWidget *widget, GdkEventMotion *event) { gint x, y; GdkModifierType mask; GtkTextIter iter; guint offset; gint buffer_x, buffer_y; GdkRectangle location; gboolean too_far=FALSE; #ifdef __WIN32__ HCURSOR hCursor; #else GdkCursor *cursor; #endif // LOG(LOG_DEBUG, "IN : motion_notify_event(x=%f,y=%f (%d %d))", event->x, event->y, buffer_x, buffer_y); // If you don't convert position as buffer origin, // position will be invalid when scrolling gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT, (gint)(event->x), (gint)(event->y), &buffer_x, &buffer_y); gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(widget), &iter, buffer_x, buffer_y); offset = gtk_text_iter_get_offset(&iter); gtk_text_view_get_iter_location(GTK_TEXT_VIEW(widget), &iter, &location); if((buffer_x > location.x + font_width) || (buffer_x < location.x - font_width)) too_far = TRUE; else too_far = FALSE; #ifdef __WIN32__ if(scan_link(offset) && !too_far){ hCursor = LoadCursor(NULL, IDC_HAND); // Because IDC_HAND can not be used in NT if(hCursor == 0) hCursor = LoadCursor(NULL, IDC_ARROW); } else { hCursor = LoadCursor(NULL, IDC_IBEAM); } SetCursor(hCursor); #else if(scan_link(offset) && !too_far){ cursor = gdk_cursor_new (CURSOR_LINK); } else { cursor = gdk_cursor_new(CURSOR_NORMAL); } gdk_window_set_cursor(gtk_text_view_get_window(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT), cursor); gdk_cursor_destroy (cursor); gdk_window_get_pointer(widget->window, &x, &y, &mask); #endif // LOG(LOG_DEBUG, "OUT : motion_notify_event()"); if(event->state & GDK_BUTTON1_MASK) return(FALSE); else return(TRUE); } gint leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data) { #ifdef __WIN32__ HCURSOR hCursor; #else GdkCursor *cursor; #endif LOG(LOG_DEBUG, "IN : leave_notify_event()"); #ifdef __WIN32__ hCursor = LoadCursor(NULL, IDC_ARROW); SetCursor(hCursor); #else cursor = gdk_cursor_new(CURSOR_NORMAL); gdk_window_set_cursor(gtk_text_view_get_window(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT), cursor); gdk_cursor_destroy (cursor); #endif LOG(LOG_DEBUG, "OUT : leave_notify_event()"); return(FALSE); } gint button_press_event(GtkWidget *widget, GdkEventButton *event) { GtkTextIter iter; guint offset; gint buffer_x, buffer_y; GdkRectangle location; gboolean too_far=FALSE; LOG(LOG_DEBUG, "IN : button_press_event()"); if((event->type == GDK_BUTTON_PRESS) && (event->button == 1)){ // If you don't convert position as buffer origin, // position will be invalid when scrolling gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(widget), GTK_TEXT_WINDOW_TEXT, (gint)(event->x), (gint)(event->y), &buffer_x, &buffer_y); gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(widget), &iter, buffer_x, buffer_y); offset = gtk_text_iter_get_offset(&iter); gtk_text_view_get_iter_location(GTK_TEXT_VIEW(widget), &iter, &location); if((buffer_x >= location.x + font_width) || (buffer_x <= location.x - font_width)) too_far = TRUE; else too_far = FALSE; if(scan_link(offset) && !too_far){ if(follow_link(offset) == TRUE) return(TRUE); } } else if((event->type == GDK_BUTTON_PRESS) && ((event->button == 2) || (event->button == 3))){ gtk_item_factory_popup(GTK_ITEM_FACTORY(text_item_factory), event->x_root, event->y_root, event->button, event->time); LOG(LOG_DEBUG, "OUT : button_press_event() = TRUE"); return(TRUE); } //gdk_window_get_pointer(widget->window, &x, &y, &mask); LOG(LOG_DEBUG, "OUT : button_press_event() = FALSE"); return(FALSE); } GtkWidget *create_main_view() { gint nmenu_items; gint i; LOG(LOG_DEBUG, "IN : create_main_view()"); dict_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (dict_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); create_text_buffer(); main_view = gtk_text_view_new_with_buffer(text_buffer); // You must continue to grab event. // Otherwise, event stops when the cursor is at the area with no character. g_signal_connect(G_OBJECT(main_view),"motion_notify_event", G_CALLBACK(motion_notify_event), (gpointer)NULL); g_signal_connect(G_OBJECT(main_view),"button_press_event", G_CALLBACK(button_press_event), (gpointer)NULL); g_signal_connect(G_OBJECT(main_view),"leave_notify_event", G_CALLBACK(leave_notify_event), (gpointer)NULL); gtk_text_view_set_editable(GTK_TEXT_VIEW(main_view), FALSE); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(main_view), 10); gtk_text_view_set_right_margin(GTK_TEXT_VIEW(main_view), 10); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(main_view), line_space); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(main_view), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(main_view), GTK_WRAP_WORD); gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(main_view), GTK_TEXT_WINDOW_LEFT, 1); gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(main_view), GTK_TEXT_WINDOW_RIGHT, 1); gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(main_view), GTK_TEXT_WINDOW_TOP, 1); gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(main_view), GTK_TEXT_WINDOW_BOTTOM, 1); if(line_space < 1) line_space = 3; gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(main_view), line_space); gtk_container_add (GTK_CONTAINER (dict_scroll), main_view); nmenu_items = sizeof (text_menu_items) / sizeof (text_menu_items[0]); for(i=0 ; i", NULL); gtk_item_factory_create_items (text_item_factory, nmenu_items, text_menu_items, NULL); LOG(LOG_DEBUG, "OUT : create_main_view()"); return(dict_scroll); } void scroll_mainview_down(){ GtkTextIter iter; GdkRectangle rect; gint distance; gint i; LOG(LOG_DEBUG, "IN : scroll_mainview_down()"); gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(main_view), &rect); distance = rect.height - scroll_margin; if(bsmooth_scroll == TRUE){ for(i=0 ; i < scroll_step; i ++){ gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(main_view), &iter, rect.x, rect.y+ (distance / scroll_step)*(i+1)); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(main_view), &iter, 0.0, TRUE, 0.0, 0.0); #ifdef __WIN32__ Sleep(scroll_time / scroll_step / 1000); #else usleep(scroll_time / scroll_step); #endif } } else { gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(main_view), &iter, rect.x, rect.y+ distance); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(main_view), &iter, 0.0, TRUE, 0.0, 0.0); } LOG(LOG_DEBUG, "OUT : scroll_mainview_down()"); } void scroll_mainview_up(){ GtkTextIter iter; GdkRectangle rect; gint distance; gint i; LOG(LOG_DEBUG, "IN : scroll_mainview_up()"); gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(main_view), &rect); distance = rect.height - scroll_margin; if(bsmooth_scroll == TRUE){ for(i=0 ; i < scroll_step; i ++){ gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(main_view), &iter, rect.x, rect.y - (distance / scroll_step)*(i+1)); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(main_view), &iter, 0.0, TRUE, 0.0, 0.0); #ifdef __WIN32__ Sleep(scroll_time / scroll_step / 1000); #else usleep(scroll_time / scroll_step); #endif } } else { gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(main_view), &iter, rect.x, rect.y - distance); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(main_view), &iter, 0.0, TRUE, 0.0, 0.0); } LOG(LOG_DEBUG, "OUT : scroll_mainview_up()"); } void clear_text_buffer() { GtkTextIter start, end; LOG(LOG_DEBUG, "IN : clear_text_buffer()"); gtk_text_buffer_get_bounds (text_buffer, &start, &end); gtk_text_buffer_delete(text_buffer, &start, &end); clear_link(); LOG(LOG_DEBUG, "OUT : clear_text_buffer()"); } void expand_lines() { LOG(LOG_DEBUG, "IN : expand_lines()"); line_space ++; gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(main_view), line_space); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(main_view), line_space); if(current_result != NULL){ show_result(current_result, FALSE, TRUE); } save_preference(); LOG(LOG_DEBUG, "OUT : expand_lines()"); } void shrink_lines() { LOG(LOG_DEBUG, "IN : shrink_lines()"); line_space --; if(line_space < 0) line_space = 0; gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(main_view), line_space); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(main_view), line_space); if(current_result != NULL){ show_result(current_result, FALSE, TRUE); } save_preference(); LOG(LOG_DEBUG, "OUT : shrink_lines()"); } static void font_resize(gchar **font, gint increment){ gchar *old; gint size; gchar *p; gchar buff[8]; LOG(LOG_DEBUG, "IN : font_resize(%s, %d)", *font, increment); g_assert(font != NULL); old = g_strdup(*font); remove_space(old); p = strrchr(old, ' '); if(p == NULL){ LOG(LOG_INFO, "Invalid font format : %s", font); g_free(old); LOG(LOG_DEBUG, "OUT : font_resize()"); return; } *p = '\0'; p++; if(!isdigit(*p)){ LOG(LOG_INFO, "Invalid font format : %s", font); LOG(LOG_DEBUG, "OUT : font_resize()"); g_free(old); return; } size = (gint)strtol(p, NULL, 10); size += increment; // Smallest size is 1 if(size < 1) size = 1; sprintf(buff, "%d", size); g_free(*font); *font = g_strconcat(old, " ", buff, NULL); g_free(old); LOG(LOG_DEBUG, "OUT : font_resize(%s)", *font); } void increase_font_size() { LOG(LOG_DEBUG, "IN : increase_font_size()"); font_resize(&fontset_normal, 1); font_resize(&fontset_bold, 1); font_resize(&fontset_superscript, 1); font_resize(&fontset_italic, 1); restart_main_window(); save_preference(); LOG(LOG_DEBUG, "OUT : increase_font_size()"); } void decrease_font_size() { LOG(LOG_DEBUG, "IN : dencrease_font_size()"); font_resize(&fontset_normal, -1); font_resize(&fontset_bold, -1); font_resize(&fontset_superscript, -1); font_resize(&fontset_italic, -1); restart_main_window(); save_preference(); LOG(LOG_DEBUG, "OUT : dencrease_font_size()"); } ebview-0.3.6.2/src/popup.h0000644000175000017500000000171610013675515014572 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __POPUP_H__ #define __POPUP_H__ #include "defs.h" void show_result_in_popup(); void show_popup(RESULT *result); gint close_popup(GtkWidget *widget, gpointer data); #endif /* __POPUP_H__ */ ebview-0.3.6.2/src/dirtree.c0000644000175000017500000005310710016040550015045 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "jcode.h" #include "grep.h" #include "pixmap.h" #include "pref_io.h" #include "dirtree.h" static GtkTreeStore *directory_store=NULL; GtkWidget *directory_view=NULL; GList *active_dir_list=NULL; static GdkPixbuf *pixbuf_file; static GdkPixbuf *pixbuf_folder_closed; static GdkPixbuf *pixbuf_folder_open; gchar *unicode_to_fs(gchar *from) { gchar *to; to = iconv_convert("utf-8", fs_codeset, from); return(to); } gchar *fs_to_unicode(gchar *from) { gchar *to; to = iconv_convert(fs_codeset, "utf-8", from); return(to); } gchar *native_to_generic(gchar *from) { #ifdef __WIN32__ gchar buff[512]; gint i, j; #endif gchar *p; LOG(LOG_DEBUG, "IN : native_to_generic(%s)", from); #ifdef __WIN32__ // if((from[1] != ':') || (from[2] != '\\')){ if(from[1] != ':'){ LOG(LOG_DEBUG, "OUT : native_to_generic() = NULL"); return(NULL); } buff[0] = '/'; buff[1] = from[0]; i = j = 2; while(1){ if(from[i] == '\\') buff[j] = '/'; else buff[j] = from[i]; if(from[i] == '\0') break; i ++; j ++; } p = fs_to_unicode(buff); LOG(LOG_DEBUG, "OUT : native_to_generic() = %s", p); return(p); #else if(from[0] != '/') { LOG(LOG_DEBUG, "OUT : native_to_generic() = NULL"); return(NULL); } p = fs_to_unicode(from); LOG(LOG_DEBUG, "OUT : native_to_generic() = %s", p); return(p); #endif } gchar *generic_to_native(gchar *from) { #ifdef __WIN32__ gchar buff[512]; gint i, j; #endif gchar *p; LOG(LOG_DEBUG, "IN : generic_to_native(%s)", from); if(from[0] != '/') { LOG(LOG_DEBUG, "OUT : generic_to_native() = NULL"); return(NULL); } #ifdef __WIN32__ p = unicode_to_fs(from); if(p == NULL) { LOG(LOG_DEBUG, "OUT : generic_to_native() = NULL"); return(NULL); } buff[0] = p[1]; buff[1] = ':'; i = j = 2; while(1){ if(p[i] == '/') buff[j] = '\\'; else buff[j] = p[i]; if(p[i] == '\0') break; i ++; j ++; } if(strlen(buff) == 2) strcat(buff, "\\"); g_free(p); LOG(LOG_DEBUG, "OUT : generic_to_native() = %s", buff); return(strdup(buff)); #else p = unicode_to_fs(from); LOG(LOG_DEBUG, "OUT : generic_to_native() = %s", p); return(p); #endif } static gchar *compose_full_path(GtkTreePath *path); enum { DIR_ACTIVATABLE_COLUMN, DIR_ACTIVE_COLUMN, DIR_PIXBUF_COLUMN, DIR_PIXBUF_CLOSED_COLUMN, DIR_PIXBUF_OPEN_COLUMN, DIR_NAME_COLUMN, DIR_N_COLUMNS }; static gint compare_func(gconstpointer a, gconstpointer b){ return(strcmp(a,b)); } static gint reverse_compare_func(gconstpointer a, gconstpointer b){ gint r; r = strcmp(a,b); if(r < 0) return(1); else if(r > 0) return(-1); else return(0); } static gint button_press_event(GtkWidget *widget, GdkEventButton *event) { GtkTreeIter iter; GtkTreeSelection *selection; GtkTreePath *path; LOG(LOG_DEBUG, "IN : button_press_event()"); if ((event->type == GDK_BUTTON_PRESS) && (event->button == 1)){ // invert characters on mouse if(gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(directory_view), (gint)(event->x), (gint)(event->y), &path, NULL, NULL, NULL) == FALSE){ return(FALSE); } selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(directory_view)); gtk_tree_selection_select_path(selection, path); if(event->state & GDK_CONTROL_MASK){ gboolean active; gchar *dirname; GList *l; dirname = compose_full_path(path); gtk_tree_model_get_iter(GTK_TREE_MODEL(directory_store), &iter, path); gtk_tree_model_get(GTK_TREE_MODEL(directory_store), &iter, DIR_ACTIVE_COLUMN, &active, -1); if(active){ gtk_tree_store_set(directory_store, &iter, DIR_ACTIVE_COLUMN, FALSE, -1); l = g_list_first(active_dir_list); while(l){ if(strcmp(l->data, dirname) == 0){ active_dir_list = g_list_remove(active_dir_list, l->data); g_free(l->data); g_free(dirname); break; } l = g_list_next(l); } } else { gtk_tree_store_set(directory_store, &iter, DIR_ACTIVE_COLUMN, TRUE, -1); active_dir_list = g_list_append(active_dir_list, dirname); } } return(TRUE); } if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1)){ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(directory_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { return(TRUE); } path = gtk_tree_model_get_path(GTK_TREE_MODEL(directory_store), &iter); if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(directory_store), &iter) == TRUE){ if(gtk_tree_view_row_expanded(GTK_TREE_VIEW(directory_view), path)){ gtk_tree_view_collapse_row(GTK_TREE_VIEW(directory_view), path); } else { gtk_tree_view_expand_row(GTK_TREE_VIEW(directory_view), path, FALSE); } } else { RESULT result; gchar *fullname; gchar *tmpp; tmpp = compose_full_path(path); fullname = generic_to_native(tmpp); if(g_file_test(fullname, G_FILE_TEST_IS_REGULAR) == TRUE){ result.heading = NULL; result.word = NULL; result.type = RESULT_TYPE_GREP; result.data.grep.filename = tmpp; result.data.grep.page = 1; result.data.grep.line = 1; result.data.grep.offset = 0; open_file(&result); } g_free(fullname); g_free(tmpp); } gtk_tree_path_free(path); return(TRUE); } LOG(LOG_DEBUG, "OUT : button_press_event() = FALSE"); return(FALSE); } static gchar *compose_full_path(GtkTreePath *path) { gchar *dirname=NULL; gchar buff[512]; GtkTreePath *tmp_path; GtkTreeIter parent; gchar *name; LOG(LOG_DEBUG, "IN : compose_full_path()"); // Compose full path by going up the path. tmp_path = gtk_tree_path_copy(path); while(1) { gtk_tree_model_get_iter(GTK_TREE_MODEL(directory_store), &parent, tmp_path); gtk_tree_model_get(GTK_TREE_MODEL(directory_store), &parent, DIR_NAME_COLUMN, &name, -1); if((name[1] == ':') && (name[2] == '\\')){ buff[0] = name[0]; buff[1] = '\0'; } else strcpy(buff, name); if(dirname){ if(buff[strlen(buff)-1] == '/') { strcat(buff, dirname); } else { strcat(buff, "/"); strcat(buff, dirname); } g_free(dirname); } dirname = strdup(buff); g_free(name); gtk_tree_path_up(tmp_path); if(gtk_tree_path_get_depth(tmp_path) <= 0) break; } gtk_tree_path_free(tmp_path); sprintf(buff, "/%s", dirname); g_free(dirname); dirname = strdup(buff); LOG(LOG_DEBUG, "OUT : compose_full_path() = %s", dirname); return(dirname); } static void row_collapsed(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) { /* // Closed folder icon gtk_tree_store_set(directory_store, iter, DIR_PIXBUF_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, -1); */ } static void row_expanded(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) { gchar *dirname=NULL; gchar *tmpp; gchar *name; gchar *fullpath=NULL; GDir *dir; GtkTreeIter child; GtkTreeIter grand_child; GList *dir_list = NULL; GList *file_list = NULL; GList *l; gint count=0; LOG(LOG_DEBUG, "IN : row_expanded()"); tmpp = compose_full_path(path); dirname = generic_to_native(tmpp); g_free(tmpp); if((dir = g_dir_open(dirname, 0, NULL)) == NULL){ LOG(LOG_CRITICAL, "Failed to open directory %s", dirname); return; } // Create entry list in the directory. while((name = (gchar *)g_dir_read_name(dir)) != NULL){ fullpath = g_strdup_printf("%s%s%s", dirname, DIR_DELIMITER, name); if(g_file_test(fullpath, G_FILE_TEST_IS_REGULAR) == TRUE){ tmpp = iconv_convert(fs_codeset, "utf-8", name); if((tmpp == NULL) || (strlen(tmpp) == 0)){ LOG(LOG_CRITICAL, "Failed to convert filename from %s", fs_codeset); continue; } file_list = g_list_append(file_list, tmpp); } else if((g_file_test(fullpath, G_FILE_TEST_IS_DIR) == TRUE)){ tmpp = iconv_convert(fs_codeset, "utf-8", name); if((tmpp == NULL) || (strlen(tmpp) == 0)){ LOG(LOG_CRITICAL, "Failed to convert filename from %s", fs_codeset); continue; } dir_list = g_list_append(dir_list, tmpp); } } g_dir_close(dir); g_free(dirname); // Since insertion is done by "prepend", reverse sort. g_list_sort(dir_list, reverse_compare_func); g_list_sort(file_list, reverse_compare_func); l = g_list_first(file_list); while(l){ gchar *name; name = l->data; // Files and directories starting by dot will not be shown if((name[0] == '.') && bsuppress_hidden_files){ g_free(l->data); l = g_list_next(l); continue; } gtk_tree_store_prepend(directory_store, &child, iter); gtk_tree_store_set(directory_store, &child, DIR_NAME_COLUMN, l->data, DIR_PIXBUF_COLUMN, pixbuf_file, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); g_free(l->data); l = g_list_next(l); count ++; } l = g_list_first(dir_list); while(l){ gchar *name; name = l->data; // Files and directories starting by dot will not be shown if((name[0] == '.') && bsuppress_hidden_files){ g_free(l->data); l = g_list_next(l); continue; } gtk_tree_store_prepend(directory_store, &child, iter); gtk_tree_store_set(directory_store, &child, DIR_NAME_COLUMN, l->data, DIR_PIXBUF_COLUMN, pixbuf_folder_open, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); // Put dummy in order to show triangle mark. gtk_tree_store_append(directory_store, &grand_child, &child); gtk_tree_store_set(directory_store, &grand_child, DIR_NAME_COLUMN, "DUMMY", DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); g_free(l->data); l = g_list_next(l); count++; } g_list_free(dir_list); g_list_free(file_list); // Because insertion is done by "prepend", remove the rest while(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(directory_store), &child, iter, count)){ gtk_tree_store_remove(GTK_TREE_STORE(directory_store), &child); } /* // Closed folder icon gtk_tree_store_set(directory_store, iter, DIR_PIXBUF_COLUMN, pixbuf_folder_open, -1); */ LOG(LOG_DEBUG, "OUT : row_expanded()"); return; } static void item_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *)directory_store; GtkTreePath *path = gtk_tree_path_new_from_string (path_str); GtkTreeIter iter; gboolean toggle_item; gchar *dirname; GList *l; LOG(LOG_DEBUG, "IN : item_toggled()"); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, DIR_ACTIVE_COLUMN, &toggle_item, -1); toggle_item ^= 1; gtk_tree_store_set (GTK_TREE_STORE (directory_store), &iter, DIR_ACTIVE_COLUMN, toggle_item, -1); dirname = compose_full_path(path); if(toggle_item) active_dir_list = g_list_append(active_dir_list, dirname); else { l = g_list_first(active_dir_list); while(l){ if(strcmp(l->data, dirname) == 0){ active_dir_list = g_list_remove(active_dir_list, l->data); g_free(l->data); g_free(dirname); break; } l = g_list_next(l); } } gtk_tree_path_free (path); save_dirlist(); LOG(LOG_DEBUG, "OUT : item_toggled()"); } static void show_directory() { GtkTreeIter parent; GtkTreeIter child; #ifdef __WIN32__ gchar *p; gchar buff[128]; char tmp[128]; LOG(LOG_DEBUG, "IN : show_directory()"); GetLogicalDriveStrings(sizeof(buff), buff); p = buff; while(*p != '\0') { if((tolower(p[0]) != 'a') && (tolower(p[0]) != 'b')) { g_snprintf(tmp, sizeof(tmp), "%c:\\", toupper(p[0])); gtk_tree_store_append(directory_store, &parent, NULL); gtk_tree_store_set(directory_store, &parent, DIR_NAME_COLUMN, tmp, DIR_PIXBUF_COLUMN, pixbuf_file, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); // Put dummy in order to show triangle mark. gtk_tree_store_append(directory_store, &child, &parent); gtk_tree_store_set(directory_store, &child, DIR_NAME_COLUMN, "DUMMY", -1); } p += (strlen(p) + 1); } #else GDir *dir; GList *dir_list=NULL; GList *file_list=NULL; GList *l; gchar fullpath[512]; const gchar *name; LOG(LOG_DEBUG, "IN : show_directory()"); if((dir = g_dir_open("/", 0, NULL)) == NULL){ LOG(LOG_CRITICAL, "Failed to open directory /"); return; } while((name = g_dir_read_name(dir)) != NULL){ sprintf(fullpath,"/%s",name); if(g_file_test(fullpath, G_FILE_TEST_IS_REGULAR) == TRUE){ file_list = g_list_append(file_list, fs_to_unicode((gchar *)name)); } else if(g_file_test(fullpath, G_FILE_TEST_IS_DIR) == TRUE){ dir_list = g_list_append(dir_list, fs_to_unicode((gchar *)name)); } } g_dir_close(dir); g_list_sort(dir_list, compare_func); g_list_sort(file_list, compare_func); l = g_list_first(dir_list); while(l){ gtk_tree_store_append(directory_store, &parent, NULL); gtk_tree_store_set(directory_store, &parent, DIR_NAME_COLUMN, l->data, DIR_PIXBUF_COLUMN, pixbuf_folder_open, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); // Put dummy in order to show triangle mark. gtk_tree_store_append(directory_store, &child, &parent); gtk_tree_store_set(directory_store, &child, DIR_NAME_COLUMN, "DUMMY", -1); g_free(l->data); l = g_list_next(l); } l = g_list_first(file_list); while(l){ gtk_tree_store_append(directory_store, &parent, NULL); gtk_tree_store_set(directory_store, &parent, DIR_NAME_COLUMN, l->data, DIR_PIXBUF_COLUMN, pixbuf_file, DIR_PIXBUF_CLOSED_COLUMN, pixbuf_folder_closed, DIR_PIXBUF_OPEN_COLUMN, pixbuf_folder_open, DIR_ACTIVATABLE_COLUMN, TRUE, DIR_ACTIVE_COLUMN, FALSE, -1); g_free(l->data); l = g_list_next(l); } g_list_free(dir_list); g_list_free(file_list); #endif LOG(LOG_DEBUG, "OUT : show_directory()"); } static gboolean expand_to_path(gchar *name) { gchar *p; gint i=0; GtkTreeIter iter; GtkTreeIter *parent=NULL; GtkTreePath *path; LOG(LOG_DEBUG, "IN : expand_to_path(%s)", name); // Expand to "name", then check "name" p = name; for(i=0; ; i++){ gchar *tmp=NULL; if((name[i] != '/') && (name[i] != '\0')){ continue; } if(&name[i] == p){ #ifdef __WIN32__ tmp = malloc(4); tmp[0] = name[i+1]; tmp[1] = ':'; tmp[2] = '\\'; tmp[3] = '\0'; i+=2; p += 3; #else // UNIX root p ++; continue; #endif } else if ((i > 1) && (name[i-1] == ':')){ // Windows drive root tmp = g_strndup(p, &name[i+1] - p); p += 3; } else { tmp = g_strndup(p, &name[i] - p); p += &name[i] - p + 1; } if(gtk_tree_model_iter_children(GTK_TREE_MODEL(directory_store), &iter, parent) == FALSE){ LOG(LOG_DEBUG, "OUT : expand_to_path() : no children"); return(FALSE); } while(1){ gchar *name; gtk_tree_model_get(GTK_TREE_MODEL(directory_store), &iter, DIR_NAME_COLUMN, &name, -1); if(strcmp(name, tmp) == 0){ if(parent) { gtk_tree_iter_free(parent); } path = gtk_tree_model_get_path(GTK_TREE_MODEL(directory_store), &iter); if(gtk_tree_view_row_expanded(GTK_TREE_VIEW(directory_view), path) == FALSE) gtk_tree_view_expand_row(GTK_TREE_VIEW(directory_view), path, FALSE); gtk_tree_path_free(path); parent = gtk_tree_iter_copy(&iter); g_free(name); break; } if(gtk_tree_model_iter_next(GTK_TREE_MODEL(directory_store), &iter) == FALSE){ LOG(LOG_DEBUG, "OUT : expand_to_path() : no such child"); g_free(name); g_free(tmp); return(FALSE); } } g_free(tmp); if(name[i] == '\0') break; } gtk_tree_store_set(GTK_TREE_STORE(directory_store), parent, DIR_ACTIVE_COLUMN, TRUE, -1); /* path = gtk_tree_model_get_path(GTK_TREE_MODEL(directory_store), parent); gtk_tree_view_collapse_row(GTK_TREE_VIEW(directory_view), path); gtk_tree_path_free(path); */ gtk_tree_iter_free(parent); LOG(LOG_DEBUG, "OUT : expand_to_path()"); return(TRUE); } static void expand_history() { GList *l; GList *remove_list = NULL; LOG(LOG_DEBUG, "IN : expand_history()"); l = g_list_first(active_dir_list); while(l){ if(expand_to_path(l->data) == FALSE) remove_list = g_list_append(remove_list, l->data); l = g_list_next(l); } l = g_list_first(remove_list); while(l){ active_dir_list = g_list_remove(active_dir_list, l->data); LOG(LOG_DEBUG, "%s removed from history", l->data); g_free(l->data); l = g_list_next(l); } if(remove_list != NULL){ save_dirlist(); } g_list_free(remove_list); LOG(LOG_DEBUG, "OUT : expand_history()"); } GtkWidget *create_directory_tree() { GtkWidget *scroll; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; LOG(LOG_DEBUG, "IN : create_directory_tree()"); pixbuf_file = create_pixbuf(IMAGE_FILE); pixbuf_folder_closed = create_pixbuf(IMAGE_FOLDER_CLOSED); pixbuf_folder_open = create_pixbuf(IMAGE_FOLDER_OPEN); directory_store = gtk_tree_store_new(DIR_N_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_STRING); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); directory_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(directory_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(directory_view), FALSE); gtk_container_add (GTK_CONTAINER (scroll), directory_view); g_signal_connect(G_OBJECT(directory_view),"row_expanded", G_CALLBACK(row_expanded), (gpointer)NULL); g_signal_connect(G_OBJECT(directory_view),"row_collapsed", G_CALLBACK(row_collapsed), (gpointer)NULL); g_signal_connect(G_OBJECT(directory_view),"button_press_event", G_CALLBACK(button_press_event), (gpointer)NULL); renderer = gtk_cell_renderer_toggle_new(); g_signal_connect (renderer, "toggled", G_CALLBACK(item_toggled), (gpointer)NULL); // checkbox #define TEST #ifdef TEST column = gtk_tree_view_column_new(); gtk_tree_view_append_column (GTK_TREE_VIEW (directory_view), column); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_add_attribute(column, renderer, "active", DIR_ACTIVE_COLUMN); gtk_tree_view_column_add_attribute(column, renderer, "activatable", DIR_ACTIVATABLE_COLUMN); renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_add_attribute(column, renderer, "pixbuf", DIR_PIXBUF_COLUMN); gtk_tree_view_column_add_attribute(column, renderer, "pixbuf-expander-closed", DIR_PIXBUF_CLOSED_COLUMN); gtk_tree_view_column_add_attribute(column, renderer, "pixbuf-expander-open", DIR_PIXBUF_OPEN_COLUMN); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_add_attribute(column, renderer, "text", DIR_NAME_COLUMN); #else column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "active", DIR_ACTIVE_COLUMN, "activatable", DIR_ACTIVATABLE_COLUMN, NULL); #endif gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), FALSE); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (directory_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); // Show initial directory. show_directory(); // Expand and check formerly checked directories. expand_history(); LOG(LOG_DEBUG, "OUT : create_directory_tree()"); return(scroll); } GList *get_active_dir_list() { LOG(LOG_DEBUG, "IN : get_active_dir_list()"); return(g_list_copy(active_dir_list)); } gchar *get_selected_directory() { GtkTreeIter iter; GtkTreeSelection *selection; GtkTreePath *path; gchar *dirname; LOG(LOG_DEBUG, "IN : get_selected_directory()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(directory_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : get_selected_directory() = NULL"); return(NULL); } path = gtk_tree_model_get_path(GTK_TREE_MODEL(directory_store), &iter); dirname = compose_full_path(path); gtk_tree_path_free(path); LOG(LOG_DEBUG, "OUT : get_selected_directory()"); return(dirname); } void refresh_directory_tree() { LOG(LOG_DEBUG, "IN : reresh_directory_tree()"); if(directory_store == NULL) return; gtk_tree_store_clear(GTK_TREE_STORE(directory_store)); show_directory(); expand_history(); LOG(LOG_DEBUG, "OUT : reresh_directory_tree()"); } ebview-0.3.6.2/src/link.h0000644000175000017500000000171010013675515014356 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __LINK_H__ #define __LINK_H__ #include "defs.h" void set_link(TAG *tag); void clear_link(); TAG *scan_link(guint offset); gboolean follow_link(guint offset); #endif /* __LINK_H__ */ ebview-0.3.6.2/src/preference.c0000644000175000017500000003754110016050111015523 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include #ifndef __WIN32__ #include #endif #ifdef __WIN32__ #include #else #include #endif #include "dictbar.h" #include "selection.h" #include "textview.h" #include "popup.h" #include "mainwindow.h" #include "misc.h" #include "pref_color.h" #include "pref_dictgroup.h" #include "pref_dirgroup.h" #include "pref_external.h" #include "pref_font.h" #include "pref_grep.h" #include "pref_gui.h" #include "pref_io.h" #include "pref_search.h" #include "pref_selection.h" #include "pref_shortcut.h" #include "pref_stemming.h" #include "pref_weblist.h" #ifdef __WIN32__ #include #endif #define DEFAULT_WINDOW_WIDTH 670 #define DEFAULT_WINDOW_HEIGHT 440 #define PREF_DIALOG_WIDTH 640 #define PREF_DIALOG_HEIGHT 480 extern gchar *exe_path; GtkWidget *pref_dlg; static GtkWidget *note_pref; extern void print_dict_group(); struct pref_def { gchar *title; gboolean is_child; GtkWidget *(* start_func)(); gboolean (* end_func)(); }; struct pref_def prefs[] = { { N_("Appearance"), FALSE, NULL, NULL}, { N_("Font"), TRUE, pref_start_font, pref_end_font}, { N_("Color"), TRUE, pref_start_color, pref_end_color}, { N_("Misc."), TRUE, pref_start_gui, pref_end_gui}, { N_("Dictionary Search"), FALSE, NULL, NULL}, { N_("Dictionary Group"), TRUE, pref_start_dictgroup, pref_end_dictgroup}, { N_("Selection"), TRUE, pref_start_selection, pref_end_selection}, { N_("Stemming"), TRUE, pref_start_stemming, pref_end_stemming}, { N_("Misc"), TRUE, pref_start_search, pref_end_search}, { N_("File Search"), FALSE, NULL, NULL}, { N_("Directory Group"), TRUE, pref_start_dirgroup, pref_end_dirgroup}, { N_("Filter"), TRUE, pref_start_filter, pref_end_filter}, { N_("Cache"), TRUE, pref_start_cache, pref_end_cache}, { N_("Misc."), TRUE, pref_start_grep, pref_end_grep}, { N_("Shortcut"), FALSE, pref_start_shortcut, pref_end_shortcut}, { N_("Internet Search"), FALSE, pref_start_weblist, pref_end_weblist}, { N_("External Program"), FALSE, pref_start_external, pref_end_external}, {NULL, FALSE, NULL, NULL}}; void initialize_preference(){ gchar *home_dir; GDir *dir; const gchar *name; gchar fullpath[512]; #ifdef __WIN32__ gchar *p; gchar *rc_path; LPITEMIDLIST idl; LPMALLOC im; gchar apppath[_MAX_PATH]; #endif LOG(LOG_DEBUG, "IN : initialize_preference()"); bbeep_on_nohit = TRUE; selection_mode = SELECTION_DO_NOTHING; bignore_locks = TRUE; line_space = 0.3; gaiji_adjustment = 2; max_search = 500; max_heading = 50; max_remember_words = 10; dict_button_length = 5; auto_interval = 1000; auto_minchar = 3; auto_maxchar = 64; bshow_menu_bar = 1; bshow_status_bar = 1; bshow_dict_bar = 1; bshow_tree_tab = 1; bending_correction = 1; bending_only_nohit = 1; bshow_popup_title = 1; bignore_case = 1; bsuppress_hidden_files = 1; popup_width = 300; popup_height = 200; window_x = 0; window_y = 0; window_width = DEFAULT_WINDOW_WIDTH; window_height = DEFAULT_WINDOW_HEIGHT; tree_width = 185; tree_height = 344; pane_direction = 0; tab_position = GTK_POS_TOP; scroll_step = 10; scroll_time = 100000; scroll_margin= 30; bsmooth_scroll = 1; bsort_by_dictionary = 0; bemphasize_keyword = 1; bshow_image = 1; bshow_splash = 1; bword_search_automatic = 1; bshow_filename = 1; bheading_auto_calc = 1; benable_button_color = 1; bplay_sound_internally=1; additional_lines = 10; additional_chars = 12; cache_size = 50; max_bytes_to_guess = 5000; #ifdef __WIN32__ fs_codeset = strdup("Shift_JIS"); #else fs_codeset = nl_langinfo(CODESET); #endif #ifdef __WIN32__ mpeg_template = strdup(""); wave_template = strdup(""); browser_template = strdup(""); open_template = strdup("\"C:\\Program Files\\Hidemaru\\hidemaru.exe\" /j%l %f"); #else mpeg_template = strdup("plaympeg %f"); wave_template = strdup("playwave %f"); browser_template = strdup("gnome-moz-remote %f"); open_template = strdup("emacs +%l %f"); #endif #ifdef __WIN32__ fontset_normal = strdup("ms gothic 9"); fontset_bold = strdup("ms gothic 9"); fontset_italic = strdup("times new roman Italic 9"); fontset_superscript = strdup("ms gothic 7"); #else fontset_normal = strdup("Kochi Mincho 12"); fontset_bold = strdup("Kochi Gothic 12"); fontset_italic = strdup("Sans Italic 12"); fontset_superscript = strdup("Kochi Gothic 8"); #endif color_str[COLOR_LINK] = strdup("#0000c0"); color_str[COLOR_KEYWORD] = strdup("#c00000"); color_str[COLOR_SOUND] = strdup("#00c000"); color_str[COLOR_MOVIE] = strdup("#00c000"); color_str[COLOR_EMPHASIS] = strdup("#ff0000"); color_str[COLOR_REVERSE_BG] = strdup("#c0c0c0"); web_store = gtk_tree_store_new(WEB_N_COLUMNS, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); dict_store = gtk_tree_store_new(DICT_N_COLUMNS, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING); stemming_en_store = gtk_list_store_new(STEMMING_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); stemming_ja_store = gtk_list_store_new(STEMMING_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); shortcut_store = gtk_list_store_new(SHORTCUT_N_COLUMNS, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); filter_store = gtk_list_store_new(FILTER_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); dirgroup_store = gtk_list_store_new(DIRGROUP_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); // Set directories to external variable. // package_dir : Directory which has standard config file. // user_dir : Directory which has user defined config file. // temp_dir : Directory which has temporary files. // cache_dir : Directory which has cache files. #ifdef __WIN32__ p = strrchr(exe_path, '\\'); if(p != NULL){ *p = '\0'; home_dir = exe_path; package_dir = g_strdup_printf("%s%sdata", exe_path, DIR_DELIMITER); } else { home_dir = "."; package_dir = g_strdup_printf(".%sdata", DIR_DELIMITER); } SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &idl); SHGetPathFromIDList(idl, (LPSTR)&apppath); if(SUCCEEDED(SHGetMalloc(&im))){ im->lpVtbl->Free(im, idl); im->lpVtbl->Release(im); } user_dir = g_strdup_printf("%s%sEBView", apppath, DIR_DELIMITER); temp_dir = g_strdup_printf("%s%stmp", user_dir, DIR_DELIMITER); cache_dir = g_strdup_printf("%s%scache", user_dir, DIR_DELIMITER); #else home_dir = getenv("HOME"); package_dir = PACKAGEDIR; user_dir = g_strdup_printf("%s%s.%s", home_dir, DIR_DELIMITER, PACKAGE); temp_dir = g_strdup_printf("%s%stmp", user_dir, DIR_DELIMITER); cache_dir = g_strdup_printf("%s%scache", user_dir, DIR_DELIMITER); #endif if((dir = g_dir_open(user_dir, 0, NULL)) == NULL){ #ifdef __WIN32__ if(mkdir(user_dir) != 0){ #else if(mkdir(user_dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0){ #endif LOG(LOG_CRITICAL, "Failed to create directory : %s\n", user_dir); exit(1); } } else { g_dir_close(dir); } // Check temporary directory and create it if it does not exist if((dir = g_dir_open(temp_dir, 0, NULL)) == NULL){ #ifdef __WIN32__ if(mkdir(temp_dir) != 0){ #else if(mkdir(temp_dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0){ #endif LOG(LOG_CRITICAL, "Failed to create directory : %s\n", temp_dir); exit(1); } } else { while((name = g_dir_read_name(dir)) != NULL){ sprintf(fullpath,"%s%s%s",temp_dir, DIR_DELIMITER, name); unlink(fullpath); } g_dir_close(dir); } // Check cache directory and create it if it does not exist if((dir = g_dir_open(cache_dir, 0, NULL)) == NULL){ #ifdef __WIN32__ if(mkdir(cache_dir) != 0){ #else if(mkdir(cache_dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0){ #endif LOG(LOG_CRITICAL, "Failed to create directory : %s\n", cache_dir); exit(1); } } else { g_dir_close(dir); } find_or_copy_file(FILENAME_STEMMING_EN); find_or_copy_file(FILENAME_STEMMING_JA); find_or_copy_file(FILENAME_WEBLIST); find_or_copy_file(FILENAME_SHORTCUT); find_or_copy_file(FILENAME_FILTER); #ifdef __WIN32__ // Enable customization find_or_copy_file(FILENAME_GTKRC); rc_path = g_strdup_printf("%s%s%s", user_dir, DIR_DELIMITER, FILENAME_GTKRC); gtk_rc_parse(rc_path); g_free(rc_path); #endif LOG(LOG_DEBUG, "exe_path = %s", exe_path); LOG(LOG_DEBUG, "package_dir = %s", package_dir); LOG(LOG_DEBUG, "ser_dir = %s", user_dir); LOG(LOG_DEBUG, "temp_dir = %s", temp_dir); LOG(LOG_DEBUG, "cache_dir = %s", cache_dir); LOG(LOG_DEBUG, "OUT : initialize_preference()"); } static gboolean ok_pref(GtkWidget *widget,gpointer *data){ gint i; LOG(LOG_DEBUG, "IN : ok_pref()"); for( i = 0 ; ; i ++){ if(prefs[i].title == NULL) break; if(prefs[i].end_func != NULL) if(prefs[i].end_func() != TRUE) return(TRUE); } save_preference(); gtk_grab_remove(pref_dlg); gtk_widget_destroy(pref_dlg); close_popup(NULL, NULL); restart_main_window(); auto_lookup_resume(); LOG(LOG_DEBUG, "OUT : ok_pref()"); return(FALSE); } void calculate_font_size(){ PangoFontDescription* desc; PangoLanguage* lang; PangoFontMap* fontmap; #ifndef __WIN32__ Display *display; #endif PangoContext *context; PangoFontset* fontset; PangoFontMetrics* metrics; gint ascent; gint descent; gint width; gint height; font_height = 16; font_width = 8; font_ascent = 2; font_descent = 4; desc = pango_font_description_from_string(fontset_normal); lang = pango_language_from_string("ja"); #ifdef __WIN32__ fontmap = pango_win32_font_map_for_display(); #else display = gdk_x11_drawable_get_xdisplay(main_window->window); if(display == NULL){ LOG(LOG_INFO, "display == NULL"); return; } fontmap = pango_x_font_map_for_display(display); #endif if(fontmap == NULL){ LOG(LOG_INFO, "fontmap == NULL"); return; } context = gtk_widget_get_pango_context(main_window); if(context == NULL){ LOG(LOG_INFO, "context == NULL"); return; } fontset = pango_font_map_load_fontset(fontmap, context, desc, lang); if(fontset == NULL){ LOG(LOG_INFO, "fontset == NULL"); return; } metrics = pango_fontset_get_metrics(fontset); if(metrics == NULL){ LOG(LOG_INFO, "metrics == NULL"); return; } ascent = pango_font_metrics_get_ascent(metrics); descent = pango_font_metrics_get_descent(metrics); width = pango_font_metrics_get_approximate_char_width(metrics); height = ascent + descent; font_height = height / 1000; font_width = width / 1000 + 2; font_ascent = ascent / 1000; font_descent = descent / 1000; } static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { gboolean ret; LOG(LOG_DEBUG, "IN : delete_event()"); ret = ok_pref(NULL, NULL); LOG(LOG_DEBUG, "OUT : delete_event()"); return(ret); } enum { PREF_TITLE_COLUMN, PREF_NUMBER_COLUMN, PREF_N_COLUMNS }; static void preflist_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gint number; gchar *title; LOG(LOG_DEBUG, "IN :preflist_selection_changed"); if (gtk_tree_selection_get_selected(selection, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : weblist_selection_changed"); return; } gtk_tree_model_get (model, &iter, PREF_TITLE_COLUMN, &title, -1); g_free (title); gtk_tree_model_get (model, &iter, PREF_NUMBER_COLUMN, &number, -1); if(number >= 0) gtk_notebook_set_current_page(GTK_NOTEBOOK(note_pref), number); LOG(LOG_DEBUG, "OUT : preflist_selection_changed()"); } void show_preference() { GtkWidget *button; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkWidget *widget; GtkWidget *frame; GtkTreeStore *pref_store; GtkWidget *preflist_view; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; GtkTreeIter parent_iter; GtkTreeIter child_iter; gint i; LOG(LOG_DEBUG, "IN : show_preference()"); auto_lookup_suspend(); pref_dlg = gtk_dialog_new(); gtk_window_set_position(GTK_WINDOW(pref_dlg), GTK_WIN_POS_CENTER_ALWAYS); gtk_grab_add(pref_dlg); g_signal_connect(G_OBJECT (pref_dlg), "delete_event", G_CALLBACK(delete_event), NULL); hbox = gtk_hbox_new(FALSE,10); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(pref_dlg)->vbox) , hbox,TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); pref_store = gtk_tree_store_new (PREF_N_COLUMNS, G_TYPE_STRING, G_TYPE_INT); preflist_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pref_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(preflist_view), TRUE); gtk_box_pack_start (GTK_BOX(hbox) , preflist_view, FALSE, FALSE, 0); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Items"), renderer, "text", PREF_TITLE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (preflist_view), column); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (preflist_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (preflist_selection_changed), NULL); vbox = gtk_vbox_new(FALSE,10); gtk_box_pack_start (GTK_BOX(hbox) , vbox,FALSE, FALSE, 0); note_pref = gtk_notebook_new(); gtk_notebook_set_show_border(GTK_NOTEBOOK(note_pref), FALSE); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_pref), FALSE); gtk_box_pack_start (GTK_BOX(vbox) , note_pref,TRUE, TRUE, 0); for( i = 0 ; prefs[i].title != NULL ; i ++){ if(prefs[i].is_child == TRUE){ gtk_tree_store_append(pref_store, &child_iter, &parent_iter); gtk_tree_store_set(pref_store, &child_iter, PREF_TITLE_COLUMN, _(prefs[i].title), PREF_NUMBER_COLUMN, i, -1); } else { gtk_tree_store_append(pref_store, &parent_iter, NULL); gtk_tree_store_set(pref_store, &parent_iter, PREF_TITLE_COLUMN, _(prefs[i].title), PREF_NUMBER_COLUMN, i, -1); } label = gtk_label_new(prefs[i].title); frame = gtk_frame_new(NULL); gtk_notebook_append_page(GTK_NOTEBOOK(note_pref), frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_widget_set_size_request(hbox, PREF_DIALOG_WIDTH, PREF_DIALOG_HEIGHT); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); gtk_container_add(GTK_CONTAINER(frame), hbox); if(prefs[i].start_func == NULL) widget = gtk_label_new(""); else widget = prefs[i].start_func(); if(widget != NULL) gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); } button = gtk_button_new_with_label(_("Ok")); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pref_dlg)->action_area), button, TRUE, TRUE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(ok_pref), (gpointer)pref_dlg); gtk_widget_grab_default (button); gtk_widget_show_all(pref_dlg); gtk_tree_view_expand_all(GTK_TREE_VIEW(preflist_view)); LOG(LOG_DEBUG, "OUT : show_preference()"); } ebview-0.3.6.2/src/history.h0000644000175000017500000000222410013675515015123 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __HISTORY_H_ #define __HISTORY_H_ #include "defs.h" void save_result_history(RESULT *result); void history_back(); void history_forward(); void save_word_history(const gchar *word); void copy_result(RESULT *to, RESULT *from); RESULT *duplicate_result(RESULT *rp); void set_current_result(RESULT *rp); void free_result(RESULT *rp); void clear_search_result(); #endif /* __HISTORY_H_ */ ebview-0.3.6.2/src/reg.c0000644000175000017500000000303710013675516014176 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "reg.h" REG_TABLE *regex_prepare(guchar *pat, gboolean ignore_case) { REG_TABLE *reg; reg = g_new(REG_TABLE, 1); if(ignore_case == TRUE){ if(0 != regcomp(reg, pat, REG_ICASE|REG_EXTENDED)){ LOG(LOG_CRITICAL, "regcomp: %s", strerror(errno)); g_free(reg); return(NULL); } } else { if(0 != regcomp(reg, pat, REG_EXTENDED)){ LOG(LOG_CRITICAL, "regcomp: %s", strerror(errno)); g_free(reg); return(NULL); } } return(reg); } void regex_free(REG_TABLE *reg) { regfree(reg); g_free(reg); } guchar *regex_search(REG_TABLE *reg, guchar *text){ regmatch_t pmatch[1]; if(REG_NOMATCH == regexec(reg, text, 1, pmatch, 0)){ return(FALSE); } else { if(pmatch[0].rm_so == -1){ return(NULL); } return(text+pmatch[0].rm_so); } } ebview-0.3.6.2/src/Makefile.in0000644000175000017500000005404111241636761015326 0ustar mhattamhatta# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ebview$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/eb4.m4 \ $(top_srcdir)/m4/glib-gettext.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ebview_OBJECTS = bmh.$(OBJEXT) cellrendererebook.$(OBJEXT) \ dialog.$(OBJEXT) dictbar.$(OBJEXT) dirtree.$(OBJEXT) \ dump.$(OBJEXT) eb.$(OBJEXT) ebview.$(OBJEXT) \ external.$(OBJEXT) filter.$(OBJEXT) grep.$(OBJEXT) \ headword.$(OBJEXT) history.$(OBJEXT) hook.$(OBJEXT) \ jcode.$(OBJEXT) link.$(OBJEXT) log.$(OBJEXT) \ mainmenu.$(OBJEXT) mainwindow.$(OBJEXT) menu.$(OBJEXT) \ misc.$(OBJEXT) multi.$(OBJEXT) pixmap.$(OBJEXT) \ popup.$(OBJEXT) preference.$(OBJEXT) pref_color.$(OBJEXT) \ pref_dictgroup.$(OBJEXT) pref_dirgroup.$(OBJEXT) \ pref_external.$(OBJEXT) pref_font.$(OBJEXT) \ pref_grep.$(OBJEXT) pref_gui.$(OBJEXT) pref_io.$(OBJEXT) \ pref_search.$(OBJEXT) pref_selection.$(OBJEXT) \ pref_shortcut.$(OBJEXT) pref_stemming.$(OBJEXT) \ pref_weblist.$(OBJEXT) reg.$(OBJEXT) render.$(OBJEXT) \ selection.$(OBJEXT) shortcut.$(OBJEXT) shortcutfunc.$(OBJEXT) \ splash.$(OBJEXT) statusbar.$(OBJEXT) textview.$(OBJEXT) \ thread_search.$(OBJEXT) websearch.$(OBJEXT) xml.$(OBJEXT) \ xmlinternal.$(OBJEXT) ebview_OBJECTS = $(am_ebview_OBJECTS) ebview_DEPENDENCIES = ebview_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ebview_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(ebview_SOURCES) DIST_SOURCES = $(ebview_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FGREP = @FGREP@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PANGOX_CFLAGS = @PANGOX_CFLAGS@ PANGOX_LIBS = @PANGOX_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ @EBCONF_EBINCS@ \ @EBCONF_ZLIBINCS@ @EBCONF_INTLINCS@ AM_CFLAGS = @PANGOX_CFLAGS@ @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ @CYGWIN_CFLAGS@ -Wall AM_CXXFLAGS = @PANGOX_CFLAGS@ @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ ebview_LDADD = @PANGOX_LIBS@ @GTK_LIBS@ @THREAD_LIBS@ @CYGWIN_CFLAGS@ \ @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ @EBCONF_INTLLIBS@ @RES_FILE@ @EXTRA_LIBS@ ebview_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ ebview_SOURCES = \ bmh.c \ cellrendererebook.c \ dialog.c \ dictbar.c \ dirtree.c \ dump.c \ eb.c \ ebview.c \ external.c \ filter.c \ grep.c \ headword.c \ history.c \ hook.c \ jcode.c \ link.c \ log.c \ mainmenu.c \ mainwindow.c \ menu.c \ misc.c \ multi.c \ pixmap.c \ popup.c \ preference.c \ pref_color.c \ pref_dictgroup.c \ pref_dirgroup.c \ pref_external.c \ pref_font.c \ pref_grep.c \ pref_gui.c \ pref_io.c \ pref_search.c \ pref_selection.c \ pref_shortcut.c \ pref_stemming.c \ pref_weblist.c \ reg.c \ render.c \ selection.c \ shortcut.c \ shortcutfunc.c \ splash.c \ statusbar.c \ textview.c \ thread_search.c \ websearch.c \ xml.c \ xmlinternal.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ebview$(EXEEXT): $(ebview_OBJECTS) $(ebview_DEPENDENCIES) @rm -f ebview$(EXEEXT) $(ebview_LINK) $(ebview_OBJECTS) $(ebview_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cellrendererebook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirtree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headword.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jcode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainmenu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainwindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_color.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_dictgroup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_dirgroup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_external.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_grep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_search.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_selection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_shortcut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_stemming.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pref_weblist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preference.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shortcut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shortcutfunc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statusbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread_search.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/websearch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlinternal.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS ebview.res: ebview.rc windres -i $< -O coff -o $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/src/ebview.res0000644000175000017500000000770210013675515015253 0ustar mhattamhattaL¬.rsrc\<˜@À{yÌ> €P€{yÌ>8€{yÌ> €{yÌ>h€{yÌ>  ¨H(0` QQQÙê×èÕæÔãÒáÐßÎÝÌÚËØ ÉÖ ÜïÛìÓãÎÜÇÓ ÅÑ ÃÏ ÂÌ ÞñÚìÕåÊØ ÉÕ ÀÊ ¾È ¼Å àóÜîÙêÑáÐÞÃÎ ÁÌ ºÃ¹Á·¾Øê×çÊ× ÈÕ ¾Ç ¸Áµ¼³ºßóÞðÑàÏÞÅÐ ¿Ê ¼Å¸À±·¯µÜîØéÖçÌÙ ÆÓ ¿É ¶¾³¹®³¬°ßòÝðøùí­²ª®¨«Ú믵¦©¤§ÛîÔäÓâÏÞÆÒ ÄÐ ÁË ¿É ½Ç »ÄºÂ«°ª­£¤ÛíÒâÏÝÍÛÂÍ ¶½´»¤¦¢¤¡¢Ÿ ÙëÖæËÙ ½Æ ¹Â²¹±¶©­¢¤ŸŸÒâÀË ¸¿°¶¯´¦¨ ¢››™˜ÇÔ ¿È ·¿²¸«¯ ¡—–ÆÑ ¹Á¶½®´­±žŸ›š–”ÕæÍÚÄÏ µ½´º§ª¢£•“”‘’ÂÍ ©¬¥¨œœŒ©¬£¥™˜—•“‘ŽŠ°µžžšš’ŽŒˆ¥§¡£™—‘ŽŒ‡Š…  œœ˜—“ˆƒŸ š™Œމ‡€¨¬–••’ˆ‚†€…~žœ›‹‰ƒ{–””’Š„„~y ‹‡„}ƒ{ ²¹˜–’‘‹†‚{ v!™™‰„†}t!€x ‡†{q"‚z ~v!}s!yo#¬±|s!‹…‰ƒ…ƒ|~u!zq"yn#z €w |s"zp"xn#w w!|r"º»¦§µ¶·¼Áè³´«¥¯°¦§µ¶·ÞÁèßé©®ªš«¥¯°¦§¬±·ÞÁçßä壨ž©Ÿªš«¥–œ¦§¬±·Þâãßä忢˜£~ž•Ÿ¤š›¥–œ¦§ÜÒ·Þâãßäàá—”˜Ž~ž•Ÿ™š› –œ¡§ÜÒ·ÞÕÑßÚàáÙ}—”˜Ž~…•†™š›‘–œ¡ÛÜÒÝÞÕÑßÚÔØs@Ù}DDDDDDDDDDDDDDDDDDDDDDÕÑÖÚÔØŒ|sƒ„DDDDDDDDDDDDDDDDDDDDDDÃÕÑÖ×ÔØ‚`|sƒ„}lDDDD…o†x‡‘ÐDDDDDÓÃÕÑÖÏÔi{_`|stE}lDDDD~nowx‡‘кDDDÒÓÃÊÑËÏÔUir_`jstE}DDDDmvnowxƽ¾‘кDDDµÎÃÊÑËÏShUi5_`jktEDDDDamcnowÌÆ½¾‘ÈDDD͵ÎÃÊÁËÏRSTUV5_`Å6tDDDDJabcdow®Æ½¾ÇÈDDÉ¿µ¶ÃÊÁË!RSTUV5>`?6DDDDGJKYcdDD®ª½¾«DD»Â¿µ¶ÃÄÁPQ!RST4V5>`?DDDDFGJKYcDD¹®ª½¾DDº»¦¿µ¶À¼Á)P2!"=T4V5>,DDDDAFGJ¢˜DD¸¹®ª³´«¥º»¦§µ¶·¼()<2!"=*4#5>DDDD@AF²JDDD­ž©®ª³´«¥¯°¦§µ¶· ()2!"3*4#5DDDD7@AFDDDD£­ž©®ªš«¥¯°¦§¬± ()!"*#DDDDDDDDDDDD˜£¨ž©Ÿªš«¥–œ¦§¬  !"DDDDDDDDDDDD¢˜£~ž•Ÿ¤š›¥–œ¦§ DDDD,-|DDDD”˜Ž~ž•Ÿ™š› –œ¡ DDDD{,-|sDDD—”˜Ž~…•†™š›‘–œ Š’DDDD{‹Œ|DDD}“”aD~…•†x‘–ˆM‰ yŠDDDDU{‹Œ|DD„}lDDŽ~…o†x‘fM] y€DDDDhU{‚`DDƒ„}lDDam~…o†x‡efMp\] yDDDDzhUi{_`|stE}DDuam~nowxZe9fMp\]g DDDDqShUir_`jstEDDGuamvnowxZe9fM[0\]gDDDD^RShUi5_`jkDDDlGJamcnoCZH9:M[0\]DDDDQ^RSTUV5_`DDDDWXGJabcdCLH9:MN0ODDDDPQ!RSTUVDDDDDDEWXGJKYBC8H9DDDDDDDDDDDDDDDDDDDDDDIEAFGJKBC8DDDDDDDDDDDDDDDDDDDDDD67EAFG./89:01;()<2!"=*4#5>,?67@A./&'01 ()2!"3*4#5%,-67&'  ()!"*#+%,-  !"#$%     ÿÿÿÿÿøÿÿÿÿÿðÿÿÿÿÿàÿÿÿÿÿÁÿÿÿÿÿƒÿÿÿÿÿÿÿ?þÿøüÿàø?ÿ€pÿ ÿþÿüÿøÿðÿàÿàÿÀÿÀÿ€€€??????????€€€ÀÿÀÿàÿàÿðÿøÿüÿþÿÿ?ÿÿ€ÿÿàÿÿÿøÿÿÿÿ?ÿÿ00¨€.rsrcebview-0.3.6.2/src/mainwindow.h0000644000175000017500000000310410013675515015574 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" void start_search(); void do_search(GtkWidget *widget, gpointer *data); void show_about(); void show_usage(); void show_home(); void create_main_window(); void restart_main_window(); GtkWidget *create_dict_window(); void claim_clipboard_owner(); void show_text(BOOK_INFO *binfo, char *text, gchar *word); void show_result(RESULT *result, gboolean bsave_history, gboolean breverse_keyword); void show_dict(RESULT *result, gboolean bsave_history, gboolean breverse_keyword); void toggle_auto(); void toggle_popup(); void select_any_search(); void select_exactword_search(); void select_word_search(); void select_endword_search(); void select_keyword_search(); void select_multi_search(); void select_fulltext_search(); void select_internet_search(); void select_grep_search(); void go_up(); void go_down(); ebview-0.3.6.2/src/test0000644000175000017500000001401510016035337014147 0ustar mhattamhattaELFd„4ü 4 (44€4€àà€€ÜÜÜܘܘ $èè˜è˜ÈÈ((( Qåtd/lib/ld-linux.so.2GNU    /ăWÔƒo䃫pôƒ¯^„ó=„: $„9$4„6D„CIT„GOdˆw libc.so.6printfmallociconv_openstrcasecmpstrdupmemseticonv_closeiconv_IO_stdin_used__libc_start_mainstrlen__gmon_start__GLIBC_2.1GLIBC_2.0ii †ii ø™ Йԙؙܙà™ä™è™ì™ð™ ô™ U‰åƒìèáè<è[ÉÃÿ5È™ÿ%Ì™ÿ%Йhéàÿÿÿÿ%Ô™héÐÿÿÿÿ%Ø™héÀÿÿÿÿ%Ü™hé°ÿÿÿÿ%à™h é ÿÿÿÿ%ä™h(éÿÿÿÿ%è™h0é€ÿÿÿÿ%ì™h8épÿÿÿÿ%ð™h@é`ÿÿÿÿ%ô™hHéPÿÿÿ1í^‰áƒäðPTRhȇh€‡QVhdžèÿÿÿôU‰åSè[Ã3P‹ƒ4…ÀtÿЋ]üÉÃU‰åƒì€=ü™u)¡ä˜‹…Òt‰öƒÀ£ä˜ÿҡ䘋…ÒuëÆü™ÉÉöU‰åƒì¡À™…Àt¸…Àtƒì hÀ™èózû÷ƒÄÉÃU‰åƒì‹E‰Eü‹Eü€8uëƒì‹Eü¶Ph€ˆèæþÿÿƒÄEüÿëØƒì h†ˆèÏþÿÿƒÄÉÃU‰åƒì(ÇEø‹E€8u1ƒì jèkþÿÿƒÄ‰Eä‹EäÆƒì hˆˆè’þÿÿƒÄ‹Eä‰EØé"ƒìÿu ÿuè†þÿÿƒÄ…Àu&ƒì hŽˆèbþÿÿƒÄƒì ÿuèôýÿÿƒÄ‰EØéçƒìÿuÿu èëýÿÿƒÄ‰Eüƒ}üÿuƒì h”ˆè"þÿÿƒÄÇEØé±‹E‰Eàƒì ÿuàèÒýÿÿƒÄ‰Eð‹Eð‰EÜ‹EðÑà‰Eô‰Eìƒì ÿuìè ýÿÿƒÄ‰Eè‹Eè‰EäƒìÿuìjÿuäèäýÿÿƒÄƒì EìPEèPEðPEàPÿuüèÖýÿÿƒÄ ‰Eøƒì ÿuüè…ýÿÿƒÄƒ}øt$ÿu ÿu‹Uð‹EÜ)ÐPh ˆèsýÿÿƒÄ‹Eä‰EØë‹Eä‰EØ‹EØÉÃU‰åƒì(ƒäð¸)ÄÆEèéÆEéÆEê©ÆEëåÆEìˆÆEí‡ÆEîƒì EèPèþÿÿƒÄƒìEèPhȈhψèBþÿÿƒÄ‰Eäƒì ÿuäèëýÿÿƒÄƒìÿuähψhȈèþÿÿƒÄ‰Eàƒì ÿuàèÂýÿÿƒÄƒìÿuàhȈhψèðýÿÿƒÄ‰E܃ì ÿuÜè™ýÿÿƒÄÉÃU‰åWVSƒì è[Ã6èüÿÿ“ÿÿÿ‹ÿÿÿ)Ê1öÁú9Ös‰×ÿ”³ÿÿÿF9þrôƒÄ [^_ÉÃU‰åVSè[Ãò‹ÿÿÿƒÿÿÿ)ÁÁù…Éqÿu è:[^ÉÉöÿ”³ÿÿÿ‰òN…ÒuòëåU‰åSR¡°™ƒøÿ»°™t ƒëÿЋƒøÿuôX[ÉÃU‰åSè[ËRèfüÿÿ‹]üÉÃ%02x out1 out2 out3 iconv failed at location %d (%s -> %s) euc-jputf-8¼™ œƒ 0ˆH`‚ š Ä™PLƒDƒþÿÿoƒÿÿÿoðÿÿoú‚ÿÿÿÿÿÿÿÿè˜ʃÚƒêƒúƒ „„*„:„J„Z„GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)GCC: (GNU) 3.3.2 20031022 (Red Hat Linux 3.3.2-1).symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.data.dynamic.ctors.dtors.jcr.got.bss.comment#(( 1HHH7 Ð?`‚`šGÿÿÿoú‚úTþÿÿoƒ0c DƒDl LƒLP uœƒœp´ƒ´°{d„dÌ0ˆ0‡`ˆ`u ؈Ø™ܘÜ Ÿè˜èȨ°™° ¯¸™¸ ¶À™À »Ä™Ä 8Àü™ü Åü 2. Î4ð+ $é(H`‚ú‚ƒDƒLƒ œƒ ´ƒ d„ 0ˆ `ˆ؈ܘ蘰™¸™À™Ä™ü™ˆ„ ñÿ°™*¸™8À™Eä˜Iü™U¬„ kè„ ñÿw´™„¼™‘؈ŸÀ™« ˆ ÁñÿÈè˜ÑăWã`ˆêÔƒoܘñÿà˜ȇD .œƒ 4䃫Fd„ M…F Vôƒ¯hܘñÿ{€‡H ‹ü™ñÿ—dž¹ œ„ó¹ܘñÿÊܘ Õ„:ì$„9þ0ˆ ܘñÿ4„.ü™ñÿ5Ä™KšñÿPD„CbZ…m pT„Gܘñÿ”dˆ£ܘ° ÄܘñÿÚ call_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_auxtest.c_DYNAMICstrdup@@GLIBC_2.0_fp_hwiconv_open@@GLIBC_2.1__fini_array_end__dso_handle__libc_csu_fini_initmalloc@@GLIBC_2.0_starthex_dumpstrlen@@GLIBC_2.0__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_starticonv_close@@GLIBC_2.1printf@@GLIBC_2.0_fini__preinit_array_endstrcasecmp@@GLIBC_2.0_edata_GLOBAL_OFFSET_TABLE__endmemset@@GLIBC_2.0iconv_converticonv@@GLIBC_2.1__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__preinit_array_start__gmon_start__ebview-0.3.6.2/src/shortcut.c0000644000175000017500000001326611241635664015305 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include extern struct _shortcut_command commands[]; gint menuitem_handler(GtkWidget *widget, gchar *string); GtkAccelGroup *accel_group=NULL; static GList *accel_item_list=NULL; gboolean accel_handler(GtkAccelGroup *accelgroup, GObject *arg1, guint arg2, GdkModifierType arg3, gpointer user_data) { GdkEventKey event; gboolean ret; LOG(LOG_DEBUG, "IN : accel_handler()"); event.keyval = (intptr_t) user_data; event.state = arg3; ret = perform_shortcut_by_event(&event); LOG(LOG_DEBUG, "OUT : accel_handler()"); return(ret); } void install_shortcut(){ GtkTreeIter iter; guint state; guint keyval; GtkWidget *item; gint idx; gchar *str; struct _shortcut_command *command; GClosure *closure; LOG(LOG_DEBUG, "IN : install_shortcut()"); idx = 0; if(accel_group != NULL) { gtk_window_remove_accel_group(GTK_WINDOW(main_window), accel_group); g_object_unref(accel_group); } accel_group = gtk_accel_group_new(); gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group); g_signal_connect(G_OBJECT(accel_group), "accel-activate", G_CALLBACK(accel_handler), (gpointer)NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(shortcut_store), &iter, SHORTCUT_STATE_COLUMN, &state, SHORTCUT_KEYVAL_COLUMN, &keyval, SHORTCUT_COMMAND_COLUMN, &command, -1); // g_snprintf(string, 64, "sc_%s", command->name); str = g_strdup_printf("sc_%s", command->name); if((state == 0) && (keyval == GDK_Return)) continue; closure = g_cclosure_new(G_CALLBACK(accel_handler), (gpointer)(intptr_t)keyval, NULL); gtk_accel_group_connect(accel_group, keyval, state, GTK_ACCEL_VISIBLE, closure); /* gtk_widget_add_accelerator (main_window, "activate", accel_group, keyval, state, GTK_ACCEL_VISIBLE); accel_item_list = g_list_append(accel_item_list, item); */ // gtk_widget_show(item); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE); } LOG(LOG_DEBUG, "OUT : install_shortcut()"); } void install_shortcut_old(){ GtkTreeIter iter; guint state; guint keyval; GtkWidget *item; gint idx; gchar *str; struct _shortcut_command *command; LOG(LOG_DEBUG, "IN : install_shortcut()"); idx = 0; accel_group = gtk_accel_group_new(); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(shortcut_store), &iter, SHORTCUT_STATE_COLUMN, &state, SHORTCUT_KEYVAL_COLUMN, &keyval, SHORTCUT_COMMAND_COLUMN, &command, -1); // g_snprintf(string, 64, "sc_%s", command->name); str = g_strdup_printf("sc_%s", command->name); if((state == 0) && (keyval == GDK_Return)) continue; item = gtk_menu_item_new(); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)str); gtk_widget_add_accelerator (item, "activate", accel_group, keyval, state, GTK_ACCEL_VISIBLE); accel_item_list = g_list_append(accel_item_list, item); gtk_widget_show(item); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE); } LOG(LOG_DEBUG, "OUT : install_shortcut()"); } void uninstall_shortcut(){ GList *item; GtkWidget *widget; LOG(LOG_DEBUG, "IN : uninstall_shortcut()"); #if 0 item = g_list_first(accel_item_list); while(item){ widget = (GtkWidget *)(item->data); gtk_widget_destroy(widget); item = g_list_next(item); } g_list_free(accel_item_list); accel_item_list = NULL; g_object_unref(accel_group); #endif LOG(LOG_DEBUG, "OUT : uninstall_shortcut()"); } gboolean perform_shortcut_by_event(GdkEventKey *event){ GtkTreeIter iter; guint state; guint keyval; struct _shortcut_command *command; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(shortcut_store), &iter, SHORTCUT_STATE_COLUMN, &state, SHORTCUT_KEYVAL_COLUMN, &keyval, SHORTCUT_COMMAND_COLUMN, &command, -1); if(event->keyval == keyval){ if(event->state == state){ command->func(); return(TRUE); } if((bignore_locks) && ((event->state | GDK_MOD2_MASK | GDK_LOCK_MASK) == (state | GDK_MOD2_MASK | GDK_LOCK_MASK))){ command->func(); return(TRUE); } } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE); } return(FALSE); } gboolean perform_shortcut(gchar *name){ gint i; LOG(LOG_DEBUG, "IN : perform_shortcut(%s)", name); for(i=0; ; i ++){ if(commands[i].name == NULL) break; if(strcmp(commands[i].name, &name[3]) == 0){ commands[i].func(); LOG(LOG_DEBUG, "OUT : perform_shortcut() = TRUE"); return(TRUE); } } LOG(LOG_DEBUG, "OUT : perform_shortcut() = FALSE"); return(FALSE); } ebview-0.3.6.2/src/thread_search.h0000644000175000017500000000213610013675516016221 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __THREAD_SEARCH_H__ #define __THREAD_SEARCH_H__ #include "defs.h" #include void thread_search(gboolean cancelable, gchar *text, void *(* func)(void *), void *arg); void add_result(RESULT *rp); void set_progress(gfloat progress); void thread_end(); void set_cancel_dlg_text(gchar *text); #endif /* __THREAD_SEARCH_H__ */ ebview-0.3.6.2/src/pref_shortcut.h0000644000175000017500000000176310013675516016321 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_SHORTCUT_H__ #define __PREF_SHORTCUT_H__ #include "defs.h" GtkWidget *pref_start_shortcut(); gboolean pref_end_shortcut(); void key_val_to_string(guint state, guint keyval, gchar *key); #endif /* __PREF_SHORTCUT_H__ */ ebview-0.3.6.2/src/pref_io.c0000644000175000017500000011754710015021637015047 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "jcode.h" #include "xml.h" #include "eb.h" #include "pref_shortcut.h" #include "statusbar.h" #include "splash.h" #include "dirtree.h" #include "misc.h" extern GList *word_history; extern GList *directory_history; extern GList *active_dir_list; #define PREF_TYPE_INTEGER 0 #define PREF_TYPE_BOOLEAN 1 #define PREF_TYPE_STRING 2 #define PREF_TYPE_FLOAT 3 struct _preferences { gchar *name; gint type; void *addr; }; struct _preferences preferences[] = { {"log_level", PREF_TYPE_INTEGER, &ebview_log_level}, {"max_search", PREF_TYPE_INTEGER, &max_search}, {"max_heading", PREF_TYPE_INTEGER, &max_heading}, {"max_remember_words", PREF_TYPE_INTEGER, &max_remember_words}, {"dict_button_length", PREF_TYPE_INTEGER, &dict_button_length}, {"auto_interval", PREF_TYPE_INTEGER, &auto_interval}, {"auto_minchar", PREF_TYPE_INTEGER, &auto_minchar}, {"auto_maxchar", PREF_TYPE_INTEGER, &auto_maxchar}, {"show_menu_bar", PREF_TYPE_BOOLEAN, &bshow_menu_bar}, {"show_status_bar", PREF_TYPE_BOOLEAN, &bshow_status_bar}, {"show_dict_bar", PREF_TYPE_BOOLEAN, &bshow_dict_bar}, {"show_tree_tab", PREF_TYPE_BOOLEAN, &bshow_tree_tab}, {"beep_on_nohit", PREF_TYPE_BOOLEAN, &bbeep_on_nohit}, {"ignore_locks", PREF_TYPE_BOOLEAN, &bignore_locks}, {"ignore_case", PREF_TYPE_BOOLEAN, &bignore_case}, {"suppress_hidden_files", PREF_TYPE_BOOLEAN, &bsuppress_hidden_files}, {"show_popup_title", PREF_TYPE_BOOLEAN, &bshow_popup_title}, {"ending_correction", PREF_TYPE_BOOLEAN, &bending_correction}, {"ending_only_nohit", PREF_TYPE_BOOLEAN, &bending_only_nohit}, //{"selection_mode", PREF_TYPE_INTEGER, &selection_mode}, {"popup_width", PREF_TYPE_INTEGER, &popup_width}, {"popup_height", PREF_TYPE_INTEGER, &popup_height}, {"window_x", PREF_TYPE_INTEGER, &window_x}, {"window_y", PREF_TYPE_INTEGER, &window_y}, {"window_width", PREF_TYPE_INTEGER, &window_width}, {"window_height", PREF_TYPE_INTEGER, &window_height}, {"tree_width", PREF_TYPE_INTEGER, &tree_width}, {"tree_height", PREF_TYPE_INTEGER, &tree_height}, {"pane_direction", PREF_TYPE_INTEGER, &pane_direction}, {"tab_position", PREF_TYPE_INTEGER, &tab_position}, {"wave_template", PREF_TYPE_STRING, &wave_template}, {"mpeg_template", PREF_TYPE_STRING, &mpeg_template}, {"font_normal", PREF_TYPE_STRING, &fontset_normal}, {"font_bold", PREF_TYPE_STRING, &fontset_bold}, {"font_italic", PREF_TYPE_STRING, &fontset_italic}, {"font_superscript", PREF_TYPE_STRING, &fontset_superscript}, {"color_link", PREF_TYPE_STRING, &color_str[COLOR_LINK]}, {"color_keyword", PREF_TYPE_STRING, &color_str[COLOR_KEYWORD]}, {"color_sound", PREF_TYPE_STRING, &color_str[COLOR_SOUND]}, {"color_movie", PREF_TYPE_STRING, &color_str[COLOR_MOVIE]}, {"color_emphasis", PREF_TYPE_STRING, &color_str[COLOR_EMPHASIS]}, {"color_reverse_bg", PREF_TYPE_STRING, &color_str[COLOR_REVERSE_BG]}, {"browser_template", PREF_TYPE_STRING, &browser_template}, {"open_template", PREF_TYPE_STRING, &open_template}, {"line_space", PREF_TYPE_INTEGER, &line_space}, {"smooth_scroll", PREF_TYPE_INTEGER, &bsmooth_scroll}, {"scroll_step", PREF_TYPE_INTEGER, &scroll_step}, {"scroll_time", PREF_TYPE_INTEGER, &scroll_time}, {"scroll_margin", PREF_TYPE_INTEGER, &scroll_margin}, {"sort_by_dictionary", PREF_TYPE_INTEGER, &bsort_by_dictionary}, {"emphasize_keyword", PREF_TYPE_INTEGER, &bemphasize_keyword}, {"show_image", PREF_TYPE_INTEGER, &bshow_image}, {"show_splash", PREF_TYPE_INTEGER, &bshow_splash}, {"show_filename", PREF_TYPE_INTEGER, &bshow_filename}, {"heading_auto_calc", PREF_TYPE_INTEGER, &bheading_auto_calc}, {"enable_button_color", PREF_TYPE_INTEGER, &benable_button_color}, {"word_search_automatic", PREF_TYPE_INTEGER, &bword_search_automatic}, {"additional_lines", PREF_TYPE_INTEGER, &additional_lines}, {"additional_chars", PREF_TYPE_INTEGER, &additional_chars}, {"cache_size", PREF_TYPE_INTEGER, &cache_size}, {"max_bytes_to_guess", PREF_TYPE_INTEGER, &max_bytes_to_guess} }; gboolean load_preference() { gchar filename[512]; xmlDoc *doc=NULL; xmlNode *root; xmlNode *xpreference; xmlNode *xnode; LOG(LOG_DEBUG, "IN : load_preference()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_PREFERENCE); if(find_file(filename) == FALSE) { LOG(LOG_INFO, _("Couldn't open preference. Will use default value.")); goto FAILED; } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xpreference = xml_get_child(root); if(strcmp(xml_get_name(xpreference), "preference") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xpreference); while(xnode){ gint items; gint i; items = sizeof (preferences) / sizeof (preferences[0]); for(i=0 ; iencoding = strdup("euc-jp"); doc->version = strdup("1.0"); xpreference = xml_add_child(doc->root, "preference", NULL); items = sizeof (preferences) / sizeof (preferences[0]); for(i=0 ; iroot; xdictgroup = xml_get_child(xroot); if(strcmp(xml_get_name(xdictgroup), "dictgroup") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xgroup = xml_get_child(xdictgroup); while(xgroup){ if(strcmp(xml_get_name(xgroup), "group") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } gtk_tree_store_append(dict_store, &parent_iter, NULL); gtk_tree_store_set(dict_store, &parent_iter, DICT_TYPE_COLUMN, 0, DICT_TITLE_COLUMN, strdup(xml_get_attr(xgroup, "name")), DICT_ACTIVE_COLUMN, atoi(xml_get_attr(xgroup, "active")), DICT_EDITABLE_COLUMN, TRUE, -1); xdict = xml_get_child(xgroup); while(xdict){ if(strcmp(xml_get_name(xdict), "dict") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xdict); book_name = NULL; book_path = NULL; subbook_no = 0; active = 0; appendix_path = NULL; appendix_subbook_no = 0; bg = NULL; fg = NULL; while(xnode){ gchar *name; name = xml_get_name(xnode); if(strcmp(name, "name") == 0){ book_name = xml_get_content(xnode); } else if(strcmp(name, "path") == 0){ book_path = xml_get_content(xnode); } else if(strcmp(name, "subbook") == 0){ subbook_no = atoi(xml_get_content(xnode)); } else if(strcmp(name, "appendix_path") == 0){ appendix_path = xml_get_content(xnode); if(strlen(appendix_path) == 0) appendix_path = NULL; } else if(strcmp(name, "appendix_subbook") == 0){ appendix_subbook_no = atoi(xml_get_content(xnode)); } else if(strcmp(name, "active") == 0){ active = atoi(xml_get_content(xnode)); } else if(strcmp(name, "fg") == 0){ fg = xml_get_content(xnode); } else if(strcmp(name, "bg") == 0){ bg = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if(!book_name || (strlen(book_name) == 0)) book_name = NULL; if(!book_path || (strlen(book_path) == 0)) book_path = NULL; if(!book_name && !book_path){ xdict = xml_get_next(xdict); continue; } if(!fg || (strlen(fg) == 0)) //fg = DEFAULT_DICT_FGCOLOR; fg = NULL; if(!bg || (strlen(bg) == 0)) // bg = DEFAULT_DICT_BGCOLOR; bg = NULL; fflush(stdout); if(book_path) fs_book_path = unicode_to_fs(book_path); else fs_book_path = NULL; if(appendix_path) fs_appendix_path = unicode_to_fs(appendix_path); else fs_appendix_path = NULL; binfo = load_book(fs_book_path, subbook_no, fs_appendix_path, appendix_subbook_no, fg, bg); splash_message(fs_book_path); g_free(fs_book_path); g_free(fs_appendix_path); if(binfo != NULL){ gtk_tree_store_append(dict_store, &child_iter, &parent_iter); gtk_tree_store_set (dict_store, &child_iter, DICT_TYPE_COLUMN, 1, DICT_TITLE_COLUMN, book_name, DICT_PATH_COLUMN, book_path, DICT_SUBBOOK_NO_COLUMN, subbook_no, DICT_APPENDIX_PATH_COLUMN, appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, appendix_subbook_no, DICT_ACTIVE_COLUMN, active, DICT_MEMBER_COLUMN, binfo, DICT_EDITABLE_COLUMN, FALSE, DICT_FGCOLOR_COLUMN, fg, DICT_BGCOLOR_COLUMN, bg, -1); } xdict = xml_get_next(xdict); } xgroup = xml_get_next(xgroup); } xml_destroy_document(doc); check_search_method(); LOG(LOG_DEBUG, "OUT : load_dictgroup() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); check_search_method(); LOG(LOG_DEBUG, "OUT : load_dictgroup() = FALSE"); return(FALSE); } gboolean save_dictgroup() { char filename[512]; xmlDoc *doc; xmlNode *xdictgroup; xmlNode *xgroup; xmlNode *xdict; gchar buff[512]; gchar *title; gboolean active; BOOK_INFO *binfo; gchar *fg, *bg; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN : save_dictgroup()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_DICTGROUP); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xdictgroup = xml_add_child(doc->root, "dictgroup", NULL); g_assert(xdictgroup != NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &parent_iter, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, -1); g_assert(title != NULL); g_assert(strlen(title) != 0); xgroup = xml_add_child(xdictgroup, "group", NULL); xml_set_attr(xgroup, "name", title); sprintf(buff, "%d", active); xml_set_attr(xgroup, "active", buff); g_free(title); if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &child_iter, &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &child_iter, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, DICT_FGCOLOR_COLUMN, &fg, DICT_BGCOLOR_COLUMN, &bg, -1); g_assert(title != NULL); g_assert(binfo != NULL); g_assert(strlen(title) != 0); xdict = xml_add_child(xgroup, "dict", NULL); g_assert(xdict != NULL); xml_add_child(xdict, "name", title); xml_add_child(xdict, "path", binfo->book_path); sprintf(buff, "%d", binfo->subbook_no); xml_add_child(xdict, "subbook", buff); xml_add_child(xdict, "appendix_path", binfo->appendix_path); sprintf(buff, "%d", binfo->appendix_subbook_no); xml_add_child(xdict, "appendix_subbook", buff); sprintf(buff, "%d", active); xml_add_child(xdict, "active", buff); xml_add_child(xdict, "bg", bg); xml_add_child(xdict, "fg", fg); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &child_iter) == TRUE); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_dictgroup()"); return(TRUE); } gboolean load_stemming_en() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xending; xmlNode *xentry; xmlNode *xnode; gchar *inflected; gchar *normal; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : load_stemming_en()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_STEMMING_EN); if(find_file(filename) == FALSE) { return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xending = xml_get_child(root); if(strcmp(xml_get_name(xending), "endinglist") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xentry = xml_get_child(xending); while(xentry){ if(strcmp(xml_get_name(xentry), "entry") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xentry); inflected = NULL; normal=NULL; while(xnode){ gchar *tagname; tagname = xml_get_name(xnode); if(strcmp(tagname, "inflected") == 0){ inflected = xml_get_content(xnode); } else if(strcmp(tagname, "normal") == 0){ normal = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if(!inflected && !normal){ xentry = xml_get_next(xentry); continue; } if(strlen(inflected) == 0){ xentry = xml_get_next(xentry); continue; } if(strlen(normal) == 0) normal = NULL; gtk_list_store_append(stemming_en_store, &iter); gtk_list_store_set(stemming_en_store, &iter, STEMMING_PATTERN_COLUMN, inflected, STEMMING_NORMAL_COLUMN, normal, -1); xentry = xml_get_next(xentry); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_stemming_en() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_stemming_en() = FALSE"); return(FALSE); } gboolean load_stemming_ja() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xending; xmlNode *xentry; xmlNode *xnode; gchar *inflected; gchar *normal; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : load_stemming_ja()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_STEMMING_JA); if(find_file(filename) == FALSE) { return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xending = xml_get_child(root); if(strcmp(xml_get_name(xending), "endinglist") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xentry = xml_get_child(xending); while(xentry){ if(strcmp(xml_get_name(xentry), "entry") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xentry); inflected = NULL; normal=NULL; while(xnode){ gchar *tagname; tagname = xml_get_name(xnode); if(strcmp(tagname, "inflected") == 0){ inflected = xml_get_content(xnode); } else if(strcmp(tagname, "normal") == 0){ normal = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if(!inflected && !normal){ xentry = xml_get_next(xentry); continue; } if(strlen(inflected) == 0){ xentry = xml_get_next(xentry); continue; } if(strlen(normal) == 0) normal = NULL; gtk_list_store_append(stemming_ja_store, &iter); gtk_list_store_set(stemming_ja_store, &iter, STEMMING_PATTERN_COLUMN, inflected, STEMMING_NORMAL_COLUMN, normal, -1); xentry = xml_get_next(xentry); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_stemming_ja() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_stemming_ja() = FALSE"); return(FALSE); } gboolean save_stemming_en() { gchar filename[512]; xmlDoc *doc; xmlNode *xending; xmlNode *xentry; gchar *pattern; gchar *normal; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : save_stemming_en()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_STEMMING_EN); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xending = xml_add_child(doc->root, "endinglist", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(stemming_en_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(stemming_en_store), &iter, STEMMING_PATTERN_COLUMN, &pattern, STEMMING_NORMAL_COLUMN, &normal, -1); xentry = xml_add_child(xending, "entry", NULL); xml_add_child(xentry, "inflected", pattern); xml_add_child(xentry, "normal", normal); g_free (pattern); g_free (normal); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(stemming_en_store), &iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_stemming_en()"); return(TRUE); } gboolean save_stemming_ja() { gchar filename[512]; xmlDoc *doc; xmlNode *xending; xmlNode *xentry; gchar *pattern; gchar *normal; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : save_stemming_ja()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_STEMMING_JA); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xending = xml_add_child(doc->root, "endinglist", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(stemming_ja_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(stemming_ja_store), &iter, STEMMING_PATTERN_COLUMN, &pattern, STEMMING_NORMAL_COLUMN, &normal, -1); xentry = xml_add_child(xending, "entry", NULL); xml_add_child(xentry, "inflected", pattern); xml_add_child(xentry, "normal", normal); g_free (pattern); g_free (normal); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(stemming_ja_store), &iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_stemming_ja()"); return(TRUE); } gboolean load_weblist() { char filename[512]; char *name=NULL; char *home=NULL; char *pre=NULL; char *post=NULL; char *glue=NULL; char *code=NULL; xmlDoc *doc; xmlNode *root; xmlNode *xsearchengine; xmlNode *xgroup; xmlNode *xengine; xmlNode *xnode; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN : load_weblist()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_WEBLIST); if(find_file(filename) == FALSE){ return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xsearchengine = xml_get_child(root); if(strcmp(xml_get_name(xsearchengine), "searchengine") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xgroup = xml_get_child(xsearchengine); while(xgroup){ if(strcmp(xml_get_name(xgroup), "group") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } gtk_tree_store_append(web_store, &parent_iter, NULL); gtk_tree_store_set (web_store, &parent_iter, WEB_TYPE_COLUMN, 0, WEB_TITLE_COLUMN, strdup(xml_get_attr(xgroup, "name")), -1); xengine = xml_get_child(xgroup); while(xengine){ if(strcmp(xml_get_name(xengine), "engine") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } name = home = pre = post = glue = code = NULL; xnode = xml_get_child(xengine); while(xnode){ gchar *tagname; tagname = xml_get_name(xnode); if(strcmp(tagname, "name") == 0){ name = xml_get_content(xnode); } else if(strcmp(tagname, "home") == 0){ home = xml_get_content(xnode); } else if(strcmp(tagname, "pre") == 0){ pre = xml_get_content(xnode); } else if(strcmp(tagname, "post") == 0){ post = xml_get_content(xnode); } else if(strcmp(tagname, "glue") == 0){ glue = xml_get_content(xnode); } else if(strcmp(tagname, "charcode") == 0){ code = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if((!name) || (!pre)) { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } gtk_tree_store_append(web_store, &child_iter, &parent_iter); if(strlen(home) == 0) home = NULL; if(strlen(pre) == 0) pre = NULL; if(strlen(post) == 0) post = NULL; if(strlen(glue) == 0) glue = NULL; if(strlen(code) == 0) code = NULL; gtk_tree_store_set (web_store, &child_iter, WEB_TYPE_COLUMN, 1, WEB_TITLE_COLUMN, name, WEB_HOME_COLUMN, home, WEB_PRE_COLUMN, pre, WEB_POST_COLUMN, post, WEB_GLUE_COLUMN, glue, WEB_CODE_COLUMN, code, -1); xengine = xml_get_next(xengine); } xgroup = xml_get_next(xgroup); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_weblist() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_weblist() = FALSE"); return(FALSE); } gboolean save_weblist() { char filename[512]; xmlDoc *doc; xmlNode *xsearchengine; xmlNode *xgroup; xmlNode *xengine; gint type; gchar *title=NULL; gchar *home=NULL; gchar *pre=NULL; gchar *post=NULL; gchar *glue=NULL; gchar *code=NULL; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN : save_weblist()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_WEBLIST); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xsearchengine = xml_add_child(doc->root, "searchengine", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(web_store), &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(web_store), &parent_iter, WEB_TYPE_COLUMN, &type, WEB_TITLE_COLUMN, &title, -1); xgroup = xml_add_child(xsearchengine, "group", NULL); xml_set_attr(xgroup, "name", title); g_free (title); if(gtk_tree_model_iter_children(GTK_TREE_MODEL(web_store), &child_iter, &parent_iter) == TRUE){ do { title=NULL; home=NULL; pre=NULL; post=NULL; glue=NULL; code=NULL; gtk_tree_model_get(GTK_TREE_MODEL(web_store), &child_iter, WEB_TYPE_COLUMN, &type, WEB_TITLE_COLUMN, &title, WEB_HOME_COLUMN, &home, WEB_PRE_COLUMN, &pre, WEB_POST_COLUMN, &post, WEB_GLUE_COLUMN, &glue, WEB_CODE_COLUMN, &code, -1); xengine = xml_add_child(xgroup, "engine", NULL); xml_add_child(xengine, "name", title); xml_add_child(xengine, "home", home); xml_add_child(xengine, "pre", pre); xml_add_child(xengine, "post", post); xml_add_child(xengine, "glue", glue); xml_add_child(xengine, "charcode", code); g_free (title); g_free (home); g_free (pre); g_free (post); g_free (glue); g_free (code); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(web_store), &child_iter) == TRUE); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(web_store), &parent_iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_weblist()"); return(TRUE); } extern struct _shortcuts shortcuts; extern struct _shortcut_command commands[]; gboolean load_shortcut() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xshortcutdef; xmlNode *xshortcut; xmlNode *xnode; gint state = 0; gint keyval = 0; gchar *command; GtkTreeIter iter; gchar keystr[64]; void (* func)(); gint i; LOG(LOG_DEBUG, "IN : load_shortcut()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_SHORTCUT); if(find_file(filename) == FALSE){ return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xshortcutdef = xml_get_child(root); if(strcmp(xml_get_name(xshortcutdef), "shortcutdef") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xshortcut = xml_get_child(xshortcutdef); while(xshortcut){ if(strcmp(xml_get_name(xshortcut), "shortcut") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xshortcut); command = NULL; while(xnode){ gchar *tagname; tagname = xml_get_name(xnode); if(strcmp(tagname, "modifier") == 0){ state = strtol(xml_get_content(xnode), NULL, 16); } else if(strcmp(tagname, "value") == 0){ keyval = strtol(xml_get_content(xnode), NULL, 16); } else if(strcmp(tagname, "command") == 0){ command = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if((keyval == 0) || (command == NULL)) { xshortcut = xml_get_next(xshortcut); continue; } func = NULL; for(i=0 ; ; i ++){ if(commands[i].name == NULL) break; if(strcmp(commands[i].name, command) == 0){ func = commands[i].func; break; } } if(func == NULL){ xshortcut = xml_get_next(xshortcut); continue; } key_val_to_string(state, keyval, keystr); gtk_list_store_append(shortcut_store, &iter); gtk_list_store_set(shortcut_store, &iter, SHORTCUT_STATE_COLUMN, state, SHORTCUT_KEYVAL_COLUMN, keyval, SHORTCUT_NAME_COLUMN, command, SHORTCUT_DESCRIPTION_COLUMN, _(command), SHORTCUT_KEYSTR_COLUMN, keystr, SHORTCUT_COMMAND_COLUMN, &commands[i], -1); xshortcut = xml_get_next(xshortcut); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_shortcut() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_shortcut() = FALSE"); return(FALSE); } gboolean save_shortcut() { gchar filename[512]; xmlDoc *doc; xmlNode *xshortcutdef; xmlNode *xshortcut; gchar buff[16]; GtkTreeIter iter; guint state; guint keyval; struct _shortcut_command *command; LOG(LOG_DEBUG, "IN : save_shortcut()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_SHORTCUT); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xshortcutdef = xml_add_child(doc->root, "shortcutdef", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(shortcut_store), &iter, SHORTCUT_STATE_COLUMN, &state, SHORTCUT_KEYVAL_COLUMN, &keyval, SHORTCUT_COMMAND_COLUMN, &command, -1); xshortcut = xml_add_child(xshortcutdef, "shortcut", NULL); sprintf(buff, "0x%04x", state); xml_add_child(xshortcut, "modifier", buff); sprintf(buff, "0x%04x", keyval); xml_add_child(xshortcut, "value", buff); xml_add_child(xshortcut, "command", command->name); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(shortcut_store), &iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_shortcut()"); return(TRUE); } gboolean save_history() { gchar filename[512]; xmlDoc *doc; xmlNode *xword; GList *l; LOG(LOG_DEBUG, "IN : save_history()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_HISTORY); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xword = xml_add_child(doc->root, "word", NULL); for(l=g_list_first(word_history) ; l != NULL ; l = g_list_next(l)){ xml_add_child(xword, "entry", l->data); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_history()"); return(TRUE); } gboolean load_history() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xword; xmlNode *xnode; LOG(LOG_DEBUG, "IN : load_history()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_HISTORY); if(find_file(filename) == FALSE) { return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xword = xml_get_child(root); if(strcmp(xml_get_name(xword), "word") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xword); while(xnode){ gchar *tagname; gchar *tmp; tagname = xml_get_name(xnode); if(strcmp(tagname, "entry") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } tmp = xml_get_content(xnode); if(strlen(tmp) != 0) word_history = g_list_append(word_history, strdup(tmp)); xnode = xml_get_next(xnode); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_history() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_history() = FALSE"); return(FALSE); } gboolean save_dirlist() { gchar filename[512]; xmlDoc *doc; xmlNode *xdirectory; GList *l; LOG(LOG_DEBUG, "IN : save_dirlist()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_DIRLIST); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xdirectory = xml_add_child(doc->root, "dirlist", NULL); for(l=g_list_first(active_dir_list) ; l != NULL ; l = g_list_next(l)){ xml_add_child(xdirectory, "entry", l->data); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_dirlist()"); return(TRUE); } gboolean load_dirlist() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xdirectory; xmlNode *xnode; LOG(LOG_DEBUG, "IN : load_dirlist()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_DIRLIST); if(find_file(filename) == FALSE) { return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xdirectory = xml_get_child(root); if(strcmp(xml_get_name(xdirectory), "dirlist") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xdirectory); while(xnode){ gchar *tagname; gchar *tmp; tagname = xml_get_name(xnode); if(strcmp(tagname, "entry") != 0) { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } tmp = xml_get_content(xnode); active_dir_list = g_list_append(active_dir_list, strdup(tmp)); xnode = xml_get_next(xnode); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_dirlist() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_dirlist() = FALSE"); return(FALSE); } gboolean load_filter() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xfilterdef; xmlNode *xfilter; xmlNode *xnode; gchar *ext; gchar *filter_command; gchar *open_command; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : load_filter()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_FILTER); if(find_file(filename) == FALSE){ return(FALSE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xfilterdef = xml_get_child(root); if(strcmp(xml_get_name(xfilterdef), "filterdef") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xfilter = xml_get_child(xfilterdef); while(xfilter){ if(strcmp(xml_get_name(xfilter), "filter") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xfilter); ext = NULL; filter_command = NULL; open_command = NULL; while(xnode){ gchar *tagname; tagname = xml_get_name(xnode); if(strcmp(tagname, "extension") == 0){ ext = xml_get_content(xnode); } else if(strcmp(tagname, "filter_command") == 0){ filter_command = xml_get_content(xnode); } else if(strcmp(tagname, "open_command") == 0){ open_command = xml_get_content(xnode); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } if(strlen(ext) == 0) ext = NULL; if(strlen(filter_command) == 0) filter_command = NULL; if(strlen(open_command) == 0) open_command = NULL; if((filter_command == 0) && (open_command == NULL)) { xfilter = xml_get_next(xfilter); continue; } gtk_list_store_append(filter_store, &iter); gtk_list_store_set(filter_store, &iter, FILTER_EXT_COLUMN, ext, FILTER_FILTER_COMMAND_COLUMN, filter_command, FILTER_OPEN_COMMAND_COLUMN, open_command, FILTER_EDITABLE_COLUMN, TRUE, -1); xfilter = xml_get_next(xfilter); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_filter() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_filter() = FALSE"); return(FALSE); } gboolean save_filter() { gchar filename[512]; xmlDoc *doc; xmlNode *xfilterdef; xmlNode *xfilter; gchar *ext; gchar *filter_command; gchar *open_command; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : save_filter()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_FILTER); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xfilterdef = xml_add_child(doc->root, "filterdef", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(filter_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, FILTER_EXT_COLUMN, &ext, FILTER_FILTER_COMMAND_COLUMN, &filter_command, FILTER_OPEN_COMMAND_COLUMN, &open_command, -1); xfilter = xml_add_child(xfilterdef, "filter", NULL); xml_add_child(xfilter, "extension", ext); xml_add_child(xfilter, "filter_command", filter_command); xml_add_child(xfilter, "open_command", open_command); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(filter_store), &iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_filter()"); return(TRUE); } gboolean save_dirgroup() { gchar filename[512]; xmlDoc *doc; xmlNode *xdirgroup; xmlNode *xgroup; gchar *title; gchar *list; gboolean active; gchar buff[512]; gchar *p, *pp; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : save_dirgroup()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_DIRGROUP); doc = xml_doc_new(); doc->encoding = strdup("euc-jp"); doc->version = strdup("1.0"); xdirgroup = xml_add_child(doc->root, "dirgroup", NULL); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, DIRGROUP_LIST_COLUMN, &list, DIRGROUP_ACTIVE_COLUMN, &active, -1); if(strcmp(title, _("Manual Select")) == 0){ g_free (title); g_free (list); continue; } xgroup = xml_add_child(xdirgroup, "group", NULL); xml_set_attr(xgroup, "name", title); sprintf(buff, "%d", active); xml_set_attr(xgroup, "active", buff); p = list; pp = NULL; while(1){ pp = strchr(p, '\n'); if(pp == NULL){ xml_add_child(xgroup, "dir", p); break; } else { *pp = '\0'; if(strlen(p) != 0) xml_add_child(xgroup, "dir", p); *pp = '\n'; p = pp + 1; } } g_free (title); g_free (list); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } xml_save_file(filename, doc); xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : save_dirgroup()"); return(TRUE); } gboolean load_dirgroup() { gchar filename[512]; xmlDoc *doc; xmlNode *root; xmlNode *xdirgroup; xmlNode *xgroup; xmlNode *xnode; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : load_dirgroup()"); sprintf(filename, "%s%s%s", user_dir, DIR_DELIMITER, FILENAME_DIRGROUP); if(find_file(filename) == FALSE){ return(TRUE); } doc = xml_parse_file(filename); if(doc == NULL){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } root = doc->root; xdirgroup = xml_get_child(root); if(strcmp(xml_get_name(xdirgroup), "dirgroup") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xgroup = xml_get_child(xdirgroup); while(xgroup){ gchar buff[65535]; if(strcmp(xml_get_name(xgroup), "group") != 0){ LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_child(xgroup); buff[0] = '\0'; while(xnode){ gchar *dir; if(strcmp(xml_get_name(xnode), "dir") == 0){ dir = xml_get_content(xnode); if(strlen(buff) != 0) strcat(buff, "\n"); strcat(buff, dir); } else { LOG(LOG_ERROR, _("Failed to parse %s. Check contents."), filename); goto FAILED; } xnode = xml_get_next(xnode); } gtk_list_store_append(dirgroup_store, &iter); gtk_list_store_set(dirgroup_store, &iter, DIRGROUP_TITLE_COLUMN, xml_get_attr(xgroup, "name"), DIRGROUP_LIST_COLUMN, buff, DIRGROUP_ACTIVE_COLUMN, atoi(xml_get_attr(xgroup, "active")), -1); xgroup = xml_get_next(xgroup); } xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_dirgroup() = TRUE"); return(TRUE); FAILED: xml_destroy_document(doc); LOG(LOG_DEBUG, "OUT : load_dirgroup() = FALSE"); return(FALSE); } ebview-0.3.6.2/src/dialog.h0000644000175000017500000000205310013675515014661 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DIALOG_H__ #define __DIALOG_H__ #include "defs.h" void popup_warning(char *message); void popup_error(char *message); void center_dialog(GtkWidget *window, GtkWidget *dialog); void push_message(gchar *str); void clear_message(); gboolean popup_active(); #endif /* __DIALOG_H__ */ ebview-0.3.6.2/src/Makefile.win32debug0000644000175000017500000003651210013675515016670 0ustar mhattamhatta# Makefile.in generated by automake 1.6.3 from Makefile.am. # src/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = /bin/bash srcdir = . top_srcdir = .. prefix = /usr/local exec_prefix = ${prefix} bindir = ${exec_prefix}/bin sbindir = ${exec_prefix}/sbin libexecdir = ${exec_prefix}/libexec datadir = ${prefix}/share sysconfdir = ${prefix}/etc sharedstatedir = ${prefix}/com localstatedir = ${prefix}/var libdir = ${exec_prefix}/lib infodir = ${prefix}/info mandir = ${prefix}/man includedir = ${prefix}/include oldincludedir = /usr/include pkgdatadir = $(datadir)/ebview pkglibdir = $(libdir)/ebview pkgincludedir = $(includedir)/ebview top_builddir = .. ACLOCAL = aclocal-1.6 AUTOCONF = autoconf AUTOMAKE = automake-1.6 AUTOHEADER = autoheader am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = ${INSTALL} INSTALL_HEADER = $(INSTALL_DATA) transform = s,x,x, NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = .exe OBJEXT = o PATH_SEPARATOR = : AMTAR = tar AWK = gawk CATALOGS = ja.mo CATOBJEXT = .mo CC = gcc CYGWIN_CFLAGS = -mno-cygwin -mms-bitfields DATADIRNAME = lib DEPDIR = .deps EBCONF_EBINCS = -I/usr/local/include EBCONF_EBLIBS = -L/usr/local/lib -leb EBCONF_INTLINCS = EBCONF_INTLLIBS = -lintl -liconv EBCONF_PTHREAD_CFLAGS = EBCONF_PTHREAD_CPPFLAGS = EBCONF_PTHREAD_LDFLAGS = EBCONF_ZLIBINCS = EBCONF_ZLIBLIBS = -lz EXTRA_LIBS = -lregex -lwinmm GMOFILES = ja.gmo GMSGFMT = /cygdrive/c/gtk/bin/msgfmt GTK_CFLAGS = -Ic:/gtk/include/gtk-2.0 -Ic:/gtk/lib/gtk-2.0/include -Ic:/gtk/include/atk-1.0 -Ic:/gtk/include/pango-1.0 -Ic:/gtk/include/glib-2.0 -Ic:/gtk/lib/glib-2.0/include GTK_LIBS = -Lc:/gtk/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s INSTOBJEXT = .mo INTLDEPS = INTLLIBS = -lintl -liconv INTLOBJS = LN_S = ln -s MKINSTALLDIRS = ./mkinstalldirs PACKAGE = ebview PKG_CONFIG = /cygdrive/c/gtk/bin/pkg-config POFILES = ja.po POSUB = po RANLIB = ranlib RES_FILE = ebview.res STRIP = THREAD_LIBS = -lpthreadGC USE_NLS = yes VERSION = 0.3.3 am__include = include am__quote = install_sh = /home/ken/ebview-0.3.4/install-sh bin_PROGRAMS = ebview AM_CPPFLAGS = -I/usr/local/include \ AM_CFLAGS = -Ic:/gtk/include/gtk-2.0 -Ic:/gtk/lib/gtk-2.0/include -Ic:/gtk/include/atk-1.0 -Ic:/gtk/include/pango-1.0 -Ic:/gtk/include/glib-2.0 -Ic:/gtk/lib/glib-2.0/include -mno-cygwin -mms-bitfields -Wall AM_CXXFLAGS = -Ic:/gtk/include/gtk-2.0 -Ic:/gtk/lib/gtk-2.0/include -Ic:/gtk/include/atk-1.0 -Ic:/gtk/include/pango-1.0 -Ic:/gtk/include/glib-2.0 -Ic:/gtk/lib/glib-2.0/include ebview_LDADD = -Lc:/gtk/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lpthreadGC -mno-cygwin -mms-bitfields \ -L/usr/local/lib -leb -lz -lintl -liconv ebview.res -lregex -lwinmm ebview_LDFLAGS = ebview_SOURCES = \ bmh.c \ cellrendererebook.c \ dialog.c \ dictbar.c \ dirtree.c \ dump.c \ eb.c \ ebview.c \ external.c \ filter.c \ grep.c \ headword.c \ history.c \ hook.c \ jcode.c \ link.c \ log.c \ mainmenu.c \ mainwindow.c \ menu.c \ misc.c \ multi.c \ pixmap.c \ popup.c \ preference.c \ pref_color.c \ pref_dictgroup.c \ pref_dirgroup.c \ pref_external.c \ pref_font.c \ pref_grep.c \ pref_gui.c \ pref_io.c \ pref_search.c \ pref_selection.c \ pref_shortcut.c \ pref_stemming.c \ pref_weblist.c \ reg.c \ render.c \ selection.c \ shortcut.c \ shortcutfunc.c \ splash.c \ statusbar.c \ textview.c \ thread_search.c \ websearch.c \ xml.c \ xmlinternal.c subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bin_PROGRAMS = ebview$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_ebview_OBJECTS = bmh.$(OBJEXT) cellrendererebook.$(OBJEXT) \ dialog.$(OBJEXT) dictbar.$(OBJEXT) dirtree.$(OBJEXT) \ dump.$(OBJEXT) eb.$(OBJEXT) ebview.$(OBJEXT) external.$(OBJEXT) \ filter.$(OBJEXT) grep.$(OBJEXT) headword.$(OBJEXT) \ history.$(OBJEXT) hook.$(OBJEXT) jcode.$(OBJEXT) link.$(OBJEXT) \ log.$(OBJEXT) mainmenu.$(OBJEXT) mainwindow.$(OBJEXT) \ menu.$(OBJEXT) misc.$(OBJEXT) multi.$(OBJEXT) pixmap.$(OBJEXT) \ popup.$(OBJEXT) preference.$(OBJEXT) pref_color.$(OBJEXT) \ pref_dictgroup.$(OBJEXT) pref_dirgroup.$(OBJEXT) \ pref_external.$(OBJEXT) pref_font.$(OBJEXT) pref_grep.$(OBJEXT) \ pref_gui.$(OBJEXT) pref_io.$(OBJEXT) pref_search.$(OBJEXT) \ pref_selection.$(OBJEXT) pref_shortcut.$(OBJEXT) \ pref_stemming.$(OBJEXT) pref_weblist.$(OBJEXT) reg.$(OBJEXT) \ render.$(OBJEXT) selection.$(OBJEXT) shortcut.$(OBJEXT) \ shortcutfunc.$(OBJEXT) splash.$(OBJEXT) statusbar.$(OBJEXT) \ textview.$(OBJEXT) thread_search.$(OBJEXT) websearch.$(OBJEXT) \ xml.$(OBJEXT) xmlinternal.$(OBJEXT) ebview_OBJECTS = $(am_ebview_OBJECTS) ebview_DEPENDENCIES = DEFS = -DHAVE_CONFIG_H DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) CPPFLAGS = -DWIN32 -DDOS_FILE_PATH -I/cygdrive/c/gtk/include LDFLAGS = -L/usr/local/lib -L/cygdrive/c/gtk/lib LIBS = -liconv depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/bmh.Po \ ./$(DEPDIR)/cellrendererebook.Po \ ./$(DEPDIR)/dialog.Po ./$(DEPDIR)/dictbar.Po \ ./$(DEPDIR)/dirtree.Po ./$(DEPDIR)/dump.Po \ ./$(DEPDIR)/eb.Po ./$(DEPDIR)/ebview.Po \ ./$(DEPDIR)/external.Po ./$(DEPDIR)/filter.Po \ ./$(DEPDIR)/grep.Po ./$(DEPDIR)/headword.Po \ ./$(DEPDIR)/history.Po ./$(DEPDIR)/hook.Po \ ./$(DEPDIR)/jcode.Po ./$(DEPDIR)/link.Po \ ./$(DEPDIR)/log.Po ./$(DEPDIR)/mainmenu.Po \ ./$(DEPDIR)/mainwindow.Po ./$(DEPDIR)/menu.Po \ ./$(DEPDIR)/misc.Po ./$(DEPDIR)/multi.Po \ ./$(DEPDIR)/pixmap.Po ./$(DEPDIR)/popup.Po \ ./$(DEPDIR)/pref_color.Po \ ./$(DEPDIR)/pref_dictgroup.Po \ ./$(DEPDIR)/pref_dirgroup.Po \ ./$(DEPDIR)/pref_external.Po \ ./$(DEPDIR)/pref_font.Po ./$(DEPDIR)/pref_grep.Po \ ./$(DEPDIR)/pref_gui.Po ./$(DEPDIR)/pref_io.Po \ ./$(DEPDIR)/pref_search.Po \ ./$(DEPDIR)/pref_selection.Po \ ./$(DEPDIR)/pref_shortcut.Po \ ./$(DEPDIR)/pref_stemming.Po \ ./$(DEPDIR)/pref_weblist.Po \ ./$(DEPDIR)/preference.Po ./$(DEPDIR)/reg.Po \ ./$(DEPDIR)/render.Po ./$(DEPDIR)/selection.Po \ ./$(DEPDIR)/shortcut.Po ./$(DEPDIR)/shortcutfunc.Po \ ./$(DEPDIR)/splash.Po ./$(DEPDIR)/statusbar.Po \ ./$(DEPDIR)/textview.Po \ ./$(DEPDIR)/thread_search.Po \ ./$(DEPDIR)/websearch.Po ./$(DEPDIR)/xml.Po \ ./$(DEPDIR)/xmlinternal.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = -DDOS_FILE_PATH -mno-cygwin -mms-bitfields -DDEBUG DIST_SOURCES = $(ebview_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(ebview_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ebview$(EXEEXT): $(ebview_OBJECTS) $(ebview_DEPENDENCIES) @rm -f ebview$(EXEEXT) $(LINK) $(ebview_LDFLAGS) $(ebview_OBJECTS) $(ebview_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/bmh.Po include ./$(DEPDIR)/cellrendererebook.Po include ./$(DEPDIR)/dialog.Po include ./$(DEPDIR)/dictbar.Po include ./$(DEPDIR)/dirtree.Po include ./$(DEPDIR)/dump.Po include ./$(DEPDIR)/eb.Po include ./$(DEPDIR)/ebview.Po include ./$(DEPDIR)/external.Po include ./$(DEPDIR)/filter.Po include ./$(DEPDIR)/grep.Po include ./$(DEPDIR)/headword.Po include ./$(DEPDIR)/history.Po include ./$(DEPDIR)/hook.Po include ./$(DEPDIR)/jcode.Po include ./$(DEPDIR)/link.Po include ./$(DEPDIR)/log.Po include ./$(DEPDIR)/mainmenu.Po include ./$(DEPDIR)/mainwindow.Po include ./$(DEPDIR)/menu.Po include ./$(DEPDIR)/misc.Po include ./$(DEPDIR)/multi.Po include ./$(DEPDIR)/pixmap.Po include ./$(DEPDIR)/popup.Po include ./$(DEPDIR)/pref_color.Po include ./$(DEPDIR)/pref_dictgroup.Po include ./$(DEPDIR)/pref_dirgroup.Po include ./$(DEPDIR)/pref_external.Po include ./$(DEPDIR)/pref_font.Po include ./$(DEPDIR)/pref_grep.Po include ./$(DEPDIR)/pref_gui.Po include ./$(DEPDIR)/pref_io.Po include ./$(DEPDIR)/pref_search.Po include ./$(DEPDIR)/pref_selection.Po include ./$(DEPDIR)/pref_shortcut.Po include ./$(DEPDIR)/pref_stemming.Po include ./$(DEPDIR)/pref_weblist.Po include ./$(DEPDIR)/preference.Po include ./$(DEPDIR)/reg.Po include ./$(DEPDIR)/render.Po include ./$(DEPDIR)/selection.Po include ./$(DEPDIR)/shortcut.Po include ./$(DEPDIR)/shortcutfunc.Po include ./$(DEPDIR)/splash.Po include ./$(DEPDIR)/statusbar.Po include ./$(DEPDIR)/textview.Po include ./$(DEPDIR)/thread_search.Po include ./$(DEPDIR)/websearch.Po include ./$(DEPDIR)/xml.Po include ./$(DEPDIR)/xmlinternal.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CCDEPMODE) $(depcomp) \ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CCDEPMODE) $(depcomp) \ $(COMPILE) -c `cygpath -w $<` CCDEPMODE = depmode=gcc3 uninstall-info-am: ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic distclean distclean-compile distclean-depend \ distclean-generic distclean-tags distdir dvi dvi-am info \ info-am install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am ebview.res: ebview.rc windres -i $< -O coff -o $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/src/pref_grep.h0000644000175000017500000000202710013675516015375 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_GREP_H__ #define __PREF_GREP_H__ #include "defs.h" gboolean pref_end_grep(); GtkWidget *pref_start_grep(); gboolean pref_end_filter(); GtkWidget *pref_start_filter(); gboolean pref_end_cache(); GtkWidget *pref_start_cache(); #endif /* __PREF_GREP_H__ */ ebview-0.3.6.2/src/menu.h0000644000175000017500000000160210013675515014365 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __MENU_H__ #define __MENU_H__ #include "defs.h" void show_menu(); void show_copyright(); #endif /* __MENU_H__ */ ebview-0.3.6.2/src/pref_search.h0000644000175000017500000000165210013675516015710 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_SEARCH_H__ #define __PREF_SEARCH_H__ #include "defs.h" GtkWidget *pref_start_search(); gboolean pref_end_search(); #endif /* __PREF_SEARCH_H__ */ ebview-0.3.6.2/src/pixmap.c0000644000175000017500000001507710013675515014725 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pixmap.h" #include "../pixmaps/ebview.xpm" #include "../pixmaps/book_open.xpm" #include "../pixmaps/book_closed.xpm" #include "../pixmaps/ebook.xpm" #include "../pixmaps/cdrom.xpm" #include "../pixmaps/left.xpm" #include "../pixmaps/right.xpm" #include "../pixmaps/up.xpm" #include "../pixmaps/down.xpm" #include "../pixmaps/globe.xpm" #include "../pixmaps/html.xpm" #include "../pixmaps/search.xpm" #include "../pixmaps/item.xpm" #include "../pixmaps/paste.xpm" #include "../pixmaps/paste2.xpm" //#include "../pixmaps/new.xpm" #include "../pixmaps/popup.xpm" #include "../pixmaps/popup2.xpm" #include "../pixmaps/list.xpm" #include "../pixmaps/multi.xpm" #include "../pixmaps/small-left.xpm" #include "../pixmaps/small-right.xpm" #include "../pixmaps/small-close.xpm" #include "../pixmaps/push-off.xpm" #include "../pixmaps/push-on.xpm" #include "../pixmaps/file.xpm" #include "../pixmaps/folder_closed.xpm" #include "../pixmaps/folder_open.xpm" /* void load_pixmaps() { GdkColor transparent = { 0 }; book_closed_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &book_closed_mask, &transparent, book_closed_xpm); book_open_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &book_open_mask, &transparent, book_open_xpm); cdrom_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &cdrom_mask, &transparent, cdrom_xpm); ebook_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &ebook_mask, &transparent, ebook_xpm); left_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &left_mask, &transparent, left_xpm); right_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &right_mask, &transparent, right_xpm); up_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &up_mask, &transparent, up_xpm); down_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &down_mask, &transparent, down_xpm); globe_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &globe_mask, &transparent, globe_xpm); search_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &search_mask, &transparent, search_xpm); item_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &item_mask, &transparent, item_xpm); paste_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &paste_mask, &transparent, paste_xpm); popup_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &popup_mask, &transparent, popup_xpm); html_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &html_mask, &transparent, html_xpm); list_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &list_mask, &transparent, list_xpm); multi_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &multi_mask, &transparent, multi_xpm); small_left_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &small_left_mask, &transparent, small_left_xpm); small_right_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &small_right_mask, &transparent, small_right_xpm); small_close_pixmap = gdk_pixmap_create_from_xpm_d ( main_window->window, &small_close_mask, &transparent, small_close_xpm); ebook_pixbuf = gdk_pixbuf_new_from_xpm_data(ebook_xpm); } */ /* GtkWidget *create_pixmap_button(GdkPixmap *pixmap, GdkBitmap *mask){ GtkWidget *button; GtkWidget *image; button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_container_set_border_width(GTK_CONTAINER(button), 0); image = gtk_image_new_from_pixmap(pixmap, mask); gtk_container_add(GTK_CONTAINER(button), image); return(button); } GtkWidget *create_pixmap_toggle_button(GdkPixmap *pixmap, GdkBitmap *mask){ GtkWidget *button; GtkWidget *image; button = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_container_set_border_width(GTK_CONTAINER(button), 0); image = gtk_image_new_from_pixmap(pixmap, mask); gtk_container_add(GTK_CONTAINER(button), image); return(button); } */ static char **pixmaps[] = { ebview_xpm, book_open_xpm, book_closed_xpm, cdrom_xpm, ebook_xpm, left_xpm, right_xpm, up_xpm, down_xpm, globe_xpm, search_xpm, item_xpm, paste_xpm, popup_xpm, html_xpm, list_xpm, multi_xpm, small_left_xpm, small_right_xpm, small_close_xpm, push_off, push_on, paste2_xpm, popup2_xpm, file_xpm, folder_closed_xpm, folder_open_xpm }; GtkWidget *create_button_with_image(ImageNumber number){ GtkWidget *button; GtkWidget *image; GdkPixbuf *pixbuf; button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_container_set_border_width(GTK_CONTAINER(button), 0); pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)pixmaps[number]); image = gtk_image_new_from_pixbuf(pixbuf); gtk_container_add(GTK_CONTAINER(button), image); gdk_pixbuf_unref(pixbuf); return(button); } GtkWidget *create_toggle_button_with_image(ImageNumber number){ GtkWidget *button; GtkWidget *image; GdkPixbuf *pixbuf; button = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); gtk_container_set_border_width(GTK_CONTAINER(button), 0); pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)pixmaps[number]); image = gtk_image_new_from_pixbuf(pixbuf); gtk_container_add(GTK_CONTAINER(button), image); gdk_pixbuf_unref(pixbuf); return(button); } GtkWidget *create_image(ImageNumber number){ GtkWidget *image; GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)pixmaps[number]); image = gtk_image_new_from_pixbuf(pixbuf); return(image); } GdkPixbuf *create_pixbuf(ImageNumber number){ GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)pixmaps[number]); return(pixbuf); } void destroy_pixbuf(GdkPixbuf *pixbuf){ gdk_pixbuf_unref(pixbuf); } ebview-0.3.6.2/src/ebview.h0000644000175000017500000000162510013675515014707 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EBVIEW_H__ #define __EBVIEW_H__ #include "defs.h" void exit_program( GtkWidget *widget,gpointer data ); #endif /* __EBVIEW_H__ */ ebview-0.3.6.2/src/xml.h0000644000175000017500000000404710013675516014230 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __XML_H__ #define __XML_H__ #include /* $B9=B$BN$O(B xmlDoc $B$H(B xmlNode $B$N$U$?$D!#(B xmlDoc $B$K$O(B root $B$,$"$j!"$3$l$,%k!<%H%N!<%I$H$J$k!#(Broot $B$OL>A0$r;}$?$:!"C1$K;R%N!<%I$r;}$D$?$a$N$b$N$G$"$k!#(B */ typedef GNode xmlNode; typedef struct { xmlNode *root; gchar *version; gchar *encoding; } xmlDoc; typedef enum { XML_OK, XML_NG, } xmlResult; typedef struct _NODE_DATA { char *name; char *content; GList *attr; gint depth; xmlDoc *doc; } NODE_DATA; typedef struct _NODE_ATTR { char *name; char *value; } NODE_ATTR; xmlResult parse_buffer(GNode *parent, gchar *text, guint length); gchar *encoded_to_special(gchar *text); gchar *special_to_encoded(gchar *text); xmlDoc *xml_parse_file(gchar *filename); xmlDoc *xml_doc_new(); xmlResult xml_save_file(gchar *filename, xmlDoc *doc); xmlResult xml_print_tree(xmlDoc *doc); xmlNode *xml_add_child(xmlNode *parent, gchar *name, gchar *cotent); xmlNode *xml_get_child(xmlNode *node); xmlNode *xml_get_next(xmlNode *node); gchar *xml_get_name(xmlNode *node); gchar *xml_get_content(xmlNode *node); gchar *xml_get_attr(xmlNode *node, gchar *name); xmlResult xml_set_attr(xmlNode *node, gchar *name, gchar *value); xmlResult xml_destroy_document(xmlDoc *doc); #endif /* __XML_H__ */ ebview-0.3.6.2/src/pref_font.c0000644000175000017500000001504711241635664015413 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "selection.h" #include "preference.h" #include "headword.h" #include "mainwindow.h" static GtkWidget *fontsel_dlg; static GtkWidget *entry_normal; static GtkWidget *entry_bold; static GtkWidget *entry_italic; static GtkWidget *entry_super; static gint font_no; static void ok_fontsel(GtkWidget *widget,gpointer *data){ gchar *fontname; LOG(LOG_DEBUG, "IN : ok_fontsel()"); fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontsel_dlg)); LOG(LOG_DEBUG, "fontname = %s", fontname); switch(font_no){ case 0: gtk_entry_set_text(GTK_ENTRY(entry_normal), fontname); break; case 1: gtk_entry_set_text(GTK_ENTRY(entry_bold), fontname); break; case 2: gtk_entry_set_text(GTK_ENTRY(entry_italic), fontname); break; case 3: gtk_entry_set_text(GTK_ENTRY(entry_super), fontname); break; } gtk_grab_remove(fontsel_dlg); gtk_widget_destroy(fontsel_dlg); LOG(LOG_DEBUG, "OUT : ok_fontsel()"); } static void delete_fontsel( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : delete_fontsel()"); ok_fontsel(NULL, NULL); LOG(LOG_DEBUG, "OUT : delete_fontsel()"); } static void show_fontsel(GtkWidget *widget,gpointer *data){ const gchar *fontname=NULL; LOG(LOG_DEBUG, "IN : show_fontsel()"); font_no = (gint)(intptr_t)data; fontsel_dlg = gtk_font_selection_dialog_new("Please select font"); g_signal_connect(G_OBJECT (fontsel_dlg), "delete_event", G_CALLBACK(delete_fontsel), NULL); g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG (fontsel_dlg)->ok_button), "clicked", G_CALLBACK(ok_fontsel), NULL); g_signal_connect_swapped(G_OBJECT(GTK_FONT_SELECTION_DIALOG (fontsel_dlg)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)fontsel_dlg); gtk_widget_destroy(GTK_FONT_SELECTION_DIALOG (fontsel_dlg)->apply_button); switch(font_no){ case 0: fontname = gtk_entry_get_text(GTK_ENTRY(entry_normal)); break; case 1: fontname = gtk_entry_get_text(GTK_ENTRY(entry_bold)); break; case 2: fontname = gtk_entry_get_text(GTK_ENTRY(entry_italic)); break; case 3: fontname = gtk_entry_get_text(GTK_ENTRY(entry_super)); break; } gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontsel_dlg), fontname); gtk_widget_show_all(fontsel_dlg); gtk_grab_add(fontsel_dlg); LOG(LOG_DEBUG, "OUT : show_fontsel()"); } gboolean pref_end_font() { const gchar *fontname; LOG(LOG_DEBUG, "IN : pref_end_font()"); // Program aborts if you unload. Why ? //unload_font(); fontname = gtk_entry_get_text(GTK_ENTRY(entry_normal)); free(fontset_normal); fontset_normal = strdup(fontname); fontname = gtk_entry_get_text(GTK_ENTRY(entry_bold)); free(fontset_bold); fontset_bold = strdup(fontname); fontname = gtk_entry_get_text(GTK_ENTRY(entry_italic)); free(fontset_italic); fontset_italic = strdup(fontname); fontname = gtk_entry_get_text(GTK_ENTRY(entry_super)); free(fontset_superscript); fontset_superscript = strdup(fontname); return(TRUE); LOG(LOG_DEBUG, "OUT : pref_end_font()"); } GtkWidget *pref_start_font(){ GtkWidget *vbox; GtkWidget *button; GtkWidget *table; GtkWidget *label; GtkAttachOptions xoption=0, yoption=0; LOG(LOG_DEBUG, "IN : pref_start_font()"); vbox = gtk_vbox_new(FALSE, 0); table = gtk_table_new(3, 5, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); label = gtk_label_new(_("Normal")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, xoption, yoption, 10, 10); entry_normal = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_normal), fontset_normal); gtk_widget_set_size_request(entry_normal,200,20); gtk_table_attach(GTK_TABLE(table), entry_normal, 1, 2, 0, 1, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_fontsel), (gpointer)0); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 0, 1, xoption, yoption, 10, 10); label = gtk_label_new(_("Bold")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, xoption, yoption, 10, 10); entry_bold = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_bold), fontset_bold); gtk_widget_set_size_request(entry_bold,200,20); gtk_table_attach(GTK_TABLE(table), entry_bold, 1, 2, 1, 2, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_fontsel), (gpointer)1); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 1, 2, xoption, yoption, 10, 10); label = gtk_label_new(_("Italic")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, xoption, yoption, 10, 10); entry_italic = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_italic), fontset_italic); gtk_widget_set_size_request(entry_italic,200,20); gtk_table_attach(GTK_TABLE(table), entry_italic, 1, 2, 2, 3, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_fontsel), (gpointer)2); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 2, 3, xoption, yoption, 10, 10); label = gtk_label_new(_("Superscript")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, xoption, yoption, 10, 10); entry_super = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry_super), fontset_superscript); gtk_widget_set_size_request(entry_super,200,20); gtk_table_attach(GTK_TABLE(table), entry_super, 1, 2, 3, 4, xoption, yoption, 10, 10); button = gtk_button_new_with_label(_("Choose")); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_fontsel), (gpointer)3); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 3, 4, xoption, yoption, 10, 10); LOG(LOG_DEBUG, "OUT : pref_start_font()"); return(vbox); } ebview-0.3.6.2/src/xmlinternal.h0000644000175000017500000000237410013675516015766 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __XMLINTERNAL_H__ #define __XMLINTERNAL_H__ #include "defs.h" void get_tag_name(gchar *text, gchar *tag); void get_start_tag(gchar *text, gchar *tag); void get_end_tag(gchar *text, gchar *tag_name, gchar *tag); void get_content(gchar *text, gchar *tag_name, gchar **content, gint *content_length); void get_attr(const gchar *tag, gchar *name, gchar *value); void skip_start_tag(gchar **text, gchar *tag_name); void skip_end_tag(gchar **text, gchar *tag_name); #endif /* __XMLINTERNAL_H__ */ ebview-0.3.6.2/src/shortcutfunc.c0000644000175000017500000002076410013675516016156 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "dictbar.h" #include "statusbar.h" #include "history.h" #include "ebview.h" #include "eb.h" #include "jcode.h" #ifndef __WIN32__ #include #endif extern GList *group_list; extern GtkWidget *combo_group; extern GtkWidget *combo_dirgroup; extern GtkWidget *word_entry; void next_dict_group(){ GtkTreeIter iter; gchar *title; gboolean active; gint method; method = ebook_search_method(); if(method == SEARCH_METHOD_GREP) goto GREP; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE) break; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } else { return; } if(gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == FALSE) gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter); gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry), title); g_free(title); /* if((method == SEARCH_METHOD_INTERNET) || (method == SEARCH_METHOD_GREP)){ select_any_search(); } */ return; GREP: title = (gchar *)gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry)); if(strcmp(title, _("Manual Select")) == 0){ gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter); gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); return; } if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_ACTIVE_COLUMN, &active, -1); if(active == TRUE) break; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } else { return; } if(gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == FALSE) { gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), _("Manual Select")); } else { gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); } } void previous_dict_group(){ GtkTreeIter previous_iter; GtkTreeIter iter; gboolean active; gchar *title=NULL; gint i; gint method; method = ebook_search_method(); if(method == SEARCH_METHOD_GREP) goto GREP; i = 0; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE) break; previous_iter = iter; i++; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } else { return; } if(i != 0){ gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &previous_iter, DICT_TITLE_COLUMN, &title, -1); } else { gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter); do { g_free(title); gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, -1); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry), title); g_free(title); /* if((method == SEARCH_METHOD_INTERNET) || (method == SEARCH_METHOD_GREP)){ select_any_search(); } */ return; GREP: // title = (gchar *)gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry)); if(strcmp(title, _("Manual Select")) == 0){ title = NULL; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { g_free(title); gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, -1); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); } return; } i = 0; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_ACTIVE_COLUMN, &active, -1); if(active == TRUE) break; previous_iter = iter; i++; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } else { return; } if(i != 0){ gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &previous_iter, DIRGROUP_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); } else { gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), _("Manual Select")); } } extern GtkWidget *dict_box; void toggle_dictionary(gint number){ GList *children, *child; GtkWidget *w; gint idx; gboolean active; children = gtk_container_get_children(GTK_CONTAINER(dict_box)); idx = 0; child = g_list_first(children); while(child != NULL){ w = (GtkWidget *)(child->data); if(GTK_IS_BUTTON(w)){ if((number - 1) == idx){ active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); if(active == TRUE) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), TRUE); break; } else idx ++; } child = g_list_next(child); } } void toggle_dictionary1(){ toggle_dictionary(1); } void toggle_dictionary2(){ toggle_dictionary(2); } void toggle_dictionary3(){ toggle_dictionary(3); } void toggle_dictionary4(){ toggle_dictionary(4); } void toggle_dictionary5(){ toggle_dictionary(5); } void toggle_dictionary6(){ toggle_dictionary(6); } void toggle_dictionary7(){ toggle_dictionary(7); } void toggle_dictionary8(){ toggle_dictionary(8); } void toggle_dictionary9(){ toggle_dictionary(9); } void toggle_dictionary10(){ toggle_dictionary(10); } void go_back(){ history_back(); } void go_forward(){ history_forward(); } void clear_word(){ gtk_entry_set_text(GTK_ENTRY(word_entry), ""); gtk_widget_grab_focus(word_entry); } void quit(){ exit_program(NULL, NULL); } void iconify(){ #ifdef __WIN32__ #else XIconifyWindow (GDK_DISPLAY (), GDK_WINDOW_XWINDOW(main_window->window), DefaultScreen (GDK_DISPLAY ())); #endif } void paste_from_clipboard() { #ifdef __WIN32__ HWND hwnd; LRESULT retval; HANDLE hText; char *pText; gchar *str; #else gchar *str=NULL; GtkClipboard* clipboard; #endif gint position; gint start, end; LOG(LOG_DEBUG, "IN : paste_clipboard()"); #ifdef __WIN32__ hwnd = GDK_WINDOW_HWND (main_window->window); OpenClipboard(hwnd); hText = GetClipboardData(CF_TEXT); if(hText == NULL) { CloseClipboard(); LOG(LOG_DEBUG, "OUT : paste_clipboard() : NOP"); return; } else { pText = GlobalLock(hText); GlobalUnlock(hText); str = iconv_convert(fs_codeset, "utf-8", pText); CloseClipboard(); } #else clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); str = gtk_clipboard_wait_for_text(clipboard); if(str == NULL){ LOG(LOG_DEBUG, "OUT : paste_clipboard() : NOP"); return; } #endif gtk_editable_get_selection_bounds(GTK_EDITABLE(word_entry), &start, &end); gtk_editable_delete_text(GTK_EDITABLE(word_entry), start, end); position = gtk_editable_get_position(GTK_EDITABLE(word_entry)); gtk_editable_insert_text(GTK_EDITABLE(word_entry), str, strlen(str), &position); gtk_editable_set_position(GTK_EDITABLE(word_entry), position); g_free(str); LOG(LOG_DEBUG, "OUT : paste_clipboard()"); } ebview-0.3.6.2/src/mainmenu.c0000644000175000017500000010326710016027170015226 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "ebview.h" #include "mainwindow.h" #include "mainmenu.h" #include "dictbar.h" #include "dump.h" #include "multi.h" #include "menu.h" #include "preference.h" #include "pref_io.h" #include "selection.h" #include "shortcut.h" #include "statusbar.h" #include "textview.h" #include static GtkWidget *menuitem_automatic; static GtkWidget *menuitem_word; static GtkWidget *menuitem_endword; static GtkWidget *menuitem_exactword; static GtkWidget *menuitem_keyword; static GtkWidget *menuitem_multi; static GtkWidget *menuitem_menu; static GtkWidget *menuitem_copyright; static GtkWidget *menuitem_fulltext; static GtkWidget *menuitem_internet; static GtkWidget *menuitem_grep; GtkWidget *display_menubar; GtkWidget *display_statusbar; GtkWidget *display_dictbar; GtkWidget *display_treetab; static GtkWidget *menuitem_emphasize; static GtkWidget *menuitem_image; static GtkWidget *menuitem_filename; static GtkWidget *menuitem_sortbydict; extern GtkWidget *note_tree; extern GtkWidget *note_text; extern GtkWidget *pane; static GtkWidget *menubar=NULL; static GtkWidget *item_search=NULL; void set_tab_position(GtkPositionType position); gint menuitem_handler (GtkWidget *widget, gchar *string) { LOG(LOG_DEBUG, "IN : menuitem_handler(%s)", string); if(bstarting_up) return(0); if(strcmp(string, "file.exit") == 0){ exit_program(NULL, NULL); return(0); } if(strcmp(string, "search.all") == 0){ select_any_search(); return(0); } if(strcmp(string, "search.exact") == 0){ select_exactword_search(); return(0); } if(strcmp(string, "search.word") == 0){ select_word_search(); return(0); } if(strcmp(string, "search.endword") == 0){ select_endword_search(); return(0); } if(strcmp(string, "search.keyword") == 0){ select_keyword_search(); return(0); } if(strcmp(string, "search.multi") == 0){ select_multi_search(); show_multi(); return(0); } if(strcmp(string, "search.fulltext") == 0){ select_fulltext_search(); return(0); } if(strcmp(string, "search.internet") == 0){ select_internet_search(); return(0); } if(strcmp(string, "search.grep") == 0){ select_grep_search(); return(0); } if(strcmp(string, "search.menu") == 0){ show_menu(); return(0); } if(strcmp(string, "search.copyright") == 0){ show_copyright(); return(0); } if(strcmp(string, "view.menubar") == 0){ if(GTK_CHECK_MENU_ITEM(display_menubar)->active) { show_menu_bar(); } else { hide_menu_bar(); } return(0); } if(strcmp(string, "view.statusbar") == 0){ if(GTK_CHECK_MENU_ITEM(display_statusbar)->active) { show_status_bar(); } else { hide_status_bar(); } return(0); } if(strcmp(string, "view.dictbar") == 0){ if(GTK_CHECK_MENU_ITEM(display_dictbar)->active) { show_dict_bar(); } else { hide_dict_bar(); } return(0); } if(strcmp(string, "view.treetab") == 0){ if(GTK_CHECK_MENU_ITEM(display_treetab)->active) { show_tree_tab(); } else { hide_tree_tab(); } return(0); } if(strcmp(string, "view.emphasize") == 0){ if(GTK_CHECK_MENU_ITEM(menuitem_emphasize)->active) { bemphasize_keyword = TRUE; } else { bemphasize_keyword = FALSE; } if(current_result != NULL){ show_result(current_result, FALSE, TRUE); } save_preference(); return(0); } if(strcmp(string, "view.image") == 0){ if(GTK_CHECK_MENU_ITEM(menuitem_image)->active) { bshow_image = TRUE; } else { bshow_image = FALSE; } if(current_result != NULL){ show_result(current_result, FALSE, TRUE); } save_preference(); return(0); } if(strcmp(string, "view.expand") == 0){ expand_lines(); return(0); } if(strcmp(string, "view.shrink") == 0){ shrink_lines(); return(0); } if(strcmp(string, "view.increase") == 0){ increase_font_size(); return(0); } if(strcmp(string, "view.decrease") == 0){ decrease_font_size(); return(0); } if(strcmp(string, "result.sort") == 0){ if(GTK_CHECK_MENU_ITEM(menuitem_sortbydict)->active) { bsort_by_dictionary = TRUE; } else { bsort_by_dictionary = FALSE; } save_preference(); return(0); } if(strcmp(string, "result.filename") == 0){ if(GTK_CHECK_MENU_ITEM(menuitem_filename)->active) { bshow_filename = TRUE; } else { bshow_filename = FALSE; } save_preference(); return(0); } if(strcmp(string, "split.horizontal") == 0){ split_horizontal(); return(0); } if(strcmp(string, "split.vertical") == 0){ split_vertical(); return(0); } if(strcmp(string, "tab.top") == 0){ set_tab_position(GTK_POS_TOP); return(0); } if(strcmp(string, "tab.bottom") == 0){ set_tab_position(GTK_POS_BOTTOM); return(0); } if(strcmp(string, "tab.right") == 0){ set_tab_position(GTK_POS_RIGHT); return(0); } if(strcmp(string, "tab.left") == 0){ set_tab_position(GTK_POS_LEFT); return(0); } /* if(strcmp(string, "pref.dict") == 0){ preference_dictgroup(); return(0); } if(strcmp(string, "pref.ending") == 0){ preference_ending(); return(0); } if(strcmp(string, "pref.shortcut") == 0){ preference_shortcut(); return(0); } if(strcmp(string, "pref.web") == 0){ preference_weblist(); return(0); } if(strcmp(string, "pref.external") == 0){ preference_external(); return(0); } if(strcmp(string, "pref.font") == 0){ preference_font(); return(0); } if(strcmp(string, "pref.color") == 0){ preference_color(); return(0); } if(strcmp(string, "pref.misc") == 0){ misc_preference(); return(0); } */ if(strcmp(string, "pref") == 0){ show_preference(); return(0); } if(strcmp(string, "dump.hex") == 0){ dump_hex(); return(0); } if(strcmp(string, "dump.text") == 0){ dump_text(); return(0); } if(strcmp(string, "help.usage") == 0){ show_usage(); return(0); } if(strcmp(string, "help.home") == 0){ show_home(); return(0); } if(strcmp(string, "help.about") == 0){ show_about(); return(0); } if(strncmp(string, "sc_", 3) == 0){ perform_shortcut(string); return(0); } if(strcmp(string, "selection.nothing") == 0){ selection_mode = SELECTION_DO_NOTHING; auto_lookup_stop(); return(0); } if(strcmp(string, "selection.copy") == 0){ selection_mode = SELECTION_COPY_ONLY; auto_lookup_start(); return(0); } if(strcmp(string, "selection.search") == 0){ selection_mode = SELECTION_SEARCH; auto_lookup_start(); return(0); } if(strcmp(string, "selection.searchtop") == 0){ selection_mode = SELECTION_SEARCH_TOP; auto_lookup_start(); return(0); } if(strcmp(string, "selection.popup") == 0){ selection_mode = SELECTION_POPUP; auto_lookup_start(); return(0); } LOG(LOG_CRITICAL, "Unknown menu : %s\n", string); return(0); } void change_search_menu(gint method) { GtkWidget *item; LOG(LOG_DEBUG, "IN : change_search_menu(%d)", method); switch(method){ case SEARCH_METHOD_AUTOMATIC: item = menuitem_automatic; break; case SEARCH_METHOD_WORD: item = menuitem_word; break; case SEARCH_METHOD_ENDWORD: item = menuitem_endword; break; case SEARCH_METHOD_EXACTWORD: item = menuitem_exactword; break; case SEARCH_METHOD_KEYWORD: item = menuitem_keyword; break; case SEARCH_METHOD_MULTI: item = menuitem_multi; break; case SEARCH_METHOD_COPYRIGHT: item = menuitem_copyright; break; case SEARCH_METHOD_FULL_TEXT: item = menuitem_fulltext; break; case SEARCH_METHOD_INTERNET: item = menuitem_internet; break; case SEARCH_METHOD_GREP: item = menuitem_grep; break; default: LOG(LOG_INFO, "Unknown search method"); LOG(LOG_DEBUG, "OUT : change_search_menu()"); return; break; } g_signal_handlers_block_matched(G_OBJECT(menuitem_automatic), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_word), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_endword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_exactword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_keyword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_multi), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_copyright), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_fulltext), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_internet), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_block_matched(G_OBJECT(menuitem_grep), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_automatic), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_word), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_endword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_exactword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_keyword), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_multi), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_copyright), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_fulltext), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_internet), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); g_signal_handlers_unblock_matched(G_OBJECT(menuitem_grep), G_SIGNAL_MATCH_FUNC, 0, 0, 0, menuitem_handler, 0); LOG(LOG_DEBUG, "OUT : change_search_menu()"); } static GtkWidget *create_search_menu() { GtkWidget *menu; GtkWidget *item; GSList *group=NULL; LOG(LOG_DEBUG, "IN : create_search_menu()"); // Search method menu = gtk_menu_new(); menuitem_automatic = gtk_radio_menu_item_new_with_label(group, _("Automatic Search")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_automatic); g_signal_connect(G_OBJECT(menuitem_automatic), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.all"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_automatic)); menuitem_exactword = gtk_radio_menu_item_new_with_label(group, _("Exactword Search")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_exactword); g_signal_connect(G_OBJECT(menuitem_exactword), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.exact"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_exactword)); menuitem_word = gtk_radio_menu_item_new_with_label(group, _("Forward Search")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_word); g_signal_connect(G_OBJECT(menuitem_word), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.word"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_word)); menuitem_endword = gtk_radio_menu_item_new_with_label(group, _("Backward Search")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_endword); g_signal_connect(G_OBJECT(menuitem_endword), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.endword"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_endword)); menuitem_keyword = gtk_radio_menu_item_new_with_label(group, _("Keyword Search")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_keyword); g_signal_connect(G_OBJECT(menuitem_keyword), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.keyword"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_keyword)); menuitem_multi = gtk_radio_menu_item_new_with_label(group, _("Multiword Search"));; gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_multi); g_signal_connect(G_OBJECT(menuitem_multi), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.multi"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_multi)); menuitem_fulltext = gtk_radio_menu_item_new_with_label(group, _("Fulltext Search"));; gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_fulltext); g_signal_connect(G_OBJECT(menuitem_fulltext), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.fulltext"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_fulltext)); item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); menuitem_menu = gtk_radio_menu_item_new_with_label(group, _("Menu")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_menu); g_signal_connect(G_OBJECT(menuitem_menu), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.menu"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_menu)); menuitem_copyright = gtk_radio_menu_item_new_with_label(group, _("Copyright")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_copyright); g_signal_connect(G_OBJECT(menuitem_copyright), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.copyright"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_menu)); item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); menuitem_internet = gtk_radio_menu_item_new_with_label(group, _("Internet Search"));; gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_internet); g_signal_connect(G_OBJECT(menuitem_internet), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.internet"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_internet)); menuitem_grep = gtk_radio_menu_item_new_with_label(group, _("File Search"));; gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem_grep); g_signal_connect(G_OBJECT(menuitem_grep), "activate", G_CALLBACK(menuitem_handler), (gpointer)"search.grep"); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem_grep)); LOG(LOG_DEBUG, "OUT : create_search_menu()"); return(menu); } GtkWidget *create_main_menu() { GtkWidget *menu; GtkWidget *item; GtkWidget *item_tool; GtkWidget *toolbar_menu; GtkWidget *split_menu; GtkWidget *tab_menu; GtkWidget *dump_menu; GtkWidget *contents_menu; GtkWidget *result_menu; GtkWidget *selection_menu; GSList *group=NULL; LOG(LOG_DEBUG, "IN : create_main_menu()"); /* if(menubar) gtk_widget_destroy(menubar); */ menubar = gtk_menu_bar_new(); // Program menu menu = gtk_menu_new(); item = gtk_menu_item_new_with_label(_("Exit")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"file.exit"); item = gtk_menu_item_new_with_label(_("File")); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); // Display menu menu = gtk_menu_new(); item = gtk_menu_item_new_with_label(_("Show/Hide")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); toolbar_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), toolbar_menu); display_menubar = gtk_check_menu_item_new_with_label(_("Menu Bar")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_menubar), bshow_menu_bar); gtk_menu_shell_append(GTK_MENU_SHELL(toolbar_menu), display_menubar); g_signal_connect(G_OBJECT(display_menubar), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.menubar"); display_dictbar = gtk_check_menu_item_new_with_label(_("Dictionary Selection Bar")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_dictbar), bshow_dict_bar); gtk_menu_shell_append(GTK_MENU_SHELL(toolbar_menu), display_dictbar); g_signal_connect(G_OBJECT(display_dictbar), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.dictbar"); display_statusbar = gtk_check_menu_item_new_with_label(_("Status Bar")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_statusbar), bshow_status_bar); gtk_menu_shell_append(GTK_MENU_SHELL(toolbar_menu), display_statusbar); g_signal_connect(GTK_OBJECT(display_statusbar), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.statusbar"); display_treetab = gtk_check_menu_item_new_with_label(_("Tree Pane Tab")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_treetab), bshow_tree_tab); gtk_menu_shell_append(GTK_MENU_SHELL(toolbar_menu), display_treetab); g_signal_connect(G_OBJECT(display_treetab), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.treetab"); // line item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); item = gtk_menu_item_new_with_label(_("Contents")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); contents_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), contents_menu); menuitem_emphasize = gtk_check_menu_item_new_with_label(_("Emphasize Keyword")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem_emphasize), bemphasize_keyword); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), menuitem_emphasize); g_signal_connect(G_OBJECT(menuitem_emphasize), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.emphasize"); menuitem_image = gtk_check_menu_item_new_with_label(_("Show Image Inline")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem_image), bshow_image); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), menuitem_image); g_signal_connect(G_OBJECT(menuitem_image), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.image"); // line item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); // text size item = gtk_menu_item_new_with_label(_("Increase Font Size")); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.increase"); item = gtk_menu_item_new_with_label(_("Decrease Font Size")); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.decrease"); // line item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); // Space between lines item = gtk_menu_item_new_with_label(_("Expand Lines")); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.expand"); item = gtk_menu_item_new_with_label(_("Shrink Lines")); gtk_menu_shell_append(GTK_MENU_SHELL(contents_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"view.shrink"); // Result list item = gtk_menu_item_new_with_label(_("Result List")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); result_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), result_menu); // Sort by dictionary. menuitem_sortbydict = gtk_check_menu_item_new_with_label(_("Sort By Dictionary")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem_sortbydict), bsort_by_dictionary); gtk_menu_shell_append(GTK_MENU_SHELL(result_menu), menuitem_sortbydict); g_signal_connect(G_OBJECT(menuitem_sortbydict), "activate", G_CALLBACK(menuitem_handler), (gpointer)"result.sort"); // Show filename menuitem_filename = gtk_check_menu_item_new_with_label(_("Show Filename")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem_filename), bshow_filename); gtk_menu_shell_append(GTK_MENU_SHELL(result_menu), menuitem_filename); g_signal_connect(G_OBJECT(menuitem_filename), "activate", G_CALLBACK(menuitem_handler), (gpointer)"result.filename"); // Line item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); // Pane direction item = gtk_menu_item_new_with_label(_("Pane Direction")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); split_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), split_menu); group = NULL; item = gtk_radio_menu_item_new_with_label(group, _("Horizontal")); /* item = gtk_radio_menu_item_new_with_label(NULL, _("Horizontal")); */ gtk_menu_shell_append(GTK_MENU_SHELL(split_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"split.horizontal"); if(pane_direction == 0) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Vertical")); /* item = gtk_radio_menu_item_new_with_label( gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)), _("Vertical")); */ gtk_menu_shell_append(GTK_MENU_SHELL(split_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"split.vertical"); if(pane_direction == 1) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); // Tab position item = gtk_menu_item_new_with_label(_("Tab Position")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); tab_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), tab_menu); group = NULL; item = gtk_radio_menu_item_new_with_label(group, _("Top")); gtk_menu_shell_append(GTK_MENU_SHELL(tab_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"tab.top"); if(tab_position == GTK_POS_TOP) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Bottom")); gtk_menu_shell_append(GTK_MENU_SHELL(tab_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"tab.bottom"); if(tab_position == GTK_POS_BOTTOM) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Left")); gtk_menu_shell_append(GTK_MENU_SHELL(tab_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"tab.left"); if(tab_position == GTK_POS_LEFT) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Right")); gtk_menu_shell_append(GTK_MENU_SHELL(tab_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"tab.right"); if(tab_position == GTK_POS_RIGHT) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_menu_item_new_with_label(_("View")); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); // Search menu menu = create_search_menu(); item_search = gtk_menu_item_new_with_label(_("Search Method")); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item_search), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item_search); // Preference menu menu = gtk_menu_new(); item_tool = gtk_menu_item_new_with_label(_("Tools")); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item_tool), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item_tool); /* item = gtk_menu_item_new_with_label(_("Add/Remove Dictionary")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.dict"); item = gtk_menu_item_new_with_label(_("Stemming")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.ending"); item = gtk_menu_item_new_with_label(_("Shortcut")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.shortcut"); item = gtk_menu_item_new_with_label(_("Search Engines")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.web"); item = gtk_menu_item_new_with_label(_("External Program")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.external"); item = gtk_menu_item_new_with_label(_("Font")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.font"); item = gtk_menu_item_new_with_label(_("Color")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.color"); item = gtk_menu_item_new_with_label(_("Misc")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref.misc"); */ // Selection search item = gtk_menu_item_new_with_label(_("Selection")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); selection_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), selection_menu); group = NULL; item = gtk_radio_menu_item_new_with_label(group, _("Do Nothing")); gtk_menu_shell_append(GTK_MENU_SHELL(selection_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"selection.nothing"); //if(selection_mode == SELECTION_DO_NOTHING) // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Copy Only")); gtk_menu_shell_append(GTK_MENU_SHELL(selection_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"selection.copy"); //if(selection_mode == SELECTION_COPY_ONLY) // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Search In Main Window")); gtk_menu_shell_append(GTK_MENU_SHELL(selection_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"selection.search"); //if(selection_mode == SELECTION_SEARCH) // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Search In Main Window + Top")); gtk_menu_shell_append(GTK_MENU_SHELL(selection_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"selection.searchtop"); //if(selection_mode == SELECTION_SEARCH_TOP) // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); item = gtk_radio_menu_item_new_with_label(group, _("Search In Popup")); gtk_menu_shell_append(GTK_MENU_SHELL(selection_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"selection.popup"); //if(selection_mode == SELECTION_POPUP) // gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE); // Dump item = gtk_menu_item_new_with_label(_("Dump")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); dump_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), dump_menu); item = gtk_menu_item_new_with_label(_("Hex Dump")); gtk_menu_shell_append(GTK_MENU_SHELL(dump_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"dump.hex"); item = gtk_menu_item_new_with_label(_("Text Dump")); gtk_menu_shell_append(GTK_MENU_SHELL(dump_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"dump.text"); // line item = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); // Option item = gtk_menu_item_new_with_label(_("Options...")); // gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"pref"); // Help menu menu = gtk_menu_new(); item = gtk_menu_item_new_with_label(_("Usage")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"help.usage"); item = gtk_menu_item_new_with_label(_("Show EBView Home")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"help.home"); item = gtk_menu_item_new_with_label(_("About")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menuitem_handler), (gpointer)"help.about"); item = gtk_menu_item_new_with_label(_("Help")); //gtk_menu_item_set_right_justified(GTK_MENU_ITEM(item), TRUE); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); gtk_widget_show_all(menubar); LOG(LOG_DEBUG, "OUT : create_main_menu()"); return(menubar); } void update_main_menu() { GtkWidget *menu; LOG(LOG_DEBUG, "IN : update_main_menu()"); gtk_menu_item_remove_submenu(GTK_MENU_ITEM(item_search)); menu = create_search_menu(); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item_search), menu); gtk_widget_show_all(menu); LOG(LOG_DEBUG, "OUT : update_main_menu()"); } void toggle_menu_bar() { if(bshow_menu_bar == 1){ hide_menu_bar(); } else { show_menu_bar(); } } void show_menu_bar() { gtk_widget_show(menubar); bshow_menu_bar = 1; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_menubar), bshow_menu_bar); } void hide_menu_bar() { gtk_widget_hide(menubar); bshow_menu_bar = 0; gtk_widget_queue_draw(main_window); gtk_widget_queue_resize(main_window); gtk_container_check_resize(GTK_CONTAINER(main_window)); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_menubar), bshow_menu_bar); } void show_tree_tab(){ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_tree), TRUE); bshow_tree_tab = 1; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_treetab), bshow_tree_tab); } void hide_tree_tab(){ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_tree), FALSE); bshow_tree_tab = 0; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_treetab), bshow_tree_tab); } void toggle_tree_tab(){ if(bshow_tree_tab == 1){ hide_tree_tab(); } else { show_tree_tab(); } } void switch_direction() { if(pane_direction == 0) split_vertical(); else split_horizontal(); } void split_vertical() { GtkWidget *new_pane; GtkWidget *parent; gint position; LOG(LOG_DEBUG, "IN : split_vertical()"); // Save current size position = gtk_paned_get_position(GTK_PANED(pane)); // Create new pane new_pane = gtk_vpaned_new(); g_object_ref(G_OBJECT(note_tree)); g_object_ref(G_OBJECT(note_text)); gtk_container_remove(GTK_CONTAINER(pane), note_tree); gtk_container_remove(GTK_CONTAINER(pane), note_text); gtk_paned_add1(GTK_PANED(new_pane), note_tree); gtk_paned_add2(GTK_PANED(new_pane), note_text); g_object_unref(G_OBJECT(note_tree)); g_object_unref(G_OBJECT(note_text)); parent = pane->parent; gtk_container_remove(GTK_CONTAINER(parent), pane); gtk_box_pack_start(GTK_BOX(parent), new_pane, TRUE, TRUE, 0); pane = new_pane; gtk_paned_set_position(GTK_PANED(pane), position); gtk_widget_show_all(new_pane); pane_direction = 1; LOG(LOG_DEBUG, "OUT : split_vertical()"); } void split_horizontal() { GtkWidget *new_pane; GtkWidget *parent; gint position; LOG(LOG_DEBUG, "IN : split_horizontal()"); // Save current size position = gtk_paned_get_position(GTK_PANED(pane)); // Create new pane new_pane = gtk_hpaned_new(); g_object_ref(G_OBJECT(note_tree)); g_object_ref(G_OBJECT(note_text)); gtk_container_remove(GTK_CONTAINER(pane), note_tree); gtk_container_remove(GTK_CONTAINER(pane), note_text); gtk_paned_add1(GTK_PANED(new_pane), note_tree); gtk_paned_add2(GTK_PANED(new_pane), note_text); g_object_unref(G_OBJECT(note_tree)); g_object_unref(G_OBJECT(note_text)); parent = pane->parent; gtk_container_remove(GTK_CONTAINER(parent), pane); gtk_box_pack_start(GTK_BOX(parent), new_pane, TRUE, TRUE, 0); pane = new_pane; gtk_paned_set_position(GTK_PANED(pane), position); gtk_widget_show_all(new_pane); pane_direction = 0; LOG(LOG_DEBUG, "OUT : split_horizontal()"); } void set_tab_position(GtkPositionType position) { tab_position = (gint)position; gtk_notebook_set_tab_pos(GTK_NOTEBOOK(note_tree), tab_position); } ebview-0.3.6.2/src/log.c0000644000175000017500000000425711241635664014213 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "dialog.h" #include "log.h" #define STDERR stderr gint ebview_log_level = LOG_MESSAGE; //gint ebview_log_level = LOG_DEBUG; void set_log_level(gint level){ ebview_log_level = level; } void log_func(const gchar *file, gint line, LOG_LEVEL level, const gchar *message, ...){ va_list ap; gchar format[1024]; gchar str[1024]; if(level <= ebview_log_level) { switch(level){ case LOG_ERROR: sprintf(format, "%s:%d ERROR : ", file, line); break; case LOG_CRITICAL: sprintf(format, "%s:%d CRITICAL : ", file, line); break; case LOG_WARNING: sprintf(format, "%s:%d WARNING : ", file, line); break; case LOG_MESSAGE: sprintf(format, "%s:%d MESSAGE : ", file, line); break; case LOG_INFO: sprintf(format, "%s:%d INFO : ", file, line); break; case LOG_DEBUG: sprintf(format, "%s:%d DEBUG : ", file, line); break; } strcat(format, message); va_start(ap, format); g_vprintf(format, ap); g_printf("\n"); //g_logv(G_LOG_DOMAIN, level, format, ap); va_end(ap); } // Show dialog box. if(level <= LOG_MESSAGE){ va_start(ap, format); vsprintf(str, message, ap); va_end(ap); switch(level){ case LOG_ERROR: case LOG_CRITICAL: popup_error(str); break; case LOG_WARNING: case LOG_MESSAGE: popup_warning(str); break; default: break; } } } ebview-0.3.6.2/src/thread_search.c0000644000175000017500000001345610013675516016223 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "dialog.h" #include "headword.h" #include #define WATCH_INTERVAL 500 // ms static pthread_t tid; static gint tag_timeout; static gint thread_running = 0; static gint hit_count=0; static gfloat search_progress; static pthread_mutex_t mutex; static GtkWidget *progress; static GtkWidget *cancel_dialog=NULL; static GtkWidget *label_match; static GtkWidget *label_cancel=NULL; static void cancel_thread(GtkWidget *widget, gpointer *data) { LOG(LOG_DEBUG, "IN : cancel_thread()"); gtk_timeout_remove(tag_timeout); gtk_grab_remove(cancel_dialog); gtk_widget_destroy(cancel_dialog); pthread_cancel(tid); thread_running = 0; cancel_dialog=NULL; label_cancel=NULL; show_result_tree(); push_message("\n"); push_message(_("Canceled")); push_message("\n"); if(search_result == NULL) push_message(_("No hit.")); LOG(LOG_DEBUG, "OUT : cancel_thread()"); } static void delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : delete_event()"); cancel_thread(NULL, NULL); LOG(LOG_DEBUG, "OUT : delete_event()"); } static void show_cancel_dialog(gchar *text) { GtkWidget *button; LOG(LOG_DEBUG, "IN : show_cancel_dialog()"); search_progress = 0.0; // cancel_dialog = gtk_dialog_new(); cancel_dialog = gtk_dialog_new_with_buttons(text, GTK_WINDOW(main_window), GTK_DIALOG_DESTROY_WITH_PARENT /* | GTK_DIALOG_NO_SEPARATOR */, NULL); g_signal_connect (G_OBJECT (cancel_dialog), "delete_event", G_CALLBACK(delete_event), NULL); gtk_widget_set_size_request(cancel_dialog, 200, -1); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG(cancel_dialog)->vbox), 10); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cancel_dialog)->action_area), button, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK(cancel_thread), (gpointer)NULL); label_cancel = gtk_label_new (_("Searching")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cancel_dialog)->vbox), label_cancel, TRUE,TRUE, 5); progress = gtk_progress_bar_new(); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cancel_dialog)->vbox), progress, TRUE,TRUE, 5); label_match = gtk_label_new ("0 hit"); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cancel_dialog)->vbox), label_match, TRUE,TRUE, 5); // gtk_window_set_position(GTK_WINDOW(cancel_dialog), GTK_WIN_POS_CENTER_ALWAYS); gtk_widget_show_all(cancel_dialog); center_dialog(main_window, cancel_dialog); gtk_grab_add(cancel_dialog); LOG(LOG_DEBUG, "OUT : show_cancel_dialog()"); } static gint watch_thread(gpointer data){ char msg[256]; //LOG(LOG_DEBUG, "IN : watch_thread()"); if(thread_running){ pthread_mutex_lock(&mutex); sprintf(msg, _("%d hit"), hit_count); if(GTK_IS_LABEL(label_match)){ gtk_label_set_text(GTK_LABEL(label_match), msg); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(progress), search_progress); } pthread_mutex_unlock(&mutex); // LOG(LOG_DEBUG, "OUT : watch_thread() : CONTINUE"); return(1); } gtk_timeout_remove(tag_timeout); show_result_tree(); if(search_result == NULL) push_message(_("No hit.")); else { push_message(""); } // if(ebook_search_method() != SEARCH_METHOD_GREP) select_first_item(); gtk_grab_remove(cancel_dialog); gtk_widget_destroy(cancel_dialog); cancel_dialog=NULL; label_cancel=NULL; pthread_mutex_destroy(&mutex); //LOG(LOG_DEBUG, "OUT : watch_thread()"); return(0); } void thread_search(gboolean cancelable, gchar *text, void *(*func)(void *), void *arg) { gint rc; pthread_attr_t thread_attr; void *p; LOG(LOG_DEBUG, "IN : thread_search(%s)", arg); thread_running = 1; hit_count = 0; pthread_attr_init (&thread_attr) ; pthread_attr_setstacksize (&thread_attr, 512*1024) ; pthread_mutex_init(&mutex, NULL); if(cancelable == TRUE) { show_cancel_dialog(text); } LOG(LOG_DEBUG, "thread_create"); rc = pthread_create(&tid, &thread_attr, func, (void *)arg); if(rc != 0){ LOG(LOG_CRITICAL, "pthread_create: %s", strerror(errno)); LOG(LOG_DEBUG, "OUT : thread_search()"); exit(1); } LOG(LOG_DEBUG, "thread_created"); pthread_attr_destroy(&thread_attr); if(cancelable == TRUE) { tag_timeout = gtk_timeout_add(WATCH_INTERVAL, watch_thread, NULL); // pthread_join(tid, &p); } else { pthread_join(tid, &p); thread_running = 0; show_result_tree(); select_first_item(); } LOG(LOG_DEBUG, "OUT : thread_search()"); } void add_result(RESULT *rp) { pthread_mutex_lock(&mutex); search_result = g_list_append(search_result, rp); hit_count ++; pthread_mutex_unlock(&mutex); } void set_progress(gfloat progress) { pthread_mutex_lock(&mutex); search_progress = progress; pthread_mutex_unlock(&mutex); } void thread_end() { pthread_mutex_lock(&mutex); thread_running = 0; pthread_mutex_unlock(&mutex); } void set_cancel_dlg_text(gchar *text) { if(label_cancel != NULL) gtk_label_set_text(GTK_LABEL(label_cancel), text); } ebview-0.3.6.2/src/log.h0000644000175000017500000000234710013675515014211 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __LOG_H__ #define __LOG_H__ typedef enum { LOG_ERROR = 1 << 2, LOG_CRITICAL = 1 << 3, LOG_WARNING = 1 << 4, LOG_MESSAGE = 1 << 5, LOG_INFO = 1 << 6, LOG_DEBUG = 1 << 7, } LOG_LEVEL; extern gint ebview_log_level; #define LOG(...) { if (ebview_log_level) log_func (__FILE__, __LINE__, __VA_ARGS__); } void set_log_level(gint level); void log_func(const gchar *file, gint line, LOG_LEVEL level, const gchar *message, ...); #endif /* __LOG_H__ */ ebview-0.3.6.2/src/cellrendererebook.h0000644000175000017500000000636510013675514017121 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This source derives from gtkcellrenerertext.h of GTK+-2.0.9 * Here is an original copyright. */ /* gtkcellrenderertext.h * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_CELL_RENDERER_EBOOK_H__ #define __GTK_CELL_RENDERER_EBOOK_H__ #include #include #include "defs.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_TYPE_CELL_RENDERER_EBOOK (gtk_cell_renderer_ebook_get_type ()) #define GTK_CELL_RENDERER_EBOOK(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER_EBOOK, GtkCellRendererEbook)) #define GTK_CELL_RENDERER_EBOOK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_EBOOK, GtkCellRendererEbookClass)) #define GTK_IS_CELL_RENDERER_EBOOK(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER_EBOOK)) #define GTK_IS_CELL_RENDERER_EBOOK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_EBOOK)) #define GTK_CELL_RENDERER_EBOOK_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_EBOOK, GtkCellRendererEbookClass)) typedef struct _GtkCellRendererEbook GtkCellRendererEbook; typedef struct _GtkCellRendererEbookClass GtkCellRendererEbookClass; struct _GtkCellRendererEbook { GtkCellRenderer parent; gchar *text; BOOK_INFO *binfo; gint width; gint height; }; struct _GtkCellRendererEbookClass { GtkCellRendererClass parent_class; /* Padding for future expansion */ void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); void (*_gtk_reserved3) (void); void (*_gtk_reserved4) (void); }; GtkType gtk_cell_renderer_ebook_get_type (void); GtkCellRenderer *gtk_cell_renderer_ebook_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_CELL_RENDERER_EBOOK_H__ */ ebview-0.3.6.2/src/history.c0000644000175000017500000001463210013675515015124 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "dump.h" #include "history.h" #include "mainwindow.h" #include "pref_io.h" GList *history_list = NULL; GList *current_in_history = NULL; GList *word_history=NULL; GList *directory_history=NULL; extern gint skip_result; void history_back() { RESULT *result; GList *previous; LOG(LOG_DEBUG, "IN : history_back()"); if(current_in_history == NULL) { LOG(LOG_DEBUG, "OUT : history_back() = nop1"); return; } previous = g_list_previous(current_in_history); if(previous == NULL){ LOG(LOG_DEBUG, "OUT : history_back() = nop2"); return; } result = (RESULT *)(previous->data); g_assert(result != NULL); show_result(result, FALSE, FALSE); current_in_history = previous; LOG(LOG_DEBUG, "OUT : history_back()"); } void history_forward() { RESULT *result; GList *next; LOG(LOG_DEBUG, "IN : history_forward()"); if(current_in_history == NULL){ LOG(LOG_DEBUG, "OUT : history_forward() = nop1"); return; } next = g_list_next(current_in_history); if(next == NULL){ LOG(LOG_DEBUG, "OUT : history_forward() = nop2"); return; } result = (RESULT *)(next->data); g_assert(result != NULL); show_result(result, FALSE, FALSE); current_in_history = next; LOG(LOG_DEBUG, "OUT : history_forward()"); } void save_result_history(RESULT *rp) { RESULT *result; GList *next; LOG(LOG_DEBUG, "IN : save_history()"); g_assert(rp != NULL); // $B8=:_I=<(FbMF$,%R%9%H%j$N:G8e$G$J$$>l9g$K$O(B // $B0J9_$r:o=|$9$k(B if(current_in_history){ next = g_list_next(current_in_history); while(next){ result = (RESULT *)(next->data); history_list = g_list_remove(history_list, next->data); free_result(result); next = g_list_next(current_in_history); } } result = duplicate_result(rp); history_list = g_list_append(history_list, result); current_in_history = g_list_last(history_list); LOG(LOG_DEBUG, "OUT : save_history()"); } static GList *check_duplicate_entry(GList *list, const char *word){ GList *l; l = list; while(l != NULL){ if(strcmp(l->data, word) == 0) return(l); l = g_list_next(l); } return(NULL); } void save_word_history(const gchar *word){ GList *list; gint length; LOG(LOG_DEBUG, "IN : save_word_history()"); // $B4{$K%j%9%H$K$"$k$H$-$O!"$$$A$P$s>e$K$b$C$F$/$k(B list = check_duplicate_entry(word_history, word); if(list){ word_history = g_list_remove(word_history, list->data); } list = g_list_first(word_history); length =0; while(list != NULL){ list = g_list_next(list); length++; } if(word_history == NULL){ word_history = g_list_append(word_history, g_strdup(word)); } else if(length >= max_remember_words){ list = g_list_nth(word_history, max_remember_words-1); free(list->data); word_history = g_list_remove(word_history, list->data); word_history = g_list_prepend(word_history, g_strdup(word)); } else { word_history = g_list_prepend(word_history, g_strdup(word)); } gtk_combo_set_popdown_strings( GTK_COMBO(combo_word), word_history) ; save_history(); LOG(LOG_DEBUG, "OUT : save_word_history()"); } void copy_result(RESULT *to, RESULT *from) { LOG(LOG_DEBUG, "IN : copy_result()"); g_assert(from != NULL); g_assert(to != NULL); if(from->heading) to->heading = g_strdup(from->heading); if(from->word) to->word = g_strdup(from->word); to->type = from->type; if(from->type == RESULT_TYPE_EB){ to->data.eb.book_info = from->data.eb.book_info; to->data.eb.search_method = from->data.eb.search_method; if(from->data.eb.plain_heading) to->data.eb.plain_heading = g_strdup(from->data.eb.plain_heading); if(from->data.eb.dict_title) to->data.eb.dict_title = g_strdup(from->data.eb.dict_title); to->data.eb.pos_heading = from->data.eb.pos_heading; to->data.eb.pos_text = from->data.eb.pos_text; } else if(from->type == RESULT_TYPE_GREP){ if(from->data.grep.filename) to->data.grep.filename = g_strdup(from->data.grep.filename); to->data.grep.page = from->data.grep.page; to->data.grep.line = from->data.grep.line; to->data.grep.offset = from->data.grep.offset; } else { LOG(LOG_INFO, "copy_result : Unknown type %d", from->type); } LOG(LOG_DEBUG, "OUT : copy_result()"); } RESULT *duplicate_result(RESULT *rp) { RESULT *result; LOG(LOG_DEBUG, "IN : duplicate_result()"); g_assert(rp != NULL); result = g_new0(RESULT, 1); copy_result(result, rp); LOG(LOG_DEBUG, "OUT : duplicate_result()"); return(result); } void set_current_result(RESULT *rp) { RESULT *old; LOG(LOG_DEBUG, "IN : set_current_result()"); if(current_result == rp){ LOG(LOG_DEBUG, "OUT : set_current_result() = NOP"); return; } old = current_result; if(rp != NULL) current_result = duplicate_result(rp); else current_result = NULL; if(old != NULL) free_result(old); LOG(LOG_DEBUG, "OUT : set_current_result()"); } void free_result(RESULT *rp) { LOG(LOG_DEBUG, "IN : free_result()"); if(rp->heading) g_free(rp->heading); if(rp->word) g_free(rp->word); if(rp->type == RESULT_TYPE_EB){ if(rp->data.eb.plain_heading) g_free(rp->data.eb.plain_heading); if(rp->data.eb.dict_title) g_free(rp->data.eb.dict_title); } else if(rp->type == RESULT_TYPE_GREP){ if(rp->data.grep.filename) g_free(rp->data.grep.filename); } else { LOG(LOG_INFO, "free_result : Unknown type %d", rp->type); } g_free(rp); LOG(LOG_DEBUG, "OUT : free_result()"); } void clear_search_result() { GList *l; LOG(LOG_DEBUG, "IN : clear_search_result()"); if(!search_result) return; l = g_list_first(search_result); free_result((RESULT *)(l->data)); while(l != NULL){ l = g_list_next(l); } g_list_free(search_result); search_result = NULL; skip_result = 0; LOG(LOG_DEBUG, "OUT : clear_search_result()"); } ebview-0.3.6.2/src/textview.h0000644000175000017500000000236310013675516015306 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __TEXTVIEW_H__ #define __TEXTVIEW_H__ #include "defs.h" void create_text_buffer(); GtkWidget *create_main_view(); gint motion_notify_event(GtkWidget *widget, GdkEventMotion *event); gint button_press_event(GtkWidget *widget, GdkEventButton *event); void scroll_mainview_down(); void scroll_mainview_up(); void copy_to_clipboard(); void clear_text_buffer(); void expand_lines(); void shrink_lines(); void increase_font_size(); void decrease_font_size(); #endif /* __TEXTVIEW_H__ */ ebview-0.3.6.2/src/xmlinternal.c0000644000175000017500000001351610104717714015757 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "xmlinternal.h" //#define XML_TRACE void get_tag_name(gchar *text, gchar *tag){ gchar *p; gint i; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : get_tag_name(%s)", tag); #endif p = text; for(i=0; ; i++, p++){ tag[i] = '\0'; if((*p == ' ') || (*p == '>') || (*p == '\0')) break; tag[i] = *p; } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_tag_name()"); #endif } // Extracts start tag. "<" or ">" will not be included. void get_start_tag(gchar *text, gchar *tag){ gchar *p; gint i; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : get_start_tag(%s)", tag); #endif p = strchr(text, '<'); if(p == NULL){ LOG(LOG_INFO, "get_start_tag: format error"); tag[0] = '\0'; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_start_tag()"); #endif return; } // Start tag will end by ">" p++; for(i=0; ; i++, p++){ if(i == 511) break; if((*p == '\0') || (*p == '<')){ tag[0] = '\0'; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_start_tag()"); #endif return; } tag[i] = '\0'; if(*p == '>') break; tag[i] = *p; } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_start_tag()"); #endif } // Extracts end tag. "<", ">" or "/" will not be included void get_end_tag(gchar *text, gchar *tag_name, gchar *tag){ gchar buff[512]; gchar *p; gint i; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : get_end_tag(%s)", tag_name); #endif sprintf(buff, "" p = p + 2; for(i=0; ; i++, p++){ tag[i] = '\0'; if(*p == '>') break; tag[i] = *p; } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_end_tag()"); #endif } void get_content(gchar *text, gchar *tag_name, gchar **content, gint *content_length){ gchar buff[512]; gchar *p; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : get_content(%s)",tag_name); #endif sprintf(buff, "<%s", tag_name); p = strstr(text, buff); if((p == NULL) || (p != text)){ LOG(LOG_INFO, "get_content: format error"); *content = NULL; *content_length = 0; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_content()"); #endif return; } // Find the end of the start tag. while(1){ if(*p == '>') break; p++; } p++; *content = p; // Find end tag. sprintf(buff, "') || (*p == '\"')) break; value[i] = *p; } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : get_attr()"); #endif } void skip_start_tag(gchar **text, gchar *tag_name){ gchar buff[512]; gchar *p; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : skip_start_tag(%s)", tag_name); #endif sprintf(buff, "<%s", tag_name); p = strstr(*text, buff); if(p == NULL){ LOG(LOG_INFO, "skip_start_tag: format error."); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : skip_start_tag()"); #endif return; } while(1){ if(*p == '\0'){ *text = p; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : skip_start_tag()"); #endif return; } if(*p == '>') break; p++; } p++; *text = p; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : skip_start_tag()"); #endif } void skip_end_tag(gchar **text, gchar *tag_name){ gchar *content; gint length; gchar buff[512]; gchar *p; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : skip_end_tag(%s)", tag_name); #endif sprintf(buff, "') break; p++; } p++; *text = p; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : skip_end_tag()"); #endif } ebview-0.3.6.2/src/cellrendererebook.c0000644000175000017500000004260710016037673017114 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This source derives from gtkcellrenerertext.c of GTK+-2.0.9 * Here is an original copyright. */ /* gtkcellrenderertext.c * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "cellrendererebook.h" #include "defs.h" #include "global.h" #include "xmlinternal.h" #include "jcode.h" #include "render.h" static void gtk_cell_renderer_ebook_init (GtkCellRendererEbook *cellebook); static void gtk_cell_renderer_ebook_class_init (GtkCellRendererEbookClass *class); static void gtk_cell_renderer_ebook_finalize (GObject *object); static void gtk_cell_renderer_ebook_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); static void gtk_cell_renderer_ebook_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); static void gtk_cell_renderer_ebook_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); static void gtk_cell_renderer_ebook_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags); static void cell_renderer_ebook_render_ebook(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GtkStateType state, gchar *text, BOOK_INFO *binfo, gint origin_x, gint origin_y, gboolean render); enum { PROP_0, PROP_TEXT, PROP_BOOK, }; static gpointer parent_class; GtkType gtk_cell_renderer_ebook_get_type (void) { static GtkType cell_ebook_type = 0; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_get_type()"); if (!cell_ebook_type) { static const GTypeInfo cell_ebook_info = { sizeof (GtkCellRendererEbookClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) gtk_cell_renderer_ebook_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkCellRendererEbook), 0, /* n_preallocs */ (GInstanceInitFunc) gtk_cell_renderer_ebook_init, }; cell_ebook_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererEbook", &cell_ebook_info, 0); } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_get_type()"); return cell_ebook_type; } static void gtk_cell_renderer_ebook_init (GtkCellRendererEbook *cellebook) { // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_init()"); GTK_CELL_RENDERER (cellebook)->xalign = 0.0; GTK_CELL_RENDERER (cellebook)->yalign = 0.5; GTK_CELL_RENDERER (cellebook)->xpad = 2; GTK_CELL_RENDERER (cellebook)->ypad = 2; cellebook->width = 0; cellebook->height = 0; // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_init()"); } static void gtk_cell_renderer_ebook_class_init (GtkCellRendererEbookClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_class_init()"); parent_class = g_type_class_peek_parent (class); object_class->finalize = gtk_cell_renderer_ebook_finalize; object_class->get_property = gtk_cell_renderer_ebook_get_property; object_class->set_property = gtk_cell_renderer_ebook_set_property; cell_class->get_size = gtk_cell_renderer_ebook_get_size; cell_class->render = gtk_cell_renderer_ebook_render; g_object_class_install_property (object_class, PROP_TEXT, g_param_spec_string ("text", _("Text"), _("Text to render"), NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_pointer ("book", _("BookInfo"), _("Book Information"), G_PARAM_READWRITE)); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_class_init()"); } static void gtk_cell_renderer_ebook_finalize (GObject *object) { GtkCellRendererEbook *cellebook = GTK_CELL_RENDERER_EBOOK (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_finalize()"); if (cellebook->text) g_free (cellebook->text); (* G_OBJECT_CLASS (parent_class)->finalize) (object); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_finalize()"); } static void gtk_cell_renderer_ebook_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec) { GtkCellRendererEbook *cellebook = GTK_CELL_RENDERER_EBOOK (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_get_property()"); switch (param_id) { case PROP_TEXT: g_value_set_string (value, cellebook->text); break; case PROP_BOOK: g_value_set_pointer(value, cellebook->binfo); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_get_property()"); } static void gtk_cell_renderer_ebook_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { GtkCellRendererEbook *cellebook = GTK_CELL_RENDERER_EBOOK (object); // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_set_property()"); switch (param_id) { case PROP_TEXT: if (cellebook->text) g_free (cellebook->text); cellebook->text = g_strdup (g_value_get_string (value)); // g_object_notify (object, "text"); break; case PROP_BOOK: cellebook->binfo = (BOOK_INFO *)g_value_get_pointer(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_set_property()"); } /** * gtk_cell_renderer_ebook_new: * * Creates a new #GtkCellRendererEbook. Adjust how text is drawn using * object properties. Object properties can be * set globally (with g_object_set()). Also, with #GtkTreeViewColumn, * you can bind a property to a value in a #GtkTreeModel. For example, * you can bind the "text" property on the cell renderer to a string * value in the model, thus rendering a different string in each row * of the #GtkTreeView * * Return value: the new cell renderer **/ GtkCellRenderer * gtk_cell_renderer_ebook_new (void) { // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_new()"); return GTK_CELL_RENDERER (g_object_new (gtk_cell_renderer_ebook_get_type (), NULL)); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_new()"); } static void gtk_cell_renderer_ebook_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { GtkCellRendererEbook *cellebook = (GtkCellRendererEbook *) cell; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_get_size()"); if(width) *width = 100; if(height) *height = 20; if(x_offset) *x_offset = 2; if(y_offset) *y_offset = 2; if(cellebook->text && width && height){ // Calculate the size // If the last parameter is FALSE, no actual drawing. cellebook->width = 0; cellebook->height = 0; cell_renderer_ebook_render_ebook(cell, NULL, widget, GTK_STATE_NORMAL, cellebook->text, cellebook->binfo, 0, 0, FALSE); *width = cellebook->width + cell->xpad * 2; // *height = cellebook->height + cell->ypad * 3; *height = font_height + cell->ypad * 4; cellebook->width = 0; cellebook->height = 0; } // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_get_size()"); } static void cell_renderer_ebook_render_gaiji(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GtkStateType state, BOOK_INFO *binfo, gint *x, gint *y, gchar *code, gboolean render) { GtkCellRendererEbook *cellebook = (GtkCellRendererEbook *) cell; gchar *color_name; gint width, height; GdkPixbuf *pixbuf; gint l_y; // LOG(LOG_DEBUG, "IN : cell_renderer_ebook_render_gaiji(code=%s)", code); color_name = gtk_color_selection_palette_to_string( &(widget->style->fg[state]), 1); //color_name = strdup("Black"); pixbuf = load_xbm(binfo, code, &width, &height, color_name); // Is 0.8 appropriate ? l_y = *y + font_ascent - height * 0.8; if(l_y < 0) l_y = 0; if(render){ gdk_pixbuf_render_to_drawable_alpha (pixbuf, window, /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */ 0, 0, *x, //*y, l_y, width, height, GDK_PIXBUF_ALPHA_FULL, 0, GDK_RGB_DITHER_NORMAL, 0, 0); } *x += width + 2; if(height > cellebook->height) cellebook->height = height; cellebook->width += width + 2; gdk_pixbuf_unref(pixbuf); g_free(color_name); // LOG(LOG_DEBUG, "OUT : cell_renderer_ebook_render_gaiji()"); } struct special_char { guchar special; gchar *encoded; }; static struct special_char special[] = {{'&', "&"}, {'\"', """}, {0, NULL}}; static gchar *replace_special_char(gchar *text){ gchar buff[65536]; gchar *p; gint i; gint j; p = text; j = 0; while(*p){ for(i=0; ; i ++){ if(special[i].encoded == NULL) { buff[j] = *p; j++; break; } if(*p == special[i].special){ strcpy(&buff[j], special[i].encoded); j += strlen(special[i].encoded); break; } } p++; } buff[j] = '\0'; return(g_strdup(buff)); } static void cell_renderer_ebook_render_string(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GtkStateType state, gchar *text, gint length, gint *x, gint *y, gboolean render) { GtkCellRendererEbook *cellebook = (GtkCellRendererEbook *) cell; PangoLayout *layout; gchar *str; gchar *tmp_str; PangoRectangle rect; PangoAttrList *attrs; gchar *parsed_text; gchar *color_name; // LOG(LOG_DEBUG, "IN : cell_renderer_ebook_render_string(text=%s,w=%d, h=%d)",text, *x, *y ); color_name = gtk_color_selection_palette_to_string( &(widget->style->fg[state]), 1); str = g_strndup(text, length); /* tmp_str = str; str = replace_special_char(tmp_str); g_free(tmp_str); */ tmp_str = str; str = g_strdup_printf("%s", color_name, fontset_normal, tmp_str); g_free(tmp_str); pango_parse_markup (str, -1, 0, &attrs, &parsed_text, NULL, NULL); if(parsed_text){ layout = gtk_widget_create_pango_layout(widget, parsed_text); pango_layout_set_attributes(layout, attrs); } else { layout = gtk_widget_create_pango_layout(widget, str); } pango_layout_get_pixel_extents (layout, NULL, &rect); if(render){ gdk_draw_layout(window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], *x, *y+1, layout); } if(rect.height > cellebook->height) cellebook->height = rect.height; cellebook->width += rect.width; *x += rect.width; //y += rect.height; g_free(str); if(parsed_text) g_free(parsed_text); // LOG(LOG_DEBUG, "OUT : cell_renderer_ebook_render_string()"); } static void cell_renderer_ebook_render_ebook(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GtkStateType state, gchar *text, BOOK_INFO *binfo, gint origin_x, gint origin_y, gboolean render) { gchar *p; gint body_length; gchar body[65535]; gchar tag_name[512]; gchar start_tag[512]; gchar code[16]; gint x, y; // LOG(LOG_DEBUG, "IN : cell_renderer_ebook_render_ebook()"); x = origin_x; y = origin_y; p = text; body_length = 0; while(*p != '\0'){ if(*p == '<'){ get_start_tag(p, start_tag); get_tag_name(start_tag, tag_name); if(strcmp(tag_name, "gaiji") == 0){ if(body_length != 0){ cell_renderer_ebook_render_string(cell, window, widget, state, body, body_length, &x, &y, render); body_length = 0; } get_attr(start_tag, "code", code); cell_renderer_ebook_render_gaiji(cell, window, widget, state, binfo, &x, &y, code, render); skip_start_tag(&p, tag_name); } else if((strcmp(tag_name, "sup") == 0) || (strcmp(tag_name, "sub") == 0)) { gchar *pp; pp = p; skip_end_tag(&p, tag_name); strncpy(&body[body_length], pp, p - pp); body_length += p - pp; body[body_length] = '\0'; } else { /* body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; */ body[body_length] = '&'; body_length ++; body[body_length] = 'l'; body_length ++; body[body_length] = 't'; body_length ++; body[body_length] = ';'; body_length ++; body[body_length] = '\0'; p++; } } else if(*p == '>'){ body[body_length] = '&'; body_length ++; body[body_length] = 'g'; body_length ++; body[body_length] = 't'; body_length ++; body[body_length] = ';'; body_length ++; body[body_length] = '\0'; p++; } else if(*p == '&'){ body[body_length] = '&'; body_length ++; body[body_length] = 'a'; body_length ++; body[body_length] = 'm'; body_length ++; body[body_length] = 'p'; body_length ++; body[body_length] = ';'; body_length ++; body[body_length] = '\0'; p++; } else if(*p == '\"'){ body[body_length] = '&'; body_length ++; body[body_length] = 'q'; body_length ++; body[body_length] = 'u'; body_length ++; body[body_length] = 'o'; body_length ++; body[body_length] = 't'; body_length ++; body[body_length] = ';'; body_length ++; body[body_length] = '\0'; p++; } else { body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; } } if(body_length != 0){ cell_renderer_ebook_render_string(cell, window, widget, state, body, body_length, &x, &y, render); } // LOG(LOG_DEBUG, "OUT : cell_renderer_ebook_render_ebook()"); } static void gtk_cell_renderer_ebook_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) { GtkCellRendererEbook *cellebook = (GtkCellRendererEbook *) cell; GtkStateType state; gint x_offset; gint y_offset; // LOG(LOG_DEBUG, "IN : gtk_cell_renderer_ebook_render()"); gtk_cell_renderer_ebook_get_size (cell, widget, cell_area, &x_offset, &y_offset, NULL, NULL); if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED) { if (GTK_WIDGET_HAS_FOCUS (widget)){ state = GTK_STATE_SELECTED; } else { state = GTK_STATE_ACTIVE; } } else { if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE){ state = GTK_STATE_INSENSITIVE; } else { state = GTK_STATE_NORMAL; } } /* if (state != GTK_STATE_SELECTED){ { GdkColor color; GdkGC *gc; gc = gdk_gc_new (window); gdk_gc_set_foreground(gc, &widget->style->bg[state]); gdk_gc_set_background(gc, &widget->style->bg[state]); gdk_draw_rectangle (window, gc, TRUE, background_area->x, background_area->y, background_area->width, background_area->height); g_object_unref (G_OBJECT (gc)); } */ cell_renderer_ebook_render_ebook(cell, window, widget, state, cellebook->text, cellebook->binfo, cell_area->x + cell->xpad, cell_area->y + cell->ypad, TRUE); // LOG(LOG_DEBUG, "OUT : gtk_cell_renderer_ebook_render()"); } ebview-0.3.6.2/src/headword.c0000644000175000017500000005060010016041335015201 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "history.h" #include "dump.h" #include "dirtree.h" #include "statusbar.h" #include "mainwindow.h" #include "cellrendererebook.h" #include "jcode.h" #include "grep.h" #include "pixmap.h" extern GtkWidget *note_tree; static GtkTreeStore *heading_store=NULL; static GtkWidget *tree_scroll; static GtkWidget *tree_view; static GtkTreeViewColumn *dict_column; static GtkWidget *button_prev_hit; static GtkWidget *button_next_hit; static gint num_heading; static GtkWidget *image_next; static GtkWidget *image_prev; gint skip_result=0; enum { HEADING_TYPE_COLUMN, HEADING_TITLE_COLUMN, HEADING_DICT_COLUMN, HEADING_DICTFGCOLOR_COLUMN, HEADING_DICTBGCOLOR_COLUMN, HEADING_RESULT_COLUMN, HEADING_BOOK_COLUMN, HEADING_N_COLUMNS }; static void show_location(RESULT *result){ gchar msg[512]; if(result->type == RESULT_TYPE_EB){ sprintf(msg, "%s : HEADING: page=%08x offset=%03x CONTENT: page=%08x offset=%03x", result->data.eb.book_info->subbook_title, result->data.eb.pos_heading.page, result->data.eb.pos_heading.offset, result->data.eb.pos_text.page, result->data.eb.pos_text.offset); } else if(result->type == RESULT_TYPE_GREP){ gchar *f1, *f2; f1 = generic_to_native(result->data.grep.filename); f2 = fs_to_unicode(f1); sprintf(msg, "%s : page=%d, line=%d, offset=%d", f2, result->data.grep.page, result->data.grep.line, result->data.grep.offset); g_free(f1); g_free(f2); } else { return; } status_message(msg); }; void show_result_tree() { RESULT *rp; GList *l; GtkTreeIter parent_iter; GtkTreeIter child_iter; BOOK_INFO *last_book = NULL; gchar *last_file=NULL; gint i; gchar buff[5]; gint heading_count; LOG(LOG_DEBUG, "IN : show_result_tree()"); if(heading_store != NULL) { gtk_tree_store_clear(heading_store); } else { heading_store = gtk_tree_store_new (HEADING_N_COLUMNS, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER); gtk_tree_view_set_model(GTK_TREE_VIEW(tree_view), GTK_TREE_MODEL(heading_store)); } // gtk_button_set_label(GTK_BUTTON(button_next_hit), ""); // gtk_button_set_label(GTK_BUTTON(button_prev_hit), ""); gtk_widget_set_sensitive(button_next_hit, FALSE); gtk_widget_set_sensitive(button_prev_hit, FALSE); if(search_result == NULL){ // No hit LOG(LOG_DEBUG, "OUT : show_result_tree() : NOP"); return; } gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); gtk_adjustment_set_value( gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(tree_scroll)), 0); if(skip_result != 0){ gtk_widget_set_sensitive(button_prev_hit, TRUE); // gtk_button_set_label(GTK_BUTTON(button_prev_hit), "<<"); } if(ebook_search_method() == SEARCH_METHOD_GREP) goto GREP; if(bsort_by_dictionary) goto SORT_BY_DICT; for(i=0, l = search_result ; l != NULL; i ++, l = g_list_next(l)){ if((skip_result != 0) && (i < skip_result)){ continue; } if(i >= num_heading + skip_result) { gtk_widget_set_sensitive(button_next_hit, TRUE); // gtk_button_set_label(GTK_BUTTON(button_next_hit), ">>"); break; } rp = (RESULT *)(l->data); gtk_tree_store_append(heading_store, &child_iter, NULL); memset(buff, 0, sizeof(buff)); if(rp->data.eb.dict_title == NULL){ gtk_tree_store_set (heading_store, &child_iter, HEADING_TYPE_COLUMN, 1, HEADING_TITLE_COLUMN, rp->heading, HEADING_DICT_COLUMN, NULL, HEADING_DICTFGCOLOR_COLUMN, NULL, HEADING_DICTBGCOLOR_COLUMN, NULL, HEADING_BOOK_COLUMN, rp->data.eb.book_info, HEADING_RESULT_COLUMN, rp, -1); } else { g_unichar_to_utf8(g_utf8_get_char(rp->data.eb.dict_title), buff); gtk_tree_store_set (heading_store, &child_iter, HEADING_TYPE_COLUMN, 1, HEADING_TITLE_COLUMN, rp->heading, HEADING_DICT_COLUMN, buff, HEADING_DICTFGCOLOR_COLUMN, rp->data.eb.book_info->fg, HEADING_DICTBGCOLOR_COLUMN, rp->data.eb.book_info->bg, HEADING_BOOK_COLUMN, rp->data.eb.book_info, HEADING_RESULT_COLUMN, rp, -1); } last_book = rp->data.eb.book_info; } gtk_tree_view_expand_all(GTK_TREE_VIEW(tree_view)); goto END; SORT_BY_DICT: heading_count = 0; for(i=0, l = search_result ; l != NULL; i ++, l = g_list_next(l)){ if((skip_result != 0) && (i < skip_result)){ continue; } if(heading_count >= num_heading) { gtk_widget_set_sensitive(button_next_hit, TRUE); // gtk_button_set_label(GTK_BUTTON(button_next_hit), ">>"); break; } rp = (RESULT *)(l->data); // Dictionary name is different than former result. if(last_book != rp->data.eb.book_info){ gtk_tree_store_append(heading_store, &parent_iter, NULL); gtk_tree_store_set (heading_store, &parent_iter, HEADING_TYPE_COLUMN, 0, HEADING_TITLE_COLUMN, rp->data.eb.book_info->subbook_title, -1); last_book = rp->data.eb.book_info; heading_count ++; } gtk_tree_store_append(heading_store, &child_iter, &parent_iter); gtk_tree_store_set (heading_store, &child_iter, HEADING_TYPE_COLUMN, 1, HEADING_TITLE_COLUMN, rp->heading, HEADING_DICT_COLUMN, NULL, HEADING_BOOK_COLUMN, rp->data.eb.book_info, HEADING_RESULT_COLUMN, rp, -1); last_book = rp->data.eb.book_info; heading_count ++; } gtk_tree_view_expand_all(GTK_TREE_VIEW(tree_view)); goto END; GREP: heading_count = 0; for(i=0, l = search_result ; l != NULL; i ++, l = g_list_next(l)){ if((skip_result != 0) && (i < skip_result)){ continue; } if(heading_count >= num_heading) { gtk_widget_set_sensitive(button_next_hit, TRUE); // gtk_button_set_label(GTK_BUTTON(button_next_hit), ">>"); break; } rp = (RESULT *)(l->data); g_assert(rp != NULL); // File name is different than former result. if(bshow_filename){ if((last_file == NULL) || (strcmp(last_file, rp->data.grep.filename) != 0)){ #ifdef __WIN32__ gchar *tmp1, *tmp2; tmp1 = generic_to_native(rp->data.grep.filename); tmp2 = fs_to_unicode(tmp1); #else gchar *tmp2; tmp2 = rp->data.grep.filename; #endif gtk_tree_store_append(heading_store, &parent_iter, NULL); gtk_tree_store_set (heading_store, &parent_iter, HEADING_TYPE_COLUMN, 0, HEADING_TITLE_COLUMN, tmp2, -1); #ifdef __WIN32__ g_free(tmp1); g_free(tmp2); #endif last_file = strdup(rp->data.grep.filename); heading_count ++; } gtk_tree_store_append(heading_store, &child_iter, &parent_iter); } else { gtk_tree_store_append(heading_store, &child_iter, NULL); } gtk_tree_store_set (heading_store, &child_iter, HEADING_TYPE_COLUMN, 1, HEADING_TITLE_COLUMN, rp->heading, HEADING_DICT_COLUMN, NULL, // HEADING_BOOK_COLUMN, rp->data.eb.book_info, HEADING_RESULT_COLUMN, rp, -1); heading_count ++; } gtk_tree_view_expand_all(GTK_TREE_VIEW(tree_view)); goto END; END: if(bheading_auto_calc){ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); } else { gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); } LOG(LOG_DEBUG, "OUT : show_result_tree()"); } void select_first_item() { GtkTreeIter iter; GtkTreeIter child; GtkTreeSelection *select; gint type; LOG(LOG_DEBUG, "IN : select_first_item()"); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(heading_store), &iter) == FALSE) return; gtk_tree_model_get(GTK_TREE_MODEL(heading_store), &iter, HEADING_TYPE_COLUMN, &type, -1); if(type == 0){ if(gtk_tree_model_iter_children(GTK_TREE_MODEL(heading_store), &child, &iter) == TRUE){ gtk_tree_selection_select_iter(select, &child); } } else { gtk_tree_selection_select_iter(select, &iter); } LOG(LOG_DEBUG, "OUT : select_first_item()"); } static gint button_press_event(GtkWidget *widget, GdkEventButton *event) { GtkTreeModel *model; GtkTreeIter iter; GtkTreeSelection *selection; gint type; RESULT *rp; LOG(LOG_DEBUG, "IN : button_press_event()"); if ((event->type == GDK_BUTTON_PRESS) && ((event->button == 2) || (event->button == 3))){ return(TRUE); } else if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1)){ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); if (gtk_tree_selection_get_selected(selection, &model, &iter) == FALSE) { return(FALSE); } gtk_tree_model_get (model, &iter, HEADING_TYPE_COLUMN, &type, -1); if(type == 0) return(FALSE); gtk_tree_model_get (model, &iter, HEADING_RESULT_COLUMN, &rp, -1); if(rp->type != RESULT_TYPE_GREP) return(FALSE); open_file(rp); } LOG(LOG_DEBUG, "OUT : button_press_event() = FALSE"); return(FALSE); } void item_next() { GtkTreeIter iter; GtkTreeIter child; GtkTreeModel *model; GtkTreeSelection *select; GtkTreePath *path; LOG(LOG_DEBUG, "IN : item_next()"); if(!heading_store) { LOG(LOG_DEBUG, "OUT : item_next()"); return; } select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); if (gtk_tree_selection_get_selected(select, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : item_next() = no selection"); return; } path = gtk_tree_model_get_path(model, &iter); if(((bsort_by_dictionary == FALSE) && (ebook_search_method() != SEARCH_METHOD_GREP)) || ((bshow_filename == FALSE) && (ebook_search_method() == SEARCH_METHOD_GREP))){ gtk_tree_path_next(path); if(gtk_tree_model_get_iter(model, &iter, path) == TRUE){ gtk_tree_selection_select_iter(select, &iter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), path, NULL, TRUE, 0.5, 0.0); } goto END; } while(1){ // Break if path is invalid if(gtk_tree_model_get_iter(model, &iter, path) == FALSE){ break; } // Dictionary name is selected. if(gtk_tree_path_get_depth(path) == 1){ // If there are childs. if(gtk_tree_model_iter_children(model, &child, &iter) == TRUE){ gtk_tree_selection_select_iter(select, &child); gtk_tree_path_free(path); path = gtk_tree_model_get_path(model, &child); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), path, NULL, TRUE, 0.5, 0.0); break; } gtk_tree_path_next(path); continue; // Result is selected. } else { GtkTreePath *next; next = gtk_tree_path_copy(path); gtk_tree_path_next(next); // Is there next item ? if((gtk_tree_path_compare(path, next) == -1) && (gtk_tree_model_get_iter(model, &iter, next) == TRUE)){ gtk_tree_selection_select_iter(select, &iter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), next, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free(next); break; } else { // If there is not, select next dictionary. gtk_tree_path_up(path); gtk_tree_path_next(path); gtk_tree_path_free(next); continue; } } } END: gtk_tree_path_free(path); LOG(LOG_DEBUG, "OUT : item_next()"); } void item_previous() { GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *select; GtkTreePath *path; GtkTreePath *prev; LOG(LOG_DEBUG, "IN : item_previous()"); if(!heading_store) { LOG(LOG_DEBUG, "OUT : item_previous()"); return; } select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); if (gtk_tree_selection_get_selected(select, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : item_previous() = no selection"); return; } path = gtk_tree_model_get_path(model, &iter); if(((bsort_by_dictionary == FALSE) && (ebook_search_method() != SEARCH_METHOD_GREP)) || ((bshow_filename == FALSE) && (ebook_search_method() == SEARCH_METHOD_GREP))){ gtk_tree_path_prev(path); if(gtk_tree_model_get_iter(model, &iter, path) == TRUE){ gtk_tree_selection_select_iter(select, &iter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), path, NULL, TRUE, 0.5, 0.0); } goto END; } while(1){ // Break if path is invalid if(gtk_tree_model_get_iter(model, &iter, path) == FALSE){ break; } // Dictionary name is selected. if(gtk_tree_path_get_depth(path) == 1){ prev = gtk_tree_path_copy(path); gtk_tree_path_prev(prev); // If there is dictionary before. if(gtk_tree_path_compare(prev, path) == -1){ gint child_no; GtkTreeIter child; gtk_tree_model_get_iter(model, &iter, prev); child_no = gtk_tree_model_iter_n_children(model, &iter); if(child_no == 0){ gtk_tree_path_free(path); path = gtk_tree_path_copy(prev); gtk_tree_path_free(prev); continue; } else { gtk_tree_model_iter_nth_child(model, &child, &iter, child_no-1); gtk_tree_selection_select_iter(select, &child); gtk_tree_path_free(path); path = gtk_tree_model_get_path(model, &child); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), path, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free(prev); break; } } else { gtk_tree_path_free(prev); break; } // Result is selected. } else { prev = gtk_tree_path_copy(path); gtk_tree_path_prev(prev); // Is there next item ? if((gtk_tree_path_compare(prev, path) == -1) && (gtk_tree_model_get_iter(model, &iter, prev) == TRUE)){ gtk_tree_selection_select_iter(select, &iter); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(tree_view), prev, NULL, TRUE, 0.5, 0.0); gtk_tree_path_free(prev); break; } else { // If there is not, select the dictionary before. gtk_tree_path_up(path); } } } END: gtk_tree_path_free(path); LOG(LOG_DEBUG, "OUT : item_previous()"); } static void heading_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gint type; RESULT *rp; LOG(LOG_DEBUG, "IN : heading_selection_changed"); if (gtk_tree_selection_get_selected (selection, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : heading_selection_changed"); return; } gtk_tree_model_get (model, &iter, HEADING_TYPE_COLUMN, &type, -1); if(type == 1){ gtk_tree_model_get (model, &iter, HEADING_RESULT_COLUMN, &rp, -1); show_result(rp, TRUE, TRUE); show_location(rp); } LOG(LOG_DEBUG, "OUT : heading_selection_changed"); } void update_tree_view() { gtk_tree_view_column_set_visible(dict_column, !bsort_by_dictionary); } void next_heading(GtkWidget *widget, gpointer *data){ LOG(LOG_DEBUG, "IN : next_heading()"); skip_result += num_heading; if(skip_result >= g_list_length(search_result)) { skip_result -= num_heading; return; } show_result_tree(); select_first_item(); LOG(LOG_DEBUG, "OUT : next_heading()"); } void previous_heading(GtkWidget *widget, gpointer *data){ LOG(LOG_DEBUG, "IN : previous_heading()"); if(skip_result <= 0) return; skip_result -= num_heading; if(skip_result < 0) skip_result = 0; show_result_tree(); select_first_item(); LOG(LOG_DEBUG, "OUT : previous_heading()"); } gboolean configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { if(bheading_auto_calc){ num_heading = (tree_scroll->allocation.height - 12) / (font_height + 10); if(num_heading < 1) num_heading = 1; } else { num_heading = max_heading; } return(FALSE); } GtkWidget *create_headword_tree(){ GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; GtkWidget *vbox; GtkWidget *hbox; vbox = gtk_vbox_new(FALSE, 0); tree_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start(GTK_BOX(vbox), tree_scroll, TRUE, TRUE, 0); if(bheading_auto_calc){ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); } else { gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tree_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); } tree_view = gtk_tree_view_new(); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), FALSE); gtk_container_add (GTK_CONTAINER(tree_scroll), tree_view); g_signal_connect(G_OBJECT(tree_view),"button_press_event", G_CALLBACK(button_press_event), (gpointer)NULL); g_signal_connect(G_OBJECT(tree_view),"expose_event", G_CALLBACK(configure_event), (gpointer)NULL); /* // renderer = gtk_cell_renderer_text_new(); renderer = gtk_cell_renderer_ebook_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", HEADING_TITLE_COLUMN, "book", HEADING_BOOK_COLUMN, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW (tree_view), column); */ renderer = gtk_cell_renderer_text_new(); dict_column = gtk_tree_view_column_new_with_attributes("D", renderer, "text", HEADING_DICT_COLUMN, "foreground", HEADING_DICTFGCOLOR_COLUMN, "background", HEADING_DICTBGCOLOR_COLUMN, NULL); gtk_tree_view_insert_column(GTK_TREE_VIEW(tree_view), dict_column, -1); gtk_tree_view_column_set_sizing(dict_column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); renderer = gtk_cell_renderer_ebook_new(); column = gtk_tree_view_column_new_with_attributes ("Head", renderer, "text", HEADING_TITLE_COLUMN, "book", HEADING_BOOK_COLUMN, NULL); gtk_tree_view_insert_column(GTK_TREE_VIEW(tree_view), column, -1); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); select = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (heading_selection_changed), NULL); hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); /* button_prev_hit = gtk_button_new_with_label(""); g_signal_connect(G_OBJECT (button_prev_hit), "pressed", G_CALLBACK(previous_heading), NULL); gtk_box_pack_start(GTK_BOX(hbox), button_prev_hit, TRUE, TRUE, 0); gtk_tooltips_set_tip(tooltip, button_prev_hit, _("Go to previous hit list."),"Private"); */ button_prev_hit = gtk_button_new(); g_signal_connect(G_OBJECT (button_prev_hit), "pressed", G_CALLBACK(previous_heading), NULL); gtk_box_pack_start(GTK_BOX(hbox), button_prev_hit, TRUE, TRUE, 0); gtk_tooltips_set_tip(tooltip, button_prev_hit, _("Go to previous hit list."),"Private"); image_prev = gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_prev_hit), image_prev); /* button_next_hit = gtk_button_new_with_label(""); g_signal_connect(G_OBJECT (button_next_hit), "pressed", G_CALLBACK(next_heading), NULL); gtk_box_pack_start(GTK_BOX(hbox), button_next_hit, TRUE, TRUE, 0); gtk_tooltips_set_tip(tooltip, button_next_hit, _("Go to next hit list."),"Private"); */ button_next_hit = gtk_button_new(); g_signal_connect(G_OBJECT (button_next_hit), "pressed", G_CALLBACK(next_heading), NULL); gtk_box_pack_start(GTK_BOX(hbox), button_next_hit, TRUE, TRUE, 0); gtk_tooltips_set_tip(tooltip, button_next_hit, _("Go to next hit list."),"Private"); image_next = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_next_hit), image_next); gtk_widget_set_sensitive(button_next_hit, FALSE); gtk_widget_set_sensitive(button_prev_hit, FALSE); update_tree_view(); return(vbox); } ebview-0.3.6.2/src/pref_grep.c0000644000175000017500000002655010016042516015366 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pref_io.h" static GtkWidget *filter_view; static GtkWidget *spin_additional_line; static GtkWidget *spin_additional_char; static GtkWidget *spin_cache_size; gboolean pref_end_grep() { LOG(LOG_DEBUG, "IN : pref_end_grep()"); additional_lines = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_additional_line)); additional_chars = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_additional_char)); LOG(LOG_DEBUG, "OUT : pref_end_grep()"); return(TRUE); } static void add_filter(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; LOG(LOG_DEBUG, "IN : add_filter()"); gtk_list_store_append(GTK_LIST_STORE(filter_store), &iter); gtk_list_store_set(GTK_LIST_STORE(filter_store), &iter, FILTER_EXT_COLUMN, ".ext", FILTER_FILTER_COMMAND_COLUMN, "xxxtotext %f %o", FILTER_OPEN_COMMAND_COLUMN, "openxxx %f", FILTER_EDITABLE_COLUMN, TRUE, -1); LOG(LOG_DEBUG, "OUT : add_filter()"); } static void remove_filter(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_filter()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gtk_list_store_remove(GTK_LIST_STORE(filter_store), &iter); } LOG(LOG_DEBUG, "OUT : remove_filter()"); } static void cell_edited(GtkCellRendererText *cell, const gchar *path_string, const gchar *new_text, gpointer data) { GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; gint column; gchar *old_text; column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT (cell), "column")); gtk_tree_model_get_iter(GTK_TREE_MODEL(filter_store), &iter, path); gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, column, &old_text, -1); g_free (old_text); gtk_list_store_set(GTK_LIST_STORE(filter_store), &iter, column, new_text, -1); gtk_tree_path_free (path); } GtkWidget *pref_start_grep() { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkObject *adj; GtkWidget *table; GtkAttachOptions xoption=0, yoption=0; LOG(LOG_DEBUG, "IN : pref_start_grep()"); vbox = gtk_vbox_new(FALSE,10); gtk_widget_set_size_request(vbox, 300, 200); xoption = GTK_SHRINK|GTK_FILL; yoption = GTK_SHRINK; table = gtk_table_new(3, 4, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 1, 2, xoption, yoption, 10, 10); label = gtk_label_new(_("Additional Lines To Display")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 5, //value 0, // lower 1000, //upper 1, // step increment 10,// page_increment, 0.0); spin_additional_line = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_additional_line), additional_lines); gtk_widget_set_size_request(spin_additional_line,60,20); gtk_table_attach(GTK_TABLE(table), spin_additional_line, 1, 2, 1, 2, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_additional_line, _("In addition to matched line, additional lines will be shown in contents."),"Private"); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 2, 3, xoption, yoption, 10, 10); label = gtk_label_new(_("Additional Chars To Display")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new( 16, //value 1, // lower 100, //upper 1, // step increment 10,// page_increment, 0.0); spin_additional_char = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_additional_char), additional_chars); gtk_widget_set_size_request(spin_additional_char,60,20); gtk_table_attach(GTK_TABLE(table), spin_additional_char, 1, 2, 2, 3, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_additional_char, _("When matched line is too long, several characters around keyword will be shown in heading."), "Private"); LOG(LOG_DEBUG, "OUT : pref_start_grep()"); return(vbox); } gboolean pref_end_filter() { LOG(LOG_DEBUG, "IN : pref_end_grep()"); save_filter(); LOG(LOG_DEBUG, "OUT : pref_end_grep()"); return(TRUE); } GtkWidget *pref_start_filter() { GtkWidget *button; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *frame; GtkWidget *scroll; GtkCellRenderer *renderer; LOG(LOG_DEBUG, "IN : pref_start_dictgroup()"); // Left half vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 2); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox) , frame,TRUE, TRUE, 0); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scroll); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); filter_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(filter_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(filter_view), TRUE); gtk_tree_view_expand_all(GTK_TREE_VIEW(filter_view)); gtk_container_add (GTK_CONTAINER (scroll), filter_view); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)FILTER_EXT_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(filter_view), -1, _("Extension"), renderer, "text", FILTER_EXT_COLUMN, "editable", FILTER_EDITABLE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)FILTER_FILTER_COMMAND_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(filter_view), -1, _("Filter Command"), renderer, "text", FILTER_FILTER_COMMAND_COLUMN, "editable", FILTER_EDITABLE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)FILTER_OPEN_COMMAND_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(filter_view), -1, _("Open Command"), renderer, "text", FILTER_OPEN_COMMAND_COLUMN, "editable", FILTER_EDITABLE_COLUMN, NULL); // Enable resizing all column { gint i; GtkTreeViewColumn *column; for(i=0;;i++){ column = gtk_tree_view_get_column(GTK_TREE_VIEW(filter_view), i); if(column == NULL) break; gtk_tree_view_column_set_resizable(column, TRUE); } } hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox,FALSE, FALSE, 2); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_start(GTK_BOX(hbox), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_filter), (gpointer)button); button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_start(GTK_BOX(hbox), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(remove_filter), (gpointer)button); LOG(LOG_DEBUG, "OUT : pref_start_dictgroup()"); return(vbox); } static void remove_recursive(gchar *dirname) { GDir *dir; const gchar *name; gchar fullpath[512]; gint r; LOG(LOG_DEBUG, "IN : remove_recursive(%s)", dirname); if((dir = g_dir_open(dirname, 0, NULL)) == NULL){ LOG(LOG_ERROR, "Failed to open directory %s", dirname); LOG(LOG_DEBUG, "OUT : list_file_recursive()"); return; } while((name = g_dir_read_name(dir)) != NULL){ if(strcmp(dirname,"/")==0){ sprintf(fullpath,"/%s",name); } else { sprintf(fullpath,"%s%s%s",dirname, DIR_DELIMITER, name); } if(g_file_test(fullpath, G_FILE_TEST_IS_REGULAR) == TRUE){ r = unlink(fullpath); if(r != 0){ LOG(LOG_ERROR, "unlink : %s", strerror(errno)); } } else if(g_file_test(fullpath, G_FILE_TEST_IS_DIR) == TRUE){ remove_recursive(fullpath); r = rmdir(fullpath); if(r != 0){ LOG(LOG_ERROR, "rmdir: %s", strerror(errno)); } } } g_dir_close(dir); LOG(LOG_DEBUG, "OUT : remove_recursive()"); } static gint clear_cache(GtkWidget *widget,gpointer *data) { LOG(LOG_DEBUG, "IN : clear_cache()"); remove_recursive(cache_dir); LOG(LOG_DEBUG, "OUT : clear_cache()"); return(TRUE); } gboolean pref_end_cache() { LOG(LOG_DEBUG, "IN : pref_end_cache()"); cache_size = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_cache_size)); LOG(LOG_DEBUG, "OUT : pref_end_cache()"); return(TRUE); } GtkWidget *pref_start_cache() { GtkWidget *vbox; GtkWidget *label; GtkObject *adj; GtkWidget *table; GtkWidget *button; GtkAttachOptions xoption=0, yoption=0; LOG(LOG_DEBUG, "IN : pref_start_cache()"); vbox = gtk_vbox_new(FALSE,10); gtk_widget_set_size_request(vbox, 300, 200); table = gtk_table_new(3, 1, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table,FALSE, FALSE, 0); label = gtk_label_new(_("Maximum Cache Size (MB)")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, xoption, yoption, 10, 10); adj = gtk_adjustment_new( 50, //value 1, // lower 1000, //upper 1, // step increment 10,// page_increment, 0.0); spin_cache_size = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_cache_size), cache_size); gtk_widget_set_size_request(spin_cache_size,60,20); gtk_table_attach(GTK_TABLE(table), spin_cache_size, 1, 2, 0, 1, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_cache_size, _("Specify maximum cache size in MB."), "Private"); button = gtk_button_new_with_label(_("Clear Cache")); gtk_table_attach(GTK_TABLE(table), button, 2, 3, 0, 1, xoption, yoption, 10, 10); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(clear_cache), NULL); LOG(LOG_DEBUG, "OUT : pref_start_grep()"); return(vbox); } ebview-0.3.6.2/src/pixmap.h0000644000175000017500000000331710013675515014724 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PIXMAP_H__ #define __MULTI_H__ #include "defs.h" /* void load_pixmaps(); GtkWidget *create_pixmap_button(GdkPixmap *pixmap, GdkBitmap *mask); GtkWidget *create_pixmap_toggle_button(GdkPixmap *pixmap, GdkBitmap *mask); */ typedef enum { IMAGE_EBVIEW, IMAGE_BOOK_OPEN, IMAGE_BOOK_CLOSED, IMAGE_CDROM, IMAGE_EBOOK, IMAGE_LEFT, IMAGE_RIGHT, IMAGE_UP, IMAGE_DOWN, IMAGE_GLOBE, IMAGE_SEARCH, IMAGE_ITEM, IMAGE_SELECTION, IMAGE_POPUP, IMAGE_HTML, IMAGE_LIST, IMAGE_MULTI, IMAGE_SMALL_LEFT, IMAGE_SMALL_RIGHT, IMAGE_SMALL_CLOSE, IMAGE_PUSH_OFF, IMAGE_PUSH_ON, IMAGE_SELECTION2, IMAGE_POPUP2, IMAGE_FILE, IMAGE_FOLDER_CLOSED, IMAGE_FOLDER_OPEN } ImageNumber; GtkWidget *create_button_with_image(ImageNumber number); GtkWidget *create_toggle_button_with_image(ImageNumber number); GtkWidget *create_image(ImageNumber number); GdkPixbuf *create_pixbuf(ImageNumber number); void destroy_pixbuf(GdkPixbuf *pixbuf); #endif /* __MULTI_H__ */ ebview-0.3.6.2/src/pref_weblist.c0000644000175000017500000004060710015022140016067 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "websearch.h" #include "pref_io.h" #include "dialog.h" #include "misc.h" GtkWidget *web_view; static GtkWidget *entry_group_name; static GtkWidget *entry_engine_name; static GtkWidget *entry_engine_home; static GtkWidget *entry_engine_pre; static GtkWidget *entry_engine_post; static GtkWidget *entry_engine_glue; static GtkWidget *combo_charcode; //static GtkCTreeNode *current_node=NULL; static GtkTreeIter last_iter; static gboolean edited = FALSE; static gboolean rewinding=FALSE; GList *web_list = NULL; extern GtkWidget *web_pane; void my_gtk_tree_store_swap (GtkTreeStore *tree_store, GtkTreeIter *a, GtkTreeIter *b); static gboolean update_last_engine(); gboolean pref_end_weblist() { LOG(LOG_DEBUG, "IN : pref_end_weblist()"); if(update_last_engine() == FALSE) return(FALSE); save_weblist(); LOG(LOG_DEBUG, "OUT : pref_end_weblist()"); return(TRUE); } static void up_item(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; GtkTreeIter prev_iter; GtkTreeSelection *selection; GtkTreePath* path; LOG(LOG_DEBUG, "IN : up_item()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select dictionary.")); return; } path = gtk_tree_model_get_path(GTK_TREE_MODEL(web_store), &iter); gtk_tree_path_prev(path); if(gtk_tree_model_get_iter(GTK_TREE_MODEL(web_store), &prev_iter, path)) { // gtk_tree_store_move_before(web_store, &iter, &prev_iter); my_gtk_tree_store_swap(web_store, &iter, &prev_iter); } // gtk_tree_path_free(path); LOG(LOG_DEBUG, "OUT : up_item()"); return; } static void down_item(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; GtkTreeIter next_iter; GtkTreeSelection *selection; GtkTreePath* path; GtkTreePath *next_path; LOG(LOG_DEBUG, "IN : down_item()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select dictionary.")); return; } path = gtk_tree_model_get_path(GTK_TREE_MODEL(web_store), &iter); next_path = gtk_tree_path_copy(path); gtk_tree_path_next(next_path); if(gtk_tree_model_get_iter(GTK_TREE_MODEL(web_store), &next_iter, next_path)) { my_gtk_tree_store_swap(web_store, &iter, &next_iter); } gtk_tree_path_free(path); gtk_tree_path_free(next_path); LOG(LOG_DEBUG, "OUT : down_item()"); return; } static void remove_item(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_item()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { edited = FALSE; gtk_tree_store_remove(GTK_TREE_STORE(web_store), &iter); } LOG(LOG_DEBUG, "OUT : remove_item()"); } static void add_group(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; gchar *name; LOG(LOG_DEBUG, "IN : add_group()"); name = (gchar *)gtk_entry_get_text(GTK_ENTRY(entry_group_name)); name = g_strdup(name); remove_space(name); if(strlen(name) == 0){ return; } gtk_tree_store_append(GTK_TREE_STORE(web_store), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(web_store), &iter, WEB_TYPE_COLUMN, 0, WEB_TITLE_COLUMN, name, -1); gtk_entry_set_text(GTK_ENTRY(entry_group_name), ""); g_free(name); LOG(LOG_DEBUG, "OUT : add_group()"); } static void add_engine(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; GtkTreeSelection *selection; GtkTreeIter child_iter; gint type; const gchar *title; const gchar *home; const gchar *pre; const gchar *post; const gchar *glue; const gchar *code; LOG(LOG_DEBUG, "IN : add_engine()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select group.")); LOG(LOG_DEBUG, "OUT : add_engine()"); return; } title = gtk_entry_get_text(GTK_ENTRY(entry_engine_name)); home = gtk_entry_get_text(GTK_ENTRY(entry_engine_home)); pre = gtk_entry_get_text(GTK_ENTRY(entry_engine_pre)); post = gtk_entry_get_text(GTK_ENTRY(entry_engine_post)); glue = gtk_entry_get_text(GTK_ENTRY(entry_engine_glue)); code = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_charcode)->entry)); gtk_tree_model_get(GTK_TREE_MODEL(web_store), &iter, DICT_TYPE_COLUMN, &type, -1); if(type == 0){ gtk_tree_store_append(web_store, &child_iter, &iter); } else { gtk_tree_store_insert_after(web_store, &child_iter, NULL, &iter); } gtk_tree_store_set(web_store, &child_iter, WEB_TYPE_COLUMN, 1, WEB_TITLE_COLUMN, title, WEB_HOME_COLUMN, home, WEB_PRE_COLUMN, pre, WEB_POST_COLUMN, post, WEB_GLUE_COLUMN, glue, WEB_CODE_COLUMN, code, -1); edited = FALSE; LOG(LOG_DEBUG, "OUT : add_engine()"); } static void web_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; gint type; gchar *title; gchar *home; gchar *pre; gchar *post; gchar *glue; gchar *code; LOG(LOG_DEBUG, "IN : web_selection_changed()"); if(rewinding == TRUE){ rewinding = FALSE; goto END; } else { if(update_last_engine() == FALSE) goto END; } if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { //popup_warning(_("Please select group.")); LOG(LOG_DEBUG, "OUT : web_selection_changed()"); return; } gtk_tree_model_get(GTK_TREE_MODEL(web_store), &iter, WEB_TYPE_COLUMN, &type, WEB_TITLE_COLUMN, &title, WEB_HOME_COLUMN, &home, WEB_PRE_COLUMN, &pre, WEB_POST_COLUMN, &post, WEB_GLUE_COLUMN, &glue, WEB_CODE_COLUMN, &code, -1); if(type == 0) goto END; if(title != NULL) gtk_entry_set_text(GTK_ENTRY(entry_engine_name), title); else gtk_entry_set_text(GTK_ENTRY(entry_engine_name), ""); if(home != NULL) gtk_entry_set_text(GTK_ENTRY(entry_engine_home), home); else gtk_entry_set_text(GTK_ENTRY(entry_engine_home), ""); if(pre != NULL) gtk_entry_set_text(GTK_ENTRY(entry_engine_pre), pre); else gtk_entry_set_text(GTK_ENTRY(entry_engine_pre), ""); if(post != NULL) gtk_entry_set_text(GTK_ENTRY(entry_engine_post), post); else gtk_entry_set_text(GTK_ENTRY(entry_engine_post), ""); if(glue != NULL) gtk_entry_set_text(GTK_ENTRY(entry_engine_glue), glue); else gtk_entry_set_text(GTK_ENTRY(entry_engine_glue), ""); if(code != NULL) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_charcode)->entry), code); else gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_charcode)->entry), "iso-2022-jp"); gtk_tree_selection_get_selected(selection, NULL, &last_iter); edited = TRUE; END: g_free(title); g_free(home); g_free(pre); g_free(post); g_free(glue); g_free(code); LOG(LOG_DEBUG, "OUT : web_selection_changed()"); } static gboolean update_last_engine() { GtkTreeSelection *select; const gchar *title; const gchar *home; const gchar *pre; const gchar *post; const gchar *glue; const gchar *code; LOG(LOG_DEBUG, "IN : update_last_engine()"); if(edited != TRUE) goto END; if(popup_active()) goto END; title = gtk_entry_get_text(GTK_ENTRY(entry_engine_name)); if(!title || (strlen(title) == 0)) { popup_warning(_("Please specify name")); goto FAILED; } home = gtk_entry_get_text(GTK_ENTRY(entry_engine_home)); pre = gtk_entry_get_text(GTK_ENTRY(entry_engine_pre)); if(!pre || (strlen(pre) == 0)) { popup_warning(_("Please specify pre string")); goto FAILED; } post = gtk_entry_get_text(GTK_ENTRY(entry_engine_post)); glue = gtk_entry_get_text(GTK_ENTRY(entry_engine_glue)); code = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_charcode)->entry)); gtk_tree_store_set(web_store, &last_iter, WEB_TITLE_COLUMN, title, WEB_HOME_COLUMN, home, WEB_PRE_COLUMN, pre, WEB_POST_COLUMN, post, WEB_GLUE_COLUMN, glue, WEB_CODE_COLUMN, code, -1); END: LOG(LOG_DEBUG, "OUT : updaet_last_engine() = TRUE"); return(TRUE); FAILED: rewinding = TRUE; select = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); gtk_tree_selection_select_iter(select, &last_iter); LOG(LOG_DEBUG, "OUT : update_last_engine() = FALSE"); return(FALSE); } static gboolean drag_data_received(GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data) { LOG(LOG_DEBUG, "IN : drag_data_received()"); edited = FALSE; LOG(LOG_DEBUG, "OUT : drag_data_received()"); return(FALSE); } GtkWidget *pref_start_weblist() { GtkWidget *button; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *vbox; GtkWidget *label; GtkWidget *frame; GtkWidget *scroll; GtkWidget *table; GtkAttachOptions xoption, yoption; GList *charcode_list=NULL; GtkSizeGroup *entry_group; GtkTreeSelection *select; GtkCellRenderer *renderer; LOG(LOG_DEBUG, "IN : pref_start_weblist()"); hbox = gtk_hbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); frame = gtk_frame_new(_("Search engines")); gtk_box_pack_start (GTK_BOX(hbox), frame,TRUE, TRUE, 5); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_container_add(GTK_CONTAINER(frame), vbox); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX(vbox) , scroll,TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); web_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(web_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(web_view), FALSE); gtk_tree_view_expand_all(GTK_TREE_VIEW(web_view)); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(web_view), TRUE); gtk_container_add (GTK_CONTAINER (scroll), web_view); select = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK (web_selection_changed), NULL); g_signal_connect(G_OBJECT(web_view), "drag_data_received", G_CALLBACK(drag_data_received), NULL); renderer = gtk_cell_renderer_text_new(); /* column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", DICT_TITLE_COLUMN, "editable", DICT_EDITABLE_COLUMN, NULL); */ gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(web_view), -1, "Title", renderer, "text", WEB_TITLE_COLUMN, NULL); // gtk_tree_view_append_column (GTK_TREE_VIEW (web_view), column); hbox2 = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 2); gtk_box_pack_start(GTK_BOX(vbox), hbox2,FALSE, FALSE, 0); label = gtk_label_new(_("Group name")); gtk_box_pack_start(GTK_BOX(hbox2), label,FALSE, FALSE, 2); entry_group_name = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox2), entry_group_name,TRUE, TRUE, 0); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_end(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_group), (gpointer)button); hbox2 = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 2); gtk_box_pack_start(GTK_BOX(vbox), hbox2,FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(remove_item), (gpointer)button); button = gtk_button_new_with_label(_("Up")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(up_item), (gpointer)button); button = gtk_button_new_with_label(_("Down")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(down_item), (gpointer)button); frame = gtk_frame_new(_("Search engine")); gtk_box_pack_start(GTK_BOX(hbox), frame,TRUE, TRUE, 5); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_container_add(GTK_CONTAINER(frame), vbox); entry_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); xoption = GTK_EXPAND | GTK_SHRINK; yoption = GTK_EXPAND | GTK_SHRINK; table = gtk_table_new(6, 2, FALSE); gtk_box_pack_start(GTK_BOX(vbox), table,FALSE, FALSE, 0); label = gtk_label_new(_("Name")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, xoption, yoption, 5, 5); entry_engine_name = gtk_entry_new(); // gtk_widget_set_usize(entry_engine_name,250,20); gtk_table_attach(GTK_TABLE(table), entry_engine_name, 1, 2, 0, 1, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, entry_engine_name); label = gtk_label_new(_("Homepage")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, xoption, yoption, 5, 5); entry_engine_home = gtk_entry_new(); // gtk_widget_set_usize(entry_engine_home,250,20); gtk_table_attach(GTK_TABLE(table), entry_engine_home, 1, 2, 1, 2, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, entry_engine_home); label = gtk_label_new(_("Pre string")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, xoption, yoption, 5, 5); entry_engine_pre = gtk_entry_new(); // gtk_widget_set_usize(entry_engine_pre,250,20); gtk_table_attach(GTK_TABLE(table), entry_engine_pre, 1, 2, 2, 3, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, entry_engine_pre); label = gtk_label_new(_("Post string")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, xoption, yoption, 5, 5); entry_engine_post = gtk_entry_new(); // gtk_widget_set_usize(entry_engine_post,250,20); gtk_table_attach(GTK_TABLE(table), entry_engine_post, 1, 2, 3, 4, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, entry_engine_post); label = gtk_label_new(_("Glue string")); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, xoption, yoption, 5, 5); entry_engine_glue = gtk_entry_new(); // gtk_widget_set_usize(entry_engine_glue,250,20); gtk_table_attach(GTK_TABLE(table), entry_engine_glue, 1, 2, 4, 5, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, entry_engine_glue); label = gtk_label_new(_("Character Code")); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, xoption, yoption, 5, 5); combo_charcode = gtk_combo_new(); // gtk_widget_set_usize(GTK_WIDGET(combo_charcode), 250, 20); gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(combo_charcode)->entry), FALSE); gtk_table_attach(GTK_TABLE(table), combo_charcode, 1, 2, 5, 6, xoption, yoption, 5, 5); gtk_size_group_add_widget (entry_group, combo_charcode); charcode_list = g_list_append(charcode_list, "euc-jp"); charcode_list = g_list_append(charcode_list, "shift_jis"); charcode_list = g_list_append(charcode_list, "iso-2022-jp"); charcode_list = g_list_append(charcode_list, "utf-8"); charcode_list = g_list_append(charcode_list, "ascii"); gtk_combo_set_popdown_strings(GTK_COMBO(combo_charcode), charcode_list) ; hbox2 = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 5); gtk_box_pack_start(GTK_BOX(vbox), hbox2,FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_engine), (gpointer)button); /* button = gtk_button_new_with_label(_("Change")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(change_engine), (gpointer)button); */ LOG(LOG_DEBUG, "OUT : pref_start_weblist()"); return(hbox); } ebview-0.3.6.2/src/websearch.h0000644000175000017500000000163010013675516015366 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __WEBSEARCH_H__ #define __WEBSEARCH_H__ #include "defs.h" void web_search(); GtkWidget *create_web_tree(); #endif /* __WEBSEARCH_H__ */ ebview-0.3.6.2/src/render.h0000644000175000017500000000202110013675516014675 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __RENDER_H__ #define __RENDER_H__ #include "defs.h" void draw_content(CANVAS *canvas, DRAW_TEXT *text, BOOK_INFO *binfo, TAG *link, gchar *word); GdkPixbuf *load_xbm(BOOK_INFO *binfo, gchar *name, gint *w, gint *h, gchar *color); #endif /* __RENDER_H__ */ ebview-0.3.6.2/src/websearch.c0000644000175000017500000001662010013675516015366 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "statusbar.h" #include "dialog.h" #include "jcode.h" #include "eb.h" #include "external.h" #ifndef __WIN32__ #include #include #endif #define MAX_ENGINES 100 void go_home(); void web_search(); static GtkWidget *weblist_view; //static GtkCTreeNode *current_node; static GtkItemFactory *tree_item_factory; static GtkItemFactoryEntry tree_menu_items[] = { { N_("/Go Home"), NULL, go_home, 0, NULL }, { N_("/Search"), NULL, web_search, 0, NULL }, }; extern GdkPixmap *book_open_pixmap; extern GdkPixmap *book_closed_pixmap; extern GdkBitmap *book_open_mask; extern GdkBitmap *book_closed_mask; extern GtkWidget *dict_viewport; extern GtkWidget *dict_scroll; extern GtkWidget *progress_web; extern GList *web_list; struct _engine { gchar *group; gchar *title; gchar *url; gchar *delimit; gchar *rest; }; struct _engine engines[MAX_ENGINES]; static unsigned char *codeconv(unsigned char *str, const char *ocode) { g_assert(str != NULL); if(ocode == NULL) return(strdup(str)); if((strcmp(ocode, "euc-jp") != 0) && (strcmp(ocode, "shift_jis") != 0) && (strcmp(ocode, "iso-2022-jp") != 0) && (strcmp(ocode, "utf-8") != 0)) return(strdup(str)); return(iconv_convert("utf-8", ocode, str)); } //void do_web_search(GtkWidget *widget, gpointer data){ void web_search() { gchar url[512]; gint i, j; unsigned char c; gchar *keywords[EB_MAX_KEYWORDS + 1]; unsigned char *kanji_str; const char *word; GtkTreeIter iter; GtkTreeSelection *selection; gint type; gchar *pre; gchar *post; gchar *glue; gchar *code; word = gtk_entry_get_text(GTK_ENTRY(word_entry)); if(strlen(word) == 0){ popup_warning(_("Please enter search word.")); return; } selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(weblist_view)); if ((gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) || (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(web_store), &iter))) { popup_warning(_("Please select web site")); return; } gtk_tree_model_get (GTK_TREE_MODEL(web_store), &iter, WEB_TYPE_COLUMN, &type, WEB_PRE_COLUMN, &pre, WEB_POST_COLUMN, &post, WEB_GLUE_COLUMN, &glue, WEB_CODE_COLUMN, &code, -1); if(type == 0){ } split_word(word, keywords); status_message("Lanuching web browser..."); url[0] = '\0'; strcat(url, pre); for(i=0 ; ; i++){ if(keywords[i] == NULL) break; if((i != 0) && (glue)) strcat(url, glue); if(strcmp(code, "ascii") == 0) { sprintf(url, "%s%s", url, keywords[i]); } else { kanji_str = codeconv(keywords[i], code); for(j=0 ; j < strlen(kanji_str) ; j ++){ c = kanji_str[j]; sprintf(url, "%s%%%02X", url, c); } free(kanji_str); } } if(post) strcat(url, post); launch_web_browser(url); g_free(pre); g_free(post); g_free(glue); g_free(code); } void go_home() { GtkTreeIter iter; GtkTreeSelection *selection; gchar *home; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(weblist_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select web site")); return; } gtk_tree_model_get (GTK_TREE_MODEL(web_store), &iter, WEB_HOME_COLUMN, &home, -1); launch_web_browser(home); g_free(home); } static void weblist_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gint type; gchar *title; LOG(LOG_DEBUG, "IN :weblist_selection_changed"); if (gtk_tree_selection_get_selected(selection, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : weblist_selection_changed"); return; } gtk_tree_model_get (model, &iter, WEB_TYPE_COLUMN, &type, -1); gtk_tree_model_get (model, &iter, WEB_TITLE_COLUMN, &title, -1); g_free (title); if(type == 1){ // } LOG(LOG_DEBUG, "OUT : web_selection_changed"); } static gint button_press_event(GtkWidget *widget, GdkEventButton *event) { LOG(LOG_DEBUG, "IN : button_press_event()"); //KENKEN if ((event->type == GDK_BUTTON_PRESS) && ((event->button == 2) || (event->button == 3))){ gtk_item_factory_popup (GTK_ITEM_FACTORY (tree_item_factory), event->x_root, event->y_root, event->button, event->time); return(TRUE); } else if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1)){ GtkTreeIter iter; GtkTreeSelection *selection; GtkTreePath *path; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(weblist_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { return(TRUE); } path = gtk_tree_model_get_path(GTK_TREE_MODEL(web_store), &iter); if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(web_store), &iter) == TRUE){ if(gtk_tree_view_row_expanded(GTK_TREE_VIEW(weblist_view), path)){ gtk_tree_view_collapse_row(GTK_TREE_VIEW(weblist_view), path); } else { gtk_tree_view_expand_row(GTK_TREE_VIEW(weblist_view), path, FALSE); } } else { web_search(); } gtk_tree_path_free(path); } LOG(LOG_DEBUG, "OUT : button_press_event() = FALSE"); return(FALSE); } GtkWidget *create_web_tree() { GtkWidget *web_box; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; gint nmenu_items; gint i; LOG(LOG_DEBUG, "IN : create_web_tree()"); web_box = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (web_box), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); weblist_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(web_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(weblist_view), FALSE); gtk_container_add (GTK_CONTAINER (web_box), weblist_view); g_signal_connect(G_OBJECT(weblist_view),"button_press_event", G_CALLBACK(button_press_event), (gpointer)NULL); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", WEB_TITLE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (weblist_view), column); select = gtk_tree_view_get_selection (GTK_TREE_VIEW (weblist_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); /* g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (weblist_selection_changed), NULL); */ nmenu_items = sizeof (tree_menu_items) / sizeof (tree_menu_items[0]); for(i=0 ; i", NULL); gtk_item_factory_create_items (tree_item_factory, nmenu_items, tree_menu_items, NULL); LOG(LOG_DEBUG, "OUT : create_web_tree()"); return(web_box); } ebview-0.3.6.2/src/pref_selection.c0000644000175000017500000002155110013675516016423 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" static GtkWidget *spin_interval; static GtkWidget *spin_minchar; static GtkWidget *spin_maxchar; static GtkWidget *spin_popup_width; static GtkWidget *spin_popup_height; static GtkWidget *check_beep; static GtkWidget *check_popup_title; gboolean pref_end_selection(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : pref_end_selection()"); auto_interval = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_interval)); auto_minchar = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_minchar)); auto_maxchar = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_maxchar)); popup_width = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_popup_width)); popup_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_popup_height)); bbeep_on_nohit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_beep)); bshow_popup_title = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_popup_title)); LOG(LOG_DEBUG, "OUT : pref_end_selection()"); return(TRUE); } GtkWidget *pref_start_selection() { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkObject *adj; GtkWidget *table; GtkAttachOptions xoption=GTK_SHRINK|GTK_FILL, yoption=0; LOG(LOG_DEBUG, "IN : pref_start_selection()"); vbox = gtk_vbox_new(FALSE,10); gtk_widget_set_size_request(vbox, 400, 300); table = gtk_table_new(4, 8, FALSE); gtk_box_pack_start (GTK_BOX(vbox) , table, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1, xoption, yoption, 10, 10); label = gtk_label_new(_("Lookup interval (ms)")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); adj = gtk_adjustment_new( 1000, //value 10, // lower 10000, //upper 100, // step increment 1000,// page_increment, (gfloat)0.0); spin_interval = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_interval), auto_interval ); gtk_widget_set_size_request(spin_interval,60,20); // gtk_box_pack_end (GTK_BOX(hbox), spin_interval, FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), spin_interval, 3, 4, 0, 1, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_interval, _("Interval to check selection. \nIncreasing this number may eat up your CPU.\nIgnored on Windows."), "Private"); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 1, 2, xoption, yoption, 10, 10); label = gtk_label_new(_("Minimum chars for selection lookup")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); adj = gtk_adjustment_new( 3, //value 0, // lower 10, //upper 1, // step increment 5,// page_increment, (gfloat)0.0); spin_minchar = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_minchar), auto_minchar ); gtk_widget_set_size_request(spin_minchar,60,20); // gtk_box_pack_end (GTK_BOX(hbox), spin_minchar, FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), spin_minchar, 3, 4, 1, 2, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_minchar, _("When the number of characters in selection is less than this number, it will not be looked up."), "Private"); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 2, 3, xoption, yoption, 10, 10); // gtk_box_pack_start (GTK_BOX(vbox) // , hbox,FALSE, FALSE, 0); label = gtk_label_new(_("Maximum chars for automatic lookup")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); adj = gtk_adjustment_new(100, //value 1, // lower 1000, //upper 1, // step increment 10,// page_increment, (gfloat)0.0); spin_maxchar = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_maxchar), auto_maxchar ); gtk_widget_set_size_request(spin_maxchar,60,20); // gtk_box_pack_end (GTK_BOX(hbox), spin_maxchar, FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), spin_maxchar, 3, 4, 2, 3, xoption, yoption, 10, 10); gtk_tooltips_set_tip(tooltip, spin_maxchar, _("When the number of characters in selection is larger than this number, it will not be looked up."), "Private"); hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 3, 4, xoption, yoption, 10, 10); // gtk_box_pack_start (GTK_BOX(vbox) // , hbox,FALSE, FALSE, 0); label = gtk_label_new(_("Popup window size")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); gtk_box_pack_start (GTK_BOX(hbox), label,FALSE, FALSE, 0); adj = gtk_adjustment_new(100, //value 1, // lower 1024, //upper 10, // step increment 10,// page_increment, (gfloat)0.0); spin_popup_height = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_popup_height), popup_height ); gtk_widget_set_size_request(spin_popup_height,60,20); // gtk_box_pack_end (GTK_BOX(hbox), spin_popup_height, FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), spin_popup_height, 1, 2, 3, 4, xoption, yoption, 10, 10); label = gtk_label_new(" x "); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); // gtk_widget_set_size_request( label, 120, 20 ); // gtk_box_pack_end(GTK_BOX(hbox), label,FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), label, 2, 3, 3, 4, xoption, yoption, 10, 10); adj = gtk_adjustment_new(100, //value 1, // lower 1024, //upper 10, // step increment 10,// page_increment, (gfloat)0.0); spin_popup_width = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_popup_width), popup_width ); gtk_widget_set_size_request(spin_popup_width,60,20); // gtk_box_pack_end(GTK_BOX(hbox), spin_popup_width, FALSE, FALSE, 0); gtk_table_attach(GTK_TABLE(table), spin_popup_width, 3, 4, 3, 4, xoption, yoption, 10, 10); /* hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 0); */ check_popup_title = gtk_check_button_new_with_label(_("Show popup title")); gtk_tooltips_set_tip(tooltip, check_popup_title, _("Show title of popup window."),"Private"); // gtk_box_pack_start (GTK_BOX(hbox) // , check_popup_title,FALSE,FALSE, 0); gtk_table_attach(GTK_TABLE(table), check_popup_title, 0, 1, 4, 5, xoption, yoption, 10, 10); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_popup_title), bshow_popup_title); /* hbox = gtk_hbox_new(FALSE,10); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 0); */ check_beep = gtk_check_button_new_with_label(_("Beep on no hit")); gtk_tooltips_set_tip(tooltip, check_beep, _("Beep when no hit."),"Private"); // gtk_box_pack_start (GTK_BOX(hbox) // , check_beep,FALSE,FALSE, 0); gtk_table_attach(GTK_TABLE(table), check_beep, 0, 1, 5, 6, xoption, yoption, 10, 10); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_beep), bbeep_on_nohit); LOG(LOG_DEBUG, "OUT : pref_start_selection()"); return(vbox); } ebview-0.3.6.2/src/hook.c0000644000175000017500000005720211241635664014370 0ustar mhattamhatta/* Copyright (C) 2001-2003 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" EB_Hookset text_hookset; EB_Hookset heading_hookset; EB_Hookset candidate_hookset; static EB_Error_Code hook_nop(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_initialize(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_narrow_font(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_wide_font(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_indent(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_newline(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_no_newline(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_reference(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_candidate(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_narrow(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_superscript(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_subscript(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_emphasis(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_keyword(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_modification(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_euc_to_ascii(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_color(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_mono(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_gray(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_wave(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_mpeg(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Error_Code hook_graphic_reference(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv); static EB_Hook text_hooks[] = { // {EB_HOOK_INITIALIZE, hook_initialize}, // {EB_HOOK_STOP_CODE, eb_hook_stop_code}, // {EB_HOOK_STOP_CODE, hook_stopcode}, {EB_HOOK_SET_INDENT, hook_indent}, {EB_HOOK_NEWLINE, hook_newline}, {EB_HOOK_NARROW_FONT, hook_narrow_font}, {EB_HOOK_WIDE_FONT, hook_wide_font}, {EB_HOOK_BEGIN_REFERENCE, hook_reference}, {EB_HOOK_END_REFERENCE, hook_reference}, {EB_HOOK_BEGIN_CANDIDATE, hook_candidate}, {EB_HOOK_END_CANDIDATE_LEAF, hook_candidate}, {EB_HOOK_END_CANDIDATE_GROUP, hook_candidate}, // {EB_HOOK_NARROW_JISX0208, hook_euc_to_ascii}, {EB_HOOK_BEGIN_COLOR_BMP, hook_color}, {EB_HOOK_BEGIN_COLOR_JPEG, hook_color}, {EB_HOOK_END_COLOR_GRAPHIC, hook_color}, {EB_HOOK_BEGIN_MONO_GRAPHIC, hook_mono}, {EB_HOOK_END_MONO_GRAPHIC, hook_mono}, {EB_HOOK_BEGIN_GRAY_GRAPHIC, hook_gray}, {EB_HOOK_END_GRAY_GRAPHIC, hook_gray}, {EB_HOOK_BEGIN_WAVE, hook_wave}, {EB_HOOK_END_WAVE, hook_wave}, {EB_HOOK_BEGIN_MPEG, hook_mpeg}, {EB_HOOK_END_MPEG, hook_mpeg}, // {EB_HOOK_BEGIN_GRAPHIC_REFERENCE,hook_graphic_reference}, // {EB_HOOK_END_GRAPHIC_REFERENCE, hook_graphic_reference}, // {EB_HOOK_GRAPHIC_REFERENCE, hook_graphic_reference}, // {EB_HOOK_BEGIN_NO_NEWLINE, hook_no_newline}, // {EB_HOOK_END_NO_NEWLINE, hook_no_newline}, // {EB_HOOK_BEGIN_NARROW, hook_narrow}, // {EB_HOOK_END_NARROW, hook_narrow}, {EB_HOOK_BEGIN_SUPERSCRIPT, hook_superscript}, {EB_HOOK_END_SUPERSCRIPT, hook_superscript}, {EB_HOOK_BEGIN_SUBSCRIPT, hook_subscript}, {EB_HOOK_END_SUBSCRIPT, hook_subscript}, {EB_HOOK_BEGIN_EMPHASIS, hook_emphasis}, {EB_HOOK_END_EMPHASIS, hook_emphasis}, {EB_HOOK_BEGIN_KEYWORD, hook_keyword}, {EB_HOOK_END_KEYWORD, hook_keyword}, #ifdef EB_HOOK_BEGIN_DECORATION {EB_HOOK_BEGIN_DECORATION, hook_modification}, #endif #ifdef EB_HOOK_END_DECORATION {EB_HOOK_END_DECORATION, hook_modification}, #endif {EB_HOOK_NULL, NULL}, }; static EB_Hook heading_hooks[] = { {EB_HOOK_NEWLINE, hook_newline}, {EB_HOOK_NARROW_FONT, hook_narrow_font}, {EB_HOOK_WIDE_FONT, hook_wide_font}, // {EB_HOOK_BEGIN_CANDIDATE, hook_candidate}, // {EB_HOOK_END_CANDIDATE_LEAF, hook_candidate}, // {EB_HOOK_END_CANDIDATE_GROUP, hook_candidate}, {EB_HOOK_NARROW_JISX0208, eb_hook_euc_to_ascii}, {EB_HOOK_BEGIN_SUPERSCRIPT, hook_superscript}, {EB_HOOK_END_SUPERSCRIPT, hook_superscript}, {EB_HOOK_BEGIN_SUBSCRIPT, hook_subscript}, {EB_HOOK_END_SUBSCRIPT, hook_subscript}, {EB_HOOK_NULL, NULL}, }; static EB_Hook candidate_hooks[] = { {EB_HOOK_NARROW_FONT, hook_narrow_font}, {EB_HOOK_WIDE_FONT, hook_wide_font}, {EB_HOOK_BEGIN_CANDIDATE, hook_candidate}, {EB_HOOK_END_CANDIDATE_LEAF, hook_candidate}, {EB_HOOK_END_CANDIDATE_GROUP, hook_candidate}, {EB_HOOK_NULL, NULL}, }; gint hook_level = -1; EB_Hook_Code hook_stack[256]; static void push_hook_stack(EB_Hook_Code code) { if(hook_level >= 255) { // Nest too deep return; } hook_level ++; hook_stack[hook_level] = code; } static gboolean check_hook_stack(EB_Hook_Code code) { if(hook_level >= 255) { // Nest too deep return(TRUE); } if(hook_stack[hook_level] == code) return(TRUE); LOG(LOG_INFO, "hook_stack unmatch : %d != %d", hook_stack[hook_level], code); return(FALSE); } static void pop_hook_stack() { if(hook_level == -1) return; hook_level --; } static EB_Error_Code hook_nop(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { return EB_SUCCESS; } static EB_Error_Code hook_initialize(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { return EB_SUCCESS; } static EB_Error_Code hook_narrow_font(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { char text[64]; sprintf (text, "", argv[0]); eb_write_text_string(book, text); return EB_SUCCESS; } static EB_Error_Code hook_wide_font(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { char text[64]; sprintf (text, "", argv[0]); eb_write_text_string(book, text); return EB_SUCCESS; } static EB_Error_Code hook_indent(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { char text[64]; sprintf (text, "", argv[1]); eb_write_text_string(book, text); /* for(i = 0 ; i < argv[1] ; i ++){ eb_write_text_string(book, " "); } */ return EB_SUCCESS; } static EB_Error_Code hook_newline(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { eb_write_text_string(book, "\n"); return EB_SUCCESS; } static EB_Error_Code hook_narrow(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { switch (code) { case EB_HOOK_BEGIN_NARROW: // eb_write_text_string(book, ""); break; case EB_HOOK_END_NARROW: // eb_write_text_string(book, ""); break; } return EB_SUCCESS; } static EB_Error_Code hook_no_newline(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { switch (code) { case EB_HOOK_BEGIN_NO_NEWLINE: // eb_write_text_string(book, ""); break; case EB_HOOK_END_NO_NEWLINE: // eb_write_text_string(book, ""); break; } return EB_SUCCESS; } static EB_Error_Code hook_reference(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_REFERENCE: sprintf (text, ""); eb_write_text_string(book, text); break; case EB_HOOK_END_REFERENCE: sprintf (text, "", argv[1], argv[2]); eb_write_text_string(book, text); break; } return EB_SUCCESS; } static EB_Error_Code hook_candidate(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_CANDIDATE: eb_write_text_string(book, ""); break; case EB_HOOK_END_CANDIDATE_LEAF: sprintf (text, ""); eb_write_text_string(book, text); break; case EB_HOOK_END_CANDIDATE_GROUP: sprintf (text, "", argv[1], argv[2]); eb_write_text_string(book, text); break; } return EB_SUCCESS; } static EB_Error_Code hook_superscript(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_SUPERSCRIPT: eb_write_text_string(book, ""); push_hook_stack(code); break; case EB_HOOK_END_SUPERSCRIPT: if(check_hook_stack(EB_HOOK_BEGIN_SUPERSCRIPT) == TRUE) { sprintf (text, ""); eb_write_text_string(book, text); pop_hook_stack(); } break; } return EB_SUCCESS; } static EB_Error_Code hook_subscript(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_SUBSCRIPT: eb_write_text_string(book, ""); push_hook_stack(code); break; case EB_HOOK_END_SUBSCRIPT: if(check_hook_stack(EB_HOOK_BEGIN_SUBSCRIPT) == TRUE) { sprintf (text, ""); eb_write_text_string(book, text); pop_hook_stack(); } break; } return EB_SUCCESS; } static EB_Error_Code hook_emphasis(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_EMPHASIS: eb_write_text_string(book, ""); push_hook_stack(code); break; case EB_HOOK_END_EMPHASIS: if(check_hook_stack(EB_HOOK_BEGIN_EMPHASIS) == TRUE) { sprintf (text, ""); eb_write_text_string(book, text); pop_hook_stack(); } break; } return EB_SUCCESS; } static EB_Error_Code hook_keyword(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_KEYWORD: sprintf (text, "", argv[1]); eb_write_text_string(book, text); push_hook_stack(code); break; case EB_HOOK_END_KEYWORD: if(check_hook_stack(EB_HOOK_BEGIN_KEYWORD) == TRUE) { sprintf (text, ""); eb_write_text_string(book, text); pop_hook_stack(); } break; } return EB_SUCCESS; } static EB_Error_Code hook_modification(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; #ifdef EB_HOOK_BEGIN_DECORATION #ifdef EB_HOOK_END_DECORATION switch (code) { case EB_HOOK_BEGIN_DECORATION: sprintf (text, "", argv[1]); eb_write_text_string(book, text); push_hook_stack(code); break; case EB_HOOK_END_DECORATION: if(check_hook_stack(EB_HOOK_BEGIN_DECORATION) == TRUE) { sprintf (text, ""); eb_write_text_string(book, text); pop_hook_stack(); } break; } #endif #endif return EB_SUCCESS; } /* * Hook for a reference to color graphic data. */ static EB_Error_Code hook_color(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_COLOR_JPEG: sprintf (text, "", argv[2], argv[3]); eb_write_text_string(book, text); break; case EB_HOOK_BEGIN_COLOR_BMP: sprintf (text, "", argv[2], argv[3]); eb_write_text_string(book, text); break; /* case EB_HOOK_END_COLOR_GRAPHIC: sprintf (text, "", argv[2], argv[3]); eb_write_text_string(book, text); break; */ } return EB_SUCCESS; } /* * Hook for a reference to MONO graphic data. */ static EB_Error_Code hook_mono(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_MONO_GRAPHIC: // argv[2] : height // argv[3] : width sprintf (text, "", argv[3], argv[2]); eb_write_text_string(book, text); break; case EB_HOOK_END_MONO_GRAPHIC: // argv[1] : block // argv[2] : offset sprintf (text, "", argv[1], argv[2]); eb_write_text_string(book, text); break; } return EB_SUCCESS; } /* * Hook for a reference to GRAY graphic data. */ static EB_Error_Code hook_gray(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { gchar text[64]; switch (code) { case EB_HOOK_BEGIN_GRAY_GRAPHIC: sprintf (text, "", argv[2], argv[3]); eb_write_text_string(book, text); break; /* case EB_HOOK_END_GRAY_GRAPHIC: sprintf (text, "", argv[2], argv[3]); eb_write_text_string(book, text); break; */ } return EB_SUCCESS; } /* * Hook for a reference to WAVE sound data. */ static EB_Error_Code hook_wave(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { off_t start_location; off_t end_location; size_t data_size; gchar text[64]; /* * Set binary context. */ start_location = (off_t)(argv[2] - 1) * EB_SIZE_PAGE + argv[3]; end_location = (off_t)(argv[4] - 1) * EB_SIZE_PAGE + argv[5]; data_size = end_location - start_location; switch (code) { case EB_HOOK_BEGIN_WAVE: eb_write_text_string(book, ""); break; case EB_HOOK_END_WAVE: sprintf (text, "", argv[2], argv[3], (long unsigned int) data_size); eb_write_text_string(book, text); break; } return EB_SUCCESS; } /* * Hook for a reference to MPEG sound data. */ static EB_Error_Code hook_mpeg(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { char file_name[EB_MAX_DIRECTORY_NAME_LENGTH + 1]; char text[256]; switch (code) { case EB_HOOK_BEGIN_MPEG: break; case EB_HOOK_END_MPEG: if (eb_compose_movie_file_name(argv + 2, file_name) != EB_SUCCESS) return EB_SUCCESS; sprintf(text, "", file_name); eb_write_text_string(book, text); break; } return EB_SUCCESS; } /* * Hook for a reference to graphic reference. */ static EB_Error_Code hook_graphic_reference(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { char text[256]; switch (code) { case EB_HOOK_GRAPHIC_REFERENCE: case EB_HOOK_BEGIN_GRAPHIC_REFERENCE: sprintf (text, "", argv[1], argv[2]); eb_write_text_string(book, text); break; case EB_HOOK_END_GRAPHIC_REFERENCE: break; } return EB_SUCCESS; } /* * EUC JP to ASCII conversion table. */ #define EUC_TO_ASCII_TABLE_START 0xa0 #define EUC_TO_ASCII_TABLE_END 0xff static const unsigned char euc_a1_to_ascii_table[] = { 0x00, 0x20, 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x3a, /* 0xa0 */ 0x3b, 0x3f, 0x21, 0x00, 0x00, 0x00, 0x60, 0x00, /* 0xa8 */ 0x5e, 0x7e, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x2f, /* 0xb8 */ 0x5c, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x27, /* 0xc0 */ 0x00, 0x22, 0x28, 0x29, 0x00, 0x00, 0x5b, 0x5d, /* 0xc8 */ 0x7b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0 */ 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2d, 0x00, 0x00, /* 0xd8 */ 0x00, 0x3d, 0x00, 0x3c, 0x3e, 0x00, 0x00, 0x00, /* 0xe0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, /* 0xe8 */ 0x24, 0x00, 0x00, 0x25, 0x23, 0x26, 0x2a, 0x40, /* 0xf0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ }; static const unsigned char euc_a3_to_ascii_table[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8 */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0xb0 */ 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8 */ 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0xc0 */ 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0xc8 */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0xd0 */ 0x58, 0x59, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8 */ 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0xe0 */ 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0xe8 */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0xf0 */ 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xf8 */ }; /* * Latin-1 character to entity reference table. * (e.g. 'a --> á) */ const char *latin1_entity_name_table[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x00 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x08 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x10 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x18 */ NULL, NULL, "quot", NULL, NULL, NULL, "amp", NULL, /* 0x20 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x28 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x30 */ NULL, NULL, NULL, NULL, "lt", NULL, "gt", NULL, /* 0x38 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x40 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x48 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x50 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x58 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x60 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x68 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x70 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x78 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x80 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x88 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x90 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x98 */ "nbsp", "iexcl", "cent", "pound", /* 0xa0 */ "curren", "yen", "brvbar", "sect", /* 0xa4 */ "uml", "copy", "ordf", "laquo", /* 0xa8 */ "not", "shy", "reg", "macr", /* 0xac */ "deg", "plusmn", "sup2", "sup3", /* 0xb0 */ "acute", "micro", "para", "middot", /* 0xb4 */ "cedil", "sup1", "ordm", "requo", /* 0xb8 */ "frac14", "frac12", "farc34", "iquest", /* 0xbc */ "Agrave", "Aacute", "Acirc", "Atilde", /* 0xc0 */ "Auml", "Aring", "AElig", "Ccedil", /* 0xc4 */ "Egrave", "Eacute", "Ecirc", "Euml", /* 0xc8 */ "Igrave", "Iacute", "Icirc", "Iuml", /* 0xcc */ "ETH", "Ntilde", "Ograve", "Oacute", /* 0xd0 */ "Ocirc", "Otilde", "Ouml", "times", /* 0xd4 */ "Oslash", "Ugrave", "Uacute", "Ucirc", /* 0xd8 */ "Uuml", "Yacute", "THORN", "szlig", /* 0xdc */ "agrave", "aacute", "acirc", "atilde", /* 0xe0 */ "auml", "aring", "aelig", "ccedil", /* 0xe4 */ "egrave", "eacute", "ecirc", "euml", /* 0xe8 */ "igrave", "iacute", "icirc", "iuml", /* 0xec */ "eth", "ntilde", "ograve", "oacute", /* 0xf0 */ "ocirc", "otilde", "ouml", "divide", /* 0xf4 */ "oslash", "ugrave", "uacute", "ucirc", /* 0xf8 */ "uuml", "yacute", "thorn", "yuml" /* 0xfc */ }; /* * Hook which converts a character from EUC-JP to ASCII. */ static EB_Error_Code hook_euc_to_ascii(EB_Book *book, EB_Appendix *appendix, void *container, EB_Hook_Code code, int argc, const unsigned int *argv) { int in_code1, in_code2; int out_code = 0; const char *entity; in_code1 = argv[0] >> 8; in_code2 = argv[0] & 0xff; if (in_code2 < EUC_TO_ASCII_TABLE_START || EUC_TO_ASCII_TABLE_END < in_code2) { out_code = 0; } else if (in_code1 == 0xa1) { out_code = euc_a1_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; } else if (in_code1 == 0xa3) { out_code = euc_a3_to_ascii_table[in_code2 - EUC_TO_ASCII_TABLE_START]; } if (out_code == 0) eb_write_text_byte2(book, in_code1, in_code2); else { entity = latin1_entity_name_table[out_code]; if (entity != NULL) { eb_write_text_byte1(book, '&'); eb_write_text_string(book, entity); eb_write_text_byte1(book, ';'); } else { eb_write_text_byte1(book, out_code); } } return EB_SUCCESS; } EB_Error_Code initialize_hooksets() { EB_Error_Code error_code; eb_initialize_hookset (&text_hookset); error_code = eb_set_hooks (&text_hookset, text_hooks); if(error_code != EB_SUCCESS){ fprintf(stderr, "Failed to set hookset(text) : %s\n", eb_error_message(error_code)); return(1); } eb_initialize_hookset (&heading_hookset); error_code = eb_set_hooks (&heading_hookset, heading_hooks); if(error_code != EB_SUCCESS){ fprintf(stderr, "Failed to set hookset(heading) : %s\n", eb_error_message(error_code)); return(1); } eb_initialize_hookset (&candidate_hookset); error_code = eb_set_hooks (&candidate_hookset, candidate_hooks); if(error_code != EB_SUCCESS){ fprintf(stderr, "Failed to set hookset(candidate) : %s\n", eb_error_message(error_code)); return(1); } return EB_SUCCESS; } void finalize_hooksets() { eb_finalize_hookset (&text_hookset); eb_finalize_hookset (&heading_hookset); eb_finalize_hookset (&candidate_hookset); } ebview-0.3.6.2/src/reg.h0000644000175000017500000000210510013675516014176 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __REG_H__ #define __REG_H__ #include "defs.h" #include #include //static regex_t reg; typedef regex_t REG_TABLE; REG_TABLE *regex_prepare(guchar *pat, gboolean ignore_case); void regex_free(REG_TABLE *reg); guchar *regex_search(REG_TABLE *reg, guchar *text); #endif /* __REG_H__ */ ebview-0.3.6.2/src/dictbar.c0000644000175000017500000002434711241635664015044 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pref_io.h" #include "eb.h" #include "multi.h" extern GList *group_list; extern GtkWidget *display_dictbar; extern GtkWidget *note_bar; static GtkWidget *dict_bar; GtkWidget *dict_box; GtkWidget *combo_group; void show_dict_bar() { LOG(LOG_DEBUG, "IN : show_dict_bar()"); gtk_widget_show(note_bar); bshow_dict_bar = 1; save_preference(); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_dictbar), bshow_dict_bar); LOG(LOG_DEBUG, "OUT : show_dict_bar()"); } void hide_dict_bar() { LOG(LOG_DEBUG, "IN : hide_dict_bar()"); gtk_widget_hide(note_bar); bshow_dict_bar = 0; save_preference(); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_dictbar), bshow_dict_bar); LOG(LOG_DEBUG, "OUT : hide_dict_bar()"); } void toggle_dict_bar(){ LOG(LOG_DEBUG, "IN : toggle_dict_bar()"); if(bshow_dict_bar == 1) hide_dict_bar(); else show_dict_bar(); LOG(LOG_DEBUG, "OUT : toggle_dict_bar()"); } static void dict_toggled(GtkWidget *widget, gpointer data) { gboolean active; gboolean button_active; intptr_t i; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN : dict_toggled(data=%d)"); button_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gchar *title; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &parent_iter, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ i = 0; if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &child_iter, &parent_iter) == TRUE){ do { if(i == (intptr_t)data) { gtk_tree_store_set(dict_store, &child_iter, DICT_ACTIVE_COLUMN, button_active, -1); goto END; } i ++; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &child_iter) == TRUE); } } g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } END: if(ebook_search_method() == SEARCH_METHOD_MULTI) show_multi(); save_dictgroup(); LOG(LOG_DEBUG, "OUT : dict_toggled()"); } static void add_dict_buttons(GtkWidget *bar) { GtkWidget *toggle; GtkWidget *label; intptr_t idx; char name[64]; char buff[256]; GtkTreeIter parent_iter; GtkTreeIter child_iter; LOG(LOG_DEBUG, "IN : add_dict_buttons()"); idx = 0; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gchar *title; gchar *fg, *bg; gboolean active; BOOK_INFO *binfo; gchar *tip_string; gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &parent_iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE) { if(idx != 0){ LOG(LOG_CRITICAL, "multipe group active"); return; } if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &child_iter, &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &child_iter, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, DICT_FGCOLOR_COLUMN, &fg, DICT_BGCOLOR_COLUMN, &bg, -1); if(binfo == NULL) { continue; } g_utf8_strncpy(name, title, dict_button_length); if(fg == NULL) { if(bg == NULL) sprintf(buff, "%s", name); else sprintf(buff, "%s", bg, name); } else { if(bg == NULL) sprintf(buff, "%s", fg, name); else sprintf(buff, "%s", fg, bg, name); } toggle = gtk_toggle_button_new(); if(benable_button_color) label = gtk_label_new(buff); else label = gtk_label_new(name); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_container_add (GTK_CONTAINER (toggle), label); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), active); g_signal_connect(G_OBJECT(toggle),"toggled", G_CALLBACK(dict_toggled), (gpointer)idx); gtk_box_pack_start(GTK_BOX(bar), toggle, FALSE, FALSE, 2); if(binfo->available == FALSE) { gtk_widget_set_sensitive(toggle, FALSE); } tip_string = g_strconcat(_("Push to enable this dictionary."), "\n(", title, ")", NULL); gtk_tooltips_set_tip(tooltip, toggle, tip_string, "Private"); g_free(tip_string); g_free(title); idx ++; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &child_iter) == TRUE); } } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } LOG(LOG_DEBUG, "OUT : add_dict_buttons()"); } static void update_dict_button() { GList *children; GtkBoxChild *child; LOG(LOG_DEBUG, "IN : update_dict_button()"); gtk_widget_hide(dict_box); // Re-creaet buttons children = GTK_BOX(dict_box)->children; while(children){ child = children->data; children = children->next; if(GTK_IS_TOGGLE_BUTTON(child->widget)) gtk_widget_destroy(child->widget); } add_dict_buttons(dict_box); gtk_widget_show_all(dict_box); LOG(LOG_DEBUG, "OUT : update_dict_button()"); } static gint group_changed (GtkWidget *combo){ const gchar *text; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : group_changed()"); text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry)); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gchar *title; gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, -1); if(strcmp(title, text) == 0){ gtk_tree_store_set (dict_store, &iter, DICT_ACTIVE_COLUMN, TRUE, -1); } else { gtk_tree_store_set (dict_store, &iter, DICT_ACTIVE_COLUMN, FALSE, -1); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } update_dict_button(); save_dictgroup(); if(ebook_search_method() == SEARCH_METHOD_MULTI) show_multi(); LOG(LOG_DEBUG, "OUT : group_changed()"); return(FALSE); } GtkWidget *create_dict_bar() { GList *list=NULL; gchar *old_group=NULL; GList *children; GtkBoxChild *child; gboolean active_found; gboolean old_found; GtkTreeIter active_iter; GtkTreeIter old_iter; GtkTreeIter iter; gchar *title; LOG(LOG_DEBUG, "IN : create_dict_bar()"); if(dict_bar){ old_group = strdup(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry))); children = GTK_BOX(dict_bar)->children; while(children){ child = children->data; children = children->next; gtk_widget_destroy(child->widget); } } else { dict_bar = gtk_hbox_new(FALSE, 0); } combo_group = gtk_combo_new(); gtk_widget_set_size_request(GTK_WIDGET(combo_group), 120, 10); gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(combo_group)->entry), FALSE); gtk_box_pack_start(GTK_BOX(dict_bar), combo_group, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(dict_bar), 1); gtk_tooltips_set_tip(tooltip, GTK_COMBO(combo_group)->entry, _("Select dictionary group."),"Private"); active_found = FALSE; old_found = FALSE; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gchar *title; gboolean active; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ active_found = TRUE; active_iter = iter; } if(old_group && (strcmp(title, old_group) == 0)){ old_found = TRUE; old_iter = iter; } list = g_list_append(list, g_strdup(title)); g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } if(g_list_length(list) != 0) gtk_combo_set_popdown_strings( GTK_COMBO(combo_group), list) ; if(active_found == TRUE){ gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &active_iter, DICT_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry), title); g_free(title); } else if (old_found == TRUE){ gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &old_iter, DICT_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry), title); g_free(title); gtk_tree_store_set(GTK_TREE_STORE(dict_store), &old_iter, DICT_ACTIVE_COLUMN, TRUE, -1); } else { if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_group)->entry), title); g_free(title); gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, DICT_ACTIVE_COLUMN, TRUE, -1); } } g_signal_connect(G_OBJECT (GTK_COMBO(combo_group)->entry), "changed", G_CALLBACK(group_changed), NULL); // Re-create buttons dict_box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX (dict_bar), dict_box, FALSE, FALSE, 0); add_dict_buttons(dict_box); gtk_widget_show_all(dict_bar); LOG(LOG_DEBUG, "OUT : create_dict_bar()"); return(dict_bar); } void update_dict_bar() { LOG(LOG_DEBUG, "IN : update_dict_bar()"); gtk_widget_hide(dict_bar); create_dict_bar(); gtk_widget_show_all(dict_bar); LOG(LOG_DEBUG, "OUT : update_dict_bar()"); } ebview-0.3.6.2/src/pref_selection.h0000644000175000017500000000167110013675516016431 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_SELECTION_H__ #define __PREF_SELECTION_H__ #include "defs.h" GtkWidget *pref_start_selection(); gboolean pref_end_selection(); #endif /* __PREF_SELECTION_H__ */ ebview-0.3.6.2/src/pref_dirgroup.c0000644000175000017500000002656710013675516016305 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "dialog.h" #include "dirtree.h" #include "grep.h" #include "pref_io.h" static GtkWidget *dirgroup_view; static GtkWidget *entry_group_name; GtkTreeSelection *selection; static gchar last_dir[1024]; static void add_dirgroup(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; // GtkTreeSelection *selection; GtkTreeIter child_iter; const gchar *title; gchar *list; GtkTextBuffer *buffer; GtkTextIter start, end; LOG(LOG_DEBUG, "IN : add_dirgroup()"); // selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dirgroup_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { gtk_list_store_append(dirgroup_store, &child_iter); // gtk_list_store_insert_after(dirgroup_store, &child_iter, &iter); } else { gtk_list_store_append(dirgroup_store, &child_iter); } title = gtk_entry_get_text(GTK_ENTRY(entry_group_name)); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dirgroup_view)); gtk_text_buffer_get_bounds (buffer, &start, &end); list = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); gtk_list_store_set(dirgroup_store, &child_iter, DIRGROUP_TITLE_COLUMN, title, DIRGROUP_LIST_COLUMN, list, DIRGROUP_ACTIVE_COLUMN, FALSE, -1); g_free(list); LOG(LOG_DEBUG, "OUT : add_dirgroup()"); } static void dirgroup_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; gchar *title; gchar *list; GtkTextBuffer *buffer; LOG(LOG_DEBUG, "IN : dirgroup_selection_changed()"); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : dirgroup_selection_changed()"); return; } gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, DIRGROUP_LIST_COLUMN, &list, -1); if(title != NULL) gtk_entry_set_text(GTK_ENTRY(entry_group_name), title); else gtk_entry_set_text(GTK_ENTRY(entry_group_name), ""); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dirgroup_view)); if(list != NULL) gtk_text_buffer_set_text(buffer, list, strlen(list)); else gtk_text_buffer_set_text(buffer, "", 0); g_free(title); g_free(list); LOG(LOG_DEBUG, "OUT : dirgroup_selection_changed()"); } static void change_dirgroup(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; // GtkTreeSelection *selection; const gchar *title; gchar *list; GtkTextBuffer *buffer; GtkTextIter start, end; LOG(LOG_DEBUG, "IN : change_dirgroup()"); // selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dirgroup_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select group.")); LOG(LOG_DEBUG, "OUT : change_dirgroup()"); return; } title = gtk_entry_get_text(GTK_ENTRY(entry_group_name)); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dirgroup_view)); gtk_text_buffer_get_bounds (buffer, &start, &end); list = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); gtk_list_store_set(dirgroup_store, &iter, DIRGROUP_TITLE_COLUMN, title, DIRGROUP_LIST_COLUMN, list, -1); g_free(list); LOG(LOG_DEBUG, "OUT : change_dirgroup()"); } static void remove_item(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; // GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_item()"); // selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dirgroup_view)); if(selection == NULL) return; if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gtk_list_store_remove(GTK_LIST_STORE(dirgroup_store), &iter); } else { } LOG(LOG_DEBUG, "OUT : remove_item()"); } static void filesel_ok(GtkWidget *widget, GtkFileSelection *fs) { gchar *dir; gchar *text; GtkTextBuffer *buffer; GtkTextIter start, end; LOG(LOG_DEBUG, "IN : filesel_ok()"); dir = (gchar *)gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); strcpy(last_dir, dir); dir = fs_to_unicode(dir); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dirgroup_view)); gtk_text_buffer_get_bounds (buffer, &start, &end); text = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); if(strlen(text) != 0) gtk_text_buffer_insert(buffer, &end, "\n", 1); gtk_text_buffer_insert(buffer, &end, dir, strlen(dir)); g_free(text); g_free(dir); gtk_grab_remove(GTK_WIDGET(fs)); gtk_widget_destroy(GTK_WIDGET(fs)); LOG(LOG_DEBUG, "OUT : filesel_ok()"); } static void open_filesel(GtkWidget *widget, gpointer *data) { GtkWidget *filesel; LOG(LOG_DEBUG, "IN : open_filesel()"); filesel = gtk_file_selection_new (_("Select directory")); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filesel)); g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", G_CALLBACK (filesel_ok), (gpointer) filesel); g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (filesel)->cancel_button), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (filesel)); if(strcmp(&last_dir[strlen(last_dir) -1], DIR_DELIMITER) != 0) strcat(last_dir, DIR_DELIMITER); gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), last_dir); gtk_widget_show(filesel); gtk_grab_add(filesel); LOG(LOG_DEBUG, "OUT : open_filesel()"); } gboolean pref_end_dirgroup() { LOG(LOG_DEBUG, "IN : pref_end_dirgroup()"); update_grep_bar(); LOG(LOG_DEBUG, "OUT : pref_end_dirgroup()"); return(TRUE); } GtkWidget *pref_start_dirgroup() { GtkWidget *button; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *vbox; GtkWidget *label; GtkWidget *frame; GtkWidget *scroll; GtkCellRenderer *renderer; GtkTreeViewColumn *column; LOG(LOG_DEBUG, "IN : pref_start_dirgroup()"); hbox = gtk_hbox_new(TRUE,0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); frame = gtk_frame_new(_("Directory group list")); gtk_box_pack_start (GTK_BOX(hbox), frame,TRUE, TRUE, 5); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_container_add(GTK_CONTAINER(frame), vbox); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox) , frame,TRUE, TRUE, 0); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scroll); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); dirgroup_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(dirgroup_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(dirgroup_view), FALSE); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(dirgroup_view), TRUE); gtk_container_add (GTK_CONTAINER (scroll), dirgroup_view); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dirgroup_view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK (dirgroup_selection_changed), NULL); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes("Title", renderer, "text", DIRGROUP_TITLE_COLUMN, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(column, 200); gtk_tree_view_append_column (GTK_TREE_VIEW (dirgroup_view), column); // gtk_tree_view_append_column (GTK_TREE_VIEW (dirgroup_view), column); hbox2 = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 2); gtk_box_pack_start(GTK_BOX(vbox), hbox2,FALSE, FALSE, 0); frame = gtk_frame_new(_("Detail")); gtk_box_pack_start(GTK_BOX(hbox), frame,TRUE, TRUE, 5); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_container_add(GTK_CONTAINER(frame), vbox); label = gtk_label_new(_("Name")); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); entry_group_name = gtk_entry_new(); gtk_box_pack_start (GTK_BOX (vbox), entry_group_name, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltip, entry_group_name, _("Enter the name of directory group."),"Private"); label = gtk_label_new(_("Directory list")); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox) , frame,TRUE, TRUE, 0); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scroll); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); dirgroup_view = gtk_text_view_new(); // gtk_widget_set_size_request(dirgroup_view, 200, 200); gtk_container_add(GTK_CONTAINER(scroll), dirgroup_view); gtk_tooltips_set_tip(tooltip, dirgroup_view, _("Specify directory names one per line. You can specify extension of files that will be searched. For example, \"/some/dir/name,.txt\" searches all files under /some/dir/name which have the extension .txt."),"Private"); hbox2 = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 5); gtk_box_pack_start(GTK_BOX(vbox), hbox2,FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_dirgroup), (gpointer)button); button = gtk_button_new_with_label(_("Change")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(change_dirgroup), (gpointer)button); button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(remove_item), (gpointer)button); button = gtk_button_new_with_label(_("Choose..")); gtk_box_pack_end(GTK_BOX(hbox2), button,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(open_filesel), (gpointer)button); /* label = gtk_label_new(_("Enter name and directories, then push Add button. You can specify multiple directories devided by newline (one directory per line). Drag & Drop to change order.")); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); */ #ifdef __WIN32__ strcpy(last_dir, "C:\\"); #else strcpy(last_dir, getenv("HOME")); #endif LOG(LOG_DEBUG, "OUT : pref_start_dirgroup()"); return(hbox); } ebview-0.3.6.2/src/defs.h0000644000175000017500000001760611241635664014362 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DEFS_H__ #define __DEFS_H__ /* for EB Library 4.4.1 or later */ #define _FILE_OFFSET_BITS 64 #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __WIN32__ #define ENABLE_NLS 1 #endif #include "intl.h" /* Platform specific includes */ #ifdef __WIN32__ #include #include #else #include #include #include #endif /* __WIN32__ */ /* EB Library includes */ #define ENABLE_EBNET //#define EBCONF_EHABLE_PTHREAD #include #include #include #include #include #include #include #define eb_uint1(p) (*(const unsigned char *)(p)) #define eb_uint2(p) ((*(const unsigned char *)(p) << 8) \ + (*(const unsigned char *)((p) + 1))) #define eb_uint3(p) ((*(const unsigned char *)(p) << 16) \ + (*(const unsigned char *)((p) + 1) << 8) \ + (*(const unsigned char *)((p) + 2))) #define eb_uint4(p) ((*(const unsigned char *)(p) << 24) \ + (*(const unsigned char *)((p) + 1) << 16) \ + (*(const unsigned char *)((p) + 2) << 8) \ + (*(const unsigned char *)((p) + 3))) #define eb_uint4_le(p) ((*(const unsigned char *)(p)) \ + (*(const unsigned char *)((p) + 1) << 8) \ + (*(const unsigned char *)((p) + 2) << 16) \ + (*(const unsigned char *)((p) + 3) << 24)) #define MAX_BUFF 512 #define MAX_BOOKS 128 #define MAX_MULTI_SEARCH 10 #define SEARCH_METHOD_AUTOMATIC 50 #define SEARCH_METHOD_WORD 0 #define SEARCH_METHOD_ENDWORD 1 #define SEARCH_METHOD_EXACTWORD 2 #define SEARCH_METHOD_KEYWORD 3 #define SEARCH_METHOD_MULTI 4 #define SEARCH_METHOD_MENU 10 #define SEARCH_METHOD_COPYRIGHT 11 #define SEARCH_METHOD_FULL_TEXT 12 #define SEARCH_METHOD_FULL_HEADING 13 #define SEARCH_METHOD_INTERNET 14 #define SEARCH_METHOD_GREP 15 #define SEARCH_METHOD_UNKNOWN 99 #define SEARCH_METHOD_MIN 0 #define SEARCH_METHOD_MAX 4 #define CURSOR_LINK GDK_HAND2 #define CURSOR_NORMAL GDK_LEFT_PTR #define CURSOR_BUSY GDK_CLOCK #define CURSOR_SOUND GDK_CLOCK #define TAG_TYPE_NONE 0 #define TAG_TYPE_LINK 1 << 1 #define TAG_TYPE_SOUND 1 << 2 #define TAG_TYPE_MOVIE 1 << 3 #define TAG_TYPE_EMPHASIS 1 << 4 #define TAG_TYPE_SUBSCRIPT 1 << 5 #define TAG_TYPE_SUPERSCRIPT 1 << 6 #define TAG_TYPE_KEYWORD 1 << 7 #define TAG_TYPE_ITALIC 1 << 8 #define TAG_TYPE_CENTER 1 << 9 #define TAG_TYPE_REVERSE 1 << 10 #define TAG_TYPE_COLORED 1 << 11 #define MAX_INDENT 16 #define INDENT_LEFT_MARGIN 16 #define INITIAL_LEFT_MARGIN 10 #define DATA_TEXT 0 #define DATA_NOENDTAG 1 #define DATA_SPECIAL 2 #define DATA_BRANCH 3 #define COLOR_LINK 0 #define COLOR_KEYWORD 1 #define COLOR_SOUND 2 #define COLOR_MOVIE 3 #define COLOR_EMPHASIS 4 #define COLOR_REVERSE_BG 5 #define NUM_COLORS 6 #define SELECTION_DO_NOTHING 0 #define SELECTION_COPY_ONLY 1 #define SELECTION_SEARCH 2 #define SELECTION_SEARCH_TOP 3 #define SELECTION_POPUP 4 #define HEADING_WIDTH 1024 #define HEADING_HEIGHT 18 #define HEADING_PIXMAP_WIDTH 2048 #define HEADING_PIXMAP_HEIGHT 18 #define LINE_HEIGHT 18 #define DICT_WIDTH 500 #define DICT_HEIGHT 1024*10 #define PIXMAP_BUFFER_WIDTH 1280 #define PIXMAP_BUFFER_HEIGHT 1024*10 #define GAIJI_ADJUSTMENT 2 #define MODE_PLAIN 0 #define MODE_REDRAW 1 #define MODE_LINK 2 #define DIRECTION_FORWARD 0 #define DIRECTION_BACKWARD 1 enum { RESULT_TYPE_EB, RESULT_TYPE_GREP }; #define MAX_DICT_GROUP 255 #define MAX_GROUP_MEMBER 255 #define MAX_KEYWORD_LENGTH 255 #define FILENAME_PREFERENCE "preference.xml" #define FILENAME_DICTGROUP "dictgroup.xml" #define FILENAME_STEMMING_EN "endinglist.xml" #define FILENAME_STEMMING_JA "endinglist-ja.xml" #define FILENAME_SHORTCUT "shortcut.xml" #define FILENAME_WEBLIST "searchengines.xml" #define FILENAME_HISTORY "history.xml" #define FILENAME_DIRLIST "dirlist.xml" #define FILENAME_FILTER "filter.xml" #define FILENAME_DIRGROUP "dirgroup.xml" #define FILENAME_GTKRC "gtkrc" #ifdef __WIN32__ #define DIR_DELIMITER "\\" #else #define DIR_DELIMITER "/" #endif #define DEFAULT_DICT_BGCOLOR "#80d0b0" #define DEFAULT_DICT_FGCOLOR "#000000" typedef struct { gint code; gchar **data; gint width; gint height; } GAIJI_CACHE; typedef struct { gboolean available; EB_Book *book; EB_Appendix *appendix; char *book_path; char *appendix_path; char *fg; char *bg; EB_Subbook_Code subbook_no; EB_Subbook_Code appendix_subbook_no; char *subbook_dir; char *subbook_title; GList *gaiji_narrow16; GList *gaiji_narrow24; GList *gaiji_narrow30; GList *gaiji_narrow48; GList *gaiji_wide16; GList *gaiji_wide24; GList *gaiji_wide30; GList *gaiji_wide48; gboolean search_method[20]; } BOOK_INFO; struct _search_method { int code; char *name; }; typedef struct { gint type; guint start; guint end; gint page; gint offset; gint size; gchar filename[256]; } TAG; typedef struct _result_eb { BOOK_INFO *book_info; gint search_method; gchar *plain_heading; gchar *dict_title; EB_Position pos_heading; EB_Position pos_text; } RESULT_EB; typedef struct _result_grep{ gchar *filename; gint page; gint line; gint offset; } RESULT_GREP; typedef struct { gchar *heading; gchar *word; gint type; union { RESULT_EB eb; RESULT_GREP grep; // struct _result_eb eb; // struct _result_grep grep; } data ; } RESULT; typedef struct { BOOK_INFO *book_info; gint code; gchar *text; } MULTI_SEARCH; typedef struct { gchar *text; gint length; } DRAW_TEXT; typedef struct { GtkTextBuffer *buffer; GtkTextIter *iter; gint indent; } CANVAS; // Enums for GtkTreeStore enum { WEB_TYPE_COLUMN, WEB_TITLE_COLUMN, WEB_HOME_COLUMN, WEB_PRE_COLUMN, WEB_POST_COLUMN, WEB_GLUE_COLUMN, WEB_CODE_COLUMN, WEB_N_COLUMNS }; enum { DICT_TYPE_COLUMN, DICT_TITLE_COLUMN, DICT_PATH_COLUMN, DICT_SUBBOOK_NO_COLUMN, DICT_APPENDIX_PATH_COLUMN, DICT_APPENDIX_SUBBOOK_NO_COLUMN, DICT_ACTIVE_COLUMN, DICT_MEMBER_COLUMN, DICT_EDITABLE_COLUMN, DICT_BGCOLOR_COLUMN, DICT_FGCOLOR_COLUMN, DICT_N_COLUMNS }; // Enums for GtkListStore enum { STEMMING_PATTERN_COLUMN, STEMMING_NORMAL_COLUMN, STEMMING_N_COLUMNS }; enum { SHORTCUT_STATE_COLUMN, // guint SHORTCUT_KEYVAL_COLUMN, // guint SHORTCUT_NAME_COLUMN, SHORTCUT_DESCRIPTION_COLUMN, SHORTCUT_KEYSTR_COLUMN, SHORTCUT_COMMAND_COLUMN, // struct _shortcut_command * SHORTCUT_N_COLUMNS }; enum { MULTI_TYPE_COLUMN, MULTI_TITLE_COLUMN, MULTI_CODE_COLUMN, MULTI_BOOK_COLUMN, MULTI_N_COLUMNS }; enum { FILTER_EXT_COLUMN, FILTER_FILTER_COMMAND_COLUMN, FILTER_OPEN_COMMAND_COLUMN, FILTER_EDITABLE_COLUMN, FILTER_N_COLUMNS }; enum { DIRGROUP_TITLE_COLUMN, DIRGROUP_LIST_COLUMN, DIRGROUP_ACTIVE_COLUMN, DIRGROUP_N_COLUMNS }; struct _shortcut_command { gchar *name; void (* func)(); }; #include "log.h" #endif /* __DEFS_H__ */ ebview-0.3.6.2/src/filter.h0000644000175000017500000000167410013675515014717 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __FILTER_H__ #define __FILTER_H__ #include "defs.h" gchar *get_cache_file(gchar *path); gboolean match_extension(gchar *filename, gchar *exts); #endif /* __FILTER_H__ */ ebview-0.3.6.2/src/preference.h0000644000175000017500000000167610013675515015552 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREFERENCE_H__ #define __PREFERENCE_H__ #include "defs.h" void initialize_preference(); void show_preference(); void calculate_font_size(); #endif /* __PREFERENCE_H__ */ ebview-0.3.6.2/src/eb.h0000644000175000017500000000563410013675515014020 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EB_H_ #define __EB_H_ #include "defs.h" BOOK_INFO *load_book(const char *book_path, int subbook_no, gchar *appendix_path, gint appendix_subbook_no, gchar *fg, gchar *bg); void unload_book(BOOK_INFO *binfo); void check_search_method(); gint ebook_start(); gint ebook_end(); void split_word(const gchar *word, gchar **keywords); void cat_word(char *string, char **words); void free_words(char **words); gint ebook_search(const char *g_word, gint method); gint ebook_search_auto(char *g_word, gint method); gint ebook_simple_search(BOOK_INFO *binfo, char *word, gint method, gchar *title); gint ebook_search_method(); gchar *ebook_get_heading(BOOK_INFO *binfo, int page, int offset); gchar *ebook_get_text(BOOK_INFO *binfo, int page, int offset); gchar *ebook_get_candidate(BOOK_INFO *binfo, int page, int offset); EB_Error_Code ebook_forward_text(BOOK_INFO *binfo); EB_Error_Code ebook_backward_text(BOOK_INFO *binfo); void ebook_tell_text(BOOK_INFO *binfo, gint *page, gint *offset); EB_Error_Code ebook_menu(BOOK_INFO *binfo, EB_Position *pos); EB_Error_Code ebook_copyright(BOOK_INFO *binfo, EB_Position *pos); gchar *ebook_error_message(EB_Error_Code error_code); guchar *read_gaiji_as_bitmap(BOOK_INFO *binfo, gchar *name, gint size, gint *width, gint *height); guchar *read_gaiji_as_xbm(BOOK_INFO *binfo, gchar *name, gchar *fname, guint fg, guint bg); gchar **read_gaiji_as_xpm(BOOK_INFO *binfo, gchar *name, gint size, gint *width, gint *height, gchar *color); gint check_gaiji_size(BOOK_INFO *binfo, gint prefered_size); EB_Error_Code ebook_output_wave(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint size); EB_Error_Code ebook_output_mpeg(BOOK_INFO *binfo, gchar *srcname, gchar *destname); EB_Error_Code ebook_output_color(BOOK_INFO *binfo, gchar *filename, gint page, gint offset); EB_Error_Code ebook_output_gray(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint width, gint height); EB_Error_Code ebook_output_mono(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint width, gint height); gchar *ebook_get_rawtext(BOOK_INFO *binfo, gint page, gint offset); EB_Error_Code ebook_set_subbook(BOOK_INFO *binfo); #endif /* __EB_H_ */ ebview-0.3.6.2/src/ebview-client.c0000644000175000017500000000500110013675515016146 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #ifdef __WIN32__ #include #else #include #include #endif #include "../config.h" int main(int argc, char **argv) { #ifdef __WIN32__ printf("Not supported on Windows\n"); exit(1); #else struct sockaddr_un address; int sock; size_t addrLength; char buff[512]; char *p; int i; int len, write_len; pid_t pid; if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0){ perror("socket"); exit(1); } address.sun_family = AF_UNIX; /* Unix domain socket */ // strcpy(address.sun_path, "./sample-socket"); sprintf(address.sun_path, "%s/.%s/.remote-sock", getenv("HOME"), PACKAGE); /* The total length of the address includes the sun_family element */ #ifdef __FreeBSD__ addrLength = sizeof(address.sun_len) + sizeof(address.sun_family) + strlen(address.sun_path) + 1; address.sun_len = addrLength; #else addrLength = sizeof(address.sun_family) + strlen(address.sun_path); #endif if (connect(sock, (struct sockaddr *) &address, addrLength)){ perror("connect"); goto LAUNCH_NEW; } p = &buff[1]; *p = argc; p++; for(i=0 ; i < argc ; i ++){ strcpy(p, argv[i]); p = p + strlen(argv[i]) + 1; } len = p - buff - 1; if(len >= 256){ printf("String too long\n"); close(sock); exit(1); } buff[0] = (unsigned char )len; printf("Sending %d bytes of data...", len); write_len = write(sock, buff, len+1); if(write_len != len+1){ perror("write"); printf("Write failed\n"); } close(sock); printf("done\n"); return 0; LAUNCH_NEW: pid = fork(); if(pid == -1){ perror("fork"); exit(1); } if(pid == 0){ execvp("ebview", argv); } else { // Parent exit(0); } return(0); #endif } ebview-0.3.6.2/src/dictbar.h0000644000175000017500000000173410013675515015037 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __DICTBAR_H__ #define __DICTBAR_H__ #include "defs.h" void show_dict_bar(); void hide_dict_bar(); void toggle_dict_bar(); void update_dict_bar(); GtkWidget *create_dict_bar(); #endif /* __DICTBAR_H__ */ ebview-0.3.6.2/src/dump.c0000644000175000017500000002703010013675515014364 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "jcode.h" static GtkWidget *hex_view = NULL; static GtkWidget *text_view = NULL; static GtkWidget *entry_hex_page; static GtkWidget *entry_text_page; static GtkWidget *entry_text_offset; static GtkTextBuffer *text_buffer; static GtkTextBuffer *hex_buffer; GtkWidget *hex_dlg=NULL; GtkWidget *text_dlg=NULL; static void hex_close(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : hex_close()"); gtk_widget_destroy(hex_dlg); hex_dlg = NULL; LOG(LOG_DEBUG, "OUT : hex_close()"); } static void text_close(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : text_close()"); gtk_widget_destroy(text_dlg); text_dlg = NULL; LOG(LOG_DEBUG, "OUT : text_close()"); } static void hex_dump_page(GtkWidget *widget, gpointer *data){ gint page; const gchar *p; gchar *p_hex=NULL; gchar *p_char=NULL; gchar *text; gchar hex_buff[512]; gchar char_buff[512]; gint i; GtkTextIter iter; GtkTextIter start, end; gchar *tmp_str; LOG(LOG_DEBUG, "IN : hex_dump_page()"); p = gtk_entry_get_text(GTK_ENTRY(entry_hex_page)); if(strlen(p)==0) { LOG(LOG_DEBUG, "OUT : hex_dump_page()"); return; } page = strtol(p, NULL, 16); if(current_result == NULL){ LOG(LOG_DEBUG, "OUT : hex_dump_page() : current_result == NULL"); return; } text = ebook_get_rawtext(current_result->data.eb.book_info, page, 0); if(text == NULL) { LOG(LOG_DEBUG, "OUT : hex_dump_page() : text == NULL"); return; } gtk_text_buffer_get_bounds (hex_buffer, &start, &end); gtk_text_buffer_delete(hex_buffer, &start, &end); gtk_text_buffer_get_start_iter (hex_buffer, &iter); gtk_text_buffer_insert (hex_buffer, &iter, "Offset (Absolute) 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F 0123456789ABCDEF\n", -1); for( i = 0 ; i < EB_SIZE_PAGE ; i=i+2){ // $B%"%I%l%9$rI=<((B if((i % 16) == 0){ p_hex = hex_buff; p_char = char_buff; sprintf(p_hex, "0x%02x ", (i / 16)); p_hex += 5; sprintf(p_hex, "(0x%08x) ", (page - 1) * EB_SIZE_PAGE + i); p_hex += 14; sprintf(p_char, " "); p_char += 1; } sprintf(p_hex, "%02x ", (unsigned char)text[i]); p_hex += 3; sprintf(p_hex, "%02x ", (unsigned char)text[i+1]); p_hex += 3; if(isjisp(&text[i])) { *p_char = text[i] + 0x80; p_char ++; *p_char = text[i+1] + 0x80; p_char ++; *p_char = '\0'; } else { sprintf(p_char, ".."); p_char +=2; } if((i % 16) == 14){ gtk_text_buffer_insert (hex_buffer, &iter, hex_buff, -1); tmp_str = iconv_convert("euc-jp", "utf-8", char_buff); gtk_text_buffer_insert (hex_buffer, &iter, tmp_str, -1); g_free(tmp_str); gtk_text_buffer_insert (hex_buffer, &iter, "\n", -1); } } free(text); LOG(LOG_DEBUG, "OUT : hex_dump_page()"); } static void back_page(GtkWidget *widget,gpointer *data){ gint page; const gchar *p; gchar buff[64]; LOG(LOG_DEBUG, "IN : back_page()"); p = gtk_entry_get_text(GTK_ENTRY(entry_hex_page)); page = strtol(p, NULL, 16); if(page == 0){ LOG(LOG_DEBUG, "OUT : back_page() : page == 0"); return; } page --; sprintf(buff, "%08x",page); gtk_entry_set_text(GTK_ENTRY(entry_hex_page), buff); hex_dump_page(NULL, NULL); LOG(LOG_DEBUG, "OUT : back_page()"); } static void forward_page(GtkWidget *widget,gpointer *data){ gint page; const gchar *p; gchar buff[64]; LOG(LOG_DEBUG, "IN : forward_page()"); p = gtk_entry_get_text(GTK_ENTRY(entry_hex_page)); page = strtol(p, NULL, 16); if(page == 0){ LOG(LOG_DEBUG, "OUT : forward_page() : page == 0"); return; } page ++; sprintf(buff, "%08x",page); gtk_entry_set_text(GTK_ENTRY(entry_hex_page), buff); hex_dump_page(NULL, NULL); LOG(LOG_DEBUG, "OUT : forward_page()"); } void dump_hex(){ GtkWidget *button; GtkWidget *hbox; GtkWidget *label; GtkWidget *hex_scroll; gchar buff[16]; LOG(LOG_DEBUG, "IN : dump_hex()"); if(hex_dlg == NULL){ hex_dlg = gtk_dialog_new(); gtk_window_set_title (GTK_WINDOW (hex_dlg), "Hex dump"); g_signal_connect(G_OBJECT (hex_dlg), "delete_event", G_CALLBACK(hex_close), NULL); button = gtk_button_new_with_label(_("Close")); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (hex_dlg)->action_area), button, TRUE, TRUE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(hex_close), (gpointer)hex_dlg); hbox = gtk_hbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(hex_dlg)->vbox) , hbox, FALSE, FALSE, 0); label = gtk_label_new(_("page")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); entry_hex_page = gtk_entry_new(); gtk_widget_set_size_request(entry_hex_page,100,20); gtk_box_pack_start (GTK_BOX(hbox), entry_hex_page, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(entry_hex_page), "activate", G_CALLBACK(hex_dump_page), (gpointer)NULL); button = gtk_button_new_with_label(" >> "); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(forward_page), NULL); button = gtk_button_new_with_label(" << "); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_end(GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(back_page), NULL); hbox = gtk_hbox_new(FALSE,5); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(hex_dlg)->vbox) , hbox,TRUE, TRUE, 0); hex_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (hex_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_size_request(hex_scroll, 800, 400); gtk_box_pack_start(GTK_BOX(hbox), hex_scroll,FALSE, FALSE, 0); hex_buffer = gtk_text_buffer_new (NULL); hex_view = gtk_text_view_new_with_buffer(hex_buffer); gtk_text_view_set_editable(GTK_TEXT_VIEW(hex_view), FALSE); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(hex_view), 10); gtk_text_view_set_right_margin(GTK_TEXT_VIEW(hex_view), 10); gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(hex_view), 3); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(hex_view), 3); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(hex_view), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(hex_view), GTK_WRAP_WORD); gtk_container_add (GTK_CONTAINER (hex_scroll), hex_view); gtk_widget_show_all(hex_dlg); } if((current_result != NULL) && (current_result->type == RESULT_TYPE_EB)){ sprintf(buff, "%08x",current_result->data.eb.pos_text.page); gtk_entry_set_text(GTK_ENTRY(entry_hex_page), buff); hex_dump_page(NULL, NULL); } LOG(LOG_DEBUG, "OUT : dump_hex()"); } static void text_dump_page(GtkWidget *widget,gpointer *data){ gint page, offset; const gchar *p; gchar *text; gchar *utf_text; GtkTextIter iter; GtkTextIter start, end; LOG(LOG_DEBUG, "IN : text_dump_page()"); p = gtk_entry_get_text(GTK_ENTRY(entry_text_page)); if(strlen(p) == 0) return; page = strtol(p, NULL, 16); p = gtk_entry_get_text(GTK_ENTRY(entry_text_offset)); if(strlen(p) == 0) return; offset = strtol(p, NULL, 16); if(current_result == NULL) return; text = ebook_get_text(current_result->data.eb.book_info, page, offset); if(text == NULL) { return; } gtk_text_buffer_get_bounds (text_buffer, &start, &end); gtk_text_buffer_delete(text_buffer, &start, &end); gtk_text_buffer_get_start_iter (text_buffer, &iter); utf_text = iconv_convert("euc-jp", "utf-8", text); gtk_text_buffer_insert (text_buffer, &iter, utf_text, -1); free(text); free(utf_text); LOG(LOG_DEBUG, "OUT : text_dump_page()"); } void dump_text(){ GtkWidget *button; GtkWidget *hbox; GtkWidget *label; GtkWidget *text_scroll; gchar buff[16]; LOG(LOG_DEBUG, "IN : dump_text()"); if(text_dlg == NULL){ text_dlg = gtk_dialog_new(); gtk_window_set_title (GTK_WINDOW (text_dlg), "Text dump"); g_signal_connect(G_OBJECT (text_dlg), "delete_event", G_CALLBACK(text_close), NULL); button = gtk_button_new_with_label(_("Close")); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX (GTK_DIALOG (text_dlg)->action_area), button, TRUE, TRUE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(text_close), (gpointer)text_dlg); hbox = gtk_hbox_new(FALSE,5); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(text_dlg)->vbox) , hbox, FALSE, FALSE, 0); label = gtk_label_new(_("page")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); entry_text_page = gtk_entry_new(); gtk_widget_set_size_request(entry_text_page,100,20); gtk_box_pack_start (GTK_BOX(hbox), entry_text_page, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(entry_text_page), "activate", G_CALLBACK(text_dump_page), (gpointer)NULL); label = gtk_label_new(_("offset")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); entry_text_offset = gtk_entry_new(); gtk_widget_set_size_request(entry_text_offset,100,20); gtk_box_pack_start (GTK_BOX(hbox), entry_text_offset, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(entry_text_offset), "activate", G_CALLBACK(text_dump_page), (gpointer)NULL); hbox = gtk_hbox_new(FALSE,5); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(text_dlg)->vbox) , hbox, FALSE, FALSE, 0); text_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (text_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_size_request(text_scroll, 600, 400); gtk_box_pack_start(GTK_BOX(hbox), text_scroll,FALSE, FALSE, 0); text_buffer = gtk_text_buffer_new (NULL); text_view = gtk_text_view_new_with_buffer(text_buffer); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_view), 10); gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text_view), 10); gtk_text_view_set_pixels_above_lines(GTK_TEXT_VIEW(text_view), 3); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(text_view), 3); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text_view), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD); gtk_widget_set_size_request(text_view, 500, 400); gtk_container_add (GTK_CONTAINER (text_scroll), text_view); gtk_widget_show_all(text_dlg); } if((current_result != NULL) && (current_result->type == RESULT_TYPE_EB)){ sprintf(buff, "%08x",current_result->data.eb.pos_text.page); gtk_entry_set_text(GTK_ENTRY(entry_text_page), buff); sprintf(buff, "%08x",current_result->data.eb.pos_text.offset); gtk_entry_set_text(GTK_ENTRY(entry_text_offset), buff); text_dump_page(NULL, NULL); } LOG(LOG_DEBUG, "OUT : dump_text()"); } void update_dump() { if(hex_dlg != NULL) dump_hex(); if(text_dlg != NULL) dump_text(); } ebview-0.3.6.2/src/multi.h0000644000175000017500000000210310013675515014550 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __MULTI_H__ #define __MULTI_H__ #include "defs.h" void show_multi(); void show_candidate(BOOK_INFO *binfo, gint code); void multi_select_row(GtkWidget *widget, gint row, gint column, GdkEventButton *bevent, gpointer user_data); GtkWidget *create_multi_tree(); void search_multi(); #endif /* __MULTI_H__ */ ebview-0.3.6.2/src/mainwindow.c0000644000175000017500000010170510016054045015565 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include #include #include "bmh.h" #include "dialog.h" #include "dictbar.h" #include "dirtree.h" #include "dump.h" #include "eb.h" #include "ebview.h" #include "external.h" #include "grep.h" #include "headword.h" #include "history.h" #include "jcode.h" #include "link.h" #include "mainmenu.h" #include "mainwindow.h" #include "misc.h" #include "multi.h" #include "pixmap.h" #include "pref_io.h" #include "render.h" #include "preference.h" #include "shortcut.h" #include "statusbar.h" #include "selection.h" #include "textview.h" #include "websearch.h" GtkWidget *container_child(GtkWidget *container); GtkWidget *hidden_window; GtkWidget *entry_box=NULL; GtkWidget *note_bar=NULL; GtkWidget *note_tree=NULL; GtkWidget *note_text=NULL; GtkWidget *main_area=NULL; GtkWidget *pane=NULL; extern GtkTextBuffer *text_buffer; extern GtkWidget *dict_scroll; extern GtkWidget *main_view; extern guint context_id; extern GList *word_history; static gint about_usage = 1; static gboolean style_set=FALSE; static gint eb_web=0; static gulong handler_method; static gulong handler_notebook; static gint note_page=0; static gboolean entry_focus_in=FALSE; GdkPixbuf *pixbuf_popup; GdkPixbuf *pixbuf_popup_checked; GdkPixbuf *pixbuf_auto; GdkPixbuf *pixbuf_auto_checked; GdkAtom clipboard_atom = GDK_NONE; gchar *clipboard=NULL; void start_search(){ const gchar *word; gchar *euc_str; gint method; LOG(LOG_DEBUG, "IN : start_search"); if(GTK_WIDGET_MAPPED(main_window) != TRUE) return; word = gtk_entry_get_text(GTK_ENTRY(word_entry)); euc_str = iconv_convert("utf-8", "euc-jp", word); remove_space(euc_str); if(strlen(euc_str) == 0){ popup_warning(_("Please enter search word.")); g_free(euc_str); return; } if(strlen(euc_str) != 0){ method = ebook_search_method(); if(method == SEARCH_METHOD_INTERNET){ web_search(); } else if(method == SEARCH_METHOD_GREP){ clear_message(); grep_search(euc_str); } else { clear_message(); ebook_search(euc_str, method); if(search_result == NULL) push_message(_("No hit.")); } save_word_history(word); gtk_editable_select_region(GTK_EDITABLE(word_entry), 0, GTK_ENTRY(word_entry)->text_length); } g_free(euc_str); LOG(LOG_DEBUG, "OUT : start_search"); } #if 0 static void toggle_auto_callback(GtkWidget *widget, gpointer *data){ GList *children; LOG(LOG_DEBUG, "IN : toggle_auto_callback()"); bauto_lookup = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button_auto)); if(bauto_lookup){ auto_lookup_start(); if(button_popup){ gtk_widget_set_sensitive(button_popup, TRUE); } } else { auto_lookup_stop(); if(button_popup) gtk_widget_set_sensitive(button_popup, FALSE); } children = gtk_container_get_children(GTK_CONTAINER(button_auto)); g_assert(GTK_IS_IMAGE(children->data)); if(bauto_lookup) gtk_image_set_from_pixbuf(GTK_IMAGE(children->data), pixbuf_auto_checked); else gtk_image_set_from_pixbuf(GTK_IMAGE(children->data), pixbuf_auto); g_list_free(children); save_preference(); LOG(LOG_DEBUG, "OUT : toggle_auto_callback()"); } static void toggle_popup_callback(GtkWidget *widget,gpointer *data){ GList *children; LOG(LOG_DEBUG, "IN : toggle_popup_callback()"); bshow_popup = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button_popup)); children = gtk_container_get_children(GTK_CONTAINER(button_popup)); g_assert(GTK_IS_IMAGE(children->data)); if(bshow_popup) gtk_image_set_from_pixbuf(GTK_IMAGE(children->data), pixbuf_popup_checked); else gtk_image_set_from_pixbuf(GTK_IMAGE(children->data), pixbuf_popup); g_list_free(children); save_preference(); LOG(LOG_DEBUG, "OUT : toggle_popup_callback()"); } void toggle_auto(){ gint active; LOG(LOG_DEBUG, "IN : toggle_auto()"); active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button_auto)); if(active) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_auto), FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_auto), TRUE); LOG(LOG_DEBUG, "OUT : toggle_auto()"); } void toggle_popup(){ gint active; LOG(LOG_DEBUG, "IN : toggle_popup()"); active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button_popup)); if(active) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_popup), FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_popup), TRUE); LOG(LOG_DEBUG, "OUT : toggle_popup()"); } #endif static gint method_changed (GtkWidget *combo){ gint method; // You cannot show menu and copyright here // because they will be shown before you release the mouse button. // Menu and copyright should be selected by main menu. LOG(LOG_DEBUG, "IN : method_changed()"); g_signal_handler_block(G_OBJECT(note_tree), handler_notebook); method = ebook_search_method(); if(method == SEARCH_METHOD_MULTI){ if(note_page != 1) gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 1); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 1); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); } else if(method == SEARCH_METHOD_INTERNET){ eb_web = 1; if(note_page != 2) gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 2); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); } else if(method == SEARCH_METHOD_FULL_TEXT){ if(note_page != 0) gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); } else if(method == SEARCH_METHOD_GREP){ gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 1); } else { gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); } g_signal_handler_unblock(G_OBJECT(note_tree), handler_notebook); change_search_menu(method); LOG(LOG_DEBUG, "OUT : method_changed()"); return(FALSE); } static gint entry_activate_event(GtkWidget *widget, GdkEventKey *event){ LOG(LOG_DEBUG, "IN : entry_activate_event()"); start_search(NULL, NULL); LOG(LOG_DEBUG, "OUT : entry_activate_event()"); return(FALSE); } void show_about() { gchar *lang; gchar buff[65536]; gchar filename[512]; FILE *fp; gint len; LOG(LOG_DEBUG, "IN : show_about()"); #ifdef __WIN32__ sprintf(filename, "%s%sabout.jp", package_dir, DIR_DELIMITER); #else lang = getenv("LANG"); if(lang == NULL){ sprintf(filename, "%s%sabout.en", package_dir, DIR_DELIMITER); } else if(strncmp(lang, "ja_JP", 5) == 0){ sprintf(filename, "%s%sabout.jp", package_dir, DIR_DELIMITER); } else { sprintf(filename, "%s%sabout.en", package_dir, DIR_DELIMITER); } #endif fp = fopen(filename, "r"); if(fp == NULL){ LOG(LOG_CRITICAL, _("Couldn't find %s. Check installation."), filename); return; } len = fread(buff, 1, 65535, fp); fclose(fp); buff[len] = '\0'; if(len != 0) show_text(NULL, buff, NULL); set_current_result(NULL); about_usage = 1; LOG(LOG_DEBUG, "OUT : show_about()"); } void show_usage() { gchar *lang; gchar filename[512]; gchar *tmp_str; LOG(LOG_DEBUG, "IN : show_usage()"); #ifdef __WIN32__ sprintf(filename, "%s%shelp%sindex.html", package_dir, DIR_DELIMITER, DIR_DELIMITER); #else lang = getenv("LANG"); if(lang == NULL){ sprintf(filename, "file://%s/help/en/index.html", package_dir); } else if(strncmp(lang, "ja_JP", 5) == 0){ sprintf(filename, "file://%s/help/ja/index.html", package_dir); } else { sprintf(filename, "file://%s/help/en/index.html", package_dir); } #endif tmp_str = iconv_convert("utf-8", "euc-jp", _("Help will be shown in external web browser.")); show_text(0, tmp_str, NULL); g_free(tmp_str); launch_web_browser(filename); set_current_result(NULL); about_usage = 2; LOG(LOG_DEBUG, "OUT : show_usage()"); } void show_home() { LOG(LOG_DEBUG, "IN : show_home()"); launch_web_browser("http://ebview.sourceforge.net/"); LOG(LOG_DEBUG, "OUT : show_home()"); } static void dict_history_back(GtkWidget *widget, gpointer *data) { LOG(LOG_DEBUG, "IN : dict_history_back()"); history_back(); LOG(LOG_DEBUG, "OUT : dict_history_back()"); } static void dict_history_forward(GtkWidget *widget, gpointer *data) { LOG(LOG_DEBUG, "IN : dict_history_forward()"); history_forward(); LOG(LOG_DEBUG, "OUT : dict_history_forward()"); } static void dict_forward_text(GtkWidget *widget, gpointer *data) { gint page, offset; EB_Error_Code error_code; RESULT result; LOG(LOG_DEBUG, "IN : dict_forward_text()"); if(current_result == NULL) { LOG(LOG_DEBUG, "OUT : dict_forward_text()"); return; } if(current_result->type != RESULT_TYPE_EB){ LOG(LOG_DEBUG, "OUT : dict_forward_text()"); return; } error_code = ebook_forward_text(current_result->data.eb.book_info); if(error_code != EB_SUCCESS){ LOG(LOG_DEBUG, "OUT : dict_forward_text() = %d", error_code); return; } ebook_tell_text(current_result->data.eb.book_info, &page, &offset); result.type = RESULT_TYPE_EB; result.data.eb.book_info = current_result->data.eb.book_info; result.data.eb.pos_text.page = page; result.data.eb.pos_text.offset = offset; result.data.eb.dict_title = g_strdup(current_result->data.eb.dict_title); show_result(&result, TRUE, FALSE); LOG(LOG_DEBUG, "OUT : dict_forward_text()"); } static void dict_backward_text(GtkWidget *widget, gpointer *data) { gint page, offset; EB_Error_Code error_code; RESULT result; LOG(LOG_DEBUG, "IN : dict_backward_text()"); if(current_result == NULL){ LOG(LOG_DEBUG, "OUT : dict_backward_text()"); return; } if(current_result->type != RESULT_TYPE_EB){ LOG(LOG_DEBUG, "OUT : dict_forward_text()"); return; } error_code = ebook_backward_text(current_result->data.eb.book_info); if(error_code != EB_SUCCESS){ LOG(LOG_DEBUG, "OUT : dict_backward_text() = %d", error_code); return; } ebook_tell_text(current_result->data.eb.book_info, &page, &offset); result.type = RESULT_TYPE_EB; result.data.eb.book_info = current_result->data.eb.book_info; result.data.eb.pos_text.page = page; result.data.eb.pos_text.offset = offset; result.data.eb.book_info = current_result->data.eb.book_info; result.data.eb.dict_title = g_strdup(current_result->data.eb.dict_title); show_result(&result, TRUE, FALSE); LOG(LOG_DEBUG, "OUT : dict_backward_text()"); } void go_up(){ LOG(LOG_DEBUG, "IN : go_up()"); dict_forward_text(NULL, NULL); LOG(LOG_DEBUG, "OUT : go_up()"); } void go_down(){ LOG(LOG_DEBUG, "IN : go_down()"); dict_backward_text(NULL, NULL); LOG(LOG_DEBUG, "OUT : go_down()"); } void note_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, gpointer data) { LOG(LOG_DEBUG, "IN : note_switch_page()"); g_signal_handler_block(G_OBJECT(GTK_COMBO(combo_method)->entry), handler_method); note_page = page_num; if((note_text) && GTK_IS_WIDGET(note_text)) { switch (page_num) { case 0: eb_web = 0; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); if(strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry)), _("Internet Search")) == 0) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Automatic Search")); break; case 1: eb_web = 0; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 1); if(strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry)), _("Multiword Search")) != 0) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Multiword Search")); break; case 2: eb_web = 1; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 0); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); if(strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry)), _("Internet Search")) != 0) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Internet Search")); break; case 3: eb_web = 0; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_bar), 1); if(strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry)), _("File Search")) != 0) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("File Search")); break; } } g_signal_handler_unblock(G_OBJECT(GTK_COMBO(combo_method)->entry), handler_method); LOG(LOG_DEBUG, "OUT : note_switch_page()"); } static void delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : delete_event()"); exit_program(widget, data); LOG(LOG_DEBUG, "OUT : delete_event()"); } static gboolean focus_in_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : focus_in_event()"); gtk_window_set_focus(GTK_WINDOW(main_window), word_entry); entry_focus_in = TRUE; LOG(LOG_DEBUG, "OUT : focus_in_event()"); return(FALSE); } static void style_set_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : style_set_event()"); style_set = TRUE; LOG(LOG_DEBUG, "OUT : style_set_event()"); } static gint key_press_event(GtkWidget *widget, GdkEventKey *event){ if(entry_focus_in) return(FALSE); if(ebook_search_method() != SEARCH_METHOD_MULTI){ gtk_window_set_focus(GTK_WINDOW(main_window), word_entry); } entry_focus_in = TRUE; return(FALSE); } static gint entry_focus_out_event(GtkWidget *widget, GdkEventKey *event) { entry_focus_in = FALSE; #ifdef __WIN32__ gtk_editable_select_region(GTK_EDITABLE(word_entry), 0, GTK_ENTRY(word_entry)->text_length); #endif return(FALSE); } static gint entry_focus_in_event(GtkWidget *widget, GdkEventKey *event) { entry_focus_in = TRUE; return(FALSE); } static void unset_focus(GtkWidget *widget, gpointer data){ GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS); if(GTK_IS_CONTAINER(widget)) gtk_container_foreach(GTK_CONTAINER(widget), unset_focus, NULL); } void create_main_window() { gchar title[32]; GtkWidget *vbox; GtkWidget *widget; GdkPixbuf *pixbuf; LOG(LOG_DEBUG, "IN: create_main_window()"); tooltip = gtk_tooltips_new(); hidden_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); hidden_entry = gtk_entry_new(); g_signal_connect (G_OBJECT(hidden_entry), "selection_received", G_CALLBACK(selection_received), NULL); gtk_container_add (GTK_CONTAINER (hidden_window), hidden_entry); gtk_widget_realize(hidden_window); sprintf(title, "EBView %s", VERSION); main_window = gtk_widget_new (GTK_TYPE_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "title", title, "allow-shrink", TRUE, "allow-grow", TRUE, "default-width", window_width, "default-height", window_height, NULL); gtk_window_move(GTK_WINDOW(main_window), window_x, window_y); gtk_window_set_wmclass(GTK_WINDOW(main_window), "Main", "EBView"); g_signal_connect (G_OBJECT (main_window), "delete_event", G_CALLBACK(delete_event), NULL); g_signal_connect (G_OBJECT (main_window), "style_set", G_CALLBACK(style_set_event), NULL); g_signal_connect(G_OBJECT(main_window),"key_press_event", G_CALLBACK(key_press_event), NULL); #if 0 g_signal_connect (G_OBJECT(window), "remote_command", G_CALLBACK(remote_command), NULL); #endif gtk_widget_realize(main_window); pixbuf = create_pixbuf(IMAGE_EBVIEW); gtk_window_set_icon (GTK_WINDOW(main_window), pixbuf); destroy_pixbuf(pixbuf); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (main_window), vbox); widget = create_dict_window(); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(widget), TRUE, TRUE, 0); gtk_widget_show(vbox); gtk_widget_set_size_request(note_tree, tree_width, tree_height); gtk_widget_show_all (main_window); gtk_selection_owner_set(main_window, GDK_SELECTION_PRIMARY,GDK_CURRENT_TIME); if(!bshow_menu_bar) hide_menu_bar(); if(!bshow_dict_bar) hide_dict_bar(); if(!bshow_status_bar) hide_status_bar(); install_shortcut(); // Prevents the cursor from going to widgets except the keyword entry box. gtk_container_foreach(GTK_CONTAINER(main_window), unset_focus, NULL); GTK_WIDGET_SET_FLAGS(word_entry, GTK_CAN_FOCUS); GTK_WIDGET_SET_FLAGS(main_view, GTK_CAN_FOCUS); LOG(LOG_DEBUG, "OUT: create_main_window()"); } void restart_main_window() { LOG(LOG_DEBUG, "IN : restart_main_window()"); calculate_font_size(); create_text_buffer(); gtk_text_view_set_buffer(GTK_TEXT_VIEW(main_view), text_buffer); #if 0 // Save current size and position gdk_window_get_root_origin(main_window->window, &window_x, &window_y); window_width = main_window->allocation.width; window_height = main_window->allocation.height; tree_width = note_tree->allocation.width; tree_height = note_tree->allocation.height; gtk_widget_destroy(note_tree); gtk_widget_destroy(main_window); create_main_window(); #endif if(current_result != NULL){ show_result_tree(); show_result(current_result, FALSE, TRUE); } else { //show_about(); } show_multi(); LOG(LOG_DEBUG, "OUT: restart_main_window()"); } GtkWidget *create_dict_window() { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkWidget *image; GtkWidget *menu_box; GtkWidget *menubar; GtkWidget *dictbar; GtkWidget *separator; GtkWidget *button_up, *button_down; gint i; GList *method_list=NULL; GtkWidget *widget; LOG(LOG_DEBUG, "IN : create_dict_window()"); vbox = gtk_vbox_new(FALSE, 0); menu_box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), menu_box, FALSE, TRUE, 0); menubar = create_main_menu(); gtk_box_pack_start(GTK_BOX(menu_box), menubar, TRUE, TRUE, 0); separator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox),separator, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 1); label = gtk_label_new(_("Search Word")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); combo_word = gtk_combo_new(); gtk_box_pack_start(GTK_BOX(hbox), combo_word, TRUE, TRUE, 0); word_entry = GTK_COMBO(combo_word)->entry; gtk_combo_disable_activate(GTK_COMBO(combo_word)); gtk_combo_set_case_sensitive(GTK_COMBO(combo_word), TRUE); g_signal_connect(G_OBJECT(word_entry),"activate", G_CALLBACK(entry_activate_event), NULL); g_signal_connect(G_OBJECT(word_entry),"focus_out_event", G_CALLBACK(entry_focus_out_event), NULL); g_signal_connect(G_OBJECT(word_entry),"focus_in_event", G_CALLBACK(entry_focus_in_event), NULL); gtk_tooltips_set_tip(tooltip, word_entry, _("Type word here. You can type multiple space-separated words for keyword search. For file search, specify words or regular expression."),"Private"); gtk_window_set_focus(GTK_WINDOW(main_window), word_entry); if(word_history != NULL) gtk_combo_set_popdown_strings( GTK_COMBO(combo_word), word_history) ; gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_word)->entry), ""); button_start = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button_start), GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX(hbox), button_start, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button_start), "clicked", G_CALLBACK(start_search), (gpointer)button_start); gtk_tooltips_set_tip(tooltip, button_start, _("Start search"),"Private"); image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_start), image); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 5); // Search method for(i=0 ; search_method[i].name != 0 ; i ++){ search_method[i].name = _(search_method[i].name); } combo_method = gtk_combo_new(); gtk_widget_set_size_request(GTK_WIDGET(combo_method), 150, 10); gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(combo_method)->entry), FALSE); for(i=0 ; ; i ++){ if(search_method[i].name == NULL) break; method_list = g_list_append(method_list, search_method[i].name); } if(i != 0) gtk_combo_set_popdown_strings( GTK_COMBO(combo_method), method_list) ; gtk_box_pack_start(GTK_BOX (hbox), combo_method, FALSE, TRUE, 0); gtk_tooltips_set_tip(tooltip, GTK_COMBO(combo_method)->entry, _("Select search method."),"Private"); handler_method = g_signal_connect(G_OBJECT (GTK_COMBO(combo_method)->entry), "changed", G_CALLBACK(method_changed), NULL); #if 0 separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 5); button_auto = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(button_auto), GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX (hbox), button_auto, FALSE, FALSE, 0); pixbuf_auto = create_pixbuf(IMAGE_SELECTION); pixbuf_auto_checked = create_pixbuf(IMAGE_SELECTION2); if(bauto_lookup) image = gtk_image_new_from_pixbuf(pixbuf_auto_checked); else image = gtk_image_new_from_pixbuf(pixbuf_auto); gtk_container_add(GTK_CONTAINER(button_auto), image); g_signal_connect(G_OBJECT (button_auto), "toggled", G_CALLBACK(toggle_auto_callback), NULL); gtk_tooltips_set_tip(tooltip, button_auto, _("When enabled, X selection is searched automatically"),"Private"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_auto), bauto_lookup); button_popup = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(button_popup), GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX (hbox), button_popup, FALSE, FALSE, 0); pixbuf_popup = create_pixbuf(IMAGE_POPUP); pixbuf_popup_checked = create_pixbuf(IMAGE_POPUP2); if(bshow_popup) image = gtk_image_new_from_pixbuf(pixbuf_popup_checked); else image = gtk_image_new_from_pixbuf(pixbuf_popup); gtk_container_add(GTK_CONTAINER(button_popup), image); g_signal_connect(G_OBJECT (button_popup), "toggled", G_CALLBACK(toggle_popup_callback), NULL); gtk_tooltips_set_tip(tooltip, button_popup, _("When enabled, result of X selection search will be shown in popup window"),"Private"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_popup), bshow_popup); gtk_widget_set_sensitive(button_popup, bauto_lookup); #endif separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 5); button_up = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button_up), GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX(hbox),button_up, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button_up), "pressed", G_CALLBACK(dict_backward_text), NULL); gtk_tooltips_set_tip(tooltip, button_up, _("Previous Item"),"Private"); image = gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_up), image); button_down = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button_down), GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX(hbox),button_down, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button_down), "pressed", G_CALLBACK(dict_forward_text), NULL); gtk_tooltips_set_tip(tooltip, button_down, _("Next Item"),"Private"); image = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_down), image); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 5); button_forward = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button_forward), GTK_RELIEF_NONE); gtk_box_pack_end(GTK_BOX(hbox),button_forward, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button_forward), "pressed", G_CALLBACK(dict_history_forward), NULL); gtk_tooltips_set_tip(tooltip, button_forward, _("show next in history"),"Private"); image = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_forward), image); button_back = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button_back), GTK_RELIEF_NONE); gtk_box_pack_end(GTK_BOX(hbox),button_back, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button_back), "pressed", G_CALLBACK(dict_history_back), NULL); gtk_tooltips_set_tip(tooltip, button_back, _("show previous in history"),"Private"); image = gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add(GTK_CONTAINER(button_back), image); separator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox),separator, FALSE, FALSE, 0); // Dictionary bar note_bar = gtk_notebook_new(); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_bar), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(note_bar), FALSE); gtk_box_pack_start(GTK_BOX(vbox), note_bar, FALSE, FALSE, 0); dictbar = create_dict_bar(); gtk_notebook_append_page(GTK_NOTEBOOK(note_bar), dictbar, NULL); dictbar = create_grep_bar(); gtk_notebook_append_page(GTK_NOTEBOOK(note_bar), dictbar, NULL); if(pane_direction == 0) pane = gtk_hpaned_new(); else pane = gtk_vpaned_new(); gtk_box_pack_start(GTK_BOX(vbox), pane, TRUE, TRUE, 0); note_tree = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(note_tree), tab_position); gtk_notebook_set_show_border(GTK_NOTEBOOK(note_tree), FALSE); if(bshow_tree_tab == 1) gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_tree), TRUE); else gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_tree), FALSE); gtk_paned_add1 (GTK_PANED(pane), note_tree); handler_notebook = g_signal_connect(G_OBJECT (note_tree), "switch_page", G_CALLBACK(note_switch_page), NULL); // EBook page widget = create_headword_tree(); //image = create_image(IMAGE_LIST); image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_notebook_append_page(GTK_NOTEBOOK(note_tree), widget, image); // Multi search tree widget = create_multi_tree(); //image = create_image(IMAGE_MULTI); image = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_notebook_append_page(GTK_NOTEBOOK(note_tree), widget, image); // Web page widget = create_web_tree(); image = create_image(IMAGE_GLOBE); //image = gtk_image_new_from_stock("panel-internet", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_notebook_append_page(GTK_NOTEBOOK(note_tree), widget, image); // Directory tree page widget = create_directory_tree(); //image = create_image(IMAGE_HTML); image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_notebook_append_page(GTK_NOTEBOOK(note_tree), widget, image); // Right half note_text = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(note_text), GTK_POS_BOTTOM); gtk_notebook_set_show_border(GTK_NOTEBOOK(note_text), FALSE); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(note_text), FALSE); gtk_paned_add2 (GTK_PANED(pane), note_text); // Text buffer to show text. widget = create_main_view(); label = gtk_label_new(_("Text")); gtk_notebook_append_page(GTK_NOTEBOOK(note_text), widget, label); // Candidate page entry_box = gtk_vbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(entry_box), 5); label = gtk_label_new(_("Candidate")); gtk_notebook_append_page(GTK_NOTEBOOK(note_text),entry_box, label); status_bar = gtk_statusbar_new(); context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar), "mycontext"); gtk_box_pack_end(GTK_BOX(vbox), status_bar, FALSE, TRUE, 0); gtk_widget_show_all(vbox); LOG(LOG_DEBUG, "OUT : create_dict_window()"); return(vbox); } #define EBOOK_MAX_KEYWORDS 256 void show_result(RESULT *result, gboolean save_history, gboolean reverse_keyword) { set_current_result(result); if(result->type == RESULT_TYPE_EB) { show_dict(result, save_history, reverse_keyword); } else if(result->type == RESULT_TYPE_GREP) { show_file(result); } else { LOG(LOG_ERROR, "show_result : Unknown type %d", result->type); exit(1); } } void show_dict(RESULT *result, gboolean save_history, gboolean reverse_keyword) { gchar *euc_str; gchar *text; LOG(LOG_DEBUG, "IN : show_dict(save=%d, reverse=%d)", save_history, reverse_keyword); g_assert(result != NULL); text = ebook_get_text(result->data.eb.book_info, result->data.eb.pos_text.page, result->data.eb.pos_text.offset); if(text == NULL){ LOG(LOG_DEBUG, "OUT : show_dict()"); } if((reverse_keyword == TRUE) && (result->word != NULL)){ euc_str = iconv_convert("utf-8", "euc-jp", result->word); show_text(result->data.eb.book_info, text, euc_str); g_free(euc_str); } else { show_text(result->data.eb.book_info, text, NULL); } g_free(text); if(save_history) save_result_history(result); update_dump(); LOG(LOG_DEBUG, "OUT : show_dict()"); } void show_text(BOOK_INFO *binfo, char *text, gchar *word) { gint length; DRAW_TEXT l_text; GtkTextIter iter; CANVAS canvas; LOG(LOG_DEBUG, "IN : show_text()"); g_assert(text != NULL); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); #if 0 { gchar *utf_str; PangoLayout *layout; PangoContext *context; utf_str = iconv_convert("euc-jp", "utf-8", text); layout = gtk_widget_create_pango_layout(main_area, utf_str); gdk_draw_layout(main_area->window, main_area->style->fg_gc[GTK_WIDGET_STATE(main_area)], 10,10, layout); g_free(utf_str); return; } #endif clear_text_buffer(); gtk_text_buffer_get_start_iter (text_buffer, &iter); length = strlen(text); if(text[length-1] == '\n'){ text[length-1] = '\0'; length --; } // Rewind scroll bar position gtk_adjustment_set_value( gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(dict_scroll)), 0); gtk_adjustment_set_value( gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(dict_scroll)), 0); l_text.text = text; l_text.length = length; canvas.buffer = text_buffer; canvas.iter = &iter; canvas.indent = 0; draw_content(&canvas, &l_text, binfo, NULL, word); gtk_text_view_set_buffer(GTK_TEXT_VIEW(main_view), text_buffer); gtk_adjustment_set_value( gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(dict_scroll)), 0); // Rewind cursor position gtk_text_buffer_get_start_iter(text_buffer, &iter); gtk_text_buffer_place_cursor(text_buffer, &iter); LOG(LOG_DEBUG, "OUT : show_text()"); } void select_any_search() { LOG(LOG_DEBUG, "IN : select_any_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Automatic Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_AUTOMATIC); LOG(LOG_DEBUG, "OUT : select_any_search()"); } void select_exactword_search() { LOG(LOG_DEBUG, "IN : select_exactword_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Exactword Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_EXACTWORD); LOG(LOG_DEBUG, "OUT : select_exactword_search()"); } void select_word_search() { LOG(LOG_DEBUG, "IN : select_word_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Forward Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_WORD); LOG(LOG_DEBUG, "OUT : select_word_search()"); } void select_endword_search() { LOG(LOG_DEBUG, "IN : select_endword_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Backward Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_ENDWORD); LOG(LOG_DEBUG, "OUT : select_endword_search()"); } void select_keyword_search() { LOG(LOG_DEBUG, "IN : select_keyword_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Keyword Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_KEYWORD); LOG(LOG_DEBUG, "OUT : select_keyword_search()"); } void select_multi_search() { LOG(LOG_DEBUG, "IN : select_multi_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Multiword Search"));; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 1); change_search_menu(SEARCH_METHOD_MULTI); LOG(LOG_DEBUG, "OUT : select_multi_search()"); } void select_fulltext_search() { LOG(LOG_DEBUG, "IN : select_fulltext_search()"); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Fulltext Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 0); change_search_menu(SEARCH_METHOD_FULL_TEXT); LOG(LOG_DEBUG, "OUT : select_fulltext_search()"); } void select_internet_search() { LOG(LOG_DEBUG, "IN : select_internet_search()"); eb_web = 1; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("Internet Search")); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 2); change_search_menu(SEARCH_METHOD_INTERNET); LOG(LOG_DEBUG, "OUT : select_internet_search()"); } void select_grep_search() { LOG(LOG_DEBUG, "IN : select_grep_search()"); eb_web = 0; gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry), _("File Search")); change_search_menu(SEARCH_METHOD_GREP); LOG(LOG_DEBUG, "OUT : select_grep_search()"); } ebview-0.3.6.2/src/multi.c0000644000175000017500000004754111241635664014567 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "xmlinternal.h" #include "headword.h" #include "history.h" #include "jcode.h" #include "cellrendererebook.h" #define EB_INDEX_STYLE_ASIS 1 #define MULTI_HACK extern GList *group_list; extern GtkWidget *note_tree; extern GtkWidget *note_text; extern GtkWidget *entry_box; GtkWidget *container_child(GtkWidget *container); typedef struct { GdkPixmap *pixbuff; gchar *text; } CANDIDATE_DATA; enum { CANDIDATE_TITLE_COLUMN, CANDIDATE_BOOK_COLUMN, CANDIDATE_N_COLUMNS }; gint global_multi_code; //static GList *multi_search_list=NULL; static GtkWidget *multi_view=NULL; static GtkTreeStore *multi_store=NULL; static GtkWidget *candidate_view=NULL; static GtkTreeStore *candidate_store=NULL; static GtkWidget *candidate_scroll=NULL; static GtkWidget *entry_table=NULL; static GtkWidget *multi_entry[EB_MAX_MULTI_ENTRIES]; static BOOK_INFO *global_book_info; static gint global_entry_id; static void start_multi_search(GtkWidget *widget, gpointer data); static void clear_candidate(); static void show_candidate(BOOK_INFO *binfo, gint code); static void candidate_pressed(GtkWidget *widget, gpointer data); static void candidate_selection_changed(GtkTreeSelection *selection, gpointer data); void show_multi() { EB_Error_Code error_code; BOOK_INFO *binfo; gchar label[256]; gchar *utf_str; gint i; EB_Multi_Search_Code multi_codes[EB_MAX_MULTI_SEARCHES]; int multi_count; GtkTreeIter parent_iter; GtkTreeIter child_iter; GtkTreeIter dict_parent_iter; GtkTreeIter dict_child_iter; gboolean has_active; gboolean active; LOG(LOG_DEBUG, "IN : show_multi()"); gtk_tree_store_clear(multi_store); has_active = FALSE; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &dict_parent_iter) == TRUE){ do { gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &dict_parent_iter, DICT_ACTIVE_COLUMN, &active, -1); if(active) { has_active = TRUE; break; } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &dict_parent_iter) == TRUE); } if(has_active == FALSE) { LOG(LOG_INFO, "no active group"); return; } if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &dict_child_iter, &dict_parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &dict_child_iter, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if(active == FALSE) continue; if(binfo->search_method[SEARCH_METHOD_MULTI] != TRUE) continue; error_code = eb_multi_search_list(binfo->book, multi_codes, &multi_count); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to list multi search : %s\n", eb_error_message(error_code)); LOG(LOG_DEBUG, "OUT : show_multi()"); return; } gtk_tree_store_append(GTK_TREE_STORE(multi_store), &parent_iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(multi_store), &parent_iter, MULTI_TYPE_COLUMN, 0, MULTI_TITLE_COLUMN, binfo->subbook_title, -1); for(i=0 ; i < multi_count ; i ++){ error_code = eb_multi_title(binfo->book, multi_codes[i], label); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get multi title : %s", ebook_error_message(error_code)); return; } utf_str = iconv_convert("euc-jp", "utf-8", label); gtk_tree_store_append(GTK_TREE_STORE(multi_store), &child_iter, &parent_iter); gtk_tree_store_set(GTK_TREE_STORE(multi_store), &child_iter, MULTI_TYPE_COLUMN, 1, MULTI_TITLE_COLUMN, utf_str, MULTI_CODE_COLUMN, multi_codes[i], MULTI_BOOK_COLUMN, binfo, -1); g_free(utf_str); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &dict_child_iter) == TRUE); } clear_candidate(); gtk_tree_view_expand_all(GTK_TREE_VIEW(multi_view)); LOG(LOG_DEBUG, "OUT : show_multi()"); } void multi_select_row(GtkWidget *widget, gint row, gint column, GdkEventButton *bevent, gpointer user_data) { /* GtkWidget *node; MULTI_SEARCH *idata; gchar *text; g_return_if_fail (GTK_IS_CLIST (widget)); node = (GtkWidget *)gtk_ctree_node_nth(GTK_CTREE(widget), row); idata = gtk_ctree_node_get_row_data(GTK_CTREE(widget), GTK_CTREE_NODE(node)); if(idata != NULL) { show_candidate( idata->book_info, idata->code); } return; */ } static void show_candidate(BOOK_INFO *binfo, gint code){ EB_Error_Code error_code; gint entry_count; gchar name[256]; EB_Position position; gint i; GtkWidget *label; GtkWidget *button; GtkWidget *frame; GtkAttachOptions xoption, yoption; gboolean have_candidate=FALSE; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; LOG(LOG_DEBUG, "IN : show_candidate()"); // xoption = GTK_EXPAND | GTK_SHRINK; // yoption = GTK_EXPAND | GTK_SHRINK; xoption = 0; yoption = 0; error_code = eb_multi_entry_count(binfo->book, code, &entry_count); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get multi entry count : %s", eb_error_message(error_code)); LOG(LOG_DEBUG, "OUT : show_candidate()"); return; } global_book_info = binfo; global_multi_code = code; clear_candidate(); for(i=0; i < EB_MAX_MULTI_ENTRIES; i ++){ multi_entry[i] = NULL; } frame = gtk_frame_new(_("Keyword")); gtk_box_pack_start(GTK_BOX(entry_box), frame, FALSE, FALSE, 0); entry_table = gtk_table_new(3, EB_MAX_MULTI_ENTRIES+1, FALSE); gtk_container_add (GTK_CONTAINER (frame), entry_table); for(i=0 ; i < entry_count ; i ++){ gchar *utf_str; error_code = eb_multi_entry_label(binfo->book, code, i, name); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get multi title : %s", eb_error_message(error_code)); LOG(LOG_DEBUG, "OUT : show_candidate()"); return; } error_code = eb_multi_entry_candidates(binfo->book, code, i, &position); if(error_code == EB_ERR_NO_CANDIDATES){ have_candidate = FALSE; } else if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to get multi candidates : %s\n", eb_error_message(error_code)); LOG(LOG_DEBUG, "OUT : show_candidate()"); return; } else { have_candidate = TRUE; } utf_str = iconv_convert("euc-jp", "utf-8", name); label = gtk_label_new(utf_str); g_free(utf_str); gtk_table_attach(GTK_TABLE(entry_table), label, 0, 1, i, i+1, xoption, yoption, 5, 1); multi_entry[i] = gtk_entry_new(); g_signal_connect(G_OBJECT (multi_entry[i]), "activate", G_CALLBACK(start_multi_search), (gpointer)NULL); gtk_table_attach(GTK_TABLE(entry_table), multi_entry[i], 1, 2, i, i+1, xoption, yoption, 5, 1); if(have_candidate == TRUE){ button = gtk_button_new_with_label(_("Candidates")); g_signal_connect(G_OBJECT (button), "pressed", G_CALLBACK(candidate_pressed), (gpointer)(intptr_t)i); gtk_table_attach(GTK_TABLE(entry_table), button, 2, 3, i, i+1, xoption, yoption, 5, 1); } } button = gtk_button_new_with_label(_("Start search")); g_signal_connect(G_OBJECT (button), "pressed", G_CALLBACK(start_multi_search), (gpointer)NULL); gtk_box_pack_start(GTK_BOX(entry_box), button, FALSE, TRUE, 2); frame = gtk_frame_new(_("Candidates")); gtk_box_pack_start(GTK_BOX(entry_box), frame, TRUE, TRUE, 0); candidate_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (candidate_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (frame), candidate_scroll); if(candidate_store == NULL){ candidate_store = gtk_tree_store_new(CANDIDATE_N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER); } else { gtk_tree_store_clear(GTK_TREE_STORE(candidate_store)); } candidate_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(candidate_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(candidate_view), FALSE); gtk_container_add (GTK_CONTAINER (candidate_scroll), candidate_view); renderer = gtk_cell_renderer_ebook_new(); // renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", CANDIDATE_TITLE_COLUMN, "book", CANDIDATE_BOOK_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW(candidate_view), column); select = gtk_tree_view_get_selection(GTK_TREE_VIEW (candidate_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK( candidate_selection_changed), NULL); gtk_widget_show_all(entry_box); gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 1); LOG(LOG_DEBUG, "OUT : show_candidate()"); } static void clear_candidate(){ GList *list; LOG(LOG_DEBUG, "IN : clear_candidate()"); if(candidate_store) gtk_tree_store_clear(GTK_TREE_STORE(candidate_store)); while(1) { if(!GTK_IS_CONTAINER(entry_box)) break; list = gtk_container_get_children(GTK_CONTAINER(entry_box)); if(list == NULL) break; gtk_container_remove(GTK_CONTAINER(entry_box), list->data); } LOG(LOG_DEBUG, "OUT : clear_candidate()"); } static void show_candidate_tree(BOOK_INFO *binfo, gint page, gint offset, GtkTreeIter *parent) { gchar *text; gchar *p; gchar start_tag[512]; gchar end_tag[512]; gchar tag_name[512]; gchar attr[512]; gchar body[65536]; gchar *content; gchar *candidate; gint content_length; gint body_length; gint l_page=0, l_offset=0; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : show_candiate_tree()"); text = ebook_get_candidate(global_book_info, page, offset); body_length = 0; p = text; while(*p != '\0'){ if(*p == '<'){ if(body_length != 0){ LOG(LOG_INFO, "candidate format error0"); body_length = 0; } get_start_tag(p, start_tag); get_tag_name(start_tag, tag_name); if(strcmp(tag_name, "candidate") == 0){ gchar *utf_str; get_end_tag(p, tag_name, end_tag); l_page = l_offset = 0; get_attr(end_tag, "page", attr); l_page = strtol(attr, NULL, 16); get_attr(end_tag, "offset", attr); l_offset = strtol(attr, NULL, 16); get_content(p, tag_name, &content, &content_length); candidate = g_strndup(content, content_length); utf_str = iconv_convert("euc-jp", "utf-8", candidate); gtk_tree_store_append(candidate_store, &iter, parent); gtk_tree_store_set (candidate_store, &iter, CANDIDATE_TITLE_COLUMN, utf_str, CANDIDATE_BOOK_COLUMN, binfo, -1); g_free(candidate); g_free(utf_str); if(l_page == 0){ // Leaf } else { // Not leaf show_candidate_tree(binfo, l_page, l_offset, &iter); } skip_end_tag(&p, tag_name); } else { LOG(LOG_INFO, "candidate format error1"); body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; LOG(LOG_INFO, "%s", body); } } else if (*p == '\n'){ p++; } else { LOG(LOG_INFO, "candidate format error2"); body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; } } if(body_length != 0){ LOG(LOG_INFO, "candidate format erro3"); } free(text); LOG(LOG_DEBUG, "OUT : show_candiate_tree()"); } //void candidate_select_row(GtkWidget *widget, gint row, gint column, GdkEventButton *bevent, gpointer user_data) static void candidate_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gchar *title; LOG(LOG_DEBUG, "IN : candidate_selection_changed()"); if (gtk_tree_selection_get_selected (selection, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : heading_selection_changed"); return; } if(gtk_tree_model_iter_has_child(model, &iter) == TRUE){ LOG(LOG_DEBUG, "OUT : heading_selection_changed"); return; } gtk_tree_model_get (model, &iter, CANDIDATE_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(multi_entry[global_entry_id]), title); g_free (title); /* GtkCTreeNode *node; GtkWidget *last_candidate; gboolean is_leaf; gchar *text; CANDIDATE_DATA *cdata; g_return_if_fail (GTK_IS_CLIST (widget)); node = gtk_ctree_node_nth(GTK_CTREE(widget), row); last_candidate = current_candidate; current_candidate = (GtkWidget *)node; draw_candidate_text((GtkWidget *)last_candidate); gtk_ctree_get_node_info(GTK_CTREE(widget), node, &text, NULL, NULL, NULL, NULL, NULL, &is_leaf, NULL); cdata = gtk_ctree_node_get_row_data(GTK_CTREE(candidate_tree), GTK_CTREE_NODE(node)); if(is_leaf == TRUE){ switch (bevent->type) { case GDK_BUTTON_PRESS: case GDK_BUTTON_RELEASE: gtk_entry_set_text(GTK_ENTRY(multi_entry[global_entry_id]), cdata->text); break; case GDK_2BUTTON_PRESS: start_multi_search(NULL, NULL); break; default: break; } } draw_candidate_text((GtkWidget *)node); */ LOG(LOG_DEBUG, "OUT : candidate_selection_changed()"); } static void candidate_pressed(GtkWidget *widget, gpointer data) { EB_Position position; EB_Error_Code error_code; LOG(LOG_DEBUG, "IN : candidate_pressed()"); global_entry_id = (gint)(intptr_t)data; error_code = eb_multi_entry_candidates(global_book_info->book, global_multi_code, global_entry_id, &position); if (error_code == EB_ERR_NO_CANDIDATES) { return; } else if (error_code != EB_SUCCESS) { return; } gtk_tree_store_clear(candidate_store); show_candidate_tree(global_book_info, position.page, position.offset, NULL); LOG(LOG_DEBUG, "OUT : candidate_pressed()"); } void search_multi(gchar *word) { EB_Error_Code error_code; GtkTreeIter iter; GtkTreeIter parent; gchar *dic_title = ""; gint i; #ifdef MULTI_HACK EB_Search saved_search[EB_MAX_MULTI_ENTRIES]; EB_Multi_Search *multi; #endif LOG(LOG_DEBUG, "IN : search_multi(%s)", word); // Find user defined name for this dictionary if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent) == TRUE){ do { gint type; gboolean active; BOOK_INFO *binfo; gchar *title; gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &parent, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &iter, &parent) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if((global_book_info == binfo) && active){ dic_title = g_strdup(title); g_free(title); break; } g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent) == TRUE); } error_code = ebook_simple_search(global_book_info, word, SEARCH_METHOD_MULTI, dic_title); if (error_code != EB_SUCCESS) { goto FAILED; } #ifdef MULTI_HACK if(g_list_length(search_result) != 0){ goto END; } // Workaround. // If no hit, try again assuming everyghing is stored "as is" multi = &(global_book_info->book->subbook_current->multis[global_multi_code]); for(i=0; ientries[i]; multi->entries[i].katakana = EB_INDEX_STYLE_ASIS; multi->entries[i].lower = EB_INDEX_STYLE_ASIS; multi->entries[i].mark = EB_INDEX_STYLE_ASIS; multi->entries[i].long_vowel = EB_INDEX_STYLE_ASIS; multi->entries[i].double_consonant = EB_INDEX_STYLE_ASIS; multi->entries[i].contracted_sound = EB_INDEX_STYLE_ASIS; multi->entries[i].voiced_consonant = EB_INDEX_STYLE_ASIS; multi->entries[i].small_vowel = EB_INDEX_STYLE_ASIS; multi->entries[i].p_sound = EB_INDEX_STYLE_ASIS; multi->entries[i].space = EB_INDEX_STYLE_ASIS; } error_code = ebook_simple_search(global_book_info, word, SEARCH_METHOD_MULTI, dic_title); for(i=0; ientries[i] = saved_search[i]; } if (error_code != EB_SUCCESS) { goto FAILED; } #endif END: g_free(dic_title); LOG(LOG_DEBUG, "OUT : search_multi()"); return; FAILED: g_free(dic_title); LOG(LOG_DEBUG, "OUT : search_multi() = ERROR"); return; } static void start_multi_search(GtkWidget *widget, gpointer data) { const gchar *text; gchar word[256]; gchar *euc_str; gint i; gchar attr[512]; guint code; gchar *p; LOG(LOG_DEBUG, "IN : start_multi_search()"); clear_search_result(); word[0] = '\0'; for(i=0; i < EB_MAX_MULTI_ENTRIES; i ++){ if(multi_entry[i] == NULL) break; text = gtk_entry_get_text(GTK_ENTRY(multi_entry[i])); if(text == NULL) break; if(strstr(text, "> 8); p ++; *p = (code & 0xff); p ++; *p = ' '; p ++; *p = '\0'; } else { if(strlen(text) != 0){ euc_str = iconv_convert("utf-8", "euc-jp", text); strcat(word, euc_str); strcat(word, " "); g_free(euc_str); } else { strcat(word, " "); } } } word[strlen(word) - 1] = '\0'; // gtk_entry_set_text(GTK_ENTRY(word_entry), word); if(strlen(word) == 0) { LOG(LOG_DEBUG, "OUT : start_multi_search()"); return; } search_multi(word); show_result_tree(); LOG(LOG_DEBUG, "OUT : start_multi_search()"); } static void multi_selection_changed(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gint type; guint code; BOOK_INFO *binfo; gchar *title; LOG(LOG_DEBUG, "IN :multi_selection_changed"); if (gtk_tree_selection_get_selected(selection, &model, &iter) == FALSE) { LOG(LOG_DEBUG, "OUT : multi_selection_changed"); return; } gtk_tree_model_get (model, &iter, MULTI_TYPE_COLUMN, &type, -1); gtk_tree_model_get (model, &iter, MULTI_CODE_COLUMN, &code, -1); gtk_tree_model_get (model, &iter, MULTI_BOOK_COLUMN, &binfo, -1); gtk_tree_model_get (model, &iter, MULTI_TITLE_COLUMN, &title, -1); g_free (title); if(type == 1){ show_candidate(binfo, code); } LOG(LOG_DEBUG, "OUT : multi_selection_changed"); } GtkWidget *create_multi_tree() { GtkWidget *multi_box; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; LOG(LOG_DEBUG, "IN : create_multi_tree()"); multi_box = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (multi_box), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); multi_store = gtk_tree_store_new(MULTI_N_COLUMNS, G_TYPE_INT, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_POINTER); multi_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(multi_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(multi_view), FALSE); gtk_container_add (GTK_CONTAINER (multi_box), multi_view); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", MULTI_TITLE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW(multi_view), column); select = gtk_tree_view_get_selection(GTK_TREE_VIEW (multi_view)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK( multi_selection_changed), NULL); show_multi(); LOG(LOG_DEBUG, "OUT : create_multi_tree()"); return(multi_box); } ebview-0.3.6.2/src/selection.c0000644000175000017500000002205411241403610015372 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include "dialog.h" #include "grep.h" #include "selection.h" #include "headword.h" #include "mainwindow.h" #include "misc.h" #include "popup.h" #include "history.h" #include "jcode.h" static gint tag_timeout=0; static gchar previous[256]; static gboolean auto_lookup_suspended = FALSE; extern GList *current_in_result; extern GtkWidget *hidden_window; void bring_to_top(GtkWidget *win){ #ifdef __WIN32__ HWND hWnd; int nTargetID, nForegroundID; BOOL res; hWnd = GDK_WINDOW_HWND (win->window); /* From http://techtips.belution.com/ja/vc/0012/ */ nForegroundID = GetWindowThreadProcessId(GetForegroundWindow(), NULL); nTargetID = GetWindowThreadProcessId(hWnd, NULL ); AttachThreadInput(nTargetID, nForegroundID, TRUE ); // SPI_GETFOREGROUNDLOCKTIMEOUT will be undefined. Why ? /* SystemParametersInfo( SPI_GETFOREGROUNDLOCKTIMEOUT,0,&sp_time,0); SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT,0,(LPVOID)0,0); SetForegroundWindow(hWnd); SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT,0,sp_time,0); */ res = SetForegroundWindow(hWnd); AttachThreadInput(nTargetID, nForegroundID, FALSE); if(!res){ SetFocus(hWnd); } #else gdk_window_show(GTK_WIDGET(win)->window); gdk_window_focus(GTK_WIDGET(win)->window, gtk_get_current_event_time()); #endif } static gboolean validate_euc_str(guchar *str){ guchar *p; p = str; while(*p){ if (iseuc(p)) { p +=2; } else if(isprint(*p)) { p ++; } else if(isspace(*p)) { *p = 0x20; p++; } else { return(FALSE); } } return(TRUE); } static void search_selected(gchar *str) { gchar *euc_str; gint method; glong len; LOG(LOG_DEBUG, "IN : search_selected(%s)", str); if(selection_mode <= SELECTION_DO_NOTHING) { LOG(LOG_DEBUG, "OUT : search_selected() = NOP1"); return; } if(strcmp(previous, str) == 0){ // Do nothing if the word is the save as before. LOG(LOG_DEBUG, "same as before"); ; } else { euc_str = iconv_convert("utf-8", "euc-jp", str); if(validate_euc_str(euc_str) == FALSE) { g_free(euc_str); LOG(LOG_DEBUG, "OUT : search_selected() = INVALID"); return; } remove_space(euc_str); len = g_utf8_strlen(str, -1); if((auto_minchar <= len) && (len <= auto_maxchar)) { gtk_entry_set_text(GTK_ENTRY(word_entry), str); method = ebook_search_method(); if((method == SEARCH_METHOD_INTERNET) || (method == SEARCH_METHOD_MULTI) || (method == SEARCH_METHOD_FULL_TEXT)){ LOG(LOG_DEBUG, "OUT : search_selected() = NOP2"); return; } if(selection_mode <= SELECTION_COPY_ONLY) { LOG(LOG_DEBUG, "OUT : search_selected() = COPY"); return; } clear_message(); clear_search_result(); if(method == SEARCH_METHOD_GREP){ grep_search(euc_str); show_result_tree(); select_first_item(); if(selection_mode == SELECTION_SEARCH_TOP) bring_to_top(main_window); save_word_history(str); } else { ebook_search_auto(euc_str, method); if(search_result){ if(selection_mode == SELECTION_POPUP) { show_result_in_popup(); } else { show_result_tree(); select_first_item(); if(selection_mode == SELECTION_SEARCH_TOP) bring_to_top(main_window); } save_word_history(str); } else { current_in_result = NULL; set_current_result(NULL); if(selection_mode == SELECTION_POPUP) { beep(); } else { if(selection_mode == SELECTION_SEARCH_TOP) bring_to_top(main_window); push_message(_("No hit.")); } } } sprintf(previous, "%s", str); } else { LOG(LOG_DEBUG, "OUT : search_selected() = LENGTH"); } g_free(euc_str); } LOG(LOG_DEBUG, "OUT : search_selected()"); } void selection_received (GtkWidget *widget, GtkSelectionData *data) { gchar *str; gchar **list; gint count; LOG(LOG_DEBUG, "IN : selection_received()"); if((data == NULL) || (data->data == NULL) || (data->length < 0)){ LOG(LOG_DEBUG, "no data"); goto END; } // No conversion required for STRING type. if (data->type == GDK_TARGET_STRING){ str = g_strndup(data->data, data->length); // Convert to UTF-8 for COMPOUND_TEXT type. } else if ((data->type == gdk_atom_intern ("COMPOUND_TEXT", FALSE)) || (data->type == gdk_atom_intern ("TEXT", FALSE))){ count = gdk_text_property_to_utf8_list (data->type, data->format, data->data, data->length, &list); if((count == 0) || (list == NULL)){ goto END; } str = g_strdup(list[0]); g_strfreev(list); } else { LOG(LOG_DEBUG, "unknown data type"); goto END; } remove_space(str); search_selected(str); g_free(str); END: if(selection_mode != SELECTION_DO_NOTHING){ auto_lookup_start(); } LOG(LOG_DEBUG, "OUT : selection_received()"); return; } gint copy_clipboard_win(gpointer data){ gchar *str=NULL; GtkClipboard* clipboard; LOG(LOG_DEBUG, "IN : copy_clipboard()"); #ifdef __WIN32__ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); #else clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); #endif str = gtk_clipboard_wait_for_text(clipboard); if(str == NULL){ goto END; } remove_space(str); search_selected(str); g_free(str); END: if(selection_mode != SELECTION_DO_NOTHING){ auto_lookup_start(); } LOG(LOG_DEBUG, "OUT : copy_clipboard()"); return (FALSE); } gint copy_clipboard_x(gpointer data){ static GdkAtom ctext_atom = GDK_NONE; LOG(LOG_DEBUG, "IN : copy_clipboard()"); /* xwindow = XGetSelectionOwner (gdk_display_get_default(), GDK_SELECTION_PRIMARY); if (xwindow == None){ return(TRUE); } */ gtk_entry_set_text(GTK_ENTRY(hidden_entry), ""); // Ask for COMPOUND_TEXT if (ctext_atom == GDK_NONE){ ctext_atom = gdk_atom_intern ("COMPOUND_TEXT", FALSE); } #ifdef __WIN32__ gtk_selection_convert (hidden_entry, GDK_SELECTION_CLIPBOARD, ctext_atom, GDK_CURRENT_TIME); #else gtk_selection_convert (hidden_entry, GDK_SELECTION_PRIMARY, ctext_atom, GDK_CURRENT_TIME); #endif LOG(LOG_DEBUG, "OUT : copy_clipboard()"); return (FALSE); } #ifdef __WIN32__ static gboolean registered=FALSE; static WNDPROC OrgWndProc = NULL; static HWND next_hwnd = NULL; static HWND hidden_hwnd; LRESULT CALLBACK HiddenWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { LRESULT retval; HANDLE hText; char *pText; gchar *str; switch (msg) { case WM_DESTROY: ChangeClipboardChain(hwnd , next_hwnd); PostQuitMessage(0); break; case WM_DRAWCLIPBOARD: OpenClipboard(hwnd); hText = GetClipboardData(CF_TEXT); if(hText != NULL) { pText = GlobalLock(hText); GlobalUnlock(hText); } CloseClipboard(); //remove_space(pText); str = iconv_convert(fs_codeset, "utf-8", pText); search_selected(str); g_free(str); if(next_hwnd != NULL) SendMessage(next_hwnd, msg, wParam, lParam); break; case WM_CHANGECBCHAIN: if((HWND)wParam == next_hwnd) next_hwnd = (HWND)lParam; break; default: break; } retval = OrgWndProc(hwnd, msg, wParam, lParam); return retval; } #endif void auto_lookup_start() { if(selection_mode == SELECTION_DO_NOTHING) return; #ifdef __WIN32__ if(registered == FALSE) { if(OrgWndProc == NULL){ hidden_hwnd = GDK_WINDOW_HWND (hidden_window->window); OrgWndProc = (WNDPROC)GetWindowLong(hidden_hwnd, GWL_WNDPROC); SetWindowLong(hidden_hwnd, GWL_WNDPROC, (LONG)HiddenWndProc); } next_hwnd = SetClipboardViewer(hidden_hwnd); } registered = TRUE; #else if(tag_timeout != 0) gtk_timeout_remove(tag_timeout); tag_timeout = gtk_timeout_add(auto_interval, copy_clipboard_x, NULL); #endif auto_lookup_suspended = FALSE; } void auto_lookup_stop() { #ifdef __WIN32__ if(registered == TRUE) { hidden_hwnd = GDK_WINDOW_HWND (hidden_window->window); ChangeClipboardChain(hidden_hwnd, next_hwnd); next_hwnd = NULL; registered = FALSE; } #else if(tag_timeout != 0) gtk_timeout_remove(tag_timeout); tag_timeout = 0; #endif auto_lookup_suspended = FALSE; } void auto_lookup_suspend() { if((selection_mode != SELECTION_DO_NOTHING) && (auto_lookup_suspended == FALSE)) { auto_lookup_stop(); auto_lookup_suspended = TRUE; } } void auto_lookup_resume() { if((selection_mode != SELECTION_DO_NOTHING) && (auto_lookup_suspended == TRUE)) { auto_lookup_start(); auto_lookup_suspended = FALSE; } } ebview-0.3.6.2/src/statusbar.c0000644000175000017500000000344110013675516015430 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pref_io.h" static gint tag = 0; guint context_id; extern GtkWidget *display_statusbar; gint clear_status_message(gpointer data) { gtk_statusbar_pop(GTK_STATUSBAR(status_bar), context_id); tag = 0; return(FALSE); } void status_message(gchar *msg) { if(tag != 0){ gtk_timeout_remove(tag); } gtk_statusbar_pop(GTK_STATUSBAR(status_bar), context_id); gtk_statusbar_push(GTK_STATUSBAR(status_bar), context_id, msg); // tag = gtk_timeout_add(5000, clear_status_message, NULL); } void show_status_bar() { gtk_widget_show(status_bar); bshow_status_bar = 1; save_preference(); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_statusbar), bshow_status_bar); } void hide_status_bar() { gtk_widget_hide(status_bar); bshow_status_bar = 0; save_preference(); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(display_statusbar), bshow_status_bar); } void toggle_status_bar(){ if(bshow_status_bar == 1) hide_status_bar(); else show_status_bar(); } ebview-0.3.6.2/src/pref_io.h0000644000175000017500000000256210013675516015053 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_IO_H__ #define __PREF_IO_H__ #include "defs.h" gboolean load_preference(); gboolean save_preference(); gboolean load_dictgroup(); gboolean save_dictgroup(); gboolean load_stemming_en(); gboolean load_stemming_ja(); gboolean save_stemming_en(); gboolean save_stemming_ja(); gboolean load_shortcut(); gboolean save_shortcut(); gboolean load_weblist(); gboolean save_weblist(); gboolean load_history(); gboolean save_history(); gboolean load_dirlist(); gboolean save_dirlist(); gboolean load_filter(); gboolean save_filter(); gboolean load_dirgroup(); gboolean save_dirgroup(); #endif /* __PREF_IO_H__ */ ebview-0.3.6.2/src/pref_stemming.h0000644000175000017500000000166610013675516016273 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_STEMMING_H__ #define __PREF_STEMMING_H__ #include "defs.h" GtkWidget *pref_start_stemming(); gboolean pref_end_stemming(); #endif /* __PREF_STEMMING_H__ */ ebview-0.3.6.2/src/ebview.c0000644000175000017500000002210011241377323014671 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define _GLOBAL #include #include #ifndef __WIN32__ #include #endif #ifdef __WIN32__ #include #else #include #include #endif #include "defs.h" #include "global.h" #include #ifndef __WIN32__ #include #include #endif #include "eb.h" #include "mainwindow.h" #include "headword.h" #include "mainmenu.h" #include "dictbar.h" #include "statusbar.h" #include "pixmap.h" #include "selection.h" #include "preference.h" #include "dialog.h" #include "shortcut.h" #include "pref_io.h" #include "splash.h" static pthread_t server_tid=(pthread_t)-1; static gint conn; static gchar sock_name[512]; gchar *exe_path; extern GtkWidget *note_tree; void exit_program( GtkWidget *widget, gpointer data ) { #if 0 #ifndef __WIN32__ void *p; #endif #endif if(pthread_self() == server_tid) pthread_exit(0); ebook_end(); gdk_window_get_root_origin(main_window->window, &window_x, &window_y); window_width = main_window->allocation.width; window_height = main_window->allocation.height; tree_width = note_tree->allocation.width; tree_height = note_tree->allocation.height; save_preference(); gtk_main_quit (); if(server_tid != (pthread_t)-1) pthread_cancel(server_tid); close(conn); unlink(sock_name); #if 0 #ifndef __WIN32__ pthread_join(server_tid, &p); #endif #endif // exit(0); } static void sig_handler(int sig){ gint status; switch(sig){ #ifndef __WIN32__ case SIGCHLD: wait(&status); if(WEXITSTATUS(status) == 100){ popup_warning(_("Failed to execute command. Please check setting.")); } break; #endif case SIGTERM: case SIGINT: exit_program(NULL, NULL); break; default: break; } } #if 0 gint g_argc; gchar *g_argv[16]; extern GtkWidget *popup; static void remote_command( GtkWidget *widget, gpointer data ) { gboolean bpopup=FALSE; gint i; gchar word[512]; if(strcmp(g_argv[1], "--search") == 0){ word[0] = '\0'; for(i=2; i < g_argc ; i ++){ strcat(word, g_argv[i]); strcat(word, " "); } if(strlen(word) != 0){ gtk_entry_set_text(GTK_ENTRY(word_entry), word); start_search(); } } else if((strcmp(g_argv[1], "--selection") == 0) || (strcmp(g_argv[1], "--popup") == 0)) { if(strcmp(g_argv[1], "--popup") == 0) bpopup = TRUE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_popup), bpopup); bshow_popup = bpopup; copy_clipboard(NULL); return; } else if(strcmp(g_argv[1], "--close-popup") == 0){ /* if(popup != NULL) gtk_signal_emit_by_name(GTK_OBJECT (popup), // "delete_event"); "close_popup"); gtk_signal_emit_by_name(GTK_OBJECT (popup), "redraw"); */ } } #ifndef __WIN32__ static void *server_thread(void *arg) { gint count=0; gchar buff[256]; int len, read_len; gchar *p; gint i; gint state; struct sockaddr_un address; int sock; size_t addrLength; // signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); #ifndef __WIN32__ signal(SIGCHLD, SIG_DFL); signal(SIGPIPE, SIG_DFL); #endif pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &state); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &state); if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { perror("socket"); _exit(1); } /* Remove any preexisting socket (or other file) */ address.sun_family = AF_UNIX; /* Unix domain socket */ sprintf(sock_name, "%s/.remote-sock", user_dir); strcpy(address.sun_path, sock_name); unlink(sock_name); /* The total length of the address includes the sun_family element */ #ifdef __FreeBSD__ addrLength = sizeof(address.sun_len) + sizeof(address.sun_family) + strlen(address.sun_path) + 1; address.sun_len = addrLength; #else addrLength = sizeof(address.sun_family) + strlen(address.sun_path); #endif if (bind(sock, (struct sockaddr *) &address, addrLength)){ perror("bind"); _exit(1); } if (listen(sock, 5)){ perror("listen"); _exit(1); } sprintf(buff, "remote command %d", count); while ((conn = accept(sock, (struct sockaddr *) &address, &addrLength)) >= 0) { read_len = read(conn, buff, 1); if(read_len != 1){ close(conn); continue; } len = (unsigned char)buff[0]; if(len == 0){ close(conn); continue; } read_len = read(conn, buff, len); if(read_len != len){ perror("read"); close(conn); continue; } close(conn); p = buff; g_argc = *p; p ++; for(i=0; ipat = (guchar *) g_strdup((gchar *) pat); table->u_pat = NULL; table->l_pat = NULL; table->length = strlen((gchar *) pat); table->ignore_case = ignore_case; // skip[x] will be the length of chars after the occurrence of x in pat. // Is x does not occur, it will be the length of pat. for( k=0; kskip[k] = table->length; for( k=0; klength - 1; k++ ){ if(ignore_case == TRUE){ table->skip[toupper(pat[k])] = table->length - k - 1; table->skip[tolower(pat[k])] = table->length - k - 1; } else { table->skip[pat[k]] = table->length - k - 1; } } if(ignore_case == TRUE){ table->u_pat = g_new(guchar, table->length+1); table->u_pat[table->length] = '\0'; table->l_pat = g_new(guchar, table->length+1); table->l_pat[table->length] = '\0'; for(i=0 ; i < table->length ; i++){ table->u_pat[i] = toupper(table->pat[i]); table->l_pat[i] = tolower(table->pat[i]); } } LOG(LOG_DEBUG, "OUT : bmh_prepare()"); return(table); } void bmh_free(BMH_TABLE *table) { if(table == NULL) return; if(table->pat) g_free(table->pat); if(table->u_pat) g_free(table->u_pat); if(table->l_pat) g_free(table->l_pat); g_free(table); } guchar *bmh_search(BMH_TABLE *table, guchar *text, gint n) { gint i, j, k; if(table->length==0) return(text); // k will be the last chars after matching first char. // Check from the last characters. // If it does not match shift by the value of skip table. for(k=table->length-1; k < n; k += table->skip[text[k] & (MAX_CHAR-1)] ) { for(j=table->length-1, i=k; j>=0 ; j--){ if(table->ignore_case == TRUE) { if((text[i] != table->u_pat[j]) && (text[i] != table->l_pat[j])) break; } else { if(text[i] != table->pat[j]) break; } i--; } if(j == (-1)) return(text+i+1); } return(NULL); } guchar *simple_search(guchar *pat, guchar *text, gint n, gboolean ignore_case) { gint i, j, k, m; m = strlen((gchar *) pat); if( m==0 ) return( text ); for( k=m-1; k < n; k ++) { for( j=m-1, i=k; j>=0 ; j-- ){ if(ignore_case == TRUE) { if(toupper(text[i]) != toupper(pat[j])) break; } else { if(text[i] != pat[j]) break; } i--; } if( j == (-1) ) return( text+i+1 ); } return( NULL ); } ebview-0.3.6.2/src/bmh.h0000644000175000017500000000233610013675514014173 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __BMH_H__ #define __BMH_H__ #include "defs.h" #define MAX_CHAR 256 typedef struct { guchar skip[MAX_CHAR]; guchar *pat; guchar *u_pat; guchar *l_pat; gint length; gboolean ignore_case; } BMH_TABLE; BMH_TABLE *bmh_prepare(guchar *pat, gboolean ignore_case); void bmh_free(BMH_TABLE *table); guchar *bmh_search(BMH_TABLE *table, guchar *text, gint n); guchar *simple_search(guchar *pat, guchar *text, gint n, gboolean ignore_case); #endif /* __BMH_H__ */ ebview-0.3.6.2/src/pref_dirgroup.h0000644000175000017500000000172010013675516016272 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_DIRGROUP_H__ #define __PREF_DIRGROUP_H__ #include "defs.h" gboolean pref_end_dirgroup(); GtkWidget *pref_start_dirgroup(); #endif /* __PREF_DIRGROUP_H__ */ ebview-0.3.6.2/src/pref_gui.h0000644000175000017500000000163310013675516015226 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_GUI_H__ #define __PREF_GUI_H__ #include "defs.h" gboolean pref_end_gui(); GtkWidget *pref_start_gui(); #endif /* __PREF_GUI_H__ */ ebview-0.3.6.2/src/menu.c0000644000175000017500000000747010013675515014371 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "eb.h" #include "global.h" #include "headword.h" #include "history.h" extern GList *group_list; void show_menu() { EB_Position pos; RESULT *rp; EB_Error_Code err; GtkTreeIter parent_iter; GtkTreeIter child_iter; clear_search_result(); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gboolean active; BOOK_INFO *binfo; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &parent_iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &child_iter, &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &child_iter, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if(active != TRUE) continue; if(binfo->search_method[SEARCH_METHOD_MENU] != TRUE) continue; err = ebook_menu(binfo, &pos); if(err != EB_SUCCESS) continue; rp = (RESULT *)calloc(sizeof(RESULT), 1); // rp->heading = strdup(_("menu")); rp->heading = g_strdup_printf("%s : %s", _("menu"), binfo->subbook_title); rp->type = RESULT_TYPE_EB; rp->data.eb.book_info = binfo; rp->data.eb.pos_text = pos; search_result = g_list_append(search_result, rp); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &child_iter) == TRUE); } } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } show_result_tree(); } void show_copyright() { EB_Position pos; RESULT *rp; EB_Error_Code err; GtkTreeIter parent_iter; GtkTreeIter child_iter; clear_search_result(); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gboolean active; BOOK_INFO *binfo; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &parent_iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &child_iter, &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &child_iter, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if(active != TRUE) continue; if(binfo->search_method[SEARCH_METHOD_COPYRIGHT] != TRUE) continue; err = ebook_copyright(binfo, &pos); if(err != EB_SUCCESS) continue; rp = (RESULT *)calloc(sizeof(RESULT), 1); // rp->heading = strdup(_("copyright")); rp->heading = g_strdup_printf("%s : %s", _("copyright"), binfo->subbook_title); rp->type = RESULT_TYPE_EB; rp->data.eb.book_info = binfo; rp->data.eb.pos_text = pos; search_result = g_list_append(search_result, rp); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &child_iter) == TRUE); } } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } show_result_tree(); } ebview-0.3.6.2/src/ebview.rc0000644000175000017500000000004110013675515015053 0ustar mhattamhatta1 ICON "../pixmaps/ebview.ico" ebview-0.3.6.2/src/external.h0000644000175000017500000000175510013675515015254 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EXTERNAL_H__ #define __EXTERNAL_H__ #include "defs.h" gint launch_external(gchar *cmd, gboolean wait); void play_multimedia(gchar *filename, gint type); void launch_web_browser(gchar *url); #endif /* __EXTERNAL_H__ */ ebview-0.3.6.2/src/shortcutfunc.h0000644000175000017500000000256010013675516016155 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __SHORTCUTFUNC_H__ #define __SHORTCUTFUNC_H__ #include "defs.h" #include "global.h" void toggle_status_bar(); void toggle_dict_bar(); void next_dict_group(); void previous_dict_group(); void toggle_dictionary1(); void toggle_dictionary2(); void toggle_dictionary3(); void toggle_dictionary4(); void toggle_dictionary5(); void toggle_dictionary6(); void toggle_dictionary7(); void toggle_dictionary8(); void toggle_dictionary9(); void toggle_dictionary10(); void go_back(); void go_forward(); void clear_word(); void quit(); void iconify(); void paste_from_clipboard(); #endif /* __SHORTCUTFUNC_H__ */ ebview-0.3.6.2/src/pref_external.h0000644000175000017500000000166410013675516016270 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_EXTERNAL_H__ #define __PREF_EXTERNAL_H__ #include "defs.h" GtkWidget *pref_start_external(); gboolean pref_end_external(); #endif /* __PREF_EXTERNAL_H__ */ ebview-0.3.6.2/src/jcode.h0000644000175000017500000000312210013675515014504 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __JCODE_H__ #define __JCODE_H__ #include "defs.h" #include "global.h" enum { KCODE_EUC, KCODE_JIS, KCODE_SJIS, KCODE_ASCII, KCODE_UNKNOWN }; gchar *iconv_convert(const gchar *icode, const gchar *ocode, const gchar *inbuf); gchar *iconv_convert2(const gchar *icode, const gchar *ocode, const gchar *orig); inline gboolean isjisp(const gchar *buff); gboolean iseuckanji(const guchar *buff); gboolean iseuchiragana(const guchar *buff); gboolean iseuckatakana(const guchar *buff); gboolean iseuc(const guchar *buff); gint guess_kanji(gint imax, guchar *buf); void katakana_to_hiragana(gchar *word); void hiragana_to_katakana(gchar *word); void hex_dump(const gchar *buf); #define _EUC(str) euc2locale(str) #define _LOCALE(str) euc2locale(str) #ifndef HAVE_ICONV_H #error iconv() required! #endif #endif /* __JCODE_H__ */ ebview-0.3.6.2/src/filter.c0000644000175000017500000002147411241635664014717 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "dialog.h" #include "external.h" static GList *grep_file_list=NULL; static void check_cache_size(); static gchar *create_dir_hier(gchar *path) { gchar *p; gchar *p0; gchar buff[512]; gchar parent[512]; gint r; LOG(LOG_DEBUG, "IN : create_dir_hier(%s)", path); #ifdef __WIN32__ if(path[0] == '\\') strcpy(buff, &path[1]); else if((path[1] == ':') && (path[2] == '\\')){ buff[0] = path[0]; strcpy(&buff[1], &path[2]); } else strcpy(buff, path); #else if(path[0] == '/') strcpy(buff, &path[1]); else strcpy(buff, path); #endif p = buff; p0 = buff; strcpy(parent, cache_dir); while(1){ if(*p == '\0') { strcat(parent, DIR_DELIMITER); strcat(parent, p0); break; } #ifdef __WIN32__ if(*p == '\\') #else if(*p == '/') #endif { *p = '\0'; strcat(parent, DIR_DELIMITER); strcat(parent, p0); #ifdef __WIN32__ r = mkdir(parent); #else r = mkdir(parent, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); #endif if((r != 0) && (errno != EEXIST)){ LOG(LOG_DEBUG, "OUT : create_dir_hier() = NULL : %d", errno); return(NULL); } p0 = p = p + 1; } else p++; } strcat(parent, ".cache"); LOG(LOG_DEBUG, "OUT : create_dir_hier() = %s", parent); return(strdup(parent)); } gboolean match_extension(gchar *filename, gchar *exts) { gchar *p; gchar ext[512]; gint i; LOG(LOG_DEBUG, "IN : match_extension(%s, %s)", filename, exts); i = 0; for(p=exts, i=0; ; p++) { if(*p == ' ') continue; else if ((*p == ',')){ ext[i] = '\0'; if((strlen(filename) >= strlen(ext)) && (strcasecmp(&filename[strlen(filename) - strlen(ext)], ext) == 0)) { LOG(LOG_DEBUG, "OUT : match_extension() = TRUE"); return(TRUE); } else { i = 0; } continue; } else if ((*p == '\0')){ ext[i] = '\0'; if((strlen(filename) >= strlen(ext)) && (strcasecmp(&filename[strlen(filename) - strlen(ext)], ext) == 0)) { LOG(LOG_DEBUG, "OUT : match_extension() = TRUE"); return(TRUE); } else { LOG(LOG_DEBUG, "OUT : match_extension() = FALSE"); return(FALSE); } } ext[i] = *p; i++; } } static gchar *get_filter_command(gchar *path) { GtkTreeIter iter; gint found = 0; gchar *ext; gchar *filter_command; LOG(LOG_DEBUG, "IN : get_filter_command(%s)", path); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(filter_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, FILTER_EXT_COLUMN, &ext, FILTER_FILTER_COMMAND_COLUMN, &filter_command, -1); if(match_extension(path, ext) == TRUE){ found = 1; break; } g_free(ext); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(filter_store), &iter) == TRUE); } if(found == 1){ if((filter_command == NULL) || (strlen(filter_command) == 0)){ LOG(LOG_DEBUG, "OUT : get_filter_command() = NULL"); return(NULL); } LOG(LOG_DEBUG, "OUT : get_filter_command()"); return(filter_command); } else { LOG(LOG_DEBUG, "OUT : get_filter_command() = NULL"); return(NULL); } } gchar *get_cache_file(gchar *path) { gchar *outfile; gchar *command; struct stat istat; struct stat ostat; gchar buff[512]; gint i; gint r; gchar *p; size_t length; GError *error=NULL; gchar *contents; gchar tmpout[512]; LOG(LOG_DEBUG, "IN : get_cache_file(%s)", path); command = get_filter_command(path); if(command == NULL) { // No filter defined. // Regard as as text and read original file. if(g_file_get_contents(path, &contents, &length, &error) == FALSE){ LOG(LOG_DEBUG, "OUT : get_cache_file() = NULL"); return(NULL); } LOG(LOG_DEBUG, "OUT : get_cache_file() = NOP"); return(contents); } outfile = create_dir_hier(path); if(outfile == NULL){ LOG(LOG_CRITICAL, "Failed to create cache for %s", path); push_message("failed to create cache.\n"); return(NULL); } r = stat(path, &istat); if(r != 0) { // Cannot happen. LOG(LOG_CRITICAL, "file %s does not exist", path); push_message("unknown error.\n"); g_free(command); return(NULL); } r = stat(outfile, &ostat); if(r != 0) { // No file ; } else if((ostat.st_size != 0) &&( ostat.st_ctime > MAX(istat.st_ctime, istat.st_mtime))){ // Cache is newer. LOG(LOG_DEBUG, "cache file is new"); g_free(command); if(g_file_get_contents(outfile, &contents, &length, &error) == FALSE){ LOG(LOG_DEBUG, "OUT : get_cache_file() = NULL"); push_message("failed to read.\n"); return(NULL); } LOG(LOG_DEBUG, "OUT : get_cache_file()"); return(contents); } else { if(unlink(outfile) != 0){ g_free(command); LOG(LOG_CRITICAL, "Failed to unlink %s", outfile); push_message("failed to unlink cache.\n"); return(NULL); } } // Apply filter sprintf(tmpout, "%s%s%s", temp_dir, DIR_DELIMITER, "filter.tmp"); unlink(tmpout); p = command; i = 0; while(1){ if (*p == '\0'){ buff[i] = '\0'; break; } if(*p == '%'){ switch (*(p+1)){ case 'f': #ifdef __WIN32__ buff[i] = '\"'; i++; #endif strcpy(&buff[i], path); i = i + strlen(path); #ifdef __WIN32__ buff[i] = '\"'; i++; #endif p = p + 2; break; case 'o': #ifdef __WIN32__ buff[i] = '\"'; i++; #endif strcpy(&buff[i], tmpout); i = i + strlen(tmpout); #ifdef __WIN32__ buff[i] = '\"'; i++; #endif p = p + 2; break; } } else { buff[i] = *p; p++; i++; } } r = launch_external(buff, TRUE); check_cache_size(); if(r == 0){ rename(tmpout, outfile); if(g_file_get_contents(outfile, &contents, &length, &error) == FALSE){ LOG(LOG_DEBUG, "OUT : get_cache_file() = NULL"); push_message("failed to read.\n"); return(NULL); } LOG(LOG_DEBUG, "OUT : get_cache_file()"); return(contents); } else { LOG(LOG_DEBUG, "OUT : get_cache_file() = NULL"); push_message("failed to execute filter.\n"); return(NULL); } } typedef struct { gchar *name; time_t ctime; off_t size; } CACHE_INFO; static gint totalsize=0; static void list_file_recursive(gchar *dirname, gint depth) { GDir *dir; const gchar *name; gchar fullpath[512]; struct stat fstat; gint r; CACHE_INFO *cache; if((dir = g_dir_open(dirname, 0, NULL)) == NULL){ LOG(LOG_CRITICAL, "Failed to open directory %s", dirname); LOG(LOG_DEBUG, "OUT : list_file_recursive()"); return; } while((name = g_dir_read_name(dir)) != NULL){ if(strcmp(dirname,"/")==0){ sprintf(fullpath,"/%s",name); } else { sprintf(fullpath,"%s%s%s",dirname, DIR_DELIMITER, name); } if(g_file_test(fullpath, G_FILE_TEST_IS_REGULAR) == TRUE){ r = stat(fullpath, &fstat); if(r != 0){ LOG(LOG_CRITICAL, "Failed to stat file %s : %s", fullpath, strerror(errno)); return; } cache = g_new(CACHE_INFO, 1); cache->name = strdup(fullpath); cache->ctime = fstat.st_ctime; cache->size = fstat.st_size; grep_file_list = g_list_append(grep_file_list, cache); totalsize += cache->size; } else if(g_file_test(fullpath, G_FILE_TEST_IS_DIR) == TRUE){ list_file_recursive(fullpath, depth+1); } } g_dir_close(dir); } static gint compare_func(gconstpointer a, gconstpointer b){ if(((CACHE_INFO *)(a))->ctime < ((CACHE_INFO *)(b))->ctime) return(-1); else return(1); } static void check_cache_size() { GList *l; LOG(LOG_DEBUG, "IN : check_cache_size()"); // Create file list. // First, clear. l = g_list_first(grep_file_list); while(l != NULL){ g_free(((CACHE_INFO *)(l->data))->name); g_free(l->data); l = g_list_next(l); } if(grep_file_list) { g_list_free(grep_file_list); } grep_file_list = NULL; totalsize=0; // Search recursively list_file_recursive(cache_dir, 0); // Do nothing if within maximum cache size. if(totalsize < cache_size * 1000000){ LOG(LOG_DEBUG, "OUT : check_cache_size() = NOP"); return; } // Sort by date g_list_sort(grep_file_list, compare_func); l = g_list_first(grep_file_list); while(totalsize >= cache_size * 1000000){ if(l == NULL) break; LOG(LOG_DEBUG, "unlink %s",((CACHE_INFO *)(l->data))->name); unlink(((CACHE_INFO *)(l->data))->name); totalsize -= ((CACHE_INFO *)(l->data))->size; l = g_list_next(l); } LOG(LOG_DEBUG, "OUT : check_cache_size()"); } ebview-0.3.6.2/src/external.c0000644000175000017500000001210510013675515015236 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "eb.h" #include #ifndef __WIN32__ #include #endif #define USE_EXEC 1 gint launch_external(gchar *cmd, gboolean wait){ #ifdef __WIN32__ PROCESS_INFORMATION pinfo; STARTUPINFO sinfo; #else pid_t pid; gchar *words[128]; gint status; #endif #ifdef __WIN32__ ZeroMemory(&sinfo, sizeof(sinfo)); sinfo.cb = sizeof(sinfo); LOG(LOG_DEBUG, "Lanuching external command : %s", cmd); if(!CreateProcess(NULL, cmd, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &sinfo, &pinfo)){ LOG(LOG_CRITICAL, "Failed to execute command : %s", cmd); return(0); } CloseHandle(pinfo.hThread); if(wait == TRUE) WaitForSingleObject(pinfo.hProcess, INFINITE); CloseHandle(pinfo.hProcess); return(0); #else switch(pid = fork()){ case -1: LOG(LOG_CRITICAL, "fork : %s", strerror(errno)); exit(1); case 0: LOG(LOG_DEBUG, "Lanuching external command : %s", cmd); #ifdef USE_EXEC split_word(cmd, words); if(execvp(words[0], words) == -1){ LOG(LOG_CRITICAL, "exec : %s", strerror(errno)); free_words(words); _exit(100); break; } free_words(words); #else system(cmd); #endif _exit(0); break; default: if(wait == TRUE) { waitpid(pid, &status, 0); LOG(LOG_DEBUG, "Child exited with status %d\n", WEXITSTATUS(status)); if(WIFEXITED(status) == 0){ LOG(LOG_WARNING, "Child exited abnormally with status %d\n", WEXITSTATUS(status)); return(WEXITSTATUS(status)); } } } return(0); #endif } #ifdef __WIN32__ static gchar *g_filename=NULL; static pthread_t tid; static void *play_background(void *arg) { MCI_OPEN_PARMS open_parms; MCI_PLAY_PARMS play_parms; MCI_GENERIC_PARMS parms; open_parms.wDeviceID = 0; open_parms.lpstrDeviceType = "waveaudio"; open_parms.lpstrElementName = g_filename; if(mciSendCommand(0,MCI_OPEN,MCI_WAIT|MCI_OPEN_TYPE|MCI_OPEN_ELEMENT,(DWORD)&open_parms) == 0){ play_parms.dwFrom = 0; mciSendCommand(open_parms.wDeviceID,MCI_PLAY,MCI_WAIT|MCI_FROM,(DWORD)&play_parms); mciSendCommand(open_parms.wDeviceID,MCI_STOP,MCI_WAIT,(DWORD)&parms); mciSendCommand(open_parms.wDeviceID,MCI_CLOSE,MCI_WAIT,(DWORD)NULL); } } #endif void play_multimedia(gchar *filename, gint type) { gchar cmd[512]; gchar *p; gchar *template; LOG(LOG_DEBUG, "IN : play_multimedia(%s, %d)", filename, type); switch(type){ case TAG_TYPE_MOVIE: template = strdup(mpeg_template); break; case TAG_TYPE_SOUND: #ifdef __WIN32__ if(bplay_sound_internally){ pthread_attr_t thread_attr; gint rc; if(g_filename) g_free(g_filename); g_filename = g_strdup(filename); pthread_attr_init (&thread_attr) ; pthread_attr_setstacksize (&thread_attr, 512*1024) ; LOG(LOG_DEBUG, "thread_create"); rc = pthread_create(&tid, &thread_attr, play_background, (void *)NULL); if(rc != 0){ LOG(LOG_CRITICAL, "pthread_create: %s", strerror(errno)); LOG(LOG_DEBUG, "OUT : thread_search()"); exit(1); } LOG(LOG_DEBUG, "thread_created"); pthread_attr_destroy(&thread_attr); return; } #endif template = strdup(wave_template); break; default: return; break; } if((template == NULL) || (strlen(template) == 0)){ #ifdef __WIN32__ HINSTANCE hi; hi = ShellExecute(NULL, "open", filename, NULL, NULL, SW_SHOWNORMAL); if(hi <= 32){ LOG(LOG_CRITICAL, "ShellExecute() failed : %d", hi); } #else if(template) g_free(template); #endif LOG(LOG_DEBUG, "OUT : play_multimedia()"); return; } p = strstr(template, "%f"); if(p != NULL){ *p = '%'; p++; *p = 's'; } sprintf(cmd, template, filename); launch_external(cmd, FALSE); free(template); LOG(LOG_DEBUG, "OUT : play_multimedia()"); } void launch_web_browser(gchar *url){ gchar *p; gchar *template; gchar cmd[512]; LOG(LOG_DEBUG, "IN : launch_web_browser()"); if((browser_template == NULL) || (strlen(browser_template) == 0)){ #ifdef __WIN32__ HINSTANCE hi; hi = ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); if(hi <= 32){ LOG(LOG_CRITICAL, "ShellExecute() failed : %d", hi); } #else LOG(LOG_CRITICAL, _("Web browser not set")); #endif return; } template = strdup(browser_template); p = strstr(template, "%f"); if(p != NULL){ *p = '%'; p++; *p = 's'; } sprintf(cmd, template, url); launch_external(cmd, FALSE); g_free(template); LOG(LOG_DEBUG, "OUT : launch_web_browser()"); } ebview-0.3.6.2/src/headword.h0000644000175000017500000000215310013675515015220 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __HEADWORD_H_ #define __HEADWORD_H_ #include "defs.h" void show_result_tree(); void select_first_item(); void item_next(); void item_previous(); void next_heading(GtkWidget *widget, gpointer *data); void previous_heading(GtkWidget *widget, gpointer *data); GtkWidget *create_headword_tree(); void update_tree_view(); #endif /* __HEADWORD_H__ */ ebview-0.3.6.2/src/grep.c0000644000175000017500000006564011241635664014372 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #ifndef __WIN32__ #include #endif #include "defs.h" #include "bmh.h" #include "eb.h" #include "dialog.h" #include "dirtree.h" #include "external.h" #include "filter.h" #include "global.h" #include "headword.h" #include "history.h" #include "jcode.h" #include "mainwindow.h" #include "misc.h" #include "pref_io.h" #include "reg.h" #include "textview.h" #include "thread_search.h" #include #define EBOOK_MAX_KEYWORDS 256 void grep_file(gchar *file, gchar *word, gint method); static void *grep_search_thread(void *arg); static void list_file_recursive(gchar *dirname, gint depth, gchar *pat); static GList *grep_file_list=NULL; static gchar *gword=NULL; static GtkWidget *grep_bar=NULL; GtkWidget *combo_dirgroup=NULL; extern GtkTextBuffer *text_buffer; extern GtkWidget *main_view; extern GtkWidget *directory_view; extern GtkWidget *note_tree; void grep_search(gchar *word){ LOG(LOG_DEBUG, "IN : grep_search()"); clear_search_result(); /* grep_search_thread(word); show_result_tree(); return; */ if(gword != NULL) g_free(gword); gword = strdup(word); thread_search(TRUE, _("File Search"), grep_search_thread, gword); LOG(LOG_DEBUG, "OUT : grep_search()"); } gchar *remove_non_ascii(gchar *str) { gchar *ret; gchar *p; p = ret = g_strdup(str); while(*p != '\0') { if(!isascii(*p)) *p = 0x20; p ++; } return(ret); } void remember_line(gchar *file, gint page, gint line, gint offset, gchar *heading, gchar *word, gint code){ RESULT *rp; gchar *tmp; gchar *p; gchar *start; gint i; gchar buff[512]; gchar *here; LOG(LOG_DEBUG, "IN : remember_line(%s, %d, %s, %s, %d)", file, line, heading, word, code); rp = g_new0(RESULT,1); p = heading; while((*p == ' ') || (*p == '\t')) p++; switch(code){ case KCODE_EUC: tmp = iconv_convert2("euc-jp", "utf-8", p); break; case KCODE_JIS: tmp = iconv_convert2("iso-2022-jp", "utf-8", p); break; case KCODE_SJIS: tmp = iconv_convert2("Shift_JIS", "utf-8", p); break; case KCODE_ASCII: tmp = remove_non_ascii(heading); break; default: g_free(rp->word); g_free(rp); return; break; } rp->word = iconv_convert("euc-jp", "utf-8", word); // Extract 10 characters before/ after keyword here = (gchar *) simple_search((guchar *) rp->word, (guchar *) tmp, strlen(tmp), bignore_case); if(here != NULL){ p = here; for(i=0; i < additional_chars ; i ++){ p = g_utf8_find_prev_char(tmp, p); if(p == NULL) { p = tmp; break; } } start = p; if(start != tmp){ strcpy(buff, "...."); g_utf8_strncpy(&buff[4], start, additional_chars*2+g_utf8_strlen(word, -1)); } else { g_utf8_strncpy(buff, start, additional_chars + i + g_utf8_strlen(word, -1)); } if(g_utf8_strlen(buff, -1) == additional_chars*2+g_utf8_strlen(word, -1)) strcat(buff, "...."); rp->heading = strdup(buff); g_free(tmp); } else { rp->heading = tmp; } rp->type = RESULT_TYPE_GREP; rp->data.grep.filename = native_to_generic(file); // rp->data.grep.filename = strdup(file); rp->data.grep.page = page; rp->data.grep.line = line; rp->data.grep.offset = offset; add_result(rp); LOG(LOG_DEBUG, "OUT : remember_line()"); } enum { METHOD_REGEX, METHOD_BMH, METHOD_SIMPLE }; BMH_TABLE *bmh_euc[EBOOK_MAX_KEYWORDS]; BMH_TABLE *bmh_sjis[EBOOK_MAX_KEYWORDS]; REG_TABLE *reg_euc=NULL; REG_TABLE *reg_sjis=NULL; void grep_file(gchar *file, gchar *word, gint method){ gchar *contents; gchar *p, *pp; gint page; gint line; guchar c1; gchar *r=NULL; gint i; gint code; BMH_TABLE **bmh=NULL; REG_TABLE *reg=NULL; gchar *utf_filename; LOG(LOG_DEBUG, "IN : grep_file(%s, %s %d)", file, word, method); utf_filename = fs_to_unicode(file); push_message(utf_filename); g_free(utf_filename); contents = get_cache_file(file); if(contents == NULL) { LOG(LOG_DEBUG, "OUT : grep_file() : NOP"); return; } // For higher performance, specially handle EUC and SJIS code = guess_kanji(max_bytes_to_guess, (guchar *) contents); switch(code){ gchar *tmp; case KCODE_EUC: push_message(" (EUC)"); LOG(LOG_DEBUG, "EUC"); bmh = bmh_euc; reg = reg_euc; break; case KCODE_JIS: push_message(" (JIS)"); LOG(LOG_DEBUG, "JIS"); tmp = iconv_convert2("iso-2022-jp", "euc-jp", contents); g_free(contents); contents = tmp; bmh = bmh_euc; reg = reg_euc; code = KCODE_EUC; break; case KCODE_SJIS: push_message(" (SJIS)"); LOG(LOG_DEBUG, "SJIS"); bmh = bmh_sjis; reg = reg_sjis; break; case KCODE_ASCII: push_message(" (ASCII)"); LOG(LOG_DEBUG, "ASCII"); bmh = bmh_euc; reg = reg_euc; break; default: push_message(" (Unknown code) ... skipped."); LOG(LOG_INFO, "Unknown kanji code : %s", file); g_free(contents); return; break; } push_message(" ... "); // Split into lines p = contents; pp = contents; line = 1; page = 1; while(1){ if(*pp == '\0'){ if(method == METHOD_BMH) { for(i=0; i < EBOOK_MAX_KEYWORDS; i++) { if(bmh[i] == NULL) break; r = bmh_search(bmh[i], p, pp - p); if(r == NULL) break; } } else if (method == METHOD_REGEX) r = regex_search(reg, p); else r = simple_search(word, p, pp - p, bignore_case); if(r != NULL) remember_line(file, page, line, p - contents, p, word, code); break; } else if((*pp == 0x0a) || (*pp == 0x0d)) { c1 = *pp; *pp = '\0'; if(method == METHOD_BMH) for(i=0; i < EBOOK_MAX_KEYWORDS; i++) { if(bmh[i] == NULL) break; r = bmh_search(bmh[i], p, pp - p); if(r == NULL) break; } else if (method == METHOD_REGEX) r = regex_search(reg, p); else r = simple_search(word, p, pp - p, bignore_case); if(r != NULL) remember_line(file, page, line, p - contents, p, word, code); *pp = c1; if((*pp == 0x0d) && (*(pp+1) == 0x0a)) { p = pp = pp + 2; } else { p = pp = pp + 1; } line ++; } else if(*pp == 0x0c){ page++; pp++; } else { pp++; } } g_free(contents); push_message("OK\n"); pthread_testcancel(); LOG(LOG_DEBUG, "OUT : grep_file()"); } static void list_file_recursive(gchar *dirname, gint depth, gchar *pat) { GDir *dir; const gchar *name; gchar fullpath[512]; //LOG(LOG_DEBUG, "IN : list_file_recursive(%s, %d, %s)", dirname, depth, pat); if((dir = g_dir_open(dirname, 0, NULL)) == NULL){ if(g_file_test(dirname, G_FILE_TEST_IS_REGULAR) == TRUE){ if(pat != NULL) { // If it matches the pattern ? if((strstr(dirname, pat) != NULL) && (strlen(strstr(dirname, pat))== strlen(pat))) grep_file_list = g_list_append(grep_file_list, strdup(dirname)); } else { grep_file_list = g_list_append(grep_file_list, strdup(dirname)); } return; } // LOG(LOG_CRITICAL, "Failed to determine the type of %s.", dirname); LOG(LOG_DEBUG, "OUT : list_file_recursive()"); return; } while((name = g_dir_read_name(dir)) != NULL){ if(strcmp(dirname,"/")==0){ sprintf(fullpath,"/%s",name); } else if ((dirname[strlen(dirname) -1] == '\\') || (dirname[strlen(dirname) -1] == '/')){ sprintf(fullpath,"%s%s",dirname, name); } else { sprintf(fullpath,"%s%s%s",dirname, DIR_DELIMITER, name); } if(g_file_test(fullpath, G_FILE_TEST_IS_REGULAR) == TRUE){ if(pat != NULL) { // If it matches the pattern ? if((strstr(fullpath, pat) != NULL) && (strlen(strstr(fullpath, pat))== strlen(pat))) grep_file_list = g_list_append(grep_file_list, strdup(fullpath)); } else { grep_file_list = g_list_append(grep_file_list, strdup(fullpath)); } } else if(g_file_test(fullpath, G_FILE_TEST_IS_DIR) == TRUE){ // if(depth < 10) list_file_recursive(fullpath, depth+1, pat); } } g_dir_close(dir); //LOG(LOG_DEBUG, "OUT : list_file_recursive()"); } static gint compare_func(gconstpointer a, gconstpointer b){ return(strcmp(a,b)); } static gboolean includes_meta_char(guchar *word) { if((strchr(word, '^') != NULL) || (strchr(word, '$') != NULL) || (strchr(word, '[') != NULL) || //(strchr(word, ']') != NULL) || // Because there must be '[' //(strchr(word, '-') != NULL) || // Because there must be '[' (strchr(word, '.') != NULL) || (strchr(word, '*') != NULL) || (strchr(word, '+') != NULL) || (strchr(word, '?') != NULL) || (strchr(word, '|') != NULL) || (strchr(word, '{') != NULL) || (strchr(word, '}') != NULL) || //(strchr(word, ',') != NULL) || // Because there must be '{' (strchr(word, '(') != NULL) || (strchr(word, ')') != NULL)){ return(TRUE); } else { return(FALSE); } } static void *grep_search_thread(void *arg) { gint state; GList *l; gint i, j; gint filecount; gchar *word = (gchar *)arg; gint method; gchar *l_word=NULL; gchar *dirname=NULL; gchar *p; char *keywords[EBOOK_MAX_KEYWORDS + 1]; gchar *sjis_word; GList *dir_list=NULL; const gchar *group; LOG(LOG_DEBUG, "IN : grep_search_thread()"); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &state); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &state); // Create file list push_message(_("Listing files...")); // Clear first l = g_list_first(grep_file_list); while(l != NULL){ g_free(l->data); l = g_list_next(l); } if(grep_file_list) { g_list_free(grep_file_list); } grep_file_list = NULL; group = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry)); if(strcmp(group, _("Manual Select")) == 0) { dir_list = get_active_dir_list(); g_list_sort(dir_list, compare_func); l = g_list_first(dir_list); while(l){ // Find recursively dirname = generic_to_native(l->data); list_file_recursive(dirname, 0, NULL); g_free(dirname); l = g_list_next(l); } // Sort by name (full path) g_list_sort(grep_file_list, compare_func); // Remove duplicate file l = g_list_first(grep_file_list); while(l){ GList *next = l->next; if((next != NULL) && (strcmp(l->data, next->data) == 0)){ g_free(next->data); grep_file_list = g_list_delete_link(grep_file_list, next); continue; } l = g_list_next(l); } } else { GtkTreeIter iter; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gchar *title; gchar *list; gboolean active; gchar *p, *pp; gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, DIRGROUP_LIST_COLUMN, &list, DIRGROUP_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ p = list; pp = NULL; while(1){ pp = strchr(p, '\n'); if(pp == NULL){ dir_list = g_list_append(dir_list, g_strdup(p)); break; } else { *pp = '\0'; if(strlen(p) != 0) dir_list = g_list_append(dir_list, g_strdup(p)); *pp = '\n'; p = pp + 1; } } } g_free(title); g_free(list); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } l = g_list_first(dir_list); while(l){ gchar *p; // Find recursively dirname = unicode_to_fs(l->data); p = strchr(dirname, ','); if(p == NULL) { list_file_recursive(dirname, 0, NULL); } else { *p = '\0'; p ++; list_file_recursive(dirname, 0, p); } g_free(dirname); g_free(l->data); l = g_list_next(l); } // Sort by name (full path) g_list_sort(grep_file_list, compare_func); } push_message(_("done\n")); g_list_free(dir_list); // Determine if it is a regular expression if ((word[0] == '\"') && (word[strlen(word) -1] == '\"')){ method = METHOD_BMH; l_word = g_strndup(&word[1], strlen(word) - 2); push_message(_("Force ordinary text.\n")); } else if(includes_meta_char(word) == TRUE){ method = METHOD_REGEX; l_word = g_strdup(word); push_message(_("Seems like regular expression.\n")); // If the word is between / and /, it is a regular expression } else if ((word[0] == '/') && (word[strlen(word) -1] == '/')){ method = METHOD_REGEX; l_word = g_strndup(&word[1], strlen(word) - 2); push_message(_("Force regular expression.\n")); } else { method = METHOD_BMH; l_word = g_strdup(word); push_message(_("Seems like ordinary text.\n")); } if(method == METHOD_BMH) { for(i=0; i < EBOOK_MAX_KEYWORDS; i++) { bmh_euc[i] = NULL; bmh_sjis[i] = NULL; } split_word(l_word, keywords); for(i=0, j=0; i < EBOOK_MAX_KEYWORDS; i++){ if(keywords[i] == NULL) break; if(keywords[i][0] != '\0'){ bmh_euc[j] = bmh_prepare(keywords[i], bignore_case); sjis_word = iconv_convert("euc-jp", "Shift_JIS", keywords[i]); bmh_sjis[j] = bmh_prepare(sjis_word, bignore_case); g_free(sjis_word); j++; } } free_words(keywords); } else if (method == METHOD_REGEX) { reg_euc = regex_prepare(l_word, bignore_case); sjis_word = iconv_convert("euc-jp", "Shift_JIS", l_word); reg_sjis = regex_prepare(sjis_word, bignore_case); g_free(sjis_word); if((reg_euc == NULL) || (reg_sjis == NULL)){ push_message(_("Failed to compile pattern.\n")); goto END; } } push_message(_("\nSearching following files...\n")); // g_list_length() does not work. Why ? //filecount = g_list_length(grep_file_list); l = g_list_first(grep_file_list); i=0; while(l != NULL){ l = g_list_next(l); i++; } filecount = i; l = g_list_first(grep_file_list); i=0; while(l != NULL){ #ifdef __WIN32__ p = strrchr(l->data, '\\'); #else p = strrchr(l->data, '/'); #endif if(p == NULL){ set_cancel_dlg_text(l->data); } else { set_cancel_dlg_text(p+1); } grep_file(l->data, l_word, method); set_progress((gfloat)(i+1) / filecount); l = g_list_next(l); i++; } if(method == METHOD_BMH) { for(i=0; i < EBOOK_MAX_KEYWORDS; i++) { if(bmh_euc[i] != NULL) bmh_free(bmh_euc[i]); if(bmh_sjis[i] != NULL) bmh_free(bmh_sjis[i]); } } else if (method == METHOD_REGEX){ regex_free(reg_euc); regex_free(reg_sjis); } push_message(_("\nFile search completed.\n")); END: if(l_word) g_free(l_word); thread_end(); LOG(LOG_DEBUG, "OUT : grep_search_thread()"); return(NULL); } void show_file(RESULT *rp) { gchar *contents; gchar *utf_str; GtkTextIter iter; GtkTextMark *mark = NULL; GtkTextIter *bow, *eow; gchar *filename; GtkTextIter *bol, *eol; gchar *p; gchar *line_text; gchar *r; GtkTextIter start, end; gchar *segment; gint segment_start, segment_end; gint i; gint line_no=0; gint count; char *keywords[EBOOK_MAX_KEYWORDS + 1]; gint code; g_assert(rp->type == RESULT_TYPE_GREP); LOG(LOG_DEBUG, "IN : show_file(%s, %d)", rp->data.grep.filename, rp->data.grep.line); filename = generic_to_native(rp->data.grep.filename); contents = get_cache_file(filename); if(contents == NULL) return; code = guess_kanji(max_bytes_to_guess, contents); switch(code){ gchar *tmp; case KCODE_EUC: break; case KCODE_JIS: tmp = iconv_convert2("iso-2022-jp", "euc-jp", contents); g_free(contents); contents = tmp; break; case KCODE_SJIS: break; case KCODE_ASCII: break; default: LOG(LOG_INFO, "Unknown kanji code : %s", filename); g_free(contents); g_free(filename); return; break; } g_free(filename); // Extract several lines before and after the matched line for(i=rp->data.grep.offset, count = 0 ; i > 0 ; i --){ if(contents[i] == 0x0a) { count++; if((i != 0) && (contents[i -1] == 0x0d)) { i --; } } else if (contents[i] == 0x0d) { count++; } if(count > additional_lines){ if((contents[i] == 0x0d) && (contents[i] == 0x0d)) i += 2; else i += 1; line_no = count-1; break; } } if(i <= 0) line_no = count; segment_start = i; if(segment_start < 0) segment_start = 0; for(i=rp->data.grep.offset, count = 0 ; contents[i] != '\0' ; i ++){ if(contents[i] == 0x0a) { count++; } else if (contents[i] == 0x0d) { count++; if(contents[i + 1] == 0x0a) { i ++; } } if(count > additional_lines){ break; } } segment_end = i; segment = g_strndup(&contents[segment_start], segment_end - segment_start); if(code == KCODE_SJIS){ utf_str = iconv_convert("Shift_JIS", "utf-8", segment); } else { utf_str = iconv_convert("euc-jp", "utf-8", segment); } // Clear text buffer gtk_text_buffer_get_bounds (text_buffer, &start, &end); gtk_text_buffer_delete(text_buffer, &start, &end); gtk_text_buffer_get_start_iter (text_buffer, &iter); gtk_text_buffer_insert_with_tags( text_buffer, &iter, utf_str, -1, tag_plain, NULL); g_free(contents); g_free(segment); g_free(utf_str); /* gtk_text_buffer_get_start_iter (text_buffer, &iter); gtk_text_iter_set_line(&iter, line - 1); */ gtk_text_buffer_get_iter_at_line(text_buffer, &iter, line_no); mark = gtk_text_buffer_create_mark(text_buffer, "mark", &iter, TRUE); gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(main_view), mark, 0.0, TRUE, 0.0, 0.1); gtk_text_buffer_delete_mark(text_buffer, mark); bol = gtk_text_iter_copy(&iter); gtk_text_iter_forward_line(&iter); eol = gtk_text_iter_copy(&iter); gtk_text_buffer_apply_tag(text_buffer, tag_reverse, bol, eol); gtk_text_iter_free(bol); gtk_text_iter_free(eol); // Emphasize keyword if((includes_meta_char(rp->word) == TRUE) || ((rp->word[0] == '/') && (rp->word[strlen(rp->word) -1] == '/'))){ goto END; } split_word(rp->word, keywords); for(i=0; i < EBOOK_MAX_KEYWORDS; i++){ if(keywords[i] == NULL) break; if(keywords[i][0] != '\0'){ gtk_text_buffer_get_start_iter (text_buffer, &iter); while(1){ bol = gtk_text_iter_copy(&iter); if(gtk_text_iter_forward_line(&iter) == FALSE) break; eol = gtk_text_iter_copy(&iter); line_text = gtk_text_buffer_get_text(text_buffer, bol, eol, FALSE); p = line_text; while(1){ r = simple_search(keywords[i], (guchar *)p, strlen(p), bignore_case); if(r == NULL) break; gtk_text_iter_set_line_index(bol, r - line_text); bow = gtk_text_iter_copy(bol); gtk_text_iter_set_line_index(bol, r - line_text + strlen(keywords[i])); eow = gtk_text_iter_copy(bol); gtk_text_buffer_apply_tag(text_buffer, tag_colored, bow, eow); gtk_text_iter_free(bow); gtk_text_iter_free(eow); p = r + strlen(keywords[i]); } g_free(line_text); gtk_text_iter_free(bol); gtk_text_iter_free(eol); } } } free_words(keywords); gtk_text_buffer_get_start_iter(text_buffer, &iter); gtk_text_buffer_place_cursor(text_buffer, &iter); END: LOG(LOG_DEBUG, "OUT : show_file()"); } void open_file(RESULT *rp) { GtkTreeIter iter; gchar *p; gint found = 0; gchar *ext; gchar *open_command=NULL; gchar buff[512]; gchar tmp[512]; gint i; gint r; gchar *filename; g_assert(rp->type == RESULT_TYPE_GREP); LOG(LOG_DEBUG, "IN : open_file(%s)", rp->data.grep.filename); filename = generic_to_native(rp->data.grep.filename); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(filter_store), &iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, FILTER_EXT_COLUMN, &ext, FILTER_OPEN_COMMAND_COLUMN, &open_command, -1); if(match_extension(filename, ext) == TRUE){ found = 1; break; } else { g_free(open_command); open_command = NULL; } g_free(ext); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(filter_store), &iter) == TRUE); } if((found == 0) || (open_command == NULL) || (strlen(open_command) == 0)) { #ifdef __WIN32__ HINSTANCE hi; hi = ShellExecute(NULL, "open", filename, NULL, NULL, SW_SHOWNORMAL); if((int)hi > 32){ LOG(LOG_DEBUG, "OUT : open_file() = ShellExecute"); return; } #endif LOG(LOG_DEBUG, "use default command"); g_free(open_command); if((open_template == NULL) || (strlen(open_template) == 0)){ LOG(LOG_DEBUG, "OUT : open_file() : failed"); return; } open_command = strdup(open_template); } p = open_command; i = 0; while(1){ if (*p == '\0'){ buff[i] = '\0'; break; } if(*p == '%'){ switch (*(p+1)){ case 'f': #ifdef __WIN32__ buff[i] = '\"'; i++; #endif strcpy(&buff[i], filename); i = i + strlen(filename); #ifdef __WIN32__ buff[i] = '\"'; i++; #endif p = p + 2; break; case 'p': sprintf(tmp, "%d", rp->data.grep.page); strcpy(&buff[i], tmp); i = i + strlen(tmp); p = p + 2; break; case 'l': sprintf(tmp, "%d", rp->data.grep.line); strcpy(&buff[i], tmp); i = i + strlen(tmp); p = p + 2; break; } } else { buff[i] = *p; p++; i++; } } g_free(open_command); g_free(filename); r = launch_external(buff, FALSE); if(r == 0){ LOG(LOG_DEBUG, "OUT : open_file()"); return; } else { LOG(LOG_DEBUG, "OUT : open_file() : failed"); return; } } static gint ignore_case_toggled(GtkWidget *widget, gpointer data) { LOG(LOG_DEBUG, "IN : ignore_case_toggled()"); bignore_case = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); LOG(LOG_DEBUG, "OUT : ignore_case_toggled(%d)", bignore_case); return(FALSE); } static gint suppress_hidden_toggled(GtkWidget *widget, gpointer data) { LOG(LOG_DEBUG, "IN : suppress_hidden_toggled()"); bsuppress_hidden_files = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); refresh_directory_tree(); LOG(LOG_DEBUG, "OUT : suppress_hidden_toggled(%d)", bignore_case); return(FALSE); } static gint dirgroup_changed (GtkWidget *combo){ const gchar *text; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : dirgroup_changed()"); text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry)); if(strcmp(text, _("Manual Select")) == 0) { if((note_tree != NULL) && ( ebook_search_method() == SEARCH_METHOD_GREP) && (gtk_notebook_get_current_page(GTK_NOTEBOOK(note_tree)) != 3)) gtk_notebook_set_current_page(GTK_NOTEBOOK(note_tree), 3); if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gtk_list_store_set (dirgroup_store, &iter, DIRGROUP_ACTIVE_COLUMN, FALSE, -1); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } goto END; // gtk_widget_set_sensitive(directory_view, TRUE); } else { // gtk_widget_set_sensitive(directory_view, FALSE); } if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gchar *title; gtk_tree_model_get (GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, -1); if(strcmp(title, text) == 0){ gtk_list_store_set (dirgroup_store, &iter, DIRGROUP_ACTIVE_COLUMN, TRUE, -1); } else { gtk_list_store_set (dirgroup_store, &iter, DIRGROUP_ACTIVE_COLUMN, FALSE, -1); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } END: save_dirgroup(); LOG(LOG_DEBUG, "OUT : dirgroup_changed()"); return(FALSE); } GtkWidget *create_grep_bar() { GtkWidget *button; GList *list=NULL; gchar *old_group=NULL; gboolean active_found; gboolean old_found; GtkTreeIter active_iter; GtkTreeIter old_iter; GtkTreeIter iter; gchar *title; GList *children; GtkBoxChild *child; LOG(LOG_DEBUG, "IN : create_grep_bar()"); if(grep_bar){ old_group = strdup(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry))); children = GTK_BOX(grep_bar)->children; while(children){ child = children->data; children = children->next; gtk_widget_destroy(child->widget); } } else { grep_bar = gtk_hbox_new(FALSE, 0); } gtk_container_set_border_width(GTK_CONTAINER(grep_bar), 1); combo_dirgroup = gtk_combo_new(); gtk_widget_set_size_request(GTK_WIDGET(combo_dirgroup), 120, 10); gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(combo_dirgroup)->entry), FALSE); g_signal_connect(G_OBJECT (GTK_COMBO(combo_dirgroup)->entry), "changed", G_CALLBACK(dirgroup_changed), NULL); gtk_box_pack_start(GTK_BOX(grep_bar), combo_dirgroup, FALSE, FALSE, 0); button = gtk_check_button_new_with_label(_("Suppress Hidden Files")); gtk_box_pack_start(GTK_BOX (grep_bar), button, FALSE, FALSE, 5); g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(suppress_hidden_toggled), NULL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), bsuppress_hidden_files); gtk_tooltips_set_tip(tooltip, button, _("Suppress files whose name start with dot."),"Private"); button = gtk_check_button_new_with_label(_("Ignore Case")); gtk_box_pack_start(GTK_BOX (grep_bar), button, FALSE, FALSE, 5); g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(ignore_case_toggled), NULL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), bignore_case); gtk_tooltips_set_tip(tooltip, button, _("When checked, uppercase letters and lowercase letters are regarded as identical."),"Private"); active_found = FALSE; old_found = FALSE; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE){ do { gchar *title; gboolean active; gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &iter, DIRGROUP_TITLE_COLUMN, &title, DIRGROUP_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ active_found = TRUE; active_iter = iter; } if(old_group && (strcmp(title, old_group) == 0)){ old_found = TRUE; old_iter = iter; } list = g_list_append(list, g_strdup(title)); g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dirgroup_store), &iter) == TRUE); } list = g_list_append(list, g_strdup(_("Manual Select"))); if(g_list_length(list) != 0) gtk_combo_set_popdown_strings( GTK_COMBO(combo_dirgroup), list) ; if(active_found == TRUE){ gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &active_iter, DIRGROUP_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); } else if (old_found == TRUE){ gtk_tree_model_get(GTK_TREE_MODEL(dirgroup_store), &old_iter, DIRGROUP_TITLE_COLUMN, &title, -1); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), title); g_free(title); gtk_tree_store_set(GTK_TREE_STORE(dirgroup_store), &old_iter, DIRGROUP_ACTIVE_COLUMN, TRUE, -1); } else { gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo_dirgroup)->entry), _("Manual Select")); } LOG(LOG_DEBUG, "OUT : create_grep_bar()"); return(grep_bar); } void update_grep_bar() { LOG(LOG_DEBUG, "IN : update_grep_bar()"); gtk_widget_hide(grep_bar); create_grep_bar(); gtk_widget_show_all(grep_bar); LOG(LOG_DEBUG, "OUT : update_grep_bar()"); } ebview-0.3.6.2/src/pref_shortcut.c0000644000175000017500000003415710016042575016313 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "xml.h" #include #include "mainwindow.h" #include "headword.h" #include "shortcutfunc.h" #include "shortcut.h" #include "mainmenu.h" #include "dictbar.h" #include "statusbar.h" #include "shortcut.h" #include "pref_io.h" #include "textview.h" #ifndef __WIN32__ #include #endif static GtkWidget *shortcut_view; static GtkWidget *command_view; static GtkWidget *label_key; static GtkWidget *check_lock; static GtkListStore *command_store; static GtkWidget *grab_dlg; static gboolean grab=FALSE; static GdkEventKey grabbed_event; static guint timeout_id; enum { COMMAND_NAME_COLUMN, COMMAND_DESCRIPTION_COLUMN, COMMAND_COMMAND_COLUMN, COMMAND_N_COLUMNS }; struct _shortcut_command commands[] = { { N_("Toggle Menu Mar"), toggle_menu_bar}, { N_("Toggle Status Bar"), toggle_status_bar}, { N_("Toggle Dictionary Bar"), toggle_dict_bar}, { N_("Switch Pane Direction"), switch_direction}, { N_("Select Automatic Search"), select_any_search}, { N_("Select Exactword Search"), select_exactword_search}, { N_("Select Word Search"), select_word_search}, { N_("Select Endword Search"), select_endword_search}, { N_("Select Keyword Search"), select_keyword_search}, { N_("Select Multi Search"), select_multi_search}, { N_("Select Fulltext Search"), select_fulltext_search}, { N_("Select Internet Search"), select_internet_search}, { N_("Select File Search"), select_grep_search}, { N_("Next Dictionary Group"), next_dict_group}, { N_("Previous Dictionary Group"), previous_dict_group}, { N_("Toggle Dictionary No. 1"), toggle_dictionary1}, { N_("Toggle Dictionary No. 2"), toggle_dictionary2}, { N_("Toggle Dictionary No. 3"), toggle_dictionary3}, { N_("Toggle Dictionary No. 4"), toggle_dictionary4}, { N_("Toggle Dictionary No. 5"), toggle_dictionary5}, { N_("Toggle Dictionary No. 6"), toggle_dictionary6}, { N_("Toggle Dictionary No. 7"), toggle_dictionary7}, { N_("Toggle Dictionary No. 8"), toggle_dictionary8}, { N_("Toggle Dictionary No. 9"), toggle_dictionary9}, { N_("Toggle Dictionary No. 10"), toggle_dictionary10}, { N_("Next Hit"), item_next}, { N_("Previous Hit"), item_previous}, { N_("Copy To Clipboard"), copy_to_clipboard}, { N_("Paste From Clipboard"), paste_from_clipboard}, { N_("Start Search"), start_search}, { N_("Go Back In History"), go_back}, { N_("Go Forward In History"), go_forward}, { N_("Show Previous Text"), go_up}, { N_("Show Next Text"), go_down}, // { N_("Toggle Selection Search"), toggle_auto}, // { N_("Toggle Popup"), toggle_popup}, { N_("Show Help"), show_usage}, { N_("Clear Word"), clear_word}, { N_("Quit Program"), quit}, { N_("Iconify Window"), iconify}, { N_("Scroll Mainview Down"), scroll_mainview_down}, { N_("Scroll Mainview Up"), scroll_mainview_up}, { N_("Next Hits"), next_heading}, { N_("Prev. Hits"), previous_heading}, { N_("Increase Font Size"), increase_font_size}, { N_("Decrease Font Size"), decrease_font_size}, { N_("Expand Lines"), expand_lines}, { N_("Shrink Lines"), shrink_lines}, {NULL, NULL}}; gboolean pref_end_shortcut() { LOG(LOG_DEBUG, "IN : pref_end_shortcut()"); bignore_locks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_lock)); uninstall_shortcut(); install_shortcut(); save_shortcut(); LOG(LOG_DEBUG, "OUT : pref_end_shortcut()"); return(TRUE); } gboolean ungrab_server(gpointer data){ LOG(LOG_DEBUG, "IN : ungrab_server()"); if(grab == FALSE) return(TRUE); gtk_timeout_remove(timeout_id); #ifndef __WIN32__ gdk_x11_ungrab_server(); #endif if(GTK_IS_WIDGET(grab_dlg)) gtk_widget_destroy(grab_dlg); grab = FALSE; LOG(LOG_DEBUG, "OUT : ungrab_server()"); return(TRUE); } static void grab_server(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : grab_server()"); if(grab == TRUE) return; #ifndef __WIN32__ gdk_x11_grab_server(); timeout_id = gtk_timeout_add(10000, ungrab_server, NULL); grab = TRUE; #endif LOG(LOG_DEBUG, "OUT : grab_server()"); } void key_val_to_string(guint state, guint keyval, gchar *key){ LOG(LOG_DEBUG, "IN : key_val_to_string(state=%d, keyval=%d)", state, keyval); key[0] = '\0'; if(state & GDK_CONTROL_MASK){ strcat(key, "Ctrl + "); } if(state & GDK_SHIFT_MASK){ strcat(key, "Shift + "); } if(state & GDK_LOCK_MASK){ strcat(key, "Lock + "); } if(state & GDK_MOD1_MASK){ // Alt strcat(key, "Alt + "); } if(state & GDK_MOD2_MASK){ // Num Lock strcat(key, "NumLock + "); } if(state & GDK_MOD3_MASK){ strcat(key, "Mod3 + "); } if(state & GDK_MOD4_MASK){ strcat(key, "Mod4 + "); } if(state & GDK_MOD5_MASK){ // Scroll Lock strcat(key, "ScrollLock + "); } if(state & GDK_BUTTON1_MASK){ strcat(key, "Button1 + "); } if(state & GDK_BUTTON2_MASK){ strcat(key, "Button2 + "); } if(state & GDK_BUTTON3_MASK){ strcat(key, "Button3 + "); } if(state & GDK_BUTTON4_MASK){ strcat(key, "Button4 + "); } if(state & GDK_BUTTON5_MASK){ strcat(key, "Button5 + "); } if(state & GDK_RELEASE_MASK){ strcat(key, "Release + "); } strcat(key, gdk_keyval_name(keyval)); LOG(LOG_DEBUG, "OUT : key_val_to_string(keyval = %s)", key); } static gint window_key_event(GtkWidget *widget, GdkEventKey *event){ gchar key[256]; LOG(LOG_DEBUG, "IN : window_key_event(keyval=%d)", event->keyval); // if(grab != TRUE) // return(FALSE); switch (event->keyval){ case GDK_Shift_L: case GDK_Shift_R: case GDK_Control_L: case GDK_Control_R: case GDK_Meta_L: case GDK_Meta_R: case GDK_Alt_L: case GDK_Alt_R: case GDK_Caps_Lock: case GDK_Shift_Lock: case GDK_Scroll_Lock: case GDK_Num_Lock: case GDK_Kana_Lock: return(FALSE); break; } if(bignore_locks) event->state = event->state & (~GDK_LOCK_MASK) & (~GDK_MOD2_MASK); key_val_to_string(event->state, event->keyval, key); gtk_label_set_text(GTK_LABEL(label_key), key); gdk_keyboard_ungrab(GDK_CURRENT_TIME); ungrab_server(NULL); grab = FALSE; grabbed_event = *event; LOG(LOG_DEBUG, "OUT : window_key_event()"); return(TRUE); } static void remove_entry(GtkWidget *widget,gpointer *data){ GtkTreeIter iter; GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_entry()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(shortcut_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gtk_list_store_remove (GTK_LIST_STORE(shortcut_store), &iter); } LOG(LOG_DEBUG, "OUT : remove_entry()"); } static void add_entry(GtkWidget *widget, gpointer *data){ struct _shortcut_command *command; GtkTreeIter iter; GtkTreeSelection *selection; const gchar *keystr; LOG(LOG_DEBUG, "IN : add_entry()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(command_view)); keystr = gtk_label_get_text(GTK_LABEL(label_key)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gchar *name; gchar *description; gtk_tree_model_get (GTK_TREE_MODEL(command_store), &iter, COMMAND_NAME_COLUMN, &name, COMMAND_DESCRIPTION_COLUMN, &description, COMMAND_COMMAND_COLUMN, &command, -1); gtk_list_store_append (shortcut_store, &iter); gtk_list_store_set (shortcut_store, &iter, SHORTCUT_STATE_COLUMN, grabbed_event.state, SHORTCUT_KEYVAL_COLUMN, grabbed_event.keyval, SHORTCUT_NAME_COLUMN, name, SHORTCUT_DESCRIPTION_COLUMN, description, SHORTCUT_COMMAND_COLUMN, command, SHORTCUT_KEYSTR_COLUMN, keystr, -1); g_free(name); g_free(description); } LOG(LOG_DEBUG, "OUT : add_entry()"); } static void lock_changed(GtkWidget *widget,gpointer *data) { LOG(LOG_DEBUG, "IN : lock_changed()"); bignore_locks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_lock)); LOG(LOG_DEBUG, "OUT : lock_changed()"); } GtkWidget *pref_start_shortcut() { GtkWidget *button; GtkWidget *vbox; GtkWidget *vbox2; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *frame; // GtkWidget *label; GtkWidget *scroll; gint i; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : pref_start_shortcut()"); hbox = gtk_hbox_new(TRUE, 0); vbox = gtk_vbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(hbox) , vbox, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(hbox),"key_press_event", G_CALLBACK(window_key_event), NULL); // gdk_keyboard_grab(hbox->window, FALSE, GDK_CURRENT_TIME); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); frame = gtk_frame_new(_("Shortcut")); gtk_box_pack_start (GTK_BOX(vbox), frame,TRUE, TRUE, 0); vbox2 = gtk_vbox_new(FALSE,2); gtk_container_set_border_width(GTK_CONTAINER(vbox2), 2); gtk_container_add (GTK_CONTAINER (frame), vbox2); scroll = gtk_scrolled_window_new(NULL, NULL); //gtk_widget_set_size_request(scroll,300,200); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX(vbox2) ,scroll ,TRUE, TRUE, 0); shortcut_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(shortcut_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(shortcut_view), TRUE); gtk_container_add (GTK_CONTAINER (scroll), shortcut_view); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Key"), renderer, "text", SHORTCUT_KEYSTR_COLUMN, NULL); //gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); //gtk_tree_view_column_set_fixed_width(column, 100); gtk_tree_view_append_column (GTK_TREE_VIEW (shortcut_view), column); column = gtk_tree_view_column_new_with_attributes(_("Command"), renderer, "text", SHORTCUT_DESCRIPTION_COLUMN, NULL); //gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); //gtk_tree_view_column_set_fixed_width(column, 200); gtk_tree_view_append_column (GTK_TREE_VIEW (shortcut_view), column); hbox2 = gtk_vbox_new(FALSE,2); gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_end (GTK_BOX (hbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK (remove_entry), (gpointer)NULL); // Right half vbox = gtk_vbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(hbox) , vbox,TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); frame = gtk_frame_new(_("Add")); gtk_box_pack_start (GTK_BOX(vbox), frame,TRUE, TRUE, 0); vbox2 = gtk_vbox_new(FALSE,2); gtk_container_set_border_width(GTK_CONTAINER(vbox2), 2); gtk_container_add (GTK_CONTAINER (frame), vbox2); hbox2 = gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(vbox2) , hbox2, FALSE, FALSE, 0); // label = gtk_label_new(_("Key : ")); // gtk_box_pack_start (GTK_BOX(hbox2) // , label,FALSE, FALSE, 0); label_key = gtk_label_new(""); gtk_box_pack_start (GTK_BOX(hbox2) , label_key,FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Grab")); gtk_box_pack_end(GTK_BOX (hbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(grab_server), (gpointer)NULL); /* eventbox = gtk_event_box_new(); gtk_box_pack_end(GTK_BOX(hbox2), eventbox, FALSE, FALSE, 2); // g_signal_connect(G_OBJECT(eventbox),"button_press_event", g_signal_connect(G_OBJECT(eventbox),"key_press_event", G_CALLBACK(window_key_event), NULL); label = gtk_label_new(_("Type key here")); gtk_container_add( GTK_CONTAINER(eventbox), label); */ // gtk_box_pack_start (GTK_BOX(hbox2) // , label_key,FALSE, FALSE, 0); scroll = gtk_scrolled_window_new(NULL, NULL); //gtk_widget_set_size_request(scroll,250,200); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX(vbox2) ,scroll ,TRUE, TRUE, 0); command_store = gtk_list_store_new(COMMAND_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); for(i=0; ; i++){ if(commands[i].name == NULL) break; gtk_list_store_append(GTK_LIST_STORE(command_store), &iter); gtk_list_store_set(GTK_LIST_STORE(command_store), &iter, COMMAND_NAME_COLUMN, commands[i].name, COMMAND_DESCRIPTION_COLUMN, _(commands[i].name), COMMAND_COMMAND_COLUMN, &commands[i], -1); } command_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(command_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(command_view), TRUE); gtk_container_add (GTK_CONTAINER (scroll), command_view); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Command"), renderer, "text", COMMAND_DESCRIPTION_COLUMN, NULL); //gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); //gtk_tree_view_column_set_fixed_width(column, 200); gtk_tree_view_append_column (GTK_TREE_VIEW (command_view), column); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_start(GTK_BOX (vbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(add_entry), (gpointer)NULL); check_lock = gtk_check_button_new_with_label(_("Ignore locks")); gtk_box_pack_start(GTK_BOX(vbox2), check_lock, FALSE, FALSE, 0); gtk_tooltips_set_tip(tooltip, check_lock, _("Ignore Caps Lock and Num Lock key."),"Private"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_lock), bignore_locks); g_signal_connect(G_OBJECT(check_lock), "clicked", G_CALLBACK(lock_changed), NULL); LOG(LOG_DEBUG, "OUT : pref_start_shortcut()"); return(hbox); } ebview-0.3.6.2/src/statusbar.h0000644000175000017500000000177510013675516015445 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __STATUSBAR_H__ #define __STATUSBAR_H__ #include "defs.h" gint clear_status_message(gpointer data); void status_message(gchar *msg); void show_status_bar(); void hide_status_bar(); void toggle_status_bar(); #endif /* __STATUSBAR_H__ */ ebview-0.3.6.2/src/pref_dictgroup.h0000644000175000017500000000167110013675516016444 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREF_DICTGROUP_H__ #define __PREF_DICTGROUP_H__ #include "defs.h" GtkWidget *pref_start_dictgroup(); gboolean pref_end_dictgroup(); #endif /* __PREF_DICTGROUP_H__ */ ebview-0.3.6.2/src/eb.c0000644000175000017500000022511211241635664014013 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "bmh.h" #include "eb.h" #include "history.h" #include "hook.h" #include "jcode.h" #include "headword.h" #include "dialog.h" #include "xmlinternal.h" #include "thread_search.h" #include "dirtree.h" #define MAX_HITS 50 #define MAXLEN_HEADING 65535 #define MAXLEN_TEXT 65535 #define EBOOK_MAX_KEYWORDS 256 #define MAX_BUFSIZE 65535 extern GList *group_list; extern GList *book_list; extern gint global_multi_code; gint ebook_simple_search(BOOK_INFO *binfo, char *word, gint method, gchar *title); static gint ebook_ending_search(BOOK_INFO *binfo, char *word, gint method, gchar *title); static void sort_result(gchar *word); static void plain_heading(); extern EB_Hookset text_hookset; extern EB_Hookset heading_hookset; extern EB_Hookset candidate_hookset; static gboolean ebook_initialized = FALSE; gboolean full_text_search_ignore_case = TRUE; EB_Error_Code ebook_set_subbook(BOOK_INFO *binfo); static gchar *ebook_message = NULL; gchar *ebook_error_message(error_code) { const gchar *message; if(ebook_message) g_free(ebook_message); message = eb_error_message(error_code); ebook_message = iconv_convert(fs_codeset, "utf-8", message); return(ebook_message); } gint ebook_search_method(){ const char *text; int i; LOG(LOG_DEBUG, "IN : ebook_search_method()"); text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_method)->entry)); for(i=0 ; search_method[i].name != 0 ; i ++){ if(strcmp(text, search_method[i].name) == 0){ LOG(LOG_DEBUG, "OUT : ebook_search_method()=%d", search_method[i].code); return(search_method[i].code); } } LOG(LOG_DEBUG, "OUT : ebook_search_method()=%d", SEARCH_METHOD_UNKNOWN); return(SEARCH_METHOD_UNKNOWN); } BOOK_INFO *load_book(const char *book_path, int subbook_no, gchar *appendix_path, gint appendix_subbook_no, gchar *fg, gchar *bg) { EB_Error_Code error_code; BOOK_INFO *binfo; EB_Subbook_Code sublist[EB_MAX_SUBBOOKS]; int subcount; char buff[512]; #if 0 GList *book_item; #endif LOG(LOG_DEBUG, "IN : load_book(%s, %d, %s, %d, %s %s)", book_path, subbook_no, appendix_path, appendix_subbook_no, fg, bg); if(book_path == NULL){ LOG(LOG_DEBUG, "OUT : load_book() = NULL"); return(NULL); } // Search if there is the same book already. #if 0 book_item = g_list_first(book_list); while(book_item != NULL){ binfo = (BOOK_INFO *)(book_item->data); if((strcmp(binfo->book_path, book_path) == 0) && (binfo->subbook_no == subbook_no)) { if((binfo->appendix_path != NULL) && (appendix_path != NULL) && (strcmp(binfo->appendix_path, appendix_path) == 0) && (binfo->appendix_subbook_no == appendix_subbook_no)) { return(binfo); } else { unload_book(binfo); g_free(binfo); break; } } book_item = g_list_next(book_item); } #endif binfo = (BOOK_INFO *)calloc(sizeof(BOOK_INFO),1); if(binfo == NULL){ LOG(LOG_ERROR, "No memory"); exit(1); } binfo->book_path = fs_to_unicode((gchar *)book_path); binfo->subbook_no = subbook_no; if(appendix_path){ binfo->appendix_path = fs_to_unicode(appendix_path); binfo->appendix_subbook_no = appendix_subbook_no; } binfo->book = (EB_Book *) malloc(sizeof(EB_Book)); eb_initialize_book(binfo->book); error_code = eb_bind(binfo->book, book_path); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to bind the book : %s", ebook_error_message(error_code)); goto FAILED; } error_code = eb_subbook_list( binfo->book, sublist, &subcount); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to get a subbook list : %s", ebook_error_message(error_code)); goto FAILED; } error_code = eb_subbook_directory2( binfo->book, sublist[binfo->subbook_no], buff); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to get the directory : %s", ebook_error_message(error_code)); goto FAILED; } binfo->subbook_dir = strdup(buff); error_code = eb_subbook_title2( binfo->book, sublist[binfo->subbook_no], buff); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to get the title : %s", ebook_error_message(error_code)); goto FAILED; } binfo->subbook_title = iconv_convert("euc-jp", "utf-8", buff); if(binfo->appendix_path != NULL){ binfo->appendix = (EB_Appendix *) malloc(sizeof(EB_Appendix)); eb_initialize_appendix(binfo->appendix); error_code = eb_bind_appendix(binfo->appendix, appendix_path); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to bind appendix : %s", ebook_error_message(error_code)); goto FAILED; } } ebook_set_subbook(binfo); binfo->available = TRUE; if(eb_have_word_search(binfo->book)){ binfo->search_method[SEARCH_METHOD_WORD] = TRUE; } if(eb_have_endword_search(binfo->book)){ binfo->search_method[SEARCH_METHOD_ENDWORD] = TRUE; } if(eb_have_exactword_search(binfo->book)){ binfo->search_method[SEARCH_METHOD_EXACTWORD] = TRUE; } if(eb_have_keyword_search(binfo->book)){ binfo->search_method[SEARCH_METHOD_KEYWORD] = TRUE; } /* eb_multi_search_list(binfo->book, multi_list, &multi_count); for (i = 0; i < multi_count; i++) { binfo->search_method[SEARCH_METHOD_MULTI1+i] = TRUE; } */ if(eb_have_multi_search(binfo->book)){ binfo->search_method[SEARCH_METHOD_MULTI] = TRUE; } if(eb_have_menu(binfo->book)){ binfo->search_method[SEARCH_METHOD_MENU] = TRUE; } if(eb_have_copyright(binfo->book)){ binfo->search_method[SEARCH_METHOD_COPYRIGHT] = TRUE; } if (eb_have_font(binfo->book, EB_FONT_16)){ error_code = eb_set_font(binfo->book, EB_FONT_16); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to set font : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); } } if(bg && (strlen(bg) != 0)) binfo->bg = strdup(bg); if(fg && (strlen(fg) != 0)) binfo->fg = strdup(fg); book_list = g_list_append(book_list, binfo); LOG(LOG_DEBUG, "OUT : load_book()"); return(binfo); FAILED: binfo->available = FALSE; LOG(LOG_DEBUG, "OUT : load_book() = NULL"); return(NULL); } static void free_gaiji(BOOK_INFO *binfo){ GList *lists[8]; GList *item; gint i; LOG(LOG_DEBUG, "IN : free_gaiji()"); lists[0] = binfo->gaiji_narrow16; lists[1] = binfo->gaiji_narrow24; lists[2] = binfo->gaiji_narrow30; lists[3] = binfo->gaiji_narrow48; lists[4] = binfo->gaiji_wide16; lists[5] = binfo->gaiji_wide24; lists[6] = binfo->gaiji_wide30; lists[7] = binfo->gaiji_wide48; for(i=0; i < 8 ; i ++){ item = g_list_first(lists[i]); while(item){ free(item->data); item = g_list_next(item); } g_list_free(lists[i]); } binfo->gaiji_narrow16 = NULL; binfo->gaiji_narrow24 = NULL; binfo->gaiji_narrow30 = NULL; binfo->gaiji_narrow48 = NULL; binfo->gaiji_wide16 = NULL; binfo->gaiji_wide24 = NULL; binfo->gaiji_wide30 = NULL; binfo->gaiji_wide48 = NULL; LOG(LOG_DEBUG, "OUT : free_gaiji()"); } void unload_book(BOOK_INFO *binfo) { LOG(LOG_DEBUG, "IN : unload_book()"); eb_unset_subbook(binfo->book); eb_finalize_book(binfo->book); free(binfo->book_path); free(binfo->appendix_path); free(binfo->subbook_dir); free(binfo->subbook_title); free_gaiji(binfo); book_list = g_list_remove(book_list, binfo); LOG(LOG_DEBUG, "OUT : unload_book()"); return; } void check_search_method() { #if 0 BOOK_INFO *binfo; GList *book_item; #endif gint method_count=0; LOG(LOG_DEBUG, "IN : check_search_method()"); #if 0 menu_word_search = FALSE; menu_endword_search = FALSE; menu_exactword_search = FALSE; menu_keyword_search = FALSE; menu_menu = FALSE; menu_copyright = FALSE; menu_multi_search = FALSE; book_item = g_list_first(book_list); while(book_item != NULL){ binfo = (BOOK_INFO *)(book_item->data); if(binfo->search_method[SEARCH_METHOD_WORD] == TRUE) menu_word_search = TRUE; if(binfo->search_method[SEARCH_METHOD_ENDWORD] == TRUE) menu_endword_search = TRUE; if(binfo->search_method[SEARCH_METHOD_EXACTWORD] == TRUE) menu_exactword_search = TRUE; if(binfo->search_method[SEARCH_METHOD_KEYWORD] == TRUE) menu_keyword_search = TRUE; if(binfo->search_method[SEARCH_METHOD_MENU] == TRUE) menu_menu = TRUE; if(binfo->search_method[SEARCH_METHOD_COPYRIGHT] == TRUE) menu_copyright = TRUE; if(binfo->search_method[SEARCH_METHOD_MULTI] == TRUE) menu_multi_search = TRUE; book_item = g_list_next(book_item); } method_count = 0; search_method[method_count].code = SEARCH_METHOD_AUTOMATIC; search_method[method_count].name = strdup(_("Automatic Search")); method_count ++; if(menu_exactword_search == TRUE){ search_method[method_count].code = SEARCH_METHOD_EXACTWORD; search_method[method_count].name = strdup(_("Exactword Search")); method_count ++; } if(menu_word_search == TRUE){ search_method[method_count].code = SEARCH_METHOD_WORD; search_method[method_count].name = strdup(_("Forward Search")); method_count ++; } if(menu_endword_search == TRUE){ search_method[method_count].code = SEARCH_METHOD_ENDWORD; search_method[method_count].name = strdup(_("Backward Search")); method_count ++; } if(menu_keyword_search == TRUE){ search_method[method_count].code = SEARCH_METHOD_KEYWORD; search_method[method_count].name = strdup(_("Keyword Search")); method_count ++; } if(menu_multi_search == TRUE){ search_method[method_count].code = SEARCH_METHOD_MULTI; search_method[method_count].name = strdup(_("Multiword Search")); method_count ++; } /* if(menu_menu == TRUE){ search_method[method_count].code = SEARCH_METHOD_MENU; search_method[method_count].name = strdup(_("Menu")); method_count ++; } if(menu_copyright == TRUE){ search_method[method_count].code = SEARCH_METHOD_COPYRIGHT; search_method[method_count].name = strdup(_("Copyright")); method_count ++; } */ search_method[method_count].code = SEARCH_METHOD_FULL_TEXT; search_method[method_count].name = strdup(_("Full Text Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_INTERNET; search_method[method_count].name = strdup(_("Internet Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_GREP; search_method[method_count].name = strdup(_("File Search")); method_count ++; search_method[method_count].name = NULL; #endif method_count = 0; search_method[method_count].code = SEARCH_METHOD_AUTOMATIC; search_method[method_count].name = strdup(_("Automatic Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_EXACTWORD; search_method[method_count].name = strdup(_("Exactword Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_WORD; search_method[method_count].name = strdup(_("Forward Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_ENDWORD; search_method[method_count].name = strdup(_("Backward Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_KEYWORD; search_method[method_count].name = strdup(_("Keyword Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_MULTI; search_method[method_count].name = strdup(_("Multiword Search")); method_count ++; /* search_method[method_count].code = SEARCH_METHOD_MENU; search_method[method_count].name = strdup(_("Menu")); method_count ++; search_method[method_count].code = SEARCH_METHOD_COPYRIGHT; search_method[method_count].name = strdup(_("Copyright")); method_count ++; */ search_method[method_count].code = SEARCH_METHOD_FULL_TEXT; search_method[method_count].name = strdup(_("Full Text Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_INTERNET; search_method[method_count].name = strdup(_("Internet Search")); method_count ++; search_method[method_count].code = SEARCH_METHOD_GREP; search_method[method_count].name = strdup(_("File Search")); method_count ++; search_method[method_count].name = NULL; LOG(LOG_DEBUG, "OUT : check_search_method()"); } gint ebook_start(){ EB_Error_Code error_code; LOG(LOG_DEBUG, "IN : ebook_start()"); error_code = eb_initialize_library(); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to initialize library : %s", ebook_error_message(error_code)); return(1); } error_code = initialize_hooksets(); if(error_code != EB_SUCCESS){ return(1); } ebook_initialized = TRUE; LOG(LOG_DEBUG, "OUT : ebook_start()"); return(0); } gint ebook_end(){ BOOK_INFO *binfo; GList *book_item; LOG(LOG_DEBUG, "IN : ebook_end()"); if(ebook_initialized == TRUE) { LOG(LOG_DEBUG, "OUT : ebook_end()"); return(0); } book_item = g_list_first(book_list); while(book_item != NULL){ binfo = (BOOK_INFO *)(book_item->data); eb_unset_subbook(binfo->book); eb_finalize_book(binfo->book); free(binfo->book_path); free(binfo->appendix_path); free(binfo->subbook_dir); free(binfo->subbook_title); free_gaiji(binfo); g_list_remove(book_list, book_item->data); book_item = g_list_next(book_item); } finalize_hooksets(); book_list = NULL; ebook_initialized = FALSE; LOG(LOG_DEBUG, "OUT : ebook_end()"); return(0); } void split_word(const gchar *word, gchar **keywords) { gint i,j; gchar *p; gchar buff[512]; gint quoted=0; LOG(LOG_DEBUG, "IN : split_word(%s)", word); p = (gchar *)word; i = 0; j = 0; keywords[0] = NULL; if(strlen(word) > 512){ return; } while(1){ switch(*p){ case '\"': if(quoted) quoted = 0; else quoted = 1; break; case ' ': case '\t': case '\n': if(quoted){ buff[j] = *p; j ++; } else { buff[j] = '\0'; keywords[i] = strdup(buff); i ++; keywords[i] = NULL; j = 0; } break; default: buff[j] = *p; j ++; } p++; if(*p == '\0'){ buff[j] = '\0'; if(strlen(buff) != 0){ keywords[i] = strdup(buff); i ++; } keywords[i] = NULL; break; } else if(i == EBOOK_MAX_KEYWORDS) { break; } } for(i=0; ; i++){ if(keywords[i] == NULL) break; } LOG(LOG_DEBUG, "OUT : split_word()"); } void cat_word(char *string, char **words){ gint i; gint len = 0; LOG(LOG_DEBUG, "IN : cat_word()"); sprintf(string, "%s", words[0]); len = strlen(words[0]); for(i=1 ; words[i] != NULL ; i++){ strcat(string, " "); strcat(string, words[i]); len = len + strlen(words[i]) + 1; } string[len] = '\0'; LOG(LOG_DEBUG, "OUT : cat_word() = %s", string); } void free_words(char **words){ gint i; LOG(LOG_DEBUG, "IN : free_words()"); for(i=0; words[i] != NULL ; i++) free(words[i]); LOG(LOG_DEBUG, "OUT : free_words()"); } static gboolean check_duplicate_hit(EB_Position pos){ GList *l; RESULT *rp; l = search_result; while(l != NULL){ rp = (RESULT *)(l->data); if((rp->data.eb.pos_text.page == pos.page) && (rp->data.eb.pos_text.offset == pos.offset)) return(TRUE); l = g_list_next(l); } return(FALSE); } static gint count_result(GList *result) { return(g_list_length(result)); } EB_Error_Code ebook_my_backward_text(BOOK_INFO *binfo) { EB_Error_Code error_code=EB_SUCCESS; EB_Position text_position; char data[EB_SIZE_PAGE+4]; int i; ssize_t length; int start_page; int end_page; int current_page; int current_offset; int offset; int read_page; int stop_code; error_code = ebook_set_subbook(binfo); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set subbook : %s", ebook_error_message(error_code)); return(error_code); } start_page = binfo->book->subbook_current->text.start_page; end_page = binfo->book->subbook_current->text.end_page; error_code = eb_tell_text(binfo->book, &text_position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to tell text : %s", ebook_error_message(error_code)); return(error_code); } current_page = text_position.page; current_offset = text_position.offset; offset = current_offset; stop_code = binfo->book->text_context.auto_stop_code; for(read_page = current_page ; read_page >= start_page ; read_page --){ text_position.page = read_page; text_position.offset = 0; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } memset(data, 0, EB_SIZE_PAGE + 4); error_code = eb_read_rawtext(binfo->book, EB_SIZE_PAGE+2, data, &length); if (error_code != EB_SUCCESS || length != EB_SIZE_PAGE+2){ LOG(LOG_CRITICAL, "Failed to read rawtext : %s", ebook_error_message(error_code)); return(error_code); } if(stop_code != -1) binfo->book->text_context.auto_stop_code = stop_code; for(i=offset-2 ; i >= 0 ; i -=2){ if(((binfo->appendix != NULL) && (eb_uint2(&data[i]) == binfo->appendix->subbook_current->stop_code0) && (eb_uint2(&data[i+2]) == binfo->appendix->subbook_current->stop_code1)) || ((binfo->appendix == NULL) && (eb_uint2(&data[i]) == 0x1f41) && (eb_uint1(&data[i+2]) == 0x01)) || (eb_uint2(&data[i]) == 0x1f02)) { text_position.page = read_page; text_position.offset = i; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } if(stop_code != -1) binfo->book->text_context.auto_stop_code = stop_code; return(EB_SUCCESS); } } offset = EB_SIZE_PAGE + 2; } text_position.page = current_page; text_position.offset = current_offset; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } return(EB_ERR_FAIL_SEEK_TEXT); } gint ascii_to_jisx2080_table [] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x00 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x08 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x10 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x18 0x2121, 0x212a, 0x2140, 0x2174, 0x2170, 0x2173, 0x2175, 0x2147, // 0x20 0x214a, 0x214b, 0x2176, 0x215c, 0x2124, 0x215d, 0x2125, 0x213f, // 0x28 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337, // 0x30 0x2338, 0x2339, 0x2127, 0x2128, 0x2163, 0x2161, 0x2164, 0x2129, // 0x38 0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347, // 0x40 0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d, 0x234e, 0x234f, // 0x48 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357, // 0x50 0x2358, 0x2359, 0x235a, 0x214e, 0x216f, 0x214f, 0x2130, 0x2132, // 0x58 0x212e, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, // 0x60 0x2368, 0x2369, 0x236a, 0x236b, 0x236c, 0x236d, 0x236e, 0x236f, // 0x68 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, // 0x70 0x2378, 0x2379, 0x237a, 0x2150, 0x2143, 0x2151, 0x2141, 0x0000 // 0x78 }; static gchar *euc2jis(gchar *inbuf){ guchar *euc_p; guchar *jisbuf=NULL; guchar *jis_p; euc_p = (guchar *) inbuf; jis_p = jisbuf = malloc(strlen((gchar *) euc_p)*2); while(*euc_p != '\0'){ if(( 0x20 <= *euc_p) && (*euc_p <= 0x7e) && (ascii_to_jisx2080_table[*euc_p] != 0x00)){ *jis_p = (ascii_to_jisx2080_table[*euc_p] & 0xff00) >> 8; jis_p ++; *jis_p = ascii_to_jisx2080_table[*euc_p] & 0xff; jis_p ++; } else if(iseuc(euc_p)){ *jis_p = *euc_p - 0x80; jis_p ++; euc_p++; *jis_p = *euc_p - 0x80; jis_p ++; } else if(*euc_p == 0x20){ *jis_p = 0x21; jis_p ++; *jis_p = 0x21; jis_p ++; } else { *jis_p = 0x21; jis_p ++; *jis_p = 0x29; jis_p ++; } euc_p ++; } *jis_p = '\0'; return((gchar *) jisbuf); } static gint ebook_full_search_old(BOOK_INFO *binfo, char *word, gint method, gchar *title) { EB_Error_Code error_code=EB_SUCCESS; EB_Position text_position; char data[EB_SIZE_PAGE]; char *jisword; char *word_p; int i; ssize_t length; char *p; char heading[MAXLEN_TEXT + 1]; RESULT *rp; int start_page; int end_page; int current_page; int stop_code; int page_count=0; LOG(LOG_DEBUG, "IN : ebook_full_search(%s)", word); if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); start_page = binfo->book->subbook_current->text.start_page; end_page = binfo->book->subbook_current->text.end_page; // Read once in order to determine auto_stop_code p = ebook_get_text(binfo, start_page, 0); if(p) free(p); stop_code = binfo->book->text_context.auto_stop_code; jisword = euc2jis(word); word_p = jisword; for(current_page = start_page ; current_page <= end_page ; current_page ++){ set_progress((float)(current_page - start_page) / (end_page - start_page + 1)); page_count ++; text_position.page = current_page; text_position.offset = 0; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } error_code = eb_read_rawtext(binfo->book, EB_SIZE_PAGE, data, &length); if (error_code != EB_SUCCESS || length != EB_SIZE_PAGE){ LOG(LOG_CRITICAL, "Failed to read rawtext : %s", ebook_error_message(error_code)); return(error_code); } for(i=0 ; i < EB_SIZE_PAGE ; i +=2){ // skip control characters if(isjisp(&data[i]) != TRUE){ continue; // match } else if((data[i] == *word_p) && (data[i+1] == *(word_p+1))){ // See if keyword continues if (*(word_p+2) != '\0'){ word_p += 2; continue; } // In case ignoring upper letters and lower letters } else if(full_text_search_ignore_case){ guint c1, c2; c1 = eb_uint2(&data[i]); c2 = eb_uint2(word_p); // Alphabet if ((0x2341 <= c1) && (c1 <= 0x237a) && (0x2341 <= c2) && (c2 <= 0x237a)){ // Convert to lower and do match if(((0x2361 <= c1) ? (c1 - 0x20) : c1) == ((0x2361 <= c2) ? (c2 - 0x20) : c2)){ // See if keyword continues if (*(word_p+2) != '\0'){ word_p += 2; continue; } } else { goto NO_MATCH; } } else { goto NO_MATCH; } } else { goto NO_MATCH; } // Match then read text_position.page = current_page; text_position.offset = i; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } // Because eb_seek_text() will clear auto_stop_code, // restore old value. if(stop_code != -1) binfo->book->text_context.auto_stop_code = stop_code; error_code = ebook_my_backward_text(binfo); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to back text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } error_code = eb_tell_text(binfo->book, &text_position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to tell text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } if(check_duplicate_hit(text_position) == TRUE){ // Do nothing goto NO_MATCH; } error_code = eb_read_text(binfo->book, binfo->appendix, &heading_hookset, NULL, MAXLEN_TEXT, heading, &length); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } heading[length] = '\0'; p = strchr(heading, '\n'); if(p != NULL) *p = '\0'; rp = (RESULT *)calloc(sizeof(RESULT),1); if(rp == NULL){ LOG(LOG_ERROR, "No memory"); exit(1); } rp->heading = iconv_convert("euc-jp", "utf-8", heading); rp->word = iconv_convert("euc-jp", "utf-8", word); rp->type = RESULT_TYPE_EB; rp->data.eb.book_info = binfo; rp->data.eb.search_method = method; rp->data.eb.dict_title = strdup(title); rp->data.eb.pos_heading = text_position; rp->data.eb.pos_text = text_position; add_result(rp); if((binfo->book->text_context.auto_stop_code != stop_code) && (binfo->book->text_context.auto_stop_code != -1)) stop_code = binfo->book->text_context.auto_stop_code; pthread_testcancel(); NO_MATCH: word_p = jisword; continue; } } free(jisword); LOG(LOG_DEBUG, "OUT : ebook_full_search()"); return(error_code); } // Full text search using BMH method. static gint ebook_full_search(BOOK_INFO *binfo, char *word, gint method, gchar *title) { EB_Error_Code error_code=EB_SUCCESS; EB_Position text_position; char data[EB_SIZE_PAGE]; char *jisword; char *word_p; ssize_t length; char *p; char heading[MAXLEN_TEXT + 1]; RESULT *rp; int start_page; int end_page; int current_page; int stop_code; int page_count=0; BMH_TABLE *bmh; gchar *start_p; gint word_len; LOG(LOG_DEBUG, "IN : ebook_full_search(%s)", word); if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); start_page = binfo->book->subbook_current->text.start_page; end_page = binfo->book->subbook_current->text.end_page; // Read once in order to get auto_stop_code. p = ebook_get_text(binfo, start_page, 0); if(p) free(p); stop_code = binfo->book->text_context.auto_stop_code; jisword = euc2jis(word); word_p = jisword; bmh = bmh_prepare((guchar *) jisword, TRUE); word_len = strlen(jisword); memset(data, 0, word_len); for(current_page = start_page ; current_page <= end_page ; current_page ++){ set_progress((float)(current_page - start_page) / (end_page - start_page + 1)); page_count ++; text_position.page = current_page; text_position.offset = 0; error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } error_code = eb_read_rawtext(binfo->book, EB_SIZE_PAGE, &data[word_len], &length); if (error_code != EB_SUCCESS || length != EB_SIZE_PAGE){ LOG(LOG_CRITICAL, "Failed to read rawtext : %s", ebook_error_message(error_code)); return(error_code); } start_p = data; while(start_p){ start_p = (gchar *) bmh_search(bmh, (guchar *) start_p, EB_SIZE_PAGE + word_len - (start_p - data)); if(start_p == NULL) break; // Match then read if((start_p - data) <= word_len) { text_position.page = current_page - 1; text_position.offset = EB_SIZE_PAGE - word_len; } else { text_position.page = current_page; text_position.offset = start_p - data - word_len; } error_code = eb_seek_text(binfo->book, &text_position); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } // Because eb_seek_text() will clear auto_stop_code, // restore old value. if(stop_code != -1) binfo->book->text_context.auto_stop_code = stop_code; error_code = ebook_my_backward_text(binfo); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to back text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } error_code = eb_tell_text(binfo->book, &text_position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to tell text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } if(check_duplicate_hit(text_position) == TRUE){ // Do nothing goto NO_MATCH; } error_code = eb_read_text(binfo->book, binfo->appendix, &heading_hookset, NULL, MAXLEN_TEXT, heading, &length); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read text : %s", ebook_error_message(error_code)); // Do nothing goto NO_MATCH; } heading[length] = '\0'; p = strchr(heading, '\n'); if(p != NULL) *p = '\0'; rp = (RESULT *)calloc(sizeof(RESULT),1); if(rp == NULL){ LOG(LOG_ERROR, "No memory"); exit(1); } rp->heading = iconv_convert("euc-jp", "utf-8", heading); rp->word = iconv_convert("euc-jp", "utf-8", word); rp->type = RESULT_TYPE_EB; rp->data.eb.book_info = binfo; rp->data.eb.search_method = method; rp->data.eb.dict_title = strdup(title); rp->data.eb.pos_heading = text_position; rp->data.eb.pos_text = text_position; add_result(rp); if((binfo->book->text_context.auto_stop_code != stop_code) && (binfo->book->text_context.auto_stop_code != -1)) stop_code = binfo->book->text_context.auto_stop_code; pthread_testcancel(); NO_MATCH: start_p += word_len; continue; } } bmh_free(bmh); free(jisword); LOG(LOG_DEBUG, "OUT : ebook_full_search()"); return(error_code); } // Sort by dictionary, then search method static gint ebook_search2(char *g_word, GtkTreeIter *parent) { int j; int method; EB_Error_Code error_code=EB_SUCCESS; GtkTreeIter iter; gchar *word = strdup(g_word); LOG(LOG_DEBUG, "IN : ebook_search2()"); clear_search_result(); method = ebook_search_method(); if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &iter, parent) == TRUE){ do { gint type; gchar *title; gboolean active; BOOK_INFO *binfo; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if(active != TRUE) continue; if(binfo == NULL) continue; if(binfo->available == FALSE) continue; if(method == SEARCH_METHOD_AUTOMATIC){ for(j=SEARCH_METHOD_MIN ; j<=SEARCH_METHOD_MAX ; j++){ // Except word search and backward search. if((j == SEARCH_METHOD_WORD) && (!bword_search_automatic)) continue; if(j == SEARCH_METHOD_ENDWORD) continue; if(binfo->search_method[j] == TRUE){ if(bending_correction == 0){ error_code = ebook_simple_search(binfo, word, j, title); } else { error_code = ebook_ending_search(binfo, word, j, title); } if (error_code != EB_SUCCESS){ if(error_code == EB_ERR_TOO_MANY_WORDS) continue; LOG(LOG_CRITICAL, "Failed to search : %s", ebook_error_message(error_code)); goto END; } } } } else if((method == SEARCH_METHOD_FULL_TEXT) || (method == SEARCH_METHOD_FULL_HEADING)){ set_cancel_dlg_text(binfo->subbook_title); error_code = ebook_full_search(binfo, word, method, title); goto END; } else { if(binfo->search_method[method] == TRUE){ if(bending_correction == 0){ error_code = ebook_simple_search(binfo, word, method, title); } else { error_code = ebook_ending_search(binfo, word, method, title); } } } g_free (title); if(error_code != EB_SUCCESS) goto END; } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } END: LOG(LOG_DEBUG, "OUT : ebook_search2()"); return 0; } // Sort by search method, then dictionary static gint ebook_search3(char *g_word, GtkTreeIter *parent) { int j; int method; EB_Error_Code error_code=EB_SUCCESS; GtkTreeIter iter; gchar *word = strdup(g_word); LOG(LOG_DEBUG, "IN : ebook_search3()"); clear_search_result(); method = ebook_search_method(); if(method == SEARCH_METHOD_AUTOMATIC){ for(j=SEARCH_METHOD_MIN ; j<=SEARCH_METHOD_MAX ; j++){ // Except word search and backward search if((j == SEARCH_METHOD_WORD) && (!bword_search_automatic)) continue; if(j == SEARCH_METHOD_ENDWORD) continue; if(gtk_tree_model_iter_children(GTK_TREE_MODEL(dict_store), &iter, parent) == TRUE){ do { gint type; gchar *title; gboolean active; BOOK_INFO *binfo; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_TITLE_COLUMN, &title, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, -1); if(active != TRUE) continue; if(binfo == NULL) continue; if(binfo->available == FALSE) continue; if(binfo->search_method[j] == TRUE){ if(bending_correction == 0){ error_code = ebook_simple_search(binfo, word, j, title); } else { error_code = ebook_ending_search(binfo, word, j, title); } if (error_code != EB_SUCCESS){ if(error_code == EB_ERR_TOO_MANY_WORDS) continue; LOG(LOG_CRITICAL, "Failed to search : %s", ebook_error_message(error_code)); goto END; } } g_free (title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } } } END: plain_heading(); sort_result(g_word); LOG(LOG_DEBUG, "OUT : ebook_search3()"); return 0; } static void plain_heading() { RESULT *rp; GList *l; gint len; gchar *p; gchar *pp; gchar body[65536]; gint i; gunichar ch; gchar start_tag[512]; gchar tag_name[512]; for(l = search_result ; l != NULL; l = g_list_next(l)){ rp = (RESULT *)(l->data); len = g_utf8_strlen(rp->heading, -1); p = rp->heading; pp = body; for(i=0;idata.eb.plain_heading = g_strdup(body); } } static void sort_result(gchar *word) { RESULT *rp; GList *l; GList *insert; gchar l_word[512]; gunichar ch; gint i; gint len; gchar *p; gchar *pp; char *keywords[EBOOK_MAX_KEYWORDS + 1]; len = g_utf8_strlen(word, -1); p = word; pp = l_word; for(i=0;idata); if((strstr(rp->data.eb.plain_heading, l_word) == rp->data.eb.plain_heading) && (strlen(rp->data.eb.plain_heading) == strlen(l_word))){ if(l != insert){ l = g_list_next(l); search_result = g_list_remove(search_result, rp); search_result = g_list_insert_before(search_result, insert, rp); continue; } else { insert = g_list_next(insert); } } l = g_list_next(l); } // Forward match for(l = insert ; l != NULL; ){ rp = (RESULT *)(l->data); if(strstr(rp->data.eb.plain_heading, l_word) == rp->data.eb.plain_heading){ if(l != insert){ l = g_list_next(l); search_result = g_list_remove(search_result, rp); search_result = g_list_insert_before(search_result, insert, rp); continue; } else { insert = g_list_next(insert); } } l = g_list_next(l); } // Partial match for(l = insert ; l != NULL; ){ rp = (RESULT *)(l->data); if(strstr(rp->data.eb.plain_heading, l_word) != NULL){ if(l != insert){ l = g_list_next(l); search_result = g_list_remove(search_result, rp); search_result = g_list_insert_before(search_result, insert, rp); continue; } else { insert = g_list_next(insert); } } l = g_list_next(l); } // keyword match split_word(word, keywords); for(l = insert ; l != NULL; ){ rp = (RESULT *)(l->data); for(i=0 ; ; i++){ if(keywords[i] == NULL){ if(l != insert){ l = g_list_next(l); search_result = g_list_remove(search_result, rp); search_result = g_list_insert_before(search_result, insert, rp); continue; } else { insert = g_list_next(insert); } } if(strstr(rp->data.eb.plain_heading, l_word) == NULL) break; } l = g_list_next(l); } free_words(keywords); } static void *ebook_search_thread(void *arg) { char word[MAX_BUFSIZE]; gboolean active; GtkTreeIter iter; gint state; LOG(LOG_DEBUG, "IN : ebook_search_thread(%s)", arg); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &state); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &state); strncpy(word, arg, sizeof(word) -1); word[sizeof(word)-1] = '\0'; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ if((ebook_search_method() == SEARCH_METHOD_AUTOMATIC) && (bsort_by_dictionary == FALSE)){ ebook_search3(word, &iter); } else { ebook_search2(word, &iter); } thread_end(); break; } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } LOG(LOG_DEBUG, "OUT : ebook_search_thread()"); return(NULL); } static gchar *gword=NULL; gint ebook_search(const char *word, gint method) { LOG(LOG_DEBUG, "IN : ebook_search(%s)", word); if(gword != NULL) g_free(gword); gword = strdup(word); if(method == SEARCH_METHOD_FULL_TEXT){ // Cancelable thread_search(TRUE, _("Fulltext search"), ebook_search_thread, (void *)gword); } else { // Non-cancelable thread_search(FALSE, _("Fulltext search"), ebook_search_thread, (void *)gword); } LOG(LOG_DEBUG, "OUT : ebook_search()"); return(0); } gint ebook_search_auto(char *g_word, gint method) { GtkTreeIter iter; LOG(LOG_DEBUG, "IN : ebook_search_auto()"); if(method == SEARCH_METHOD_FULL_TEXT) { LOG(LOG_DEBUG, "OUT : ebook_search_auto()"); return(0); } // Search group named "selection" and use it if exests if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gchar *title; gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &iter, DICT_TITLE_COLUMN, &title, -1); if(strcasecmp(title, "selection") == 0){ g_free(title); ebook_search2(g_word, &iter); return(0); } g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } // If there is no "selection" group, use active group if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &iter) == TRUE){ do { gboolean active; gtk_tree_model_get (GTK_TREE_MODEL(dict_store), &iter, DICT_ACTIVE_COLUMN, &active, -1); if(active == TRUE){ ebook_search2(g_word, &iter); return(0); } } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &iter) == TRUE); } LOG(LOG_DEBUG, "OUT : ebook_search_auto()"); return(0); } gint ebook_simple_search2(BOOK_INFO *binfo, char *word, gint method, gchar *title) { EB_Error_Code error_code=EB_SUCCESS; int i, total_hits=0; ssize_t len; EB_Hit hits[MAX_HITS]; int hitcount; char heading[MAXLEN_HEADING + 1]; char *keywords[EBOOK_MAX_KEYWORDS + 1]; RESULT *rp; LOG(LOG_DEBUG, "IN : ebook_simple_search2(%s, %s, %d, %s)", binfo->subbook_title, word, method, title); if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS){ LOG(LOG_DEBUG, "OUT : ebook_simple_search2()"); return(error_code); } switch(method){ case SEARCH_METHOD_WORD: error_code = eb_search_word(binfo->book, word); break; case SEARCH_METHOD_ENDWORD: error_code = eb_search_endword(binfo->book, word); break; case SEARCH_METHOD_EXACTWORD: error_code = eb_search_exactword(binfo->book, word); break; case SEARCH_METHOD_KEYWORD: split_word(word, keywords); error_code = eb_search_keyword(binfo->book, (const char * const *)keywords); free_words(keywords); break; case SEARCH_METHOD_MULTI: split_word(word, keywords); for(i=0;ibook, global_multi_code, (const char * const *)keywords); free_words(keywords); break; default: error_code = EB_ERR_NO_SUCH_SEARCH; break; } if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to search : %s", ebook_error_message(error_code)); return(error_code); } total_hits = count_result(search_result); while(1){ error_code = eb_hit_list(binfo->book, MAX_HITS, hits, &hitcount); if(error_code != EB_SUCCESS){ return(error_code); } if(hitcount == 0) break; LOG(LOG_DEBUG, "%d HIT", hitcount); for(i = 0 ; i < hitcount ; i ++){ if((max_search != 0) && (total_hits >= max_search)) return(EB_SUCCESS); if(check_duplicate_hit(hits[i].text) == TRUE) continue; rp = (RESULT *)calloc(sizeof(RESULT),1); if(rp == NULL){ LOG(LOG_ERROR, "No memory"); exit(1); } error_code = eb_seek_text(binfo->book, &(hits[i].heading)); if(error_code != EB_SUCCESS){ return(error_code); } error_code = eb_read_heading(binfo->book, binfo->appendix, &heading_hookset, NULL, MAXLEN_HEADING, heading, &len); if (error_code != EB_SUCCESS) { return(error_code); } heading[len] = '\0'; rp->heading = iconv_convert("euc-jp", "utf-8", heading); if(method == SEARCH_METHOD_MULTI) rp->word = NULL; else rp->word = iconv_convert("euc-jp", "utf-8", word); rp->type = RESULT_TYPE_EB; rp->data.eb.book_info = binfo; rp->data.eb.search_method = method; rp->data.eb.dict_title = strdup(title); rp->data.eb.pos_heading = hits[i].heading; rp->data.eb.pos_text = hits[i].text; add_result(rp); total_hits ++; } } LOG(LOG_DEBUG, "OUT : ebook_simple_search2()"); return(error_code); } gint ebook_simple_search(BOOK_INFO *binfo, char *word, gint method, gchar *title) { gchar *l_word=NULL; EB_Error_Code error_code=EB_SUCCESS; LOG(LOG_DEBUG, "IN : ebook_simple_search()"); // If the keyword is Japanese, try Hiragana and Katakana if(iseuc((guchar *) word)){ l_word = g_strdup(word); katakana_to_hiragana(l_word); error_code = ebook_simple_search2(binfo, l_word, method, title); if(error_code != EB_SUCCESS){ goto END; } hiragana_to_katakana(l_word); error_code = ebook_simple_search2(binfo, l_word, method, title); } else { // Not Japanese error_code = ebook_simple_search2(binfo, word, method, title); } END: g_free(l_word); LOG(LOG_DEBUG, "OUT : ebook_simple_search()"); return(error_code); } static gint ebook_ending_search(BOOK_INFO *binfo, char *word, gint method, gchar *title) { EB_Error_Code error_code=EB_SUCCESS; gint i; gint len_word, len_ending; char *keywords[EBOOK_MAX_KEYWORDS + 1]; char new_word[MAX_BUFSIZE]; char new_key[256]; char *save_key; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : ebook_ending_search(method=%d)", method); g_assert(binfo != NULL); g_assert(word != NULL); error_code = ebook_simple_search(binfo, word, method, title); if((bending_only_nohit == 1) && (count_result(search_result) != 0)){ return(error_code); } split_word(word, keywords); for(i=0; keywords[i] != NULL ; i++){ if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(stemming_en_store), &iter) == TRUE){ do { gchar *pattern; gchar *normal; gtk_tree_model_get(GTK_TREE_MODEL(stemming_en_store), &iter, STEMMING_PATTERN_COLUMN, &pattern, STEMMING_NORMAL_COLUMN, &normal, -1); len_word = strlen(keywords[i]); len_ending = strlen(pattern); if(len_word < len_ending){ continue; } if(strcmp(&keywords[i][len_word - len_ending], pattern) == 0){ memcpy(new_key, keywords[i], len_word - len_ending); if(normal) sprintf(&new_key[len_word - len_ending],"%s", normal); else new_key[len_word - len_ending] = '\0'; save_key = keywords[i]; keywords[i] = new_key; cat_word(new_word, keywords); error_code = ebook_simple_search(binfo, new_word, method, title); keywords[i] = save_key; if(error_code != EB_SUCCESS){ return(error_code); } } g_free(pattern); g_free(normal); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(stemming_en_store), &iter) == TRUE); } } // Japanese stemming // Japanese keyword must not be multiple words. if(keywords[1] == NULL){ if((count_result(search_result) != 0) && (bending_only_nohit == 1)) goto END; if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(stemming_ja_store), &iter) == TRUE){ do { gchar *pattern; gchar *normal; gchar *tmp; gtk_tree_model_get(GTK_TREE_MODEL(stemming_ja_store), &iter, STEMMING_PATTERN_COLUMN, &pattern, STEMMING_NORMAL_COLUMN, &normal, -1); tmp = iconv_convert("utf-8", "euc-jp", pattern); g_free(pattern); pattern = tmp; tmp = iconv_convert("utf-8", "euc-jp", normal); g_free(normal); normal = tmp; len_word = strlen(keywords[0]); len_ending = strlen(pattern); if(len_word < len_ending){ continue; } for(i=0; ibook, &position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(NULL); } error_code = eb_read_heading(binfo->book, binfo->appendix, &text_hookset, NULL, MAXLEN_HEADING, heading, &len); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read heading : %s", ebook_error_message(error_code)); return(NULL); } heading[len] = '\0'; p = malloc(len+1); memcpy(p, heading, len+1); LOG(LOG_DEBUG, "OUT : ebook_get_heading()"); return(p); } gchar *ebook_get_text(BOOK_INFO *binfo, int page, int offset){ EB_Error_Code error_code; ssize_t len; char text[MAXLEN_TEXT + 1]; EB_Position position; gchar *p; LOG(LOG_DEBUG, "IN : ebook_get_text()"); if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(NULL); position.page = page; position.offset = offset; error_code = eb_seek_text(binfo->book, &position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); LOG(LOG_DEBUG, "OUT : ebook_get_text()=NULL"); return(NULL); } error_code = eb_read_text(binfo->book, binfo->appendix, &text_hookset, NULL, MAXLEN_TEXT, text, &len); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read text : %s", ebook_error_message(error_code)); LOG(LOG_DEBUG, "OUT : ebook_get_text()=NULL"); return(NULL); } text[len] = '\0'; p = malloc(len+1); memcpy(p, text, len+1); LOG(LOG_DEBUG, "OUT : ebook_get_text()"); return(p); } gchar *ebook_get_candidate(BOOK_INFO *binfo, int page, int offset) { EB_Error_Code error_code; ssize_t len; char text[MAXLEN_TEXT + 1]; EB_Position position; gchar *p; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(NULL); position.page = page; position.offset = offset; error_code = eb_seek_text(binfo->book, &position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(NULL); } error_code = eb_read_text(binfo->book, binfo->appendix, &candidate_hookset, NULL, MAXLEN_TEXT, text, &len); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read text : %s", ebook_error_message(error_code)); return(NULL); } text[len] = '\0'; p = malloc(len+1); memcpy(p, text, len+1); return(p); } EB_Error_Code ebook_forward_text(BOOK_INFO *binfo) { EB_Error_Code error_code; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); error_code = eb_seek_text(binfo->book, ¤t_result->data.eb.pos_text); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } error_code = eb_forward_text(binfo->book, binfo->appendix); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to forward text : %s", ebook_error_message(error_code)); return(error_code); } return(EB_SUCCESS); } EB_Error_Code ebook_backward_text(BOOK_INFO *binfo) { EB_Error_Code error_code; int stop_code = -1; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); stop_code = binfo->book->text_context.auto_stop_code; error_code = eb_seek_text(binfo->book, ¤t_result->data.eb.pos_text); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to seek text : %s", ebook_error_message(error_code)); return(error_code); } if(stop_code != -1) binfo->book->text_context.auto_stop_code = stop_code; error_code = ebook_my_backward_text(binfo); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to back text : %s", ebook_error_message(error_code)); return(error_code); } return(EB_SUCCESS); } void ebook_tell_text(BOOK_INFO *binfo, gint *page, gint *offset) { EB_Error_Code error_code; EB_Position position; error_code = eb_tell_text(binfo->book, &position); if(error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to tell text : %s", ebook_error_message(error_code)); return; } *page = position.page; *offset = position.offset; return; } EB_Error_Code ebook_menu(BOOK_INFO *binfo, EB_Position *pos) { EB_Error_Code error_code=EB_SUCCESS; error_code = eb_menu(binfo->book, pos); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get menu position : %s", ebook_error_message(error_code)); } return(error_code); } EB_Error_Code ebook_copyright(BOOK_INFO *binfo, EB_Position *pos) { EB_Error_Code error_code=EB_SUCCESS; error_code = eb_copyright(binfo->book, pos); if(error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get copyright position : %s", ebook_error_message(error_code)); } return(error_code); } static void ebook_bitmap_to_xbm(const char *bitmap, int width, int height, char *xbm, size_t *xbm_length) { char *xbm_p = xbm; const unsigned char *bitmap_p = (const unsigned char *)bitmap; int bitmap_size = (width + 7) / 8 * height; int hex; int i; for (i = 0; i < bitmap_size; i++) { hex = 0; if (*bitmap_p & 0x80) hex |= 0x01; if (*bitmap_p & 0x40) hex |= 0x02; if (*bitmap_p & 0x20) hex |= 0x04; if (*bitmap_p & 0x10) hex |= 0x08; if (*bitmap_p & 0x08) hex |= 0x10; if (*bitmap_p & 0x04) hex |= 0x20; if (*bitmap_p & 0x02) hex |= 0x40; if (*bitmap_p & 0x01) hex |= 0x80; bitmap_p++; *xbm_p = hex; xbm_p ++; } *xbm_length = (xbm_p - xbm); } gint check_gaiji_size(BOOK_INFO *binfo, gint prefered_size){ gint size; size = prefered_size; switch(size){ case 48: if (eb_have_font(binfo->book, EB_FONT_48)){ size = 48; break; } size = 30; case 30: if (eb_have_font(binfo->book, EB_FONT_30)){ size = 30; break; } size = 24; case 24: if (eb_have_font(binfo->book, EB_FONT_24)){ size = 24; break; } size = 16; case 16: if (eb_have_font(binfo->book, EB_FONT_16)){ size = 16; break; } LOG(LOG_CRITICAL, "Failed to find 16 dot gaiji : subbook=%s", binfo->subbook_title); return(-1); } if(size != prefered_size){ LOG(LOG_CRITICAL, "Cannot find %d dot gaiji. Use %d dot instead", prefered_size, size); } return(size); } guchar *read_gaiji_as_bitmap(BOOK_INFO *binfo, gchar *name, gint size, gint *width, gint *height) { EB_Error_Code error_code = EB_SUCCESS; gint char_no; gchar bitmap_data[EB_SIZE_WIDE_FONT_48]; guchar *image_data; size_t image_size; int image_width; int image_height; EB_Subbook *subbook; char_no = strtol(&name[1], NULL, 16); subbook = binfo->book->subbook_current; switch (size) { case 16: error_code = eb_set_font(binfo->book, EB_FONT_16); break; case 24: error_code = eb_set_font(binfo->book, EB_FONT_24); break; case 30: error_code = eb_set_font(binfo->book, EB_FONT_30); break; case 48: error_code = eb_set_font(binfo->book, EB_FONT_48); break; } if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to set font : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_font_height(binfo->book, &image_height); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font height : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } if(name[0] == 'h'){ if (!eb_have_narrow_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have narrow font", binfo->subbook_title); return(NULL); } error_code = eb_narrow_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_narrow_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read narrow font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } else { if (!eb_have_wide_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have wide font", binfo->subbook_title); return(NULL); } error_code = eb_wide_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_wide_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read wide font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } image_data = malloc(image_width * image_height / 8); ebook_bitmap_to_xbm(bitmap_data, image_width, image_height, (char *) image_data, &image_size); *width = image_width; *height = image_height; return(image_data); } static gchar **ebook_bitmap_to_xpm(const gchar *bitmap, gint width, gint height, gchar *color) { gchar **xpm; gchar *xpm_p; int i, j; const unsigned char *bitmap_p = (const unsigned char *)bitmap; xpm = g_new(gchar *, height + 4 + gaiji_adjustment); xpm[0] = g_strdup_printf("%d %d 2 1", width, height+gaiji_adjustment); xpm[1] = g_strdup_printf(" c None"); if(color == NULL) xpm[2] = g_strdup_printf(". c Black"); else xpm[2] = g_strdup_printf(". c %s", color); for (i = 0; i < gaiji_adjustment; i++) { xpm[i+3] = (gchar *) g_new(guchar, width + 1); memset(xpm[i+3], ' ', width); xpm[i+3][width] = '\0'; } for (;i < height + gaiji_adjustment; i++) { xpm[i+3] = (gchar *) g_new(guchar, width + 1); xpm_p = xpm[i+3]; for (j = 0; j + 7 < width; j += 8, bitmap_p++) { *xpm_p++ = (*bitmap_p & 0x80) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x40) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x20) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x10) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x08) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x04) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x02) ? '.' : ' '; *xpm_p++ = (*bitmap_p & 0x01) ? '.' : ' '; } if (j < width) { if (j++ < width) *xpm_p++ = (*bitmap_p & 0x80) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x40) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x20) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x10) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x08) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x04) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x02) ? '.' : ' '; if (j++ < width) *xpm_p++ = (*bitmap_p & 0x01) ? '.' : ' '; bitmap_p++; } *xpm_p = '\0'; } xpm[i+3] = '\0'; return(xpm); } gchar **read_gaiji_as_xpm(BOOK_INFO *binfo, gchar *name, gint size, gint *width, gint *height, gchar *color) { EB_Error_Code error_code = EB_SUCCESS; gint char_no; gchar bitmap_data[EB_SIZE_WIDE_FONT_48]; guchar *image_data; int image_width; int image_height; EB_Subbook *subbook; gchar **xpm; LOG(LOG_DEBUG, "IN : read_gaiji_as_xpm(name=%s, size=%d)", name, size); char_no = strtol(&name[1], NULL, 16); subbook = binfo->book->subbook_current; switch (size) { case 16: error_code = eb_set_font(binfo->book, EB_FONT_16); break; case 24: error_code = eb_set_font(binfo->book, EB_FONT_24); break; case 30: error_code = eb_set_font(binfo->book, EB_FONT_30); break; case 48: error_code = eb_set_font(binfo->book, EB_FONT_48); break; } if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to set font : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_font_height(binfo->book, &image_height); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font height : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } if(name[0] == 'h'){ if (!eb_have_narrow_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have narrow font", binfo->subbook_title); return(NULL); } error_code = eb_narrow_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_narrow_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read narrow font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } else { if (!eb_have_wide_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have wide font", binfo->subbook_title); return(NULL); } error_code = eb_wide_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_wide_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read wide font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } image_data = malloc((image_width + 4)* (image_height* 5)); xpm = ebook_bitmap_to_xpm(bitmap_data, image_width, image_height, color); *width = image_width; *height = image_height + gaiji_adjustment; #if 0 { gint i; for(i=0; i < size+3 ; i ++){ printf("%s\n", xpm[i]); } } #endif LOG(LOG_DEBUG, "OUT : read_gaiji_as_xpm()"); return(xpm); } #define GIF_PREAMBLE_LENGTH 38 static const unsigned char gif_preamble[GIF_PREAMBLE_LENGTH] = { /* * Header. (6 bytes) */ 'G', 'I', 'F', '8', '9', 'a', /* * Logical Screen Descriptor. (7 bytes) * global color table flag = 1. * color resolution = 1 - 1 = 0. * sort flag = 0. * size of global color table = 1 - 1 = 0. * background color index = 0. * the pixel aspect ratio = 0 (unused) * Logical screen width and height are set at run time. */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, /* * Global Color Table. (6 bytes) * These are set at run time. */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* * Graphic Control Extension. (8 bytes) * disposal method = 0. * user input flag = 0. * transparency flag = 1. * delay time = 0. * transparent color index = 0. */ 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, /* * Image Descriptor. (10 bytes) * image left position = 0. * image top position = 0. * local color table flag = 0. * interlace flag = 0. * sort flag = 0. * size of local color table = 0. * Image width and height are set at run time. */ 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* * Code size. (1byte) */ 0x03 }; static void ebook_bitmap_to_gif(bitmap, width, height, gif, gif_length, fg, bg) const char *bitmap; int width; int height; char *gif; size_t *gif_length; guint fg; guint bg; { unsigned char *gif_p = (unsigned char *)gif; const unsigned char *bitmap_p = (const unsigned char *)bitmap; int i, j; /* * Copy the default preamble. */ memcpy(gif_p, gif_preamble, GIF_PREAMBLE_LENGTH); /* * Set logical screen width and height. */ gif_p[6] = width & 0xff; gif_p[7] = (width >> 8) & 0xff; gif_p[8] = height & 0xff; gif_p[9] = (height >> 8) & 0xff; /* * Set global colors. */ gif_p[13] = (bg >> 16) & 0xff; gif_p[14] = (bg >> 8) & 0xff; gif_p[15] = bg & 0xff; gif_p[16] = (fg >> 16) & 0xff; gif_p[17] = (fg >> 8) & 0xff; gif_p[18] = fg & 0xff; /* * Set image width and height. */ gif_p[32] = width & 0xff; gif_p[33] = (width >> 8) & 0xff; gif_p[34] = height & 0xff; gif_p[35] = (height >> 8) & 0xff; gif_p += GIF_PREAMBLE_LENGTH; /* * Output image data. */ for (i = 0; i < height; i++) { *gif_p++ = (unsigned char)width; for (j = 0; j + 7 < width; j += 8, bitmap_p++) { *gif_p++ = (*bitmap_p & 0x80) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x40) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x20) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x10) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x08) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x04) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x02) ? 0x81 : 0x80; *gif_p++ = (*bitmap_p & 0x01) ? 0x81 : 0x80; } if (j < width) { if (j++ < width) *gif_p++ = (*bitmap_p & 0x80) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x40) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x20) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x10) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x08) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x04) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x02) ? 0x81 : 0x80; if (j++ < width) *gif_p++ = (*bitmap_p & 0x01) ? 0x81 : 0x80; bitmap_p++; } } /* * Output a trailer. */ memcpy(gif_p, "\001\011\000\073", 4); gif_p += 4; if (gif_length != NULL) *gif_length = ((char *)gif_p - gif); } guchar *read_gaiji_as_xbm(BOOK_INFO *binfo, gchar *name, gchar *fname, guint fg, guint bg) { EB_Error_Code error_code; gint char_no; gchar bitmap_data[EB_SIZE_WIDE_FONT_48]; guchar image_data[EB_SIZE_FONT_IMAGE]; size_t image_size; int image_width; int image_height; EB_Subbook *subbook; FILE *fp; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(NULL); char_no = strtol(&name[1], NULL, 16); subbook = binfo->book->subbook_current; error_code = eb_font_height(binfo->book, &image_height); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font height : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } if(name[0] == 'h'){ if (!eb_have_narrow_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have narrow font", binfo->subbook_title); return(NULL); } error_code = eb_narrow_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_narrow_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read narrow font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } else { if (!eb_have_wide_font(binfo->book)){ LOG(LOG_CRITICAL, "%s does not have wide font", binfo->subbook_title); return(NULL); } error_code = eb_wide_font_width(binfo->book, &image_width); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to get font width : subbook=%s\n%s", binfo->subbook_title, ebook_error_message(error_code)); return(NULL); } error_code = eb_wide_font_character_bitmap( binfo->book, char_no, bitmap_data); if (error_code != EB_SUCCESS) { LOG(LOG_CRITICAL, "Failed to read wide font : subbook=%s, character=0x%04x\n%s", binfo->subbook_title, char_no, ebook_error_message(error_code)); return(NULL); } } ebook_bitmap_to_gif(bitmap_data, image_width, image_height, (char *) image_data, &image_size, fg, bg); fp = fopen(fname, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "file open failed : %s", fname); } fwrite(image_data, image_size, 1, fp); fclose(fp); return(NULL); } EB_Error_Code ebook_output_wave(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint size) { EB_Position pos; char binary_data[EB_SIZE_PAGE]; EB_Error_Code error_code; EB_Position end_position; ssize_t read_length; FILE *fp; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); pos.page = page; pos.offset = offset; end_position.page = pos.page + (size / EB_SIZE_PAGE); end_position.offset = pos.offset + (size % EB_SIZE_PAGE); if (EB_SIZE_PAGE <= end_position.offset) { end_position.offset -= EB_SIZE_PAGE; end_position.page++; } /* * Read sound data. */ error_code = eb_set_binary_wave(binfo->book, &pos, &end_position); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set binary wave : %s", ebook_error_message(error_code)); return(error_code); } fp = fopen(filename, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "Failed to open file : %s", filename); return(EB_ERR_BAD_FILE_NAME); } for (;;) { error_code = eb_read_binary(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ fclose(fp); return(error_code); } // If there are extra data (32 bytes) before fmt chunk,remove them. if((strncmp("fmt ", &binary_data[44], 4) == 0) && (strncmp("fmt ", &binary_data[12], 4) != 0)){ LOG(LOG_CRITICAL, "Warning: extra header found in WAVE data."); fwrite(binary_data, 12, 1, fp); fwrite(&binary_data[44], read_length - 44, 1, fp); } else { fwrite(binary_data, read_length, 1, fp); } } /* not reached */ return(EB_SUCCESS); } EB_Error_Code ebook_output_mpeg(BOOK_INFO *binfo, gchar *srcname, gchar *destname) { char binary_data[EB_SIZE_PAGE]; guint argv[4]; EB_Error_Code error_code; ssize_t read_length; FILE *fp; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); if((error_code = eb_decompose_movie_file_name(argv, srcname)) != EB_SUCCESS) return(error_code); /* * Read sound data. */ error_code = eb_set_binary_mpeg(binfo->book, argv); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set binary mpeg : %s", ebook_error_message(error_code)); return(error_code); } fp = fopen(destname, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "Failed to open file : %s", destname); return(EB_ERR_BAD_FILE_NAME); } for (;;) { error_code = eb_read_binary(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ fclose(fp); return(error_code); } fwrite(binary_data, read_length, 1, fp); } /* not reached */ return(EB_SUCCESS); } EB_Error_Code ebook_output_color(BOOK_INFO *binfo, gchar *filename, gint page, gint offset) { EB_Position pos; char binary_data[EB_SIZE_PAGE]; EB_Error_Code error_code; ssize_t read_length; FILE *fp; pos.page = page; pos.offset = offset; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); error_code = eb_set_binary_color_graphic(binfo->book, &pos); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set binary color graphic : %s", ebook_error_message(error_code)); return(error_code); } fp = fopen(filename, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "Failed to open file : %s", filename); return(EB_ERR_BAD_FILE_NAME); } for (;;) { error_code = eb_read_binary(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ fclose(fp); return(error_code); } fwrite(binary_data, read_length, 1, fp); } /* not reached */ return(EB_SUCCESS); } EB_Error_Code ebook_output_gray(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint width, gint height) { EB_Position pos; char binary_data[EB_SIZE_PAGE]; EB_Error_Code error_code; ssize_t read_length; FILE *fp; pos.page = page; pos.offset = offset; if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); error_code = eb_set_binary_gray_graphic(binfo->book, &pos, width, height); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set binary gray graphic : %s", ebook_error_message(error_code)); return(error_code); } fp = fopen(filename, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "Failed to open file : %s", filename); return(EB_ERR_BAD_FILE_NAME); } for (;;) { error_code = eb_read_binary(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ fclose(fp); return(error_code); } fwrite(binary_data, read_length, 1, fp); } /* not reached */ return(EB_SUCCESS); } EB_Error_Code ebook_output_mono(BOOK_INFO *binfo, gchar *filename, gint page, gint offset, gint width, gint height) { FILE *fp; EB_Error_Code error_code; EB_Position pos; char *binary_data; ssize_t read_length; gint data_size; gchar *bmp_data; size_t bmp_length; #ifdef COLOR_HACK guchar fg[4]; guchar bg[4]; GdkColor color; color = dict_area->area->style->fg[GTK_STATE_NORMAL]; fg[0] = (guchar)color.red; fg[1] = (guchar)color.green; fg[2] = (guchar)color.blue; fg[3] = 0x0; color = dict_area->area->style->bg[GTK_STATE_NORMAL]; bg[0] = (guchar)color.red; bg[1] = (guchar)color.green; bg[2] = (guchar)color.blue; bg[3] = 0x0; #endif if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(error_code); fp = fopen(filename, "wb"); if(fp == NULL){ LOG(LOG_CRITICAL, "Failed to open file : %s", filename); return(EB_ERR_BAD_FILE_NAME); } pos.page = page; pos.offset = offset; eb_seek_text(binfo->book, &pos); error_code = eb_set_binary_mono_graphic(binfo->book, &pos, width, height); // Workaround for dictionaries such as Super Tougou Jisho 2000, // whose graphics data is in Honmon2. // Fixed in eb-3.3. if (error_code != EB_SUCCESS){ if((width % 8) != 0) width = (width / 8)*8 + 8; data_size = width * height / 8; binary_data = malloc(data_size); bmp_data = malloc(data_size*10); pos.page = page; pos.offset = offset; eb_seek_text(binfo->book, &pos); error_code = eb_read_rawtext(binfo->book, data_size, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ return(error_code); } eb_bitmap_to_bmp(binary_data, width, height, bmp_data, &bmp_length); fwrite(bmp_data, bmp_length, 1, fp); #ifdef COLOR_HACK fseek(fp, 54, SEEK_SET); fwrite(bg, 4, 1, fp); fseek(fp, 58, SEEK_SET); fwrite(fg, 4, 1, fp); #endif fclose(fp); free(binary_data); free(bmp_data); return(EB_SUCCESS); } if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set binary mono : %s", ebook_error_message(error_code)); return(error_code); } for (;;) { char binary_data[EB_SIZE_PAGE]; error_code = eb_read_binary(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ fclose(fp); return(error_code); } #ifdef COLOR_HACK memcpy(&binary_data[54], bg, 4); memcpy(&binary_data[58], fg, 4); #endif fwrite(binary_data, read_length, 1, fp); } /* not reached */ fclose(fp); return(EB_SUCCESS); } gchar *ebook_get_rawtext(BOOK_INFO *binfo, gint page, gint offset) { EB_Position pos; char *binary_data; EB_Error_Code error_code; ssize_t read_length; binary_data = malloc(EB_SIZE_PAGE); if((error_code = ebook_set_subbook(binfo)) != EB_SUCCESS) return(NULL); pos.page = page; pos.offset = offset; eb_seek_text(binfo->book, &pos); error_code = eb_read_rawtext(binfo->book, EB_SIZE_PAGE, binary_data, &read_length); if (error_code != EB_SUCCESS || read_length == 0){ return(NULL); } return(binary_data); } EB_Error_Code ebook_set_subbook(BOOK_INFO *binfo) { EB_Error_Code error_code; error_code = eb_set_subbook(binfo->book, binfo->subbook_no); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set subbook %s, %d : %s", binfo->book_path, binfo->subbook_no, ebook_error_message(error_code)); return(error_code); } if(binfo->appendix != NULL){ error_code = eb_set_appendix_subbook(binfo->appendix, binfo->appendix_subbook_no); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set appendix subbook : %s", ebook_error_message(error_code)); return(error_code); } } return(EB_SUCCESS); } ebview-0.3.6.2/src/link.c0000644000175000017500000000713210016041410014335 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "dump.h" #include "eb.h" #include "external.h" #include "history.h" #include "mainwindow.h" static GList *link_list=NULL; void set_link(TAG *tag) { TAG *t; LOG(LOG_DEBUG, "IN : set_link(type=%d, start=%d, end=%d)", tag->type, tag->start, tag->end); g_assert(tag != NULL); t = calloc(sizeof(TAG), 1); t->type = tag->type; t->start = tag->start; t->end = tag->end; t->page = tag->page; t->offset = tag->offset; t->size = tag->size; if(strlen(tag->filename) <= 255) strcpy(t->filename, tag->filename); link_list = g_list_append(link_list, t); LOG(LOG_DEBUG, "OUT : set_link()"); } void clear_link() { GList *item; LOG(LOG_DEBUG, "IN : clear_link()"); item = g_list_first(link_list); while(item){ g_free(item->data); item = g_list_next(item); } g_list_free(link_list); link_list = NULL; LOG(LOG_DEBUG, "OUT : clear_link()"); } TAG *scan_link(guint offset) { GList *item; TAG *tag; // LOG(LOG_DEBUG, "IN : scan_link(%d)", offset); item = g_list_first(link_list); while(item){ tag = (TAG *)(item->data); if((tag->start <= offset) && (offset <= tag->end)){ LOG(LOG_DEBUG, "OUT : scan_link() = found"); return(tag); } item = g_list_next(item); } // LOG(LOG_DEBUG, "OUT : scan_link()"); return(NULL); } static gchar *lastfile=NULL; static gint count=0; gboolean follow_link(guint offset) { TAG *tag; gchar filename[512]; RESULT result; LOG(LOG_DEBUG, "IN : follow_link(%d)", offset); tag = scan_link(offset); if(tag){ if(tag->type & TAG_TYPE_LINK){ result.type = RESULT_TYPE_EB; result.heading = NULL; result.word = NULL; result.data.eb.book_info = current_result->data.eb.book_info; result.data.eb.pos_text.page = tag->page; result.data.eb.pos_text.offset = tag->offset; result.data.eb.plain_heading = NULL; result.data.eb.dict_title = NULL; show_result(&result, TRUE, FALSE); } else if (tag->type & TAG_TYPE_SOUND){ sprintf(filename, "%s%sebview-%d-%d.wav", temp_dir, DIR_DELIMITER, getpid(), count++); ebook_output_wave(current_result->data.eb.book_info, filename, tag->page, tag->offset, tag->size); play_multimedia(filename, TAG_TYPE_SOUND); if(lastfile){ unlink(lastfile); g_free(lastfile); } lastfile = strdup(filename); // Link to movie } else if (tag->type & TAG_TYPE_MOVIE){ sprintf(filename, "%s%sebview-%d-%d.mpg", temp_dir, DIR_DELIMITER, getpid(), count++); unlink(filename); ebook_output_mpeg(current_result->data.eb.book_info, tag->filename, filename); play_multimedia(filename, TAG_TYPE_MOVIE); if(lastfile){ unlink(lastfile); g_free(lastfile); } lastfile = strdup(filename); } LOG(LOG_DEBUG, "OUT : follow_link() = TRUE"); return(TRUE); } LOG(LOG_DEBUG, "OUT : follow_link() = FALSE"); return(FALSE); } ebview-0.3.6.2/src/pref_dictgroup.c0000644000175000017500000012564211241635664016450 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "cellrenderercolor.h" #include "eb.h" #include "xml.h" #include "dialog.h" #include "dictbar.h" #include "jcode.h" #include "pref_io.h" #include "dirtree.h" static GtkWidget *dict_view; static GtkWidget *entry_group_name; static GtkWidget *entry_directory_name; static GtkWidget *spin_search_depth; static GtkWidget *entry_title; static GtkWidget *entry_book_path; static GtkWidget *entry_appendix_path; static GtkWidget *entry_subbook_no; static GtkWidget *entry_appendix_subbook_no; static GtkWidget *label_color; static GtkWidget *colorsel_dlg;; static gchar fg_color[16]; static gchar bg_color[16]; static gint color_no; static GtkTreeIter last_iter; static BOOK_INFO *last_binfo=NULL; static gboolean last_active; static gboolean edited=FALSE; static gboolean rewinding=FALSE; extern GtkWidget *pref_dlg; extern GtkWidget *web_view; enum { BOOKLIST_TITLE_COLUMN, BOOKLIST_PATH_COLUMN, BOOKLIST_SUBBOOK_NO_COLUMN, BOOKLIST_N_COLUMNS }; GList *book_list=NULL; void print_dict_group(); void my_gtk_tree_store_swap (GtkTreeStore *tree_store, GtkTreeIter *a, GtkTreeIter *b); static gboolean update_last_dictionary(); extern GtkWidget *combo_method; extern void remove_space(gchar *f); gboolean pref_end_dictgroup() { #if 0 GtkTreeIter parent_iter; gchar *title; #endif LOG(LOG_DEBUG, "IN : pref_end_dictgroup()"); if(update_last_dictionary() == FALSE) return(FALSE); #if 0 // "Disk Search Result" $B$H$$$&%0%k!<%W$,$"$C$?$i:o=|$9$k(B if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE){ do { gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &parent_iter, DICT_TITLE_COLUMN, &title, -1); if(strcmp(title, "Disk Search Result") == 0){ g_free(title); gtk_tree_store_remove(GTK_TREE_STORE(dict_store), &parent_iter); break; } g_free(title); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(dict_store), &parent_iter) == TRUE); } #endif save_dictgroup(); update_dict_bar(); LOG(LOG_DEBUG, "OUT : pref_end_dictgroup()"); return(TRUE); } #if 0 static void add_dict(GtkWidget *widget,gpointer *data) { gint type; const gchar *title; const gchar *path; gint subbook_no; gchar *appendix_path=NULL; gint appendix_subbook_no=0; BOOK_INFO *binfo=NULL; GtkTreeIter iter; GtkTreeIter child_iter; GtkTreeSelection *selection; GtkTreePath *tree_path; LOG(LOG_DEBUG, "IN : add_dict()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(booklist_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gtk_tree_model_get(GTK_TREE_MODEL(booklist_store), &iter, BOOKLIST_TITLE_COLUMN, &title, BOOKLIST_PATH_COLUMN, &path, BOOKLIST_SUBBOOK_NO_COLUMN, &subbook_no, -1); } selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE){ popup_warning(_("Please select group.")); LOG(LOG_DEBUG, "OUT : add_dict()"); return; } gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, -1); //binfo = load_book(path, atoi(subbook_no)); binfo = load_book(path, subbook_no, appendix_path, appendix_subbook_no, NULL, NULL); if(binfo == NULL){ LOG(LOG_CRITICAL, _("Failed to load dictionary.")); return; } if(type == 0){ gtk_tree_store_append(dict_store, &child_iter, &iter); } else { gtk_tree_store_insert_after(dict_store, &child_iter, NULL, &iter); } gtk_tree_store_set (dict_store, &child_iter, DICT_TYPE_COLUMN, 1, DICT_TITLE_COLUMN, title, DICT_ACTIVE_COLUMN, FALSE, DICT_MEMBER_COLUMN, binfo, DICT_FGCOLOR_COLUMN, NULL, DICT_BGCOLOR_COLUMN, NULL, -1); tree_path = gtk_tree_model_get_path(GTK_TREE_MODEL(dict_store), &iter); gtk_tree_view_expand_row(GTK_TREE_VIEW(dict_view), tree_path, FALSE); gtk_tree_path_free (tree_path); LOG(LOG_DEBUG, "OUT : add_dict()"); } #endif static void cell_edited(GtkCellRendererText *cell, const gchar *path_string, const gchar *new_text, gpointer data) { GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; gint column; gchar *book_path; gint subbook_no; gchar *appendix_path=NULL; gint appendix_subbook_no=0; gchar *fs_book_path; gchar *fs_appendix_path; gchar *fg; gchar *bg; gint type; BOOK_INFO *binfo; column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT (cell), "column")); gtk_tree_model_get_iter(GTK_TREE_MODEL(dict_store), &iter, path); switch(column) { case DICT_TITLE_COLUMN: case DICT_PATH_COLUMN: case DICT_APPENDIX_PATH_COLUMN: { gchar *old_text; gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, column, &old_text, -1); g_free (old_text); gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, column, new_text, -1); } break; case DICT_SUBBOOK_NO_COLUMN: case DICT_APPENDIX_SUBBOOK_NO_COLUMN: { gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, column, atoi(new_text), -1); } break; case DICT_FGCOLOR_COLUMN: case DICT_BGCOLOR_COLUMN: { gint i; gchar *old_text; if(new_text[0] != '#') return; // remove_space(new_text); if(strlen(new_text) != 7) return; if(strlen(new_text) != 0){ for(i=1; i<7 ; i++){ if((('0' <= new_text[i]) && (new_text[i] <= '9')) || (('a' <= new_text[i]) && (new_text[i] <= 'f'))){ } else { return; } } } gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, column, &old_text, -1); g_free (old_text); gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, column, new_text, -1); } break; } gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_PATH_COLUMN, &book_path, DICT_SUBBOOK_NO_COLUMN, &subbook_no, DICT_APPENDIX_PATH_COLUMN, &appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, &appendix_subbook_no, DICT_MEMBER_COLUMN, &binfo, DICT_FGCOLOR_COLUMN, &fg, DICT_BGCOLOR_COLUMN, &bg, -1); // Group if(type == 0) return; // if(binfo != NULL) // unload_book(binfo); binfo = NULL; if(book_path) fs_book_path = unicode_to_fs(book_path); else fs_book_path = NULL; if((appendix_path) && (strlen(appendix_path) != 0)) fs_appendix_path = unicode_to_fs(appendix_path); else fs_appendix_path = NULL; binfo = load_book(fs_book_path, subbook_no, fs_appendix_path, appendix_subbook_no, fg, bg); g_free(fs_book_path); g_free(fs_appendix_path); g_free(book_path); g_free(appendix_path); g_free(fg); g_free(bg); if(binfo == NULL){ LOG(LOG_CRITICAL, _("Failed to load dictionary.")); return; } gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, DICT_MEMBER_COLUMN, binfo, -1); gtk_tree_path_free (path); } static gboolean row_drop_possible (GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data) { GtkTreeSelection *selection; GtkTreeIter iter; GtkTreePath *src; LOG(LOG_DEBUG, "IN : row_drop_possible()"); if(dest == NULL) return(FALSE); if(GTK_TREE_STORE(drag_dest) == GTK_TREE_STORE(dict_store)) selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); else if(GTK_TREE_STORE(drag_dest) == GTK_TREE_STORE(web_store)) selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(web_view)); else return(FALSE); if(gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) return(FALSE); src = gtk_tree_model_get_path(GTK_TREE_MODEL(drag_dest), &iter); /* printf("src = %s, dest = %s\n", gtk_tree_path_to_string(src), gtk_tree_path_to_string(dest)); */ if(gtk_tree_path_get_depth(src) == gtk_tree_path_get_depth(dest)) { return(TRUE); } else { return(FALSE); } } static void up_item(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; GtkTreeIter prev_iter; GtkTreeSelection *selection; GtkTreePath *path; GtkTreePath *path_orig; LOG(LOG_DEBUG, "IN : up_item()"); edited = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select dictionary.")); return; } path = gtk_tree_model_get_path(GTK_TREE_MODEL(dict_store), &iter); path_orig = gtk_tree_path_copy(path); gtk_tree_path_prev(path); if((gtk_tree_path_compare(path, path_orig) != 0) && gtk_tree_model_get_iter(GTK_TREE_MODEL(dict_store), &prev_iter, path)) { my_gtk_tree_store_swap(dict_store, &iter, &prev_iter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)), &iter); } else if(gtk_tree_path_get_depth(path) > 1){ gtk_tree_path_up(path); if(gtk_tree_path_compare(path, path_orig) != 0){ gtk_tree_path_free(path_orig); path_orig = gtk_tree_path_copy(path); gtk_tree_path_prev(path); if(gtk_tree_path_compare(path, path_orig) != 0){ GtkTreeIter parent; if(gtk_tree_model_get_iter(GTK_TREE_MODEL(dict_store), &parent, path)) { GtkTreeIter new_iter; gint type; gchar *title; gchar *book_path; gint subbook_no; gchar *appendix_path; gint appendix_subbook_no; gboolean active; BOOK_INFO *binfo; gboolean editable; gchar *fg, *bg; gtk_tree_store_append(GTK_TREE_STORE(dict_store), &new_iter, &parent); gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_TITLE_COLUMN, &title, DICT_PATH_COLUMN, &book_path, DICT_SUBBOOK_NO_COLUMN, &subbook_no, DICT_APPENDIX_PATH_COLUMN, &appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, &appendix_subbook_no, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, DICT_EDITABLE_COLUMN, &editable, DICT_FGCOLOR_COLUMN, &fg, DICT_BGCOLOR_COLUMN, &bg, -1); gtk_tree_store_set(dict_store, &new_iter, DICT_TYPE_COLUMN, type, DICT_TITLE_COLUMN, title, DICT_PATH_COLUMN, book_path, DICT_SUBBOOK_NO_COLUMN, subbook_no, DICT_APPENDIX_PATH_COLUMN, appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, appendix_subbook_no, DICT_ACTIVE_COLUMN, active, DICT_MEMBER_COLUMN, binfo, DICT_EDITABLE_COLUMN, editable, DICT_FGCOLOR_COLUMN, fg, DICT_BGCOLOR_COLUMN, bg, -1); g_free(title); g_free(book_path); g_free(appendix_path); g_free(fg); g_free(bg); gtk_tree_store_remove(GTK_TREE_STORE(dict_store), &iter); gtk_tree_view_expand_row(GTK_TREE_VIEW(dict_view), path, TRUE); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)), &new_iter); } } } } gtk_tree_path_free(path); gtk_tree_path_free(path_orig); LOG(LOG_DEBUG, "OUT : up_item()"); return; } static void down_item(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; GtkTreeIter next_iter; GtkTreeSelection *selection; GtkTreePath *path; GtkTreePath *path_orig; LOG(LOG_DEBUG, "IN : down_item()"); edited = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter) == FALSE) { popup_warning(_("Please select dictionary.")); return; } path = gtk_tree_model_get_path(GTK_TREE_MODEL(dict_store), &iter); path_orig = gtk_tree_path_copy(path); gtk_tree_path_next(path); if((gtk_tree_path_compare(path, path_orig) != 0) && gtk_tree_model_get_iter(GTK_TREE_MODEL(dict_store), &next_iter, path)) { my_gtk_tree_store_swap(dict_store, &iter, &next_iter); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)), &iter); } else if(gtk_tree_path_get_depth(path) > 1){ gtk_tree_path_up(path); if(gtk_tree_path_compare(path, path_orig) != 0){ gtk_tree_path_free(path_orig); path_orig = gtk_tree_path_copy(path); gtk_tree_path_next(path); if(gtk_tree_path_compare(path, path_orig) != 0){ GtkTreeIter parent; if(gtk_tree_model_get_iter(GTK_TREE_MODEL(dict_store), &parent, path)) { GtkTreeIter new_iter; gint type; gchar *title; gchar *book_path; gint subbook_no; gchar *appendix_path; gint appendix_subbook_no; gboolean active; BOOK_INFO *binfo; gboolean editable; gchar *fg, *bg; gtk_tree_store_prepend(GTK_TREE_STORE(dict_store), &new_iter, &parent); gtk_tree_model_get(GTK_TREE_MODEL(dict_store), &iter, DICT_TYPE_COLUMN, &type, DICT_TITLE_COLUMN, &title, DICT_PATH_COLUMN, &book_path, DICT_SUBBOOK_NO_COLUMN, &subbook_no, DICT_APPENDIX_PATH_COLUMN, &appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, &appendix_subbook_no, DICT_ACTIVE_COLUMN, &active, DICT_MEMBER_COLUMN, &binfo, DICT_EDITABLE_COLUMN, &editable, DICT_FGCOLOR_COLUMN, &fg, DICT_BGCOLOR_COLUMN, &bg, -1); gtk_tree_store_set(dict_store, &new_iter, DICT_TYPE_COLUMN, type, DICT_TITLE_COLUMN, title, DICT_PATH_COLUMN, book_path, DICT_SUBBOOK_NO_COLUMN, subbook_no, DICT_APPENDIX_PATH_COLUMN, appendix_path, DICT_APPENDIX_SUBBOOK_NO_COLUMN, appendix_subbook_no, DICT_ACTIVE_COLUMN, active, DICT_MEMBER_COLUMN, binfo, DICT_EDITABLE_COLUMN, editable, DICT_FGCOLOR_COLUMN, fg, DICT_BGCOLOR_COLUMN, bg, -1); g_free(title); g_free(book_path); g_free(appendix_path); g_free(fg); g_free(bg); gtk_tree_store_remove(GTK_TREE_STORE(dict_store), &iter); gtk_tree_view_expand_row(GTK_TREE_VIEW(dict_view), path, TRUE); gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)), &new_iter); } } } } gtk_tree_path_free(path); gtk_tree_path_free(path_orig); LOG(LOG_DEBUG, "OUT : down_item()"); return; } static void remove_item(GtkWidget *widget, gpointer *data) { GtkTreeIter iter; GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_item()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { edited = FALSE; gtk_tree_store_remove(GTK_TREE_STORE(dict_store), &iter); } LOG(LOG_DEBUG, "OUT : remove_item()"); } static void add_group(GtkWidget *widget,gpointer *data) { GtkTreeIter iter; char *name; LOG(LOG_DEBUG, "IN : add_grop()"); name = (gchar *)gtk_entry_get_text(GTK_ENTRY(entry_group_name)); name = g_strdup(name); remove_space(name); if(strlen(name) == 0){ return; } gtk_tree_store_append(GTK_TREE_STORE(dict_store), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(dict_store), &iter, DICT_TYPE_COLUMN, 0, DICT_TITLE_COLUMN, name, DICT_EDITABLE_COLUMN, TRUE, -1); gtk_entry_set_text(GTK_ENTRY(entry_group_name), ""); g_free(name); LOG(LOG_DEBUG, "OUT : add_grop()"); } static int enumerate_subbook(char *path) { EB_Book book; EB_Error_Code error_code; int subcount, i; EB_Subbook_Code sublist[EB_MAX_SUBBOOKS]; char buff[512]; BOOK_INFO *binfo; EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES]; int multi_count; GtkTreeIter parent_iter; GtkTreeIter child_iter; gchar *utf_str; gboolean group_exist; gchar *title; GtkTreePath *tree_path; gchar *utf_path; LOG(LOG_DEBUG, "IN : enumerate_subbook(%s)", path); eb_initialize_book(&book); error_code = eb_bind(&book, path); if(error_code != EB_SUCCESS){ LOG(LOG_INFO,"Failed to bind book. Maybe wrong directory."); return(1); } error_code = eb_subbook_list(&book, sublist, &subcount); if(error_code != EB_SUCCESS){ LOG(LOG_INFO,"Failed to bind book. Maybe wrong directory."); return(1); } for(i=0 ; i%s", bg_color, _("Sample")); } else { if(bg == NULL) sprintf(buff, "%s", fg_color, _("Sample")); else sprintf(buff, "%s", fg_color, bg_color, _("Sample")); } gtk_label_set_text(GTK_LABEL(label_color), buff); gtk_label_set_use_markup (GTK_LABEL (label_color), TRUE); gtk_tree_selection_get_selected(selection, NULL, &last_iter); last_binfo = binfo; last_active = active; edited = TRUE; END: g_free(title); g_free(book_path); g_free(appendix_path); g_free(fg); g_free(bg); LOG(LOG_DEBUG, "OUT : dict_selection_changed()"); } static void ok_colorsel(GtkWidget *widget,gpointer *data){ GdkColor color; gchar *color_name; gchar buff[128]; gchar *title; LOG(LOG_DEBUG, "IN : ok_colorsel()"); gtk_grab_remove(colorsel_dlg); gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->colorsel), &color); color_name = gtk_color_selection_palette_to_string(&color, 1); if(color_no == 0){ sprintf(fg_color, "%s", color_name); } else { sprintf(bg_color, "%s", color_name); } title = (gchar *)gtk_entry_get_text(GTK_ENTRY(entry_title)); if(strlen(fg_color) == 0){ if(strlen(bg_color) == 0) sprintf(buff, _("Sample")); else sprintf(buff, "%s", bg_color, _("Sample")); } else { if(strlen(bg_color) == 0) sprintf(buff, "%s", fg_color, _("Sample")); else sprintf(buff, "%s", fg_color, bg_color, _("Sample")); } gtk_label_set_text(GTK_LABEL(label_color), buff); gtk_label_set_use_markup (GTK_LABEL (label_color), TRUE); gtk_widget_destroy(colorsel_dlg); LOG(LOG_DEBUG, "OUT : ok_colorsel()"); } static void delete_colorsel( GtkWidget *widget, GdkEvent *event, gpointer data ) { LOG(LOG_DEBUG, "IN : delete_colorsel()"); ok_colorsel(NULL, NULL); LOG(LOG_DEBUG, "OUT : delete_colorsel()"); } static void show_colorsel(GtkWidget *widget,gpointer *data){ GdkColor color; LOG(LOG_DEBUG, "IN : show_colorsel()"); color_no = (gint)(intptr_t)data; colorsel_dlg = gtk_color_selection_dialog_new(_("Choose Color")); g_signal_connect (G_OBJECT(colorsel_dlg), "delete_event", G_CALLBACK(delete_colorsel), NULL); g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->ok_button), "clicked", G_CALLBACK(ok_colorsel), NULL); g_signal_connect_swapped(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)colorsel_dlg); g_assert(color_no < NUM_COLORS); if(color_no == 0){ gdk_color_parse(fg_color, &color); } else { gdk_color_parse(bg_color, &color); } gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(colorsel_dlg)->colorsel), &color); gtk_widget_realize(colorsel_dlg); center_dialog(pref_dlg, colorsel_dlg); gtk_widget_show_all(colorsel_dlg); gtk_grab_add(colorsel_dlg); LOG(LOG_DEBUG, "OUT : show_colorsel()"); } static void clear_color(GtkWidget *widget,gpointer *data){ gchar buff[128]; LOG(LOG_DEBUG, "IN : clear_color()"); fg_color[0] = '\0'; bg_color[0] = '\0'; sprintf(buff, _("Sample")); gtk_label_set_text(GTK_LABEL(label_color), buff); gtk_label_set_use_markup (GTK_LABEL (label_color), FALSE); LOG(LOG_DEBUG, "OUT : clear_color()"); } GtkWidget *pref_start_dictgroup() { GtkWidget *button; GtkWidget *vbox_l; GtkWidget *vbox_r; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *frame; GtkWidget *label; GtkWidget *scroll; GtkObject *adj; GtkCellRenderer *renderer; GtkTreeSelection *select; GtkTreeDragDestIface *iface; LOG(LOG_DEBUG, "IN : pref_start_dictgroup()"); hbox = gtk_hbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 2); vbox_l = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox_l), 2); gtk_box_pack_start (GTK_BOX(hbox) , vbox_l,TRUE, TRUE, 0); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox_l) , frame,TRUE, TRUE, 0); scroll = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scroll); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); dict_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(dict_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(dict_view), TRUE); gtk_tree_view_expand_all(GTK_TREE_VIEW(dict_view)); gtk_container_add (GTK_CONTAINER (scroll), dict_view); select = gtk_tree_view_get_selection(GTK_TREE_VIEW(dict_view)); gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK (dict_selection_changed), NULL); /* gtk_tree_view_enable_model_drag_source( GTK_TREE_VIEW(dict_view), GDK_BUTTON1_MASK, row_targets, G_N_ELEMENTS(row_targets), GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_dest( GTK_TREE_VIEW(dict_view), row_targets, G_N_ELEMENTS(row_targets), GDK_ACTION_MOVE); */ iface = GTK_TREE_DRAG_DEST_GET_IFACE (dict_store); iface->row_drop_possible = row_drop_possible; g_signal_connect(G_OBJECT(dict_view), "drag_data_received", G_CALLBACK(drag_data_received), NULL); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(dict_view), TRUE); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_TITLE_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("Name"), renderer, "text", DICT_TITLE_COLUMN, "editable", DICT_EDITABLE_COLUMN, NULL); /* renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_PATH_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("Path"), renderer, "text", DICT_PATH_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_SUBBOOK_NO_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("Subbook Number"), renderer, "text", DICT_SUBBOOK_NO_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_APPENDIX_PATH_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("Appendix Path"), renderer, "text", DICT_APPENDIX_PATH_COLUMN, "editable", DICT_EDITABLE_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_APPENDIX_SUBBOOK_NO_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("Appendix Subbook Number"), renderer, "text", DICT_APPENDIX_SUBBOOK_NO_COLUMN, "editable", DICT_EDITABLE_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); // renderer = gtk_cell_renderer_color_new(); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_BGCOLOR_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("BG Color"), renderer, "text", DICT_BGCOLOR_COLUMN, "editable", DICT_EDITABLE_COLUMN, "cell-background", DICT_BGCOLOR_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); renderer = gtk_cell_renderer_text_new(); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(cell_edited), NULL); g_object_set_data(G_OBJECT(renderer), "column", (gint *)DICT_FGCOLOR_COLUMN); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(dict_view), -1, _("FG Color"), renderer, "text", DICT_FGCOLOR_COLUMN, "editable", DICT_EDITABLE_COLUMN, "cell-background", DICT_FGCOLOR_COLUMN, "visible", DICT_TYPE_COLUMN, NULL); // $B$9$Y$F$N%+%i%`$r%j%5%$%:$G$-$k$h$&$K$9$k(B { gint i; GtkTreeViewColumn *column; for(i=0;;i++){ column = gtk_tree_view_get_column(GTK_TREE_VIEW(dict_view), i); if(column == NULL) break; gtk_tree_view_column_set_resizable(column, TRUE); } } */ hbox2 = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox_l), hbox2,FALSE, FALSE, 2); label = gtk_label_new(_("Group name")); gtk_box_pack_start(GTK_BOX(hbox2), label,FALSE, FALSE, 2); entry_group_name = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox2), entry_group_name,TRUE, TRUE, 2); g_signal_connect(G_OBJECT (entry_group_name), "activate", G_CALLBACK(add_group), (gpointer)NULL); button = gtk_button_new_with_label(_("Add")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_group), (gpointer)button); button = gtk_button_new_with_label(_("Remove")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(remove_item), (gpointer)button); button = gtk_button_new_with_label(_("Up")); gtk_box_pack_start (GTK_BOX(hbox2), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(up_item), (gpointer)button); button = gtk_button_new_with_label(_("Down")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(down_item), (gpointer)button); hbox2 = gtk_hbox_new(FALSE,5); gtk_box_pack_start(GTK_BOX(vbox_l), hbox2,FALSE, FALSE, 2); label = gtk_label_new(_("Path")); gtk_box_pack_start(GTK_BOX(hbox2), label,FALSE, FALSE, 2); entry_directory_name = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox2), entry_directory_name, FALSE, FALSE, 2); g_signal_connect(G_OBJECT (entry_directory_name), "activate", G_CALLBACK(search_disk), (gpointer)NULL); label = gtk_label_new(_("Depth")); gtk_box_pack_start(GTK_BOX(hbox2), label,FALSE, FALSE, 2); adj = gtk_adjustment_new( 1, //value 0, // lower 20, //upper 1, // step increment 10,// page_increment, (gfloat)0.0); spin_search_depth = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); gtk_box_pack_start(GTK_BOX(hbox2), spin_search_depth,FALSE, FALSE, 2); gtk_tooltips_set_tip(tooltip, spin_search_depth, _("Specify search depth. 0 means to search only specified directory."),"Private"); button = gtk_button_new_with_label(_("Search Disk")); gtk_box_pack_start(GTK_BOX(hbox2), button,FALSE,FALSE, 2); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(search_disk), (gpointer)button); // $B1&H>J,(B frame = gtk_frame_new(NULL); gtk_box_pack_start (GTK_BOX(hbox) , frame,TRUE, TRUE, 0); vbox_r = gtk_vbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(vbox_r), 5); gtk_container_add(GTK_CONTAINER(frame), vbox_r); label = gtk_label_new(_("Name")); gtk_box_pack_start (GTK_BOX(vbox_r), label, FALSE, FALSE, 0); entry_title = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(vbox_r), entry_title, FALSE, FALSE, 0); label = gtk_label_new(_("Path")); gtk_box_pack_start (GTK_BOX(vbox_r), label, FALSE, FALSE, 0); entry_book_path = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(entry_book_path), FALSE); gtk_box_pack_start (GTK_BOX(vbox_r), entry_book_path, FALSE, FALSE, 0); gtk_widget_set_sensitive(entry_book_path, FALSE); label = gtk_label_new(_("Subbook Number")); gtk_box_pack_start (GTK_BOX(vbox_r), label, FALSE, FALSE, 0); entry_subbook_no = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(entry_subbook_no), FALSE); gtk_box_pack_start (GTK_BOX(vbox_r), entry_subbook_no, FALSE, FALSE, 0); gtk_widget_set_sensitive(entry_subbook_no, FALSE); label = gtk_label_new(_("Appendix Path")); gtk_box_pack_start (GTK_BOX(vbox_r), label, FALSE, FALSE, 0); entry_appendix_path = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(vbox_r), entry_appendix_path, FALSE, FALSE, 0); label = gtk_label_new(_("Appendix Subbook Number")); gtk_box_pack_start (GTK_BOX(vbox_r), label, FALSE, FALSE, 0); entry_appendix_subbook_no = gtk_entry_new(); gtk_box_pack_start (GTK_BOX(vbox_r), entry_appendix_subbook_no, FALSE, FALSE, 0); hbox2 = gtk_hbox_new(FALSE,2); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 2); gtk_box_pack_start (GTK_BOX(vbox_r), hbox2, FALSE, FALSE, 0); label_color = gtk_label_new(_("Sample")); gtk_label_set_use_markup (GTK_LABEL (label_color), TRUE); gtk_box_pack_start (GTK_BOX(hbox2), label_color, TRUE, TRUE, 0); button = gtk_button_new_with_label(_("FG")); gtk_box_pack_start (GTK_BOX(hbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)0); button = gtk_button_new_with_label(_("BG")); gtk_box_pack_start (GTK_BOX(hbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(show_colorsel), (gpointer)1); button = gtk_button_new_with_label(_("Clear")); gtk_box_pack_start (GTK_BOX(hbox2), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(clear_color), (gpointer)1); fg_color[0] = '\0'; bg_color[0] = '\0'; LOG(LOG_DEBUG, "OUT : pref_start_dictgroup()"); return(hbox); } #define G_NODE(node) ((GNode *)node) #define VALID_ITER(iter, tree_store) (iter!= NULL && iter->user_data != NULL && tree_store->stamp == iter->stamp) /** * gtk_tree_store_swap: * copied from GTK+-2.2 **/ void my_gtk_tree_store_swap (GtkTreeStore *tree_store, GtkTreeIter *a, GtkTreeIter *b) { GNode *tmp, *node_a, *node_b, *parent_node; GNode *a_prev, *a_next, *b_prev, *b_next; gint i, a_count, b_count, length, *order; GtkTreePath *path_a, *path_b; GtkTreeIter parent; g_return_if_fail (GTK_IS_TREE_STORE (tree_store)); g_return_if_fail (VALID_ITER (a, tree_store)); g_return_if_fail (VALID_ITER (b, tree_store)); node_a = G_NODE (a->user_data); node_b = G_NODE (b->user_data); /* basic sanity checking */ if (node_a == node_b) return; path_a = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), a); path_b = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), b); g_return_if_fail (path_a && path_b); gtk_tree_path_up (path_a); gtk_tree_path_up (path_b); if((gtk_tree_path_get_depth(path_a) != 0) || (gtk_tree_path_get_depth(path_b) != 0)){ if (gtk_tree_path_compare (path_a, path_b)) { gtk_tree_path_free (path_a); gtk_tree_path_free (path_b); g_warning ("Given childs are not in the same level\n"); return; } } if(gtk_tree_path_get_depth(path_a) == 0){ parent_node = G_NODE (tree_store->root); } else { gtk_tree_model_get_iter (GTK_TREE_MODEL (tree_store), &parent, path_a); parent_node = G_NODE (parent.user_data); } gtk_tree_path_free (path_b); /* old links which we have to keep around */ a_prev = node_a->prev; a_next = node_a->next; b_prev = node_b->prev; b_next = node_b->next; /* fix up links if the nodes are next to eachother */ if (a_prev == node_b) a_prev = node_a; if (a_next == node_b) a_next = node_a; if (b_prev == node_a) b_prev = node_b; if (b_next == node_a) b_next = node_b; /* counting nodes */ tmp = parent_node->children; i = a_count = b_count = 0; while (tmp) { if (tmp == node_a) a_count = i; if (tmp == node_b) b_count = i; tmp = tmp->next; i++; } length = i; /* hacking the tree */ if (!a_prev) parent_node->children = node_b; else a_prev->next = node_b; if (a_next) a_next->prev = node_b; if (!b_prev) parent_node->children = node_a; else b_prev->next = node_a; if (b_next) b_next->prev = node_a; node_a->prev = b_prev; node_a->next = b_next; node_b->prev = a_prev; node_b->next = a_next; /* emit signal */ order = g_new (gint, length); for (i = 0; i < length; i++) if (i == a_count) order[i] = b_count; else if (i == b_count) order[i] = a_count; else order[i] = i; if(gtk_tree_path_get_depth(path_a) == 0){ gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store), path_a, NULL, order); } else { gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store), path_a, &parent, order); } gtk_tree_path_free (path_a); g_free (order); } ebview-0.3.6.2/src/misc.c0000644000175000017500000000757410016041733014355 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" void beep(){ #ifdef __WIN32__ Beep(1000, 200); #else FILE *fp; if(!bbeep_on_nohit) return; fp = fopen("/dev/console", "w"); if(fp == NULL){ return; } fprintf(fp, "\a"); fclose(fp); #endif } void remove_space(gchar *f){ char *p; int i; p = f; // Delete preceding spaces. for(i=0;;i++){ if((f[i] == ' ') || (f[i] == '\t') || (f[i] == '\n') || (f[i] == ',') || (f[i] == '.') || (f[i] == '!') || (f[i] == ':') || (f[i] == ';') || (f[i] == '*') || (f[i] == '(') || (f[i] == ')') ) p++; else break; } strcpy(f,p); // Delete following saces for(i=(strlen(p) -1);;i--){ if((f[i] == ' ') || (f[i] == '\t') || (f[i] == '\n') || (f[i] == ',') || (f[i] == '.') || (f[i] == '!') || (f[i] == ':') || (f[i] == ';') || (f[i] == '*') || (f[i] == '(') || (f[i] == ')') ) f[i] = '\0'; else break; } /* if((p = (char *)index(p, '\n')) != NULL) *p = '\0'; */ } #ifdef __WIN32__ char *getdcwd(int drv, char *path, int len){ return(_getdcwd(drv, path, len)); } #endif gboolean find_file(gchar *filename) { #if 0 struct stat buf; gint rc; #endif LOG(LOG_DEBUG, "IN : find_file(%s)", filename); #if 0 rc = stat(filename, &buf); if(rc != 0) { LOG(LOG_DEBUG, "OUT : find_file() = FALSE"); return(FALSE); } LOG(LOG_DEBUG, "OUT : find_file() = TRUE"); return(TRUE); #endif if(g_file_test(filename, G_FILE_TEST_IS_REGULAR) || g_file_test(filename, G_FILE_TEST_IS_SYMLINK)){ LOG(LOG_DEBUG, "OUT : find_file() = TRUE"); return(TRUE); } else { LOG(LOG_DEBUG, "OUT : find_file() = FALSE"); return(FALSE); } } gboolean find_config_file(gchar *filename){ gchar fullpath[512]; gboolean ret; LOG(LOG_DEBUG, "IN : find_config_file(%s)", filename); sprintf(fullpath, "%s%s%s", user_dir, DIR_DELIMITER, filename); ret = find_file(fullpath); LOG(LOG_DEBUG, "OUT : find_config_file()"); return(ret); } gboolean find_or_copy_file(gchar *filename) { gchar fullpath[512]; LOG(LOG_DEBUG, "IN : find_or_copy_file(%s)", filename); sprintf(fullpath, "%s%s%s", user_dir, DIR_DELIMITER, filename); if(find_file(fullpath) == FALSE){ // Copy default file gchar srcfile[512]; gchar command[512]; #ifdef __WIN32__ sprintf(srcfile, "%s%s%s", package_dir, DIR_DELIMITER, filename); sprintf(command, "copy \"%s%s%s\" \"%s\"", package_dir, DIR_DELIMITER, filename, fullpath); #else sprintf(srcfile, "%s%s%s", package_dir, DIR_DELIMITER, filename); sprintf(command, "cp %s%s%s %s", package_dir, DIR_DELIMITER, filename, fullpath); #endif if(find_file(srcfile) != TRUE){ LOG(LOG_CRITICAL, _("Couldn't find %s. Check installation."), filename); LOG(LOG_DEBUG, "IN : find_or_copy_file() = FALSE"); return(FALSE); } #ifdef __WIN32__ CopyFile(srcfile, fullpath, TRUE); #else system(command); #endif // If file does not exist after copy, then error. if(find_file(fullpath) == FALSE){ #ifndef __WIN32__ LOG(LOG_CRITICAL, _("Couldn't open %s. Check installation."), filename); #endif LOG(LOG_DEBUG, "IN : find_or_copy_file() = FALSE"); return(FALSE); } } LOG(LOG_DEBUG, "IN : find_or_copy_file() = TRUE"); return(TRUE); } ebview-0.3.6.2/src/pref_stemming.c0000644000175000017500000002117510016042627016255 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "pref_io.h" GtkWidget *entry_pattern; GtkWidget *entry_normal; GtkWidget *check_nohit; GtkWidget *option_lang; GtkWidget *stemming_view; static void check_changed(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : check_changed()"); if(GTK_TOGGLE_BUTTON(widget)->active){ gtk_widget_set_sensitive(stemming_view, TRUE); gtk_widget_set_sensitive(entry_pattern, TRUE); gtk_widget_set_sensitive(entry_normal, TRUE); gtk_widget_set_sensitive(check_nohit, TRUE); bending_correction = TRUE; } else { gtk_widget_set_sensitive(stemming_view, FALSE); gtk_widget_set_sensitive(entry_pattern, FALSE); gtk_widget_set_sensitive(entry_normal, FALSE); gtk_widget_set_sensitive(check_nohit, FALSE); bending_correction = FALSE; } LOG(LOG_DEBUG, "OUT : check_changed()"); } static void check_changed2(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : check_changed2()"); if(GTK_TOGGLE_BUTTON(widget)->active){ bending_only_nohit = TRUE; } else { bending_only_nohit = FALSE; } LOG(LOG_DEBUG, "OUT : check_changed2()"); } static void lang_changed(GtkWidget *widget,gpointer *data){ gint index; LOG(LOG_DEBUG, "IN : check_changed()"); index = gtk_option_menu_get_history(GTK_OPTION_MENU(option_lang)); switch(index){ case 0: gtk_tree_view_set_model(GTK_TREE_VIEW(stemming_view), GTK_TREE_MODEL(stemming_en_store)); break; case 1: gtk_tree_view_set_model(GTK_TREE_VIEW(stemming_view), GTK_TREE_MODEL(stemming_ja_store)); break; } LOG(LOG_DEBUG, "OUT : check_changed()"); } static void remove_entry(GtkWidget *widget,gpointer *data){ GtkTreeIter iter; GtkTreeSelection *selection; LOG(LOG_DEBUG, "IN : remove_entry()"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(stemming_view)); if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { gtk_list_store_remove(GTK_LIST_STORE(stemming_en_store), &iter); } LOG(LOG_DEBUG, "OUT : remove_entry()"); } static void add_entry(GtkWidget *widget,gpointer *data){ const gchar *pattern; const gchar *normal; GtkTreeIter iter; LOG(LOG_DEBUG, "IN : add_entry()"); pattern = gtk_entry_get_text(GTK_ENTRY(entry_pattern)); normal = gtk_entry_get_text(GTK_ENTRY(entry_normal)); if((strlen(pattern) == 0) && (strlen(normal) == 0)){ return; } gtk_list_store_append(stemming_en_store, &iter); gtk_list_store_set(stemming_en_store, &iter, STEMMING_PATTERN_COLUMN, strdup(pattern), STEMMING_NORMAL_COLUMN, strdup(normal), -1); LOG(LOG_DEBUG, "OUT : add_entry()"); } gboolean pref_end_stemming(){ LOG(LOG_DEBUG, "IN : pref_end_stemming()"); save_stemming_en(); save_stemming_ja(); LOG(LOG_DEBUG, "OUT : pref_end_stemming()"); return(TRUE); } GtkWidget *pref_start_stemming() { GtkWidget *button; GtkWidget *hbox1; GtkWidget *hbox; GtkWidget *vbox; GtkWidget *vbox2; GtkWidget *frame; GtkWidget *label; GtkWidget *scroll; GtkWidget *check_ending; GtkWidget *menu; GtkWidget *menu_item; GtkCellRenderer *renderer; GtkTreeViewColumn *column; LOG(LOG_DEBUG, "IN : pref_start_stemming()"); hbox1 = gtk_hbox_new(FALSE, 3); gtk_widget_set_size_request(hbox1, 240, 300); vbox = gtk_vbox_new(FALSE, 3); gtk_box_pack_start (GTK_BOX(hbox1) , vbox,TRUE,FALSE, 0); check_ending = gtk_check_button_new_with_label(_("Perform stemming")); gtk_tooltips_set_tip(tooltip, check_ending, _("When ending of each words matches the pattern in the list, normal form of the word will also be tried. It takes longer."),"Private"); gtk_box_pack_start (GTK_BOX(vbox) , check_ending,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (check_ending), "clicked", G_CALLBACK(check_changed), NULL); check_nohit = gtk_check_button_new_with_label(_("Stemming only when no hit")); gtk_tooltips_set_tip(tooltip, check_nohit, _("Do not perform stemming when original words hit."),"Private"); gtk_box_pack_start (GTK_BOX(vbox) , check_nohit,FALSE,FALSE, 0); g_signal_connect(G_OBJECT (check_nohit), "clicked", G_CALLBACK(check_changed2), NULL); // Option menu for language selection menu = gtk_menu_new (); menu_item = gtk_menu_item_new_with_label (_("English")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); menu_item = gtk_menu_item_new_with_label (_("Japanese")); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); option_lang = gtk_option_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (option_lang), menu); gtk_box_pack_start (GTK_BOX(vbox) , option_lang, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(option_lang), "changed", G_CALLBACK(lang_changed), NULL); hbox = gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(vbox) , hbox,FALSE, FALSE, 0); vbox2 = gtk_vbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(hbox) , vbox2, TRUE, TRUE, 0); label = gtk_label_new(_("Pattern")); gtk_box_pack_start (GTK_BOX(vbox2) , label,FALSE, FALSE, 0); entry_pattern = gtk_entry_new(); gtk_widget_set_size_request(entry_pattern,90,20); gtk_box_pack_start (GTK_BOX(vbox2) , entry_pattern, FALSE, FALSE, 0); vbox2 = gtk_vbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX(hbox) , vbox2, TRUE, TRUE, 0); label = gtk_label_new(_("Correction")); gtk_box_pack_start (GTK_BOX(vbox2) , label,FALSE, FALSE, 0); entry_normal = gtk_entry_new(); gtk_widget_set_size_request(entry_normal,90, 20); gtk_box_pack_start (GTK_BOX(vbox2) , entry_normal, FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Add")); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(add_entry), (gpointer)NULL); button = gtk_button_new_with_label(_("Remove")); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(remove_entry), (gpointer)NULL); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox) , frame,TRUE, TRUE, 0); scroll = gtk_scrolled_window_new(NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scroll); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); stemming_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(stemming_en_store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(stemming_view), TRUE); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(stemming_view), TRUE); gtk_container_add(GTK_CONTAINER (scroll), stemming_view); /* renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(NULL, renderer, _("Pattern"), STEMMING_PATTERN_COLUMN, _("Normal"), STEMMING_NORMAL_COLUMN, NULL); */ renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Pattern"), renderer, "text", STEMMING_PATTERN_COLUMN, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(column, 200); gtk_tree_view_append_column (GTK_TREE_VIEW (stemming_view), column); column = gtk_tree_view_column_new_with_attributes(_("Normal"), renderer, "text", STEMMING_NORMAL_COLUMN, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(column, 200); gtk_tree_view_append_column (GTK_TREE_VIEW (stemming_view), column); gtk_widget_set_sensitive(stemming_view, bending_correction); gtk_widget_set_sensitive(entry_pattern, bending_correction); gtk_widget_set_sensitive(entry_normal, bending_correction); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_ending), bending_correction); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_nohit), bending_only_nohit); LOG(LOG_DEBUG, "OUT : pref_start_stemming()"); return(hbox1); } ebview-0.3.6.2/src/xml.c0000644000175000017500000003553610013675516014232 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "xml.h" #include "xmlinternal.h" #include "jcode.h" //#define XML_TRACE static void xml_save_file_internal(GNode *node, gpointer data); static void xml_print_tree_internal(GNode *node, gpointer data); static void xml_destroy_tree_internal(GNode *node, gpointer data); struct special_char { guchar special; gchar *encoded; }; static struct special_char special[] = {{'&', "&"}, {'\"', """}, {'<', "<"}, {'>', ">"}, {0, NULL}}; xmlDoc *xml_doc_new() { GNode *root; xmlDoc *doc; NODE_DATA *node_data; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_doc_new()"); #endif doc = (xmlDoc *)calloc(sizeof(xmlDoc), 1); g_assert(doc != NULL); doc->version = NULL; doc->encoding = NULL; node_data = (NODE_DATA *)calloc(sizeof(NODE_DATA), 1); g_assert(node_data != NULL); node_data->name = NULL; node_data->content = NULL; node_data->attr = NULL; node_data->depth = 0; node_data->doc = doc; root = g_node_new((gpointer)node_data); doc->root = root; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_doc_new()"); #endif return(doc); } xmlDoc *xml_parse_file(gchar *filename) { unsigned int l; GNode *root; xmlDoc *doc; NODE_DATA *node_data; char buff[65535]; FILE *fp; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_parse_file(%s)", filename); #endif fp = fopen(filename, "r"); if(fp == NULL){ LOG(LOG_CRITICAL, "fopen: %s", strerror(errno)); return(NULL); } //$B%5%$%:$O:GBg(B65535$B%P%$%H(B memset(buff, 0, sizeof(buff)); l = fread(buff, 1, sizeof(buff), fp); fclose(fp); if(l <= 0){ return(NULL); } doc = (xmlDoc *)calloc(sizeof(xmlDoc), 1); doc->version = NULL; doc->encoding = NULL; node_data = (NODE_DATA *)calloc(sizeof(NODE_DATA), 1); node_data->name = NULL; node_data->content = NULL; node_data->attr = NULL; node_data->depth = 0; node_data->doc = doc; root = g_node_new((gpointer)node_data); doc->root = root; parse_buffer(root, buff, l); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_parse_file()"); #endif return(doc); } void indent_tag(FILE *fp, int l){ int i; for(i=0;iversion){ fprintf(fp, " version=\"%s\"", doc->version); } if(doc->encoding){ fprintf(fp, " encoding=\"%s\"", doc->encoding); } fprintf(fp, "?>\n"); xml_save_file_internal(doc->root, fp); fclose(fp); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_save_file()"); #endif return(XML_OK); } static void xml_save_file_internal(GNode *node, gpointer data){ FILE *fp; NODE_DATA *node_data; gchar *tmp_p; gchar *utf_str; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_save_file_internal()"); #endif fp = (FILE *)data; node_data = (NODE_DATA *)(node->data); if(node_data->name){ indent_tag(fp, node_data->depth); fprintf(fp, "<%s",node_data->name); if(node_data->attr != NULL){ GList *list; NODE_ATTR *attr; list = g_list_first(node_data->attr); while(list){ attr = (NODE_ATTR *)(list->data); tmp_p = special_to_encoded(attr->value); utf_str = iconv_convert("utf-8", node_data->doc->encoding, tmp_p); fprintf(fp, " %s=\"%s\"", attr->name, utf_str); g_free(tmp_p); g_free(utf_str); list = g_list_next(list); } } fprintf(fp, ">"); if(G_NODE_IS_LEAF(node)){ if (node_data->content != NULL){ tmp_p = special_to_encoded(node_data->content); utf_str = iconv_convert("utf-8", node_data->doc->encoding, tmp_p); fprintf(fp, "%s", utf_str); g_free(tmp_p); g_free(utf_str); } } else { fprintf(fp, "\n"); g_node_children_foreach(node, G_TRAVERSE_ALL, (GNodeForeachFunc)xml_save_file_internal, (gpointer)fp); indent_tag(fp, node_data->depth); } if(node_data->name) fprintf(fp, "\n",node_data->name); } else { g_node_children_foreach(node, G_TRAVERSE_ALL, (GNodeForeachFunc)xml_save_file_internal, (gpointer)fp); } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_save_file_internal()"); #endif } xmlResult xml_print_tree(xmlDoc *doc){ xml_print_tree_internal((GNode *)doc->root, NULL); return(XML_OK); } static void print_indent(int l){ int i; for(i=0;idata); if(node_data->name){ print_indent(node_data->depth); printf("%s", node_data->name); if(node_data->attr != NULL){ GList *list; NODE_ATTR *attr; list = g_list_first(node_data->attr); while(list){ attr = (NODE_ATTR *)(list->data); g_print(" %s=%s", attr->name, attr->value); list = g_list_next(list); } } g_print("\n"); if(G_NODE_IS_LEAF(node)){ print_indent2(node_data->depth); if(node_data->content != NULL){ printf(">%s<\n", node_data->content); } else { printf("NULL\n"); } } else { g_node_children_foreach(node, G_TRAVERSE_ALL, (GNodeForeachFunc)xml_print_tree_internal, (gpointer)NULL); } } else { g_node_children_foreach(node, G_TRAVERSE_ALL, (GNodeForeachFunc)xml_print_tree_internal, (gpointer)NULL); } } xmlNode *xml_add_child(xmlNode *parent, gchar *name, gchar *content){ NODE_DATA *node_data; GNode *child; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_add_child()"); #endif if(name == NULL) { #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_add_child() = NULL"); #endif return(NULL); } node_data = (NODE_DATA *)calloc(sizeof(NODE_DATA), 1); if(!node_data){ #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_add_child() = NULL"); #endif return(NULL); } node_data->name = g_strdup(name); node_data->attr = NULL; node_data->depth = ((NODE_DATA *)(parent->data))->depth + 1; node_data->doc = ((NODE_DATA *)(parent->data))->doc; if(content == NULL) node_data->content = NULL; else node_data->content = g_strdup(content); child = g_node_new((gpointer)node_data); g_node_append(parent, child); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_add_child()"); #endif return(child); } xmlNode *xml_get_child(xmlNode *node){ #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_get_child()"); #endif return(node->children); } xmlNode *xml_get_next(xmlNode *node){ #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_get_next()"); #endif return(node->next); } gchar *xml_get_content(xmlNode *node){ #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_get_content()"); #endif if(((NODE_DATA *)(node->data))->content) return(((NODE_DATA *)(node->data))->content); else return(g_strdup("")); } gchar *xml_get_name(xmlNode *node){ #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_get_name()"); #endif return(((NODE_DATA *)(node->data))->name); } static void xml_destroy_tree_internal(GNode *node, gpointer data){ NODE_DATA *node_data; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_destroy_tree_internal()"); #endif node_data = (NODE_DATA *)(node->data); if(G_NODE_IS_LEAF(node)){ if(node_data->name) g_free(node_data->name); if(node_data->content) g_free(node_data->content); if(node_data->attr != NULL){ GList *list; NODE_ATTR *attr; list = g_list_first(node_data->attr); while(list){ attr = (NODE_ATTR *)(list->data); if(attr->name) g_free(attr->name); if(attr->value) g_free(attr->value); g_free(attr); list = g_list_next(list); } } } else { g_node_children_foreach(node, G_TRAVERSE_ALL, (GNodeForeachFunc)xml_destroy_tree_internal, (gpointer)NULL); } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_destroy_tree_internal()"); #endif } xmlResult xml_destroy_document(xmlDoc *doc){ #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_destroy_document()"); #endif if(doc == NULL) { #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_destroy_document() : NOP"); #endif return(XML_OK); } xml_destroy_tree_internal(doc->root, NULL); g_node_destroy((GNode *)doc->root); g_free(doc->version); g_free(doc->encoding); g_free(doc); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_destroy_document()"); #endif return(XML_OK); } gchar *special_to_encoded(gchar *text){ gchar buff[65536]; gchar *p; gint i; gint j; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : special_to_encoded()"); #endif p = text; j = 0; while(*p){ for(i=0; ; i ++){ if(special[i].encoded == NULL) { buff[j] = *p; j++; break; } if(*p == special[i].special){ strcpy(&buff[j], special[i].encoded); j += strlen(special[i].encoded); break; } } p++; } buff[j] = '\0'; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : special_to_encoded()"); #endif return(g_strdup(buff)); } gchar *encoded_to_special(gchar *text){ gchar buff[65536]; gchar *p; gint i; gint j; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : encoded_to_special()"); #endif p = text; j = 0; while(*p){ if(*p == '&'){ for(i=0; ; i ++){ if(special[i].encoded == NULL) { buff[j] = *p; j++; p++; break; } if(strstr(p, special[i].encoded) == p){ buff[j] = special[i].special; j ++; p += strlen(special[i].encoded); } } } else { buff[j] = *p; j++; p++; } } buff[j] = '\0'; #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : encoded_to_special()"); #endif return(g_strdup(buff)); } gchar *xml_get_attr(xmlNode *node, gchar *name){ GList *list; NODE_ATTR *attr; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_get_attr(%s)", name); #endif list = ((NODE_DATA *)(node->data))->attr; while(list){ attr = (NODE_ATTR *)(list->data); if(strcmp(attr->name, name) == 0){ #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_get_attr()"); #endif return(attr->value); } list = g_list_next(list); } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_get_attr() : NULL"); #endif return(NULL); } xmlResult xml_set_attr(xmlNode *node, gchar *name, gchar *value){ NODE_ATTR *attr; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : xml_set_attr(%s, %s)", name, value); #endif attr = (NODE_ATTR *)calloc(sizeof(NODE_ATTR), 1); attr->name = g_strdup(name); attr->value = g_strdup(value); ((NODE_DATA *)(node->data))->attr = g_list_append(((NODE_DATA *)(node->data))->attr, attr); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : xml_set_attr()"); #endif return(XML_OK); } xmlResult parse_attribute(GNode *node, gchar *tag){ gchar *p, *p2, *p3; NODE_ATTR *attr; gint end; gint quoted; gchar *tmp_val; gchar *special_str; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : parse_attribute(%s)", tag); #endif p = strchr(tag, ' '); if(p == NULL){ #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_attribute()"); #endif return(XML_OK); } p++; while(1){ p2 = strchr(p, '='); if(p2 == NULL){ #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_attribute()"); #endif return(XML_OK); } attr = (NODE_ATTR *)calloc(sizeof(NODE_ATTR), 1); attr->name = g_strndup(p, p2 - p); p2 ++; quoted = 0; if(*p2 == '\"'){ quoted = 1; p2++; } p3 = p2; while(1){ if(quoted) { if(*p3 == '\"') { end = 0; break; } if((*p3 == '\0') || (*p3 == '>')) { end = 1; break; } } else { if((*p3 == ' ') || (*p3 == '\"')) { end = 0; break; } if((*p3 == '\0') || (*p3 == '>')) { end = 1; break; } } p3 ++; } tmp_val = g_strndup(p2, p3 - p2); special_str = encoded_to_special(tmp_val); attr->value = iconv_convert( ((NODE_DATA *)(node->data))->doc->encoding, "UTF-8", special_str); g_free(special_str); g_free(tmp_val); ((NODE_DATA *)node->data)->attr = g_list_append(((NODE_DATA *)node->data)->attr, attr); if(end) { #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_attribute()"); #endif return(XML_OK); } else { p3 ++; p = p3 + 1; } } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_attribute()"); #endif } void parse_declaration(GNode *node, gchar *tag) { gchar attr[512]; xmlDoc *doc; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : parse_declaration()"); #endif g_assert(node != NULL); doc = ((NODE_DATA *)(node->data))->doc; g_assert(doc != NULL); get_attr(tag, "version", attr); doc->version = g_strdup(attr); get_attr(tag, "encoding", attr); doc->encoding = g_strdup(attr); #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_declaration()"); #endif } xmlResult parse_buffer(GNode *parent, gchar *text, guint length) { gchar *p; gchar start_tag[512]; gchar tag_name[512]; gchar body[65536]; gchar *content; gint content_length; gint body_length; GNode *node; gboolean no_end_tag; gchar *special_str; g_assert(text != NULL); #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : parse_buffer()"); #endif body_length = 0; p = text; while((p - text) < length){ if(*p == '<'){ if(body_length != 0){ ((NODE_DATA *)(parent->data))->content = encoded_to_special(body); body[0] = '\0'; body_length = 0; } no_end_tag = FALSE; get_start_tag(p, start_tag); // $B$N>l9g$K$OBP1~$9$k%(%s%I%?%0$,$J$$(B if(start_tag[strlen(start_tag) - 1] == '/'){ start_tag[strlen(start_tag) - 1] = '\0'; no_end_tag = TRUE; } get_tag_name(start_tag, tag_name); // $B@k8@ItJ,(B if(start_tag[0] == '?'){ if(start_tag[strlen(start_tag) - 1] == '?'){ start_tag[strlen(start_tag) - 1] = '\0'; } parse_declaration(parent, &start_tag[1]); skip_start_tag(&p, tag_name); continue; } node = xml_add_child(parent, tag_name, NULL); parse_attribute(node, start_tag); if(no_end_tag == FALSE){ get_content(p, tag_name, &content, &content_length); parse_buffer(node, content, content_length); skip_end_tag(&p, tag_name); } else { skip_start_tag(&p, tag_name); } } else if (*p == '\n') { p++; } else { body[body_length] = *p; body_length ++; body[body_length] = '\0'; p++; } } if(body_length != 0){ special_str = encoded_to_special(body); ((NODE_DATA *)(parent->data))->content = iconv_convert( ((NODE_DATA *)(parent->data))->doc->encoding, "UTF-8", special_str); g_free(special_str); } #ifdef XML_TRACE LOG(LOG_DEBUG, "OUT : parse_buffer()"); #endif return XML_OK; } ebview-0.3.6.2/src/mainmenu.h0000644000175000017500000000217610013675515015241 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __MAINMENU_H__ #define __MAINMENU_H__ #include "defs.h" GtkWidget *create_main_menu(); void toggle_menu_bar(); void show_menu_bar(); void hide_menu_bar(); void change_search_menu(gint method); void toggle_tree_tab(); void show_tree_tab(); void hide_tree_tab(); void switch_direction(); void split_vertical(); void split_horizontal(); #endif /* __MAINMENU_H__ */ ebview-0.3.6.2/src/dialog.c0000644000175000017500000000674310015021245014651 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "global.h" #include "jcode.h" #include "mainwindow.h" #include "textview.h" #include "statusbar.h" gboolean active=FALSE; static gchar g_message[1024]; void center_dialog(GtkWidget *window, GtkWidget *dialog){ gint window_x, window_y; gint window_width, window_height; gint dialog_x, dialog_y; gint dialog_width, dialog_height; gdk_window_get_root_origin(window->window, &window_x, &window_y); window_width = window->allocation.width; window_height = window->allocation.height; dialog_width = dialog->allocation.width; dialog_height = dialog->allocation.height; if((window_width <= dialog_width) || (window_height <= dialog_height)) return; dialog_x = window_x + (window_width - dialog_width) / 2; dialog_y = window_y + (window_height - dialog_height) / 2; gtk_window_move(GTK_WINDOW(dialog), dialog_x, dialog_y); } gboolean idle_warning(gpointer data){ GtkWidget *dialog; GtkWidget *parent; LOG(LOG_DEBUG, "IN : idle_warning"); if(active == TRUE) goto END; active = TRUE; parent = gtk_grab_get_current(); if(parent == NULL) parent = main_window; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_DESTROY_WITH_PARENT /* | GTK_DIALOG_NO_SEPARATOR */, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, g_message); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); active = FALSE; END: LOG(LOG_DEBUG, "OUT : idle_warning"); return(FALSE); } gboolean idle_error(gpointer data){ GtkWidget *dialog; GtkWidget *parent; LOG(LOG_DEBUG, "IN : idle_error"); if(active == TRUE) goto END; active = TRUE; parent = gtk_grab_get_current(); if(parent == NULL) parent = main_window; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_DESTROY_WITH_PARENT /* | GTK_DIALOG_NO_SEPARATOR */, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, g_message); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); active = FALSE; END: LOG(LOG_DEBUG, "OUT : idle_error"); return(FALSE); } void popup_warning(char *message){ LOG(LOG_DEBUG, "IN : popup_warning"); g_idle_add(idle_warning, (gpointer)message); strcpy(g_message, message); LOG(LOG_DEBUG, "OUT : popup_warning"); } void popup_error(char *message){ LOG(LOG_DEBUG, "IN : popup_error"); strcpy(g_message, message); g_idle_add(idle_error, (gpointer)message); LOG(LOG_DEBUG, "OUT : popup_error"); } extern GtkTextBuffer *text_buffer; void push_message(gchar *str){ GtkTextIter iter; #ifdef __WIN32__ // Windows ¤À¤È¤Ê¤¼¤«»à¤Ì return; #endif gtk_text_buffer_get_end_iter(text_buffer, &iter); gtk_text_buffer_insert( text_buffer, &iter, str, -1); } void clear_message(){ clear_text_buffer(); } gboolean popup_active() { return(active); } ebview-0.3.6.2/src/misc.h0000644000175000017500000000205310013675515014355 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __MISC_H__ #define __MISC_H__ #include "defs.h" #include "global.h" void beep(); void remove_space(gchar *f); void alloc_colors(); gboolean find_file(gchar *filename); gboolean find_config_file(gchar *filename); gboolean find_or_copy_file(gchar *filename); #endif /* __MISC_H__ */ ebview-0.3.6.2/src/shortcut.h0000644000175000017500000000176210013675516015304 0ustar mhattamhatta/* Copyright (C) 2001-2004 Kenichi Suto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __SHORTCUT_H__ #define __SHORTCUT_H__ #include "defs.h" void install_shortcut(); void uninstall_shortcut(); //gboolean perform_shortcut(GdkEventKey *event); gboolean perform_shortcut(gchar *name); #endif /* __SHORTCUT_H__ */ ebview-0.3.6.2/util/0000755000175000017500000000000010013675516013440 5ustar mhattamhattaebview-0.3.6.2/util/Makefile.am0000644000175000017500000000062110013675516015473 0ustar mhattamhattabin_PROGRAMS = ebdump AM_CPPFLAGS= @EBCONF_PTHREAD_CPPFLAGS@ @EBCONF_EBINCS@ \ @EBCONF_ZLIBINCS@ @EBCONF_INTLINCS@ AM_CFLAGS = @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ AM_CXXFLAGS = @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ ebdump_LDADD = @GTK_LIBS@ \ @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ @EBCONF_INTLLIBS@ ebdump_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ ebdump_SOURCES= \ ebdump.c ebview-0.3.6.2/util/Makefile.in0000644000175000017500000002552510013675516015516 0ustar mhattamhatta# Makefile.in generated by automake 1.6.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CYGWIN_CFLAGS = @CYGWIN_CFLAGS@ DATADIRNAME = @DATADIRNAME@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ EBCONF_EBINCS = @EBCONF_EBINCS@ EBCONF_EBLIBS = @EBCONF_EBLIBS@ EBCONF_INTLINCS = @EBCONF_INTLINCS@ EBCONF_INTLLIBS = @EBCONF_INTLLIBS@ EBCONF_PTHREAD_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ EBCONF_PTHREAD_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ EBCONF_PTHREAD_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ EBCONF_ZLIBINCS = @EBCONF_ZLIBINCS@ EBCONF_ZLIBLIBS = @EBCONF_ZLIBLIBS@ ECHO = @ECHO@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MKINSTALLDIRS = @MKINSTALLDIRS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RES_FILE = @RES_FILE@ STRIP = @STRIP@ THREAD_LIBS = @THREAD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ bin_PROGRAMS = ebdump AM_CPPFLAGS = @EBCONF_PTHREAD_CPPFLAGS@ @EBCONF_EBINCS@ \ @EBCONF_ZLIBINCS@ @EBCONF_INTLINCS@ AM_CFLAGS = @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ AM_CXXFLAGS = @GTK_CFLAGS@ @EBCONF_PTHREAD_CFLAGS@ ebdump_LDADD = @GTK_LIBS@ \ @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ @EBCONF_INTLLIBS@ ebdump_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@ ebdump_SOURCES = \ ebdump.c subdir = util mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bin_PROGRAMS = ebdump$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_ebdump_OBJECTS = ebdump.$(OBJEXT) ebdump_OBJECTS = $(am_ebdump_OBJECTS) ebdump_DEPENDENCIES = DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ebdump.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ DIST_SOURCES = $(ebdump_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(ebdump_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done ebdump$(EXEEXT): $(ebdump_OBJECTS) $(ebdump_DEPENDENCIES) @rm -f ebdump$(EXEEXT) $(LINK) $(ebdump_LDFLAGS) $(ebdump_OBJECTS) $(ebdump_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ebdump.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `cygpath -w $<` .c.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< CCDEPMODE = @CCDEPMODE@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/util/ebdump.c0000644000175000017500000000665110013675516015070 0ustar mhattamhatta/* * »ÈÍÑÊýË¡: * text * Îã: * text /cdrom 0 10 * ÀâÌÀ: * ¤Ç»ØÄꤷ¤¿ CD-ROM ½ñÀÒ¤«¤éÆÃÄê¤ÎÉûËܤòÁª¤Ó¡¢ËÜʸ * ¤ÎÀèÆ¬¤«¤é ¸Äʬ¤Îñ¸ì¤ÎÀâÌÀ¤ò½ÐÎϤ·¤Þ¤¹¡£ * * ¤Ë¤Ï¡¢¸¡º÷ÂоݤÎÉûËܤΥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò»ØÄꤷ¤Þ * ¤¹¡£¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢½ñÀҤκǽé¤ÎÉûËܤ«¤é½ç¤Ë 0¡¢1¡¢2 ... ¤Ë * ¤Ê¤ê¤Þ¤¹¡£ */ #include "config.h" #include #include #include #include #include #include inline gboolean isjis(gchar *buff){ g_assert(buff != NULL); if((buff[0] >= 0x21) && (buff[0] <= 0x74) && (buff[1] >= 0x21) && (buff[1] <= 0x7E)) return(TRUE); return(FALSE); } int main(argc, argv) int argc; char *argv[]; { EB_Error_Code error_code; EB_Book book; EB_Subbook_Code subbook_list[EB_MAX_SUBBOOKS]; int subbook_count; int subbook_index; char text[EB_SIZE_PAGE]; ssize_t read_length; int text_count; int block_no; gchar *p_hex; gchar *p_char; gchar hex_buff[512]; gchar char_buff[512]; gchar buff[512]; char *result; int i; /* ¥³¥Þ¥ó¥É¹Ô°ú¿ô¤ò¥Á¥§¥Ã¥¯¡£*/ if (argc != 4) { fprintf(stderr, "Usage: %s book-path subbook-index block-number\n", argv[0]); exit(1); } block_no = strtol(argv[3], NULL, 16); /* EB ¥é¥¤¥Ö¥é¥ê¤È `book' ¤ò½é´ü²½¡£*/ eb_initialize_library(); eb_initialize_book(&book); /* ½ñÀÒ¤ò `book' ¤Ë·ë¤ÓÉÕ¤±¤ë¡£*/ error_code = eb_bind(&book, argv[1]); if (error_code != EB_SUCCESS) { fprintf(stderr, "%s: failed to bind the book, %s: %s\n", argv[0], eb_error_message(error_code), argv[1]); goto die; } /* ÉûËܤΰìÍ÷¤ò¼èÆÀ¡£*/ error_code = eb_subbook_list(&book, subbook_list, &subbook_count); if (error_code != EB_SUCCESS) { fprintf(stderr, "%s: failed to get the subbbook list, %s\n", argv[0], eb_error_message(error_code)); goto die; } /* ÉûËܤΥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò¼èÆÀ¡£*/ subbook_index = atoi(argv[2]); /*¡Ö¸½ºß¤ÎÉûËÜ (current subbook)¡×¤òÀßÄê¡£*/ if (eb_set_subbook(&book, subbook_list[subbook_index]) < 0) { fprintf(stderr, "%s: failed to set the current subbook, %s\n", argv[0], eb_error_message(error_code)); goto die; } if (zio_lseek(&book.subbook_current->text_zio, (block_no - 1) * EB_SIZE_PAGE, SEEK_SET) == -1) { fprintf(stderr, "Failed to seek zio\n"); goto die; } read_length = zio_read(&book.subbook_current->text_zio, text, EB_SIZE_PAGE); if (read_length < 0) { fprintf(stderr, "Failed to read zio\n"); goto die; } printf("block number : 0x%x\n\n", block_no); for( i = 0 ; i < EB_SIZE_PAGE ; i=i+2){ // ¥¢¥É¥ì¥¹¤òɽ¼¨ if((i % 16) == 0){ p_hex = hex_buff; p_char = char_buff; sprintf(p_hex, "0x%02x(0x%08x) ", (i / 16), (block_no - 1) * EB_SIZE_PAGE + i); p_hex += 17; sprintf(p_char, " "); p_char += 1; } sprintf(p_hex, "%02x ", (unsigned char)text[i]); p_hex += 3; sprintf(p_hex, "%02x ", (unsigned char)text[i+1]); p_hex += 3; if(isjis(&text[i])) { *p_char = text[i] | 0x80; p_char ++; *p_char = text[i+1] | 0x80; p_char ++; *p_char = '\0'; } else { sprintf(p_char, ".."); p_char +=2; } if((i % 16) == 14){ printf("%s", hex_buff); printf("%s\n", char_buff); } } /* ½ñÀÒ¤È EB ¥é¥¤¥Ö¥é¥ê¤ÎÍøÍѤò½ªÎ»¡£*/ eb_finalize_book(&book); eb_finalize_library(); exit(0); /* ¥¨¥é¡¼È¯À¸¤Ç½ªÎ»¤¹¤ë¤È¤­¤Î½èÍý¡£*/ die: eb_finalize_book(&book); eb_finalize_library(); exit(1); } ebview-0.3.6.2/util/.deps/0000755000175000017500000000000010013675516014451 5ustar mhattamhattaebview-0.3.6.2/util/.deps/ebdump.Po0000755000175000017500000001424310013675516016234 0ustar mhattamhattaebdump.o: ebdump.c ../config.h /usr/include/glib-2.0/glib.h \ /usr/include/glib-2.0/glib/galloca.h \ /usr/include/glib-2.0/glib/gtypes.h \ /usr/lib/glib-2.0/include/glibconfig.h \ /usr/include/glib-2.0/glib/gmacros.h \ /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ /usr/include/bits/posix2_lim.h \ /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ /usr/include/glib-2.0/glib/garray.h \ /usr/include/glib-2.0/glib/gasyncqueue.h \ /usr/include/glib-2.0/glib/gthread.h \ /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ /usr/include/glib-2.0/glib/gbacktrace.h \ /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ /usr/include/glib-2.0/glib/gmem.h \ /usr/include/glib-2.0/glib/gcompletion.h \ /usr/include/glib-2.0/glib/gconvert.h \ /usr/include/glib-2.0/glib/gdataset.h \ /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ /usr/include/glib-2.0/glib/gfileutils.h \ /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ /usr/include/glib-2.0/glib/giochannel.h \ /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ /usr/include/glib-2.0/glib/gstring.h \ /usr/include/glib-2.0/glib/gunicode.h \ /usr/include/glib-2.0/glib/gmarkup.h \ /usr/include/glib-2.0/glib/gmessages.h \ /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ /usr/include/glib-2.0/glib/gnode.h \ /usr/include/glib-2.0/glib/gpattern.h \ /usr/include/glib-2.0/glib/gprimes.h \ /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ /usr/include/glib-2.0/glib/gscanner.h \ /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ /usr/include/glib-2.0/glib/gstrfuncs.h \ /usr/include/glib-2.0/glib/gthreadpool.h \ /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ /usr/include/glib-2.0/glib/gutils.h /usr/include/stdio.h \ /usr/include/bits/types.h /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h /usr/include/libio.h \ /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ /usr/include/gconv.h /usr/include/bits/stdio_lim.h \ /usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \ /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ /usr/include/endian.h /usr/include/bits/endian.h \ /usr/include/sys/select.h /usr/include/bits/select.h \ /usr/include/bits/sigset.h /usr/include/bits/time.h \ /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ /usr/include/bits/sched.h /usr/include/alloca.h \ /usr/local/include/eb/eb.h /usr/local/include/eb/defs.h \ /usr/local/include/eb/zio.h /usr/include/sys/time.h \ /usr/local/include/eb/error.h /usr/local/include/eb/text.h ../config.h: /usr/include/glib-2.0/glib.h: /usr/include/glib-2.0/glib/galloca.h: /usr/include/glib-2.0/glib/gtypes.h: /usr/lib/glib-2.0/include/glibconfig.h: /usr/include/glib-2.0/glib/gmacros.h: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h: /usr/include/limits.h: /usr/include/features.h: /usr/include/sys/cdefs.h: /usr/include/gnu/stubs.h: /usr/include/bits/posix1_lim.h: /usr/include/bits/local_lim.h: /usr/include/linux/limits.h: /usr/include/bits/posix2_lim.h: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h: /usr/include/glib-2.0/glib/garray.h: /usr/include/glib-2.0/glib/gasyncqueue.h: /usr/include/glib-2.0/glib/gthread.h: /usr/include/glib-2.0/glib/gerror.h: /usr/include/glib-2.0/glib/gquark.h: /usr/include/glib-2.0/glib/gbacktrace.h: /usr/include/glib-2.0/glib/gcache.h: /usr/include/glib-2.0/glib/glist.h: /usr/include/glib-2.0/glib/gmem.h: /usr/include/glib-2.0/glib/gcompletion.h: /usr/include/glib-2.0/glib/gconvert.h: /usr/include/glib-2.0/glib/gdataset.h: /usr/include/glib-2.0/glib/gdate.h: /usr/include/glib-2.0/glib/gdir.h: /usr/include/glib-2.0/glib/gfileutils.h: /usr/include/glib-2.0/glib/ghash.h: /usr/include/glib-2.0/glib/ghook.h: /usr/include/glib-2.0/glib/giochannel.h: /usr/include/glib-2.0/glib/gmain.h: /usr/include/glib-2.0/glib/gslist.h: /usr/include/glib-2.0/glib/gstring.h: /usr/include/glib-2.0/glib/gunicode.h: /usr/include/glib-2.0/glib/gmarkup.h: /usr/include/glib-2.0/glib/gmessages.h: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h: /usr/include/glib-2.0/glib/gnode.h: /usr/include/glib-2.0/glib/gpattern.h: /usr/include/glib-2.0/glib/gprimes.h: /usr/include/glib-2.0/glib/gqsort.h: /usr/include/glib-2.0/glib/gqueue.h: /usr/include/glib-2.0/glib/grand.h: /usr/include/glib-2.0/glib/grel.h: /usr/include/glib-2.0/glib/gscanner.h: /usr/include/glib-2.0/glib/gshell.h: /usr/include/glib-2.0/glib/gspawn.h: /usr/include/glib-2.0/glib/gstrfuncs.h: /usr/include/glib-2.0/glib/gthreadpool.h: /usr/include/glib-2.0/glib/gtimer.h: /usr/include/glib-2.0/glib/gtree.h: /usr/include/glib-2.0/glib/gutils.h: /usr/include/stdio.h: /usr/include/bits/types.h: /usr/include/bits/wordsize.h: /usr/include/bits/typesizes.h: /usr/include/libio.h: /usr/include/_G_config.h: /usr/include/wchar.h: /usr/include/bits/wchar.h: /usr/include/gconv.h: /usr/include/bits/stdio_lim.h: /usr/include/bits/sys_errlist.h: /usr/include/bits/stdio.h: /usr/include/stdlib.h: /usr/include/sys/types.h: /usr/include/time.h: /usr/include/endian.h: /usr/include/bits/endian.h: /usr/include/sys/select.h: /usr/include/bits/select.h: /usr/include/bits/sigset.h: /usr/include/bits/time.h: /usr/include/sys/sysmacros.h: /usr/include/bits/pthreadtypes.h: /usr/include/bits/sched.h: /usr/include/alloca.h: /usr/local/include/eb/eb.h: /usr/local/include/eb/defs.h: /usr/local/include/eb/zio.h: /usr/include/sys/time.h: /usr/local/include/eb/error.h: /usr/local/include/eb/text.h: ebview-0.3.6.2/util/Makefile0000644000175000017500000002603010013675516015101 0ustar mhattamhatta# Makefile.in generated by automake 1.6.3 from Makefile.am. # util/Makefile. Generated from Makefile.in by configure. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = /bin/sh srcdir = . top_srcdir = .. prefix = /usr/local exec_prefix = ${prefix} bindir = ${exec_prefix}/bin sbindir = ${exec_prefix}/sbin libexecdir = ${exec_prefix}/libexec datadir = ${prefix}/share sysconfdir = ${prefix}/etc sharedstatedir = ${prefix}/com localstatedir = ${prefix}/var libdir = ${exec_prefix}/lib infodir = ${prefix}/info mandir = ${prefix}/man includedir = ${prefix}/include oldincludedir = /usr/include pkgdatadir = $(datadir)/ebview pkglibdir = $(libdir)/ebview pkgincludedir = $(includedir)/ebview top_builddir = .. ACLOCAL = aclocal-1.6 AUTOCONF = autoconf AUTOMAKE = automake-1.6 AUTOHEADER = autoheader am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = ${INSTALL} INSTALL_HEADER = $(INSTALL_DATA) transform = s,x,x, NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = host_triplet = i686-pc-linux-gnu EXEEXT = OBJEXT = o PATH_SEPARATOR = : AMTAR = tar AS = @AS@ AWK = gawk CATALOGS = ja.gmo CATOBJEXT = .gmo CC = gcc CYGWIN_CFLAGS = DATADIRNAME = share DEPDIR = .deps DLLTOOL = @DLLTOOL@ EBCONF_EBINCS = -I/usr/local/include EBCONF_EBLIBS = -L/usr/local/lib -leb EBCONF_INTLINCS = EBCONF_INTLLIBS = EBCONF_PTHREAD_CFLAGS = EBCONF_PTHREAD_CPPFLAGS = EBCONF_PTHREAD_LDFLAGS = EBCONF_ZLIBINCS = EBCONF_ZLIBLIBS = -lz ECHO = echo GMOFILES = ja.gmo GMSGFMT = /usr/bin/msgfmt GTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include GTK_LIBS = -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s INSTOBJEXT = .mo INTLDEPS = INTLLIBS = INTLOBJS = LIBTOOL = $(SHELL) $(top_builddir)/libtool LN_S = ln -s MKINSTALLDIRS = ./mkinstalldirs OBJDUMP = @OBJDUMP@ PACKAGE = ebview PKG_CONFIG = /usr/bin/pkg-config POFILES = ja.po POSUB = po RANLIB = ranlib RES_FILE = STRIP = strip THREAD_LIBS = -lpthread USE_NLS = yes VERSION = 0.3.0 am__include = include am__quote = install_sh = /home/ken/prog/ebview-0.3.0/install-sh bin_PROGRAMS = ebdump AM_CPPFLAGS = -I/usr/local/include \ AM_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include AM_CXXFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ebdump_LDADD = -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 \ -L/usr/local/lib -leb -lz ebdump_LDFLAGS = ebdump_SOURCES = \ ebdump.c subdir = util mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bin_PROGRAMS = ebdump$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_ebdump_OBJECTS = ebdump.$(OBJEXT) ebdump_OBJECTS = $(am_ebdump_OBJECTS) ebdump_DEPENDENCIES = DEFS = -DHAVE_CONFIG_H DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) CPPFLAGS = LDFLAGS = LIBS = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles DEP_FILES = ./$(DEPDIR)/ebdump.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = -g -O2 DIST_SOURCES = $(ebdump_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(ebdump_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done ebdump$(EXEEXT): $(ebdump_OBJECTS) $(ebdump_DEPENDENCIES) @rm -f ebdump$(EXEEXT) $(LINK) $(ebdump_LDFLAGS) $(ebdump_OBJECTS) $(ebdump_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/ebdump.Po distclean-depend: -rm -rf ./$(DEPDIR) .c.o: source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CCDEPMODE) $(depcomp) \ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: source='$<' object='$@' libtool=no \ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \ $(CCDEPMODE) $(depcomp) \ $(COMPILE) -c `cygpath -w $<` .c.lo: source='$<' object='$@' libtool=yes \ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \ $(CCDEPMODE) $(depcomp) \ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< CCDEPMODE = depmode=gcc3 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ebview-0.3.6.2/util/.libs/0000755000175000017500000000000010013675516014447 5ustar mhattamhattaebview-0.3.6.2/ABOUT-NLS0000644000175000017500000022532611241361342013715 0ustar mhattamhatta1 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of November 2007. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ Compendium | [] [] [] [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] | bison-runtime | [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | dialog | | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | fetchmail | [] [] () [] [] | findutils | [] | findutils_stable | [] [] [] | flex | [] [] [] | fslint | | gas | | gawk | [] [] [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gip | [] | gliv | [] [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | [] [] () () [] | gnuedu | | gnulib | [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | | gramadoir | [] [] | grep | [] [] | gretl | () | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | () | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] | indent | [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | [] [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | [] [] | libidn | [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] | man-db | [] [] [] | minicom | [] [] [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] | pwdutils | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | shared-mime-info | [] [] [] [] () [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | skencil | [] () | solfege | | soundtracker | [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] | texinfo | [] [] [] | tin | () () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] | bfd | [] [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | dialog | [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | fetchmail | [] | findutils | [] [] [] | findutils_stable | [] [] [] [] | flex | [] [] [] | fslint | | gas | [] [] | gawk | [] [] [] [] () | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnuedu | [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] [] | gpsdrive | [] | gramadoir | [] [] | grep | [] [] [] | gretl | [] [] [] () | gsasl | [] [] | gss | [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] | keytouch-editor | [] | keytouch-keyboa... | [] [] | latrine | [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | [] [] [] | libidn | [] [] | lifelines | () | lilypond | [] [] [] | lingoteach | [] [] [] | lprng | | lynx | [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] | minicom | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] () | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | util-linux-ng | [] [] [] [] [] [] [] | vorbis-tools | | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn +--------------------------------------------------+ Compendium | [] | a2ps | () [] [] | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | [] | cpplib | [] | cryptonit | [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | fetchmail | [] [] | findutils | [] | findutils_stable | [] | flex | [] [] | fslint | | gas | | gawk | [] [] | gcal | | gcc | | gettext-examples | [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] [] | gnubiff | | gnucash | () () () | gnuedu | | gnulib | [] [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] | gphoto2 | [] [] | gprof | [] | gpsdrive | [] | gramadoir | () | grep | [] [] | gretl | | gsasl | [] | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] | gtick | [] | gtkam | [] [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] | indent | [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] | libidn | [] [] | lifelines | [] | lilypond | [] | lingoteach | [] | lprng | | lynx | [] [] | m4 | [] [] | mailfromd | | mailutils | | make | [] [] [] | man-db | | minicom | [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] [] [] | pwdutils | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | shared-mime-info | [] [] [] [] [] [] [] | sharutils | [] [] | shishi | | skencil | | solfege | () () | soundtracker | | sp | () | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] | tin | | tuxpaint | () [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | util-linux-ng | [] [] | vorbis-tools | | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] [] | bash | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | dialog | [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] | findutils_stable | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] | gas | | gawk | [] [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gip | [] [] [] [] | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () [] | gnucash | () [] | gnuedu | | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | gretl | [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | herrie | [] [] [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] [] | libgpg-error | [] [] [] | libgphoto2 | [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] [] [] [] | minicom | [] [] [] [] [] | nano | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | [] [] | qof | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ Compendium | [] [] [] [] | 19 a2ps | [] [] [] | 19 aegis | [] | 1 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 16 bash | [] | 6 bfd | | 2 bibshelf | [] | 7 binutils | [] [] [] [] | 9 bison | [] [] [] [] | 20 bison-runtime | [] [] [] [] | 18 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 5 clisp | | 9 console-tools | [] [] | 5 coreutils | [] [] [] | 18 cpio | [] [] [] [] | 11 cpplib | [] [] [] [] [] | 12 cryptonit | [] | 6 dialog | [] [] [] | 9 diffutils | [] [] [] [] [] | 29 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 fetchmail | [] [] | 12 findutils | [] [] [] | 11 findutils_stable | [] [] [] [] | 18 flex | [] [] | 15 fslint | [] | 2 gas | [] | 3 gawk | [] [] [] | 16 gcal | [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] | 29 gettext-runtime | [] [] [] [] [] [] | 28 gettext-tools | [] [] [] [] [] | 20 gip | [] [] | 13 gliv | [] [] | 11 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 16 gnubiff | [] | 2 gnucash | () [] | 5 gnuedu | [] | 2 gnulib | [] | 10 gnunet | | 0 gnunet-gtk | [] [] | 3 gnutls | | 4 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] [] | 7 gpe-clock | [] [] [] [] | 21 gpe-conf | [] [] [] | 16 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] [] | 22 gpe-filemanager | [] [] | 7 gpe-go | [] [] [] [] | 19 gpe-login | [] [] [] [] [] | 21 gpe-ownerinfo | [] [] [] [] | 21 gpe-package | [] | 6 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] [] | 21 gpe-taskmanager | [] [] [] [] | 21 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 21 gpe-todo | [] [] | 8 gphoto2 | [] [] [] [] | 21 gprof | [] [] | 13 gpsdrive | [] | 5 gramadoir | [] | 7 grep | [] | 12 gretl | | 6 gsasl | [] [] [] | 9 gss | [] | 7 gst-plugins-bad | [] [] [] | 13 gst-plugins-base | [] [] | 11 gst-plugins-good | [] [] [] [] [] | 16 gst-plugins-ugly | [] [] [] | 13 gstreamer | [] [] [] | 18 gtick | [] [] | 7 gtkam | [] | 16 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 27 gutenprint | | 4 hello | [] [] [] [] [] | 38 herrie | [] [] | 8 hylafax | | 0 idutils | [] [] | 15 indent | [] [] [] [] [] | 28 iso_15924 | [] [] | 4 iso_3166 | [] [] [] [] [] [] [] [] [] | 54 iso_3166_2 | [] [] | 4 iso_4217 | [] [] [] [] [] | 24 iso_639 | [] [] [] [] [] | 26 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] [] | 13 keytouch | [] | 8 keytouch-editor | [] | 5 keytouch-keyboa... | [] | 5 latrine | [] [] | 5 ld | [] [] [] [] | 10 leafpad | [] [] [] [] [] | 24 libc | [] [] [] | 19 libexif | [] | 5 libextractor | [] | 5 libgpewidget | [] [] [] | 20 libgpg-error | [] | 6 libgphoto2 | [] [] | 9 libgphoto2_port | [] [] [] | 11 libgsasl | [] | 8 libiconv | [] [] | 11 libidn | [] [] | 11 lifelines | | 4 lilypond | [] | 6 lingoteach | [] | 6 lprng | [] | 2 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailfromd | [] [] | 3 mailutils | [] [] | 8 make | [] [] [] | 20 man-db | [] | 9 minicom | [] | 14 nano | [] [] [] | 20 opcodes | [] [] | 10 parted | [] [] [] | 11 pilot-qof | [] | 1 popt | [] [] [] [] | 18 psmisc | [] [] | 10 pwdutils | [] | 3 qof | [] | 4 radius | [] [] | 7 recode | [] [] [] | 25 rpm | [] [] [] [] | 13 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] [] | 23 shared-mime-info | [] [] [] | 29 sharutils | [] [] [] | 23 shishi | [] | 3 skencil | [] | 7 solfege | [] | 3 soundtracker | [] [] | 9 sp | [] | 3 system-tools-ba... | [] [] [] [] [] [] [] | 38 tar | [] [] [] | 17 texinfo | [] [] [] | 15 tin | | 1 tuxpaint | [] [] [] | 19 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 util-linux-ng | [] [] [] | 20 vorbis-tools | [] [] | 4 wastesedge | | 1 wdiff | [] [] | 23 wget | [] [] [] | 20 xchat | [] [] [] [] | 29 xkeyboard-config | [] [] [] | 14 xpad | [] [] [] | 15 +---------------------------------------------------+ 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If November 2007 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. ebview-0.3.6.2/NEWS0000644000175000017500000000453310016054435013161 0ustar mhattamhattaWhat's new in version 0.3.4 Bug-fix * Search using Kanji character now correctly work. * You can input Japanese correctly. What's new in version 0.3.4 * Now you specify color to dictionary button and result list. * Show dictionary name on tooltip of dictionary button. * Menu and shortcuts to Increase/decrease font size. * Menu and shortcuts to Expand/Shrink lines. * Selection search renewed. * Replace special characters undefined iin Unicode. * Both Katakana and Hiragana maches interchangeably. * When searching dictionary from disk, they are now enabled by default. * Now you don't have to push [Update] button when defining dictionary group and web search engines. * Now sound will be played using internal routine (Windows). * Immediately get clipboard contents (Windows). * Config file location changed (Windows). Bug-fix * Garbage shown in Japanese keyword emphasis fixed. * Now end tag without start tag will be ignored. * Scrolling to the end of contents unintentionally fixed. * Aborts when error returned from EB library fixed. What's new in version 0.3.3 * Directory group feature. * Suppress console message which cause console window to open. * Now "normal" font will be used in headword list. * Calculate number of cells from window height. * Use BMH method for fulltext search. Bug-fix * Direct editing in dictionary group window may result in segfault. * Segfault on next and previous button fixed. * Destroying wrong widget in ok_pref() fixed. * Freeze on failure of exec() fixed. What's new in version 0.3.2 * Drag & Drop enabled in dictionary group window. * Compiles with gcc 3.x on Cygwin environment (Windows). * Calls ShellExecute() when no external program is specified (Windows). * Cache bug fixed (ignore files whose size is zero). * Added call to finalize_hookset(). * Gaiji color is now correct. * Now you can use Japanese path name. What's new in version 0.3.1 * File Search: Searches keyword from file. You can use both text and regular expression as keyword. * Japanese stemming fixed. * Weblist destroy bug fixed. * Has option to suppress image. * Tab position is now modifiable. * Frame direction is now modifiable. * Max search and max items was separated. * Search history is saved in file, available next time. * Emphasize search word in contents. ebview-0.3.6.2/config.h.in0000644000175000017500000001057611241637502014514 0ustar mhattamhatta/* config.h.in. Generated from configure.in by autoheader. */ /* Define if EB Library supports remote access. */ #undef EBCONF_ENABLE_EBNET /* Define if EB Library supports native language. */ #undef EBCONF_ENABLE_NLS /* Define if EB Library supports pthread. */ #undef EBCONF_ENABLE_PTHREAD /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_EB_EB_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Where .mo file is. */ #undef LOCALEDIR /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Where EBView data goes. */ #undef PACKAGEDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t