summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-06-12 23:54:52 +0300
committerunknown <monty@mashka.mysql.fi>2002-06-12 23:54:52 +0300
commitc554eeec98958fd77dfedf18fc7c5cfd58cf046b (patch)
treecfdcf5e5526e4c6c56e46aa9bb5b32c92d153149 /myisam
parent33e636cbb4e00f98634567c0096ee9e90c8ac82f (diff)
downloadmariadb-git-c554eeec98958fd77dfedf18fc7c5cfd58cf046b.tar.gz
Remove remains of old getopt
sql/sql_delete.cc: Removed unnecessary code
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_dump.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/myisam/ft_dump.c b/myisam/ft_dump.c
index c9350ee77b9..d95e719e234 100644
--- a/myisam/ft_dump.c
+++ b/myisam/ft_dump.c
@@ -20,7 +20,7 @@
#include "ftdefs.h"
#include <my_getopt.h>
-static void get_options(int argc,char *argv[]);
+static void get_options(int *argc,char **argv[]);
static void usage();
static void complain(int val);
@@ -66,7 +66,7 @@ int main(int argc,char *argv[])
struct { MI_INFO *info; } aio0, *aio=&aio0; /* for GWS_IN_USE */
MY_INIT(argv[0]);
- get_options(argc,argv);
+ get_options(&argc, &argv);
if (count || dump)
verbose=0;
if (!count && !dump && !lstats && !query)
@@ -75,17 +75,18 @@ int main(int argc,char *argv[])
if (verbose)
setbuf(stdout,NULL);
- if (argc-optind < 2)
+ if (argc < 2)
usage();
- if (!(info=mi_open(argv[optind],2,HA_OPEN_ABORT_IF_LOCKED)))
+ if (!(info=mi_open(argv[0],2,HA_OPEN_ABORT_IF_LOCKED)))
goto err;
- inx=atoi(argv[optind+1]);
+ inx=atoi(argv[1]);
*buf2=0;
aio->info=info;
- if ((inx >= info->s->base.keys) || !(info->s->keyinfo[inx].flag & HA_FULLTEXT))
+ if ((inx >= info->s->base.keys) ||
+ !(info->s->keyinfo[inx].flag & HA_FULLTEXT))
{
printf("Key %d in table %s is not a FULLTEXT key\n", inx, info->filename);
goto err;
@@ -240,11 +241,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
return 0;
}
-static void get_options(int argc, char *argv[])
+
+static void get_options(int *argc, char **argv[])
{
int ho_error;
- if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
+ if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
} /* get options */