Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

nanomud.h File Reference

Go to the source code of this file.

Data Structures

struct  ansi_table
struct  hash
struct  poss
struct  sbuff
struct  seltext
struct  session_data
struct  tagECHOREPLY
struct  tagECHOREQUEST
struct  tagICMPHDR
struct  tagIPHDR
struct  termbuf
struct  termbuffer

Defines

#define ANSI_BLUE   "\e[0;34m"
#define ANSI_C_1BLINK   "\e[5m"
#define ANSI_C_BACK   "\e[7m"
#define ANSI_C_BLUE   "\e[1;34m"
#define ANSI_C_CYAN   "\e[1;36m"
#define ANSI_C_GREEN   "\e[1;32m"
#define ANSI_C_GREY   "\e[1;30m"
#define ANSI_C_MAGENTA   "\e[1;35m"
#define ANSI_C_RED   "\e[1;31m"
#define ANSI_C_WHITE   "\e[1;37m"
#define ANSI_C_YELLOW   "\e[1;33m"
#define ANSI_CLEAR   "\e[0m"
#define ANSI_CYAN   "\e[0;36m"
#define ANSI_GREEN   "\e[0;32m"
#define ANSI_MAGENTA   "\e[0;35m"
#define ANSI_RED   "\e[0;31m"
#define ANSI_WHITE   "\e[0;37m"
#define ANSI_YELLOW   "\e[0;33m"
#define AO   245
#define AT_BLINK   4
#define AT_LINK   8
#define AT_NONE   0
#define AT_REVERSE   2
#define AT_UNDERLINE   1
#define ATBLINK   0x00200000UL
#define ATBOLD   0x00040000UL
#define ATREVER   0x00100000UL
#define ATSELEC   0x00000400UL
#define ATUNDER   0x00080000UL
#define AYT   246
#define BG_MASK   0x0003FE00UL
#define BG_SHIFT   9
#define BLACK   40
#define BLUE   44
#define BOOL   unsigned short int
#define bool   unsigned short int
#define BREAK   243
#define BRIGHT   0x01000000UL
#define C_BLACK   30
#define C_BLUE   34
#define C_CYAN   36
#define C_GREEN   32
#define C_MAGENTA   35
#define C_RED   31
#define C_WHITE   37
#define C_YELLOW   33
#define CH_MASK   0x3FE00000UL
#define CH_SHIFT   21
#define CYAN   46
#define DEBUG_FILE   "debug1.txt"
#define DM   242
#define DO   253
#define DONT   254
#define EC   247
#define EL   248
#define EOR   239
#define FALSE   0
#define FG_MASK   0x000001FFUL
#define FG_SHIFT   0
#define free(x)   nano_free (x, __FILE__, __LINE__)
#define GA   249
#define GREEN   42
#define GREY   50
#define handle_except(a, b, c, d)   _except_handler(a,b,c,d, __FILE__, __LINE__)
#define html_log   "mudlog.html"
#define IAC   255
#define ICMP_ECHOREPLY   0
#define ICMP_ECHOREQ   8
#define ID_ABOUT_OK_BUTTON   1200
#define ID_CONFIG_COLOR   1601
#define ID_CONFIG_EA   1606
#define ID_CONFIG_EB   1614
#define ID_CONFIG_ECC   1611
#define ID_CONFIG_EM   1609
#define ID_CONFIG_EP   1608
#define ID_CONFIG_EPP   1612
#define ID_CONFIG_ES   1605
#define ID_CONFIG_ESS   1610
#define ID_CONFIG_ESSS   1615
#define ID_CONFIG_ET   1607
#define ID_CONFIG_ETL   1603
#define ID_CONFIG_ETN   1616
#define ID_CONFIG_EUR   1613
#define ID_CONFIG_ODS   1604
#define ID_CONFIG_STS   1617
#define ID_CONFIG_UMC   1602
#define ID_Credit_OK_BUTTON   1201
#define ID_EDIT_COPY   1103
#define ID_EDIT_FIND   1100
#define ID_EDIT_FIND_NEXT   1101
#define ID_EDIT_INPUT   1101
#define ID_EDIT_OUTPUT   1100
#define ID_EDIT_PASTE   1102
#define ID_EDIT_SALL   1105
#define ID_EDIT_SEND   1104
#define ID_FILE_CLOSE   1004
#define ID_FILE_DISCONNECT   1008
#define ID_FILE_EXIT   1001
#define ID_FILE_EXPORT_ANSI   1007
#define ID_FILE_EXPORT_HTML   1005
#define ID_FILE_EXPORT_TEXT   1006
#define ID_FILE_IMPORT_ANSI   10088
#define ID_FILE_NEW   1003
#define ID_FILE_OPEN   1002
#define ID_HELP_ABOUT   1027
#define ID_HELP_CREDITS   1028
#define ID_HELP_HELP   1026
#define ID_MAINSCROLL   1301
#define ID_MUDINPUT   1300
#define ID_SETTINGS_CONFIGURE   1014
#define ID_SETTINGS_OPTIONS   1016
#define ID_SETTINGS_STATUS   1015
#define ID_STATUS   1600
#define ID_TERMINAL   1400
#define ID_TIMER_BLINK   1700
#define ID_TIMER_PING   1500
#define IP   244
#define IS_IN_DEBUGGING_MODE   0
#define LOWER(c)   ((c) >= 'A' && (c) <= 'Z' ? (c)+'a'-'A' : (c))
#define MAGENTA   45
#define malloc(x)   nano_malloc(x, __FILE__, __LINE__)
#define MOUSE_LEFT   2
#define MOUSE_MIDDLE   3
#define MOUSE_RIGHT   1
#define Mud_client_Version   "0.5.2 Build: 13991"
#define MUD_RECV   1006
#define MYSOCKET_CONNECT   22222
#define NCOLORS   24
#define NOP   241
#define null   NULL
#define realize_lines(a)   (realize_lines_internal(a, __LINE__, __FILE__))
#define realloc(x, y)   nano_realloc (x,y, __FILE__, __LINE__)
#define RED   41
#define REQ_DATASIZE   32
#define SB   250
#define SE   240
#define SETTINGS_FILE   "nanomud_settings.nmd"
#define somalloc(z)   malloc(sizeof(z))
#define SYNCH   242
#define TELOPT_BINARY   0
#define TELOPT_BM   19
#define TELOPT_DET   20
#define TELOPT_ECHO   1
#define TELOPT_EOR   25
#define TELOPT_EXOPL   255
#define TELOPT_LOGOUT   18
#define TELOPT_NAMS   4
#define TELOPT_NAOCRD   10
#define TELOPT_NAOFFD   13
#define TELOPT_NAOHTD   12
#define TELOPT_NAOHTS   11
#define TELOPT_NAOL   8
#define TELOPT_NAOLFD   16
#define TELOPT_NAOP   9
#define TELOPT_NAOVTD   15
#define TELOPT_NAOVTS   14
#define TELOPT_RCP   2
#define TELOPT_RCTE   7
#define TELOPT_SGA   3
#define TELOPT_SNDLOC   23
#define TELOPT_STATUS   5
#define TELOPT_SUPDUP   21
#define TELOPT_SUPDUPOUTPUT   22
#define TELOPT_TM   6
#define TELOPT_TTYPE   24
#define TELOPT_XASCII   17
#define TELQUAL_IS   0
#define TELQUAL_SEND   1
#define TRUE   1
#define TRUE_BLACK   60
#define UINT_MAX   65535
#define ul_int   unsigned long int
#define ULINT_MAX   4294967292
#define UPPER(c)   ((c) >= 'a' && (c) <= 'z' ? (c)+'A'-'a' : (c))
#define WHITE   47
#define WILL   251
#define WIN_32_LEAN_AND_MEAN
#define WM_SOCKET   1005
#define WONT   252
#define YELLOW   43

