From c2397475c5105dc6d5db1fac0ee1d8f33b77b237 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 16 Jul 2000 20:18:05 +0000 Subject: Cleaned up code. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@480 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/args.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/core/args.c') diff --git a/src/core/args.c b/src/core/args.c index cf48e02c..3b7108a5 100644 --- a/src/core/args.c +++ b/src/core/args.c @@ -25,10 +25,13 @@ GArray *iopt_tables = NULL; void args_register(struct poptOption *options) { - if (iopt_tables == NULL) - iopt_tables = g_array_new(TRUE, TRUE, sizeof(struct poptOption)); + if (iopt_tables == NULL) { + iopt_tables = g_array_new(TRUE, TRUE, + sizeof(struct poptOption)); + } - while (options->longName != NULL || options->shortName != '\0' || options->arg != NULL) { + while (options->longName != NULL || options->shortName != '\0' || + options->arg != NULL) { g_array_append_val(iopt_tables, *options); options = options+1; } @@ -42,13 +45,16 @@ void args_execute(int argc, char *argv[]) if (iopt_tables == NULL) return; - con = poptGetContext(PACKAGE, argc, argv, (struct poptOption *) (iopt_tables->data), 0); + con = poptGetContext(PACKAGE, argc, argv, + (struct poptOption *) (iopt_tables->data), 0); poptReadDefaultConfig(con, TRUE); while ((nextopt = poptGetNextOpt(con)) > 0) ; if (nextopt != -1) { - printf(_("Error on option %s: %s.\nRun '%s --help' to see a full list of available command line options.\n"), + printf(_("Error on option %s: %s.\n" + "Run '%s --help' to see a full list of " + "available command line options.\n"), poptBadOption(con, 0), poptStrerror(nextopt), argv[0]); -- cgit v1.2.3