* etc.c (next_status): after = is R_ST_VALUE

R_ST_VALUE > => R_ST_NORMAL
		R_ST_VALUE SP => R_ST_TAG
	(read_token): R_ST_VALUE
	(correct_irrtag): R_ST_VALUE
* rm.h (R_ST_VALUE): added
	(ST_IS_REAL_TAG): rewrite
	(ST_IS_COMMENT): deleted
	(ST_IS_TAG): deleted
* parsetagx.c (parse_tag): skip too long tagname
			skip too long attrname
			if attrvalue has quote char, need reconstruct
			if unknown attr, need reconstruct
* table.c (visible_length): R_ST_VALUE
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2003-01-23 18:01:01 +00:00
parent 51c2899aa9
commit e718702d12
5 changed files with 49 additions and 16 deletions

12
etc.c
View File

@@ -1,4 +1,4 @@
/* $Id: etc.c,v 1.56 2003/01/23 16:02:15 ukai Exp $ */
/* $Id: etc.c,v 1.57 2003/01/23 18:01:05 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -636,7 +636,7 @@ next_status(char c, int *status)
else if (c == '>')
*status = R_ST_NORMAL;
else
*status = R_ST_TAG;
*status = R_ST_VALUE;
return 0;
case R_ST_QUOTE:
if (c == '\'')
@@ -646,6 +646,12 @@ next_status(char c, int *status)
if (c == '"')
*status = R_ST_TAG;
return 0;
case R_ST_VALUE:
if (c == '>')
*status = R_ST_NORMAL;
else if (IS_SPACE(c))
*status = R_ST_TAG;
return 0;
case R_ST_AMP:
if (c == ';') {
*status = R_ST_NORMAL;
@@ -792,6 +798,7 @@ read_token(Str buf, char **instr, int *status, int pre, int append)
case R_ST_EQL:
case R_ST_QUOTE:
case R_ST_DQUOTE:
case R_ST_VALUE:
case R_ST_AMP:
Strcat_char(buf, *p);
break;
@@ -838,6 +845,7 @@ correct_irrtag(int status)
case R_ST_TAG:
case R_ST_TAG0:
case R_ST_EQL: /* required ">" */
case R_ST_VALUE:
c = '>';
break;
case R_ST_QUOTE: