mariadb/mysys/getopt1.c
unknown 16115af97c Changed to use my_global.h
Fixed problem with LIKE with latin1_de
Added parsing support of UNSIGNED LONG LONG


Docs/manual.texi:
  Changelog
client/client_priv.h:
  Changed to use my_global.h
client/completion_hash.cc:
  Changed to use my_global.h
client/errmsg.c:
  Changed to use my_global.h
client/get_password.c:
  Changed to use my_global.h
client/mysqldump.c:
  Changed to use my_global.h
client/mysqlshow.c:
  Changed to use my_global.h
client/mysqltest.c:
  Changed to use my_global.h
client/password.c:
  Changed to use my_global.h
client/readline.cc:
  Changed to use my_global.h
client/sql_string.cc:
  Changed to use my_global.h
client/thimble.cc:
  Changed to use my_global.h
client/thread_test.c:
  Changed to use my_global.h
dbug/dbug.c:
  Changed to use my_global.h
dbug/dbug_analyze.c:
  Changed to use my_global.h
dbug/example1.c:
  Changed to use my_global.h
dbug/example2.c:
  Changed to use my_global.h
dbug/example3.c:
  Changed to use my_global.h
dbug/factorial.c:
  Changed to use my_global.h
dbug/main.c:
  Changed to use my_global.h
dbug/sanity.c:
  Changed to use my_global.h
extra/comp_err.c:
  Changed to use my_global.h
extra/my_print_defaults.c:
  Changed to use my_global.h
extra/perror.c:
  Changed to use my_global.h
extra/replace.c:
  Changed to use my_global.h
extra/resolve_stack_dump.c:
  Changed to use my_global.h
extra/resolveip.c:
  Changed to use my_global.h
fs/libmysqlfs.h:
  Changed to use my_global.h
fs/mysqlcorbafs.h:
  Changed to use my_global.h
heap/hp_test1.c:
  Changed to use my_global.h
include/Makefile.am:
  Changed to use my_global.h
include/m_ctype.h:
  Changed to use my_global.h
include/my_base.h:
  Changed to use my_global.h
innobase/include/univ.i:
  Changed to use my_global.h
libmysql/dll.c:
  Changed to use my_global.h
libmysql/errmsg.c:
  Changed to use my_global.h
libmysql/get_password.c:
  Changed to use my_global.h
libmysql/libmysql.c:
  Changed to use my_global.h
libmysql/net.c:
  Changed to use my_global.h
libmysql/password.c:
  Changed to use my_global.h
libmysqld/lib_sql.cc:
  Changed to use my_global.h
libmysqld/lib_vio.c:
  Changed to use my_global.h
libmysqld/libmysqld.c:
  Changed to use my_global.h
mysql-test/mysql-test-run.sh:
  Changed to use latin1 as default character set
mysql-test/r/ctype_latin1_de.result:
  Changed to use my_global.h
mysql-test/r/func_like.result:
  New test
mysql-test/t/ctype_latin1_de.test:
  Added test of part keys
mysql-test/t/func_like.test:
  New test
mysys/checksum.c:
  Changed to use my_global.h
mysys/getopt.c:
  Changed to use my_global.h
mysys/getopt1.c:
  Changed to use my_global.h
mysys/make-conf.c:
  Changed to use my_global.h
mysys/my_alloc.c:
  Changed to use my_global.h
mysys/my_clock.c:
  Changed to use my_global.h
mysys/my_compress.c:
  Changed to use my_global.h
mysys/mysys_priv.h:
  Changed to use my_global.h
mysys/test_charset.c:
  Changed to use my_global.h
mysys/testhash.c:
  Changed to use my_global.h
mysys/thr_alarm.c:
  Changed to use my_global.h
mysys/thr_mutex.c:
  Changed to use my_global.h
regex/debug.c:
  Changed to use my_global.h
regex/main.c:
  Changed to use my_global.h
regex/regcomp.c:
  Changed to use my_global.h
regex/regerror.c:
  Changed to use my_global.h
regex/regexec.c:
  Changed to use my_global.h
regex/regexp.c:
  Changed to use my_global.h
regex/regfree.c:
  Changed to use my_global.h
regex/reginit.c:
  Changed to use my_global.h
sql/cache_manager.cc:
  Changed to use my_global.h
sql/gen_lex_hash.cc:
  Changed to use my_global.h
sql/ha_berkeley.cc:
  Fixed problem with UNIQUE keys that could contain NULL
sql/ha_gemini.h:
  Changed to use my_global.h
sql/handler.cc:
  Fixed problem after merge
sql/item.cc:
  Added Item_unit
sql/item.h:
  Added Item_uint
sql/matherr.c:
  Changed to use my_global.h
