⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vt.h

📁 使用BorlandC++4.5编译的一个MUD客户端程序
💻 H
字号:
head	2.1;access;symbols;locks; strict;comment	@ * @;2.1date	95.10.24.15.46.14;	author tsurace;	state Release;branches;next	1.1;1.1date	95.10.12.21.07.12;	author tsurace;	state Beta;branches;next	;desc@Main header file.@2.1log@Roll.@text@/* vt.h: Header for all VT source files */
/* $Id: vt.h 1.1 1995/10/12 21:07:12 tsurace Beta tsurace $ */

/* VT 2.x is a public domain client written essentially from scratch by
** Greg Hudson.	 The code may be re-used for any purpose, although the
** author should be credited where appropriate and the resulting program
** should be free if any substantial amount of code was used. */

#define VERSION "Vaportalk 2.15"

/* Include files */
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <time.h>
#include <sys/stat.h>
#include "regexp.h"
#ifdef __WIN32__
#include <io.h>
#include <stdlib.h>
#else
extern char *malloc(), *realloc(), *getenv(), *strchr(), *strrchr(), *ctime();
#endif /* __WIN32__ */


/* HP-UX uses sysv library routines but its own termcap */
#ifdef hpux
#define SYSVLIB
#endif

#ifdef sun4
#define SYSVTTY
#endif

#ifdef SYSV
#define SYSVLIB
#define SYSVTTY
#endif

#ifdef linux
#define SYSVTTY
#endif

#ifdef __WIN32__
#define SYSVLIB
#endif

#ifdef SYSVLIB
#define bcopy(a, b, c) memcpy(b, a, c)
#define bzero(a, b)    memset(a, 0, b)
#ifndef __WIN32__
extern void memcpy(), memset();
#endif /* __WIN32__ */
#else
extern void bcopy(), bzero();
#endif

/* Any system-dependent optimization definitions */
#include "config.h"
#include "string.h"
#include "struct.h"
#include "extern.h"

#define Case			break; case
#define Default			break; default
#ifndef __WIN32__
#define min(x, y)		((x) <= (y) ? (x) : (y))
#define max(x, y)		((x) >= (y) ? (x) : (y))
#endif /* __WIN32__ */
#define streq(a, b)		(!strcmp(a, b))
#define s_acpy(x, y)		s_cpy(x, cstr_s(y))
#define s_ancpy(x, y, z)	s_ncpy(x, cstr_s(y), z)
#define s_acat(x, y)		s_cat(x, cstr_s(y))
#define istr_c(a)		istr_rs(rstr_c(a))
#define istr_s(a)		istr_c(cstr_s(a))
#define istr_sl(s, l)		istr_c(cstr_sl(s, l))
#define New(t)			(t *)(dmalloc(sizeof(t)))
#define Newarray(t, n)		(t *)(dmalloc(sizeof(t) * (n)))
#define Rearray(p, t, o, n)	(t *)(drealloc((char *) p, sizeof(t) * (o), \
							   sizeof(t) * (n)))
#define Resize(p, t, o, n)	(p) = Rearray(p, t, o, n)
#define Double(p, t, s)		if (1) { Resize(p, t, s, (s) * 2); s *= 2; } \
				else
#define Check(p, t, s, d)	if ((s) < (d)) Double(p, t, s); else
#define Checkinc(p, t, s, v)	if ((v) == (s)) Double(p, t, s); else
#define Push(p, t, s, v, x)	if (1) { Checkinc(p, t, s, v); \
					 (p)[(v)++] = (x); } else
#define Discard(x, t)		dfree((char *) x, sizeof(t))
#define Discardarray(x, t, n)	dfree((char *) x, sizeof(t) * (n))
#define Discardstring(x)	Discardarray(x, char, strlen(x) + 1)
#define Copy(s, d, n, t)	bcopy((char*)(s), (char*)(d), (n) * sizeof(t))
#define Cur_win (cur_win ? cur_win : cur_rmt ? cur_rmt->u.r.win : active_win)
#define Cur_rmt (cur_rmt ? cur_rmt : cur_win ? cur_win->u.w.rmt : \
		active_win->u.w.rmt)
#define coutput(x)		output(Cur_win, (x))

extern Unode *active_win, *cur_win, *cur_rmt;
extern int vtc_errflag;
extern char *vtc_errmsg;

/* string.c externals and related macros */
extern Cstr empty_cstr;
extern String wbufs[], empty_string;
#ifdef ANSI_CTYPES
#define lcase(x) (tolower((x) & 0x7f))
#define ucase(x) (toupper((x) & 0x7f))
#else
extern char lowercase_values[], uppercase_values[];
#define lcase(x) (lowercase_values[(x) & 0x7f])
#define ucase(x) (uppercase_values[(x) & 0x7f])
#endif
#define NUM_WBUFS 3

/* window.c externals and related macros */
  extern char s_clrscr[], s_clreol[], s_bold_on[], s_bold_off[];
# define clrscr()	    vtwrite(cstr_s(s_clrscr))
# define clreol()	    vtwrite(cstr_s(s_clreol))
# define bold(s)		    vtwrite(cstr_s((s) ? s_bold_on : s_bold_off));

@1.1log@Initial revision@text@d2 1a2 1/* $Id$ */@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -