From 9fac310d1a4e46f4bcc70177e59cbf93763ef479 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 19 Jan 2000 15:07:00 +0000 Subject: Put client on a stony ground. The whole client is going to be system-specific (the current version UNIX-specific) anyway, so it's useless to try splitting it to sysdep and generic part. Instead of this, configure script decides (based on system type and user's wish) what (if any) client should be built and what autoconfiguration it requires. Also, the client provides its own die/bug/... functions. --- client/client.c | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'client/client.c') diff --git a/client/client.c b/client/client.c index 2a43a8d..e9bc827 100644 --- a/client/client.c +++ b/client/client.c @@ -6,21 +6,48 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ +#include +#include +#include +#include + #include "nest/bird.h" +#include "lib/resource.h" #include "client/client.h" -struct cmd_info { - char *command; - char *args; - char *help; -}; +static char *opt_list = ""; -static struct cmd_info command_table[] = { -#include "conf/commands.h" -}; +static void +usage(void) +{ + fprintf(stderr, "Usage: birdc\n"); + exit(1); +} + +static void +parse_args(int argc, char **argv) +{ + int c; + + while ((c = getopt(argc, argv, opt_list)) >= 0) + switch (c) + { + default: + usage(); + } + if (optind < argc) + usage(); +} int main(int argc, char **argv) { - return client_main(argc, argv); /* Call sysdep code */ +#ifdef HAVE_LIBDMALLOC + if (!getenv("DMALLOC_OPTIONS")) + dmalloc_debug(0x2f03d00); +#endif + + parse_args(argc, argv); + + bug("Not implemented yet!"); } -- cgit v1.2.3