Typedefs

typedef linked_buffer_chain BUF_CHAIN
typedef linked_buffer BUFFER
typedef linked_buffer_chain CHAIN_BUF
typedef tagECHOREPLY ECHOREPLY
typedef tagECHOREQUEST ECHOREQUEST
typedef hash HASH
typedef tagICMPHDR ICMPHDR
typedef tagIPHDR IPHDR
typedef tagECHOREPLYPECHOREPLY
typedef tagECHOREQUESTPECHOREQUEST
typedef tagICMPHDRPICMPHDR
typedef tagIPHDRPIPHDR
typedef session_data SDATA
typedef seltext SELTEXT
typedef termbuf TBUF
typedef termbuffer TERMBUF

Enumerations

enum  colors {
  red, blue, green, black,
  yellow, cyan, magenta
}

Functions

LRESULT APIENTRY AboutProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void add_newline (const char *buffer)
int add_term (TERMBUF *term, char *line, int lline, char *file)
void blink_term (void)
void check_output (void)
DWORD WINAPI check_ping (void)
DWORD WINAPI check_que (void)
void check_url (TERMBUF *term)
void CheckPing (void)
void chop_line (TERMBUF *ter)
void clear_buffer (void)
void ClearTerminal (void)
int CloseWinsock (HWND hwnd, char *HostName)
void create_hdc_buf (void)
void create_s_table (void)
void CreateAboutBox (void)
void CreateCreditBox (void)
void CreateSettings (void)
LRESULT APIENTRY CreditProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void do_nasty (void)
DWORD WINAPI do_parse (TERMBUF *ter, BOOL bleh)
void do_peek (void)
void do_term_test (void)
void do_update_paint (HDC hdc, int left, int top, int right, int bottom)
void do_url (const char *url)
void export_to_html (void)
TERMBUFfetch_line (unsigned long int idx)
void fix_line (TERMBUF *line1, TERMBUF *line2)
void FlushBuffer (char *buffer, int colour2, int bKcolour2)
int fnmatch (const char *pattern, const char *string, int flags)
void FormatText (HWND hwnd)
void free_context (HDC context)
void free_line (TERMBUF *rem)
void free_scripts (void)
void FreeTerm (void)
HDC get_context (void)
unsigned long int get_hash (unsigned char *str)
void get_scroll_pos (void)
char * get_time (void)
unsigned long int get_x (int x)
int GetWindowWrap (HWND hwnd)
void give_term_debug (char *to_echo,...)
void give_term_echo (char *to_echo,...)
void give_term_error (char *to_echo,...)
void GiveError (char *wrong, BOOL KillProcess)
void handle_input (char *in)
void handle_selection (void)
int HandleWinsockConnection (HWND hwnd, char *HostName)
u_short in_cksum (u_short *addr, int len)
void init_hash (int hashes)
void init_scripts (void)
void interp_mouse (int rws, int cls, int state)
BOOL is_operator (char *point)
int isspace (int c)
void load_scripts (void)
void load_settings (void)
void LOG (unsigned char *fmt,...)
void log_html (const char *str, int colour)
void MakeBuffers (void)
void nano_free (void *seg, const char *file, int line)
void * nano_malloc (size_t chunk, const char *file, int line)
void * nano_realloc (void *seg, size_t sz, const char *file, int line)
TERMBUFnew_line (int line, char *file)
TERMBUFnew_term (char *buffer)
TERMBUFnew_termbuffer (void)
char * one_argument (char *argument, char *arg_first)
void parse_ansi (TERMBUF *ter, BOOL is_logging_html)
void parse_script (const unsigned char *script)
void ParseLines (unsigned char *readbuff)
unsigned long int precache_file (char *str)
int read_string (char buf[], FILE *fp)
void realize_lines_internal (char *lline, int line, char *file)
DWORD RecvEchoReply (SOCKET s, LPSOCKADDR_IN lpsaFrom, u_char *pTTL)
void redraw_terminal (void)
char * ret_string (TERMBUF *ter, char str[])
void return_usage (void)
void save_scripts (void)
void save_settings (void)
char * script_strip (char *argument, char *arg_first)
void scroll_term (long int pos, long int to)
int SendEchoRequest (SOCKET s, LPSOCKADDR_IN lpstToAddr)
void set_scroll (unsigned long int t, unsigned long int s, unsigned long int p)
LRESULT CALLBACK SettingsProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
void sleep (int)
bool str_cmp (const char *astr, const char *bstr)
char * str_dup (const char *str)
BOOL str_search (const char *str)
BOOL string_compare (const char *ostr, const char *tstr)
char * strip_ansi (const char *str)
bool strprefix (const char *astr, const char *bstr)
void term_run (void)
void terminal_initialize (void)
void terminal_resize (void)
void update_scroll (void)
void update_term (void)
int WaitForEchoReply (SOCKET s)
void walk_heap (void)
BOOL wraps (char *buf)
void write_buffer (const char *str)

