/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Mon Nov 25 17:38:28 CET 2002
    copyright            : (C) 2002-2003 by Ashley Montanaro; Daniel Winter
    email                : ashley_montanaro@hotmail.com; dw@danielwinter.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#include <stdlib.h>
#include <iostream>

#include <BemusedServerDlg.h>

#define VERSION_STRING "1.73"

using namespace std;

void show_usage(void)
{
	cout << "Bemused Linux Server v" << VERSION_STRING << endl;
	cout << "usage: bemusedlinuxserver [-d]" << endl;
	cout << "   -d  daemonize" << endl;
}

int main(int argc, char **argv)
{
  CBemusedServerDlg dlg;
  bool daemonize = false;
  int c;

  for (;;)
  {
    c = getopt( argc, argv, "hd");
    if (c == EOF) break;
    switch (c)
    {
      case 'd':
        daemonize = 1;
        break;
      case 'h':
      default:
        show_usage();
        exit(1);
    }
  }

  dlg.OnInitDialog(daemonize);
  return EXIT_SUCCESS;
}
