-
-int main(int, char **argv) {
- _argv = argv;
-
-#ifdef HAVE_SIGACTION
- struct sigaction action;
-
- action.sa_handler = signalhandler;
- action.sa_mask = sigset_t();
- action.sa_flags = SA_NOCLDSTOP | SA_NODEFER;
-
- sigaction(SIGPIPE, &action, NULL);
- sigaction(SIGSEGV, &action, NULL);
- sigaction(SIGFPE, &action, NULL);
- sigaction(SIGTERM, &action, NULL);
- sigaction(SIGINT, &action, NULL);
- sigaction(SIGHUP, &action, NULL);
-#else // !HAVE_SIGACTION
- signal(SIGPIPE, (RETSIGTYPE (*)(int)) signalhandler);
- signal(SIGSEGV, (RETSIGTYPE (*)(int)) signalhandler);
- signal(SIGFPE, (RETSIGTYPE (*)(int)) signalhandler);
- signal(SIGTERM, (RETSIGTYPE (*)(int)) signalhandler);
- signal(SIGINT, (RETSIGTYPE (*)(int)) signalhandler);
- signal(SIGHUP, (RETSIGTYPE (*)(int)) signalhandler);
-#endif // HAVE_SIGACTION
-
- _display = XOpenDisplay(_display_name);
- if (! _display) {
- cout << "Connection to X server '" << _display_name << "' failed.\n";
- return 1;
- }
-
- while (! _shutdown) {
- usleep(500);
- }
-
- XCloseDisplay(_display);
- return 0;
+static void usage()
+{
+ cout << "usage: epist OPTIONS" << endl;
+ cout << endl;
+ cout << "Options:" << endl;
+ cout <<
+ " -rc RCFILE Specifies the path to an alternate rc file to load"
+ << endl <<
+ " -display DISPLAY Specifies the X display to run on" << endl <<
+ " -help Display this help and exit" << endl <<
+ " -version Display the version and exit" << endl <<
+ endl;
+ exit(0);