Variables

WNDPROC AboutProc
TERMBUFbackcurr
TERMBUFbackfirst
TERMBUFbackfree
TERMBUFbacklist
TERMBUFbackprev
int bKcolour
BOOL blinked
unsigned long c_attr_f
int colour
WNDPROC CreditProc
ul_int curline
unsigned long def_attr
bool echo_off
HINSTANCE g_hInst
HFONT hf
TERMBUFmainfree
HWND MainScroll
HWND MudAbout
HWND MudCredit
HWND MudInput
HWND MudMain
RECT mudrect
HWND MudSettings
HWND MudStatus
HWND MudWindow
BOOL nasty
int old_colour
char oldbuff
WNDPROC OldProc
BUFFERscreen_buffer
SELTEXTselection
WNDPROC SettingsProc
SOCKET sock
bool tabbed
TBUFtbuf
HWND Terminal
SDATAthis_session
RECT trc
BOOL updating
WSADATA wsaData


Define Documentation

#define ANSI_BLUE   "\e[0;34m"
 

Definition at line 171 of file nanomud.h.

#define ANSI_C_1BLINK   "\e[5m"
 

Definition at line 183 of file nanomud.h.

#define ANSI_C_BACK   "\e[7m"
 

Definition at line 184 of file nanomud.h.

