mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added comments to command.c
This commit is contained in:
parent
33bb82b4aa
commit
727dfcb491
@ -362,6 +362,8 @@ cmd_init(void)
|
|||||||
history_init();
|
history_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Command autocompletion functions
|
||||||
|
|
||||||
char *
|
char *
|
||||||
cmd_complete(char *inp)
|
cmd_complete(char *inp)
|
||||||
{
|
{
|
||||||
@ -374,6 +376,8 @@ cmd_reset_completer(void)
|
|||||||
p_autocomplete_reset(commands_ac);
|
p_autocomplete_reset(commands_ac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Command help
|
||||||
|
|
||||||
GSList *
|
GSList *
|
||||||
cmd_get_basic_help(void)
|
cmd_get_basic_help(void)
|
||||||
{
|
{
|
||||||
@ -413,6 +417,8 @@ cmd_get_status_help(void)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Command execution
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
cmd_execute(const char * const command, const char * const inp)
|
cmd_execute(const char * const command, const char * const inp)
|
||||||
{
|
{
|
||||||
@ -440,6 +446,7 @@ cmd_execute_default(const char * const inp)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The command functions
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_cmd_connect(const char * const inp, struct cmd_help_t help)
|
_cmd_connect(const char * const inp, struct cmd_help_t help)
|
||||||
@ -728,6 +735,8 @@ _cmd_xa(const char * const inp, struct cmd_help_t help)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helper function for status change commands
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_update_presence(const jabber_presence_t presence,
|
_update_presence(const jabber_presence_t presence,
|
||||||
const char * const show, const char * const inp)
|
const char * const show, const char * const inp)
|
||||||
@ -760,6 +769,8 @@ _update_presence(const jabber_presence_t presence,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helper function for boolean preference commands
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_cmd_set_boolean_preference(const char * const inp, struct cmd_help_t help,
|
_cmd_set_boolean_preference(const char * const inp, struct cmd_help_t help,
|
||||||
const char * const cmd_str, const char * const display,
|
const char * const cmd_str, const char * const display,
|
||||||
@ -797,6 +808,8 @@ _cmd_set_boolean_preference(const char * const inp, struct cmd_help_t help,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helper to get command by string
|
||||||
|
|
||||||
static struct cmd_t *
|
static struct cmd_t *
|
||||||
_cmd_get_command(const char * const command)
|
_cmd_get_command(const char * const command)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user