Projects
openEuler:Mainline
enchant2
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
_service:tar_scm:enchant2.spec
Changed
@@ -1,5 +1,5 @@ Name: enchant2 -Version: 2.3.3 +Version: 2.5.0 Release: 1 Summary: Generic spell checking library License: LGPLv2+ @@ -57,7 +57,7 @@ autoreconf -ifv %build -%configure --with-aspell --with-hunspell-dir=%{_datadir}/myspell --disable-static +%configure --with-aspell --with-hunspell-dir=%{_datadir}/myspell --disable-static --docdir=%{_defaultdocdir}/%{name} sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -92,8 +92,15 @@ %files help %{_mandir}/man1/* +%{_mandir}/man5/enchant.5* +%doc %{_defaultdocdir}/%{name}/enchant.html +%doc %{_defaultdocdir}/%{name}/enchant-2.html +%doc %{_defaultdocdir}/%{name}/enchant-lsmod-2.html %changelog +* Fri Jun 16 2023 wangkai <13474090681@163.com> - 2.5.0-1 +- Update to 2.5.0 + * Thu Sep 15 2022 lutcunpeng <lutkunpeng@163.com> - 2.3.3-1 - DESC: update to 2.3.3
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt-cdefs.in.h
Deleted
@@ -1,67 +0,0 @@ -/* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of gnulib. - Unlike most of the getopt implementation, it is NOT shared - with the GNU C Library. - - This file 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. - - This file 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 gnulib; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_CDEFS_H -#define _GETOPT_CDEFS_H 1 - -/* This header should not be used directly; include getopt.h or - unistd.h instead. It does not have a protective #error, because - the guard macro for getopt.h in gnulib is not fixed. */ - -/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect - a number of the internal macros supplied to GNU libc's headers by - sys/cdefs.h. Provide fallback definitions for all of them. */ -#if @HAVE_SYS_CDEFS_H@ -# include <sys/cdefs.h> -#endif - -#ifndef __BEGIN_DECLS -# ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# else -# define __BEGIN_DECLS /* nothing */ -# endif -#endif -#ifndef __END_DECLS -# ifdef __cplusplus -# define __END_DECLS } -# else -# define __END_DECLS /* nothing */ -# endif -#endif - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_VERSION__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#ifndef __THROW -# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -#endif /* _GETOPT_CDEFS_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt-core.h
Deleted
@@ -1,96 +0,0 @@ -/* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library and is also part of gnulib. - Patches to this file should be submitted to both projects. - - 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, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_CORE_H -#define _GETOPT_CORE_H 1 - -/* This header should not be used directly; include getopt.h or - unistd.h instead. Unlike most bits headers, it does not have - a protective #error, because the guard macro for getopt.h in - gnulib is not fixed. */ - -__BEGIN_DECLS - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. - - For standards compliance, the 'argv' argument has the type - char *const *, but this is inaccurate; if argument permutation is - enabled, the argv array (not the strings it points to) must be - writable. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -__END_DECLS - -#endif /* _GETOPT_CORE_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt-ext.h
Deleted
@@ -1,77 +0,0 @@ -/* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library and is also part of gnulib. - Patches to this file should be submitted to both projects. - - 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, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_EXT_H -#define _GETOPT_EXT_H 1 - -/* This header should not be used directly; include getopt.h instead. - Unlike most bits headers, it does not have a protective #error, - because the guard macro for getopt.h in gnulib is not fixed. */ - -__BEGIN_DECLS - -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -__END_DECLS - -#endif /* _GETOPT_EXT_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt-pfx-core.h
Deleted
@@ -1,67 +0,0 @@ -/* getopt (basic, portable features) gnulib wrapper header. - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of gnulib. - Unlike most of the getopt implementation, it is NOT shared - with the GNU C Library. - - This file 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. - - This file 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 gnulib; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_PFX_CORE_H -#define _GETOPT_PFX_CORE_H 1 - -/* This header should not be used directly; include getopt.h or - unistd.h instead. It does not have a protective #error, because - the guard macro for getopt.h in gnulib is not fixed. */ - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in getopt-core.h and getopt-ext.h. Systematically - rename identifiers so that they do not collide with the system - functions and variables. Renaming avoids problems with some - compilers and linkers. */ -#ifdef __GETOPT_PREFIX -# ifndef __GETOPT_ID -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# endif -# undef getopt -# undef optarg -# undef opterr -# undef optind -# undef optopt -# define getopt __GETOPT_ID (getopt) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) - -/* Work around a a problem on macOS, which declares getopt with a - trailing __DARWIN_ALIAS(getopt) that would expand to something like - __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following - hack to suppress the macOS declaration <https://bugs.gnu.org/40205>. */ -# ifdef __APPLE__ -# define _GETOPT -# endif - -/* The system's getopt.h may have already included getopt-core.h to - declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that - getopt-core.h declares them with prefixes. */ -# undef _GETOPT_CORE_H -#endif - -#include <getopt-core.h> - -#endif /* _GETOPT_PFX_CORE_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt-pfx-ext.h
Deleted
@@ -1,71 +0,0 @@ -/* getopt (GNU extensions) gnulib wrapper header. - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of gnulib. - Unlike most of the getopt implementation, it is NOT shared - with the GNU C Library. - - This file 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. - - This file 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 gnulib; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_PFX_EXT_H -#define _GETOPT_PFX_EXT_H 1 - -/* This header should not be used directly; include getopt.h instead. - It does not have a protective #error, because the guard macro for - getopt.h in gnulib is not fixed. */ - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in getopt-core.h and getopt-ext.h. Systematically - rename identifiers so that they do not collide with the system - functions and variables. Renaming avoids problems with some - compilers and linkers. */ -#ifdef __GETOPT_PREFIX -# ifndef __GETOPT_ID -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# endif -# undef getopt_long -# undef getopt_long_only -# undef option -# undef _getopt_internal -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) - -/* The system's getopt.h may have already included getopt-ext.h to - declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that - getopt-ext.h declares them with prefixes. */ -# undef _GETOPT_EXT_H -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". For backward - compatibility with old applications, if __GETOPT_PREFIX is not - defined, we supply GNU-libc-compatible, but incorrect, prototypes - using "char *const *argv". (GNU libc is stuck with the incorrect - prototypes, as they are baked into older versions of LSB.) */ -#ifndef __getopt_argv_const -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -#include <getopt-ext.h> - -#endif /* _GETOPT_PFX_EXT_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt.c
Deleted
@@ -1,811 +0,0 @@ -/* Getopt for GNU. - Copyright (C) 1987-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library and is also part of gnulib. - Patches to this file should be submitted to both projects. - - 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, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _LIBC -# include <config.h> -#endif - -#include "getopt.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#ifdef _LIBC -/* When used as part of glibc, error printing must be done differently - for standards compliance. getopt is not a cancellation point, so - it must not call functions that are, and it is specified by an - older standard than stdio locking, so it must not refer to - functions in the "user namespace" related to stdio locking. - Finally, it must use glibc's internal message translation so that - the messages are looked up in the proper text domain. */ -# include <libintl.h> -# define fprintf __fxprintf_nocancel -# define flockfile(fp) _IO_flockfile (fp) -# define funlockfile(fp) _IO_funlockfile (fp) -#else -# include "gettext.h" -# define _(msgid) gettext (msgid) -/* When used standalone, flockfile and funlockfile might not be - available. */ -# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ - || (defined _WIN32 && ! defined __CYGWIN__)) -# define flockfile(fp) /* nop */ -# define funlockfile(fp) /* nop */ -# endif -/* When used standalone, do not attempt to use alloca. */ -# define __libc_use_alloca(size) 0 -# undef alloca -# define alloca(size) (abort (), (void *)0) -#endif - -/* This implementation of 'getopt' has three modes for handling - options interspersed with non-option arguments. It can stop - scanning for options at the first non-option argument encountered, - as POSIX specifies. It can continue scanning for options after the - first non-option argument, but permute 'argv' as it goes so that, - after 'getopt' is done, all the options precede all the non-option - arguments and 'optind' points to the first non-option argument. - Or, it can report non-option arguments as if they were arguments to - the option character '\x01'. - - The default behavior of 'getopt_long' is to permute the argument list. - When this implementation is used standalone, the default behavior of - 'getopt' is to stop at the first non-option argument, but when it is - used as part of GNU libc it also permutes the argument list. In both - cases, setting the environment variable POSIXLY_CORRECT to any value - disables permutation. - - If the first character of the OPTSTRING argument to 'getopt' or - 'getopt_long' is '+', both functions will stop at the first - non-option argument. If it is '-', both functions will report - non-option arguments as arguments to the option character '\x01'. */ - -#include "getopt_int.h" - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* 1003.2 says this must be 1 before any call. */ -int optind = 1; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Keep a global copy of all internal members of getopt_data. */ - -static struct _getopt_data getopt_data; - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - 'first_nonopt' and 'last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (char **argv, struct _getopt_data *d) -{ - int bottom = d->__first_nonopt; - int middle = d->__last_nonopt; - int top = d->optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argvbottom + i; - argvbottom + i = argvtop - (middle - bottom) + i; - argvtop - (middle - bottom) + i = tem; - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argvbottom + i; - argvbottom + i = argvmiddle + i; - argvmiddle + i = tem; - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - d->__first_nonopt += (d->optind - d->__last_nonopt); - d->__last_nonopt = d->optind; -} - -/* Process the argument starting with d->__nextchar as a long option. - d->optind should *not* have been advanced over this argument. - - If the value returned is -1, it was not actually a long option, the - state is unchanged, and the argument should be processed as a set - of short options (this can only happen when long_only is true). - Otherwise, the option (and its argument, if any) have been consumed - and the return value is the value to return from _getopt_internal_r. */ -static int -process_long_option (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, struct _getopt_data *d, - int print_errors, const char *prefix) -{ - char *nameend;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt.in.h
Deleted
@@ -1,61 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of gnulib. - Unlike most of the getopt implementation, it is NOT shared - with the GNU C Library, which supplies a different version of - this file. - - This file 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. - - This file 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 gnulib; if not, see <https://www.gnu.org/licenses/>. */ - -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - <getopt.h>; our definitions will be present soon enough. */ -#if @HAVE_GETOPT_H@ -# define _GL_SYSTEM_GETOPT -# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ -# undef _GL_SYSTEM_GETOPT -#endif - -#define _@GUARD_PREFIX@_GETOPT_H 1 - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in getopt-core.h and getopt-ext.h. When this happens, - include the headers that might declare getopt so that they will not - cause confusion if included after this file (if the system had - <getopt.h>, we have already included it). */ -#if defined __GETOPT_PREFIX -# if !@HAVE_GETOPT_H@ -# define __need_system_stdlib_h -# include <stdlib.h> -# undef __need_system_stdlib_h -# include <stdio.h> -# include <unistd.h> -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#include <getopt-cdefs.h> -#include <getopt-pfx-core.h> -#include <getopt-pfx-ext.h> - -#endif /* _@GUARD_PREFIX@_GETOPT_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt1.c
Deleted
@@ -1,159 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library and is also part of gnulib. - Patches to this file should be submitted to both projects. - - 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, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _LIBC -# include <config.h> -#endif - -#include "getopt.h" -#include "getopt_int.h" - -int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); -} - -int -_getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d, 0); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); -} - -int -_getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d, 0); -} - - -#ifdef TEST - -#include <stdio.h> -#include <stdlib.h> - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static const struct option long_options = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_optionsoption_index.name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case 'd': - printf ("option d with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argvoptind++); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/getopt_int.h
Deleted
@@ -1,118 +0,0 @@ -/* Internal declarations for getopt. - Copyright (C) 1989-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library and is also part of gnulib. - Patches to this file should be submitted to both projects. - - 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, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 - -#include <getopt.h> - -extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); - - -/* Reentrant versions which can handle parsing multiple argument - vectors at the same time. */ - -/* Describe how to deal with options that follow non-option ARGV-elements. - - REQUIRE_ORDER means don't recognize them as options; stop option - processing when the first non-option is seen. This is what POSIX - specifies should happen. - - PERMUTE means permute the contents of ARGV as we scan, so that - eventually all the non-options are at the end. This allows options - to be given in any order, even with programs that were not written - to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option - with character code 1. - - The special argument '--' forces an end of option-scanning regardless - of the value of 'ordering'. In the case of RETURN_IN_ORDER, only - '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ - -enum __ord - { - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER - }; - -/* Data type for reentrant functions. */ -struct _getopt_data -{ - /* These have exactly the same meaning as the corresponding global - variables, except that they are used for the reentrant - versions of getopt. */ - int optind; - int opterr; - int optopt; - char *optarg; - - /* Internal members. */ - - /* True if the internal members have been initialized. */ - int __initialized; - - /* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - char *__nextchar; - - /* See __ord above. */ - enum __ord __ordering; - - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have - been skipped. 'first_nonopt' is the index in ARGV of the first - of them; 'last_nonopt' is the index after the last of them. */ - - int __first_nonopt; - int __last_nonopt; -}; - -/* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } - -extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, struct _getopt_data *__data, - int __posixly_correct); - -extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); - -extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); - -#endif /* getopt_int.h */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/gettext.h
Deleted
@@ -1,301 +0,0 @@ -/* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software - Foundation, Inc. - - This program 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, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, see <https://www.gnu.org/licenses/>. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option - or through "#define ENABLE NLS 0" before including this file. */ -#if defined ENABLE_NLS && ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include <libintl.h> - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of <locale.h> a NOP. We don't include <libintl.h> - as well because people using "gettext.h" will not include <libintl.h>, - and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> - is OK. */ -#if defined(__sun) -# include <locale.h> -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - <libintl.h>, which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of <libintl.h> a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include <cstdlib> -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H -# include <libintl.h> -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* Prefer gnulib's setlocale override over libintl's setlocale override. */ -#ifdef GNULIB_defined_setlocale -# undef setlocale -# define setlocale rpl_setlocale -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char' or 'const char' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID - can be arbitrary expressions. But for string literals these macros are - less efficient than those above. */ - -#include <string.h> - -/* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported. - This relates to the -Wvla and -Wvla-larger-than warnings, enabled in - the default GCC many warnings set. This allows programs to disable use - of VLAs, which may be unintended, or may be awkward to support portably, - or may have security implications due to non-deterministic stack usage. */ - -#if (!defined GNULIB_NO_VLA \ - && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) - || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )) -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 -#else -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/malloc.c
Deleted
@@ -1,56 +0,0 @@ -/* malloc() function that is glibc compatible. - - Copyright (C) 1997-1998, 2006-2007, 2009-2020 Free Software Foundation, Inc. - - This program 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, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see <https://www.gnu.org/licenses/>. */ - -/* written by Jim Meyering and Bruno Haible */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include <config.h> -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU -# define NEED_MALLOC_GNU 1 -#endif - -#include <stdlib.h> - -#include <errno.h> - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void * -rpl_malloc (size_t n) -{ - void *result; - -#if NEED_MALLOC_GNU - if (n == 0) - n = 1; -#endif - - result = malloc (n); - -#if !HAVE_MALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -}
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/strdup.c
Deleted
@@ -1,54 +0,0 @@ -/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2020 Free Software - Foundation, Inc. - - This file is part of the GNU C Library. - - This program 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, 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with this program; if not, see <https://www.gnu.org/licenses/>. */ - -#ifndef _LIBC -# include <config.h> -#endif - -/* Get specification. */ -#include <string.h> - -#include <stdlib.h> - -#undef __strdup -#ifdef _LIBC -# undef strdup -#endif - -#ifndef weak_alias -# define __strdup strdup -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -char * -__strdup (const char *s) -{ - size_t len = strlen (s) + 1; - void *new = malloc (len); - - if (new == NULL) - return NULL; - - return (char *) memcpy (new, s, len); -} -#ifdef libc_hidden_def -libc_hidden_def (__strdup) -#endif -#ifdef weak_alias -weak_alias (__strdup, strdup) -#endif
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/unused-parameter.h
Deleted
@@ -1,32 +0,0 @@ -/* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2020 Free Software Foundation, Inc. - - This program 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 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. */ - -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter - declarations for parameters that are not used. This helps to reduce - warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER - or more generally - param_decl _GL_UNUSED_PARAMETER - For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) - */ -#ifndef _GL_UNUSED_PARAMETER -# define _GL_UNUSED_PARAMETER _GL_ATTRIBUTE_MAYBE_UNUSED -#endif
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/getopt.m4
Deleted
@@ -1,381 +0,0 @@ -# getopt.m4 serial 47 -dnl Copyright (C) 2002-2006, 2008-2020 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Request a POSIX compliant getopt function. -AC_DEFUN(gl_FUNC_GETOPT_POSIX, - - m4_divert_text(DEFAULTS, gl_getopt_required=POSIX) - AC_REQUIRE(gl_UNISTD_H_DEFAULTS) - AC_REQUIRE(gl_GETOPT_CHECK_HEADERS) - dnl Other modules can request the gnulib implementation of the getopt - dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. - dnl argp.m4 does this. - m4_ifdef(gl_REPLACE_GETOPT_ALWAYS, - REPLACE_GETOPT=1 - , - REPLACE_GETOPT=0 - if test -n "$gl_replace_getopt"; then - REPLACE_GETOPT=1 - fi - ) - if test $REPLACE_GETOPT = 1; then - dnl Arrange for getopt.h to be created. - gl_GETOPT_SUBSTITUTE_HEADER - fi -) - -# Request a POSIX compliant getopt function with GNU extensions (such as -# options with optional arguments) and the functions getopt_long, -# getopt_long_only. -AC_DEFUN(gl_FUNC_GETOPT_GNU, - - dnl Set the variable gl_getopt_required, so that all invocations of - dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file - dnl will check for getopt with GNU extensions. - dnl This means that if one gnulib-tool invocation requests getopt-posix - dnl and another gnulib-tool invocation requests getopt-gnu, it is as if - dnl both had requested getopt-gnu. - m4_divert_text(INIT_PREPARE, gl_getopt_required=GNU) - - dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically - dnl done through the module dependency getopt-gnu -> getopt-posix. -) - -# Determine whether to replace the entire getopt facility. -AC_DEFUN(gl_GETOPT_CHECK_HEADERS, - - AC_REQUIRE(AC_CANONICAL_HOST) dnl for cross-compiles - AC_REQUIRE(AC_PROG_AWK) dnl for awk that supports ENVIRON - - dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt. - AC_REQUIRE(AC_USE_SYSTEM_EXTENSIONS) - - gl_CHECK_NEXT_HEADERS(getopt.h) - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - AC_SUBST(HAVE_GETOPT_H) - - gl_replace_getopt= - - dnl Test whether <getopt.h> is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_HEADERS(getopt.h, , gl_replace_getopt=yes) - fi - - dnl Test whether the function getopt_long is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_FUNCS(getopt_long_only, , gl_replace_getopt=yes) - fi - - dnl POSIX 2008 does not specify leading '+' behavior, but see - dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on - dnl the next version of POSIX. For now, we only guarantee leading '+' - dnl behavior with getopt-gnu. - if test -z "$gl_replace_getopt"; then - AC_CACHE_CHECK(whether getopt is POSIX compatible, - gl_cv_func_getopt_posix, - - dnl Merging these three different test programs into a single one - dnl would require a reset mechanism. On BSD systems, it can be done - dnl through 'optreset'; on some others (glibc), it can be done by - dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, - dnl Solaris 9, musl libc), there is no such mechanism. - if test $cross_compiling = no; then - dnl Sanity check. Succeeds everywhere (except on MSVC, - dnl which lacks <unistd.h> and getopt() entirely). - AC_RUN_IFELSE( - AC_LANG_SOURCE( -#include <unistd.h> -#include <stdlib.h> -#include <string.h> - -int -main () -{ - static char program = "program"; - static char a = "-a"; - static char foo = "foo"; - static char bar = "bar"; - char *argv = { program, a, foo, bar, NULL }; - int c; - - c = getopt (4, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (4, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - return 0; -} -), - gl_cv_func_getopt_posix=maybe, - gl_cv_func_getopt_posix=no) - if test $gl_cv_func_getopt_posix = maybe; then - dnl Sanity check with '+'. Succeeds everywhere (except on MSVC, - dnl which lacks <unistd.h> and getopt() entirely). - AC_RUN_IFELSE( - AC_LANG_SOURCE( -#include <unistd.h> -#include <stdlib.h> -#include <string.h> - -int -main () -{ - static char program = "program"; - static char donald = "donald"; - static char p = "-p"; - static char billy = "billy"; - static char duck = "duck"; - static char a = "-a"; - static char bar = "bar"; - char *argv = { program, donald, p, billy, duck, a, bar, NULL }; - int c; - - c = getopt (7, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv0, "program") == 0)) - return 5; - if (!(strcmp (argv1, "donald") == 0)) - return 6; - if (!(strcmp (argv2, "-p") == 0)) - return 7; - if (!(strcmp (argv3, "billy") == 0)) - return 8; - if (!(strcmp (argv4, "duck") == 0)) - return 9; - if (!(strcmp (argv5, "-a") == 0)) - return 10; - if (!(strcmp (argv6, "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - return 0; -} -), - gl_cv_func_getopt_posix=maybe, - gl_cv_func_getopt_posix=no) - fi - if test $gl_cv_func_getopt_posix = maybe; then - dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug. - AC_RUN_IFELSE( - AC_LANG_SOURCE( -#include <unistd.h> -#include <stdlib.h> -#include <string.h> - -int -main () -{ - static char program = "program"; - static char ab = "-ab"; - char *argv3 = { program, ab, NULL }; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - return 0; -} -), - gl_cv_func_getopt_posix=yes, - gl_cv_func_getopt_posix=no) - fi - else - case "$host_os" in - darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/malloc.m4
Deleted
@@ -1,104 +0,0 @@ -# malloc.m4 serial 20 -dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# This is adapted with modifications from upstream Autoconf here: -# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c -AC_DEFUN(_AC_FUNC_MALLOC_IF, - - AC_REQUIRE(AC_HEADER_STDC)dnl - AC_REQUIRE(AC_CANONICAL_HOST)dnl for cross-compiles - AC_CHECK_HEADERS(stdlib.h) - AC_CACHE_CHECK(for GNU libc compatible malloc, - ac_cv_func_malloc_0_nonnull, - AC_RUN_IFELSE( - AC_LANG_PROGRAM( - #if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include <stdlib.h> - #else - char *malloc (); - #endif - , - char *p = malloc (0); - int result = !p; - free (p); - return result;) - , - ac_cv_func_malloc_0_nonnull=yes, - ac_cv_func_malloc_0_nonnull=no, - case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull="guessing yes" ;; - # If we don't know, obey --enable-cross-guesses. - *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; - esac - ) - ) - case "$ac_cv_func_malloc_0_nonnull" in - *yes) - $1 - ;; - *) - $2 - ;; - esac -)# _AC_FUNC_MALLOC_IF - -# gl_FUNC_MALLOC_GNU -# ------------------ -# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if -# it is not. -AC_DEFUN(gl_FUNC_MALLOC_GNU, - - AC_REQUIRE(gl_STDLIB_H_DEFAULTS) - dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. - _AC_FUNC_MALLOC_IF( - AC_DEFINE(HAVE_MALLOC_GNU, 1, - Define to 1 if your system has a GNU libc compatible 'malloc' - function, and to 0 otherwise.), - AC_DEFINE(HAVE_MALLOC_GNU, 0) - REPLACE_MALLOC=1 - ) -) - -# gl_FUNC_MALLOC_POSIX -# -------------------- -# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace malloc if it is not. -AC_DEFUN(gl_FUNC_MALLOC_POSIX, - - AC_REQUIRE(gl_STDLIB_H_DEFAULTS) - AC_REQUIRE(gl_CHECK_MALLOC_POSIX) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE(HAVE_MALLOC_POSIX, 1, - Define if the 'malloc' function is POSIX compliant.) - else - REPLACE_MALLOC=1 - fi -) - -# Test whether malloc, realloc, calloc are POSIX compliant, -# Set gl_cv_func_malloc_posix to yes or no accordingly. -AC_DEFUN(gl_CHECK_MALLOC_POSIX, - - AC_CACHE_CHECK(whether malloc, realloc, calloc are POSIX compliant, - gl_cv_func_malloc_posix, - - dnl It is too dangerous to try to allocate a large amount of memory: - dnl some systems go to their knees when you do that. So assume that - dnl all Unix implementations of the function are POSIX compliant. - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - , - #if defined _WIN32 && ! defined __CYGWIN__ - choke me - #endif - ), - gl_cv_func_malloc_posix=yes, - gl_cv_func_malloc_posix=no) - ) -)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/pid_t.m4
Deleted
@@ -1,38 +0,0 @@ -# pid_t.m4 serial 2 -dnl Copyright (C) 2020 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# The following implementation works around a problem in autoconf <= 2.69. -m4_version_prereq(2.70, , - -dnl Define pid_t if the headers don't define it. -AC_DEFUN(AC_TYPE_PID_T, - - AC_CHECK_TYPE(pid_t, - , - dnl On 64-bit native Windows, define it to the equivalent of 'intptr_t' - dnl (= 'long long' = '__int64'), because that is the return type - dnl of the _spawnv* functions - dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/spawnvp-wspawnvp> - dnl and the argument type of the _cwait function - dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/cwait>. - dnl Otherwise (on 32-bit Windows and on old Unix platforms), define it - dnl to 'int'. - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - #if defined _WIN64 && !defined __CYGWIN__ - LLP64 - #endif - ) - , - gl_pid_type='int', - gl_pid_type='__int64') - AC_DEFINE_UNQUOTED(pid_t, $gl_pid_type, - Define as a signed integer type capable of holding a process identifier.) - , - AC_INCLUDES_DEFAULT) -) - -)# m4_version_prereq 2.70
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/std-gnu11.m4
Deleted
@@ -1,824 +0,0 @@ -# Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- - -# This implementation is taken from GNU Autoconf lib/autoconf/c.m4 -# commit 017d5ddd82854911f0119691d91ea8a1438824d6 -# dated Sun Apr 3 13:57:17 2016 -0700 -# This implementation will be obsolete once we can assume Autoconf 2.70 -# or later is installed everywhere a Gnulib program might be developed. - - -# Copyright (C) 2001-2020 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 3 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, see <https://www.gnu.org/licenses/>. - -# Written by David MacKenzie, with help from -# Akim Demaille, Paul Eggert, -# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -# AC_PROG_CC(COMPILER ...) -# -------------------------- -# COMPILER ... is a space separated list of C compilers to search for. -# This just gives the user an opportunity to specify an alternative -# search list for the C compiler. -AC_DEFUN_ONCE(AC_PROG_CC, -AC_LANG_PUSH(C)dnl -AC_ARG_VAR(CC, C compiler command)dnl -AC_ARG_VAR(CFLAGS, C compiler flags)dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -m4_ifval($1, - AC_CHECK_TOOLS(CC, $1), -AC_CHECK_TOOL(CC, gcc) -if test -z "$CC"; then - dnl Here we want: - dnl AC_CHECK_TOOL(CC, cc) - dnl but without the check for a tool without the prefix. - dnl Until the check is removed from there, copy the code: - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(CC, ${ac_tool_prefix}cc, ${ac_tool_prefix}cc) - fi -fi -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) -fi -if test -z "$CC"; then - AC_CHECK_TOOLS(CC, cl.exe) -fi -if test -z "$CC"; then - AC_CHECK_TOOL(CC, clang) -fi -) - -test -z "$CC" && AC_MSG_FAILURE(no acceptable C compiler found in \$PATH) - -# Provide some information about the compiler. -_AS_ECHO_LOG(checking for _AC_LANG compiler version) -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do - _AC_DO_LIMIT($ac_compiler $ac_option >&AS_MESSAGE_LOG_FD) -done - -m4_expand_once(_AC_COMPILER_EXEEXT)dnl -m4_expand_once(_AC_COMPILER_OBJEXT)dnl -_AC_LANG_COMPILER_GNU -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -_AC_PROG_CC_G -dnl -dnl Set ac_prog_cc_stdc to the supported C version. -dnl Also set the documented variable ac_cv_prog_cc_stdc; -dnl its name was chosen when it was cached, but it is no longer cached. -_AC_PROG_CC_C11(ac_prog_cc_stdc=c11 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11, - _AC_PROG_CC_C99(ac_prog_cc_stdc=c99 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99, - _AC_PROG_CC_C89(ac_prog_cc_stdc=c89 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89, - ac_prog_cc_stdc=no - ac_cv_prog_cc_stdc=no))) -dnl -AC_LANG_POP(C)dnl -)# AC_PROG_CC - - - -# AC_PROG_CXX(LIST-OF-COMPILERS) -# -------------------------------- -# LIST-OF-COMPILERS is a space separated list of C++ compilers to search -# for (if not specified, a default list is used). This just gives the -# user an opportunity to specify an alternative search list for the C++ -# compiler. -# aCC HP-UX C++ compiler much better than `CC', so test before. -# FCC Fujitsu C++ compiler -# KCC KAI C++ compiler -# RCC Rational C++ -# xlC_r AIX C Set++ (with support for reentrant code) -# xlC AIX C Set++ -AC_DEFUN(AC_PROG_CXX, -AC_LANG_PUSH(C++)dnl -AC_ARG_VAR(CXX, C++ compiler command)dnl -AC_ARG_VAR(CXXFLAGS, C++ compiler flags)dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -_AC_ARG_VAR_PRECIOUS(CCC)dnl -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - AC_CHECK_TOOLS(CXX, - m4_default($1, - g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++), - g++) - fi -fi -# Provide some information about the compiler. -_AS_ECHO_LOG(checking for _AC_LANG compiler version) -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - _AC_DO_LIMIT($ac_compiler $ac_option >&AS_MESSAGE_LOG_FD) -done - -m4_expand_once(_AC_COMPILER_EXEEXT)dnl -m4_expand_once(_AC_COMPILER_OBJEXT)dnl -_AC_LANG_COMPILER_GNU -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -_AC_PROG_CXX_G -_AC_PROG_CXX_CXX11(ac_prog_cxx_stdcxx=cxx11 - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11, - _AC_PROG_CXX_CXX98(ac_prog_cxx_stdcxx=cxx98 - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98, - ac_prog_cxx_stdcxx=no - ac_cv_prog_cxx_stdcxx=no)) -AC_LANG_POP(C++)dnl -)# AC_PROG_CXX - - -# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, -# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) -# -------------------------------------------------------------- -# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') -# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, -# try again with each compiler option in the space-separated OPTION-LIST; if one -# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, -# else ACTION-IF-UNAVAILABLE. -AC_DEFUN(_AC_C_STD_TRY, -AC_MSG_CHECKING(for $CC option to enable m4_translit($1, c, C) features) -AC_CACHE_VAL(ac_cv_prog_cc_$1, -ac_cv_prog_cc_$1=no -ac_save_CC=$CC -AC_LANG_CONFTEST(AC_LANG_PROGRAM($2, $3)) -for ac_arg in '' $4 -do - CC="$ac_save_CC $ac_arg" - _AC_COMPILE_IFELSE(, ac_cv_prog_cc_$1=$ac_arg) - test "x$ac_cv_prog_cc_$1" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -)# AC_CACHE_VAL -ac_prog_cc_stdc_options= -case "x$ac_cv_prog_cc_$1" in - x) - AC_MSG_RESULT(none needed) ;; - xno) - AC_MSG_RESULT(unsupported) ;; - *) - ac_prog_cc_stdc_options=" $ac_cv_prog_cc_$1" - CC=$CC$ac_prog_cc_stdc_options - AC_MSG_RESULT($ac_cv_prog_cc_$1) ;; -esac -AS_IF(test "x$ac_cv_prog_cc_$1" != xno, $5, $6) -)# _AC_C_STD_TRY - -# _AC_C_C99_TEST_HEADER -# ---------------------
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/strdup.m4
Deleted
@@ -1,32 +0,0 @@ -# strdup.m4 serial 14 - -dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. - -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN(gl_FUNC_STRDUP, - - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) - AC_CHECK_DECLS_ONCE(strdup) - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi -) - -AC_DEFUN(gl_FUNC_STRDUP_POSIX, - - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) - AC_REQUIRE(gl_CHECK_MALLOC_POSIX) - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 - fi - AC_CHECK_DECLS_ONCE(strdup) - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi -) - -# Prerequisites of lib/strdup.c. -AC_DEFUN(gl_PREREQ_STRDUP, :)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/dictionary/enchant_dict_store_replacement_tests.cpp
Deleted
@@ -1,227 +0,0 @@ -/* Copyright (c) 2007 Eric Scott Albright - * - * 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 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include <UnitTest++/UnitTest++.h> -#include <enchant.h> -#include "EnchantDictionaryTestFixture.h" - -struct EnchantDictionaryStoreReplacement_TestFixture : EnchantDictionaryTestFixture -{ - static std::string misspelling; - static std::string correction; - - static bool storeReplacementCalled; - - //Setup - EnchantDictionaryStoreReplacement_TestFixture(): - EnchantDictionaryTestFixture(DictionaryStoreReplacement_ProviderConfiguration) - { - storeReplacementCalled = false; - misspelling.clear(); - correction.clear(); - } - - static void - MockDictionaryStoreReplacement (EnchantDict *, - const char *const mis, size_t mis_len, - const char *const cor, size_t cor_len) - { - misspelling = std::string(mis, mis_len); - correction = std::string(cor, cor_len); - storeReplacementCalled = true; - } - - static EnchantDict* - MockProviderRequestStoreReplacementMockDictionary(EnchantProvider * me, const char *tag) - { - - EnchantDict* dict = MockProviderRequestEmptyMockDictionary(me, tag); - dict->store_replacement = MockDictionaryStoreReplacement; - return dict; - } - - static void DictionaryStoreReplacement_ProviderConfiguration (EnchantProvider * me, const char *) - { - me->request_dict = MockProviderRequestStoreReplacementMockDictionary; - me->dispose_dict = MockProviderDisposeDictionary; - } -}; -bool EnchantDictionaryStoreReplacement_TestFixture::storeReplacementCalled; -std::string EnchantDictionaryStoreReplacement_TestFixture::misspelling; -std::string EnchantDictionaryStoreReplacement_TestFixture::correction; - -struct EnchantDictionaryLacksStoreReplacement_TestFixture : EnchantDictionaryTestFixture -{ - //Setup - EnchantDictionaryLacksStoreReplacement_TestFixture(): - EnchantDictionaryTestFixture(EmptyDictionary_ProviderConfiguration) - { } -}; - - - - -/** - * enchant_dict_store_replacement - * @dict: A non-null #EnchantDict - * @mis: The non-null word you wish to add a correction for, in UTF-8 encoding - * @mis_len: The byte length of @mis, or -1 for strlen (@mis) - * @cor: The non-null correction word, in UTF-8 encoding - * @cor_len: The byte length of @cor, or -1 for strlen (@cor) - * - * Notes that you replaced @mis with @cor, so it's possibly more likely - * that future occurrences of @mis will be replaced with @cor. So it might - * bump @cor up in the suggestion list. - */ - -///////////////////////////////////////////////////////////////////////////// -// Test Normal Operation -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_ExplicitWordLength) -{ - std::string misspelling("helo"); - std::string correction("hello"); - enchant_dict_store_replacement(_dict, - misspelling.c_str(), - misspelling.size(), - correction.c_str(), - correction.size()); - CHECK(storeReplacementCalled); - CHECK_EQUAL(EnchantDictionaryStoreReplacement_TestFixture::misspelling, misspelling); - CHECK_EQUAL(EnchantDictionaryStoreReplacement_TestFixture::correction, correction); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_ComputedWordLength) -{ - std::string misspelling("helo"); - std::string correction("hello"); - enchant_dict_store_replacement(_dict, - misspelling.c_str(), - -1, - correction.c_str(), - -1); - CHECK(storeReplacementCalled); - CHECK_EQUAL(EnchantDictionaryStoreReplacement_TestFixture::misspelling, misspelling); - CHECK_EQUAL(EnchantDictionaryStoreReplacement_TestFixture::correction, correction); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_OnBrokerPwl) -{ - std::string misspelling("helo"); - std::string correction("hello"); - enchant_dict_store_replacement(_pwl, - misspelling.c_str(), - -1, - correction.c_str(), - -1); -} - -///////////////////////////////////////////////////////////////////////////// -// Test Error Conditions -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_NullDict_DoNothing) -{ - enchant_dict_store_replacement(NULL, "helo", -1, "hello", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_NullMisspelling_DoNothing) -{ - enchant_dict_store_replacement(_dict, NULL, -1, "hello", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_NullCorrection_DoNothing) -{ - enchant_dict_store_replacement(_dict, "helo", -1, NULL, -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_EmptyMisspelling_DoNothing) -{ - enchant_dict_store_replacement(_dict, "", -1, "hello", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_EmptyCorrection_DoNothing) -{ - enchant_dict_store_replacement(_dict, "helo", -1, "", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_ZeroMisspellingLength_DoNothing) -{ - enchant_dict_store_replacement(_dict, "helo", 0, "hello", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacment_ZeroCorrectionLength_DoNothing) -{ - enchant_dict_store_replacement(_dict, "helo", -1, "hello", 0); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacement_InvalidUtf8Misspelling_DoNothing) -{ - enchant_dict_store_replacement(_dict, "\xa5\xf1\x08", -1, "hello", -1); - CHECK(!storeReplacementCalled); -} - -TEST_FIXTURE(EnchantDictionaryStoreReplacement_TestFixture, - EnchantDictStoreReplacement_InvalidUtf8Correction_DoNothing) -{
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/enchant_providers/Makefile.am
Deleted
@@ -1,65 +0,0 @@ -# FIXME: common up with tests/Makefile.am - -# Get libdir suffix -if GNU_MAKE -libdir_subdir=$(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||') -else -libdir_subdir=lib -endif - -AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) - -ENCHANT_CONFIG_DIR = config - -AM_TESTS_ENVIRONMENT = \ - export ENCHANT_CONFIG_DIR=$(ENCHANT_CONFIG_DIR); \ - export LIBTOOL=$(top_builddir)/libtool; \ - $(MAKE) libenchant-copy; \ - cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(builddir) || :; \ - export LSAN_OPTIONS=suppressions=$(top_srcdir)/tests/asan-suppressions.txt; - -DISTCLEANFILES = *@shlibext@ - -distclean-local: - rm -rf $(libdir_subdir) $(ENCHANT_CONFIG_DIR) - -LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant-@ENCHANT_MAJOR_VERSION@.la -$(LIBENCHANT_COPY): $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la - $(MAKE) libenchant-copy - -libenchant-copy: - rm -rf $(libdir_subdir) - $(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@ - cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/ - cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/ - -APPLESPELL_CONFIG = config/AppleSpell.config -$(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config - $(MKDIR_P) config - cp $(top_srcdir)/providers/AppleSpell.config config/ - -LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) -LIBADD = $(LIBENCHANT_COPY) -DEPS = $(LIBENCHANT_COPY) - -check_PROGRAMS = providers.test -LOG_COMPILER = $(srcdir)/../run-test - -providers_test_SOURCES = providers.test.cpp \ - ../EnchantTestFixture.h \ - ../EnchantBrokerTestFixture.h \ - ../EnchantDictionaryTestFixture.h \ - unittest_enchant_providers.h \ - Dictionary/dictionary_check.cpp \ - Dictionary/dictionary_suggest.cpp \ - Provider/provider_describe_dict.cpp \ - Provider/provider_dictionary_exists.cpp \ - Provider/provider_identify_dict.cpp \ - Provider/provider_list_dicts.cpp \ - Provider/provider_request_dict.cpp \ - $(NULL) -providers_test_DEPENDENCIES = $(LIBENCHANT_COPY) $(APPLESPELL_CONFIG) -providers_test_LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) $(UNITTESTPP_LIBS) -providers_test_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\" - -TESTS = $(check_PROGRAMS)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/enchant_providers/Makefile.in
Deleted
@@ -1,1630 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 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@ - -# FIXME: common up with tests/Makefile.am -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\\ \ *) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs$$bs $$bs *//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -dEDm) skip_next=yes;; \ - -JT) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@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@ -check_PROGRAMS = providers.test$(EXEEXT) -subdir = tests/enchant_providers -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 \ - $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ - $(top_srcdir)/m4/gnulib-comp.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ - $(top_srcdir)/m4/manywarnings-c++.m4 \ - $(top_srcdir)/m4/manywarnings.m4 \ - $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 \ - $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ - $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ - $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__dirstamp = $(am__leading_dot)dirstamp -am_providers_test_OBJECTS = providers_test-providers.test.$(OBJEXT) \ - Dictionary/providers_test-dictionary_check.$(OBJEXT) \ - Dictionary/providers_test-dictionary_suggest.$(OBJEXT) \ - Provider/providers_test-provider_describe_dict.$(OBJEXT) \ - Provider/providers_test-provider_dictionary_exists.$(OBJEXT) \ - Provider/providers_test-provider_identify_dict.$(OBJEXT) \ - Provider/providers_test-provider_list_dicts.$(OBJEXT) \ - Provider/providers_test-provider_request_dict.$(OBJEXT) -providers_test_OBJECTS = $(am_providers_test_OBJECTS) -am__DEPENDENCIES_1 = -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/providers_test-providers.test.Po \ - Dictionary/$(DEPDIR)/providers_test-dictionary_check.Po \ - Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Po \ - Provider/$(DEPDIR)/providers_test-provider_describe_dict.Po \ - Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Po \ - Provider/$(DEPDIR)/providers_test-provider_identify_dict.Po \ - Provider/$(DEPDIR)/providers_test-provider_list_dicts.Po \ - Provider/$(DEPDIR)/providers_test-provider_request_dict.Po -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_@AM_V@) -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; -am__v_CXX_1 = -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -am__v_CXXLD_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/INSTALL -> _service:tar_scm:enchant-2.5.0.tar.gz/INSTALL
Changed
@@ -50,8 +50,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2022 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -274,7 +274,7 @@ and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their + HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/Makefile.in -> _service:tar_scm:enchant-2.5.0.tar.gz/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,31 +91,31 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/assert_h.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ + $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/manywarnings-c++.m4 \ $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -190,8 +190,8 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -208,12 +208,10 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/enchant.pc.in $(top_srcdir)/build-aux/config.guess \ + $(srcdir)/enchant.pc.in $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ @@ -261,6 +259,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -269,18 +269,27 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ +ASSERT_H = @ASSERT_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -295,158 +304,209 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ENCHANT_CFLAGS = @ENCHANT_CFLAGS@ -ENCHANT_LIBS = @ENCHANT_LIBS@ ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@ ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@ ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ -GETOPT_H = @GETOPT_H@ +FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ -GNULIB_ACCESS = @GNULIB_ACCESS@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHDIR = @GNULIB_CHDIR@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@ -GNULIB_DUP = @GNULIB_DUP@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FFSL = @GNULIB_FFSL@ -GNULIB_FFSLL = @GNULIB_FFSLL@ -GNULIB_FLOCK = @GNULIB_FLOCK@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETENTROPY = @GNULIB_GETENTROPY@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS = @GNULIB_GETPASS@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ -GNULIB_ISATTY = @GNULIB_ISATTY@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/NEWS -> _service:tar_scm:enchant-2.5.0.tar.gz/NEWS
Changed
@@ -1,3 +1,71 @@ +2.5.0 (May 23, 2022) +-------------------- + +This version simplifies the handling of personal wordlists. End-users should +not notice much difference, but internally the code has been considerably +simplified. + +There are three developer-visible changes: + + * A new dictionary method remove_from_session() allows providers to stay + in sync with Enchant’s personal wordlist, by removing as well as adding + words in the spelling session. + * The public API enchant_dict_store_replacement() is deprecated, and no + longer does anything. It only previously had an effect with the Aspell + provider. + * The APIs enchant_dict_add() and enchant_dict_remove() also respectively + add the word to the session or remove it. + +Note that these changes do not affect the public ABI, which only uses +pointers to dictionary objects (it does change the provider ABI, but as far +as the maintainers know, there are no 3rd-party providers). + +There are three main changes under the hood. + +First, Enchant’s mechanism for generating suggestions from personal +wordlists is removed. This mechanism was complicated, would generate +suggestions in a different way from each provider, and was unlikely to work +well for many languages. Instead, support has been improved for supplying +words from the user’s personal wordlist to the provider, so that it can +include them in suggestions. This is supported by the Aspell and Hunspell +backends. + +Second, Enchant’s support for provider-specific wordlists has been removed. +Of the known providers, only Aspell used this support, and only partially. +This was likely to be confusing: for example, words could be added to the +Aspell, but not removed, so Aspell’s personal wordlist could get out of sync +with Enchant’s. The relevant dictionary methods have been removed. + +Finally, as mentioned above, adding a word to the personal wordlist also +adds it to the session, and removing it also removes it from the session. +This keeps the session and personal wordlist in sync automatically. + + +2.4.0 (May 22, 2023) +-------------------- + +This version contains no user-visible changes. + +Add a new API enchant_broker_request_dict_with_pwl, so that it’s possible to +specify a personal wordlist in a normal spelling session. + +This makes it possible to rewrite the enchant program to use only public +APIs, thus making a cleaner separation between front-end and library. + + +2.3.4 (February 19, 2023) +------------------------- + +Document the personal wordlist format. + +Improve the man pages in various ways, and make online versions, now linked +from the web site. + +Fix some potential crashes (double-free and NULL dereferences). + +Update the build system to use autoconf 2.71. + + 2.3.3 (April 16, 2022) ----------------------
View file
_service:tar_scm:enchant-2.3.3.tar.gz/README -> _service:tar_scm:enchant-2.5.0.tar.gz/README
Changed
@@ -40,39 +40,15 @@ Developers or others wishing to install from a git repository, see HACKING. -Sharing personal word lists between spell-checkers --------------------------------------------------- - -It is possible, and usually safe, to share Enchant’s personal word lists -with other spelling checkers that use the same format (a simple plain text -file with one word per line). The spell-checkers known to be compatible are -Hunspell, Nuspell and Ispell. (Although Enchant does not support Ispell as a -back-end, it’s still fine to share word lists with it.) Other spell-checkers -supported by Enchant are either incompatible, or have no personal word list -mechanism. There may well be yet other spell-checkers, unknown to Enchant, -that use the same format. - -Some applications use Hunspell or Nuspell, but store the personal word list -under another name or in another location. Firefox is one example. Firefox -also seems to reorder its word list when updating it; again, this is OK, as -the result is still in the same format. Anonther example is Thunderbird. - -To share word lists with Enchant, find the other spelling checker’s word -list file, e.g. ~/.hunspell_fr_FR or ~/.config/nuspell/fr_FR, and merge it -with the corresponding Enchant file, in this case ~/.config/enchant/fr_FR.dic -(on a GNU or BSD system). Use the following command, replacing ENCHANT-DICT -and OTHER-DICT with the corresponding dictionary file names: - -cat ENCHANT-DICT OTHER-DICT | sort -u > merged.txt - -Take a look at merged.txt to check the merge has worked, then - -mv merged.txt ENCHANT-DICT -rm OTHER-DICT -ln -s OTHER-DICT ENCHANT-DICT - -to replace the other dictionary file with a link to the Enchant dictionary, -again filling in the name of the dictionary files. +Usage +----- + +See the man pages for information on how to use Enchant. In particular, +information about how to configure which spelling checker to use for each +language and how to work with personal word lists is in the man page +enchant(5). To see this man page, in a terminal, give the command: + + man 5 enchant Bug reports and development
View file
_service:tar_scm:enchant-2.3.3.tar.gz/aclocal.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/aclocal.m4
Changed
@@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,22 +14,23 @@ m4_ifndef(AC_CONFIG_MACRO_DIRS, m4_defun(_AM_CONFIG_MACRO_DIRS, )m4_defun(AC_CONFIG_MACRO_DIRS, _AM_CONFIG_MACRO_DIRS($@))) m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl -m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.69,, -m4_warning(this file was generated for autoconf 2.69. +m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.71,, +m4_warning(this file was generated for autoconf 2.71. 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'.)) # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- # -# Copyright (C) 1999-2008, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2008, 2011-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Thomas Tanner, 1999 # # 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 20 LTDL_INIT +# serial 21 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, LTDL-MODE) # ------------------------------------------ @@ -357,7 +358,7 @@ if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do + for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | $SED "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done @@ -495,7 +496,7 @@ # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) @@ -930,7 +931,7 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN(AC_LTDL_DLSYM_USCORE, ) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -945,7 +946,7 @@ am__api_version='1.16' 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.16.1, , +m4_if($1, 1.16.5, , AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl ) @@ -961,14 +962,14 @@ # 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.16.1)dnl +AM_AUTOMAKE_VERSION(1.16.5)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-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1018,9 +1019,46 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` ) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2021 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_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define(_AM_COND_IF) +m4_define(_AM_COND_ELSE) +m4_define(_AM_COND_ENDIF) + +# AM_COND_IF(COND, IF-TRUE, IF-FALSE) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN(AM_COND_IF, +m4_ifndef(_AM_COND_VALUE_$1, + m4_fatal($0: no such condition "$1"))dnl +_AM_COND_IF($1)dnl +if test -z "$$1_TRUE"; then : + m4_n($2)dnl +m4_ifval($3, +_AM_COND_ELSE($1)dnl +else + $3 +)dnl +_AM_COND_ENDIF($1)dnl +fidnl +) + # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1051,7 +1089,7 @@ Usually this means the macro was only invoked conditionally.) fi)) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1242,7 +1280,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1281,7 +1319,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE(Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).) fi @@ -1308,7 +1348,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1336,6 +1376,10 @@ # release and drop the old call support. AC_DEFUN(AM_INIT_AUTOMAKE, AC_PREREQ(2.65)dnl +m4_ifdef(_$0_ALREADY_INIT, + m4_fatal($0 expanded multiple times +m4_defn(_$0_ALREADY_INIT)), + m4_define(_$0_ALREADY_INIT, m4_expansion_stack))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 @@ -1372,7 +1416,7 @@ _AM_SET_OPTIONS($1)dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef(AC_PACKAGE_NAME, ok):m4_ifdef(AC_PACKAGE_VERSION, ok), + m4_ifset(AC_PACKAGE_NAME, ok):m4_ifset(AC_PACKAGE_VERSION, ok), ok:ok,, m4_fatal(AC_INIT should be called with package and version arguments))dnl AC_SUBST(PACKAGE, 'AC_PACKAGE_TARNAME')dnl @@ -1424,6 +1468,20 @@ m4_define(AC_PROG_OBJCXX, m4_defn(AC_PROG_OBJCXX)_AM_DEPENDENCIES(OBJCXX)))dnl )
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/bootstrap.in -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/bootstrap.in
Changed
@@ -10,7 +10,7 @@ # Copyright (C) 2010-2019 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# <https://opensource.org/license/MIT>, and GPL version 3 or later +# <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE`
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/compile -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/compile
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2022 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -256,6 +256,7 @@ exit $? ;; cl | */\\cl | cl.exe | */\\cl.exe | \ + clang-cl | */\\clang-cl | clang-cl.exe | */\\clang-cl.exe | \ icl | */\\icl | icl.exe | */\\icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/config.guess -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/config.guess
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2020-08-17' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-08-01' # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,11 +29,19 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2022 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." @@ -84,6 +94,9 @@ exit 1 fi +# Just in case it came from the environment. +GUESS= + # 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 @@ -102,7 +115,7 @@ # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { 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" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -112,7 +125,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -133,14 +146,12 @@ 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_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,24 +160,37 @@ LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if "$LIBC" = unknown && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if "$LIBC" = unknown ; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -178,12 +202,12 @@ # # 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=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -192,13 +216,13 @@ earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv0-9\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-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) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -219,7 +243,7 @@ ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv0-9/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -230,7 +254,7 @@ # 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 + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -241,51 +265,57 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/config.sub -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/config.sub
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2020-08-17' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-08-01' # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,7 +76,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2022 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." @@ -112,9 +121,11 @@ # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF +IFS=$saved_IFS # Separate into logical components for further validation case $1 in @@ -163,6 +174,10 @@ basic_machine=$field1 basic_os=$field2 ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun234* \ @@ -922,9 +937,11 @@ *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read cpu vendor <<EOF $basic_machine EOF + IFS=$saved_IFS ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -1003,6 +1020,11 @@ ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull @@ -1104,7 +1126,7 @@ xscale-* | xscaleebl-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-*) + arm64-* | aarch64le-*) cpu=aarch64 ;; @@ -1165,7 +1187,7 @@ | alphapca567 | alpha64pca567 \ | am33_2.0 \ | amdgcn \ - | arc | arceb \ + | arc | arceb | arc32 | arc64 \ | arm | armlbe | armelb | armv* \ | avr | avr32 \ | asmjs \ @@ -1185,6 +1207,7 @@ | k1om \ | le32 | le64 \ | lm32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m6800123460 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ @@ -1203,9 +1226,13 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ @@ -1229,7 +1256,7 @@ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | pru \ | pyramid \ - | riscv | riscv32 | riscv64 \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | rl78 | romp | rs6000 | rx \ | s390 | s390x \ | score \ @@ -1241,6 +1268,7 @@ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ + | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ @@ -1281,31 +1309,37 @@ if test x$basic_os != x then -# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux - os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'` + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto - os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'` + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read kernel os <<EOF $basic_os EOF + IFS=$saved_IFS ;; # Default OS when just kernel was specified nto*) kernel=nto - os=`echo $basic_os | sed -e 's|nto|qnx|'` + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` ;; linux*) kernel=linux - os=`echo $basic_os | sed -e 's|linux|gnu|'` + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; *) kernel= @@ -1326,7 +1360,7 @@ os=cnk ;;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/depcomp -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/depcomp
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2022 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 @@ -113,7 +113,6 @@ # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/extract-trace -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/extract-trace
Changed
@@ -9,7 +9,7 @@ # Copyright (C) 2010-2019 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# <https://opensource.org/license/MIT>, and GPL version 3 or later +# <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE`
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/funclib.sh -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/funclib.sh
Changed
@@ -10,7 +10,7 @@ # Copyright (C) 2004-2019 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# <https://opensource.org/license/MIT>, and GPL version 3 or later +# <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE`
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/inline-source -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/inline-source
Changed
@@ -9,7 +9,7 @@ # Copyright (C) 2012-2019 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# <https://opensource.org/license/MIT>, and GPL version 3 or later +# <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE`
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/install-sh -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/install-sh
Changed
@@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-07-26.22; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -73,6 +73,7 @@ # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -103,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve 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. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -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 + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -141,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -259,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -473,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -487,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/ltmain.sh -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/ltmain.sh
Changed
@@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 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. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-14" -package_revision=2.4.6 +VERSION="2.4.7 Debian-2.4.7-5" +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 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. - -# 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 3 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES 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 <http://www.gnu.org/licenses/>. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## @@ -139,9 +130,12 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ s/\\(^$_G_bs\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ } -# func_quote_for_eval ARG...
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/mdate-sh -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/mdate-sh
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1995-2020 Free Software Foundation, Inc. +# Copyright (C) 1995-2022 Free Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/missing -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/missing
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/options-parser -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/options-parser
Changed
@@ -9,7 +9,7 @@ # Copyright (C) 2010-2019 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# <https://opensource.org/license/MIT>, and GPL version 3 or later +# <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE`
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/test-driver -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/test-driver
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 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 @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - --expect-failure={yes|no} --color-tests={yes|no} - --enable-hard-errors={yes|no} -- + test-driver --test-name NAME --log-file PATH --trs-file PATH + --expect-failure {yes|no} --color-tests {yes|no} + --enable-hard-errors {yes|no} -- TEST-SCRIPT TEST-SCRIPT-ARGUMENTS + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name"
View file
_service:tar_scm:enchant-2.3.3.tar.gz/build-aux/texinfo.tex -> _service:tar_scm:enchant-2.5.0.tar.gz/build-aux/texinfo.tex
Changed
@@ -3,9 +3,9 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2020-06-25.17} +\def\texinfoversion{2022-09-15.17} % -% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -241,9 +241,6 @@ % \def\finalout{\overfullrule=0pt } -\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines -\newdimen\topandbottommargin \topandbottommargin=.75in - % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. @@ -572,9 +569,8 @@ \fi } -% @end foo executes the definition of \Efoo. -% But first, it executes a specialized version of \checkenv -% + +% @end foo calls \checkenv and executes the definition of \Efoo. \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else @@ -726,32 +722,22 @@ \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 - % - % Do a \strut just to make the height of this box be normal, so the - % normal leading is inserted relative to the preceding line. - % And a page break here is fine. - \vtop to #1\mil{\strut\vfil}% - % - % TeX does not even consider page breaks if a penalty added to the - % main vertical list is 10000 or more. But in order to see if the - % empty box we just added fits on the page, we must make it consider - % page breaks. On the other hand, we don't want to actually break the - % page after the empty box. So we use a penalty of 9999. - % - % There is an extremely small chance that TeX will actually break the - % page at this \penalty, if there are no other feasible breakpoints in - % sight. (If the user is using lots of big @group commands, which - % almost-but-not-quite fill up a page, TeX will have a hard time doing - % good page breaking, for example.) However, I could not construct an - % example where a page broke at this \penalty; if it happens in a real - % document, then we can reconsider our strategy. + % This is similar to the 'needspace' module in LaTeX. + % The first penalty allows a break if the end of the page is + % not too far away. Following penalties and skips are discarded. + % Otherwise, require at least \dimen0 of vertical space. + % + % (We used to use a \vtop to reserve space, but this had spacing issues + % when followed by a section heading, as it was not a "discardable item". + % This also has the benefit of providing glue before the page break if + % there isn't enough space.) + \vskip0pt plus \dimen0 + \penalty-100 + \vskip0pt plus -\dimen0 + \vskip \dimen0 \penalty9999 - % - % Back up by the size of the box, whether we did a page break or not. - \kern -#1\mil - % - % Do not allow a page break right after this kern. - \nobreak + \vskip -\dimen0 + \penalty0\relax % this hides the above glue from \safewhatsit and \dobreak \fi } @@ -1003,6 +989,14 @@ \global\everypar = {}% } +% leave vertical mode without cancelling any first paragraph indent +\gdef\imageindent{% + \toks0=\everypar + \everypar={}% + \ptexnoindent + \global\everypar=\toks0 +} + % @refill is a no-op. \let\refill=\relax @@ -1863,19 +1857,23 @@ \closein 1 \endgroup % - \def\xetexpdfext{pdf}% - \ifx\xeteximgext\xetexpdfext - \XeTeXpdffile "#1".\xeteximgext "" - \else - \def\xetexpdfext{PDF}% + % Putting an \hbox around the image can prevent an over-long line + % after the image. + \hbox\bgroup + \def\xetexpdfext{pdf}% \ifx\xeteximgext\xetexpdfext \XeTeXpdffile "#1".\xeteximgext "" \else - \XeTeXpicfile "#1".\xeteximgext "" + \def\xetexpdfext{PDF}% + \ifx\xeteximgext\xetexpdfext + \XeTeXpdffile "#1".\xeteximgext "" + \else + \XeTeXpicfile "#1".\xeteximgext "" + \fi \fi - \fi - \ifdim \wd0 >0pt width \xeteximagewidth \fi - \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \ifdim \wd0 >0pt width \xeteximagewidth \fi + \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \egroup } \fi @@ -2547,7 +2545,7 @@ \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} -\def\tt{\fam=\ttfam \setfontstyle{tt}}\def\ttstylename{tt} +\def\tt{\fam=\ttfam \setfontstyle{tt}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. @@ -2673,8 +2671,6 @@ \definetextfontsizexi -\message{markup,} - % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have @@ -2682,68 +2678,22 @@ % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } -% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will -% define and register \INITMACRO to be called on markup style changes. -% \INITMACRO can check \currentmarkupstyle for the innermost -% style. - -\let\currentmarkupstyle\empty - -\def\setupmarkupstyle#1{% - \def\currentmarkupstyle{#1}% - \markupstylesetup -} - -\let\markupstylesetup\empty - -\def\defmarkupstylesetup#1{% - \expandafter\def\expandafter\markupstylesetup - \expandafter{\markupstylesetup #1}% - \def#1% +% Check if internal flag is clear, i.e. has not been @set. +\def\ifflagclear#1#2#3{% + \expandafter\ifx\csname SET#1\endcsname\relax + #2\else#3\fi } -% Markup style setup for left and right quotes. -\defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp - \csname markupsetuplq\currentmarkupstyle\endcsname - \ifx\temp\relax \markupsetuplqdefault \else \temp \fi -} -\defmarkupstylesetup\markupsetuprq{% - \expandafter\let\expandafter \temp - \csname markupsetuprq\currentmarkupstyle\endcsname - \ifx\temp\relax \markupsetuprqdefault \else \temp \fi -} { \catcode`\'=\active \catcode`\`=\active -\gdef\markupsetuplqdefault{\let`\lq} -\gdef\markupsetuprqdefault{\let'\rq} - -\gdef\markupsetcodequoteleft{\let`\codequoteleft} -\gdef\markupsetcodequoteright{\let'\codequoteright} +\gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright} +\gdef\setregularquotes{\let`\lq \let'\rq}
View file
_service:tar_scm:enchant-2.3.3.tar.gz/config.h.in -> _service:tar_scm:enchant-2.5.0.tar.gz/config.h.in
Changed
@@ -1,5 +1,20 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to the number of bits in type 'ptrdiff_t'. */ +#undef BITSIZEOF_PTRDIFF_T + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#undef BITSIZEOF_SIG_ATOMIC_T + +/* Define to the number of bits in type 'size_t'. */ +#undef BITSIZEOF_SIZE_T + +/* Define to the number of bits in type 'wchar_t'. */ +#undef BITSIZEOF_WCHAR_T + +/* Define to the number of bits in type 'wint_t'. */ +#undef BITSIZEOF_WINT_T + /* Define to 1 if the package shall run at any location in the file system. */ #undef ENABLE_RELOCATABLE @@ -7,27 +22,36 @@ whether the gnulib module msvc-nothrow shall be considered present. */ #undef GNULIB_MSVC_NOTHROW -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#undef GNULIB_TEST_GETOPT_POSIX - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#undef GNULIB_TEST_MALLOC_POSIX - /* Define to 1 when the gnulib module rawmemchr should be tested. */ #undef GNULIB_TEST_RAWMEMCHR /* Define to 1 when the gnulib module strchrnul should be tested. */ #undef GNULIB_TEST_STRCHRNUL -/* Define to 1 when the gnulib module strdup should be tested. */ -#undef GNULIB_TEST_STRDUP - /* define if the compiler supports basic C++11 syntax */ #undef HAVE_CXX11 -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. +/* Define to 1 if the alignas and alignof keywords work. */ +#undef HAVE_C_ALIGNASOF + +/* Define to 1 if the static_assert keyword works. */ +#undef HAVE_C_STATIC_ASSERT + +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. */ -#undef HAVE_DECL_STRDUP +#undef HAVE_DECL_ECVT + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#undef HAVE_DECL_EXECVPE + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#undef HAVE_DECL_FCVT + +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#undef HAVE_DECL_GCVT /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H @@ -38,12 +62,6 @@ /* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK -/* Define to 1 if you have the <getopt.h> header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getopt_long_only' function. */ -#undef HAVE_GETOPT_LONG_ONLY - /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H @@ -59,14 +77,17 @@ /* Define to 1 if you have the `hspell' library (-lhspell). */ #undef HAVE_LIBHSPELL +/* Define to 1 if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + /* Define to 1 if you have the <locale.h> header file. */ #undef HAVE_LOCALE_H -/* Define if the 'malloc' function is POSIX compliant. */ -#undef HAVE_MALLOC_POSIX +/* Define to 1 if the system has the type 'long long int'. */ +#undef HAVE_LONG_LONG_INT -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the <minix/config.h> header file. */ +#undef HAVE_MINIX_CONFIG_H /* Define to 1 on MSVC platforms that have the "invalid parameter handler" concept. */ @@ -75,9 +96,21 @@ /* Define to 1 if you have the `rawmemchr' function. */ #undef HAVE_RAWMEMCHR +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#undef HAVE_SIGNED_SIG_ATOMIC_T + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +#undef HAVE_SIGNED_WCHAR_T + +/* Define to 1 if 'wint_t' is a signed integer type. */ +#undef HAVE_SIGNED_WINT_T + /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -93,12 +126,15 @@ /* Define to 1 if `l_type' is a member of `struct flock'. */ #undef HAVE_STRUCT_FLOCK_L_TYPE -/* Define to 1 if you have the <sys/cdefs.h> header file. */ -#undef HAVE_SYS_CDEFS_H +/* Define to 1 if you have the <sys/bitypes.h> header file. */ +#undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H +/* Define to 1 if you have the <sys/inttypes.h> header file. */ +#undef HAVE_SYS_INTTYPES_H + /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H @@ -108,12 +144,129 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + +/* Define to 1 if you have the <wchar.h> header file. */ +#undef HAVE_WCHAR_H + /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T +/* Define if you have the 'wint_t' type. */ +#undef HAVE_WINT_T + /* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ #undef HAVE__SET_INVALID_PARAMETER_HANDLER +/* Define to 1 if ctype.h defines __header_inline. */ +#undef HAVE___HEADER_INLINE + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>. + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like <ctype.h>. For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see <https://trac.macports.org/ticket/41033>. + Assume DragonFly and FreeBSD will be similar. +
View file
_service:tar_scm:enchant-2.3.3.tar.gz/configure -> _service:tar_scm:enchant-2.5.0.tar.gz/configure
Changed
@@ -1,9 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for enchant 2.3.3. +# Generated by GNU Autoconf 2.71 for enchant 2.5.0. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -14,14 +15,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (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 +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -31,46 +34,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. 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 +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -79,13 +82,6 @@ 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. as_myself= case $0 in #(( @@ -94,8 +90,12 @@ 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -107,30 +107,10 @@ 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 + printf "%s\n" "$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 # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -152,20 +132,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (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 +else \$as_nop case \`(set -o) 2>/dev/null\` in #(
View file
_service:tar_scm:enchant-2.3.3.tar.gz/configure.ac -> _service:tar_scm:enchant-2.5.0.tar.gz/configure.ac
Changed
@@ -1,4 +1,5 @@ -AC_INIT(enchant,2.3.3) +AC_PREREQ(2.71) +AC_INIT(enchant,2.5.0) AC_CONFIG_SRCDIR(src/enchant.h) AC_CONFIG_AUX_DIR(build-aux) AM_INIT_AUTOMAKE(subdir-objects) @@ -36,17 +37,12 @@ AC_SUBST(ENCHANT_MICRO_VERSION) dnl Checks for programs. -AC_PROG_CC_C99 -AS_IF(test "$ac_cv_prog_cc_c99" = no, - AC_MSG_ERROR(A C99 or later compiler is required)) +AC_PROG_CC gl_EARLY AC_PROG_CXX AX_CXX_COMPILE_STDCXX(11) AC_PROG_OBJCXX -AC_PROG_INSTALL -AC_PROG_LN_S AC_PROG_MKDIR_P -AC_HEADER_STDC LT_INIT(win32-dll) LT_LANG(Windows Resource) gl_INIT @@ -73,12 +69,6 @@ dnl Set up the list of undesired warnings. nw= nw="$nw -Wsystem-headers" # Don’t let system headers trigger warnings - nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF - nw="$nw -Wtraditional" # All compilers nowadays support ANSI C - nw="$nw -Wdeclaration-after-statement" # We require C99. - nw="$nw -Wstrict-overflow" # Use a lower level (see below). - nw="$nw -Wconversion" # These warnings usually don’t point to mistakes. - nw="$nw -Wsign-conversion" # Likewise. nw="$nw -Wimplicit-fallthrough=5" # We want to allow "fallthrough" comments. nw="$nw -Wold-style-cast" # Warning from glib macros like g_new0 nw="$nw -Wuseless-cast" # Likewise @@ -101,11 +91,6 @@ done AC_LANG_POP - dnl Add an extra warning - gl_WARN_ADD(-Wstrict-overflow=1) - dnl Remove a warning being promoted to error: we trigger this and can't turn it off with pragmas. - gl_WARN_ADD(-Wno-error=format-security) - # When compiling with GCC, prefer -isystem to -I when including system # include files, to avoid generating useless diagnostics for the files. ISYSTEM='-isystem ' @@ -114,13 +99,6 @@ fi AC_SUBST(ISYSTEM) -# FIXME: Use just GLIB_CFLAGS, GLIB_LIBS -ENCHANT_CFLAGS=$GLIB_CFLAGS -ENCHANT_LIBS=$GLIB_LIBS - -AC_SUBST(ENCHANT_CFLAGS) -AC_SUBST(ENCHANT_LIBS) - AC_MSG_CHECKING(for native Win32) native_win32=no case "$host" in @@ -129,7 +107,7 @@ ;; esac AC_MSG_RESULT($native_win32) -AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes") +AM_CONDITIONAL(OS_WIN32, test "$native_win32" = yes) AM_CONDITIONAL(SHLIBS_IN_BINDIR, case "$host_os" in mingw* | cygwin*) true;; *) false;; esac) @@ -150,10 +128,10 @@ GLIB_LC_MESSAGES AC_LANG_PUSH(C++) +dnl FIXME: we need UnitTest++ >= 1.6, but adding the version check breaks +dnl the Windows build: https://github.com/msys2/MINGW-packages/issues/17297 PKG_CHECK_EXISTS(UnitTest++, PKG_CHECK_MODULES(UNITTESTPP, UnitTest++)) -AC_SUBST(UNITTESTPP_CFLAGS) -AC_SUBST(UNITTESTPP_LIBS) AC_LANG_POP(C++) @@ -169,25 +147,25 @@ AC_ARG_WITH($1-dir, AS_HELP_STRING(--with-$1-dir=PATH, path to installed $1 dicts)) - AS_IF(test "x$with_$1_dir" != "x", + AS_IF(test "$with_$1_dir" != "", $1_dir=$with_$1_dir)) AC_DEFUN(ENCHANT_CHECK_PKG_CONFIG_PROVIDER, ENCHANT_CHECK_PROVIDER_SETUP($1, $4) - AS_IF(test "x$with_$1" != xno, + AS_IF(test "$with_$1" != no, PKG_CHECK_MODULES($2, m4_default($3, $1), $2_CFLAGS="$$2_CFLAGS -DENCHANT_$2_DICT_DIR='\"$$1_dir\"'" with_$1=yes build_providers="$build_providers $1", - if test "x$with_$1" != xcheck; then + if test "$with_$1" != check; then AC_MSG_FAILURE(--with-$1 was given, but test(s) for $1 failed) fi with_$1=no)) - AM_CONDITIONAL(WITH_$2, test "x$with_$1" = xyes)) + AM_CONDITIONAL(WITH_$2, test "$with_$1" = yes)) AC_DEFUN(ENCHANT_CHECK_LIB_PROVIDER, ENCHANT_CHECK_PROVIDER_SETUP($1, $4) - AS_IF(test "x$with_$1" != xno, + AS_IF(test "$with_$1" != no, _enchant_header=m4_default($6, $1.h) AC_CHECK_HEADERS($_enchant_header, _header_found=yes, _header_found=no, ) if test "$3" != NOLIB; then @@ -195,8 +173,8 @@ else ac_cv_lib_$1_$3=yes fi - if test "x$_header_found" != xyes -o "x$ac_cv_lib_$1_$3" != xyes; then - if test "x$with_$1" != xcheck; then + if test "$_header_found" != yes -o "$ac_cv_lib_$1_$3" != yes; then + if test "$with_$1" != check; then AC_MSG_FAILURE(--with-$1 was given, but tests for $1 failed) fi with_$1=no @@ -205,7 +183,7 @@ build_providers="$build_providers $1" LIBS="$LIBS $5" fi) - AM_CONDITIONAL(WITH_$2, test "x$with_$1" = xyes)) + AM_CONDITIONAL(WITH_$2, test "$with_$1" = yes)) dnl Check for providers @@ -225,7 +203,7 @@ AC_LANG_POP(Objective C++) fi dnl Must call AM_CONDITIONAL outside conditional -AM_CONDITIONAL(WITH_APPLESPELL, test "x$with_applespell" = xyes) +AM_CONDITIONAL(WITH_APPLESPELL, test "$with_applespell" = yes) dnl Experimental/deprecated providers ENCHANT_CHECK_PKG_CONFIG_PROVIDER(zemberek, ZEMBEREK, dbus-glib-1 >= 0.62, no) @@ -241,9 +219,9 @@ src/Makefile src/enchant.1 src/enchant-lsmod.1 +src/enchant.5 providers/Makefile tests/Makefile -tests/enchant_providers/Makefile , , ENCHANT_MAJOR_VERSION="$ENCHANT_MAJOR_VERSION") AC_OUTPUT @@ -251,11 +229,11 @@ dnl =========================================================================================== echo "Providers to build:${build_providers}" -if test "x$build_providers" = "x"; then +if test "$build_providers" = ""; then AC_MSG_WARN(No spell-checking provider selected!) fi -if test "x$with_zemberek" = "xyes"; then +if test "$with_zemberek" = yes; then echo " The Zemberek Turkish spell-checking plugin is enabled. It is known to cause crashes with WebKit. Use at your own discretion." @@ -263,3 +241,6 @@ if test $RELOCATABLE != yes; then AC_MSG_WARN(Building without --enable-relocatable: the tests will not work!) fi +if test "$datadir" != '${datarootdir}'; then + AC_MSG_WARN(--datadir set: the tests will not work!) +fi
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/Makefile.gnulib -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/Makefile.gnulib
Changed
@@ -1,10 +1,10 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -35,17 +35,12 @@ # --libtool \ # --macro-prefix=gl \ # bootstrap \ -# c99 \ # configmake \ # flock \ -# getopt-posix \ # gnu-make \ # manywarnings \ # relocatable-lib-lgpl \ -# snippet/unused-parameter \ -# ssize_t \ -# strchrnul \ -# strdup-posix +# strchrnul MOSTLYCLEANFILES += core *.stackdump @@ -54,12 +49,12 @@ noinst_LTLIBRARIES += libgnu.la libgnu_la_SOURCES = +libgnu_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) libgnu_la_LIBADD = $(gl_LTLIBOBJS) libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = libgnu_la_LDFLAGS = $(AM_LDFLAGS) libgnu_la_LDFLAGS += -no-undefined -libgnu_la_LDFLAGS += $(LTLIBINTL) ## begin gnulib module absolute-header @@ -70,6 +65,37 @@ ## end gnulib module absolute-header +## begin gnulib module assert-h + +BUILT_SOURCES += $(ASSERT_H) + +# We need the following in order to create <assert.h> when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_ASSERT_H +assert.h: assert.in.h verify.h $(top_builddir)/config.status + $(gl_V_at){ $(SED_HEADER_STDOUT) \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \ + < $(srcdir)/assert.in.h && \ + sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \ + -e 's|_gl_verify|_gl_static_assert|g' \ + -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \ + -e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \ + < $(srcdir)/verify.h; \ + } > $@-t + $(AM_V_at)mv $@-t $@ +else +assert.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += assert.h assert.h-t + +EXTRA_DIST += assert.in.h verify.h + +## end gnulib module assert-h + ## begin gnulib module bootstrap @@ -84,8 +110,7 @@ # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + $(gl_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#if HAVE_WINSOCK2_H'; \ echo '# include <winsock2.h> /* avoid mingw pollution on DATADIR */'; \ echo '#endif'; \ @@ -117,8 +142,8 @@ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - mv -f $@-t $@ + } | sed '/""/d' > $@-t + $(AM_V_at)mv $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t @@ -134,10 +159,9 @@ ## begin gnulib module flock - -EXTRA_DIST += flock.c - -EXTRA_libgnu_la_SOURCES += flock.c +if GL_COND_OBJ_FLOCK +libgnu_la_SOURCES += flock.c +endif ## end gnulib module flock @@ -148,47 +172,24 @@ ## end gnulib module funclib.sh -## begin gnulib module getopt-posix +## begin gnulib module gen-header -BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) +# In 'sed', replace the pattern space with a "DO NOT EDIT" comment. +SED_HEADER_NOEDIT = s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */, -# We need the following in order to create <getopt.h> when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ - < $(srcdir)/getopt-cdefs.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t - -EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h - -EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c +# '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT". +SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e 1G -## end gnulib module getopt-posix +# '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading +# "DO_NOT_EDIT". Although this could be done more simply via: +# SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t +# the -n and 'w' avoid a fork+exec, at least when GNU Make is used. +SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t' -## begin gnulib module gettext-h +# Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that +gl_V_at = $(AM_V_GEN) -libgnu_la_SOURCES += gettext.h - -## end gnulib module gettext-h +## end gnulib module gen-header ## begin gnulib module gnu-make @@ -210,30 +211,49 @@ ## end gnulib module inline-source -## begin gnulib module malloc-posix +## begin gnulib module limits-h +BUILT_SOURCES += $(LIMITS_H) -EXTRA_DIST += malloc.c +# We need the following in order to create <limits.h> when the system +# doesn't have one that is compatible with GNU. +if GL_GENERATE_LIMITS_H +limits.h: limits.in.h $(top_builddir)/config.status + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/Makefile.in -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,11 +14,11 @@ @SET_MAKE@ -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -49,17 +49,12 @@ # --libtool \ # --macro-prefix=gl \ # bootstrap \ -# c99 \ # configmake \ # flock \ -# getopt-posix \ # gnu-make \ # manywarnings \ # relocatable-lib-lgpl \ -# snippet/unused-parameter \ -# ssize_t \ -# strchrnul \ -# strdup-posix +# strchrnul VPATH = @srcdir@ am__is_gnu_make = { \ @@ -136,35 +131,40 @@ host_triplet = @host@ @SHLIBS_IN_BINDIR_TRUE@am__append_1 = -DINSTALLDIR=\"$(bindir)\" @SHLIBS_IN_BINDIR_FALSE@am__append_2 = -DINSTALLDIR=\"$(libdir)\" +@GL_COND_OBJ_FLOCK_TRUE@am__append_3 = flock.c +@GL_COND_OBJ_MSVC_INVAL_TRUE@am__append_4 = msvc-inval.c +@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__append_5 = msvc-nothrow.c +@GL_COND_OBJ_RAWMEMCHR_TRUE@am__append_6 = rawmemchr.c +@GL_COND_OBJ_STRCHRNUL_TRUE@am__append_7 = strchrnul.c subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/assert_h.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ + $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/manywarnings-c++.m4 \ $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -174,15 +174,25 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -am_libgnu_la_OBJECTS = unistd.lo +am__libgnu_la_SOURCES_DIST = flock.c msvc-inval.c msvc-nothrow.c \ + rawmemchr.c strchrnul.c unistd.c +@GL_COND_OBJ_FLOCK_TRUE@am__objects_1 = libgnu_la-flock.lo +@GL_COND_OBJ_MSVC_INVAL_TRUE@am__objects_2 = libgnu_la-msvc-inval.lo +@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__objects_3 = \ +@GL_COND_OBJ_MSVC_NOTHROW_TRUE@ libgnu_la-msvc-nothrow.lo +@GL_COND_OBJ_RAWMEMCHR_TRUE@am__objects_4 = libgnu_la-rawmemchr.lo +@GL_COND_OBJ_STRCHRNUL_TRUE@am__objects_5 = libgnu_la-strchrnul.lo +am_libgnu_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) \ + libgnu_la-unistd.lo libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgnu_la_CFLAGS) \ + $(CFLAGS) $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -198,12 +208,13 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/flock.Plo ./$(DEPDIR)/getopt.Plo \ - ./$(DEPDIR)/getopt1.Plo ./$(DEPDIR)/malloc.Plo \ - ./$(DEPDIR)/msvc-inval.Plo ./$(DEPDIR)/msvc-nothrow.Plo \ - ./$(DEPDIR)/rawmemchr.Plo ./$(DEPDIR)/relocatable.Plo \ - ./$(DEPDIR)/strchrnul.Plo ./$(DEPDIR)/strdup.Plo \ - ./$(DEPDIR)/unistd.Plo +am__depfiles_remade = ./$(DEPDIR)/libgnu_la-flock.Plo \ + ./$(DEPDIR)/libgnu_la-msvc-inval.Plo \ + ./$(DEPDIR)/libgnu_la-msvc-nothrow.Plo \ + ./$(DEPDIR)/libgnu_la-rawmemchr.Plo \ + ./$(DEPDIR)/libgnu_la-relocatable.Plo \ + ./$(DEPDIR)/libgnu_la-strchrnul.Plo \ + ./$(DEPDIR)/libgnu_la-unistd.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -224,7 +235,8 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) -DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) +DIST_SOURCES = $(am__libgnu_la_SOURCES_DIST) \ + $(EXTRA_libgnu_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -247,8 +259,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.gnulib $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -256,18 +266,27 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ +ASSERT_H = @ASSERT_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -282,158 +301,209 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ENCHANT_CFLAGS = @ENCHANT_CFLAGS@ -ENCHANT_LIBS = @ENCHANT_LIBS@ ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@ ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/_Noreturn.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/_Noreturn.h
Changed
@@ -1,5 +1,5 @@ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -26,14 +26,16 @@ AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn noreturn -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/arg-nonnull.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/arg-nonnull.h
Changed
@@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published
View file
_service:tar_scm:enchant-2.5.0.tar.gz/lib/assert.in.h
Added
@@ -0,0 +1,27 @@ +/* Substitute for and wrapper around <assert.h> + Copyright (C) 2011-2022 Free Software Foundation, Inc. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + +/* Do not guard the include, since <assert.h> is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#@INCLUDE_NEXT@ @NEXT_ASSERT_H@ + +/* The definition of static_assert is copied here. */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/c++defs.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/c++defs.h
Changed
@@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -181,6 +181,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/flock.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/flock.c
Changed
@@ -6,7 +6,7 @@ Written by Richard W.M. Jones <rjones.at.redhat.com> - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
View file
_service:tar_scm:enchant-2.5.0.tar.gz/lib/limits.in.h
Added
@@ -0,0 +1,131 @@ +/* A GNU-like <limits.h>. + + Copyright 2016-2022 Free Software Foundation, Inc. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined _GL_ALREADY_INCLUDING_LIMITS_H +/* Special invocation convention: + On Haiku/x86_64, we have a sequence of nested includes + <limits.h> -> <syslimits.h> -> <limits.h>. + In this situation, LONG_MAX and INT_MAX are not yet defined, + therefore we should not attempt to define LONG_BIT. */ + +#@INCLUDE_NEXT@ @NEXT_LIMITS_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_LIMITS_H + +# define _GL_ALREADY_INCLUDING_LIMITS_H + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_LIMITS_H@ + +# undef _GL_ALREADY_INCLUDING_LIMITS_H + +#ifndef _@GUARD_PREFIX@_LIMITS_H +#define _@GUARD_PREFIX@_LIMITS_H + +#ifndef LLONG_MIN +# if defined LONG_LONG_MIN /* HP-UX 11.31 */ +# define LLONG_MIN LONG_LONG_MIN +# elif defined LONGLONG_MIN /* IRIX 6.5 */ +# define LLONG_MIN LONGLONG_MIN +# elif defined __GNUC__ +# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) +# endif +#endif +#ifndef LLONG_MAX +# if defined LONG_LONG_MAX /* HP-UX 11.31 */ +# define LLONG_MAX LONG_LONG_MAX +# elif defined LONGLONG_MAX /* IRIX 6.5 */ +# define LLONG_MAX LONGLONG_MAX +# elif defined __GNUC__ +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +#endif +#ifndef ULLONG_MAX +# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ +# define ULLONG_MAX ULONG_LONG_MAX +# elif defined ULONGLONG_MAX /* IRIX 6.5 */ +# define ULLONG_MAX ULONGLONG_MAX +# elif defined __GNUC__ +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +# endif +#endif + +/* The number of usable bits in an unsigned or signed integer type + with minimum value MIN and maximum value MAX, as an int expression + suitable in #if. Cover all known practical hosts. This + implementation exploits the fact that MAX is 1 less than a power of + 2, and merely counts the number of 1 bits in MAX; "COBn" means + "count the number of 1 bits in the low-order n bits"). */ +#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) +#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) +#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) +#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) +#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) +#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) +#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) + +#ifndef WORD_BIT +/* Assume 'int' is 32 bits wide. */ +# define WORD_BIT 32 +#endif +#ifndef LONG_BIT +/* Assume 'long' is 32 or 64 bits wide. */ +# if LONG_MAX == INT_MAX +# define LONG_BIT 32 +# else +# define LONG_BIT 64 +# endif +#endif + +/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */ + +#if (! defined ULLONG_WIDTH \ + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) +# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) +# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) +# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) +# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) +# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) +# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) +# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) +# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) +# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) +# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) +# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) +#endif + +/* Macros specified by C2x. */ + +#if (! defined BOOL_WIDTH \ + && (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) +# define BOOL_MAX 1 +# define BOOL_WIDTH 1 +#endif + +#endif /* _@GUARD_PREFIX@_LIMITS_H */ +#endif /* _@GUARD_PREFIX@_LIMITS_H */ +#endif
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/msvc-inval.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/msvc-inval.c
Changed
@@ -1,18 +1,18 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h>
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/msvc-inval.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/msvc-inval.h
Changed
@@ -1,18 +1,18 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef _MSVC_INVAL_H #define _MSVC_INVAL_H
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/msvc-nothrow.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/msvc-nothrow.c
Changed
@@ -1,19 +1,19 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h>
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/msvc-nothrow.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/msvc-nothrow.h
Changed
@@ -1,19 +1,19 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef _MSVC_NOTHROW_H #define _MSVC_NOTHROW_H
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/rawmemchr.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/rawmemchr.c
Changed
@@ -1,12 +1,12 @@ /* Searching in a string. - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. - This program 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 3 of the License, or - (at your option) any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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. @@ -19,68 +19,55 @@ /* Specification. */ #include <string.h> +/* A function definition is only needed if HAVE_RAWMEMCHR is not defined. */ +#if !HAVE_RAWMEMCHR + +# include <limits.h> +# include <stdint.h> + + /* Find the first occurrence of C in S. */ void * rawmemchr (const void *s, int c_in) { - /* On 32-bit hardware, choosing longword to be a 32-bit unsigned - long instead of a 64-bit uintmax_t tends to give better - performance. On 64-bit hardware, unsigned long is generally 64 - bits already. Change this typedef to experiment with - performance. */ - typedef unsigned long int longword; + /* Change this typedef to experiment with performance. */ + typedef uintptr_t longword; + /* If you change the "uintptr_t", you should change UINTPTR_WIDTH to match. + This verifies that the type does not have padding bits. */ + static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword)); const unsigned char *char_ptr; - const longword *longword_ptr; - longword repeated_one; - longword repeated_c; - unsigned char c; - - c = (unsigned char) c_in; + unsigned char c = c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; - (size_t) char_ptr % sizeof (longword) != 0; + (uintptr_t) char_ptr % alignof (longword) != 0; ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; - longword_ptr = (const longword *) char_ptr; - - /* All these elucidatory comments refer to 4-byte longwords, - but the theory applies equally well to any size longwords. */ + longword const *longword_ptr = s = char_ptr; /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ - repeated_one = 0x01010101; - repeated_c = c | (c << 8); - repeated_c |= repeated_c << 16; - if (0xffffffffU < (longword) -1) - { - repeated_one |= repeated_one << 31 << 1; - repeated_c |= repeated_c << 31 << 1; - if (8 < sizeof (longword)) - { - size_t i; - - for (i = 64; i < sizeof (longword) * 8; i *= 2) - { - repeated_one |= repeated_one << i; - repeated_c |= repeated_c << i; - } - } - } + longword repeated_one = (longword) -1 / UCHAR_MAX; + longword repeated_c = repeated_one * c; + longword repeated_hibit = repeated_one * (UCHAR_MAX / 2 + 1); /* Instead of the traditional loop which tests each byte, we will - test a longword at a time. The tricky part is testing if *any of - the four* bytes in the longword in question are equal to NUL or + test a longword at a time. The tricky part is testing if any of + the bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task - to testing whether *any of the four* bytes in longword1 is zero. + to testing whether any of the bytes in longword1 is zero. + + (The following comments assume 8-bit bytes, as POSIX requires; + the code's use of UCHAR_MAX should work even if bytes have more + than 8 bits.) We compute tmp = - ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). + ((longword1 - repeated_one) & ~longword1) & (repeated_one * 0x80). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. @@ -114,23 +101,23 @@ { longword longword1 = *longword_ptr ^ repeated_c; - if ((((longword1 - repeated_one) & ~longword1) - & (repeated_one << 7)) != 0) + if ((((longword1 - repeated_one) & ~longword1) & repeated_hibit) != 0) break; longword_ptr++; } - char_ptr = (const unsigned char *) longword_ptr; + char_ptr = s = longword_ptr; /* At this point, we know that one of the sizeof (longword) bytes - starting at char_ptr is == c. On little-endian machines, we + starting at char_ptr is == c. If we knew endianness, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop - iteration. But this does not work on big-endian machines. - Choose code that works in both cases. */ + iteration. However, the following simple and portable code does + not attempt this potential optimization. */ - char_ptr = (unsigned char *) longword_ptr; while (*char_ptr != c) char_ptr++; return (void *) char_ptr; } + +#endif
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/rawmemchr.valgrind -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/rawmemchr.valgrind
Changed
@@ -1,13 +1,13 @@ # Suppress a valgrind message about use of uninitialized memory in rawmemchr(). -# Copyright (C) 2008-2020 Free Software Foundation, Inc. +# Copyright (C) 2008-2022 Free Software Foundation, Inc. # -# This program 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 3 of the License, or -# (at your option) any later version. +# This file 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. # -# This program is distributed in the hope that it will be useful, +# This file 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.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/relocatable.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/relocatable.c
Changed
@@ -1,13 +1,13 @@ /* Provide relocatable packages. - Copyright (C) 2003-2006, 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2006, 2008-2022 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. - This program 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 3 of the License, or - (at your option) any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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. @@ -323,7 +323,10 @@ supports longer file names (see <https://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */ -/* Determine the full pathname of the shared library when it is loaded. */ +/* Determine the full pathname of the shared library when it is loaded. + + Documentation: + <https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain> */ BOOL WINAPI DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) @@ -343,7 +346,13 @@ /* Shouldn't happen. */ return FALSE; - shared_library_fullname = strdup (location); + /* Avoid a memory leak when the same DLL get attached, detached, + attached, detached, and so on. This happens e.g. when a spell + checker DLL is used repeatedly by a mail program. */ + if (!(shared_library_fullname != NULL + && strcmp (shared_library_fullname, location) == 0)) + /* Remember the full pathname of the shared library. */ + shared_library_fullname = strdup (location); } return TRUE;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/relocatable.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/relocatable.h
Changed
@@ -1,13 +1,13 @@ /* Provide relocatable packages. - Copyright (C) 2003, 2005, 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2008-2022 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. - This program 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 3 of the License, or - (at your option) any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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. @@ -18,6 +18,8 @@ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H +#include <stdlib.h> + #ifdef __cplusplus extern "C" { #endif @@ -83,7 +85,8 @@ Returns it, freshly allocated. Returns NULL upon failure. */ extern char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, - const char *curr_pathname); + const char *curr_pathname) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #else
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/relocatable.valgrind -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/relocatable.valgrind
Changed
@@ -1,13 +1,13 @@ # Suppress a valgrind message about a memory leak in relocatable.c. -# Copyright (C) 2017-2020 Free Software Foundation, Inc. +# Copyright (C) 2017-2022 Free Software Foundation, Inc. # -# This program 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 3 of the License, or -# (at your option) any later version. +# This file 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. # -# This program is distributed in the hope that it will be useful, +# This file 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.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/lib/stdalign.in.h
Added
@@ -0,0 +1,127 @@ +/* A substitute for ISO C11 <stdalign.h>. + + Copyright 2011-2022 Free Software Foundation, Inc. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C11 <stdalign.h> for platforms that lack it. + + References: + ISO C11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>) + sections 6.5.3.4, 6.7.5, 7.15. + C++11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's and clang's __alignof__ operator, which can + yield a better-performing alignment for an object of that type. For + example, on x86 with GCC and on Linux/x86 with clang, + __alignof__ (double) and __alignof__ (long long) are 8, whereas + alignof (double) and alignof (long long) are 4 unless the option + '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. + + Include <stddef.h> for offsetof. */ +#include <stddef.h> + +/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other + standard headers, defines conflicting implementations of _Alignas + and _Alignof that are no better than ours; override them. */ +#undef _Alignas +#undef _Alignof + +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. + clang versions < 8.0.0 have the same bug. */ +#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ + && !defined __clang__) \ + || (defined __clang__ && __clang_major__ < 8)) +# ifdef __cplusplus +# if 201103 <= __cplusplus +# define _Alignof(type) alignof (type) +# else + template <class __t> struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper<type>, __b) +# endif +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# endif +#endif +#if ! (defined __cplusplus && 201103 <= __cplusplus) +# define alignof _Alignof +#endif +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following C11 requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && 201103 <= __cplusplus +# define _Alignas(a) alignas (a) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <= __clang_major__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif +#endif +#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# define alignas _Alignas +#endif +#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/stddef.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/stddef.in.h
Changed
@@ -1,19 +1,19 @@ /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Eric Blake. */ @@ -42,6 +42,13 @@ # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else @@ -49,6 +56,23 @@ # ifndef _@GUARD_PREFIX@_STDDEF_H +/* On AIX 7.2, with xlc in 64-bit mode, <stddef.h> defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define GNULIB_defined_max_align_t 1 +# endif +# endif + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ @@ -86,11 +110,13 @@ we are currently compiling with gcc. On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was included. Its definition is good since it has an alignment of 8 (on x86 - and x86_64). */ -#if defined _MSC_VER && defined __cplusplus + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include <cstddef> #else -# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) +# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
View file
_service:tar_scm:enchant-2.5.0.tar.gz/lib/stdint.in.h
Added
@@ -0,0 +1,740 @@ +/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. + This file is part of gnulib. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + +/* + * ISO C 99 <stdint.h> for platforms that lack it. + * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html> + */ + +#ifndef _@GUARD_PREFIX@_STDINT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* When including a system file that in turn includes <inttypes.h>, + use the system <inttypes.h>, not our substitute. This avoids + problems with (for example) VMS, whose <sys/bitypes.h> includes + <inttypes.h>. */ +#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + +/* On Android (Bionic libc), <sys/types.h> includes this file before + having defined 'time_t'. Therefore in this case avoid including + other system header files; just include the system's <stdint.h>. + Ideally we should test __BIONIC__ here, but it is only defined after + <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */ +#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H +# @INCLUDE_NEXT@ @NEXT_STDINT_H@ +#else + +/* Get those types that are already defined in other system include + files, so that we can "#define int8_t signed char" below without + worrying about a later system include file containing a "typedef + signed char int8_t;" that will get messed up by our macro. Our + macros should all be consistent with the system versions, except + for the "fast" types and macros, which we recommend against using + in public interfaces due to compiler differences. */ + +#if @HAVE_STDINT_H@ +# if defined __sgi && ! defined __c99 + /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users + with "This header file is to be used only for c99 mode compilations" + diagnostics. */ +# define __STDINT_H__ +# endif + + /* Some pre-C++11 <stdint.h> implementations need this. */ +# ifdef __cplusplus +# ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS 1 +# endif +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +# endif +# endif + + /* Other systems may have an incomplete or buggy <stdint.h>. + Include it before <inttypes.h>, since any "#include <stdint.h>" + in <inttypes.h> would reinclude us, skipping our contents because + _@GUARD_PREFIX@_STDINT_H is defined. + The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_STDINT_H@ +#endif + +#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H +#define _@GUARD_PREFIX@_STDINT_H + +/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, + LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ +#include <limits.h> + +/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides + wint_t. */ +#if @GNULIBHEADERS_OVERRIDE_WINT_T@ +# undef WINT_MIN +# undef WINT_MAX +# define WINT_MIN 0x0U +# define WINT_MAX 0xffffffffU +#endif + +#if ! @HAVE_C99_STDINT_H@ + +/* <sys/types.h> defines some of the stdint.h types as well, on glibc, + IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). + AIX 5.2 <sys/types.h> isn't needed and causes troubles. + Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but + relies on the system <stdint.h> definitions, so include + <sys/types.h> after @NEXT_STDINT_H@. */ +# if @HAVE_SYS_TYPES_H@ && ! defined _AIX +# include <sys/types.h> +# endif + +# if @HAVE_INTTYPES_H@ + /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + <inttypes.h> also defines intptr_t and uintptr_t. */ +# include <inttypes.h> +# elif @HAVE_SYS_INTTYPES_H@ + /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and + the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ +# include <sys/inttypes.h> +# endif + +# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ + /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines + int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is + included by <sys/types.h>. */ +# include <sys/bitypes.h> +# endif + +# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + +/* Minimum and maximum values for an integer type under the usual assumption. + Return an unspecified value if BITS == 0, adding a check to pacify + picky compilers. */ + +/* These are separate macros, because if you try to merge these macros into + a single one, HP-UX cc rejects the resulting expression in constant + expressions. */ +# define _STDINT_UNSIGNED_MIN(bits, zero) \ + (zero) +# define _STDINT_SIGNED_MIN(bits, zero) \ + (~ _STDINT_MAX (1, bits, zero)) + +# define _STDINT_MAX(signed, bits, zero) \ + (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) + +#if !GNULIB_defined_stdint_types + +/* 7.18.1.1. Exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +# undef int8_t +# undef uint8_t +typedef signed char gl_int8_t; +typedef unsigned char gl_uint8_t; +# define int8_t gl_int8_t +# define uint8_t gl_uint8_t + +# undef int16_t +# undef uint16_t +typedef short int gl_int16_t; +typedef unsigned short int gl_uint16_t; +# define int16_t gl_int16_t +# define uint16_t gl_uint16_t + +# undef int32_t +# undef uint32_t +typedef int gl_int32_t; +typedef unsigned int gl_uint32_t; +# define int32_t gl_int32_t +# define uint32_t gl_uint32_t + +/* If the system defines INT64_MAX, assume int64_t works. That way, + if the underlying platform defines int64_t to be a 64-bit long long + int, the code below won't mistakenly define it to be a 64-bit long + int, which would mess up C++ name mangling. We must use #ifdef + rather than #if, to avoid an error with HP-UX 10.20 cc. */ + +# ifdef INT64_MAX +# define GL_INT64_T +# else +/* Do not undefine int64_t if gnulib is not being used with 64-bit + types, since otherwise it breaks platforms like Tandem/NSK. */ +# if LONG_MAX >> 31 >> 31 == 1 +# undef int64_t +typedef long int gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# elif defined _MSC_VER +# undef int64_t +typedef __int64 gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# else +# undef int64_t +typedef long long int gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# endif +# endif + +# ifdef UINT64_MAX
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/stdlib.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/stdlib.in.h
Changed
@@ -1,13 +1,13 @@ /* A GNU-like <stdlib.h>. - Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc. - This program 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 3 of the License, or - (at your option) any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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. @@ -53,8 +53,8 @@ # include <sys/loadavg.h> #endif -/* Native Windows platforms declare mktemp() in <io.h>. */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +/* Native Windows platforms declare _mktemp() in <io.h>. */ +#if defined _WIN32 && !defined __CYGWIN__ # include <io.h> #endif @@ -99,6 +99,35 @@ # include <unistd.h> #endif +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE @@ -149,6 +178,73 @@ #endif +#if @GNULIB_FREE_POSIX@ +# if @REPLACE_FREE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if @GNULIB_ALIGNED_ALLOC@ +# if @REPLACE_ALIGNED_ALLOC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if @HAVE_ALIGNED_ALLOC@ +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@ +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -168,24 +264,41 @@ #endif #if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ +# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \ + || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); # endif -#elif defined GNULIB_POSIXCHECK -# undef calloc +#else +# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); +# endif #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ @@ -193,13 +306,17 @@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else -# if !@HAVE_CANONICALIZE_FILE_NAME@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/strchrnul.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/strchrnul.c
Changed
@@ -1,12 +1,12 @@ /* Searching in a string. - Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc. - This program 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 3 of the License, or - (at your option) any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/strchrnul.valgrind -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/strchrnul.valgrind
Changed
@@ -1,13 +1,13 @@ # Suppress a valgrind message about use of uninitialized memory in strchrnul(). -# Copyright (C) 2008-2020 Free Software Foundation, Inc. +# Copyright (C) 2008-2022 Free Software Foundation, Inc. # -# This program 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 3 of the License, or -# (at your option) any later version. +# This file 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. # -# This program is distributed in the hope that it will be useful, +# This file 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.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/string.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/string.in.h
Changed
@@ -1,19 +1,19 @@ /* A GNU-like <string.h>. - Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -52,6 +52,50 @@ # include <wchar.h> #endif +/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include <unistd.h> +#endif + +/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \ + && defined _AIX) \ + && ! defined __GLIBC__ +# include <strings.h> +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE @@ -62,19 +106,51 @@ # endif #endif -/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include <unistd.h> -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have + been included yet. */ +#if @GNULIB_FREE_POSIX@ +# if (@REPLACE_FREE@ && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +_GL_EXTERN_C void rpl_free (void *); +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ @@ -110,10 +186,18 @@ /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSLL@ -# if !@HAVE_FFSLL@ +# if @REPLACE_FFSLL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !@HAVE_FFSLL@ _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif +# endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll @@ -123,9 +207,22 @@ #endif -#if defined _WIN32 && !defined __CYGWIN__ -# undef memccpy -# define memccpy _memccpy +#if @GNULIB_MDA_MEMCCPY@ +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); #endif @@ -133,6 +230,7 @@ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) @@ -148,10 +246,11 @@ void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/sys_file.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/sys_file.in.h
Changed
@@ -1,19 +1,19 @@ /* Provide a more complete sys/file.h. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Richard W.M. Jones. */
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/sys_types.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/sys_types.in.h
Changed
@@ -1,19 +1,19 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/unistd.c -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/unistd.c
Changed
@@ -1,4 +1,22 @@ +/* Inline functions for <unistd.h>. + + Copyright (C) 2012-2022 Free Software Foundation, Inc. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + #include <config.h> + #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE #include "unistd.h" typedef int dummy;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/unistd.in.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/unistd.in.h
Changed
@@ -1,18 +1,18 @@ /* Substitute for and wrapper around <unistd.h>. - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2022 Free Software Foundation, Inc. - This program 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, or (at your option) - any later version. + This file 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. - This program is distributed in the hope that it will be useful, + This file 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 program; if not, see <https://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_UNISTD_H @@ -93,20 +93,18 @@ # undef __need_system_stdlib_h #endif -/* Native Windows platforms declare chdir, getcwd, rmdir in +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in <io.h> and/or <direct.h>, not in <unistd.h>. - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in <io.h>. */ -#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) -# include <io.h> /* mingw32, mingw64 */ -# include <direct.h> /* mingw64, MSVC 9 */ -#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ - || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in <io.h>. */ +#if defined _WIN32 && !defined __CYGWIN__ # include <io.h> +# include <direct.h> +#endif + +/* Native Windows platforms declare _execl*, _execv* in <process.h>. */ +#if defined _WIN32 && !defined __CYGWIN__ +# include <process.h> #endif /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. @@ -138,11 +136,8 @@ /* MSVC defines off_t in <sys/types.h>. May also define off_t to a 64-bit type on native Windows. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -/* Get off_t, ssize_t. */ -# include <sys/types.h> -#endif +/* Get off_t, ssize_t, mode_t. */ +#include <sys/types.h> /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -292,9 +287,20 @@ "also, this function is a security risk - " "use the gnulib module faccessat instead"); # endif -#elif defined _WIN32 && !defined __CYGWIN__ -# undef access -# define access _access +#elif @GNULIB_MDA_ACCESS@ +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); #endif @@ -315,9 +321,20 @@ _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " "use gnulib module chdir for portability"); # endif -#elif defined _WIN32 && !defined __CYGWIN__ -# undef chdir -# define chdir _chdir +#elif @GNULIB_MDA_CHDIR@ +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); #endif @@ -380,27 +397,53 @@ /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); -#elif defined _WIN32 && !defined __CYGWIN__ -# undef close -# define close _close +#elif @GNULIB_MDA_CLOSE@ +/* On native Windows, map 'close' to '_close', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::close always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); #endif #if @GNULIB_COPY_FILE_RANGE@ -# if !@HAVE_COPY_FILE_RANGE@ +# if @REPLACE_COPY_FILE_RANGE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !@HAVE_COPY_FILE_RANGE@ _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# undef copy_file_range +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif @@ -427,9 +470,20 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif -#elif defined _WIN32 && !defined __CYGWIN__ -# undef dup -# define dup _dup +#elif @GNULIB_MDA_DUP@ +/* On native Windows, map 'dup' to '_dup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); +# else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +# endif +_GL_CXXALIASWARN (dup); #endif
View file
_service:tar_scm:enchant-2.5.0.tar.gz/lib/verify.h
Added
@@ -0,0 +1,340 @@ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc. + + This file 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. + + This file 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 program. If not, see <https://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_VERIFY_H +#define _GL_VERIFY_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202000 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include <stddef.h> +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummyW; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_verify_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy sizeof (struct {...}); + extern void dummy (int sizeof (struct {...})); + extern int (*dummy (void)) sizeof (struct {...}); + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy sizeof (struct {...}); + extern int dummy sizeof (struct _gl_verify_type {...}); + extern void dummy (int sizeof (struct {...})); + extern void dummy (int sizeof (struct _gl_verify_type {...})); + extern int (*dummy (void)) sizeof (struct {...}); + extern int (*dummy (void)) sizeof (struct _gl_verify_type {...}); + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) sizeof (struct {...}); + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type +template <int w> + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_verify_type 1 +# endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + _gl_verify_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif +
View file
_service:tar_scm:enchant-2.3.3.tar.gz/lib/warn-on-use.h -> _service:tar_scm:enchant-2.5.0.tar.gz/lib/warn-on-use.h
Changed
@@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -84,20 +84,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) # elif __clang_major__ >= 4 /* Another compiler attribute is available in clang. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ __attribute__ ((__diagnose_if__ (1, message, "warning"))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/00gnulib.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/00gnulib.m4
Changed
@@ -1,5 +1,5 @@ # 00gnulib.m4 serial 8 -dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/absolute-header.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/absolute-header.m4
Changed
@@ -1,5 +1,5 @@ # absolute-header.m4 serial 17 -dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/assert_h.m4
Added
@@ -0,0 +1,57 @@ +# assert-h.m4 +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +AC_DEFUN(gl_ASSERT_H, + + AC_CACHE_CHECK(for static_assert, gl_cv_static_assert, + gl_save_CFLAGS=$CFLAGS + for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do + AS_CASE($gl_working, + *assert.h*, CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H") + + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #ifdef INCLUDE_ASSERT_H + #include <assert.h> + #endif + static_assert (2 + 2 == 4, "arithmetic does not work"); + static_assert (2 + 2 == 4); + , + + static_assert (sizeof (char) == 1, "sizeof does not work"); + static_assert (sizeof (char) == 1); + ), + gl_cv_static_assert=$gl_working, + gl_cv_static_assert=no) + CFLAGS=$gl_save_CFLAGS + test "$gl_cv_static_assert" != no && break + done) + + GL_GENERATE_ASSERT_H=false + AS_CASE($gl_cv_static_assert, + yes*keyword*, + AC_DEFINE(HAVE_C_STATIC_ASSERT, 1, + Define to 1 if the static_assert keyword works.), + no, + GL_GENERATE_ASSERT_H=true + gl_NEXT_HEADERS(assert.h)) + + dnl The "zz" puts this toward config.h's end, to avoid potential + dnl collisions with other definitions. #undef assert so that + dnl programs are not tempted to use it without specifically + dnl including assert.h. Break the #undef apart with a comment + dnl so that 'configure' does not comment it out. + AH_VERBATIM(zzstatic_assert, +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include <assert.h> + #undef/**/assert +#endif) +)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/configmake.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/configmake.m4
Changed
@@ -1,5 +1,5 @@ # configmake.m4 serial 4 -dnl Copyright (C) 2010-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/extensions.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/extensions.m4
Changed
@@ -1,14 +1,19 @@ -# serial 18 -*- Autoconf -*- +# serial 22 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2022 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. +dnl Define to empty for the benefit of Autoconf 2.69 and earlier, so that +dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+. +m4_ifndef(AC_CHECK_INCLUDES_DEFAULT, + AC_DEFUN(AC_CHECK_INCLUDES_DEFAULT, )) + # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git # Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.70 or later everywhere, but since Autoconf mutates rapidly +# is recent-enough everywhere, but since Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -26,36 +31,27 @@ # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. +m4_version_prereq(2.70.1, , + # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. -# -# Remember that #undef in AH_VERBATIM gets replaced with #define by -# AC_DEFINE. The goal here is to define all known feature-enabling -# macros, then, if reports of conflicts are made, disable macros that -# cause problems on some platforms (such as __EXTENSIONS__). +# We unconditionally define as many of the known feature-enabling +# as possible, reserving conditional behavior for macros that are +# known to cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE(AC_USE_SYSTEM_EXTENSIONS, -AC_BEFORE($0, AC_COMPILE_IFELSE)dnl +AC_BEFORE($0, AC_PREPROC_IFELSE)dnl +AC_BEFORE($0, AC_COMPILE_IFELSE)dnl +AC_BEFORE($0, AC_LINK_IFELSE)dnl AC_BEFORE($0, AC_RUN_IFELSE)dnl - - AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) - if test "$MINIX" = yes; then - AC_DEFINE(_POSIX_SOURCE, 1, - Define to 1 if you need to in order for 'stat' and other - things to work.) - AC_DEFINE(_POSIX_1_SOURCE, 2, - Define to 2 if the system does not provide POSIX.1 features - except with this defined.) - AC_DEFINE(_MINIX, 1, - Define to 1 if on MINIX.) - AC_DEFINE(_NETBSD_SOURCE, 1, - Define to 1 to make NetBSD features available. MINIX 3 needs this.) - fi - +AC_BEFORE($0, AC_CHECK_INCLUDES_DEFAULT)dnl +dnl #undef in AH_VERBATIM gets replaced with #define by AC_DEFINE. dnl Use a different key than __EXTENSIONS__, as that name broke existing dnl configure.ac when using autoheader 2.62. - AH_VERBATIM(USE_SYSTEM_EXTENSIONS, +dnl The macros below are in alphabetical order ignoring leading _ or __ +dnl prefixes. +AH_VERBATIM(USE_SYSTEM_EXTENSIONS, /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -64,19 +60,44 @@ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable NetBSD extensions on NetBSD. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # undef _NETBSD_SOURCE #endif -/* Enable OpenBSD extensions on NetBSD. */ +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif @@ -112,22 +133,19 @@ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# undef _HPUX_ALT_XOPEN_SOCKET_API -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -) +)dnl + + AC_REQUIRE(AC_CHECK_INCLUDES_DEFAULT)dnl + _AC_CHECK_HEADER_ONCE(wchar.h) + _AC_CHECK_HEADER_ONCE(minix/config.h) + +dnl Defining __EXTENSIONS__ may break the system headers on some systems. +dnl (FIXME: Which ones?) AC_CACHE_CHECK(whether it is safe to define __EXTENSIONS__, ac_cv_safe_to_define___extensions__, AC_COMPILE_IFELSE( @@ -136,11 +154,33 @@ AC_INCLUDES_DEFAULT), ac_cv_safe_to_define___extensions__=yes, ac_cv_safe_to_define___extensions__=no)) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE(__EXTENSIONS__) + +dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to +dnl 500, regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1. +dnl But defining _XOPEN_SOURCE may turn *off* extensions on platforms +dnl not covered by turn-on-extensions macros (notably Dragonfly, Free, +dnl and OpenBSD, which don't have any equivalent of _NETBSD_SOURCE) so +dnl it should only be defined when necessary. + AC_CACHE_CHECK(whether _XOPEN_SOURCE should be defined, + ac_cv_should_define__xopen_source, + ac_cv_should_define__xopen_source=no + AS_IF(test $ac_cv_header_wchar_h = yes, + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #include <wchar.h> + mbstate_t x;), + , + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x;), + ac_cv_should_define__xopen_source=yes)))) + AC_DEFINE(_ALL_SOURCE) AC_DEFINE(_DARWIN_C_SOURCE) AC_DEFINE(_GNU_SOURCE) + AC_DEFINE(_HPUX_ALT_XOPEN_SOCKET_API) AC_DEFINE(_NETBSD_SOURCE) AC_DEFINE(_OPENBSD_SOURCE) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) @@ -152,24 +192,18 @@ AC_DEFINE(__STDC_WANT_LIB_EXT2__) AC_DEFINE(__STDC_WANT_MATH_SPEC_FUNCS__) AC_DEFINE(_TANDEM_SOURCE) - AC_CACHE_CHECK(whether _XOPEN_SOURCE should be defined, - ac_cv_should_define__xopen_source, - ac_cv_should_define__xopen_source=no - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - #include <wchar.h>
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/extern-inline.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/extern-inline.m4
Changed
@@ -1,13 +1,28 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2020 Free Software Foundation, Inc. +dnl Copyright 2012-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN(gl_EXTERN_INLINE, - AH_VERBATIM(extern_inline, + AC_CACHE_CHECK(whether ctype.h defines __header_inline, + gl_cv_have___header_inline, + AC_PREPROC_IFELSE( + AC_LANG_SOURCE(#include <ctype.h> + #ifndef __header_inline + #error "<ctype.h> does not define __header_inline" + #endif + ), + gl_cv_have___header_inline=yes, + gl_cv_have___header_inline=no)) + if test "$gl_cv_have___header_inline" = yes; then + AC_DEFINE(HAVE___HEADER_INLINE, 1, + Define to 1 if ctype.h defines __header_inline.) + fi + + AH_VERBATIM(HAVE___HEADER_INLINE_1, /* Please see the Gnulib manual for how to use these macros. Suppress extern inline with HP-UX cc, as it appears to be broken; see @@ -17,7 +32,8 @@ mishandles inline functions that call each other. E.g., for 'inline void f (void) { } inline void g (void) { f (); }', c99 incorrectly complains 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) on configurations that mistakenly use 'static inline' to implement @@ -53,7 +69,7 @@ */ #if (((defined __APPLE__ && defined __MACH__) \ || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ + && (defined HAVE___HEADER_INLINE \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ && ! defined __clang__) \ : ((! defined _DONT_USE_CTYPE_INLINE_ \ @@ -83,8 +99,8 @@ # define _GL_EXTERN_INLINE extern # define _GL_EXTERN_INLINE_IN_USE #else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static #endif /* In GCC 4.6 (inclusive) to 5.1 (exclusive),
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/flock.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/flock.m4
Changed
@@ -1,12 +1,12 @@ -# flock.m4 serial 3 -dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. +# flock.m4 serial 4 +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN(gl_FUNC_FLOCK, - AC_REQUIRE(gl_HEADER_SYS_FILE_H_DEFAULTS) + AC_REQUIRE(gl_SYS_FILE_H_DEFAULTS) AC_CHECK_FUNCS_ONCE(flock) if test $ac_cv_func_flock = no; then HAVE_FLOCK=0
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/gnu-make.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/gnu-make.m4
Changed
@@ -1,6 +1,6 @@ # Determine whether recent-enough GNU Make is being used. -# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/gnulib-cache.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/gnulib-cache.m4
Changed
@@ -1,8 +1,8 @@ -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -40,33 +40,23 @@ # --libtool \ # --macro-prefix=gl \ # bootstrap \ -# c99 \ # configmake \ # flock \ -# getopt-posix \ # gnu-make \ # manywarnings \ # relocatable-lib-lgpl \ -# snippet/unused-parameter \ -# ssize_t \ -# strchrnul \ -# strdup-posix +# strchrnul # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR(gl-mod/bootstrap:gl) gl_MODULES( bootstrap - c99 configmake flock - getopt-posix gnu-make manywarnings relocatable-lib-lgpl - snippet/unused-parameter - ssize_t strchrnul - strdup-posix ) gl_AVOID() gl_SOURCE_BASE(lib)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/gnulib-common.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/gnulib-common.m4
Changed
@@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 57 -dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. +# gnulib-common.m4 serial 74 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -39,11 +39,12 @@ this syntax with 'extern'. */ # define _Noreturn noreturn # elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ # elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) @@ -66,7 +67,11 @@ #endif) AH_VERBATIM(attribute, /* Attributes. */ -#ifdef __has_attribute +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr @@ -82,12 +87,12 @@ # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) # define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) # define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # ifdef _ICC # define _GL_ATTR_may_alias 0 # else # define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) # endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) # define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) # define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) @@ -100,26 +105,51 @@ # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) #endif -dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead. +#ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \ + && _GL_GNUC_PREREQ (4, 6)) +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) +#else +# define _GL_HAS_C_ATTRIBUTE(attr) 0 +#endif + +dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead. +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ #if _GL_HAS_ATTRIBUTE (alloc_size) # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) #else # define _GL_ATTRIBUTE_ALLOC_SIZE(args) #endif +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ #if _GL_HAS_ATTRIBUTE (always_inline) # define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) #else # define _GL_ATTRIBUTE_ALWAYS_INLINE #endif +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ #if _GL_HAS_ATTRIBUTE (artificial) # define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) #else # define _GL_ATTRIBUTE_ARTIFICIAL #endif +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ @@ -133,13 +163,46 @@ # define _GL_ATTRIBUTE_COLD #endif +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ #if _GL_HAS_ATTRIBUTE (const) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST #endif -#if 201710L < __STDC_VERSION__ +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +#else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +#endif +/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue + to use this earlier definition, since <stdlib.h> may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#if _GL_HAS_C_ATTRIBUTE (deprecated) # define _GL_ATTRIBUTE_DEPRECATED __deprecated__ #elif _GL_HAS_ATTRIBUTE (deprecated) # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) @@ -147,6 +210,11 @@ # define _GL_ATTRIBUTE_DEPRECATED #endif +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ #if _GL_HAS_ATTRIBUTE (error) # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) @@ -158,14 +226,21 @@ # define _GL_ATTRIBUTE_WARNING(msg) #endif +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ #if _GL_HAS_ATTRIBUTE (externally_visible) # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) #else # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE #endif -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#if _GL_HAS_C_ATTRIBUTE (fallthrough) # define _GL_ATTRIBUTE_FALLTHROUGH __fallthrough__ #elif _GL_HAS_ATTRIBUTE (fallthrough) # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) @@ -173,18 +248,47 @@ # define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) #endif +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime,
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/gnulib-comp.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/gnulib-comp.m4
Changed
@@ -1,9 +1,9 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -43,37 +43,36 @@ AC_REQUIRE(gl_PROG_AR_RANLIB) # Code from module absolute-header: + # Code from module assert-h: # Code from module bootstrap: - # Code from module c99: # Code from module configmake: # Code from module extensions: # Code from module extern-inline: # Code from module extract-trace: # Code from module flock: # Code from module funclib.sh: - # Code from module getopt-posix: - # Code from module gettext-h: + # Code from module gen-header: # Code from module gnu-make: # Code from module include_next: # Code from module inline-source: - # Code from module malloc-posix: + # Code from module limits-h: # Code from module manywarnings: # Code from module msvc-inval: # Code from module msvc-nothrow: + # Code from module multiarch: # Code from module options-parser: # Code from module rawmemchr: # Code from module relocatable-lib-lgpl: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: - # Code from module snippet/unused-parameter: # Code from module snippet/warn-on-use: # Code from module ssize_t: - # Code from module std-gnu11: + # Code from module stdalign: # Code from module stddef: + # Code from module stdint: # Code from module stdlib: # Code from module strchrnul: - # Code from module strdup-posix: # Code from module string: # Code from module sys_file: # Code from module sys_types: @@ -93,73 +92,80 @@ m4_pushdef(AC_LIBSOURCES, m4_defn(gl_LIBSOURCES)) m4_pushdef(gl_LIBSOURCES_LIST, ) m4_pushdef(gl_LIBSOURCES_DIR, ) + m4_pushdef(GL_MACRO_PREFIX, gl) + m4_pushdef(GL_MODULE_INDICATOR_PREFIX, GL) gl_COMMON gl_source_base='lib' + gl_source_base_prefix= + gl_ASSERT_H + gl_CONDITIONAL_HEADER(assert.h) + AC_PROG_MKDIR_P gl_CONFIGMAKE_PREP + AC_PROG_MKDIR_P AC_REQUIRE(gl_EXTERN_INLINE) gl_FUNC_FLOCK - if test $HAVE_FLOCK = 0; then - AC_LIBOBJ(flock) + gl_CONDITIONAL(GL_COND_OBJ_FLOCK, test $HAVE_FLOCK = 0) + AM_COND_IF(GL_COND_OBJ_FLOCK, gl_PREREQ_FLOCK - fi - gl_HEADER_SYS_FILE_MODULE_INDICATOR(flock) - gl_FUNC_GETOPT_POSIX - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ(getopt) - AC_LIBOBJ(getopt1) - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - AC_SUBST(GNULIB_GL_UNISTD_H_GETOPT) - gl_UNISTD_MODULE_INDICATOR(getopt-posix) - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) + ) + gl_SYS_FILE_MODULE_INDICATOR(flock) gl_GNU_MAKE - gl_FUNC_MALLOC_POSIX - if test $REPLACE_MALLOC = 1; then - AC_LIBOBJ(malloc) - fi - gl_STDLIB_MODULE_INDICATOR(malloc-posix) + gl_LIMITS_H + gl_CONDITIONAL_HEADER(limits.h) + AC_PROG_MKDIR_P AC_REQUIRE(gl_MSVC_INVAL) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ(msvc-inval) - fi + gl_CONDITIONAL(GL_COND_OBJ_MSVC_INVAL, + test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1) AC_REQUIRE(gl_MSVC_NOTHROW) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ(msvc-nothrow) - fi + gl_CONDITIONAL(GL_COND_OBJ_MSVC_NOTHROW, + test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1) gl_MODULE_INDICATOR(msvc-nothrow) + gl_MULTIARCH gl_FUNC_RAWMEMCHR - if test $HAVE_RAWMEMCHR = 0; then - AC_LIBOBJ(rawmemchr) + gl_CONDITIONAL(GL_COND_OBJ_RAWMEMCHR, test $HAVE_RAWMEMCHR = 0) + AM_COND_IF(GL_COND_OBJ_RAWMEMCHR, gl_PREREQ_RAWMEMCHR - fi + ) gl_STRING_MODULE_INDICATOR(rawmemchr) gl_RELOCATABLE_LIBRARY if test $RELOCATABLE = yes; then AC_LIBOBJ(relocatable) fi gt_TYPE_SSIZE_T + gl_STDALIGN_H + gl_CONDITIONAL_HEADER(stdalign.h) + AC_PROG_MKDIR_P gl_STDDEF_H + gl_STDDEF_H_REQUIRE_DEFAULTS + gl_CONDITIONAL_HEADER(stddef.h) + AC_PROG_MKDIR_P + gl_STDINT_H + gl_CONDITIONAL_HEADER(stdint.h) + dnl Because of gl_REPLACE_LIMITS_H: + gl_CONDITIONAL_HEADER(limits.h) + AC_PROG_MKDIR_P gl_STDLIB_H + gl_STDLIB_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_STRCHRNUL - if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then - AC_LIBOBJ(strchrnul) + gl_CONDITIONAL(GL_COND_OBJ_STRCHRNUL, + test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1) + AM_COND_IF(GL_COND_OBJ_STRCHRNUL, gl_PREREQ_STRCHRNUL - fi + ) gl_STRING_MODULE_INDICATOR(strchrnul) - gl_FUNC_STRDUP_POSIX - if test $REPLACE_STRDUP = 1; then - AC_LIBOBJ(strdup) - gl_PREREQ_STRDUP - fi - gl_STRING_MODULE_INDICATOR(strdup) - gl_HEADER_STRING_H - gl_HEADER_SYS_FILE_H + gl_STRING_H + gl_STRING_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P + gl_SYS_FILE_H + gl_SYS_FILE_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_SYS_TYPES_H + gl_SYS_TYPES_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_UNISTD_H + gl_UNISTD_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, m4_syscmd(test ! -d m4_defn(gl_LIBSOURCES_DIR) || @@ -172,6 +178,8 @@ m4_if(m4_sysval, 0, , AC_FATAL(expected source file, required through AC_LIBSOURCES, not found)) ) + m4_popdef(GL_MODULE_INDICATOR_PREFIX) + m4_popdef(GL_MACRO_PREFIX) m4_popdef(gl_LIBSOURCES_DIR) m4_popdef(gl_LIBSOURCES_LIST) m4_popdef(AC_LIBSOURCES) @@ -180,16 +188,28 @@ AC_CONFIG_COMMANDS_PRE( gl_libobjs= gl_ltlibobjs= + gl_libobjdeps= if test -n "$gl_LIBOBJS"; then # Remove the extension. +changequote(,)dnl sed_drop_objext='s/\.o$//;s/\.obj$//' + sed_dirname1='s,//*,/,g' + sed_dirname2='s,\(.\)/$,\1,' + sed_dirname3='s,^^/*$,.,' + sed_dirname4='s,\(.\)/^/*$,\1,' + sed_basename1='s,.*/,,'
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/include_next.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/include_next.m4
Changed
@@ -1,5 +1,5 @@ # include_next.m4 serial 26 -dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -193,9 +193,9 @@ if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF(gl_header_exists) ) - gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) - AS_VAR_COPY(gl_header, gl_cv_absolute_AS_TR_SH(gl_HEADER_NAME)) - AS_VAR_SET(gl_next_header, '"'$gl_header'"') + gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) + AS_VAR_COPY(gl_header, gl_cv_absolute_AS_TR_SH(gl_HEADER_NAME)) + AS_VAR_SET(gl_next_header, '"'$gl_header'"') m4_if($2, check, else AS_VAR_SET(gl_next_header, '<'gl_HEADER_NAME'>')
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/libtool.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/libtool.m4
Changed
@@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require(_LT_CHECK_SHELL_FEATURES)dnl m4_require(_LT_PATH_CONVERSION_FUNCTIONS)dnl m4_require(_LT_CMD_RELOAD)dnl +m4_require(_LT_DECL_FILECMD)dnl m4_require(_LT_CHECK_MAGIC_METHOD)dnl m4_require(_LT_CHECK_SHAREDLIB_FROM_LINKLIB)dnl m4_require(_LT_CMD_OLD_ARCHIVE)dnl @@ -219,8 +221,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -728,7 +730,6 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. @@ -778,7 +779,7 @@ # 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 '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1042,8 +1043,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1067,17 +1068,12 @@ _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,*-darwin91*) - _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' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.012,*|,*powerpc*-darwin5-8*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1126,12 +1122,12 @@ output_verbose_link_cmd=func_echo_all _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" + _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 yes != "$lt_cv_apple_cc_single_mod"; 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" + _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 @@ -1245,7 +1241,8 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN(_LT_WITH_SYSROOT, -AC_MSG_CHECKING(for sysroot) +m4_require(_LT_DECL_SED)dnl +AC_MSG_CHECKING(for sysroot) AC_ARG_WITH(sysroot, AS_HELP_STRING(--with-sysroot@<:@=DIR@:>@, Search for dependent libraries within DIR (or the compiler's sysroot @@ -1262,7 +1259,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1292,7 +1289,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1309,7 +1306,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1321,7 +1318,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1343,7 +1340,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1351,7 +1348,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1359,7 +1356,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1379,14 +1376,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1451,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/limits-h.m4
Added
@@ -0,0 +1,41 @@ +dnl Check whether limits.h has needed features. + +dnl Copyright 2016-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +AC_DEFUN_ONCE(gl_LIMITS_H, + + gl_CHECK_NEXT_HEADERS(limits.h) + + AC_CACHE_CHECK(whether limits.h has WORD_BIT, BOOL_WIDTH etc., + gl_cv_header_limits_width, + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include <limits.h> + long long llm = LLONG_MAX; + int wb = WORD_BIT; + int ullw = ULLONG_WIDTH; + int bw = BOOL_WIDTH; + ), + gl_cv_header_limits_width=yes, + gl_cv_header_limits_width=no)) + if test "$gl_cv_header_limits_width" = yes; then + GL_GENERATE_LIMITS_H=false + else + GL_GENERATE_LIMITS_H=true + fi +) + +dnl Unconditionally enables the replacement of <limits.h>. +AC_DEFUN(gl_REPLACE_LIMITS_H, + + AC_REQUIRE(gl_LIMITS_H) + GL_GENERATE_LIMITS_H=true +)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/ltversion.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/ltversion.m4
Changed
@@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define(LT_PACKAGE_VERSION, 2.4.6) -m4_define(LT_PACKAGE_REVISION, 2.4.6) +m4_define(LT_PACKAGE_VERSION, 2.4.7) +m4_define(LT_PACKAGE_REVISION, 2.4.7) AC_DEFUN(LTVERSION_VERSION, -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, Which release of libtool.m4 was used?) _LT_DECL(, macro_revision, 0) )
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/manywarnings-c++.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/manywarnings-c++.m4
Changed
@@ -1,5 +1,5 @@ # manywarnings-c++.m4 serial 3 -dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/manywarnings.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/manywarnings.m4
Changed
@@ -1,5 +1,5 @@ -# manywarnings.m4 serial 21 -dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. +# manywarnings.m4 serial 23 +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -167,11 +167,13 @@ # them here so that the above 'comm' command doesn't report a false match. gl_AS_VAR_APPEND($1, ' -Warray-bounds=2') gl_AS_VAR_APPEND($1, ' -Wattribute-alias=2') + gl_AS_VAR_APPEND($1, ' -Wbidi-chars=any,ucn') gl_AS_VAR_APPEND($1, ' -Wformat-overflow=2') gl_AS_VAR_APPEND($1, ' -Wformat=2') gl_AS_VAR_APPEND($1, ' -Wformat-truncation=2') gl_AS_VAR_APPEND($1, ' -Wimplicit-fallthrough=5') gl_AS_VAR_APPEND($1, ' -Wshift-overflow=2') + gl_AS_VAR_APPEND($1, ' -Wuse-after-free=3') gl_AS_VAR_APPEND($1, ' -Wunused-const-variable=2') gl_AS_VAR_APPEND($1, ' -Wvla-larger-than=4031') @@ -195,15 +197,9 @@ gl_AS_VAR_APPEND($1, ' -Wno-uninitialized') fi - # Some warnings have too many false alarms in GCC 10.1. - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695 - gl_AS_VAR_APPEND($1, ' -Wno-analyzer-double-free') - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458 + # This warning have too many false alarms in GCC 11.2.1. + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713 gl_AS_VAR_APPEND($1, ' -Wno-analyzer-malloc-leak') - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851 - gl_AS_VAR_APPEND($1, ' -Wno-analyzer-null-dereference') - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758 - gl_AS_VAR_APPEND($1, ' -Wno-analyzer-use-after-free') AC_LANG_POP(C) )
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/msvc-inval.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/msvc-inval.m4
Changed
@@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/msvc-nothrow.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/msvc-nothrow.m4
Changed
@@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/multiarch.m4
Added
@@ -0,0 +1,65 @@ +# multiarch.m4 serial 9 +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Determine whether the compiler is or may be producing universal binaries. +# +# On Mac OS X 10.5 and later systems, the user can create libraries and +# executables that work on multiple system types--known as "fat" or +# "universal" binaries--by specifying multiple '-arch' options to the +# compiler but only a single '-arch' option to the preprocessor. Like +# this: +# +# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CPP="gcc -E" CXXCPP="g++ -E" +# +# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. + +AC_DEFUN_ONCE(gl_MULTIARCH, + + dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. + AC_CACHE_CHECK(whether the compiler produces multi-arch binaries, + gl_cv_c_multiarch, + gl_cv_c_multiarch=no + AC_COMPILE_IFELSE( + AC_LANG_SOURCE( + #ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + ), + + dnl Check for potential -arch flags. It is not universal unless + dnl there are at least two -arch flags with different values. + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64 | arm | arm64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + ) + ) + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + AC_SUBST(APPLE_UNIVERSAL_BUILD) +)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/off_t.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/off_t.m4
Changed
@@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/rawmemchr.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/rawmemchr.m4
Changed
@@ -1,5 +1,5 @@ -# rawmemchr.m4 serial 2 -dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc. +# rawmemchr.m4 serial 3 +dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,7 @@ dnl Persuade glibc <string.h> to declare rawmemchr(). AC_REQUIRE(AC_USE_SYSTEM_EXTENSIONS) - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) + AC_REQUIRE(gl_STRING_H_DEFAULTS) AC_CHECK_FUNCS(rawmemchr) if test $ac_cv_func_rawmemchr = no; then HAVE_RAWMEMCHR=0
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/relocatable-lib.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/relocatable-lib.m4
Changed
@@ -1,5 +1,5 @@ # relocatable-lib.m4 serial 6 -dnl Copyright (C) 2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/ssize_t.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/ssize_t.m4
Changed
@@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/stdalign.m4
Added
@@ -0,0 +1,75 @@ +# Check for alignas and alignof that conform to C23. + +dnl Copyright 2011-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prepare for substituting <stdalign.h> if it is not supported. + +AC_DEFUN(gl_STDALIGN_H, + + AC_CACHE_CHECK(for alignas and alignof, + gl_cv_header_working_stdalign_h, + gl_save_CFLAGS=$CFLAGS + for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do + AS_CASE($gl_working, + *stdalign.h*, CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H") + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #include <stdint.h> + #ifdef INCLUDE_STDALIGN_H + #include <stdalign.h> + #endif + #include <stddef.h> + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ + #ifdef __cplusplus + template <class t> struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper<type>, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_doubleao (double) % _Alignof (double) == 0 ? 1 : -1; + char test_longao (long int) % _Alignof (long int) == 0 ? 1 : -1; + char test_alignofalignof (double) == _Alignof (double) ? 1 : -1; + + /* Test alignas only on platforms where gnulib can help. */ + #if \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || (__TINYC__ && defined __attribute__) \ + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ + || 1300 <= _MSC_VER) + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignasoffsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1; + #endif + ), + gl_cv_header_working_stdalign_h=$gl_working, + gl_cv_header_working_stdalign_h=no) + + CFLAGS=$gl_save_CFLAGS + test "$gl_cv_header_working_stdalign_h" != no && break + done) + + GL_GENERATE_STDALIGN_H=false + AS_CASE($gl_cv_header_working_stdalign_h, + no, + GL_GENERATE_STDALIGN_H=true, + yes*keyword*, + AC_DEFINE(HAVE_C_ALIGNASOF, 1, + Define to 1 if the alignas and alignof keywords work.)) + + dnl The "zz" puts this toward config.h's end, to avoid potential + dnl collisions with other definitions. + AH_VERBATIM(zzalignas, +#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof + #include <stdalign.h> +#endif) +)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/stddef_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/stddef_h.m4
Changed
@@ -1,15 +1,20 @@ -dnl A placeholder for <stddef.h>, for platforms that have issues. -# stddef_h.m4 serial 7 -dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. +# stddef_h.m4 serial 12 +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_DEFUN(gl_STDDEF_H, +dnl A placeholder for <stddef.h>, for platforms that have issues. + +AC_DEFUN_ONCE(gl_STDDEF_H, AC_REQUIRE(gl_STDDEF_H_DEFAULTS) AC_REQUIRE(gt_TYPE_WCHAR_T) - STDDEF_H= + + dnl Persuade OpenBSD <stddef.h> to declare max_align_t. + AC_REQUIRE(gl_USE_SYSTEM_EXTENSIONS) + + GL_GENERATE_STDDEF_H=false dnl Test whether the type max_align_t exists and whether its alignment dnl "is as great as is supported by the implementation in all contexts". @@ -23,18 +28,25 @@ int check12 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1; int check22 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1; #endif + typedef struct { char a; max_align_t b; } max_helper; + typedef struct { char a; long b; } long_helper; + typedef struct { char a; double b; } double_helper; + typedef struct { char a; long double b; } long_double_helper; + int check32 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1; + int check42 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1; + int check52 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1; ), gl_cv_type_max_align_t=yes, gl_cv_type_max_align_t=no) ) if test $gl_cv_type_max_align_t = no; then HAVE_MAX_ALIGN_T=0 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi AC_CACHE_CHECK(whether NULL can be used in arbitrary expressions, @@ -46,23 +58,36 @@ gl_cv_decl_null_works=no)) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi - AC_SUBST(STDDEF_H) - AM_CONDITIONAL(GL_GENERATE_STDDEF_H, test -n "$STDDEF_H") - if test -n "$STDDEF_H"; then + if $GL_GENERATE_STDDEF_H; then gl_NEXT_HEADERS(stddef.h) fi ) +# gl_STDDEF_MODULE_INDICATOR(modulename) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN(gl_STDDEF_MODULE_INDICATOR, - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE(gl_STDDEF_H_DEFAULTS) + dnl Ensure to expand the default settings once only. + gl_STDDEF_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE($1) ) +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_STDDEF_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_STDDEF_H_MODULE_INDICATOR_DEFAULTS, + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_STDDEF_H_MODULE_INDICATOR_DEFAULTS) + AC_REQUIRE(gl_STDDEF_H_DEFAULTS) +) + AC_DEFUN(gl_STDDEF_H_DEFAULTS, dnl Assume proper GNU behavior unless another module says otherwise.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/stdint.m4
Added
@@ -0,0 +1,531 @@ +# stdint.m4 serial 61 +dnl Copyright (C) 2001-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert and Bruno Haible. +dnl Test whether <stdint.h> is supported or must be substituted. + +AC_PREREQ(2.61) + +AC_DEFUN_ONCE(gl_STDINT_H, + + AC_PREREQ(2.59)dnl + AC_REQUIRE(AC_CANONICAL_HOST) dnl for cross-compiles + + AC_REQUIRE(gl_LIMITS_H) + AC_REQUIRE(gt_TYPE_WINT_T) + + dnl For backward compatibility. Some packages may still be testing these + dnl macros. + AC_DEFINE(HAVE_LONG_LONG_INT, 1, + Define to 1 if the system has the type 'long long int'.) + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG_INT, 1, + Define to 1 if the system has the type 'unsigned long long int'.) + + dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does. + AC_CHECK_HEADERS_ONCE(wchar.h) + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + AC_SUBST(HAVE_WCHAR_H) + + dnl Check for <inttypes.h>. + AC_CHECK_HEADERS_ONCE(inttypes.h) + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + AC_SUBST(HAVE_INTTYPES_H) + + dnl Check for <sys/types.h>. + AC_CHECK_HEADERS_ONCE(sys/types.h) + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + AC_SUBST(HAVE_SYS_TYPES_H) + + gl_CHECK_NEXT_HEADERS(stdint.h) + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + AC_SUBST(HAVE_STDINT_H) + + dnl Now see whether we need a substitute <stdint.h>. + if test $ac_cv_header_stdint_h = yes; then + AC_CACHE_CHECK(whether stdint.h conforms to C99, + gl_cv_header_working_stdint_h, + gl_cv_header_working_stdint_h=no + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 +#include <stdint.h> +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" +#endif + +gl_STDINT_INCLUDES + +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1(unsigned char) -1 != 255 ? 1 : -1; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +/* Check that SIZE_MAX has the correct type, if possible. */ +#if 201112 <= __STDC_VERSION__ +int k = _Generic (SIZE_MAX, size_t: 0); +#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) +extern size_t k; +extern __typeof__ (SIZE_MAX) k; +#endif + +#include <limits.h> /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; + + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; + + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; +#endif +#ifdef UINT16_MAX
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/stdlib_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/stdlib_h.m4
Changed
@@ -1,10 +1,10 @@ -# stdlib_h.m4 serial 49 -dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. +# stdlib_h.m4 serial 66 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_DEFUN(gl_STDLIB_H, +AC_DEFUN_ONCE(gl_STDLIB_H, AC_REQUIRE(gl_STDLIB_H_DEFAULTS) gl_NEXT_HEADERS(stdlib.h) @@ -22,65 +22,113 @@ #if HAVE_RANDOM_H # include <random.h> #endif - , _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + , _Exit aligned_alloc atoll canonicalize_file_name free + getloadavg getsubopt grantpt initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps - posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray - realpath rpmatch secure_getenv setenv setstate setstate_r srandom - srandom_r strtod strtold strtoll strtoull unlockpt unsetenv) + posix_memalign posix_openpt ptsname ptsname_r qsort_r + random random_r reallocarray realpath rpmatch secure_getenv setenv + setstate setstate_r srandom srandom_r + strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv) AC_REQUIRE(AC_C_RESTRICT) + + AC_CHECK_DECLS_ONCE(ecvt) + if test $ac_cv_have_decl_ecvt = no; then + HAVE_DECL_ECVT=0 + fi + AC_CHECK_DECLS_ONCE(fcvt) + if test $ac_cv_have_decl_fcvt = no; then + HAVE_DECL_FCVT=0 + fi + AC_CHECK_DECLS_ONCE(gcvt) + if test $ac_cv_have_decl_gcvt = no; then + HAVE_DECL_GCVT=0 + fi ) +# gl_STDLIB_MODULE_INDICATOR(modulename) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN(gl_STDLIB_MODULE_INDICATOR, - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE(gl_STDLIB_H_DEFAULTS) + dnl Ensure to expand the default settings once only. + gl_STDLIB_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE($1) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS($1) ) +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_STDLIB_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_STDLIB_H_MODULE_INDICATOR_DEFAULTS, + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB__EXIT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_ALIGNED_ALLOC) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_ATOLL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CALLOC_GNU) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CALLOC_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CANONICALIZE_FILE_NAME) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FREE_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETLOADAVG) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETSUBOPT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GRANTPT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MALLOC_GNU) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MALLOC_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBTOWC) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MKDTEMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MKOSTEMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MKOSTEMPS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MKSTEMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MKSTEMPS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_POSIX_MEMALIGN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_POSIX_OPENPT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PTSNAME) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PTSNAME_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PUTENV) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_QSORT_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_RANDOM) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_RANDOM_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_REALLOCARRAY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_REALLOC_GNU) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_REALLOC_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_REALPATH) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_RPMATCH) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SECURE_GETENV) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SETENV) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOD) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOLD) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOLL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOUL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOULL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SYSTEM_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNLOCKPT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNSETENV) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_WCTOMB) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_ECVT, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_FCVT, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_GCVT, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_MKTEMP, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_PUTENV, 1) + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_STDLIB_H_MODULE_INDICATOR_DEFAULTS) + AC_REQUIRE(gl_STDLIB_H_DEFAULTS) +) + AC_DEFUN(gl_STDLIB_H_DEFAULTS, - GNULIB__EXIT=0; AC_SUBST(GNULIB__EXIT) - GNULIB_ATOLL=0; AC_SUBST(GNULIB_ATOLL) - GNULIB_CALLOC_POSIX=0; AC_SUBST(GNULIB_CALLOC_POSIX) - GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST(GNULIB_CANONICALIZE_FILE_NAME) - GNULIB_GETLOADAVG=0; AC_SUBST(GNULIB_GETLOADAVG) - GNULIB_GETSUBOPT=0; AC_SUBST(GNULIB_GETSUBOPT) - GNULIB_GRANTPT=0; AC_SUBST(GNULIB_GRANTPT) - GNULIB_MALLOC_POSIX=0; AC_SUBST(GNULIB_MALLOC_POSIX) - GNULIB_MBTOWC=0; AC_SUBST(GNULIB_MBTOWC) - GNULIB_MKDTEMP=0; AC_SUBST(GNULIB_MKDTEMP) - GNULIB_MKOSTEMP=0; AC_SUBST(GNULIB_MKOSTEMP) - GNULIB_MKOSTEMPS=0; AC_SUBST(GNULIB_MKOSTEMPS) - GNULIB_MKSTEMP=0; AC_SUBST(GNULIB_MKSTEMP) - GNULIB_MKSTEMPS=0; AC_SUBST(GNULIB_MKSTEMPS) - GNULIB_POSIX_OPENPT=0; AC_SUBST(GNULIB_POSIX_OPENPT) - GNULIB_PTSNAME=0; AC_SUBST(GNULIB_PTSNAME) - GNULIB_PTSNAME_R=0; AC_SUBST(GNULIB_PTSNAME_R) - GNULIB_PUTENV=0; AC_SUBST(GNULIB_PUTENV) - GNULIB_QSORT_R=0; AC_SUBST(GNULIB_QSORT_R) - GNULIB_RANDOM=0; AC_SUBST(GNULIB_RANDOM) - GNULIB_RANDOM_R=0; AC_SUBST(GNULIB_RANDOM_R) - GNULIB_REALLOCARRAY=0; AC_SUBST(GNULIB_REALLOCARRAY) - GNULIB_REALLOC_POSIX=0; AC_SUBST(GNULIB_REALLOC_POSIX) - GNULIB_REALPATH=0; AC_SUBST(GNULIB_REALPATH) - GNULIB_RPMATCH=0; AC_SUBST(GNULIB_RPMATCH) - GNULIB_SECURE_GETENV=0; AC_SUBST(GNULIB_SECURE_GETENV) - GNULIB_SETENV=0; AC_SUBST(GNULIB_SETENV) - GNULIB_STRTOD=0; AC_SUBST(GNULIB_STRTOD) - GNULIB_STRTOLD=0; AC_SUBST(GNULIB_STRTOLD) - GNULIB_STRTOLL=0; AC_SUBST(GNULIB_STRTOLL) - GNULIB_STRTOULL=0; AC_SUBST(GNULIB_STRTOULL) - GNULIB_SYSTEM_POSIX=0; AC_SUBST(GNULIB_SYSTEM_POSIX) - GNULIB_UNLOCKPT=0; AC_SUBST(GNULIB_UNLOCKPT) - GNULIB_UNSETENV=0; AC_SUBST(GNULIB_UNSETENV) - GNULIB_WCTOMB=0; AC_SUBST(GNULIB_WCTOMB) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=1; AC_SUBST(HAVE__EXIT) + HAVE_ALIGNED_ALLOC=1; AC_SUBST(HAVE_ALIGNED_ALLOC) HAVE_ATOLL=1; AC_SUBST(HAVE_ATOLL) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST(HAVE_CANONICALIZE_FILE_NAME) + HAVE_DECL_ECVT=1; AC_SUBST(HAVE_DECL_ECVT) + HAVE_DECL_FCVT=1; AC_SUBST(HAVE_DECL_FCVT) + HAVE_DECL_GCVT=1; AC_SUBST(HAVE_DECL_GCVT) HAVE_DECL_GETLOADAVG=1; AC_SUBST(HAVE_DECL_GETLOADAVG) HAVE_GETSUBOPT=1; AC_SUBST(HAVE_GETSUBOPT) HAVE_GRANTPT=1; AC_SUBST(HAVE_GRANTPT) @@ -92,6 +140,7 @@ HAVE_MKOSTEMPS=1; AC_SUBST(HAVE_MKOSTEMPS) HAVE_MKSTEMP=1; AC_SUBST(HAVE_MKSTEMP) HAVE_MKSTEMPS=1; AC_SUBST(HAVE_MKSTEMPS) + HAVE_POSIX_MEMALIGN=1; AC_SUBST(HAVE_POSIX_MEMALIGN) HAVE_POSIX_OPENPT=1; AC_SUBST(HAVE_POSIX_OPENPT) HAVE_PTSNAME=1; AC_SUBST(HAVE_PTSNAME) HAVE_PTSNAME_R=1; AC_SUBST(HAVE_PTSNAME_R) @@ -108,31 +157,44 @@ HAVE_SETSTATE=1; AC_SUBST(HAVE_SETSTATE) HAVE_DECL_SETSTATE=1; AC_SUBST(HAVE_DECL_SETSTATE) HAVE_STRTOD=1; AC_SUBST(HAVE_STRTOD) + HAVE_STRTOL=1; AC_SUBST(HAVE_STRTOL) HAVE_STRTOLD=1; AC_SUBST(HAVE_STRTOLD) HAVE_STRTOLL=1; AC_SUBST(HAVE_STRTOLL) + HAVE_STRTOUL=1; AC_SUBST(HAVE_STRTOUL) HAVE_STRTOULL=1; AC_SUBST(HAVE_STRTOULL) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST(HAVE_STRUCT_RANDOM_DATA) HAVE_SYS_LOADAVG_H=0; AC_SUBST(HAVE_SYS_LOADAVG_H) HAVE_UNLOCKPT=1; AC_SUBST(HAVE_UNLOCKPT) HAVE_DECL_UNSETENV=1; AC_SUBST(HAVE_DECL_UNSETENV) - REPLACE_CALLOC=0; AC_SUBST(REPLACE_CALLOC) + REPLACE_ALIGNED_ALLOC=0; AC_SUBST(REPLACE_ALIGNED_ALLOC) + REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST(REPLACE_CALLOC_FOR_CALLOC_GNU) + REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST(REPLACE_CALLOC_FOR_CALLOC_POSIX) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST(REPLACE_CANONICALIZE_FILE_NAME) + REPLACE_FREE=0; AC_SUBST(REPLACE_FREE) REPLACE_INITSTATE=0; AC_SUBST(REPLACE_INITSTATE) - REPLACE_MALLOC=0; AC_SUBST(REPLACE_MALLOC) + REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST(REPLACE_MALLOC_FOR_MALLOC_GNU) + REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST(REPLACE_MALLOC_FOR_MALLOC_POSIX)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/strchrnul.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/strchrnul.m4
Changed
@@ -1,5 +1,5 @@ -# strchrnul.m4 serial 9 -dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc. +# strchrnul.m4 serial 10 +dnl Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,7 @@ dnl Persuade glibc <string.h> to declare strchrnul(). AC_REQUIRE(AC_USE_SYSTEM_EXTENSIONS) - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) + AC_REQUIRE(gl_STRING_H_DEFAULTS) AC_CHECK_FUNCS(strchrnul) if test $ac_cv_func_strchrnul = no; then HAVE_STRCHRNUL=0
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/string_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/string_h.m4
Changed
@@ -1,24 +1,19 @@ # Configure a GNU-like replacement for <string.h>. -# Copyright (C) 2007-2020 Free Software Foundation, Inc. +# Copyright (C) 2007-2022 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 27 +# serial 34 # Written by Paul Eggert. -AC_DEFUN(gl_HEADER_STRING_H, +AC_DEFUN_ONCE(gl_STRING_H, - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE(gl_HEADER_STRING_H_BODY) -) - -AC_DEFUN(gl_HEADER_STRING_H_BODY, - - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) + dnl Ensure to expand the default settings once only, before all statements + dnl that occur in other macros. + AC_REQUIRE(gl_STRING_H_DEFAULTS) gl_NEXT_HEADERS(string.h) dnl Check for declarations of anything we want to poison if the @@ -33,58 +28,78 @@ AC_REQUIRE(AC_C_RESTRICT) ) +# gl_STRING_MODULE_INDICATOR(modulename) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN(gl_STRING_MODULE_INDICATOR, - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE(gl_HEADER_STRING_H_DEFAULTS) + dnl Ensure to expand the default settings once only. + gl_STRING_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE($1) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS($1) ) -AC_DEFUN(gl_HEADER_STRING_H_DEFAULTS, +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_STRING_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_STRING_H_MODULE_INDICATOR_DEFAULTS, + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXPLICIT_BZERO) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FFSL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FFSLL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MEMCHR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MEMMEM) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MEMPCPY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MEMRCHR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_RAWMEMCHR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STPCPY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STPNCPY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRCHRNUL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRDUP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRNCAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRNDUP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRNLEN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRPBRK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRSEP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRSTR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRCASESTR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRTOK_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSLEN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSNLEN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSCHR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSRCHR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSSTR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSCASECMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSNCASECMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSPCASECMP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSCASESTR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSCSPN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSPBRK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSSPN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSSEP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MBSTOK_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRERROR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRERROR_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRERRORNAME_NP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SIGABBREV_NP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SIGDESCR_NP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRSIGNAL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_STRVERSCMP) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_MEMCCPY, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_STRDUP, 1) + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_STRING_H_MODULE_INDICATOR_DEFAULTS) + dnl Make sure the shell variable for GNULIB_FREE_POSIX is initialized. + gl_STDLIB_H_REQUIRE_DEFAULTS + AC_REQUIRE(gl_STRING_H_DEFAULTS) +) + +AC_DEFUN(gl_STRING_H_DEFAULTS, - GNULIB_EXPLICIT_BZERO=0; AC_SUBST(GNULIB_EXPLICIT_BZERO) - GNULIB_FFSL=0; AC_SUBST(GNULIB_FFSL) - GNULIB_FFSLL=0; AC_SUBST(GNULIB_FFSLL) - GNULIB_MEMCHR=0; AC_SUBST(GNULIB_MEMCHR) - GNULIB_MEMMEM=0; AC_SUBST(GNULIB_MEMMEM) - GNULIB_MEMPCPY=0; AC_SUBST(GNULIB_MEMPCPY) - GNULIB_MEMRCHR=0; AC_SUBST(GNULIB_MEMRCHR) - GNULIB_RAWMEMCHR=0; AC_SUBST(GNULIB_RAWMEMCHR) - GNULIB_STPCPY=0; AC_SUBST(GNULIB_STPCPY) - GNULIB_STPNCPY=0; AC_SUBST(GNULIB_STPNCPY) - GNULIB_STRCHRNUL=0; AC_SUBST(GNULIB_STRCHRNUL) - GNULIB_STRDUP=0; AC_SUBST(GNULIB_STRDUP) - GNULIB_STRNCAT=0; AC_SUBST(GNULIB_STRNCAT) - GNULIB_STRNDUP=0; AC_SUBST(GNULIB_STRNDUP) - GNULIB_STRNLEN=0; AC_SUBST(GNULIB_STRNLEN) - GNULIB_STRPBRK=0; AC_SUBST(GNULIB_STRPBRK) - GNULIB_STRSEP=0; AC_SUBST(GNULIB_STRSEP) - GNULIB_STRSTR=0; AC_SUBST(GNULIB_STRSTR) - GNULIB_STRCASESTR=0; AC_SUBST(GNULIB_STRCASESTR) - GNULIB_STRTOK_R=0; AC_SUBST(GNULIB_STRTOK_R) - GNULIB_MBSLEN=0; AC_SUBST(GNULIB_MBSLEN) - GNULIB_MBSNLEN=0; AC_SUBST(GNULIB_MBSNLEN) - GNULIB_MBSCHR=0; AC_SUBST(GNULIB_MBSCHR) - GNULIB_MBSRCHR=0; AC_SUBST(GNULIB_MBSRCHR) - GNULIB_MBSSTR=0; AC_SUBST(GNULIB_MBSSTR) - GNULIB_MBSCASECMP=0; AC_SUBST(GNULIB_MBSCASECMP) - GNULIB_MBSNCASECMP=0; AC_SUBST(GNULIB_MBSNCASECMP) - GNULIB_MBSPCASECMP=0; AC_SUBST(GNULIB_MBSPCASECMP) - GNULIB_MBSCASESTR=0; AC_SUBST(GNULIB_MBSCASESTR) - GNULIB_MBSCSPN=0; AC_SUBST(GNULIB_MBSCSPN) - GNULIB_MBSPBRK=0; AC_SUBST(GNULIB_MBSPBRK) - GNULIB_MBSSPN=0; AC_SUBST(GNULIB_MBSSPN) - GNULIB_MBSSEP=0; AC_SUBST(GNULIB_MBSSEP) - GNULIB_MBSTOK_R=0; AC_SUBST(GNULIB_MBSTOK_R) - GNULIB_STRERROR=0; AC_SUBST(GNULIB_STRERROR) - GNULIB_STRERROR_R=0; AC_SUBST(GNULIB_STRERROR_R) - GNULIB_STRERRORNAME_NP=0; AC_SUBST(GNULIB_STRERRORNAME_NP) - GNULIB_SIGABBREV_NP=0; AC_SUBST(GNULIB_SIGABBREV_NP) - GNULIB_SIGDESCR_NP=0; AC_SUBST(GNULIB_SIGDESCR_NP) - GNULIB_STRSIGNAL=0; AC_SUBST(GNULIB_STRSIGNAL) - GNULIB_STRVERSCMP=0; AC_SUBST(GNULIB_STRVERSCMP) HAVE_MBSLEN=0; AC_SUBST(HAVE_MBSLEN) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_EXPLICIT_BZERO=1; AC_SUBST(HAVE_EXPLICIT_BZERO) @@ -110,6 +125,7 @@ HAVE_SIGDESCR_NP=1; AC_SUBST(HAVE_SIGDESCR_NP) HAVE_DECL_STRSIGNAL=1; AC_SUBST(HAVE_DECL_STRSIGNAL) HAVE_STRVERSCMP=1; AC_SUBST(HAVE_STRVERSCMP) + REPLACE_FFSLL=0; AC_SUBST(REPLACE_FFSLL) REPLACE_MEMCHR=0; AC_SUBST(REPLACE_MEMCHR) REPLACE_MEMMEM=0; AC_SUBST(REPLACE_MEMMEM) REPLACE_STPNCPY=0; AC_SUBST(REPLACE_STPNCPY)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/sys_file_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/sys_file_h.m4
Changed
@@ -1,16 +1,16 @@ # Configure a replacement for <sys/file.h>. -# serial 6 +# serial 9 -# Copyright (C) 2008-2020 Free Software Foundation, Inc. +# Copyright (C) 2008-2022 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. # Written by Richard W.M. Jones. -AC_DEFUN(gl_HEADER_SYS_FILE_H, +AC_DEFUN_ONCE(gl_SYS_FILE_H, - AC_REQUIRE(gl_HEADER_SYS_FILE_H_DEFAULTS) + AC_REQUIRE(gl_SYS_FILE_H_DEFAULTS) dnl <sys/file.h> is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS(sys/file.h) @@ -28,14 +28,29 @@ , flock) ) -AC_DEFUN(gl_HEADER_SYS_FILE_MODULE_INDICATOR, +# gl_SYS_FILE_MODULE_INDICATOR(modulename) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. +AC_DEFUN(gl_SYS_FILE_MODULE_INDICATOR, - AC_REQUIRE(gl_HEADER_SYS_FILE_H_DEFAULTS) + gl_SYS_FILE_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE($1) ) -AC_DEFUN(gl_HEADER_SYS_FILE_H_DEFAULTS, +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_SYS_FILE_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_SYS_FILE_H_MODULE_INDICATOR_DEFAULTS, + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FLOCK) + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_SYS_FILE_H_MODULE_INDICATOR_DEFAULTS) + AC_REQUIRE(gl_SYS_FILE_H_DEFAULTS) +) + +AC_DEFUN(gl_SYS_FILE_H_DEFAULTS, - GNULIB_FLOCK=0; AC_SUBST(GNULIB_FLOCK) HAVE_FLOCK=1; AC_SUBST(HAVE_FLOCK) )
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/sys_types_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/sys_types_h.m4
Changed
@@ -1,15 +1,16 @@ -# sys_types_h.m4 serial 9 -dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. +# sys_types_h.m4 serial 13 +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE(gl_SYS_TYPES_H, + AC_REQUIRE(gl_SYS_TYPES_H_DEFAULTS) + dnl Use sane struct stat types in OpenVMS 8.2 and later. AC_DEFINE(_USE_STD_STAT, 1, For standard stat data types on VMS.) - AC_REQUIRE(gl_SYS_TYPES_H_DEFAULTS) gl_NEXT_HEADERS(sys/types.h) dnl Ensure the type pid_t gets defined. @@ -30,31 +31,40 @@ AC_SUBST(WINDOWS_STAT_INODES) ) +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_SYS_TYPES_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS, + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS) + AC_REQUIRE(gl_SYS_TYPES_H_DEFAULTS) +) + AC_DEFUN(gl_SYS_TYPES_H_DEFAULTS, ) # This works around a buggy version in autoconf <= 2.69. # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html> +# The 2.70 version isn't quoted properly, so override it too. -m4_version_prereq(2.70, , - -# This is taken from the following Autoconf patch: -# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974 +m4_version_prereq(2.70.1, , m4_undefine(AC_HEADER_MAJOR) AC_DEFUN(AC_HEADER_MAJOR, AC_CHECK_HEADERS_ONCE(sys/types.h) AC_CHECK_HEADER(sys/mkdev.h, - AC_DEFINE(MAJOR_IN_MKDEV, 1, - Define to 1 if `major', `minor', and `makedev' are declared in - <mkdev.h>.)) + AC_DEFINE(MAJOR_IN_MKDEV, 1, + Define to 1 if `major', `minor', and `makedev' are + declared in <mkdev.h>.)) if test $ac_cv_header_sys_mkdev_h = no; then AC_CHECK_HEADER(sys/sysmacros.h, - AC_DEFINE(MAJOR_IN_SYSMACROS, 1, - Define to 1 if `major', `minor', and `makedev' are declared in - <sysmacros.h>.)) + AC_DEFINE(MAJOR_IN_SYSMACROS, 1, + Define to 1 if `major', `minor', and `makedev' + are declared in <sysmacros.h>.)) fi -) +)# AC_HEADER_MAJOR )
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/unistd_h.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/unistd_h.m4
Changed
@@ -1,15 +1,15 @@ -# unistd_h.m4 serial 81 -dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. +# unistd_h.m4 serial 90 +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. -AC_DEFUN(gl_UNISTD_H, +AC_DEFUN_ONCE(gl_UNISTD_H, - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. + dnl Ensure to expand the default settings once only, before all statements + dnl that occur in other macros. AC_REQUIRE(gl_UNISTD_H_DEFAULTS) gl_CHECK_NEXT_HEADERS(unistd.h) @@ -41,7 +41,9 @@ # include <io.h> # endif #endif - , access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir + , access chdir chown copy_file_range dup dup2 dup3 environ euidaccess + execl execle execlp execv execve execvp execvpe + faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass getusershell setusershell endusershell @@ -50,157 +52,219 @@ truncate ttyname_r unlink unlinkat usleep) AC_REQUIRE(AC_C_RESTRICT) + + AC_CHECK_DECLS_ONCE(execvpe) + if test $ac_cv_have_decl_execvpe = no; then + HAVE_DECL_EXECVPE=0 + fi ) +# gl_UNISTD_MODULE_INDICATOR(modulename) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN(gl_UNISTD_MODULE_INDICATOR, - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE(gl_UNISTD_H_DEFAULTS) + dnl Ensure to expand the default settings once only. + gl_UNISTD_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE($1) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS($1) ) +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN(gl_UNISTD_H_REQUIRE_DEFAULTS, + + m4_defun(GL_MODULE_INDICATOR_PREFIX_UNISTD_H_MODULE_INDICATOR_DEFAULTS, + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_ACCESS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CHDIR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CHOWN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_CLOSE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_COPY_FILE_RANGE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_DUP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_DUP2) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_DUP3) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_ENVIRON) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EUIDACCESS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECLE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECLP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECV) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECVE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECVP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_EXECVPE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FACCESSAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FCHDIR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FCHOWNAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FDATASYNC) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FSYNC) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_FTRUNCATE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETCWD) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETDOMAINNAME) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETDTABLESIZE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETENTROPY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETGROUPS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETHOSTNAME) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETLOGIN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETLOGIN_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETOPT_POSIX) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETPAGESIZE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETPASS) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETPASS_GNU) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GETUSERSHELL) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_GROUP_MEMBER) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_ISATTY) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_LCHOWN) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_LINK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_LINKAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_LSEEK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PIPE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PIPE2) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PREAD) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_PWRITE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_READ) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_READLINK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_READLINKAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_RMDIR) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SETHOSTNAME) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SLEEP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SYMLINK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_SYMLINKAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_TRUNCATE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_TTYNAME_R) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNISTD_H_GETOPT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNISTD_H_NONBLOCKING) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNISTD_H_SIGPIPE) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNLINK) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_UNLINKAT) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_USLEEP) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_WRITE) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_ACCESS, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_CHDIR, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_CLOSE, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_DUP, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_DUP2, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECL, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECLE, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECLP, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECV, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECVE, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECVP, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_EXECVPE, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_GETCWD, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_GETPID, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_ISATTY, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_LSEEK, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_READ, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_RMDIR, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_SWAB, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_UNLINK, 1) + gl_MODULE_INDICATOR_INIT_VARIABLE(GNULIB_MDA_WRITE, 1) + ) + m4_require(GL_MODULE_INDICATOR_PREFIX_UNISTD_H_MODULE_INDICATOR_DEFAULTS) + AC_REQUIRE(gl_UNISTD_H_DEFAULTS) +) + AC_DEFUN(gl_UNISTD_H_DEFAULTS, - GNULIB_ACCESS=0; AC_SUBST(GNULIB_ACCESS) - GNULIB_CHDIR=0; AC_SUBST(GNULIB_CHDIR) - GNULIB_CHOWN=0; AC_SUBST(GNULIB_CHOWN) - GNULIB_CLOSE=0; AC_SUBST(GNULIB_CLOSE) - GNULIB_COPY_FILE_RANGE=0; AC_SUBST(GNULIB_COPY_FILE_RANGE) - GNULIB_DUP=0; AC_SUBST(GNULIB_DUP) - GNULIB_DUP2=0; AC_SUBST(GNULIB_DUP2) - GNULIB_DUP3=0; AC_SUBST(GNULIB_DUP3) - GNULIB_ENVIRON=0; AC_SUBST(GNULIB_ENVIRON) - GNULIB_EUIDACCESS=0; AC_SUBST(GNULIB_EUIDACCESS) - GNULIB_FACCESSAT=0; AC_SUBST(GNULIB_FACCESSAT) - GNULIB_FCHDIR=0; AC_SUBST(GNULIB_FCHDIR) - GNULIB_FCHOWNAT=0; AC_SUBST(GNULIB_FCHOWNAT) - GNULIB_FDATASYNC=0; AC_SUBST(GNULIB_FDATASYNC) - GNULIB_FSYNC=0; AC_SUBST(GNULIB_FSYNC) - GNULIB_FTRUNCATE=0; AC_SUBST(GNULIB_FTRUNCATE) - GNULIB_GETCWD=0; AC_SUBST(GNULIB_GETCWD) - GNULIB_GETDOMAINNAME=0; AC_SUBST(GNULIB_GETDOMAINNAME) - GNULIB_GETDTABLESIZE=0; AC_SUBST(GNULIB_GETDTABLESIZE) - GNULIB_GETENTROPY=0; AC_SUBST(GNULIB_GETENTROPY) - GNULIB_GETGROUPS=0; AC_SUBST(GNULIB_GETGROUPS) - GNULIB_GETHOSTNAME=0; AC_SUBST(GNULIB_GETHOSTNAME) - GNULIB_GETLOGIN=0; AC_SUBST(GNULIB_GETLOGIN) - GNULIB_GETLOGIN_R=0; AC_SUBST(GNULIB_GETLOGIN_R) - GNULIB_GETOPT_POSIX=0; AC_SUBST(GNULIB_GETOPT_POSIX) - GNULIB_GETPAGESIZE=0; AC_SUBST(GNULIB_GETPAGESIZE) - GNULIB_GETPASS=0; AC_SUBST(GNULIB_GETPASS) - GNULIB_GETUSERSHELL=0; AC_SUBST(GNULIB_GETUSERSHELL) - GNULIB_GROUP_MEMBER=0; AC_SUBST(GNULIB_GROUP_MEMBER) - GNULIB_ISATTY=0; AC_SUBST(GNULIB_ISATTY) - GNULIB_LCHOWN=0; AC_SUBST(GNULIB_LCHOWN) - GNULIB_LINK=0; AC_SUBST(GNULIB_LINK) - GNULIB_LINKAT=0; AC_SUBST(GNULIB_LINKAT) - GNULIB_LSEEK=0; AC_SUBST(GNULIB_LSEEK) - GNULIB_PIPE=0; AC_SUBST(GNULIB_PIPE) - GNULIB_PIPE2=0; AC_SUBST(GNULIB_PIPE2) - GNULIB_PREAD=0; AC_SUBST(GNULIB_PREAD) - GNULIB_PWRITE=0; AC_SUBST(GNULIB_PWRITE) - GNULIB_READ=0; AC_SUBST(GNULIB_READ) - GNULIB_READLINK=0; AC_SUBST(GNULIB_READLINK) - GNULIB_READLINKAT=0; AC_SUBST(GNULIB_READLINKAT) - GNULIB_RMDIR=0; AC_SUBST(GNULIB_RMDIR) - GNULIB_SETHOSTNAME=0; AC_SUBST(GNULIB_SETHOSTNAME) - GNULIB_SLEEP=0; AC_SUBST(GNULIB_SLEEP)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/warn-on-use.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/warn-on-use.m4
Changed
@@ -1,5 +1,5 @@ # warn-on-use.m4 serial 9 -dnl Copyright (C) 2010-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/warnings.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/warnings.m4
Changed
@@ -1,5 +1,5 @@ # warnings.m4 serial 16 -dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/wchar_t.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/wchar_t.m4
Changed
@@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2020 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/m4/wint_t.m4
Added
@@ -0,0 +1,57 @@ +# wint_t.m4 serial 11 +dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's +dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN(gt_TYPE_WINT_T, + + AC_CACHE_CHECK(for wint_t, gt_cv_c_wint_t, + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #include <wchar.h> + wint_t foo = (wchar_t)'\0';, + ), + gt_cv_c_wint_t=yes, + gt_cv_c_wint_t=no)) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE(HAVE_WINT_T, 1, Define if you have the 'wint_t' type.) + + dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present, + dnl override 'wint_t'. + AC_CACHE_CHECK(whether wint_t is large enough, + gl_cv_type_wint_t_large_enough, + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + #include <wchar.h> + int verifysizeof (wint_t) < sizeof (int) ? -1 : 1; + ), + gl_cv_type_wint_t_large_enough=yes, + gl_cv_type_wint_t_large_enough=no)) + if test $gl_cv_type_wint_t_large_enough = no; then + GNULIBHEADERS_OVERRIDE_WINT_T=1 + else + GNULIBHEADERS_OVERRIDE_WINT_T=0 + fi + else + GNULIBHEADERS_OVERRIDE_WINT_T=0 + fi + AC_SUBST(GNULIBHEADERS_OVERRIDE_WINT_T) +) + +dnl Prerequisites of the 'wint_t' override. +AC_DEFUN(gl_TYPE_WINT_T_PREREQ, + + AC_CHECK_HEADERS_ONCE(crtdefs.h) + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 + fi + AC_SUBST(HAVE_CRTDEFS_H) +)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/m4/zzgnulib.m4 -> _service:tar_scm:enchant-2.5.0.tar.gz/m4/zzgnulib.m4
Changed
@@ -1,5 +1,5 @@ # zzgnulib.m4 serial 1 -dnl Copyright (C) 2020 Free Software Foundation, Inc. +dnl Copyright (C) 2020-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/Makefile.am -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/Makefile.am
Changed
@@ -4,10 +4,10 @@ provider_LTLIBRARIES = providerdir = $(pkglibdir)-@ENCHANT_MAJOR_VERSION@ -AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1 +AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib -I$(top_srcdir)/src $(GLIB_CFLAGS) -D_ENCHANT_BUILD=1 AM_CFLAGS = $(WARN_CFLAGS) AM_CXXFLAGS = $(WARN_CXXFLAGS) -AM_LDFLAGS = -module -avoid-version -no-undefined $(ENCHANT_LIBS) $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(top_builddir)/lib/libgnu.la +AM_LDFLAGS = -module -avoid-version -no-undefined $(GLIB_LIBS) $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(top_builddir)/lib/libgnu.la if WITH_ASPELL provider_LTLIBRARIES += enchant_aspell.la
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/Makefile.in -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -99,31 +99,31 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/assert_h.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ + $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/manywarnings-c++.m4 \ $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -323,8 +323,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -332,18 +330,27 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ +ASSERT_H = @ASSERT_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -358,158 +365,209 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ENCHANT_CFLAGS = @ENCHANT_CFLAGS@ -ENCHANT_LIBS = @ENCHANT_LIBS@ ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@ ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@ ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ -GETOPT_H = @GETOPT_H@ +FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ -GNULIB_ACCESS = @GNULIB_ACCESS@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHDIR = @GNULIB_CHDIR@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@ -GNULIB_DUP = @GNULIB_DUP@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FFSL = @GNULIB_FFSL@ -GNULIB_FFSLL = @GNULIB_FFSLL@ -GNULIB_FLOCK = @GNULIB_FLOCK@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETENTROPY = @GNULIB_GETENTROPY@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS = @GNULIB_GETPASS@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ -GNULIB_ISATTY = @GNULIB_ISATTY@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_PIPE = @GNULIB_PIPE@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PTSNAME = @GNULIB_PTSNAME@ -GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PWRITE = @GNULIB_PWRITE@ -GNULIB_QSORT_R = @GNULIB_QSORT_R@ -GNULIB_RANDOM = @GNULIB_RANDOM@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ -GNULIB_READ = @GNULIB_READ@ -GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ -GNULIB_SETENV = @GNULIB_SETENV@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/enchant_aspell.c -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/enchant_aspell.c
Changed
@@ -16,8 +16,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -103,15 +103,6 @@ } static void -aspell_dict_add_to_personal (EnchantDict * me, - const char *const word, size_t len) -{ - AspellSpeller *manager = (AspellSpeller *) me->user_data; - aspell_speller_add_to_personal (manager, word, len); - aspell_speller_save_all_word_lists (manager); -} - -static void aspell_dict_add_to_session (EnchantDict * me, const char *const word, size_t len) { @@ -119,17 +110,6 @@ aspell_speller_add_to_session (manager, word, len); } -static void -aspell_dict_store_replacement (EnchantDict * me, - const char *const mis, size_t mis_len, - const char *const cor, size_t cor_len) -{ - AspellSpeller *manager = (AspellSpeller *) me->user_data; - aspell_speller_store_replacement (manager, mis, mis_len, - cor, cor_len); - aspell_speller_save_all_word_lists (manager); -} - static EnchantDict * aspell_provider_request_dict (EnchantProvider * me _GL_UNUSED, const char *const tag) { @@ -153,9 +133,7 @@ dict->user_data = (void *) manager; dict->check = aspell_dict_check; dict->suggest = aspell_dict_suggest; - dict->add_to_personal = aspell_dict_add_to_personal; dict->add_to_session = aspell_dict_add_to_session; - dict->store_replacement = aspell_dict_store_replacement; return dict; }
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/enchant_hspell.c -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/enchant_hspell.c
Changed
@@ -1,6 +1,7 @@ /* enchant * Copyright (C) 2003 Yaacov Zamir * Copyright (C) 2004 Dom Lachowicz + * Copyright (C) 2017-2023 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,7 +18,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz and Yaacov Zamir + * In addition, as a special exception, the copyright holders * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/enchant_hunspell.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/enchant_hunspell.cpp
Changed
@@ -1,6 +1,6 @@ /* enchant * Copyright (C) 2003-2004 Joan Moratinos <jmo@softcatala.org>, Dom Lachowicz - * Copyright (C) 2016-2021 Reuben Thomas <rrt@sc3d.org> + * Copyright (C) 2016-2023 Reuben Thomas <rrt@sc3d.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -76,6 +76,8 @@ bool checkWord (const char *word, size_t len); char **suggestWord (const char* const word, size_t len, size_t *out_n_suggs); + void add (const char* const word, size_t len); + void remove (const char* const word, size_t len); const char *getWordchars (); bool apostropheIsWordChar; @@ -86,6 +88,7 @@ GIConv m_translate_out; Hunspell *hunspell; char *wordchars; /* Value returned by getWordChars() */ + char *normalizeUtf8(const char *utf8Word, size_t len); }; /***************************************************************************/ @@ -111,16 +114,24 @@ free(wordchars); } -bool -HunspellChecker::checkWord(const char *utf8Word, size_t len) +char* +HunspellChecker::normalizeUtf8(const char *utf8Word, size_t len) { - if (len > MAXWORDUTF8LEN || !g_iconv_is_valid(m_translate_in)) - return false; + if (len > MAXWORDUTF8LEN + || !g_iconv_is_valid(m_translate_in)) + return NULL; // the 8bit encodings use precomposed forms char *normalizedWord = g_utf8_normalize (utf8Word, len, G_NORMALIZE_NFC); char *out = do_iconv(m_translate_in, normalizedWord); g_free(normalizedWord); + return out; +} + +bool +HunspellChecker::checkWord(const char *utf8Word, size_t len) +{ + char *out = normalizeUtf8(utf8Word, len); if (out == NULL) return false; bool result = hunspell->spell(std::string(out)) != 0; @@ -131,15 +142,10 @@ char** HunspellChecker::suggestWord(const char* const utf8Word, size_t len, size_t *nsug) { - if (len > MAXWORDUTF8LEN - || !g_iconv_is_valid(m_translate_in) - || !g_iconv_is_valid(m_translate_out)) + if (!g_iconv_is_valid(m_translate_out)) return nullptr; - // the 8bit encodings use precomposed forms - char *normalizedWord = g_utf8_normalize (utf8Word, len, G_NORMALIZE_NFC); - char *out = do_iconv(m_translate_in, normalizedWord); - g_free(normalizedWord); + char *out = normalizeUtf8(utf8Word, len); if (out == NULL) return nullptr; @@ -159,6 +165,28 @@ return nullptr; } +void +HunspellChecker::add(const char* const utf8Word, size_t len) +{ + char *out = normalizeUtf8(utf8Word, len); + if (out == NULL) + return; + + hunspell->add(out); + free(out); +} + +void +HunspellChecker::remove(const char* const utf8Word, size_t len) +{ + char *out = normalizeUtf8(utf8Word, len); + if (out == NULL) + return; + + hunspell->remove(out); + free(out); +} + _GL_ATTRIBUTE_PURE const char* HunspellChecker::getWordchars() { @@ -262,8 +290,7 @@ s_buildHashNames (names, tag); for (size_t i = 0; i < names.size (); i++) { - if (g_file_test(namesi.c_str(), G_FILE_TEST_EXISTS) && - s_fileExists(s_correspondingAffFile(namesi))) { + if (s_fileExists(namesi) && s_fileExists(s_correspondingAffFile(namesi))) { return strdup (namesi.c_str()); } } @@ -354,6 +381,22 @@ return 1; } +static void +hunspell_dict_add_to_session (EnchantDict * me, + const char *const word, size_t len) +{ + HunspellChecker * checker = static_cast<HunspellChecker *>(me->user_data); + checker->add(word, len); +} + +static void +hunspell_dict_remove_from_session (EnchantDict * me, + const char *const word, size_t len) +{ + HunspellChecker * checker = static_cast<HunspellChecker *>(me->user_data); + checker->remove(word, len); +} + static const char* hunspell_dict_get_extra_word_characters (EnchantDict *me) { @@ -451,7 +494,8 @@ dict->user_data = (void *) checker; dict->check = hunspell_dict_check; dict->suggest = hunspell_dict_suggest; - // don't implement personal, session + dict->add_to_session = hunspell_dict_add_to_session; + dict->remove_from_session = hunspell_dict_remove_from_session; dict->get_extra_word_characters = hunspell_dict_get_extra_word_characters; dict->is_word_character = hunspell_dict_is_word_character; @@ -474,8 +518,7 @@ std::vector <std::string> names; s_buildHashNames (names, tag); for (size_t i = 0; i < names.size(); i++) { - if (g_file_test (namesi.c_str(), G_FILE_TEST_EXISTS) && - s_fileExists(s_correspondingAffFile(namesi))) + if (s_fileExists(namesi) && s_fileExists(s_correspondingAffFile(namesi))) { return 1; }
View file
_service:tar_scm:enchant-2.3.3.tar.gz/providers/enchant_voikko.c -> _service:tar_scm:enchant-2.5.0.tar.gz/providers/enchant_voikko.c
Changed
@@ -72,6 +72,8 @@ for (*out_n_suggs = 0; voikko_sugg_arr*out_n_suggs != NULL; (*out_n_suggs)++); char **sugg_arr = calloc(sizeof (char *), *out_n_suggs + 1); + if (sugg_arr == NULL) + return NULL; for (size_t i = 0; i < *out_n_suggs; i++) { sugg_arri = strdup (voikko_sugg_arri); } @@ -101,9 +103,10 @@ if (*out_n_dicts) { out_list = calloc (*out_n_dicts + 1, sizeof (char *)); - for (i = 0; i < *out_n_dicts; i++) { - out_listi = strdup (voikko_langsi); - } + if (out_list != NULL) + for (i = 0; i < *out_n_dicts; i++) { + out_listi = strdup (voikko_langsi); + } } voikkoFreeCstrArray(voikko_langs); @@ -145,6 +148,8 @@ } EnchantDict *dict = calloc (sizeof (EnchantDict), 1); + if (dict == NULL) + return NULL; dict->user_data = (void *)voikko_handle; dict->check = voikko_dict_check; dict->suggest = voikko_dict_suggest; @@ -176,6 +181,8 @@ init_enchant_provider (void) { EnchantProvider *provider = calloc (sizeof (EnchantProvider), 1); + if (provider == NULL) + return NULL; provider->dispose = voikko_provider_dispose; provider->request_dict = voikko_provider_request_dict; provider->dispose_dict = voikko_provider_dispose_dict;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/Makefile.am -> _service:tar_scm:enchant-2.5.0.tar.gz/src/Makefile.am
Changed
@@ -1,9 +1,9 @@ -AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib $(ENCHANT_CFLAGS) $(WARN_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib $(GLIB_CFLAGS) $(WARN_CFLAGS) lib_LTLIBRARIES = libenchant-@ENCHANT_MAJOR_VERSION@.la libenchant_@ENCHANT_MAJOR_VERSION@_la_CPPFLAGS = $(AM_CPPFLAGS) -D_ENCHANT_BUILD=1 -DENCHANT_VERSION_STRING=\"@ENCHANT_MAJOR_VERSION@.@ENCHANT_MINOR_VERSION@.@ENCHANT_MICRO_VERSION@\" -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\" -libenchant_@ENCHANT_MAJOR_VERSION@_la_LIBADD = $(top_builddir)/lib/libgnu.la $(ENCHANT_LIBS) $(LTLIBOBJS) +libenchant_@ENCHANT_MAJOR_VERSION@_la_LIBADD = $(top_builddir)/lib/libgnu.la $(GLIB_LIBS) $(LTLIBOBJS) libenchant_@ENCHANT_MAJOR_VERSION@_la_LDFLAGS = -no-undefined -export-symbols-regex '^enchant_.*' if OS_WIN32 @@ -23,12 +23,19 @@ pkgdata_DATA = enchant.ordering -dist_man_MANS = enchant-@ENCHANT_MAJOR_VERSION@.1 enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1 +dist_man_MANS = enchant-@ENCHANT_MAJOR_VERSION@.1 enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1 enchant.5 +nodist_doc_DATA = enchant-@ENCHANT_MAJOR_VERSION@.html enchant-lsmod-@ENCHANT_MAJOR_VERSION@.html enchant.html edit = sed \ -e 's|DATADIR|$(datadir)|g' -DISTCLEANFILES = $(dist_man_MANS) +DISTCLEANFILES = $(dist_man_MANS) $(nodist_doc_DATA) + +.1.html: + groff -mandoc -Thtml $< > $@ + +enchant.html: enchant.5 + groff -mandoc -Thtml $< > $@ enchant-@ENCHANT_MAJOR_VERSION@.1: $(builddir)/enchant.1 Makefile.am $(top_builddir)/config.status rm -f $@ $@.tmp @@ -38,7 +45,7 @@ enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1: $(builddir)/enchant-lsmod.1 Makefile.am $(top_builddir)/config.status cp $(abs_builddir)/enchant-lsmod.1 $@ -LDADD = libenchant-@ENCHANT_MAJOR_VERSION@.la $(ENCHANT_LIBS) $(top_builddir)/lib/libgnu.la +LDADD = libenchant-@ENCHANT_MAJOR_VERSION@.la $(GLIB_LIBS) $(top_builddir)/lib/libgnu.la bin_PROGRAMS = enchant-@ENCHANT_MAJOR_VERSION@ enchant-lsmod-@ENCHANT_MAJOR_VERSION@ enchant_@ENCHANT_MAJOR_VERSION@_SOURCES = enchant.c enchant_lsmod_@ENCHANT_MAJOR_VERSION@_SOURCES = enchant-lsmod.c
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/Makefile.in -> _service:tar_scm:enchant-2.5.0.tar.gz/src/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -99,41 +99,42 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/assert_h.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ + $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/manywarnings-c++.m4 \ $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(libenchant_include_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = libenchant.rc enchant.1 enchant-lsmod.1 +CONFIG_CLEAN_FILES = libenchant.rc enchant.1 enchant-lsmod.1 enchant.5 CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ + "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgdatadir)" \ "$(DESTDIR)$(libenchant_includedir)" PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -251,9 +252,10 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 NROFF = nroff MANS = $(dist_man_MANS) -DATA = $(pkgdata_DATA) +DATA = $(nodist_doc_DATA) $(pkgdata_DATA) HEADERS = $(libenchant_include_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, @@ -272,28 +274,36 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ $(srcdir)/enchant-lsmod.1.in $(srcdir)/enchant.1.in \ - $(srcdir)/libenchant.rc.in $(top_srcdir)/build-aux/depcomp + $(srcdir)/enchant.5.in $(srcdir)/libenchant.rc.in \ + $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ +ASSERT_H = @ASSERT_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -308,158 +318,209 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ENCHANT_CFLAGS = @ENCHANT_CFLAGS@ -ENCHANT_LIBS = @ENCHANT_LIBS@ ENCHANT_MAJOR_VERSION = @ENCHANT_MAJOR_VERSION@ ENCHANT_MICRO_VERSION = @ENCHANT_MICRO_VERSION@ ENCHANT_MINOR_VERSION = @ENCHANT_MINOR_VERSION@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ -GETOPT_H = @GETOPT_H@ +FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ -GNULIB_ACCESS = @GNULIB_ACCESS@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHDIR = @GNULIB_CHDIR@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@ -GNULIB_DUP = @GNULIB_DUP@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FFSL = @GNULIB_FFSL@ -GNULIB_FFSLL = @GNULIB_FFSLL@ -GNULIB_FLOCK = @GNULIB_FLOCK@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETENTROPY = @GNULIB_GETENTROPY@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS = @GNULIB_GETPASS@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ -GNULIB_ISATTY = @GNULIB_ISATTY@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant++.h -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant++.h
Changed
@@ -1,5 +1,6 @@ /* enchant * Copyright (C) 2003 Dom Lachowicz + * Copyright (C) 2017-2022 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant-2.1 -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant-2.1
Changed
@@ -9,7 +9,9 @@ .br .SH DESCRIPTION .B Enchant -is an ispell-compatible spellchecker. +is an Ispell-compatible spellchecker. +Note that unlike Ispell, it does not have an interactive mode; it is +designed to be used by other programs. .TP \fB\-d \fIDICTIONARY\fR use the given dictionary @@ -18,7 +20,7 @@ use the given personal wordlist .TP .B "\-a" -list suggestions in ispell pipe mode format +list suggestions in Ispell pipe mode format .TP .B "\-l" list only the misspellings @@ -31,46 +33,12 @@ .TP .B "\-v" display version information and exit -.SH ENCHANT ORDERING FILE -Enchant uses global and per-user ordering files named \fIenchant.ordering\fR -to decide which spelling provider to use for particular languages. -The per-user file takes precedence. -.PP -The ordering file takes the form \fIlanguage_tag:<comma-separated list of spelling -providers>\fR. The language tag is an IETF BCP 47 language tag, typically of the form \fICOUNTRY_LANGUAGE\fR. -To see what dictionaries are available, run \fIenchant-lsmod-2\fR. '*' is -used to mean "use this ordering for all languages, unless instructed otherwise." For example: -.PP -*:aspell,hunspell,nuspell -.br -en:aspell,hunspell,nuspell -.br -en_GB:hunspell,nuspell,aspell -.br -fr:hunspell,nuspell,aspell .SH FILES AND DIRECTORIES -Enchant looks in the following places for files, in decreasing order of precedence: -.TP -\fIENCHANT_CONFIG_DIR\fR -(If the environment variable is set.) -.TP -\fIXDG_CONFIG_HOME/enchant\fR (non-Windows systems) -Default: \fI~/.config/enchant\fR -.TP -\fICSIDL_LOCAL_APPDATA\\enchant\fR (Windows systems) -Default: \fIC:\\Documents and Settings\\\fRusername\fI\\Local Settings\\Application Data\\enchant -.TP -\fI/home/rrt/.local/share/enchant\fR -(Or the equivalent location relative to the enchant library for a relocatable build.) -.PP -Dictionaries are looked for in a subdirectory with the same name as the -provider; for example, \fI/home/rrt/.local/share/enchant/hunspell\fR and -\fI~/.config/enchant/hunspell\fR. -.PP -Some providers may also look in a standard system directory for their -dictionaries; the hunspell provider can be configured to do so at build -time. +See +.BR enchant (5) +for details of configuration files and personal word lists. .SH "SEE ALSO" +.BR enchant-2 (5), .BR aspell (1), .BR enchant-lsmod-2 (1) .SH "AUTHOR"
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant-lsmod-2.1 -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant-lsmod-2.1
Changed
@@ -1,6 +1,6 @@ .TH ENCHANT-LSMOD-2 1 "August 2017" .SH NAME -Enchant \- list provider and dictionary information +enchant-lsmod \- list provider and dictionary information .SH SYNOPSIS .ll +8 .B enchant-lsmod-2 @@ -9,7 +9,7 @@ .br .SH DESCRIPTION .B enchant-lsmod-2 -gives information about Enchant's spell-checker providers and the dictionaries each offers. +gives information about Enchant\(cqs spell-checker providers and the dictionaries each offers. See \fBenchant-2\fR(1) for details about how the providers and dictionaries are located. If no command-line options are given, the available providers are listed. .SS OPTIONS @@ -27,7 +27,7 @@ Show brief help. .TP .B "\-version" -Prints the program's version. +Prints the program\(cqs version. .SH "SEE ALSO" .BR enchant-2(1) .SH "AUTHOR"
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant-lsmod.1.in -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant-lsmod.1.in
Changed
@@ -1,6 +1,6 @@ .TH ENCHANT-LSMOD-@ENCHANT_MAJOR_VERSION@ 1 "August 2017" .SH NAME -Enchant \- list provider and dictionary information +enchant-lsmod \- list provider and dictionary information .SH SYNOPSIS .ll +8 .B enchant-lsmod-@ENCHANT_MAJOR_VERSION@ @@ -9,7 +9,7 @@ .br .SH DESCRIPTION .B enchant-lsmod-@ENCHANT_MAJOR_VERSION@ -gives information about Enchant's spell-checker providers and the dictionaries each offers. +gives information about Enchant\(cqs spell-checker providers and the dictionaries each offers. See \fBenchant-@ENCHANT_MAJOR_VERSION@\fR(1) for details about how the providers and dictionaries are located. If no command-line options are given, the available providers are listed. .SS OPTIONS @@ -27,7 +27,7 @@ Show brief help. .TP .B "\-version" -Prints the program's version. +Prints the program\(cqs version. .SH "SEE ALSO" .BR enchant-@ENCHANT_MAJOR_VERSION@(1) .SH "AUTHOR"
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant-provider.h -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant-provider.h
Changed
@@ -1,5 +1,6 @@ /* enchant * Copyright (C) 2003 Dom Lachowicz + * Copyright (C) 2017-2021 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -134,17 +135,10 @@ const char *const word, size_t len, size_t * out_n_suggs); - void (*add_to_personal) (struct str_enchant_dict * me, - const char *const word, size_t len); - void (*add_to_session) (struct str_enchant_dict * me, const char *const word, size_t len); - void (*store_replacement) (struct str_enchant_dict * me, - const char *const mis, size_t mis_len, - const char *const cor, size_t cor_len); - - void (*add_to_exclude) (struct str_enchant_dict * me, + void (*remove_from_session) (struct str_enchant_dict * me, const char *const word, size_t len); const char * (*get_extra_word_characters) (struct str_enchant_dict * me);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant.1.in -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant.1.in
Changed
@@ -9,7 +9,9 @@ .br .SH DESCRIPTION .B Enchant -is an ispell-compatible spellchecker. +is an Ispell-compatible spellchecker. +Note that unlike Ispell, it does not have an interactive mode; it is +designed to be used by other programs. .TP \fB\-d \fIDICTIONARY\fR use the given dictionary @@ -18,7 +20,7 @@ use the given personal wordlist .TP .B "\-a" -list suggestions in ispell pipe mode format +list suggestions in Ispell pipe mode format .TP .B "\-l" list only the misspellings @@ -31,46 +33,12 @@ .TP .B "\-v" display version information and exit -.SH ENCHANT ORDERING FILE -Enchant uses global and per-user ordering files named \fIenchant.ordering\fR -to decide which spelling provider to use for particular languages. -The per-user file takes precedence. -.PP -The ordering file takes the form \fIlanguage_tag:<comma-separated list of spelling -providers>\fR. The language tag is an IETF BCP 47 language tag, typically of the form \fICOUNTRY_LANGUAGE\fR. -To see what dictionaries are available, run \fIenchant-lsmod-@ENCHANT_MAJOR_VERSION@\fR. '*' is -used to mean "use this ordering for all languages, unless instructed otherwise." For example: -.PP -*:aspell,hunspell,nuspell -.br -en:aspell,hunspell,nuspell -.br -en_GB:hunspell,nuspell,aspell -.br -fr:hunspell,nuspell,aspell .SH FILES AND DIRECTORIES -Enchant looks in the following places for files, in decreasing order of precedence: -.TP -\fIENCHANT_CONFIG_DIR\fR -(If the environment variable is set.) -.TP -\fIXDG_CONFIG_HOME/enchant\fR (non-Windows systems) -Default: \fI~/.config/enchant\fR -.TP -\fICSIDL_LOCAL_APPDATA\\enchant\fR (Windows systems) -Default: \fIC:\\Documents and Settings\\\fRusername\fI\\Local Settings\\Application Data\\enchant -.TP -\fIDATADIR/enchant\fR -(Or the equivalent location relative to the enchant library for a relocatable build.) -.PP -Dictionaries are looked for in a subdirectory with the same name as the -provider; for example, \fIDATADIR/enchant/hunspell\fR and -\fI~/.config/enchant/hunspell\fR. -.PP -Some providers may also look in a standard system directory for their -dictionaries; the hunspell provider can be configured to do so at build -time. +See +.BR enchant (5) +for details of configuration files and personal word lists. .SH "SEE ALSO" +.BR enchant-@ENCHANT_MAJOR_VERSION@ (5), .BR aspell (1), .BR enchant-lsmod-@ENCHANT_MAJOR_VERSION@ (1) .SH "AUTHOR"
View file
_service:tar_scm:enchant-2.5.0.tar.gz/src/enchant.5
Added
@@ -0,0 +1,84 @@ +.TH ENCHANT 5 +.SH NAME +Enchant \- enchant ordering files and personal word lists +.SH ORDERING FILE +Enchant uses global and per-user ordering files named \fIenchant.ordering\fR +to decide which spelling provider to use for particular languages. +The per-user file takes precedence. +.PP +The ordering file takes the form \fIlanguage_tag:<comma-separated list of spelling +providers>\fR. The language tag is an IETF BCP 47 language tag, typically of the form \fICOUNTRY_LANGUAGE\fR. +To see what dictionaries are available, run \fIenchant-lsmod-2\fR. \(oq*\(cq is +used to mean \(lquse this ordering for all languages, unless instructed otherwise.\(rq For example: +.IP +*:aspell,hunspell,nuspell +.br +en:aspell,hunspell,nuspell +.br +en_GB:hunspell,nuspell,aspell +.br +fr:hunspell,nuspell,aspell +.SH PERSONAL WORD LISTS +Personal word lists are simple plain text files with one word per line. +Lines starting with a hash sign \(oq#\(cq are ignored. +.SS SHARING PERSONAL WORD LISTS BETWEEN SPELL-CHECKERS +It is possible, and usually safe, to share Enchant\(cqs personal word lists +with other spelling checkers that use the same format (note that other +spell-checkers may not support comments!). The spell-checkers known to be +compatible are Hunspell, Nuspell and Ispell. (Although Enchant does not +support Ispell as a back-end, it\(cqs still fine to share word lists with it.) +Other spell-checkers supported by Enchant are either incompatible, or have +no personal word list mechanism. There may well be yet other spell-checkers, +unknown to Enchant, that use the same format. +.PP +Some applications use Hunspell or Nuspell, but store the personal word list +under another name or in another location. Firefox is one example. Firefox +also seems to reorder its word list when updating it; again, this is OK, as +the result is still in the same format. Anonther example is Thunderbird. +.PP +To share word lists with Enchant, find the other spelling checker\(cqs word +list file, e.g. \fI~/.hunspell_fr_FR\fR or \fI~/.config/nuspell/fr_FR\fR, +and merge it with the corresponding Enchant file, in this case +\fI~/.config/enchant/fr_FR.dic\fR. Use the following command, replacing +\fIENCHANT-DICT\fR and \fIOTHER-DICT\fR with the corresponding dictionary +file names: +.IP +cat ENCHANT-DICT OTHER-DICT | sort -u > merged.txt +.PP +Take a look at merged.txt to check the merge has worked, then +.IP +mv merged.txt ENCHANT-DICT +.br +rm OTHER-DICT +.br +ln -s OTHER-DICT ENCHANT-DICT +.PP +to replace the other dictionary file with a link to the Enchant dictionary, +again filling in the name of the dictionary files. +.SH FILES AND DIRECTORIES +Enchant looks in the following places for files, in decreasing order of precedence: +.TP +\fIENCHANT_CONFIG_DIR\fR +(If the environment variable is set.) +.TP +\fIXDG_CONFIG_HOME/enchant\fR (non-Windows systems) +Default: \fI~/.config/enchant\fR +.TP +\fICSIDL_LOCAL_APPDATA\\enchant\fR (Windows systems) +Default: \fIC:\\Documents and Settings\\\fRusername\fI\\Local Settings\\Application Data\\enchant +.TP +\fIDATADIR/enchant\fR +(Or the equivalent location relative to the enchant library for a relocatable build.) +.PP +Dictionaries are looked for in a subdirectory with the same name as the +provider; for example, \fIDATADIR/enchant/hunspell\fR and +\fI~/.config/enchant/hunspell\fR. +.PP +Some providers may also look in a standard system directory for their +dictionaries; the hunspell provider can be configured to do so at build +time. +.SH "SEE ALSO" +.BR enchant-2 (1), +.BR enchant-lsmod-2 (1) +.SH "AUTHOR" +Written by Dom Lachowicz and Reuben Thomas.
View file
_service:tar_scm:enchant-2.5.0.tar.gz/src/enchant.5.in
Added
@@ -0,0 +1,84 @@ +.TH ENCHANT 5 +.SH NAME +Enchant \- enchant ordering files and personal word lists +.SH ORDERING FILE +Enchant uses global and per-user ordering files named \fIenchant.ordering\fR +to decide which spelling provider to use for particular languages. +The per-user file takes precedence. +.PP +The ordering file takes the form \fIlanguage_tag:<comma-separated list of spelling +providers>\fR. The language tag is an IETF BCP 47 language tag, typically of the form \fICOUNTRY_LANGUAGE\fR. +To see what dictionaries are available, run \fIenchant-lsmod-@ENCHANT_MAJOR_VERSION@\fR. \(oq*\(cq is +used to mean \(lquse this ordering for all languages, unless instructed otherwise.\(rq For example: +.IP +*:aspell,hunspell,nuspell +.br +en:aspell,hunspell,nuspell +.br +en_GB:hunspell,nuspell,aspell +.br +fr:hunspell,nuspell,aspell +.SH PERSONAL WORD LISTS +Personal word lists are simple plain text files with one word per line. +Lines starting with a hash sign \(oq#\(cq are ignored. +.SS SHARING PERSONAL WORD LISTS BETWEEN SPELL-CHECKERS +It is possible, and usually safe, to share Enchant\(cqs personal word lists +with other spelling checkers that use the same format (note that other +spell-checkers may not support comments!). The spell-checkers known to be +compatible are Hunspell, Nuspell and Ispell. (Although Enchant does not +support Ispell as a back-end, it\(cqs still fine to share word lists with it.) +Other spell-checkers supported by Enchant are either incompatible, or have +no personal word list mechanism. There may well be yet other spell-checkers, +unknown to Enchant, that use the same format. +.PP +Some applications use Hunspell or Nuspell, but store the personal word list +under another name or in another location. Firefox is one example. Firefox +also seems to reorder its word list when updating it; again, this is OK, as +the result is still in the same format. Anonther example is Thunderbird. +.PP +To share word lists with Enchant, find the other spelling checker\(cqs word +list file, e.g. \fI~/.hunspell_fr_FR\fR or \fI~/.config/nuspell/fr_FR\fR, +and merge it with the corresponding Enchant file, in this case +\fI~/.config/enchant/fr_FR.dic\fR. Use the following command, replacing +\fIENCHANT-DICT\fR and \fIOTHER-DICT\fR with the corresponding dictionary +file names: +.IP +cat ENCHANT-DICT OTHER-DICT | sort -u > merged.txt +.PP +Take a look at merged.txt to check the merge has worked, then +.IP +mv merged.txt ENCHANT-DICT +.br +rm OTHER-DICT +.br +ln -s OTHER-DICT ENCHANT-DICT +.PP +to replace the other dictionary file with a link to the Enchant dictionary, +again filling in the name of the dictionary files. +.SH FILES AND DIRECTORIES +Enchant looks in the following places for files, in decreasing order of precedence: +.TP +\fIENCHANT_CONFIG_DIR\fR +(If the environment variable is set.) +.TP +\fIXDG_CONFIG_HOME/enchant\fR (non-Windows systems) +Default: \fI~/.config/enchant\fR +.TP +\fICSIDL_LOCAL_APPDATA\\enchant\fR (Windows systems) +Default: \fIC:\\Documents and Settings\\\fRusername\fI\\Local Settings\\Application Data\\enchant +.TP +\fIDATADIR/enchant\fR +(Or the equivalent location relative to the enchant library for a relocatable build.) +.PP +Dictionaries are looked for in a subdirectory with the same name as the +provider; for example, \fIDATADIR/enchant/hunspell\fR and +\fI~/.config/enchant/hunspell\fR. +.PP +Some providers may also look in a standard system directory for their +dictionaries; the hunspell provider can be configured to do so at build +time. +.SH "SEE ALSO" +.BR enchant-@ENCHANT_MAJOR_VERSION@ (1), +.BR enchant-lsmod-@ENCHANT_MAJOR_VERSION@ (1) +.SH "AUTHOR" +Written by Dom Lachowicz and Reuben Thomas.
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant.c -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant.c
Changed
@@ -1,7 +1,8 @@ -/* enchant +/* enchant: An ispell-compatible command-line front-end for libenchant. + * * Copyright (C) 2003 Dom Lachowicz * 2007 Hannu Väisänen - * 2016-2021 Reuben Thomas + * 2016-2023 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,10 +30,6 @@ * do so, delete this exception statement from your version. */ -/** - * This is an ispell-compatible command-line version of Enchant. - */ - #include "config.h" #include <stdio.h> @@ -47,7 +44,6 @@ #endif #include "enchant.h" -#include "pwl.h" #include "enchant-provider.h" @@ -77,7 +73,7 @@ "Usage: %s -a|-l|-h|-v -L -d DICTIONARY FILE\n\ -d DICTIONARY use the given dictionary\n\ -p FILE use the given personal word list\n\ - -a list suggestions in ispell pipe mode format\n\ + -a communicate non-interactively through a pipe like Ispell\n\ -l list only the misspellings\n\ -L display line numbers\n\ -h display help and exit\n\ @@ -134,19 +130,16 @@ } static int -check_word (EnchantDict * dict, EnchantPWL * pwl, GString * word) +check_word (EnchantDict * dict, GString * word) { - int ok = word->len <= MIN_WORD_LENGTH || + return word->len <= MIN_WORD_LENGTH || enchant_dict_check (dict, word->str, word->len) == 0; - if (!ok && pwl) - ok = enchant_pwl_check (pwl, word->str, word->len) == 0; - return ok; } static void -do_mode_a (EnchantDict * dict, EnchantPWL * pwl, GString * word, size_t start_pos, size_t lineCount, gboolean terse_mode) +do_mode_a (EnchantDict * dict, GString * word, size_t start_pos, size_t lineCount, gboolean terse_mode) { - if (check_word (dict, pwl, word)) { + if (check_word (dict, word)) { if (!terse_mode) { if (lineCount) printf ("* %u\n", (unsigned int)lineCount); @@ -156,8 +149,6 @@ } else { size_t n_suggs; char ** suggs = enchant_dict_suggest (dict, word->str, word->len, &n_suggs); - if (pwl) - suggs = enchant_pwl_suggest (pwl, word->str, word->len, suggs, &n_suggs); if (!n_suggs || !suggs) { printf ("# "); if (lineCount) @@ -177,9 +168,8 @@ if (i != (n_suggs - 1)) putchar(','); - else - putchar('\n'); } + putchar('\n'); enchant_dict_free_string_list (dict, suggs); } @@ -187,9 +177,9 @@ } static void -do_mode_l (EnchantDict * dict, EnchantPWL * pwl, GString * word, size_t lineCount) +do_mode_l (EnchantDict * dict, GString * word, size_t lineCount) { - if (!check_word (dict, pwl, word)) { + if (!check_word (dict, word)) { if (lineCount) printf ("%u ", (unsigned int)lineCount); print_utf (word->str); @@ -251,7 +241,7 @@ } static int -parse_file (FILE * in, IspellMode_t mode, gboolean countLines, gchar *dictionary, EnchantPWL *pwl) +parse_file (FILE * in, IspellMode_t mode, gboolean countLines, gchar *dictionary, gchar *perslist) { EnchantBroker * broker; EnchantDict * dict; @@ -277,7 +267,7 @@ /* Enchant will get rid of trailing information like de_DE@euro or de_DE.ISO-8859-15 */ broker = enchant_broker_init (); - dict = enchant_broker_request_dict (broker, lang); + dict = enchant_broker_request_dict_with_pwl (broker, lang, perslist); if (!dict) { fprintf (stderr, "Couldn't create a dictionary for %s\n", lang); @@ -314,10 +304,7 @@ case '*': /* Insert in personal word list */ if (str->len == 1) goto empty_word; - if (pwl) - enchant_pwl_add (pwl, str->str + 1, -1); - else - enchant_dict_add (dict, str->str + 1, -1); + enchant_dict_add (dict, str->str + 1, -1); break; case '@': /* Accept for this session */ if (str->len == 1) @@ -327,10 +314,7 @@ case '/': /* Remove from personal word list */ if (str->len == 1) goto empty_word; - if (pwl) - enchant_pwl_remove (pwl, str->str + 1, -1); - else - enchant_dict_remove (dict, str->str + 1, -1); + enchant_dict_remove (dict, str->str + 1, -1); break; case '_': /* Remove from this session */ if (str->len == 1) @@ -394,9 +378,9 @@ tokens = tokens->next; if (mode == MODE_A) - do_mode_a (dict, pwl, word, pos, lineCount, terse_mode); + do_mode_a (dict, word, pos, lineCount, terse_mode); else if (mode == MODE_L) - do_mode_l (dict, pwl, word, lineCount); + do_mode_l (dict, word, lineCount); g_string_free(word, TRUE); } @@ -499,17 +483,7 @@ exit (1); } } - EnchantPWL *pwl = NULL; - if (perslist) { - pwl = enchant_pwl_init_with_file (perslist); - if (!pwl) { - fprintf (stderr, "Error: Could not read the personal word list \"%s\"", perslist); - exit (1); - } - } - rval = parse_file (fp, mode, countLines, dictionary, pwl); - if (pwl) - enchant_pwl_free (pwl); + rval = parse_file (fp, mode, countLines, dictionary, perslist); if (file) fclose (fp);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/enchant.h -> _service:tar_scm:enchant-2.5.0.tar.gz/src/enchant.h
Changed
@@ -1,5 +1,6 @@ /* enchant * Copyright (C) 2003 Dom Lachowicz + * Copyright (C) 2016-2023 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -65,10 +66,22 @@ * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) * * Returns: An #EnchantDict, or %null if no suitable dictionary could be found. This dictionary is reference counted. + * The default personal wordlist file is used. */ EnchantDict *enchant_broker_request_dict (EnchantBroker * broker, const char *const tag); /** + * enchant_broker_request_dict_with_pwl + * @broker: A non-null #EnchantBroker + * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) + * @pwl: A non-null pathname in the GLib file name encoding (UTF-8 on Windows) to the personal wordlist file + * + * Returns: An #EnchantDict, or %null if no suitable dictionary could be found, or if the pwl could not be opened. + * This dictionary is reference counted. + */ +EnchantDict *enchant_broker_request_dict_with_pwl (EnchantBroker * broker, const char *const tag, const char *pwl); + +/** * enchant_broker_request_pwl_dict * * PWL is a personal wordlist file, 1 entry per line @@ -170,8 +183,8 @@ * @len: The byte length of @word, or -1 for strlen (@word) * @out_n_suggs: The location to store the # of suggestions returned, or %null * - * Will return an %null value if any of those pre-conditions - * are not met. + * Will return a %null value if any of those pre-conditions + * is not met. * * Returns: A %null terminated list of UTF-8 encoded suggestions, or %null */ @@ -184,8 +197,8 @@ * @word: The non-null word you wish to add to your personal dictionary, in UTF-8 encoding * @len: The byte length of @word, or -1 for strlen (@word) * - * Remarks: if the word exists in the exclude dictionary, it will be removed from the - * exclude dictionary + * The word is also added to the session. If the word exists in the exclude + * dictionary, it will be removed from the exclude dictionary. */ void enchant_dict_add (EnchantDict * dict, const char *const word, ssize_t len); @@ -205,6 +218,7 @@ * remove from the personal dictionary, in UTF-8 encoding * @len: The byte length of @word, or -1 for strlen (@word) * + * The word is also removed from the session. */ void enchant_dict_remove (EnchantDict * dict, const char *const word, ssize_t len); @@ -241,9 +255,7 @@ * @cor: The non-null correction word, in UTF-8 encoding * @cor_len: The byte length of @cor, or -1 for strlen (@cor) * - * Notes that you replaced @mis with @cor, so it's possibly more likely - * that future occurrences of @mis will be replaced with @cor. So it might - * bump @cor up in the suggestion list. + * Does nothing; API is deprecated and retained only for backwards compatibility. */ void enchant_dict_store_replacement (EnchantDict * dict, const char *const mis, ssize_t mis_len,
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/lib.c -> _service:tar_scm:enchant-2.5.0.tar.gz/src/lib.c
Changed
@@ -1,6 +1,6 @@ /* enchant * Copyright (C) 2003, 2004 Dom Lachowicz - * Copyright (C) 2017-2021 Reuben Thomas <rrt@sc3d.org> + * Copyright (C) 2016-2023 Reuben Thomas <rrt@sc3d.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -112,7 +112,7 @@ } } -char * +_GL_ATTRIBUTE_MALLOC char * enchant_get_user_config_dir (void) { const gchar * env = g_getenv("ENCHANT_CONFIG_DIR"); @@ -140,6 +140,7 @@ goto error_exit; conf_dirs = g_slist_append (conf_dirs, pkgconfdir); free (sysconfdir); + sysconfdir = NULL; if ((user_config_dir = enchant_get_user_config_dir ()) == NULL) goto error_exit; @@ -265,42 +266,31 @@ } static EnchantSession * -_enchant_session_new (EnchantProvider *provider, const char * const user_config_dir, - const char * const lang, gboolean fail_if_no_pwl) +enchant_session_new (EnchantProvider *provider, const char * const lang, const char * pwl) { + char *user_config_dir = enchant_get_user_config_dir (); + + EnchantSession * session = NULL; if (!user_config_dir || !lang) return NULL; + enchant_ensure_dir_exists (user_config_dir); - char *filename = g_strdup_printf ("%s.dic", lang); - char *dic = g_build_filename (user_config_dir, filename, NULL); - g_free (filename); + char *filename, *excl = NULL, *alloc_pwl = NULL; + if (pwl == NULL) { + filename = g_strdup_printf ("%s.dic", lang); + pwl = alloc_pwl = g_build_filename (user_config_dir, filename, NULL); + g_free (filename); - filename = g_strdup_printf ("%s.exc", lang); - char *excl = g_build_filename (user_config_dir, filename, NULL); - g_free (filename); + filename = g_strdup_printf ("%s.exc", lang); + excl = g_build_filename (user_config_dir, filename, NULL); + g_free (filename); + } - EnchantSession * session = enchant_session_new_with_pwl (provider, dic, excl, lang, fail_if_no_pwl); + // Insist that PWL be opened only if we supplied it explicitly. + session = enchant_session_new_with_pwl (provider, pwl, excl, lang, alloc_pwl == NULL); - g_free (dic); + g_free (alloc_pwl); g_free (excl); - - return session; -} - -static EnchantSession * -enchant_session_new (EnchantProvider *provider, const char * const lang) -{ - char *user_config_dir = enchant_get_user_config_dir (); - - EnchantSession * session = NULL; - session = _enchant_session_new (provider, user_config_dir, lang, TRUE); - - if (session == NULL && user_config_dir != NULL) - { - enchant_ensure_dir_exists (user_config_dir); - session = _enchant_session_new (provider, user_config_dir, lang, FALSE); - } - g_free (user_config_dir); return session; @@ -322,30 +312,6 @@ g_hash_table_insert (session->session_exclude, key, GINT_TO_POINTER(TRUE)); } -static void -enchant_session_add_personal (EnchantSession * session, const char * const word, size_t len) -{ - enchant_pwl_add(session->personal, word, len); -} - -static void -enchant_session_remove_personal (EnchantSession * session, const char * const word, size_t len) -{ - enchant_pwl_remove(session->personal, word, len); -} - -static void -enchant_session_add_exclude (EnchantSession * session, const char * const word, size_t len) -{ - enchant_pwl_add(session->exclude, word, len); -} - -static void -enchant_session_remove_exclude (EnchantSession * session, const char * const word, size_t len) -{ - enchant_pwl_remove(session->exclude, word, len); -} - /* a word is excluded if it is in the exclude dictionary or in the session exclude list * AND the word has not been added to the session include list */ @@ -509,8 +475,8 @@ g_return_val_if_fail (len, NULL); g_return_val_if_fail (g_utf8_validate(word, len, NULL), NULL); - size_t n_dict_suggs = 0, n_pwl_suggs = 0, n_suggsT = 0; - char **dict_suggs = NULL, **pwl_suggs = NULL, **suggsT; + size_t n_dict_suggs = 0, n_suggsT = 0; + char **dict_suggs = NULL, **suggsT; EnchantSession * session = ((EnchantDictPrivateData*)dict->enchant_private_data)->session; enchant_session_clear_error (session); @@ -528,31 +494,18 @@ } } - /* Check for suggestions from personal dictionary */ - if (session->personal) - { - pwl_suggs = enchant_pwl_suggest(session->personal, word, len, dict_suggs, &n_pwl_suggs); - if (pwl_suggs) - { - suggsT = enchant_dict_get_good_suggestions(dict, pwl_suggs, n_pwl_suggs, &n_suggsT); - enchant_free_string_list (pwl_suggs); - pwl_suggs = suggsT; - n_pwl_suggs = n_suggsT; - } - } - /* Clone suggestions, if any */ char **suggs = NULL; - size_t n_suggs = n_pwl_suggs + n_dict_suggs; + size_t n_suggs = n_dict_suggs; if (n_suggs > 0) { suggs = g_new0 (char *, n_suggs + 1); - n_suggs = enchant_dict_merge_suggestions(suggs, 0, dict_suggs, n_dict_suggs); - n_suggs = enchant_dict_merge_suggestions(suggs, n_suggs, pwl_suggs, n_pwl_suggs); + n_suggs = 0; + if (dict_suggs != NULL) + n_suggs = enchant_dict_merge_suggestions(suggs, n_suggs, dict_suggs, n_dict_suggs); } g_strfreev(dict_suggs); - g_strfreev(pwl_suggs); if (out_n_suggs) *out_n_suggs = n_suggs; @@ -560,6 +513,24 @@ return suggs; } +static void +enchant_dict_session_add (EnchantDict * dict, const char *const word, ssize_t len) +{ + EnchantSession * session = ((EnchantDictPrivateData*)dict->enchant_private_data)->session; + enchant_session_add (session, word, len); + if (dict->add_to_session) + (*dict->add_to_session) (dict, word, len); +} + +static void +enchant_dict_session_remove (EnchantDict * dict, const char *const word, ssize_t len) +{ + EnchantSession * session = ((EnchantDictPrivateData*)dict->enchant_private_data)->session; + enchant_session_remove (session, word, len); + if (dict->remove_from_session) + (*dict->remove_from_session) (dict, word, len); +} + void enchant_dict_add (EnchantDict * dict, const char *const word, ssize_t len) { @@ -574,11 +545,10 @@ EnchantSession * session = ((EnchantDictPrivateData*)dict->enchant_private_data)->session; enchant_session_clear_error (session); - enchant_session_add_personal (session, word, len); - enchant_session_remove_exclude (session, word, len); - if (dict->add_to_personal) - (*dict->add_to_personal) (dict, word, len); + enchant_dict_session_add (dict, word, len); + enchant_pwl_add(session->personal, word, len); + enchant_pwl_remove(session->exclude, word, len);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/libenchant.rc -> _service:tar_scm:enchant-2.5.0.tar.gz/src/libenchant.rc
Changed
@@ -1,8 +1,8 @@ #include <winver.h> VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,3,3 - PRODUCTVERSION 2,3,3,0 + FILEVERSION 2,5,0 + PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0 FILEFLAGS 0 FILEOS VOS__WINDOWS32 @@ -15,12 +15,12 @@ BEGIN VALUE "CompanyName", "none" VALUE "FileDescription", "libenchant" - VALUE "FileVersion", "2.3.3" - VALUE "InternalName", "libenchant-2.3" + VALUE "FileVersion", "2.5.0" + VALUE "InternalName", "libenchant-2.5" VALUE "LegalCopyright", "Copyright (C) 2002-2007 Dom Lachowicz" - VALUE "OriginalFilename", "libenchant-2.3.dll" + VALUE "OriginalFilename", "libenchant-2.5.dll" VALUE "ProductName", "libenchant" - VALUE "ProductVersion", "2.3.3" + VALUE "ProductVersion", "2.5.0" END END BLOCK "VarFileInfo"
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/pwl.c -> _service:tar_scm:enchant-2.5.0.tar.gz/src/pwl.c
Changed
@@ -1,6 +1,6 @@ /* enchant * Copyright (C) 2003, 2004 Dom Lachowicz - * Copyright (C) 2016-2021 Reuben Thomas <rrt@sc3d.org> + * Copyright (C) 2016-2023 Reuben Thomas <rrt@sc3d.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -29,27 +29,8 @@ */ /** - * * This file implements personal word list (PWL) dictionaries in the * type EnchantPWL. - * - * Under the hood, a PWL is stored as a Trie. Checking strings for - * correctness and making suggestions is done by traversing the Trie - * while allowing a certain number of miss-steps. Due to the prefix - * compression of the Trie, this allows all strings in the PWL within - * a given edit distance of the target word to be enumerated quite - * efficiently. - * - * Ideas for the future: - * - * - Order the suggestions first by edit distance, then by - * soundex key, to put the most similar sounding suggestions - * at the front of the list. Would need a "soundex" that is - * general enough to handle languages other than English. - * - * - iterative deepening to find suggestions, rather than a straight - * search to depth three. - * */ #include "config.h" @@ -68,118 +49,24 @@ #include "pwl.h" -#define ENCHANT_PWL_MAX_ERRORS 3 -#define ENCHANT_PWL_MAX_SUGGS 15 - static const gunichar BOM = 0xfeff; -/* A PWL dictionary is stored as a Trie-like data structure EnchantTrie. - * The EnchantTrie datatype is completely recursive - all child nodes - * are simply EnchantTrie pointers. This means that all functions - * that potentially modify a trie need to return the modified trie, - * as additional memory may have been allocated. - * - * The empty trie is simply the null pointer. If a trie contains - * a single string, it is recorded in the "value" attribute and - * "subtries" is set to NULL. When two or more strings are contained, - * "value" is NULL and "subtries" is a GHashTable mapping the first - * character of each string to the subtrie containing the remainder of - * that string. - * - * All strings stored in the Trie are assumed to be in UTF format. - * Branching is done on unicode characters, not individual bytes. +/* A PWL dictionary is stored as a GHashTable of UTF-8 strings. */ -typedef struct str_enchant_trie EnchantTrie; -struct str_enchant_trie -{ - char* value; /* final string found under this node */ - GHashTable* subtries; /* Maps characters to subtries */ -}; - struct str_enchant_pwl { - EnchantTrie* trie; char * filename; time_t file_changed; - GHashTable *words_in_trie; -}; - -/* Special Trie node indicating the end of a string */ -static EnchantTrie n_EOSTrie; -static EnchantTrie* EOSTrie = &n_EOSTrie; - -/* mode for searching trie */ -typedef enum enum_matcher_mode EnchantTrieMatcherMode; -enum enum_matcher_mode -{ - case_sensitive, - case_insensitive -}; - -/* The EnchantTrieMatcher structure maintains the state necessary to - * search for matching strings within an EnchantTrie. It includes a - * callback function which will be called with each matching string - * as it is found. The arguments to this function are: - * - * - a freshly-allocated copy of the matching string, which must - * be freed by external code - * - the EnchantTrieMatcher object, giving the context of the match - * (e.g. number of errors) - */ -typedef struct str_enchant_trie_matcher EnchantTrieMatcher; -struct str_enchant_trie_matcher -{ - int num_errors; /* Num errors encountered so far. */ - int max_errors; /* Max errors before search should terminate */ - - char* word; /* Word being searched for */ - ssize_t word_pos; /* Current position in the word */ - - char* path; /* Path taken through the trie so far */ - ssize_t path_len; /* Length of allocated path string */ - ssize_t path_pos; /* Current end pos of path string */ - - EnchantTrieMatcherMode mode; - - void (*cbfunc)(char*,EnchantTrieMatcher*); /* callback func */ - void* cbdata; /* Private data for use by callback func */ + GHashTable *words; }; -/* To allow the list of suggestions to be built up an item at a time, - * its state is maintained in an EnchantSuggList object. - */ -typedef struct str_enchant_sugg_list -{ - char** suggs; - int* sugg_errs; - size_t n_suggs; -} EnchantSuggList; - /* * Function Prototypes */ -static void enchant_pwl_add_to_trie(EnchantPWL *pwl, +static void enchant_pwl_add_to_table(EnchantPWL *pwl, const char *const word, size_t len); static void enchant_pwl_refresh_from_file(EnchantPWL* pwl); -static void enchant_pwl_check_cb(char* match,EnchantTrieMatcher* matcher); -static void enchant_pwl_suggest_cb(char* match,EnchantTrieMatcher* matcher); -static void enchant_trie_free(EnchantTrie* trie); -static void enchant_trie_free_cb(void*,void*,void*); -static EnchantTrie* enchant_trie_insert(EnchantTrie* trie,const char *const word); -static void enchant_trie_remove(EnchantTrie* trie,const char *const word); -static void enchant_trie_find_matches(EnchantTrie* trie,EnchantTrieMatcher *matcher); -static void enchant_trie_find_matches_cb(void* keyV,void* subtrieV,void* matcherV); -static EnchantTrieMatcher* enchant_trie_matcher_init(const char* const word, size_t len, - int maxerrs, - EnchantTrieMatcherMode mode, - void(*cbfunc)(char*,EnchantTrieMatcher*), - void* cbdata); -static void enchant_trie_matcher_free(EnchantTrieMatcher* matcher); -static void enchant_trie_matcher_pushpath(EnchantTrieMatcher* matcher,char* newchars); -static void enchant_trie_matcher_poppath(EnchantTrieMatcher* matcher,int num); - -static int edit_dist(const char* word1, const char* word2); #define enchant_lock_file(f) flock (fileno (f), LOCK_EX) #define enchant_unlock_file(f) flock (fileno (f), LOCK_UN) @@ -187,12 +74,12 @@ /** * enchant_pwl_init * - * Returns: a new PWL object used to store/check/suggest words. + * Returns: a new PWL object used to store/check words. */ EnchantPWL* enchant_pwl_init(void) { EnchantPWL *pwl = g_new0(EnchantPWL, 1); - pwl->words_in_trie = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + pwl->words = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); return pwl; } @@ -200,7 +87,7 @@ /** * enchant_pwl_init_with_file * - * Returns: a new PWL object used to store/check/suggest words + * Returns: a new PWL object used to store/check words * or NULL if the file cannot be opened or created */ EnchantPWL* enchant_pwl_init_with_file(const char * file) @@ -227,10 +114,8 @@ pwl->file_changed == stats.st_mtime) /* nothing changed since last read */ return; - enchant_trie_free(pwl->trie); - pwl->trie = NULL; - g_hash_table_destroy (pwl->words_in_trie);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/src/pwl.h -> _service:tar_scm:enchant-2.5.0.tar.gz/src/pwl.h
Changed
@@ -1,5 +1,6 @@ /* enchant * Copyright (C) 2003 Dom Lachowicz + * Copyright (C) 2016-2023 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -45,9 +46,6 @@ void enchant_pwl_add(EnchantPWL * me, const char *const word, ssize_t len); void enchant_pwl_remove(EnchantPWL * me, const char *const word, ssize_t len); int enchant_pwl_check(EnchantPWL * me, const char *const word, ssize_t len); -/*gives the best set of suggestions from pwl that are at least as good as the given suggs*/ -char** enchant_pwl_suggest(EnchantPWL *me, const char *const word, - ssize_t len, char ** suggs, size_t* out_n_suggs); void enchant_pwl_free(EnchantPWL* me); #ifdef __cplusplus
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/EnchantDictionaryTestFixture.h -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/EnchantDictionaryTestFixture.h
Changed
@@ -38,9 +38,7 @@ dict->user_data = NULL; dict->check = NULL; dict->suggest = NULL; - dict->add_to_personal = NULL; dict->add_to_session = NULL; - dict->store_replacement = NULL; return dict; }
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/Makefile.am -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/Makefile.am
Changed
@@ -1,5 +1,3 @@ -SUBDIRS = enchant_providers - # Get libdir suffix if GNU_MAKE libdir_subdir=$(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||') @@ -7,7 +5,7 @@ libdir_subdir=lib endif -AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\" +AM_CPPFLAGS = -I$(top_srcdir)/src $(GLIB_CFLAGS) -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\" ENCHANT_CONFIG_DIR = config @@ -18,6 +16,7 @@ $(MAKE) libenchant-copy; \ cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \ cp $(builddir)/@objdir@/*@shlibext@ .; \ + cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(builddir) || :; \ chmod +w $(builddir)/test.pwl; \ export LSAN_OPTIONS=suppressions=$(srcdir)/asan-suppressions.txt:fast_unwind_on_malloc=0; @@ -38,7 +37,7 @@ cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/ cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/ -LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) +LDADD = $(LIBENCHANT_COPY) $(GLIB_LIBS) LIBADD = $(LIBENCHANT_COPY) DEPS = $(LIBENCHANT_COPY) @@ -50,9 +49,9 @@ libenchant_null_describe.la # Should not really use _ENCHANT_BUILD here, but seems to be necessary to get correct DLL exports for Windows -libenchant_mock_provider_la_CPPFLAGS=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1 +libenchant_mock_provider_la_CPPFLAGS=-I$(top_srcdir)/src $(GLIB_CFLAGS) -D_ENCHANT_BUILD=1 # Adding -rpath to LDFLAGS causes the .so to be built even though the lib is not to be installed -libenchant_mock_provider_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /foo $(ENCHANT_LIBS) +libenchant_mock_provider_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /foo $(GLIB_LIBS) libenchant_mock_provider_la_SOURCES = mock_provider.cpp # Build distinct libraries rather than copying a single one, to avoid being @@ -73,8 +72,10 @@ libenchant_null_describe_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) libenchant_null_describe_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) -check_PROGRAMS = main.test +check_PROGRAMS = main.test providers.test LOG_COMPILER = $(srcdir)/run-test +# Make the tests run serially. +providers.log: main.log main_test_SOURCES = main.test.cpp \ EnchantBrokerTestFixture.h \ @@ -93,7 +94,6 @@ dictionary/enchant_dict_is_word_character_tests.cpp \ dictionary/enchant_dict_remove_from_session_tests.cpp \ dictionary/enchant_dict_remove_tests.cpp \ - dictionary/enchant_dict_store_replacement_tests.cpp \ dictionary/enchant_dict_suggest_tests.cpp \ broker/enchant_broker_describe_tests.cpp \ broker/enchant_broker_dict_exists_tests.cpp \ @@ -104,6 +104,7 @@ broker/enchant_broker_init_tests.cpp \ broker/enchant_broker_list_dicts_tests.cpp \ broker/enchant_broker_request_dict_tests.cpp \ + broker/enchant_broker_request_dict_with_pwl_tests.cpp \ broker/enchant_broker_request_pwl_dict_tests.cpp \ broker/enchant_broker_set_ordering_tests.cpp \ pwl/enchant_pwl_tests.cpp \ @@ -114,7 +115,29 @@ provider/enchant_provider_get_user_language_tests.cpp \ $(NULL) main_test_DEPENDENCIES = $(LIBENCHANT_COPY) -main_test_LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) $(UNITTESTPP_LIBS) +main_test_LDADD = $(LIBENCHANT_COPY) $(GLIB_LIBS) $(UNITTESTPP_LIBS) main_test_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\" +APPLESPELL_CONFIG = config/AppleSpell.config +$(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config + $(MKDIR_P) config + cp $(top_srcdir)/providers/AppleSpell.config config/ + +providers_test_SOURCES = enchant_providers/providers.test.cpp \ + EnchantTestFixture.h \ + EnchantBrokerTestFixture.h \ + EnchantDictionaryTestFixture.h \ + enchant_providers/unittest_enchant_providers.h \ + enchant_providers/Dictionary/dictionary_check.cpp \ + enchant_providers/Dictionary/dictionary_suggest.cpp \ + enchant_providers/Provider/provider_describe_dict.cpp \ + enchant_providers/Provider/provider_dictionary_exists.cpp \ + enchant_providers/Provider/provider_identify_dict.cpp \ + enchant_providers/Provider/provider_list_dicts.cpp \ + enchant_providers/Provider/provider_request_dict.cpp \ + $(NULL) +providers_test_DEPENDENCIES = $(LIBENCHANT_COPY) $(APPLESPELL_CONFIG) +providers_test_LDADD = $(LIBENCHANT_COPY) $(GLIB_LIBS) $(UNITTESTPP_LIBS) +providers_test_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\" + TESTS = $(check_PROGRAMS)
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/Makefile.in -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -86,36 +86,36 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = main.test$(EXEEXT) +check_PROGRAMS = main.test$(EXEEXT) providers.test$(EXEEXT) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/assert_h.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/flock.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnu-make.m4 \ - $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnu-make.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/malloc.m4 \ + $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/manywarnings-c++.m4 \ $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pid_t.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/relocatable-lib.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/std-gnu11.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/zzgnulib.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ + $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) @@ -186,7 +186,6 @@ dictionary/main_test-enchant_dict_is_word_character_tests.$(OBJEXT) \ dictionary/main_test-enchant_dict_remove_from_session_tests.$(OBJEXT) \ dictionary/main_test-enchant_dict_remove_tests.$(OBJEXT) \ - dictionary/main_test-enchant_dict_store_replacement_tests.$(OBJEXT) \ dictionary/main_test-enchant_dict_suggest_tests.$(OBJEXT) \ broker/main_test-enchant_broker_describe_tests.$(OBJEXT) \ broker/main_test-enchant_broker_dict_exists_tests.$(OBJEXT) \ @@ -196,6 +195,7 @@ broker/main_test-enchant_broker_init_tests.$(OBJEXT) \ broker/main_test-enchant_broker_list_dicts_tests.$(OBJEXT) \ broker/main_test-enchant_broker_request_dict_tests.$(OBJEXT) \ + broker/main_test-enchant_broker_request_dict_with_pwl_tests.$(OBJEXT) \ broker/main_test-enchant_broker_request_pwl_dict_tests.$(OBJEXT) \ broker/main_test-enchant_broker_set_ordering_tests.$(OBJEXT) \ pwl/main_test-enchant_pwl_tests.$(OBJEXT) \ @@ -206,6 +206,16 @@ provider/main_test-enchant_provider_get_user_language_tests.$(OBJEXT) main_test_OBJECTS = $(am_main_test_OBJECTS) am__DEPENDENCIES_1 = +am_providers_test_OBJECTS = \ + enchant_providers/providers_test-providers.test.$(OBJEXT) \ + enchant_providers/Dictionary/providers_test-dictionary_check.$(OBJEXT) \ + enchant_providers/Dictionary/providers_test-dictionary_suggest.$(OBJEXT) \ + enchant_providers/Provider/providers_test-provider_describe_dict.$(OBJEXT) \ + enchant_providers/Provider/providers_test-provider_dictionary_exists.$(OBJEXT) \ + enchant_providers/Provider/providers_test-provider_identify_dict.$(OBJEXT) \ + enchant_providers/Provider/providers_test-provider_list_dicts.$(OBJEXT) \ + enchant_providers/Provider/providers_test-provider_request_dict.$(OBJEXT) +providers_test_OBJECTS = $(am_providers_test_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -236,6 +246,7 @@ broker/$(DEPDIR)/main_test-enchant_broker_init_tests.Po \ broker/$(DEPDIR)/main_test-enchant_broker_list_dicts_tests.Po \ broker/$(DEPDIR)/main_test-enchant_broker_request_dict_tests.Po \ + broker/$(DEPDIR)/main_test-enchant_broker_request_dict_with_pwl_tests.Po \ broker/$(DEPDIR)/main_test-enchant_broker_request_pwl_dict_tests.Po \ broker/$(DEPDIR)/main_test-enchant_broker_set_ordering_tests.Po \ dictionary/$(DEPDIR)/main_test-enchant_dict_add_tests.Po \ @@ -250,8 +261,15 @@ dictionary/$(DEPDIR)/main_test-enchant_dict_is_word_character_tests.Po \ dictionary/$(DEPDIR)/main_test-enchant_dict_remove_from_session_tests.Po \ dictionary/$(DEPDIR)/main_test-enchant_dict_remove_tests.Po \ - dictionary/$(DEPDIR)/main_test-enchant_dict_store_replacement_tests.Po \ dictionary/$(DEPDIR)/main_test-enchant_dict_suggest_tests.Po \ + enchant_providers/$(DEPDIR)/providers_test-providers.test.Po \ + enchant_providers/Dictionary/$(DEPDIR)/providers_test-dictionary_check.Po \ + enchant_providers/Dictionary/$(DEPDIR)/providers_test-dictionary_suggest.Po \ + enchant_providers/Provider/$(DEPDIR)/providers_test-provider_describe_dict.Po \ + enchant_providers/Provider/$(DEPDIR)/providers_test-provider_dictionary_exists.Po \ + enchant_providers/Provider/$(DEPDIR)/providers_test-provider_identify_dict.Po \ + enchant_providers/Provider/$(DEPDIR)/providers_test-provider_list_dicts.Po \ + enchant_providers/Provider/$(DEPDIR)/providers_test-provider_request_dict.Po \ provider/$(DEPDIR)/main_test-enchant_provider_broker_set_error_tests.Po \ provider/$(DEPDIR)/main_test-enchant_provider_dict_set_error_tests.Po \ provider/$(DEPDIR)/main_test-enchant_provider_get_prefix_dir_tests.Po \ @@ -299,33 +317,19 @@ $(libenchant_mock_provider2_la_SOURCES) \ $(libenchant_null_describe_la_SOURCES) \ $(libenchant_null_identify_la_SOURCES) \ - $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES) + $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES) \ + $(providers_test_SOURCES) DIST_SOURCES = $(libenchant_mock_provider_la_SOURCES) \ $(libenchant_mock_provider2_la_SOURCES) \ $(libenchant_null_describe_la_SOURCES) \ $(libenchant_null_identify_la_SOURCES) \ - $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-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 \ - tags-recursive uninstall-recursive + $(libenchant_null_provider_la_SOURCES) $(main_test_SOURCES) \ + $(providers_test_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - check recheck distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -343,8 +347,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -527,7 +529,9 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) @@ -546,52 +550,35 @@ *) \ b='$*';; \ esac -DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -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"`; \
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/broker/enchant_broker_request_dict_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/broker/enchant_broker_request_dict_tests.cpp
Changed
@@ -61,7 +61,8 @@ * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) * * Returns: An #EnchantDict, or %null if no suitable dictionary could be found. - */ + * The default personal wordlist file is used. +*/
View file
_service:tar_scm:enchant-2.5.0.tar.gz/tests/broker/enchant_broker_request_dict_with_pwl_tests.cpp
Added
@@ -0,0 +1,225 @@ +/* Copyright (c) 2007 Eric Scott Albright + * Copyright (c) 2023 Reuben Thomas + * + * 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 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include <UnitTest++/UnitTest++.h> +#include <enchant.h> +#include "EnchantBrokerTestFixture.h" + +static bool requestDictionaryCalled; +static EnchantDict * RequestDictionaryWithPwl (EnchantProvider *me, const char *tag) +{ + requestDictionaryCalled = true; + return MockEnGbAndQaaProviderRequestDictionary(me, tag); +} + +static void Request_Dictionary_ProviderConfiguration (EnchantProvider * me, const char *) +{ + me->request_dict = RequestDictionaryWithPwl; + me->dispose_dict = MockProviderDisposeDictionary; +} + +struct EnchantBrokerRequestDictionaryWithPwl_TestFixture : EnchantBrokerTestFixture +{ + EnchantDict* _pwl; + std::string _pwlFileName; + + //Setup + EnchantBrokerRequestDictionaryWithPwl_TestFixture(): + EnchantBrokerTestFixture(Request_Dictionary_ProviderConfiguration) + { + _dict = NULL; + requestDictionaryCalled = false; + _pwl = RequestPersonalDictionary(); + _pwlFileName = GetLastPersonalDictionaryFileName(); + } + + //Teardown + ~EnchantBrokerRequestDictionaryWithPwl_TestFixture() + { + FreeDictionary(_dict); + FreeDictionary(_pwl); + } + + EnchantDict* _dict; +}; + +/** + * enchant_broker_request_dict_with_pwl + * @broker: A non-null #EnchantBroker + * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) + * @pwl: A non-null pathname in the GLib file name encoding (UTF-8 on Windows) to the personal wordlist file + * + * Returns: An #EnchantDict, or %null if no suitable dictionary could be found, or if the pwl could not be opened. + * This dictionary is reference counted. + */ + + + +///////////////////////////////////////////////////////////////////////////// +// Test Normal Operation + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_ProviderHas_CallsProvider) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB", _pwlFileName.c_str()); + CHECK(_dict); + CHECK(requestDictionaryCalled); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_CalledTwice_CallsProviderOnceReturnsSame) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB", _pwlFileName.c_str()); + requestDictionaryCalled = false; + EnchantDict* dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB", _pwlFileName.c_str()); + CHECK(!requestDictionaryCalled); + + CHECK_EQUAL(_dict, dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_ProviderDoesNotHave_CallsProvider) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en", _pwlFileName.c_str()); + CHECK_EQUAL((void*)NULL, (void*)_dict); + CHECK(requestDictionaryCalled); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_ProviderHasBase_CallsProvider) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "qaa_CA", _pwlFileName.c_str()); + CHECK(_dict); + CHECK(requestDictionaryCalled); +} + + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_WhitespaceSurroundingLanguageTag_Removed) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "\n\r en_GB \t\f", _pwlFileName.c_str()); + CHECK(_dict); +} + +/* Vertical tab is not considered to be whitespace in glib! + See bug# 59388 http://bugzilla.gnome.org/show_bug.cgi?id=59388 +*/ +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_VerticalTabBeforeLanguageTag_NotRemoved) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "\ven_GB", _pwlFileName.c_str()); + CHECK_EQUAL((void*)NULL, (void*)_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_VerticalTabAfterLanguageTag_NotRemoved) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB\v", _pwlFileName.c_str()); + CHECK_EQUAL((void*)NULL, (void*)_dict); +} + + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_AtSignInLanguageTag_RemovesToTail) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB@euro", _pwlFileName.c_str()); + CHECK(_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_PeriodInLanguageTag_RemovesToTail) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en_GB.UTF-8", _pwlFileName.c_str()); + CHECK(_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_HyphensInLanguageTag_SubstitutedWithUnderscore) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "en-GB", _pwlFileName.c_str()); + CHECK(_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_DifferentCase_Finds) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "En_gb", _pwlFileName.c_str()); + CHECK(_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_DifferentCase_NoRegion_Finds) +{ + _dict = enchant_broker_request_dict_with_pwl(_broker, "QAA", _pwlFileName.c_str()); + CHECK(_dict); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_HasPreviousError_ErrorCleared) +{ + SetErrorOnMockProvider("something bad happened"); + + _dict = enchant_broker_request_dict_with_pwl(_broker, "en-GB", _pwlFileName.c_str()); + + CHECK_EQUAL((void*)NULL, (void*)enchant_broker_get_error(_broker)); +} + +// ordering of providers for request is tested by enchant_broker_set_ordering tests + +///////////////////////////////////////////////////////////////////////////// +// Test Error Conditions +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture, + EnchantBrokerRequestDictionaryWithPwl_NullBroker_NULL) +{ + _dict = enchant_broker_request_dict(NULL, "en_GB"); + + CHECK_EQUAL((void*)NULL, (void*)_dict); + CHECK(!requestDictionaryCalled); +} + +TEST_FIXTURE(EnchantBrokerRequestDictionaryWithPwl_TestFixture,
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/dictionary/enchant_dict_add_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/dictionary/enchant_dict_add_tests.cpp
Changed
@@ -23,51 +23,6 @@ #include <enchant.h> #include "EnchantDictionaryTestFixture.h" -static bool addToPersonalCalled; -static std::string wordToAdd; - -static void -MockDictionaryAddToPersonal (EnchantDict * dict, const char *const word, size_t len) -{ - dict; - addToPersonalCalled = true; - wordToAdd = std::string(word, len); -} - -static EnchantDict* MockProviderRequestAddToPersonalMockDictionary(EnchantProvider * me, const char *tag) -{ - - EnchantDict* dict = MockProviderRequestEmptyMockDictionary(me, tag); - dict->add_to_personal = MockDictionaryAddToPersonal; - return dict; -} - -static void DictionaryAddToPersonal_ProviderConfiguration (EnchantProvider * me, const char *) -{ - me->request_dict = MockProviderRequestAddToPersonalMockDictionary; - me->dispose_dict = MockProviderDisposeDictionary; -} - -struct EnchantDictionaryAdd_TestFixture : EnchantDictionaryTestFixture -{ - //Setup - EnchantDictionaryAdd_TestFixture(): - EnchantDictionaryTestFixture(DictionaryAddToPersonal_ProviderConfiguration) - { - addToPersonalCalled = false; - } -}; - -struct EnchantDictionaryAddToPersonalNotImplemented_TestFixture : EnchantDictionaryTestFixture -{ - //Setup - EnchantDictionaryAddToPersonalNotImplemented_TestFixture(): - EnchantDictionaryTestFixture(EmptyDictionary_ProviderConfiguration) - { - addToPersonalCalled = false; - } -}; - /** * enchant_dict_add * @dict: A non-null #EnchantDict @@ -80,21 +35,21 @@ ///////////////////////////////////////////////////////////////////////////// // Test Normal Operation -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_WordExistsInDictionary) { enchant_dict_add(_dict, "hello", -1); CHECK(IsWordInDictionary("hello")); } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_WordExistsInSession) { enchant_dict_add(_dict, "hello", -1); CHECK(IsWordInSession("hello")); } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_WordAddedToEnchantPwlFile) { CHECK(!PersonalWordListFileHasContents()); @@ -102,47 +57,7 @@ CHECK(PersonalWordListFileHasContents()); } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_PassedOnToProvider_LenComputed) -{ - enchant_dict_add(_dict, "hello", -1); - CHECK(addToPersonalCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_PassedOnToProvider_LenSpecified) -{ - enchant_dict_add(_dict, "hellodisregard me", 5); - CHECK(addToPersonalCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_WordExistsInSession_StillCallsProvider) -{ - enchant_dict_add_to_session(_dict, "session", -1); - CHECK(!addToPersonalCalled); - - enchant_dict_add(_dict, "session", -1); - CHECK(addToPersonalCalled); - CHECK_EQUAL(std::string("session"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_WordExistsInPersonal_StillCallsProvider) -{ - enchant_dict_add(_dict, "personal", -1); - addToPersonalCalled=false; - wordToAdd = std::string(); - - enchant_dict_add(_dict, "personal", -1); - CHECK(addToPersonalCalled); - CHECK_EQUAL(std::string("personal"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_WordExistsInExclude_RemovedFromExcludeAddedToPersonal) { enchant_dict_remove(_dict, "personal", -1); @@ -152,15 +67,14 @@ CHECK(PersonalWordListFileHasContents()); } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_InBrokerPwl) { enchant_dict_add(_pwl, "personal", -1); - CHECK(!addToPersonalCalled); CHECK(!PersonalWordListFileHasContents()); } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_IsPermanent) { enchant_dict_add(_dict, "hello", -1); @@ -172,7 +86,7 @@ } -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, +TEST_FIXTURE(EnchantDictionaryTestFixture, EnchantDictionaryAdd_HasPreviousError_ErrorCleared) { SetErrorOnMockDictionary("something bad happened"); @@ -180,55 +94,3 @@ enchant_dict_add(_dict, "hello", -1); CHECK_EQUAL((void*)NULL, (void*)enchant_dict_get_error(_dict)); } - -///////////////////////////////////////////////////////////////////////////// -// Test Error Conditions -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_NullDictionary_NotAdded) -{ - enchant_dict_add(NULL, "hello", -1); - CHECK(!addToPersonalCalled); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_NullWord_NotAdded) -{ - enchant_dict_add(_dict, NULL, -1); - CHECK(!addToPersonalCalled); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_EmptyWord_NotAdded) -{ - enchant_dict_add(_dict, "", -1); - CHECK(!addToPersonalCalled); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_WordSize0_NotAdded) -{ - enchant_dict_add(_dict, "hello", 0); - CHECK(!addToPersonalCalled); -} - -TEST_FIXTURE(EnchantDictionaryAdd_TestFixture, - EnchantDictionaryAdd_InvalidUtf8Word_NotAdded) -{ - enchant_dict_add(_dict, "\xa5\xf1\x08", -1); - CHECK(!addToPersonalCalled); -} - -TEST_FIXTURE(EnchantDictionaryAddToPersonalNotImplemented_TestFixture, - EnchantDictionaryAddToPersonalNotImplemented_WordAddedToEnchantPwlFile) -{ - CHECK(!PersonalWordListFileHasContents()); - enchant_dict_add(_dict, "hello", -1);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/dictionary/enchant_dict_add_to_session_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/dictionary/enchant_dict_add_to_session_tests.cpp
Changed
@@ -116,8 +116,6 @@ EnchantDictionaryAddToSession_WordExistsInPersonal_StillCallsProvider) { enchant_dict_add(_dict, "personal", -1); - CHECK(!addToSessionCalled); - enchant_dict_add_to_session(_dict, "personal", -1); CHECK(addToSessionCalled); CHECK_EQUAL(std::string("personal"), wordToAdd);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/dictionary/enchant_dict_remove_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/dictionary/enchant_dict_remove_tests.cpp
Changed
@@ -23,17 +23,6 @@ #include <enchant.h> #include "EnchantDictionaryTestFixture.h" -static bool addToExcludeCalled; -static std::string wordToAdd; - -static void -MockDictionaryAddToExclude (EnchantDict * dict, const char *const word, size_t len) -{ - dict; - addToExcludeCalled = true; - wordToAdd = std::string(word, len); -} - static bool dictCheckCalled; static int @@ -53,7 +42,6 @@ { EnchantDict* dict = MockProviderRequestBasicMockDictionary(me, tag); - dict->add_to_exclude = MockDictionaryAddToExclude; dict->check = MockDictionaryCheck; return dict; } @@ -70,7 +58,6 @@ EnchantDictionaryRemove_TestFixture(): EnchantDictionaryTestFixture(DictionaryAddToExclude_ProviderConfiguration) { - addToExcludeCalled = false; dictCheckCalled = false; } }; @@ -95,7 +82,6 @@ EnchantDictionaryRemoveNotImplemented_TestFixture(): EnchantDictionaryTestFixture(DictionaryCheck_ProviderConfiguration) { - addToExcludeCalled = false; dictCheckCalled = false; } }; @@ -146,46 +132,6 @@ } TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_PassedOnToProvider_LenComputed) -{ - enchant_dict_remove(_dict, "hello", -1); - CHECK(addToExcludeCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_PassedOnToProvider_LenSpecified) -{ - enchant_dict_remove(_dict, "hellodisregard me", 5); - CHECK(addToExcludeCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_WordRemovedFromSession_StillCallsProvider) -{ - enchant_dict_remove_from_session(_dict, "hello", -1); - CHECK(!addToExcludeCalled); - - enchant_dict_remove(_dict, "hello", -1); - CHECK(addToExcludeCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_WordExistsInExclude_StillCallsProvider) -{ - enchant_dict_remove(_dict, "hello", -1); - addToExcludeCalled=false; - wordToAdd = std::string(); - - enchant_dict_remove(_dict, "hello", -1); - CHECK(addToExcludeCalled); - CHECK_EQUAL(std::string("hello"), wordToAdd); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, EnchantDictionaryRemove_ProviderNotAskedIfWordExistsInDictionary) { enchant_dict_remove(_dict, "hello", -1); @@ -252,7 +198,6 @@ CHECK(!BrokerPWLFileHasContents()); enchant_dict_remove(_pwl, "personal", -1); - CHECK(!addToExcludeCalled); CHECK(!ExcludeFileHasContents()); } @@ -279,41 +224,6 @@ ///////////////////////////////////////////////////////////////////////////// // Test Error Conditions -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_NullDictionary_NotRemoved) -{ - enchant_dict_remove(NULL, "hello", -1); - CHECK(!addToExcludeCalled); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_NullWord_NotRemoved) -{ - enchant_dict_remove(_dict, NULL, -1); - CHECK(!addToExcludeCalled); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_EmptyWord_NotRemoved) -{ - enchant_dict_remove(_dict, "", -1); - CHECK(!addToExcludeCalled); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_WordSize0_NotRemoved) -{ - enchant_dict_remove(_dict, "hello", 0); - CHECK(!addToExcludeCalled); -} - -TEST_FIXTURE(EnchantDictionaryRemove_TestFixture, - EnchantDictionaryRemove_InvalidUtf8Word_NotRemoved) -{ - enchant_dict_remove(_dict, "\xa5\xf1\x08", -1); - CHECK(!addToExcludeCalled); -} - TEST_FIXTURE(EnchantDictionaryRemoveNotImplemented_TestFixture, EnchantDictionaryRemoveNotImplemented_WordAddedToExcludeFile) { @@ -323,13 +233,6 @@ } TEST_FIXTURE(EnchantDictionaryRemoveNotImplemented_TestFixture, - EnchantDictionaryRemoveNotImplemented_NotPassedOnToProvider) -{ - enchant_dict_remove(_dict, "hello", -1); - CHECK(!addToExcludeCalled); -} - -TEST_FIXTURE(EnchantDictionaryRemoveNotImplemented_TestFixture, EnchantDictionaryRemoveNotImplemented_StillExcluded) { CHECK(IsWordInDictionary("hello"));
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/dictionary/enchant_dict_suggest_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/dictionary/enchant_dict_suggest_tests.cpp
Changed
@@ -210,36 +210,6 @@ } TEST_FIXTURE(EnchantDictionarySuggest_TestFixture, - EnchantDictionarySuggest_InBrokerPwlSession) -{ - enchant_dict_add(_pwl, "hello", -1); - _pwl_suggestions = enchant_dict_suggest(_pwl, "helo", -1, NULL); - CHECK(_pwl_suggestions); - CHECK(!dictSuggestCalled); -} - -TEST_FIXTURE(EnchantDictionarySuggest_TestFixture, - EnchantDictionarySuggest_SuggestionsFromPersonal_addedToEnd) -{ - size_t cSuggestions; - enchant_dict_add(_dict, "hello", -1); - _suggestions = enchant_dict_suggest(_dict, "helo", -1, &cSuggestions); - CHECK(_suggestions); - CHECK_EQUAL(5, cSuggestions); - - std::vector<std::string> suggestions; - if(_suggestions != NULL){ - suggestions.insert(suggestions.begin(), _suggestions, _suggestions+cSuggestions); - } - - std::vector<std::string> expected = GetExpectedSuggestions("helo"); - expected.push_back("hello"); - - CHECK_ARRAY_EQUAL(expected, suggestions, std::min((size_t)5,cSuggestions)); -} - - -TEST_FIXTURE(EnchantDictionarySuggest_TestFixture, EnchantDictionarySuggest_DuplicateSuggestionsFromPersonal_notIncluded) { size_t cSuggestions;
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/enchant_providers/Dictionary/dictionary_check.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/enchant_providers/Dictionary/dictionary_check.cpp
Changed
@@ -59,13 +59,6 @@ addedWords = _addedWordsByDict.equal_range(dict); AddedWordsByDict::const_iterator it; - for(it = addedWords.first; it != addedWords.second; ++it) - { - if(dict->add_to_exclude) - { - (*dict->add_to_exclude)(dict, it->second.c_str(), it->second.length()); - } - } _addedWordsByDict.erase(dict); Provider_TestFixture::ReleaseDictionary(dict); } @@ -109,16 +102,6 @@ } } - if(dict->add_to_personal) - { - _addedWordsByDict.insert(std::pair<EnchantDict*, std::string>(dict,word)); - (*dict->add_to_personal) (dict, word.c_str(), word.length()); - if(IsWordInDictionary(word)) - { - return true; - } - } - return false; } };
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/enchant_providers/Provider/provider_dictionary_exists.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/enchant_providers/Provider/provider_dictionary_exists.cpp
Changed
@@ -55,7 +55,7 @@ { if (_provider->dictionary_exists) { - int exists = (*_provider->dictionary_exists) (_provider, "zxx"); /*zxx is no linguistic content*/ + (*_provider->dictionary_exists) (_provider, "zxx"); /*zxx is no linguistic content*/ CHECK_EQUAL((void*)NULL, GetErrorMessage(_provider)); } }
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/enchant_providers/providers.test.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/enchant_providers/providers.test.cpp
Changed
@@ -19,6 +19,8 @@ * THE SOFTWARE. */ +#include "config.h" +#include <stdio.h> #include <UnitTest++/UnitTest++.h> #include <enchant.h> #include <enchant-provider.h> @@ -49,6 +51,10 @@ // comes with a list of directories or providers int main(int argc, char* argv) { +#ifndef ENABLE_RELOCATABLE + fprintf(stderr, "You must configure with --enable-relocatable to be able to run the tests\n"); + return 1; +#endif int result = 0; for(int i=1; i < argc; ++i) { @@ -106,8 +112,10 @@ const char *dir_entry; while ((dir_entry = g_dir_read_name (dir)) != NULL) { +#define PROVIDER_PREFIX "enchant_" size_t entry_len = strlen (dir_entry); - if ((entry_len > g_module_suffix_len) && + if ((entry_len > g_module_suffix_len) && + !strncmp(dir_entry, PROVIDER_PREFIX, sizeof(PROVIDER_PREFIX)) && !strcmp(dir_entry + (entry_len - g_module_suffix_len), G_MODULE_SUFFIX)) { char *filename = g_build_filename (dir_name, dir_entry, NULL);
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/main.test.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/main.test.cpp
Changed
@@ -19,6 +19,8 @@ * THE SOFTWARE. */ +#include "config.h" +#include <stdio.h> #include <UnitTest++/UnitTest++.h> #include "EnchantBrokerTestFixture.h" #include "enchant.h" @@ -29,6 +31,11 @@ int main(){ +#ifndef ENABLE_RELOCATABLE + fprintf(stderr, "You must configure with --enable-relocatable to be able to run the tests\n"); + return 1; +#else enchant_set_prefix_dir("."); return UnitTest::RunAllTests(); +#endif }
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/provider/enchant_provider_get_user_config_dirs_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/provider/enchant_provider_get_user_config_dirs_tests.cpp
Changed
@@ -43,8 +43,7 @@ std::string enchantUserConfigDir = user_config_dir; std::string expected = getenv("ENCHANT_CONFIG_DIR"); - // FIXME: following crashes in UnitTest 1.4 with CHECK_EQUAL: use that when we can require >= 1.6 - CHECK(expected == enchantUserConfigDir); + CHECK_EQUAL(expected, enchantUserConfigDir); // Check it also works with ENCHANT_CONFIG_DIR unset g_unsetenv("ENCHANT_CONFIG_DIR");
View file
_service:tar_scm:enchant-2.3.3.tar.gz/tests/pwl/enchant_pwl_tests.cpp -> _service:tar_scm:enchant-2.5.0.tar.gz/tests/pwl/enchant_pwl_tests.cpp
Changed
@@ -71,65 +71,6 @@ { } }; -TEST_FIXTURE(EnchantPwl_TestFixture, - GetSuggestionsFromWord_MultipleSuggestions_ReturnsOnlyClosest) -{ - std::vector<std::string> sNoiseWords; - sNoiseWords.push_back("spat"); - sNoiseWords.push_back("tots"); - sNoiseWords.push_back("tater"); - sNoiseWords.push_back("ton"); - sNoiseWords.push_back("gnat"); - - std::vector<std::string> sWords; - sWords.push_back("cat"); - sWords.push_back("hat"); - sWords.push_back("that"); - sWords.push_back("bat"); - sWords.push_back("tot"); - - AddWordsToDictionary(sWords); - AddWordsToDictionary(sNoiseWords); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("tat"); - CHECK_EQUAL(sWords.size(), suggestions.size()); - - std::sort(sWords.begin(), sWords.end()); - std::sort(suggestions.begin(), suggestions.end()); - - CHECK_ARRAY_EQUAL(sWords, suggestions, std::min(sWords.size(), suggestions.size())); -} - -TEST_FIXTURE(EnchantPwlWithDictSuggs_TestFixture, - GetSuggestionsFromWord_MultipleSuggestions_ReturnsOnlyAsCloseAsDict) -{ - std::vector<std::string> sNoiseWords; - sNoiseWords.push_back("spat"); - sNoiseWords.push_back("tots"); - sNoiseWords.push_back("tater"); - sNoiseWords.push_back("ton"); - sNoiseWords.push_back("gnat"); - - std::vector<std::string> sWords; - sWords.push_back("cat"); - sWords.push_back("hat"); - sWords.push_back("that"); - sWords.push_back("bat"); - sWords.push_back("tot"); - - AddWordsToDictionary(sWords); - AddWordsToDictionary(sNoiseWords); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("tat"); - sWords.push_back("sat"); - CHECK_EQUAL(sWords.size(), suggestions.size()); - - std::sort(sWords.begin(), sWords.end()); - std::sort(suggestions.begin(), suggestions.end()); - - CHECK_ARRAY_EQUAL(sWords, suggestions, std::min(sWords.size(), suggestions.size())); -} - ///////////////////////////////////////////////////////////////////////////////////////////////// // External File change TEST_FIXTURE(EnchantPwl_TestFixture, @@ -163,29 +104,6 @@ } } -TEST_FIXTURE(EnchantPwl_TestFixture, - Suggest_DictionaryChangedExternally_Successful) -{ - std::vector<std::string> sWords; - sWords.push_back("cat"); - sWords.push_back("hat"); - sWords.push_back("that"); - sWords.push_back("bat"); - sWords.push_back("tot"); - - ExternalAddWordsToDictionary(sWords); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("tat"); - - CHECK_EQUAL(sWords.size(), suggestions.size()); - - std::sort(sWords.begin(), sWords.end()); - std::sort(suggestions.begin(), suggestions.end()); - - CHECK_ARRAY_EQUAL(sWords, suggestions, std::min(sWords.size(), suggestions.size())); -} - - ///////////////////////////////////////////////////////////////////////////////////////////////// // DictionaryBeginsWithBOM TEST_FIXTURE(EnchantPwl_TestFixture, @@ -273,55 +191,6 @@ } } -//////////////////////////////////////////////////////////////////////////////////////////////// -// Pwl Bugs -TEST_FIXTURE(EnchantPwl_TestFixture, - GetSuggestions_DistanceUsesUnicodeChar) -{ - std::string puaWord("\xF4\x80\x80\x80ord"); // private use character - AddWordToDictionary(puaWord); //edit distance 1 using unichar; 4 using utf8 - - std::vector<std::string> suggestions = GetSuggestionsFromWord("word"); - - CHECK( !suggestions.empty()); - - if(!suggestions.empty()){ - CHECK_EQUAL(puaWord, suggestions0); - } -} - -// Word which is prefix of another gets edit distance which is one less. -// This means it moves to the top of the list normally but once we only bring -// back the best matches, it means the rest of the matches aren't returned. -// FIXME: This is not very clear. See FIXME below. -TEST_FIXTURE(EnchantPwl_TestFixture, - PwlSuggest_EditDistanceOnWordWhichIsPrefixOfAnother) -{ - std::vector<std::string> sNoiseWords; - sNoiseWords.push_back("hastens"); //4 - - std::vector<std::string> sWords; - sWords.push_back("cashes"); //3 - sWords.push_back("hasten"); //3 - sWords.push_back("washes"); //3 - - AddWordsToDictionary(sWords); - AddWordsToDictionary(sNoiseWords); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("saskep"); - CHECK(suggestions.size() > 0); - // FIXME: The string in the next line was originally "hasten", but the - // test failed. Is this now correct? - CHECK(suggestions0 != "hastens"); - CHECK_EQUAL(sWords.size(), suggestions.size()); - - std::sort(sWords.begin(), sWords.end()); - std::sort(suggestions.begin(), suggestions.end()); - - CHECK_ARRAY_EQUAL(sWords, suggestions, std::min(sWords.size(), suggestions.size())); -} - - ///////////////////////////////////////////////////////////////////////////////////////////////// // Commented Lines ignored TEST_FIXTURE(EnchantPwl_TestFixture, @@ -425,74 +294,6 @@ CHECK( IsWordInDictionary(Convert(L"fiance\x301")) ); //NFD } -TEST_FIXTURE(EnchantPwl_TestFixture, - Suggest_DictionaryHasComposed_ReturnsComposed) -{ - ExternalAddWordToDictionary(Convert(L"fianc\xe9")); // u00e9 = Latin small letter e with acute - - ReloadTestDictionary(); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("fiance"); - - std::vector<std::string> expected; - expected.push_back(Convert(L"fianc\xe9")); // u00e9 = Latin small letter e with acute - CHECK_EQUAL(expected.size(), suggestions.size()); - if(expected.size() == suggestions.size()) - { - CHECK_ARRAY_EQUAL(expected, suggestions, expected.size()); - } -} - -TEST_FIXTURE(EnchantPwl_TestFixture, - Suggest_AddedComposed_ReturnsComposed) -{ - AddWordToDictionary(Convert(L"fianc\xe9")); // u00e9 = Latin small letter e with acute - - std::vector<std::string> suggestions = GetSuggestionsFromWord("fiance"); - - std::vector<std::string> expected; - expected.push_back(Convert(L"fianc\xe9")); // u00e9 = Latin small letter e with acute - CHECK_EQUAL(expected.size(), suggestions.size()); - if(expected.size() == suggestions.size()) - { - CHECK_ARRAY_EQUAL(expected, suggestions, expected.size()); - } -} - -TEST_FIXTURE(EnchantPwl_TestFixture, - Suggest_DictionaryHasDecomposed_ReturnsDecomposed) -{ - ExternalAddWordToDictionary(Convert(L"fiance\x301")); // u0301 = Combining acute accent - - ReloadTestDictionary(); - - std::vector<std::string> suggestions = GetSuggestionsFromWord("fiance"); - - std::vector<std::string> expected;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2