1 #ifndef __SPECIAL_VARS_H
2 #define __SPECIAL_VARS_H
6 #define PARSE_FLAG_GETNAME 0x01 /* return argument name instead of it's value */
7 #define PARSE_FLAG_ISSET_ANY 0x02 /* arg_used field specifies that at least one of the $variables was non-empty */
8 #define PARSE_FLAG_ESCAPE_VARS 0x04 /* if any arguments/variables contain % chars, escape them with another % */
10 typedef char* (*SPECIAL_HISTORY_FUNC)
11 (const char *text, void *item, int *free_ret);
13 /* Parse and expand text after '$' character. return value has to be
14 g_free()'d if `free_ret' is TRUE. */
15 char *parse_special(char **cmd, SERVER_REC *server, void *item,
16 char **arglist, int *free_ret, int *arg_used, int flags);
18 /* parse the whole string. $ and \ chars are replaced */
19 char *parse_special_string(const char *cmd, SERVER_REC *server, void *item,
20 const char *data, int *arg_used, int flags);
22 /* execute the commands in string - commands can be split with ';' */
23 void eval_special_string(const char *cmd, const char *data,
24 SERVER_REC *server, void *item);
26 void special_history_func_set(SPECIAL_HISTORY_FUNC func);
28 void special_vars_add_signals(const char *text,
29 int funccount, SIGNAL_FUNC *funcs);
30 void special_vars_remove_signals(const char *text,
31 int funccount, SIGNAL_FUNC *funcs);