+/* -*- mode: C; c-file-style: "gnu" -*- */
+/* main.c main() for message bus
+ *
+ * Copyright (C) 2003 Red Hat, Inc.
+ *
+ * Licensed under the Academic Free License version 1.2
+ *
+ * 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 of the License, 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
+ *
+ */
+#include "bus.h"
+#include "loop.h"
+#include <dbus/dbus-internals.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static void
+usage (void)
+{
+ fprintf (stderr, "dbus-daemon-1 [--session] [--system] [--config-file=FILE] [--version]\n");
+ exit (1);
+}
+
+static void
+version (void)
+{
+ printf ("D-BUS Message Bus Daemon %s\n"
+ "Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others\n"
+ "This is free software; see the source for copying conditions.\n"
+ "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
+ VERSION);
+ exit (0);
+}
+
+static void
+check_two_config_files (const DBusString *config_file,
+ const char *extra_arg)
+{
+ if (_dbus_string_get_length (config_file) > 0)
+ {
+ fprintf (stderr, "--%s specified but configuration file %s already requested\n",
+ extra_arg, _dbus_string_get_const_data (config_file));
+ exit (1);
+ }
+}