From ed6081502ad814289b9b7b5537658c3b1ad435e5 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 29 Oct 1999 09:44:44 +0000 Subject: Added skeleton of the client. Does nothing, but at least compiles. --- sysdep/unix/Modules | 2 ++ sysdep/unix/client-main.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 sysdep/unix/client-main.c (limited to 'sysdep/unix') diff --git a/sysdep/unix/Modules b/sysdep/unix/Modules index 7d403dd..7534a47 100644 --- a/sysdep/unix/Modules +++ b/sysdep/unix/Modules @@ -18,3 +18,5 @@ krt-iface.h krt-set.c krt-set.h #endif + +client-main.c diff --git a/sysdep/unix/client-main.c b/sysdep/unix/client-main.c new file mode 100644 index 0000000..da01e21 --- /dev/null +++ b/sysdep/unix/client-main.c @@ -0,0 +1,54 @@ +/* + * BIRD Client -- Unix Entry Point + * + * (c) 1999 Martin Mares + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#include +#include +#include +#include + +#include "nest/bird.h" +#include "client/client.h" + +#include "unix.h" + +static char *opt_list = ""; + +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 +client_main(int argc, char **argv) +{ +#ifdef HAVE_LIBDMALLOC + if (!getenv("DMALLOC_OPTIONS")) + dmalloc_debug(0x2f03d00); +#endif + + parse_args(argc, argv); + + bug("Not implemented yet!"); +} -- cgit v1.2.3