[w3m-dev 03667] fold patch

* anchor.c (reAnchorPos): rewrite
	(reAnchorWord): delete reseq_anchor()
	(reAnchorAny): use l->size
			delete reseq_anchor()
* backend.c (internal_get): pass TRUE to saveBuffer
* buffer.c (newBuffer): delete n->linelen
	(reshapeBuffer): rewrite
* display.c (displayBuffer): FoldLine
	(redrawLine): l->bpos
	(cursorUp0): added
	(cursorUp): rewrite
	(cursorDown0): added
	(cursowDown): rewrite
	(cursorRight): check l->next
			l->bwidth
	(cursorLeft): l->prev && l->bpos
			l->bwidth
	(arrangeCursor): buf->currentLine->bwidth
		buf->cursorX
* etc.c (checkType): **oporp
			rewrite
	(calcPosition): realColumn allocated by New_reuse
* file.c (addnewline): add nlines arg
	(propBuffer): deleted
	(colorBuffer): deleted
	(readHeader): propBuffer
		FOLD_BUFFER_WIDTH
	(HTMLlineproc2body): rewrite
	(addnewline2): added
	(addnewline): rewrite
	(loadBuffer): propBuffer, colorBuffer
	(saveBuffer): cont arg
	(getNextPage): rewrite
* fm.h (LINELEN): 256
	(FNLEN): deleted
	(Line): add size, bpos, bwidth
	(Buffer): delete linelen
	(INIT_BUFFER_WIDTH): check showLineNum
	(FOLD_BUFFER_WIDTH): added
	(FoldLine): added
* funcname.tab (RESHAPE): added
* main.c (do_dump): pass FALSE to saveBuffer
	(nscroll): rewrite
	(clear_mark): l->size
	(shiftvisualpos): rewrite
	(pipeBuf): pass TRUE to saveBuffer
	(linebeg): check line->prev && line->bpos
	(linend): check line->next, line->next->bpos
	(editScr): pass TRUE to saveBuffer
	(svBuf): pass TRUE to saveBuffer
	(vmSrc): pass TRUE to saveBuffer
	(reshape): added
	(curlno): rewrite
* mimehead.c (LINELEN): deleted
* proto.h (reshape): added
	(saveBuffer): add cont arg
	(cursorUp0): added
	(cursorDown0): added
	(checkType): change type oprop, ocolor, delete check_color, len
* rc.c (CMT_FOLD_LINE): added
	(params1): add fold_line
	(sync_with_option): check PagerMax
* search.c (set_mark): l->size
	(forwardSearch): rewrite
	(backwardSearch): rewrite
* doc/README.func (RESHAPE): added
* doc-jp/README.func (RESHAPE): added
* scripts/w3mhelp.cgi.in (Buffer operation): add reshape
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2003-01-23 18:37:18 +00:00
parent e718702d12
commit 61c2c2de18
17 changed files with 541 additions and 233 deletions

13
fm.h
View File

@@ -1,4 +1,4 @@
/* $Id: fm.h,v 1.106 2003/01/23 18:01:06 ukai Exp $ */
/* $Id: fm.h,v 1.107 2003/01/23 18:37:20 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -71,9 +71,8 @@ void bzero(void *, int);
/*
* Constants.
*/
#define LINELEN 4096 /* Maximum line length */
#define LINELEN 256 /* Initial line length */
#define PAGER_MAX_LINE 10000 /* Maximum line kept as pager */
#define FNLEN 80
#ifdef USE_IMAGE
#define MAX_IMAGE 1000
@@ -316,6 +315,9 @@ typedef struct _Line {
long linenumber; /* on buffer */
long real_linenumber; /* on file */
unsigned short usrflags;
short size;
short bpos;
short bwidth;
} Line;
typedef struct {
@@ -438,7 +440,6 @@ typedef struct _Buffer {
struct frameset *frameset;
struct frameset_queue *frameQ;
int *clone;
size_t linelen;
size_t trbyte;
char check_url;
#ifdef JP_CHARSET
@@ -521,7 +522,8 @@ typedef struct _DownloadList {
#define FONTSTAT_SIZE 4
#define INIT_BUFFER_WIDTH (COLS - 1)
#define INIT_BUFFER_WIDTH (COLS - (showLineNum ? 6 : 1))
#define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
typedef struct {
int pos;
@@ -955,6 +957,7 @@ global char *DictCommand init("file:///$LIB/w3mdict" CGI_EXTENSION);
global int ignore_null_img_alt init(TRUE);
global int displayInsDel init(TRUE);
global int FoldTextarea init(FALSE);
global int FoldLine init(FALSE);
#define DEFAULT_URL_EMPTY 0
#define DEFAULT_URL_CURRENT 1
#define DEFAULT_URL_LINK 2