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

📄 thesaurus.c

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 C
字号:
#include <u.h>#include <libc.h>#include <bio.h>#include "dict.h"voidthesprintentry(Entry e, int cmd){	char *p, *pe;	int c, i;	p = e.start;	pe = e.end;	while(p < pe) {		c = *p++;		if(cmd == 'r') {			outchar(c);			continue;		}		switch(c) {		case '*':			c = *p++;			if(cmd == 'h' && c != 'L') {				outnl(0);				return;			}			if(c == 'L' && cmd != 'h')				outnl(0);			if(c == 'S') {				outchar('(');				outchar(*p++);				outchar(')');			}			break;		case '#':			c = *p++;			i = *p++ - '0' - 1;			if(i < 0 || i > 4)				break;			switch(c) {			case 'a': outrune(L"áàâäa"[i]); break;			case 'e': outrune(L"éèêëe"[i]); break;			case 'o': outrune(L"óòôöo"[i]); break;			case 'c': outrune(L"ccccç"[i]); break;			default: outchar(c); break;			}			break;		case '+':		case '<':			break;		case ' ':			if(cmd == 'h' && *p == '*') {				outnl(0);				return;			}		default:			outchar(c);		}	}	outnl(0);}longthesnextoff(long fromoff){	long a;	char *p;	a = Bseek(bdict, fromoff, 0);	if(a < 0)		return -1;	for(;;) {		p = Brdline(bdict, '\n');		if(!p)			break;		if(p[0] == '*' && p[1] == 'L')			return (Boffset(bdict)-Blinelen(bdict));	}	return -1;}voidthesprintkey(void){	Bprint(bout, "No key\n");}

⌨️ 快捷键说明

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