Commit Graph

31 Commits

Author SHA1 Message Date
Fumitoshi UKAI
f8ca559c64 fix search problem on different charset page than display charset
* proto.h (conv_search_string): added
* search.c (migemostr): use conv_search_string
	(conv_search_string): added
* main.c (srchcore): use conv_search_string
	(reMark): ditto
* menu.c (menu_search_forward): ditto
	(menu_search_backward): ditto
	(menu_search_next_previous): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2004-03-23 16:44:02 +00:00
Fumitoshi UKAI
604c11affe merge m17n patch
add libwc
2003-09-22 21:02:15 +00:00
Fumitoshi UKAI
5ef48c8f2e [w3m-dev 03793] incremental search fix
main.c (dispincsrch): revert sbuf.pos fix
		start from next position in next forward search
	(srch): start from next position in forward saerch
		if not found, restore original position
	(srch_nxtprv): start from next position in next forward search
* search.c (forwardSearch): search from current position
	(dispincsrch): start from current position in case of
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2003-03-05 18:56:28 +00:00
Fumitoshi UKAI
4299bb58de [w3m-dev 03792] URL match string
incremental search fix
* main.c (chkURLBuffer): allow - at end of URL string
	(dispincsrch): start from current position in case of
			incremental search
* search.c (forwardSearch): found if same position
	(backwardSearch): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2003-03-05 18:19:12 +00:00
Fumitoshi UKAI
992994203c [w3m-dev 03713] search with "$"
* search.c (forwardSearch): check l->next && l->next->bpos
	(backwardSearch): check l->size, l->next && l->next->bpos
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
2003-01-30 16:26:15 +00:00
Fumitoshi UKAI
61c2c2de18 [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>
2003-01-23 18:37:18 +00:00
Fumitoshi UKAI
b8b4edb15b [w3m-dev 03676] cleanup for pipe
* etc.c (open_pipe_rw): added
* file.c (uncompress_stream): rewrite using open_pipe_rw
* image.c (openImgdisplay): rewrite using open_pipe_rw
* local.c (localcgi_popen_rw): deleted
	(localcgi_post): rewrite using open_pipe_rw
* proto.h (open_pipe_rw): added
* search.c (migemor): initialized to NULL
	(migemow): initialized to NULL
	(migemo_pid): initialized to 0
	(open_migemo): rewrite using open_pipe_rw
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
2003-01-22 16:10:27 +00:00
Fumitoshi UKAI
439d2745a5 [w3m-dev 03646] setup child process, local CGI
* etc.c (reset_signals): static
			don't ignore SIGUSR1
	(close_all_fds_except): static
			DEV_NULL_PATH
	(setup_child): added
	(myExec): rewrite
	(mySystem): rewrite
* file.c (readHeader): check image_source
	(loadGeneralFile): check image_source
	(doExternal): use setup_child
	(_doFileCopy): use setup_child
	(doFileSave): use setup_child
	(uncompress_stream): check image_source
			use setup_child
* image.c (getCharSize): no need stderr redirect
	(openImgdisplay): use setup_child
	(loadImage): use setup_child
	(getImageSize): no need stderr redirect
* local.c (writeLocalCookie): check Local_cookie_file
	(localcgi_popen_rw): added
	(localcgi_popen_r): deleted
	(localcgi_post): rewrite
	(localcgi_get): deleted
* proto.h (localcgi_get): defined by localcgi_post
	(reset_signals): deleted
	(close_all_fds_except): deleted
	(close_all_fds): deleted
	(setup_child): added
* search.c (open_migemo): use setup_child, myExec
* w3mimgdisplay.c (main): use DEV_NULL_PATH
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
2003-01-17 16:57:17 +00:00
Fumitoshi UKAI
22fc4c640a [w3m-dev 03579] Re: clean up displayBuffer()
* display.c (displayBuffer): re calcTabPos() when force or image redraw
* main.c (_mark): force redraw
	(reinit): redraw image
* search.c (backwardSearch): found_last
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
2002-12-18 16:33:19 +00:00
Fumitoshi UKAI
5a539bf5e7 [w3m-dev 03471] Re: SETPGRP()
* configure: SETPGRP() always defined
* proto.h (close_all_fds): added
	(myExec): #ifdef HAVE_SETPGRP
* etc.c (close_all_fds): added
	(myExec): #ifdef HAVE_SETPGRP
	(mySystem): #ifndef -> #ifdef
* file.c (_doFileCopy): delete #ifdef HAVE_SETPGRP
	(doFileSave): ditto
* image.c (openImgdisplay): delete #ifdef HAVE_SETPGRP
			use close_all_fds()
* search.c (open_migemo): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-11-24 16:02:22 +00:00
Fumitoshi UKAI
278ef389e1 fix indent 2002-11-06 15:05:34 +00:00
Fumitoshi UKAI
eee9736e27 [w3m-dev 03379] setuid w3mimgdisplay and check console tty
* XMakefile: w3mimgdisplay install by INSTALL_W3MIMGDISPLAY
* configure: ask setuid w3mimgdisplay
	(w3mimgdisplay_setuid): added
	(INSTALL_W3MIMGDISPLAY): added
* etc.c (mySystem): close until FOPEN_MAX
* image.c (openImgdisplay): setenv W3M_TTY
		stderr to /dev/null
		close until FOPEN_MAX
* install-sh: -o, -g for owner, group
* proto.h (ttyname_tty): added
* search.c (open_migemo): stderr to /dev/null
		close until FOPEN_MAX
* terms.c (ttyname_tty): added
* w3mimgdisplay.c: include <sys/types.h>, <unistd.h>
		W3MIMGDISPLAY_SETUID
		stderr to /dev/null
* w3mimg/w3mimg.c: include <sys/types.h>, <unistd.h>
		W3MIMGDISPLAY_SETUID
* w3mimg/fb/fb_w3mimg.c (check_tty_console): added
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-11-06 03:50:48 +00:00
Fumitoshi UKAI
ae731e7079 * version.c.in: 0.3+cvs
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-03-06 03:32:10 +00:00
Fumitoshi UKAI
225487bf41 [w3m-dev 02946] toggle migemo
* fm.h (migemo_active): added
* proto.h (inputLineHistSearch): add arg `prop' to incrfunc()
* linein.c (inputLineHistSearch): ditto
* main.c (isrch): ditto
* main.c (dispincsrch): ditto
			C-\ toggle migemo
			underline when migemo is active
* search.c (migemo_active): deleted
* search.c (migemo_running): added
* search.c (init_migemo): migemo_running
* search.c (migemostr): ditto
* search.c (forwardSearch): migemo_active > 0
* search.c (backwardSearch): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-01-31 03:55:35 +00:00
Fumitoshi UKAI
aae61245cf [w3m-dev 02879] reset signals
* etc.c (reset_signals): added
* etc.c (mySystem): use reset_signals()
* file.c (uncompress_stream): use reset_signals()
* proto.h (reset_signals): added
* search.c (init_migemo): kill by SIGKILL
* search.c (open_migemo): use reset_signals()
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
2002-01-21 17:57:27 +00:00
Fumitoshi UKAI
7bfdf1553b [w3m-dev 02871] ignore SIGCHLD (for at least EWS4800)
* search.c (open_migemo): signal(SIGCHLD, SIG_IGN);
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
2002-01-17 15:49:04 +00:00
Fumitoshi UKAI
7fe83699ea [w3m-dev 02870] don't kill migemo by SIGINT
* main.c (w3m_exit): init_migemo() to kill migemo
* search.c: #include <unistd.h>
* search.c (migemo_active): added
* search.c (migemo_pid): added
* search.c (init_migemo): migemo_active = use_migemo
* search.c (init_migemo): kill migemo_pid
* search.c (open_migemo): s/pid/migemo_pid/
* search.c (open_migemo): setpgrp()
* search.c (open_migemo): s/use_migemo/migemo_active/
* search.c (migemostr): ditto
* search.c (forwardSearch): ditto
* search.c (backwardSearch): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-01-17 15:05:43 +00:00
Fumitoshi UKAI
0a3fcb8b74 [w3m-dev 02866]
* search.c: #include <signal.h>
* search.c (open_migemo): ignore SIG_INT for migemo process
* search.c (open_migemo): close_tty()
* search.c (open_migemo): use execl() instead of system()
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
2002-01-17 10:29:14 +00:00
Fumitoshi UKAI
918fd1a702 [w3m-dev 02865]
* search.c (open_migemo): add flush_tty()
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
2002-01-17 09:26:33 +00:00
Fumitoshi UKAI
85d6c7a426 [w3m-dev 02863] discard migemo error message
* search.c (open_migemo): close stderr
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-01-16 19:18:21 +00:00
Fumitoshi UKAI
9d65c0da9f run make indent 2002-01-16 19:05:36 +00:00
Fumitoshi UKAI
970d17ca4c [w3m-dev 02862] SIGPIPE for migemo support
* main.c (SigPipe): added
* main.c (MAIN): signal(SIGPIPE, )
* search.c: #include <errno.h>
* search.c (migemostr): check fflush() error
* search.c (migemostr): check result string (empty is err)
* search.c (migemostr): if error occured, disable use_migemo
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-01-16 19:02:12 +00:00
Fumitoshi UKAI
9d4b26e1e4 [w3m-dev 02859]
* config.h.dist (DEF_MIGEMO_COMMAND): added
* configure (DEF_MIGEMO_COMMAND): added
* fm.h (migemo_command): initial value is DEF_MIGEMO_COMMAND
* main.c (migemostr): remove here, move search.c
* main.c (srchcore): dont migemostr() here
* proto.h (init_migemo): added
* rc.c (sync_with_option): init_migemo()
* search.c (init_migemo): added
* search.c (open_migemo): added
* search.c (migemostr): communicate background migemo
* search.c (forwardSearch): if regexCompile for migemostr failed,
		try original str
* search.c (backwardSearch): ditto
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2002-01-16 16:49:53 +00:00
Fumitoshi UKAI
6877847e22 [w3m-dev 02854] highlight for incremental search
* display.c (EFFECT_MARK_START): added
* display.c (EFFECT_MARK_END): added
* display.c (EFFECT_MARK_START_C): added
* display.c (EFFECT_MARK_END_C): added
* display.c (EFFECT_MARK_START_M): added
* display.c (EFFECT_MARK_END_M): added
* display.c: define_effect for MARK_{START,END}
* display.c (mark_mode): added
* display.c (redrawLine): if mark_mode
* display.c (do_effects): do_effect2(PE_MARK, ...)
* display.c (do_effects): do_effect1(PE_MARK, ...)
* fm.h (P_EFFECT): changed to 0x01ff
* fm.h (PE_MARK): moved
* fm.h (mark_color): added
* linein.c (inputLineHistSearch): incrfunc(int ch, Str str)
* main.c (clear_mark): added
* main.c (dispincsrch): remove arg `x', `y'
* main.c (dispincsrch): move SAVE_BUFPOSITION()
* main.c (srch): if (result & SR_FOUND) clear_mark()
* main.c (cmd_mark): PE_MARK
* main.c (nextMk): s/PM_MARK/PE_MARK/
* main.c (prevMk): s/PM_MARK/PE_MARK/
* proto.h (inputLineHistSearch): change prototype incfunc()
* rc.c (CMT_MARK_COLOR): added
* rc.c (params2): add "mark_color"
* search.c (set_mark): added
* search.c (forwardSearch): use set_mark()
* search.c (backwardSearch): use set_mark()
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
2002-01-16 15:37:06 +00:00
Fumitoshi UKAI
c193e47cda run make indent 2002-01-11 03:00:16 +00:00
Akinori Ito
687e4c8a22 2002-01-11 Akinori Ito <aito@fw.ipsj.or.jp>
* [w3m-dev 02819]
	* regex.c (RegexMatch): loop condition changed (from < to <= )
	* regex.c (regmatch_iter): end condition changed (from >= to >)
	* search.c (forwardSearch): next search fix
2002-01-11 02:24:13 +00:00
Fumitoshi UKAI
ad72e6e164 [w3m-dev 02700] search refactoring
From: Fumitoshi UKAI  <ukai@debian.or.jp>
2001-12-23 14:44:00 +00:00
Fumitoshi UKAI
975c8f9d43 run make indent 2001-11-24 02:01:26 +00:00
Fumitoshi UKAI
8ca5c59be7 add rcsids 2001-11-20 17:49:23 +00:00
Fumitoshi UKAI
40d405e05b [w3m-dev 02418]
main.c: mailto: like pattern to mark as anchor
search.c: check NULL
          add disp_message() by ukai
2001-11-16 17:25:52 +00:00
Akinori Ito
68a07bf03b Initial revision 2001-11-08 05:14:08 +00:00