irssi/src/core/special-vars.h
Timo Sirainen d4558de232 /SET prompt - if target had %c or something in it, it shouldn't be
treated as color code. So color codes can now be used in /SET prompt
string itself, but in none of the $variables it uses.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1324 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-03 21:34:06 +00:00

33 lines
1.3 KiB
C

#ifndef __SPECIAL_VARS_H
#define __SPECIAL_VARS_H
#include "signals.h"
#define PARSE_FLAG_GETNAME 0x01 /* return argument name instead of it's value */
#define PARSE_FLAG_ISSET_ANY 0x02 /* arg_used field specifies that at least one of the $variables was non-empty */
#define PARSE_FLAG_ESCAPE_VARS 0x04 /* if any arguments/variables contain % chars, escape them with another % */
typedef char* (*SPECIAL_HISTORY_FUNC)
(const char *text, void *item, int *free_ret);
/* Parse and expand text after '$' character. return value has to be
g_free()'d if `free_ret' is TRUE. */
char *parse_special(char **cmd, SERVER_REC *server, void *item,
char **arglist, int *free_ret, int *arg_used, int flags);
/* parse the whole string. $ and \ chars are replaced */
char *parse_special_string(const char *cmd, SERVER_REC *server, void *item,
const char *data, int *arg_used, int flags);
/* execute the commands in string - commands can be split with ';' */
void eval_special_string(const char *cmd, const char *data,
SERVER_REC *server, void *item);
void special_history_func_set(SPECIAL_HISTORY_FUNC func);
void special_vars_add_signals(const char *text,
int funccount, SIGNAL_FUNC *funcs);
void special_vars_remove_signals(const char *text,
int funccount, SIGNAL_FUNC *funcs);
#endif