diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-02-03 16:48:02 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-02-03 16:48:02 +0000 |
commit | ab8da71d29ad30030e39fd00aa2dc09666446b61 (patch) | |
tree | d9742fb78f66f5484712ea499c1c35df15d35c9c /src/fe-common | |
parent | c403b70de4b6b03d7d823d808f6e57f55cb07155 (diff) | |
download | irssi-ab8da71d29ad30030e39fd00aa2dc09666446b61.zip |
Remove popt and use glib GOption commandline option parser
(glib-2.6 is now the minimum required version).
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4700 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index 5b038e7a..fc52950a 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -124,15 +124,14 @@ static void sig_channel_destroyed(CHANNEL_REC *channel) void fe_common_core_register_options(void) { - static struct poptOption options[] = { - POPT_AUTOHELP - { "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, "Automatically connect to server/network", "SERVER" }, - { "password", 'w', POPT_ARG_STRING, &autocon_password, 0, "Autoconnect password", "PASSWORD" }, - { "port", 'p', POPT_ARG_INT, &autocon_port, 0, "Autoconnect port", "PORT" }, - { "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, "Disable autoconnecting", NULL }, - { "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, "Specify nick to use", NULL }, - { "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, "Specify host name to use", NULL }, - { NULL, '\0', 0, NULL } + static GOptionEntry options[] = { + { "connect", 'c', 0, G_OPTION_ARG_STRING, &autocon_server, "Automatically connect to server/network", "SERVER" }, + { "password", 'w', 0, G_OPTION_ARG_STRING, &autocon_password, "Autoconnect password", "PASSWORD" }, + { "port", 'p', 0, G_OPTION_ARG_INT, &autocon_port, "Autoconnect port", "PORT" }, + { "noconnect", '!', 0, G_OPTION_ARG_NONE, &no_autoconnect, "Disable autoconnecting", NULL }, + { "nick", 'n', 0, G_OPTION_ARG_STRING, &cmdline_nick, "Specify nick to use", NULL }, + { "hostname", 'h', 0, G_OPTION_ARG_STRING, &cmdline_hostname, "Specify host name to use", NULL }, + { NULL } }; autocon_server = NULL; |