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

📄 line.c

📁 teco编辑器源码
💻 C
字号:
#include <ctype.h>
#include <stdio.h>
#include <string.h>

line()
{
#include "teco.h"

	int iter;				/* Iteration  < > count */
	if (number < 1) while (1) {		/* Position back  */
		if (!bufptx) return;		/*  ...all done   */
		if (toascii(buffer[bufptx--]) == 13) {
			if (! number++) {	/* Start new line *
				++bufptx;
				if (toascii(buffer[bufptx+1]) == 10) {
					++bufptx;
				}
				return;
			}
		}
	}
	if (number > 0) while (1) {		/* Position front */
		if (bufptx+1 >= bufptr) return;
		if (toascii(buffer[++bufptx]) == 13) {
			if (toascii(buffer[bufptx+1]) == 10) ++bufptx;
			if (! --number) return;
		}
	}
}

⌨️ 快捷键说明

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