wp.c

来自「harvest是一个下载html网页得机器人」· C语言 代码 · 共 55 行

C
55
字号
/* * (c) Copyright 1993 by Panagiotis Tsirigotis * All rights reserved.  The file named COPYRIGHT specifies the terms  * and conditions for redistribution. */static char RCSid[] = "wp.c,v 1.2 1994/05/12 18:45:02 hardy Exp";#include "sio.h"#include "defs.h"void wordperfect_process(fd)int fd;{	char *line;	int output_string = FALSE;	void decode_string();	int get_line_char();	while (line = Srdline(fd)) {		char *p;		if (line[0] == '%')			continue;		for (p = line; *p;) {			if (*p == OPEN_PAREN) {				if (p > line && p[-1] == CARRIAGE_RETURN)					printout(SPACE);				p++;				decode_string(get_line_char, (void *) &p);				output_string = TRUE;			} else if (isdigit(*p)) {				while (isdigit(*p))					p++;				if (isspace(*p)) {					while (isspace(*p))						p++;					if (isdigit(*p)) {						while (isdigit(*p))							p++;						if (output_string) {							printout(NEWLINE);							output_string = FALSE;						}					}				}			} else				p++;		}	}}

⌨️ 快捷键说明

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