sql/md5.c:
  Changed to use my_global.h
sql/mini_client.cc:
  Changed to use my_global.h
sql/my_lock.c:
  Changed to use my_global.h
sql/mysql_priv.h:
  Changed to use my_global.h
sql/net_serv.cc:
  Changed to use my_global.h
sql/password.c:
  Changed to use my_global.h
sql/sql_lex.cc:
  Added parsing support of UNSIGNED LONG LONG
sql/sql_show.cc:
  Changed to use my_global.h
sql/sql_string.cc:
  Changed to use my_global.h
sql/sql_yacc.yy:
  Added usage of Int_uint
sql/stacktrace.c:
  Changed to use my_global.h
sql/udf_example.cc:
  Changed to use my_global.h
strings/atof.c:
  Changed to use my_global.h
strings/bchange.c:
  Changed to use my_global.h
strings/bcmp.c:
  Changed to use my_global.h
strings/bfill.c:
  Changed to use my_global.h
strings/bmove.c:
  Changed to use my_global.h
strings/bmove512.c:
  Changed to use my_global.h
strings/bmove_upp.c:
  Changed to use my_global.h
strings/ctype-big5.c:
  Changed to use my_global.h
strings/ctype-czech.c:
  Changed to use my_global.h
strings/ctype-euc_kr.c:
  Changed to use my_global.h
strings/ctype-gb2312.c:
  Changed to use my_global.h
strings/ctype-gbk.c:
  Changed to use my_global.h
strings/ctype-latin1_de.c:
  Fixed problem with LIKE
strings/ctype-sjis.c:
  Changed to use my_global.h
strings/ctype-tis620.c:
  Changed to use my_global.h
strings/ctype-ujis.c:
  Changed to use my_global.h
strings/ctype.c:
  Changed to use my_global.h
strings/do_ctype.c:
  Changed to use my_global.h
strings/int2str.c:
  Changed to use my_global.h
strings/is_prefix.c:
  Changed to use my_global.h
strings/llstr.c:
  Changed to use my_global.h
strings/longlong2str.c:
  Changed to use my_global.h
strings/r_strinstr.c:
  Changed to use my_global.h
strings/str2int.c:
  Changed to use my_global.h
strings/str_test.c:
  Changed to use my_global.h
strings/strappend.c:
  Changed to use my_global.h
strings/strcend.c:
  Changed to use my_global.h
strings/strcont.c:
  Changed to use my_global.h
strings/strend.c:
  Changed to use my_global.h
strings/strfill.c:
  Changed to use my_global.h
strings/strings-not-used.h:
  Changed to use my_global.h
strings/strinstr.c:
  Changed to use my_global.h
strings/strmake.c:
  Changed to use my_global.h
strings/strmov.c:
  Changed to use my_global.h
strings/strnlen.c:
  Changed to use my_global.h
strings/strnmov.c:
  Changed to use my_global.h
strings/strstr.c:
  Changed to use my_global.h
strings/strto.c:
  Changed to use my_global.h
strings/strtol.c:
  Changed to use my_global.h
strings/strtoll.c:
  Changed to use my_global.h
strings/strtoul.c:
  Changed to use my_global.h
strings/strtoull.c:
  Changed to use my_global.h
strings/strxmov.c:
  Changed to use my_global.h
strings/strxnmov.c:
  Changed to use my_global.h
strings/udiv.c:
  Changed to use my_global.h
tools/mysqlmanager.c:
  Changed to use my_global.h
vio/test-ssl.c:
  Changed to use my_global.h
vio/test-sslclient.c:
  Changed to use my_global.h
vio/test-sslserver.c:
  Changed to use my_global.h
vio/test-ssl:
  Changed to use my_global.h
vio/vio.c:
  Changed to use my_global.h
vio/viosocket.c:
  Changed to use my_global.h
vio/viossl.c:
  Changed to use my_global.h
vio/viosslfactories.c:
  Changed to use my_global.h
vio/viotest-ssl.c:
  Changed to use my_global.h
2001-09-14 02:54:33 +03:00

170 lines
4.2 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994
Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
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.
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
Library 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.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <my_global.h>
#include "getopt.h"
#if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS) && !defined(OS2)
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
#define const
#endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
#ifndef __WIN__
#include <stdlib.h>
#endif /* __WIN__ */
#ifndef NULL
#define NULL 0
#endif
int
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);
}
/* 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 *const *argv, const char *options, const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#ifdef TEST
#include <stdio.h>
int
main (argc, argv)
int argc;
char **argv;
{
int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
int option_index = 0;
static 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 == EOF)
break;
switch (c)
{
case 0:
printf ("option %s", long_options[option_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 ", argv[optind++]);
printf ("\n");
}
exit (0);
}
#endif /* TEST */