举世闻名的joe记事本源程序

源代码在线查看: queue.c

软件大小: 600 K
上传用户: diablo_he1987
关键词: joe 记事本 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*				 * 	Doubly linked list primitives				 *	Copyright				 *		(C) 1992 Joseph H. Allen				 *				 *	This file is part of JOE (Joe's Own Editor)				 */				#include "types.h"								void *QUEUE;				void *ITEM;				void *LAST;								void *alitem(void *list, int itemsize)				{					STDITEM	*freelist = (STDITEM *)list;									if (qempty(STDITEM, link, freelist)) {						STDITEM *i = (STDITEM *) joe_malloc(itemsize * 16);						STDITEM *z = (STDITEM *) ((unsigned char *) i + itemsize * 16);										while (i != z) {							enquef(STDITEM, link, freelist, i);							i = (STDITEM *) ((unsigned char *) i + itemsize);						}					}					return (void *) deque_f(STDITEM, link, freelist->link.prev);				}								void frchn(void *list, void *ch)				{					STDITEM *freelist = (STDITEM *)list;					STDITEM *chn = (STDITEM *)ch;					STDITEM *i;									if ((i = chn->link.prev) != chn) {						deque(STDITEM, link, chn);						splicef(STDITEM, link, freelist, i);					}				}							

相关资源