#define ANSI_C_BLUE   "\e[1;34m"
 

Definition at line 179 of file nanomud.h.

#define ANSI_C_CYAN   "\e[1;36m"
 

Definition at line 181 of file nanomud.h.

#define ANSI_C_GREEN   "\e[1;32m"
 

Definition at line 177 of file nanomud.h.

#define ANSI_C_GREY   "\e[1;30m"
 

Definition at line 175 of file nanomud.h.

#define ANSI_C_MAGENTA   "\e[1;35m"
 

Definition at line 180 of file nanomud.h.

#define ANSI_C_RED   "\e[1;31m"
 

Definition at line 176 of file nanomud.h.

#define ANSI_C_WHITE   "\e[1;37m"
 

Definition at line 182 of file nanomud.h.

#define ANSI_C_YELLOW   "\e[1;33m"
 

Definition at line 178 of file nanomud.h.

#define ANSI_CLEAR   "\e[0m"
 

Definition at line 167 of file nanomud.h.

#define ANSI_CYAN   "\e[0;36m"
 

Definition at line 173 of file nanomud.h.

#define ANSI_GREEN   "\e[0;32m"
 

Definition at line 169 of file nanomud.h.

#define ANSI_MAGENTA   "\e[0;35m"
 

Definition at line 172 of file nanomud.h.

#define ANSI_RED   "\e[0;31m"
 

Definition at line 168 of file nanomud.h.

#define ANSI_WHITE   "\e[0;37m"
 

Definition at line 174 of file nanomud.h.

#define ANSI_YELLOW   "\e[0;33m"
 

Definition at line 170 of file nanomud.h.

Referenced by handle_input().

#define AO   245
 

Definition at line 379 of file nanomud.h.

#define AT_BLINK   4
 

Definition at line 142 of file nanomud.h.

#define AT_LINK   8
 

Definition at line 143 of file nanomud.h.

#define AT_NONE   0
 

Definition at line 139 of file nanomud.h.

#define AT_REVERSE   2
 

Definition at line 141 of file nanomud.h.

#define AT_UNDERLINE   1
 

Definition at line 140 of file nanomud.h.

#define ATBLINK   0x00200000UL
 

Definition at line 29 of file nanomud.h.

#define ATBOLD   0x00040000UL
 

Definition at line 31 of file nanomud.h.

#define ATREVER   0x00100000UL
 

Definition at line 33 of file nanomud.h.

#define ATSELEC   0x00000400UL
 

Definition at line 34 of file nanomud.h.

#define ATUNDER   0x00080000UL
 

Definition at line 30 of file nanomud.h.

#define AYT   246
 

Definition at line 378 of file nanomud.h.

#define BG_MASK   0x0003FE00UL
 

Definition at line 27 of file nanomud.h.

