/*1* alias.h: header for alias.c2*3* Written By Michael Sandrof4*5* Copyright(c) 19906*7* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT8*9* @(#)$Id: alias.h 3 2008-02-25 09:49:14Z keaston $10*/1112#ifndef _ALIAS_H_13#define _ALIAS_H_1415#include "irc_std.h"1617#define DCC_STRUCT 018#define USERLIST_STRUCT 119#define NICK_STRUCT 220#define SERVER_STRUCT 3212223extern BuiltInDllFunctions *dll_functions;2425/*26* XXXX - These need to go away27*/28#define COMMAND_ALIAS 029#define VAR_ALIAS 130#define VAR_ALIAS_LOCAL 23132/*33* These are the user commands. Dont call these directly.34*/35extern void aliascmd (char *, char *, char *, char *);36extern void assigncmd (char *, char *, char *, char *);37extern void localcmd (char *, char *, char *, char *);38extern void stubcmd (char *, char *, char *, char *);39extern void dumpcmd (char *, char *, char *, char *);4041extern void add_var_alias (char *, char *);42extern void add_local_alias (char *, char *);43/*extern void add_cmd_alias (char *, char *);*/44extern void add_var_stub_alias (char *, char *);45extern void add_cmd_stub_alias (char *, char *);4647extern char * get_variable (char *);48extern char ** glob_cmd_alias (char *, int *);49extern char * get_cmd_alias (char *, int *, char **, void **);50extern char ** get_subarray_elements (char *, int *, int);515253/* These are in expr.c */54/*55* This function is a general purpose interface to alias expansion.56* The second argument is the text to be expanded.57* The third argument are the command line expandoes $0, $1, etc.58* The fourth argument is a flag whether $0, $1, etc are used59* The fifth argument, if set, controls whether only the first "command"60* will be expanded. If set, this argument will be set to the "rest"61* of the commands (after the first semicolon, or the null). If NULL,62* then the entire text will be expanded.63*/64extern char * BX_expand_alias (const char *, const char *, int *, char **);6566/*67* This is the interface to the "expression parser"68* The first argument is the expression to be parsed69* The second argument is the command line expandoes ($0, $1, etc)70* The third argument will be set if the command line expandoes are used.71*/72extern char * BX_parse_inline (char *, const char *, int *);7374/*75* This function is used to call a user-defined function.76* Noone should be calling this directly except for call_function.77*/78extern char * call_user_function (char *, char *);79extern void call_user_alias (char *, char *, char *, void *);80818283/*84* This function is sued to save all the current aliases to a global85* file. This is used by /SAVE and /ABORT.86*/87extern void save_aliases (FILE *, int);88extern void save_assigns (FILE *, int);8990/*91* This function is in functions.c92* This function allows you to execute a primitive "BUILT IN" expando.93* These are the $A, $B, $C, etc expandoes.94* The argument is the character of the expando (eg, 'A', 'B', etc)95*96* This is in functions.c97*/98extern char * built_in_alias (char, int *);99100101102/* BOGUS */103104/*105* This function is used by parse_command to directly execute an alias.106* Noone should be calling this function directly. (call parse_line.)107*/108/*extern void execute_alias (char *, char *, char *);*/109void prepare_alias_call (void *, char **);110void destroy_alias_call (void *);111112113/*114* This is in functions.c115* This is only used by next_unit and expand_alias to call built in functions.116* Noone should call this function directly.117*/118extern char * call_function (char *, const char *, int *);119120121122/*123* These are the two primitives for runtime stacks.124*/125extern void BX_make_local_stack (char *);126extern void BX_destroy_local_stack (void);127extern void set_current_command (char *);128extern void bless_local_stack (void);129extern void unset_current_command (void);130extern void dump_call_stack (void);131extern void panic_dump_call_stack (void);132extern void BX_lock_stack_frame (void);133extern void BX_unlock_stack_frame (void);134extern void destroy_aliases (int);135Alias *find_var_alias (char *);136void delete_var_alias (char *, int);137char *parse_line_with_return (char *, char *, char *, int, int);138/*139* This is the alias interface to the /STACK command.140*/141extern void do_stack_alias (int, char *, int);142char *BX_next_unit (char *, const char *, int *, int);143char *BX_alias_special_char(char **buffer, char *ptr, const char *args, char *quote_em, int *args_flag);144145#endif /* _ALIAS_H_ */146147148