+// Global pointer to our QApplication
+QApplication *g_app = NULL;
+
+void usage()
+{
+ fprintf(stdout,
+ "Usage:\n"
+ " %s [OPTION…] [FILE] — %s\n"
+ "\n"
+ "Help Options:\n"
+ " -V, --version Show release version\n"
+ " -h, -?, --help Show help option\n"
+ "\n", PV_BIN_NAME, PV_DESCRIPTION);
+}
+
+/*
+ * SIGINT handler (likely received Ctrl-C from terminal)
+ */
+void sigint_handler(int param)
+{
+ (void)param;
+
+ qDebug("Received SIGINT.");
+
+ if (g_app)
+ g_app->quit();
+}
+