[FriBidi-commit] fribidi-sf.net .cvsignore, 1.1.2.1,
1.1.2.2 Makefile.am, 1.30.2.8,
1.30.2.9 fribidi_char_sets_cp1256.c, 1.10.2.2,
1.10.2.3 fribidi_config.h, 1.1.2.2, 1.1.2.3 getopt.c, 1.4.2.1,
1.4.2.2 getopt.h, 1.3.2.1, 1.3.2.2 getopt1.c, 1.3.2.1,
1.3.2.2 getopt_int.h, NONE, 1.1.2.1 gettext.h, NONE, 1.1.2.1
Behdad Esfahbod
behdad at freedesktop.org
Tue Jun 7 06:57:55 PDT 2005
Update of /cvs/fribidi/fribidi-sf.net
In directory gabe:/tmp/cvs-serv18549
Modified Files:
Tag: STABLE
.cvsignore Makefile.am fribidi_char_sets_cp1256.c
fribidi_config.h getopt.c getopt.h getopt1.c
Added Files:
Tag: STABLE
getopt_int.h gettext.h
Log Message:
More misc updates.
Index: .cvsignore
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/Attic/.cvsignore,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- .cvsignore 7 Jun 2005 13:37:31 -0000 1.1.2.1
+++ .cvsignore 7 Jun 2005 13:57:53 -0000 1.1.2.2
@@ -3,6 +3,7 @@
autom4te.cache
fribidi.pc
fribidi.spec
+fribidi-config
config.guess
config.h
config.h.in
@@ -16,3 +17,9 @@
ltmain.sh
missing
stamp-h1
+fribidi
+fribidi_benchmark
+fribidi_bidi_types
+fribidi_create_char_types
+fribidi_create_mirroring
+frbidi_tab_char_type_stamp
Index: Makefile.am
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/Makefile.am,v
retrieving revision 1.30.2.8
retrieving revision 1.30.2.9
diff -u -d -r1.30.2.8 -r1.30.2.9
--- Makefile.am 7 Jun 2005 13:37:31 -0000 1.30.2.8
+++ Makefile.am 7 Jun 2005 13:57:53 -0000 1.30.2.9
@@ -66,7 +66,8 @@
getopt1.c
GETOPT_HDR = \
- getopt.h
+ getopt.h \
+ gettext.h
TEST_FILES = \
tests/test_CapRTL_explicit.input \
@@ -207,4 +208,26 @@
DISTCLEANFILES = fribidi_tab_char_type_stamp
-MAINTAINERCLEANFILES = Makefile.in configure aclocal.m4 config.h.in
+MAINTAINERCLEANFILES = \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/configure.scan \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ `find "$(srcdir)" -type f -name Makefile.in -print` \
+ `find "$(srcdir)" -type f -name "*~" -print`
+
+# Indent all C source and header files, using indent(1):
+
+indent: $(srcdir)/.indent.pro
+ cd "$(srcdir)" && ./missing --run indent fribidi_*.[ch]
+
+.PHONY: indent
+
Index: fribidi_char_sets_cp1256.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cp1256.c,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- fribidi_char_sets_cp1256.c 7 Jun 2005 13:37:31 -0000 1.10.2.2
+++ fribidi_char_sets_cp1256.c 7 Jun 2005 13:57:53 -0000 1.10.2.3
@@ -58,7 +58,7 @@
fribidi_cp1256_to_unicode_c (char sch)
{
unsigned char ch = (unsigned char) sch;
- if (ch >= 0x80 && ch <= 0xff)
+ if (ch >= 0x80)
return fribidi_cp1256_to_unicode_tab[ch - 0x80];
else
return ch;
Index: fribidi_config.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_config.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- fribidi_config.h 10 Aug 2002 04:17:50 -0000 1.1.2.2
+++ fribidi_config.h 7 Jun 2005 13:57:53 -0000 1.1.2.3
@@ -1,10 +1,10 @@
#define FRIBIDI_PACKAGE "fribidi"
-#define FRIBIDI_VERSION "0.10.-5"
+#define FRIBIDI_VERSION "0.10.5"
#define FRIBIDI_MAJOR_VERSION 0
#define FRIBIDI_MINOR_VERSION 10
-#define FRIBIDI_MICRO_VERSION -5
+#define FRIBIDI_MICRO_VERSION 5
#define FRIBIDI_INTERFACE_VERSION 2
#if 0 /* FRIBIDI_NO_CHARSETS */
Index: getopt.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/getopt.c,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -d -r1.4.2.1 -r1.4.2.2
--- getopt.c 4 Aug 2002 19:43:29 -0000 1.4.2.1
+++ getopt.c 7 Jun 2005 13:57:53 -0000 1.4.2.2
@@ -2,24 +2,23 @@
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper at gnu.org
before changing it!
-
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004
Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
[...1313 lines suppressed...]
+ const char *optstring
+)
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0, (int *) 0, 0);
@@ -1007,10 +1200,10 @@
the above definition of `getopt'. */
int
-main (argc,
- argv)
- int argc;
- char **argv;
+main (
+ int argc,
+ char **argv
+)
{
int c;
int digit_optind = 0;
Index: getopt.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/getopt.h,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- getopt.h 4 Aug 2002 19:43:29 -0000 1.3.2.1
+++ getopt.h 7 Jun 2005 13:57:53 -0000 1.3.2.2
@@ -1,21 +1,21 @@
/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ 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 Library General Public
- License along with the GNU C Library; see the file COPYING. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _GETOPT_H
@@ -34,6 +34,17 @@
# include <ctype.h>
#endif
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
#ifdef __cplusplus
extern "C"
{
@@ -94,11 +105,7 @@
struct option
{
-# if defined __STDC__ && __STDC__
const char *name;
-# else
- char *name;
-# endif
/* 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;
@@ -138,47 +145,37 @@
arguments to the option '\0'. This behavior is specific to the GNU
`getopt'. */
-#if defined __STDC__ && __STDC__
-# ifdef __GNU_LIBRARY__
+#ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
- extern int getopt (int __argc,
- char *const *__argv,
- const char *__shortopts);
-# else /* not __GNU_LIBRARY__ */
- extern int getopt ();
-# endif /* __GNU_LIBRARY__ */
-
-# ifndef __need_getopt
- extern int getopt_long (int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
- extern int getopt_long_only (int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
+ extern int getopt (
+ int ___argc,
+ char *const *___argv,
+ const char *__shortopts
+ ) __THROW;
+#else /* not __GNU_LIBRARY__ */
+ extern int getopt (
+ );
+#endif /* __GNU_LIBRARY__ */
-/* Internal only. Users should not call this directly. */
- extern int _getopt_internal (int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind,
- int __long_only);
-# endif
-#else /* not __STDC__ */
- extern int getopt ();
-# ifndef __need_getopt
- extern int getopt_long ();
- extern int getopt_long_only ();
+#ifndef __need_getopt
+ extern int getopt_long (
+ int ___argc,
+ char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind
+ ) __THROW;
+ extern int getopt_long_only (
+ int ___argc,
+ char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind
+ ) __THROW;
- extern int _getopt_internal ();
-# endif
-#endif /* __STDC__ */
+#endif
#ifdef __cplusplus
}
Index: getopt1.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/getopt1.c,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- getopt1.c 4 Aug 2002 19:43:29 -0000 1.3.2.1
+++ getopt1.c 7 Jun 2005 13:57:53 -0000 1.3.2.2
@@ -1,36 +1,32 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ 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 Library General Public
- License along with the GNU C Library; see the file COPYING. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include "getopt.h"
#endif
+#include "getopt_int.h"
#include <stdio.h>
@@ -64,40 +60,61 @@
#endif
int
-getopt_long (argc,
- argv,
- options,
- long_options,
- opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index
+)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
}
+int
+_getopt_long_r (
+ int argc,
+ char *const *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);
+}
+
/* 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 (argc,
- argv,
- options,
- long_options,
- opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long_only (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index
+)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
+int
+_getopt_long_only_r (
+ int argc,
+ char *const *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);
+}
#endif /* Not ELIDE_CODE. */
@@ -106,10 +123,10 @@
#include <stdio.h>
int
-main (argc,
- argv)
- int argc;
- char **argv;
+main (
+ int argc,
+ char **argv
+)
{
int c;
int digit_optind = 0;
--- NEW FILE: getopt_int.h ---
/* Internal declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004
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 General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
extern int _getopt_internal (
int ___argc,
char *const *___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
int __long_only
);
/* Reentrant versions which can handle parsing multiple argument
vectors at the same time. */
/* 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;
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters.
PERMUTE is the default. We 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. Using `-' as the first character of the
list of option characters selects this mode of operation.
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
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} __ordering;
/* If the POSIXLY_CORRECT environment variable is set. */
int __posixly_correct;
/* 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;
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
# endif
};
/* 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 *const *___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
int __long_only,
struct _getopt_data *__data
);
extern int _getopt_long_r (
int ___argc,
char *const *___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data
);
extern int _getopt_long_only_r (
int ___argc,
char *const *___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data
);
#endif /* getopt_int.h */
--- NEW FILE: gettext.h ---
#undef gettext
#define gettext
More information about the fribidi-commit
mailing list