diff options
author | Timo Sirainen <cras@irssi.org> | 2001-05-11 15:48:09 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-05-11 15:48:09 +0000 |
commit | e3b33796ff29574e3c91c07e2aa3d669b3cd4760 (patch) | |
tree | 903e10b4fd3db5654d86f502bb7a31ef302299b5 /src/core/commands.h | |
parent | d44b803c3cb14d6ea94b90fc6c9f74e05854062a (diff) | |
download | irssi-e3b33796ff29574e3c91c07e2aa3d669b3cd4760.zip |
Moved PARAM_FLAG_OPTCHAN handling to core. Removed support for adding own
command parameter parsers, it's probably useless now that opt.channels are
in core.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1482 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/commands.h')
-rw-r--r-- | src/core/commands.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/commands.h b/src/core/commands.h index 6acf11f3..9dee2e80 100644 --- a/src/core/commands.h +++ b/src/core/commands.h @@ -97,11 +97,11 @@ void command_set_options_module(const char *module, int command_have_option(const char *cmd, const char *option); /* count can have these flags: */ -#define PARAM_WITHOUT_FLAGS(a) ((a) & 0x00ffffff) +#define PARAM_WITHOUT_FLAGS(a) ((a) & 0x00000fff) /* don't check for quotes - "arg1 arg2" is NOT treated as one argument */ -#define PARAM_FLAG_NOQUOTES 0x01000000 +#define PARAM_FLAG_NOQUOTES 0x00001000 /* final argument gets all the rest of the arguments */ -#define PARAM_FLAG_GETREST 0x02000000 +#define PARAM_FLAG_GETREST 0x00002000 /* command contains options - first you need to specify them with command_set_options() function. Example: @@ -124,9 +124,11 @@ int command_have_option(const char *cmd, const char *option); "cmd2" = "another arg" "optnumarg" = "" - this is because "rest" isn't a numeric value */ -#define PARAM_FLAG_OPTIONS 0x04000000 +#define PARAM_FLAG_OPTIONS 0x00004000 /* don't complain about unknown options */ -#define PARAM_FLAG_UNKNOWN_OPTIONS 0x08000000 +#define PARAM_FLAG_UNKNOWN_OPTIONS 0x00008000 +/* optional channel in first argument */ +#define PARAM_FLAG_OPTCHAN 0x00010000 char *cmd_get_param(char **data); /* get parameters from command - you should point free_me somewhere and @@ -137,10 +139,6 @@ int cmd_get_params(const char *data, gpointer *free_me, int count, ...); void cmd_params_free(void *free_me); -typedef char* (*CMD_GET_FUNC) (const char *data, int *count, va_list *args); -void cmd_get_add_func(CMD_GET_FUNC func); -void cmd_get_remove_func(CMD_GET_FUNC func); - void commands_remove_module(const char *module); void commands_init(void); |