string.h

来自「使用BorlandC++4.5编译的一个MUD客户端程序」· C头文件 代码 · 共 33 行

H
33
字号
/* string.h: String types */
/* $Id: string.h 2.1 1995/10/24 15:46:14 tsurace Release $ */

typedef struct cstr	Cstr;
typedef struct string	String;
typedef struct rstr	Rstr;
typedef struct istr	Istr;

/* Counted string */
struct cstr {
	char *s;	/* Text	  */
	int l;		/* Length */
};

/* Stretchybuffer */
struct string {
	Cstr c;		/* Contents */
	int sz;		/* Space allocated */
};

/* Keeps track of physical representation of strings */
struct rstr {
	String str;	/* Contents */
	int refs;	/* Number of istrs pointing to it */
};

/* Keeps track of interpreter copies of strings */
struct istr {
	Rstr *rs;	/* Physical copy */
	int refs;	/* Number of dframes pointing to it */
};

⌨️ 快捷键说明

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