X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=e1a225d77f39917b6eaa2836343f6fdb8a648d05;hp=ed39ce6efa942e58773d891e2ffb28acc39eecf3;hb=ebbea4043aa7c7f200e4f56c3bfa42f5c31f2e03;hpb=c52dfd608f15c8779df38fd46602e562b287171a diff --git a/audioc.c b/audioc.c index ed39ce6e..e1a225d7 100644 --- a/audioc.c +++ b/audioc.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2005 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2005 Andre Noll , see file COPYING. */ /** \file audioc.c The client program used to connect to para_audiod. */ @@ -99,9 +95,15 @@ I9E_DUMMY_COMPLETER(tasks); I9E_DUMMY_COMPLETER(term); static void help_completer(struct i9e_completion_info *ci, - struct i9e_completion_result *result) + struct i9e_completion_result *cr) { - result->matches = i9e_complete_commands(ci->word, audiod_completers); + char *opts[] = {LSG_AUDIOD_CMD_HELP_OPTS, NULL}; + + if (ci->word[0] == '-') { + i9e_complete_option(opts, ci, cr); + return; + } + cr->matches = i9e_complete_commands(ci->word, audiod_completers); } static void version_completer(struct i9e_completion_info *ci, @@ -291,12 +293,11 @@ __noreturn static void print_completions(void) static char *configfile_exists(void) { char *config_file; - struct stat statbuf; char *home = para_homedir(); config_file = make_message("%s/.paraslash/audioc.conf", home); free(home); - if (!stat(config_file, &statbuf)) + if (file_exists(config_file)) return config_file; free(config_file); return NULL;