#define BG_SHIFT   9
 

Definition at line 37 of file nanomud.h.

#define BLACK   40
 

Definition at line 148 of file nanomud.h.

Referenced by FlushBuffer(), log_html(), set_mouse_pos(), and WindowProcedure().

#define BLUE   44
 

Definition at line 152 of file nanomud.h.

Referenced by do_update_paint(), FlushBuffer(), log_html(), and update_term().

#define BOOL   unsigned short int
 

Definition at line 52 of file nanomud.h.

Referenced by blink_term(), check_alias(), check_path(), compile_script(), del_heap(), do_if(), eval_expression(), is_function_internal(), is_math(), is_operator(), is_same(), left_token(), ParseLines(), right_token(), simple_str_match(), str_search(), string_compare(), and wraps().

#define bool   unsigned short int
 

Definition at line 50 of file nanomud.h.

#define BREAK   243
 

Definition at line 381 of file nanomud.h.

#define BRIGHT   0x01000000UL
 

Definition at line 40 of file nanomud.h.

#define C_BLACK   30
 

Definition at line 156 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_BLUE   34
 

Definition at line 160 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_CYAN   36
 

Definition at line 162 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_GREEN   32
 

Definition at line 158 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_MAGENTA   35
 

Definition at line 161 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_RED   31
 

Definition at line 157 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_WHITE   37
 

Definition at line 163 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define C_YELLOW   33
 

Definition at line 159 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define CH_MASK   0x3FE00000UL
 

Definition at line 32 of file nanomud.h.

Referenced by handle_selection().

#define CH_SHIFT   21
 

Definition at line 38 of file nanomud.h.

Referenced by handle_selection().

#define CYAN   46
 

Definition at line 154 of file nanomud.h.

Referenced by FlushBuffer(), and log_html().

#define DEBUG_FILE   "debug1.txt"
 

Definition at line 128 of file nanomud.h.

Referenced by write_buffer().

#define DM   242
 

Definition at line 382 of file nanomud.h.

#define DO   253
 

Definition at line 371 of file nanomud.h.

#define DONT   254
 

Definition at line 370 of file nanomud.h.

#define EC   247
 

Definition at line 377 of file nanomud.h.

#define EL   248
 

Definition at line 376 of file nanomud.h.

#define EOR   239
 

Definition at line 385 of file nanomud.h.

#define FALSE   0
 

Definition at line 48 of file nanomud.h.

Referenced by add_term(), check_string(), do_nasty(), do_update_paint(), handle_aliases(), handle_path(), handle_triggers(), HandleWinsockConnection(), log_html(), ParseLines(), save_aliases(), save_macros(), save_paths(), save_scripts(), save_triggers(), save_vars(), update_term(), WindowProcedure(), and write_buffer().

#define FG_MASK   0x000001FFUL
 

Definition at line 28 of file nanomud.h.

#define FG_SHIFT   0
 

Definition at line 39 of file nanomud.h.

#define free  )     nano_free (x, __FILE__, __LINE__)
 

Definition at line 136 of file nanomud.h.

Referenced by compile_script(), del_heap(), free_alias(), free_class(), free_line(), free_macro(), free_path(), free_trigger(), FreeTerm(), init_scripts(), log_html(), nano_free(), parse_ansi(), parse_script(), ParseLines(), safefree(), and WindowProcedure().

#define GA   249
 

Definition at line 375 of file nanomud.h.

#define GREEN   42
 

Definition at line 150 of file nanomud.h.

Referenced by export_to_html(), FlushBuffer(), and log_html().

#define GREY   50
 

Definition at line 164 of file nanomud.h.

Referenced by FlushBuffer(), log_html(), and parse_ansi().

#define handle_except a,
b,
c,
 )     _except_handler(a,b,c,d, __FILE__, __LINE__)
 

Definition at line 497 of file nanomud.h.

#define html_log   "mudlog.html"
 

Definition at line 185 of file nanomud.h.

Referenced by log_html().

#define IAC   255
 

Definition at line 369 of file nanomud.h.

#define ICMP_ECHOREPLY   0
 

_arpa_telnet_h

Definition at line 447 of file nanomud.h.

#define ICMP_ECHOREQ   8
 

Definition at line 448 of file nanomud.h.