search.c
来自「teco编辑器源码」· C语言 代码 · 共 26 行
C
26 行
#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 + =
减小字号Ctrl + -
显示快捷键?