summaryrefslogtreecommitdiff
path: root/src/core/args.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-16 20:18:05 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-16 20:18:05 +0000
commitc2397475c5105dc6d5db1fac0ee1d8f33b77b237 (patch)
tree0076cdb290a2c15627812f94c117d6c4d621ea85 /src/core/args.c
parent2a1052bbcef9318e42df9a87cc4cfb9fe8ef5a40 (diff)
downloadirssi-c2397475c5105dc6d5db1fac0ee1d8f33b77b237.zip
Cleaned up code.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@480 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/args.c')
-rw-r--r--src/core/args.c16
1 files changed, 11 insertions, 5 deletions
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]);