#include <QtGui/QApplication>
#include "dialog.h"
+#include <getopt.h>
+#include <ul_logreg.h>
+#include <stdio.h>
+
+static struct option long_opts[] = {
+ { "loglevel", 1, 0, 'l' },
+ { 0, 0, 0, 0}
+};
+
+static void
+usage(void)
+{
+ printf("usage: frm_gui [ options ]\n");
+ printf(" -l, --loglevel <number>|<domain>=<number>,...\n");
+}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog w;
+ char opt;
+
+ while ((opt = getopt_long(argc, argv, "l:", &long_opts[0], NULL)) != EOF) {
+ switch (opt) {
+ case 'l':
+ ul_log_domain_arg2levels(optarg);
+ break;
+ case 'h':
+ /*default:*/
+ usage();
+ exit(opt == 'h' ? 0 : 1);
+ }
+ }
+
w.show();
return a.exec();
}