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

📄 search.c

📁 teco编辑器源码
💻 C
字号:
#include <ctype.h>
#include <stdio.h>
#include <string.h>
search() /* Search for (alt terminated) string */
{
#include "teco.h"

	int match=0;				/* Comparison cnt */
	int tmp;				/* Scratch var #1 */

	bufptx++;				/* Advance to nxt */

	if (getbuf[getptx] == 27) goto done;	/* Found string   */
	while (bufptx <= bufptr ) {		/* Scan the array */
	if (toupper(buffer[bufptx+match]) != toupper(getbuf[getptx+match])) {
			bufptx++;		/* Punt, no match */
			match=0;		/*  ..reset count */
		} else {
			match++;		/* Record a match */
			if (getbuf[getptx+match] == 27) goto done;
		}
	}
	bufptx=0;				/* Pointer to beg */
done:;
}

⌨️ 快捷键说明

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