specify func argument and related cleanup (#183)
* specifies the function argument type in commands.h compared to leaving
it unspecified. all the functions in cmd_t must have arg_t as it's
argument.
* changes to commands.h will now trigger a rebuild - this restores old
behavior prior to 12efa0e
* cg_quit now uses it's argument as exit status
* DestroyNotify invokes cg_quit rather than calling exit directly.
* Explicitly pass EXIT_SUCCESS to cgquit in keybinding
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
This commit is contained in:
@ -52,7 +52,7 @@ extern int markidx;
|
||||
extern int prefix;
|
||||
extern bool extprefix;
|
||||
|
||||
bool cg_quit(arg_t _)
|
||||
bool cg_quit(arg_t status)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -62,7 +62,7 @@ bool cg_quit(arg_t _)
|
||||
printf("%s%c", files[i].name, options->using_null ? '\0' : '\n');
|
||||
}
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
bool cg_switch_mode(arg_t _)
|
||||
|
Reference in New Issue
Block a user