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

📄 tm.c

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 C
字号:
/* tm.c: split numerical fields */# include "t.h"char	*maknew(char *str){				/* make two numerical fields */	int	c;	char	*p, *q, *ba, *dpoint;	p = str;	for (ba = 0; c = *str; str++)		if (c == '\\' && *(str + 1) == '&')			ba = str;	str = p;	if (ba == 0) {		for (dpoint = 0; *str; str++) {			if (*str == '.' && !ineqn(str, p) && 			    (str > p && digit(*(str - 1)) || 			    digit(*(str + 1))))				dpoint = str;		}		if (dpoint == 0)			for (; str > p; str--) {				if (digit( *(str - 1) ) && !ineqn(str, p))					break;			}		if (!dpoint && p == str) /* not numerical, don't split */			return(0);		if (dpoint) 			str = dpoint;	} else		str = ba;	p = str;	if (exstore == 0 || exstore > exlim) {		exstore = exspace = chspace();		exlim = exstore + MAXCHS;	}	q = exstore;	while (*exstore++ = *str++)		;	*p = 0;	return(q);}intineqn (char *s, char *p){				/* true if s is in a eqn within p */	int	ineq = 0, c;	while (c = *p) {		if (s == p)			return(ineq);		p++;		if ((ineq == 0) && (c == delim1))			ineq = 1;		else if ((ineq == 1) && (c == delim2))			ineq = 0;	}	return(0);}

⌨️ 快捷键说明

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