Adding upstream version 0.5.2

This commit is contained in:
Tatsuya Kinoshita
2011-05-04 16:23:02 +09:00
parent 72f72d64a4
commit 6db339b3d7
72 changed files with 7191 additions and 4808 deletions
+435 -1
View File
@@ -1,3 +1,437 @@
2007-05-31 Dai Sato <satodai@w3m.jp>
* w3m 0.5.2
* version.c.in: update
* doc/README: version 0.5.2, release date, maintainer
* doc-jp/README: ditto
* po/w3m.pot, ja.po: ditto
* NEWS: update
* configure.ac: version 0.5.2
* configure: regenerated
2007-05-31 Tsutomu OKADA
* [20070530101431@w3mbbs] Re: road to 0.5.2
* ftp.c: fix typo.
* main.c, mktable.c, w3mbookmark.c, w3mhelperpanel.c: add GC_INIT().
2007-05-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04266] Bug fix when tab browsing
* fm.h, main.c: fix for tab browsing.
2007-05-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04265] compile error when #undef USE_BG_COLOR
* terms.c: add #ifdef __CYGWIN__.
2007-05-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04264] Re: road to 0.5.2
* po/makefile.in.in, scripts/*/Makefile.in: add datarootdir.
2007-05-29 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04262] FreeBSD sysmouse (Re: road to 0.5.2)
* configure.ac: unbreak sysmouse support, pointed out by
Travis Poppe <tlp@lickwid.net>.
* configure: regenerated.
2007-05-29 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04260] Warning (Re: road to 0.5.2)
* main.c, display.c: delete unused macros, change void to static void.
2007-05-29 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04259] long long (Re: road to 0.5.2)
* Makefile.in, aclocal.m4: move 'gc' from $LIBS to $LIBGC.
* configure: regenerated.
2007-05-29 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04256] Re: road to 0.5.2
* scripts/Makefile.in, scripts/w3mhelp.cgi.in: add datarootdir.
2007-05-28 Hideyuki SHIRAI <shirai@meadowy.org>
* [w3m-dev 04251] Re: road to 0.5.2
* po/w3m.pot: pot-update.
2007-05-27 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04252] Re: road to 0.5.2
* Makefile.in: add datarootdir for Autoconf 2.60 and later.
2007-05-23 NOKUBI Takatsugu <knok@daionet.gr.jp>
* [w3m-dev 04155] w3m mingw patch
* config.h, configure.ac, etc.c, file.c, ftp.c, indep.c, istream.c,
local.c, main.c, rc.c, terms.c, url.c: fix for minpw, except for
deleting nsl and dl from configure.ac.
* configure: regenerated.
2007-05-23 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04233], [w3m-dev 04236] Re: <del>, <s>, <ins>, and so on
* file.c, fm.h, po/ja.po, po/w3m.pot, rc.c, table.c:
expand display_ins_del to select a type of fontify.
2007-05-23 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04242] Re: Compile error when --without-ssl
* aclocal.m4, configure.ac: add checking ssl before digest_auth.
* configure: regenerated.
2007-05-23 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04240] nl_langinfo() requires setlocale()
* fm.h, main.c, menu.c, rc.c: add "#ifdef"s.
* libwc/charset.c: add setlocale() for nl_langinfo().
2007-05-23 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03923] <pre> in <table>
* file.c, table.c: avoid extra blanks in pre in table.
2007-05-23 tamo
* [20070121110209@w3mbbs] unnecessary decoding in linein.c
* linein.c: decoding URLs in correct condition.
2007-05-23 Tsutomu OKADA
* [20061228000713@w3mbbs] avoid warning for file.c
* html.h: change char to unsigned char for HTML_DL_COMPACT(133).
2007-05-23 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04213] update Unicode characters' width
* libwc/ucs.c, libwc/ucs.h, libwc/map/ucs_wide.map:
catch-up to EastAsianWidth-5.0.0.txt.
2007-04-19 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04212] quote URL of local dir
* local.c: quote URLs with non-ASCII local directory names.
2007-04-19 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 04211] input type=image
* file.c, html.[ch]: avoid conflicts between input_alt and img_alt.
fix calculation of labeled line numbers when fold_line=1.
2007-04-19 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04197] Re: italic text
* fm.h: display <em> and <i> elements with underline.
2006-12-27 Fumitoshi UKAI <ukai@debian.or.jp>
* [SECURITY] fix format string vulnerability
* file.c (inputAnswer) fix format string bug
2006-12-07 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04185] Re: italic text
* file.c, fm.h, html.c, html.h, tagtable.tab:
display <em> and <i> elements with bold letters.
2006-12-07 Hideyuki SHIRAI <shirai@meadowy.org>
* [w3m-dev 04184] automatic uncompression in downloading
* rc.c: Add `AutoUncompress'.
(params3): Ditto.
* fm.h: Add `AutoUncompress'.
* file.c (loadGeneralFile): Check `AutoUncompress' when uncompress
data.
(HTMLlineproc2body): Ditto.
* po/w3m.pot: Add new message for `AutoUncompress'.
* po/ja.po: ditto.
2006-12-10 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04159] Re: Is this mailing list still alive?
* cookie.c: accept invalid "set-cookies" headers
when "domainName == .hostName".
2006-12-10 noz
* [20051124052846@w3mbbs] LiveHTTPHeaders
* file.c, fm.h, main.c, url.c: add -reqlog option which makes
~/.w3m/request.log like LiveHTTPHeaders of FireFox.
2006-08-07 Fumitoshi UKAI <ukai@debian.or.jp>
* mailcap.c (acceptableMimeTypes): change default accept: line
w3m should prefer text/html to other text/*.
reported as Debian Bug#374296
2006-06-12 Dai Sato <satodai@w3m.jp>
* another fix for [w3m-dev-en 01067] Some more patches
* file.c (loadBuffer): avoid decoding when dump_extra option is specified.
2006-06-10 Dai Sato <satodai@w3m.jp>
* fix for [w3m-dev-en 01067] Some more patches
* file.c (loadGeneralFile): avoid decoding when dump_extra option is specified.
2006-06-10 Dai Sato <satodai@w3m.jp>
* [w3m-dev 03992] Change to display progress status when dump_extra option is specified
* file.c (loadHTMLstream): Show progress status when dump_extra option is specified.
2006-06-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04129] handling newlines in form values
* parsetagx.c: don't delete newlines in hidden values.
2006-05-29 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01067] Some more patches
* file.c, html.h, url.c: decode content-encoding in all situations.
2006-05-29 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01067] Some more patches
* main.c: delete calls to GC from wrap_GC_warn_proc to avoid deadlocks.
2006-05-29 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01067] Some more patches
* main.c: fix unsafe usages of SIGWINCH handler.
2006-05-29 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01067] Some more patches
* keybind(_lynx).c, doc(-jp)/keymap.default: add SHIFT-TAB as a default binding for PREV_LINK.
2006-04-08 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04154] Unclosed textarea in table
* table.c: close textarea when table related tags found.
2006-04-08 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04153] NEXT_LINK error
* anchor.c, filc.c, fm.h: check A tag in HTMLlineproc2body().
2006-04-08 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04152] [PATCH] Add more explanation for the usage of the option setting panel.
* doc(-jp)/FAQ.html, doc-jp/MANUAL.html: add explanations for .w3m/config and -o option.
2006-04-08 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04150] vi-prec_num
* main.c: fix vi_prec_num switching.
2006-04-08 Dai Sato <satodai@w3m.jp>
* [w3m-dev 04146] disable HAVE_LANGINFO_CODESET on cygwin
* configure.ac: avoid AM_LANGINFO_CODESET check for Cygwin.
2006-04-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01060] Some patches
* file.c, fm.h, rc.c: Introduce option show_cookie and set it TRUE by default. If set to FALSE received cookies will not be shown.
* This fixes Debian bug #253547: w3m: Too slow receiving cookies.
2006-04-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01060] Some patches
* parsetagx.c: Replace '\n' (newline) with ' ' (space) in attributes of html tags instead of ignoring them.
* Fixes Debian bug #326167: w3m: new lines in hidden form fields are stripped
2006-04-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01060] Some patches
* scripts/w3mman/w3mman*.in: Add w3mman -l <file> command line argument for viewing of local man files.
* Fixes Debian bug #138805: w3mman -l doesn't work.
2006-04-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01060] Some patches
* libwc/detect.c: Use the hint instead of US_ASCII in wc_auto_detect.
* Fixes Debian bug #291735: w3m shouldn't "simplify" page's charset
2006-04-07 Dai Sato <satodai@w3m.jp>
* [w3m-dev-en 01060] Some patches
* Str.h, table.c: Use Strnew_charp() instead of the wrong Strnew().
* Fixes SF bug #895351 Strnew called with argument in table.c.
2006-02-10 Dai Sato <satodai@w3m.jp>
* http://dog.w3m.jp/bbs/spool/until200602.html#20060210153135@keijiwan
* url.c: replace pclose passed to localcgi_post/get() with fclose in openURL()
2006-02-09 Dai Sato <satodai@w3m.jp>
* http://vimrc.hp.infoseek.co.jp/w3m-pclose.html
* file.c: replace pclose with fclose in the end of uncompress_stream()
2005-02-27 Fumitoshi UKAI <ukai@debian.or.jp>
* configure.ac: rename from configure.in. this is for autoconf2.50
2005-02-27 NOMIYA Masaru <nomiya@ttmy.ne.jp>
* [w3m-dev 04143] Patch for OS/2
* config.h.in: ifdef HAVE_SETPGRP
* configure.in: define USE_BINMODE_STREAM for *os2-emx*
* islang.c: ULONG -> unsigned long
* main.c: ULONG -> unsigned long
2005-02-15 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev-en 01045] From newbie: problem with w3m-0.5.1 installation
* acinclude.m4 (AC_W3M_SSL): define USE_SSL after ssl library found
2005-01-19 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
* [w3m-dev 04133] mouse_end() should preced reset_tty()?
* terms.c (reset_exit): mouse_end() should precede reset_tty()
2005-01-05 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
* [w3m-dev 04130] [w3m-dev 04131] [w3m-dev 04132] Multiple challeges in *-Authenticate header
* file.c (skip_auth_token): added
(extract_auth_val): ',' is end of token
(extract_auth_param): use skip_auth_token
(AuthDigestCred): parse qop and calc cnonce correctly
(findAuthentication): use skip_auth_token
2004-11-09 Fumitoshi UKAI <ukai@debian.or.jp>
* w3mimg/fb/fb_gdkpixbuf.c (fb_image_load):
fix unused variable `i'
* w3mimg/x11/x11_w3mimg.c (x11_load_image):
ditto
2004-11-09 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04128] Re: w3mimgdisplay
* acinclude.m4 (AC_W3M_IMAGE): check not yes
* aclocal.m4, configure: regen
* w3mimg/fb/fb_gdkpixbuf.c (fb_image_load):
fb_image_fill in case GDK_PIXBUF_FRAME_DISPOSE
* w3mimg/x11/x11_w3mimg.c (get_animation_size):
return n
(x11_load_image):
fill in case GDK_PIXBUF_FRAME_DISPOSE
2004-11-05 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04117] Re: start attribute and value attribute on ordered lists
* file.c (HTMLtagproc1): allow negative value for start attr
2004-10-14 Fumitoshi UKAI <ukai@debian.or.jp>
* Bug#276246: w3m's locale parsing should at least see '@euro' modifier
* config.h (HAVE_LANGINFO_CODESET): added
* configure.in (AM_LANGINFO_CODESET): added
* libwc/charset.c: #include <langinfo.h>
(wc_charset_to_ces): use nl_langinfo(CODESET)
2004-09-30 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04108] PIPE_BUF
* main.c (pipeBuf): set buf->currentURL.file to prevent
segfault by "PIPE_BUF cat;VIEW SOURCE;"
2004-08-31 SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
* [w3m-dev 04104] w3mmail.cgi
* scripts/w3mmail.cgi.in: strip ^M
2004-08-17 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04099] Re: w3m-img gtk2
* w3mimg/fb/fb_gdkpixbuf.c (fb_image_load): fix resize bug
2004-08-06 Hiroyuki Ito <ZXB01226@nifty.com>
* [w3m-dev 04097] Re: w3m-img gtk2
* w3mimg/fb/fb_gdkpixbuf.c (draw): no need bg
(get_animation_size): use GTimeVal
(fb_image_load): use GTimeVal
fix for animation
* w3mimg/x11/x11_w3mimg.c (get_animation_size): use GTimeVal
(x11_load_image): use GTimeVal
fix for animation
2004-08-05 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 04096] w3m-img gtk2
* acinclude.m4 (AC_W3M_IMAGE): add USE_GTK2
add --with-imagelib=gtk2
* aclocal.m4 config.guess config.sub configure: regen
* config.h.in: add USE_GTK2
* w3mimg/fb/fb_gdkpixbuf.c: support USE_GTK2
* w3mimg/fb/fb_img.h: add fb_image_init()
* w3mimg/fb/fb_imlib2.h: fb_image_init() stub
* w3mimg/fb/fb_w3mimg.c: call fb_image_init()
* w3mimg/x11/x11_w3mimg.c: support USE_GTK2
2004-08-03 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 04095] build fix when configure with --enable-messagel10n
* main.c (main): locale and textdomain initialization if ENABLE_NLS
* menu.c (initMenu): use _() instead of gettext()
* rc.c (show_params): use _() instead of gettext()
2004-07-18 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 04094] Re: option panel: gettextize select list
* rc.c (load_option_panel): don't gettext&wc_conv colorstr
several times
2004-07-16 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 04093] bookmark charset
* add global variable: BookmarkCharset.
* main.c:adBmark(): remove condition LANG = JA.
* main.c: buffername encode by BookmarkCharset when add bookmark.
* main.c: BookmarkCharset pass to w3mbookmark.
* w3mbookmark.c: ditto.
2004-07-16 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 04092] remove __CYGWIN__ && LANG == JA
* remove condition LANG == JA && __CYGWIN__
* cygwin_mouse_btn_swapped enabled when before 1.5.x
2004-07-16 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 04091] option panel: gettextize select list
* rc.c: gettextize option select list.
* rc.c: add gettextize message.
* po/w3m.pot: ditto.
* po/ja.po: ditto.
2004-07-14 Fumitoshi UKAI <ukai@debian.or.jp>
* Debian Bug#259053
* doc/FAQ.html, doc-jp/FAQ.html: ~/.mailcap -> ~/.w3m/mailcap
2004-05-11 Fumitoshi UKAI <ukai@debian.or.jp>
* based on [w3m-dev 04079]
SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
* Makefile.in: (libwc/libwc.a): always make in libwc subdir
(w3mimg/w3mimg.a): always make in w3mimg subdir
2004-05-03 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev-en 01007]
* libwc/Makefile.in (CFLAGS): need @CPPFLAGS@
2004-05-03 Fumitoshi UKAI <ukai@debian.or.jp>
* version.c.in: cvs version
2004-04-29 Fumitoshi UKAI <ukai@debian.or.jp>
* w3m 0.5.1
@@ -8483,4 +8917,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
$Id: ChangeLog,v 1.924 2004/04/28 18:19:22 ukai Exp $
$Id: ChangeLog,v 1.998 2007/05/31 12:17:05 inu Exp $
+12 -7
View File
@@ -9,6 +9,7 @@ VERSION = @VERSION@
DOMAIN = $(PACKAGE)
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
datadir = @datadir@
localedir = $(datadir)/locale
@@ -44,7 +45,8 @@ DEFS = @DEFS@ -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \
-DRC_DIR=\"$(RC_DIR)\" \
-DLOCALEDIR=\"$(localedir)\"
LDFLAGS = @LDFLAGS@
LIBS = -L. -lindep @LIBINTL@ @LIBS@
LIBS = @LIBS@
EXT_LIBS = -L. -lindep @LIBINTL@ @LIBGC@
W3M_LIBS = @W3M_LIBS@
WCTARGET = @WCTARGET@
NLSTARGET = @NLSTARGET@
@@ -123,7 +125,7 @@ SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc po
all: $(TARGETS) all-scripts $(NLSTARGET)
$(TARGET): $(ALLOBJS) $(ALIB) $(WCTARGET)
$(CC) $(CFLAGS) -o $(TARGET) $(ALLOBJS) $(LDFLAGS) $(LIBS) $(W3M_LIBS)
$(CC) $(CFLAGS) -o $(TARGET) $(ALLOBJS) $(LDFLAGS) $(LIBS) $(EXT_LIBS) $(W3M_LIBS)
$(ALIB): $(ALIBOBJS)
$(AR) rv $(ALIB) $(ALIBOBJS)
@@ -169,20 +171,22 @@ functable.c: funcname.tab mktable$(EXT)
-rm -f functable.tab
mktable$(EXT): mktable.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o mktable mktable.o dummy.o $(LDFLAGS) $(LIBS)
$(CC) $(CFLAGS) -o mktable mktable.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS)
$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(HELPER): w3mhelperpanel.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o $(HELPER) w3mhelperpanel.o dummy.o $(LDFLAGS) $(LIBS)
$(CC) $(CFLAGS) -o $(HELPER) w3mhelperpanel.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(INFLATE): inflate.o $(ALIB)
$(CC) $(CFLAGS) -o $(INFLATE) inflate.o $(LDFLAGS) $(LIBS) -lz
inflate.o: inflate.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/inflate.c
libwc/libwc.a:
libwc/libwc.a: libwc
libwc:
(cd libwc && $(MAKE) CC='$(CC0)' OPTS='$(OPTS)')
dummy.o: entity.c
@@ -194,7 +198,8 @@ $(IMGDISPLAY): w3mimgdisplay.o $(ALIB) w3mimg/w3mimg.a
w3mimgdisplay.o: w3mimgdisplay.c w3mimg/w3mimg.h
$(CC) $(CFLAGS) $(IMGCFLAGS) -o $@ -c $(srcdir)/w3mimgdisplay.c
w3mimg/w3mimg.a:
w3mimg/w3mimg.a: w3mimg
w3mimg:
(cd w3mimg && $(MAKE) CC="$(CC0)" OPTS="$(OPTS)")
po:
+12
View File
@@ -1,3 +1,15 @@
w3m 0.5.2 - 2007-05-31
* security fix
- fix format string vulnerability.
* new features
- support gtk2 with w3m-img.
- new option for LiveHTTPHeaders-like logs.
- new option to fontify <del>, <s>, <ins>, and so on.
* other bug fixes
- avoid errors in "configure" and "make".
- '\n' handling in attributes' values of HTML tags.
w3m 0.5.1 - 2004-04-29
* fix minor bugs
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: Str.h,v 1.5 2003/01/20 15:30:19 ukai Exp $ */
/* $Id: Str.h,v 1.6 2006/04/07 13:35:35 inu Exp $ */
/*
* String manipulation library for Boehm GC
*
@@ -28,7 +28,7 @@ typedef struct _Str {
int area_size;
} *Str;
Str Strnew();
Str Strnew(void);
Str Strnew_size(int);
Str Strnew_charp(char *);
Str Strnew_charp_n(char *, int);
+50 -14
View File
@@ -486,7 +486,6 @@ AC_ARG_WITH(ssl,
[with_ssl="yes"])
AC_MSG_RESULT($with_ssl)
if test x"$with_ssl" != xno; then
AC_DEFINE(USE_SSL)
PKG_CHECK_MODULES(SSL, openssl,,[
AC_MSG_CHECKING(for SSL library/header)
test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
@@ -512,6 +511,7 @@ if test x"$with_ssl" != xno; then
[$SSL_LIBS -lcrypto])
if test x"$w3m_ssl" = xfound; then
AC_DEFINE(USE_SSL)
AC_MSG_CHECKING(if SSL certificate verify is enabled)
AC_ARG_ENABLE(sslverify,
[ --disable-sslverify verify SSL certificate],,
@@ -573,6 +573,7 @@ AC_DEFUN([AC_W3M_IMAGE],
INSTALL_W3MIMGDISPLAY='${INSTALL_PROGRAM}'
AC_DEFINE(INSTALL_W3MIMGDISPLAY, $INSTALL_W3MIMGDISPLAY)
AC_SUBST(USE_GDKPIXBUF)
AC_SUBST(USE_GTK2)
AC_SUBST(USE_IMLIB)
AC_SUBST(USE_IMLIB2)
AC_SUBST(IMGTARGETS)
@@ -618,16 +619,17 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_ARG_WITH(imagelib,
[ --with-imagelib=IMAGELIBS image library
IMAGELIBS may be space separeted list of:
gdk-pixbuf imlib imlib2],,
gtk2 gdk-pixbuf imlib imlib2],,
[with_imagelib="yes"])
if test x"$with_imagelib" = xyes; then
with_imagelib="gdk-pixbuf imlib imlib2"
with_imagelib="gtk2 gdk-pixbuf imlib imlib2"
fi
AC_MSG_RESULT($with_imagelib)
with_imlib=no
with_imlib2=no
with_gdkpixbuf=no
with_gtk2=no
for imagelib in $with_imagelib
do
case "$imagelib" in
@@ -646,15 +648,31 @@ AC_DEFUN([AC_W3M_IMAGE],
if test x"$GDKPIXBUF_CONFIG" = x; then
GDKPIXBUF_CONFIG=gdk-pixbuf-config
fi;;
gtk2)
with_gtk2="yes"
if test x"$PKG_CONFIG" = x; then
PKG_CONFIG=pkg-config
else
PKG_CONFIG=:
fi;;
esac
done
IMGTARGETS=""
if test x"$with_gdkpixbuf" = xyes; then
if test x"$with_gtk2" = xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
[`$PKG_CONFIG --modversion gdk-pixbuf-2.0 2>/dev/null`],
2, 0, 0,
[have_gdkpixbuf="yes"; have_gtk2="yes"],
[have_gdkpixbuf="no"; have_gtk2="no"])
fi
if test x"$with_gdkpixbuf" = xyes; then
if test x"$have_gdkpixbuf" != xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
[`$GDKPIXBUF_CONFIG --version 2>/dev/null`],
0, 16, 0,
[have_gdkpixbuf="yes"],
[have_gdkpixbuf="no"])
fi
fi
if test x"$with_imlib" = xyes; then
AC_W3M_CHECK_VER([Imlib],
@@ -671,46 +689,64 @@ AC_DEFUN([AC_W3M_IMAGE],
[have_imlib2="no"])
fi
if test x"$x11" = xyes; then
if test x"$have_gdkpixbuf" = xyes; then
if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_GDKPIXBUF)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_GDKPIXBUF)
IMGX11CFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGX11LDFLAGS="`${GDKPIXBUF_CONFIG} --libs` -lgdk_pixbuf_xlib"
IMGTARGETS="x11"
elif test x"$have_imlib" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_IMLIB)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_IMLIB)
IMGX11CFLAGS="`${IMLIB_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB_CONFIG} --libs`"
IMGTARGETS="x11"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_IMLIB2)
IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
IMGTARGETS="x11"
else
AC_MSG_WARN([unable to build w3mimgdisplay with X11 support])
fi
fi
if test x"$fb" = xyes; then
if test x"$have_gdkpixbuf" = xyes; then
if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
AC_DEFINE(USE_GDKPIXBUF)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
IMGFBCFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGFBLDFLAGS="`${GDKPIXBUF_CONFIG} --libs`"
IMGTARGETS="${IMGTARGETS} fb"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
IMGTARGETS="${IMGTARGETS} fb"
else
AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
fi
Vendored
+68 -31
View File
@@ -295,18 +295,6 @@ AC_DEFUN([AC_W3M_KEYMAP],
AC_DEFINE_UNQUOTED(KEYBIND, $enable_keymap)])
#
# ----------------------------------------------------------------
# AC_W3M_DIGEST_AUTH
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_DIGEST_AUTH],
[AC_SUBST(USE_DIGEST_AUTH)
AC_MSG_CHECKING(if digest auth is enabled)
AC_ARG_ENABLE(digest_auth,
[ --disable-digest-auth disable digest auth],,
[enable_digest_auth="yes"])
test x"$enable_digest_auth" = xyes && AC_DEFINE(USE_DIGEST_AUTH)
AC_MSG_RESULT($enable_digest_auth)])
#
# ----------------------------------------------------------------
# AC_W3M_MIGEMO
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_MIGEMO],
@@ -438,6 +426,7 @@ AC_ARG_WITH(termlib,
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_GC],
[AC_MSG_CHECKING(GC library exists)
AC_SUBST(LIBGC)
AC_ARG_WITH(gc,
[ --with-gc[=PREFIX] libgc PREFIX],
[test x"$with_gc" = xno && AC_MSG_ERROR([You can not build w3m without gc])],
@@ -468,7 +457,7 @@ AC_ARG_WITH(gc,
fi
fi
unset ac_cv_lib_gc_GC_init
AC_CHECK_LIB(gc, GC_init, [LIBS="$LIBS -lgc"])
AC_CHECK_LIB(gc, GC_init, [LIBGC="-lgc"])
if test x"$ac_cv_lib_gc_GC_init" = xno; then
AC_MSG_CHECKING(GC library location)
AC_MSG_RESULT($with_gc)
@@ -478,7 +467,7 @@ AC_ARG_WITH(gc,
LDFLAGS="$LDFLAGS -L$dir/lib"
AC_MSG_CHECKING($dir)
unset ac_cv_lib_gc_GC_init
AC_CHECK_LIB(gc, GC_init, [gclibdir="$dir/lib"; LIBS="$LIBS -L$dir/lib -lgc"; break])
AC_CHECK_LIB(gc, GC_init, [gclibdir="$dir/lib"; LIBGC="-L$dir/lib -lgc"; break])
LDFLAGS="$ldflags"
done
if test x"$gclibdir" = xno; then
@@ -487,9 +476,9 @@ AC_ARG_WITH(gc,
fi])
#
# ----------------------------------------------------------------
# AC_W3M_SSL
# AC_W3M_SSL_DIGEST_AUTH
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_SSL],
AC_DEFUN([AC_W3M_SSL_DIGEST_AUTH],
[AC_SUBST(USE_SSL)
AC_SUBST(USE_SSL_VERIFY)
AC_MSG_CHECKING(if SSL is suported)
@@ -498,7 +487,6 @@ AC_ARG_WITH(ssl,
[with_ssl="yes"])
AC_MSG_RESULT($with_ssl)
if test x"$with_ssl" != xno; then
AC_DEFINE(USE_SSL)
PKG_CHECK_MODULES(SSL, openssl,,[
AC_MSG_CHECKING(for SSL library/header)
test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
@@ -524,6 +512,7 @@ if test x"$with_ssl" != xno; then
[$SSL_LIBS -lcrypto])
if test x"$w3m_ssl" = xfound; then
AC_DEFINE(USE_SSL)
AC_MSG_CHECKING(if SSL certificate verify is enabled)
AC_ARG_ENABLE(sslverify,
[ --disable-sslverify verify SSL certificate],,
@@ -531,7 +520,19 @@ if test x"$with_ssl" != xno; then
test x"$enable_sslverify" = xyes && AC_DEFINE(USE_SSL_VERIFY)
AC_MSG_RESULT($enable_sslverify)
fi
fi])
fi
AC_SUBST(USE_DIGEST_AUTH)
AC_MSG_CHECKING(if digest auth is enabled)
AC_ARG_ENABLE(digest_auth,
[ --disable-digest-auth disable digest auth],,
[enable_digest_auth="yes"])
if test x"$enable_digest_auth" = xyes -a x"$w3m_ssl" = xfound; then
AC_DEFINE(USE_DIGEST_AUTH)
else
enable_digest_auth="no"
fi
AC_MSG_RESULT($enable_digest_auth)
])
#
# ----------------------------------------------------------------
# AC_W3M_ALARM
@@ -585,6 +586,7 @@ AC_DEFUN([AC_W3M_IMAGE],
INSTALL_W3MIMGDISPLAY='${INSTALL_PROGRAM}'
AC_DEFINE(INSTALL_W3MIMGDISPLAY, $INSTALL_W3MIMGDISPLAY)
AC_SUBST(USE_GDKPIXBUF)
AC_SUBST(USE_GTK2)
AC_SUBST(USE_IMLIB)
AC_SUBST(USE_IMLIB2)
AC_SUBST(IMGTARGETS)
@@ -630,16 +632,17 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_ARG_WITH(imagelib,
[ --with-imagelib=IMAGELIBS image library
IMAGELIBS may be space separeted list of:
gdk-pixbuf imlib imlib2],,
gtk2 gdk-pixbuf imlib imlib2],,
[with_imagelib="yes"])
if test x"$with_imagelib" = xyes; then
with_imagelib="gdk-pixbuf imlib imlib2"
with_imagelib="gtk2 gdk-pixbuf imlib imlib2"
fi
AC_MSG_RESULT($with_imagelib)
with_imlib=no
with_imlib2=no
with_gdkpixbuf=no
with_gtk2=no
for imagelib in $with_imagelib
do
case "$imagelib" in
@@ -658,15 +661,31 @@ AC_DEFUN([AC_W3M_IMAGE],
if test x"$GDKPIXBUF_CONFIG" = x; then
GDKPIXBUF_CONFIG=gdk-pixbuf-config
fi;;
gtk2)
with_gtk2="yes"
if test x"$PKG_CONFIG" = x; then
PKG_CONFIG=pkg-config
else
PKG_CONFIG=:
fi;;
esac
done
IMGTARGETS=""
if test x"$with_gdkpixbuf" = xyes; then
if test x"$with_gtk2" = xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
[`$PKG_CONFIG --modversion gdk-pixbuf-2.0 2>/dev/null`],
2, 0, 0,
[have_gdkpixbuf="yes"; have_gtk2="yes"],
[have_gdkpixbuf="no"; have_gtk2="no"])
fi
if test x"$with_gdkpixbuf" = xyes; then
if test x"$have_gdkpixbuf" != xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
[`$GDKPIXBUF_CONFIG --version 2>/dev/null`],
0, 16, 0,
[have_gdkpixbuf="yes"],
[have_gdkpixbuf="no"])
fi
fi
if test x"$with_imlib" = xyes; then
AC_W3M_CHECK_VER([Imlib],
@@ -683,46 +702,64 @@ AC_DEFUN([AC_W3M_IMAGE],
[have_imlib2="no"])
fi
if test x"$x11" = xyes; then
if test x"$have_gdkpixbuf" = xyes; then
if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_GDKPIXBUF)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_GDKPIXBUF)
IMGX11CFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGX11LDFLAGS="`${GDKPIXBUF_CONFIG} --libs` -lgdk_pixbuf_xlib"
IMGTARGETS="x11"
elif test x"$have_imlib" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_IMLIB)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_IMLIB)
IMGX11CFLAGS="`${IMLIB_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB_CONFIG} --libs`"
IMGTARGETS="x11"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
IMGTARGETS="x11"
AC_DEFINE(USE_IMLIB2)
IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
IMGTARGETS="x11"
else
AC_MSG_WARN([unable to build w3mimgdisplay with X11 support])
fi
fi
if test x"$fb" = xyes; then
if test x"$have_gdkpixbuf" = xyes; then
if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
AC_DEFINE(USE_GDKPIXBUF)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
AC_DEFINE(USE_GTK2)
IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
elif test x"$have_gdkpixbuf" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
IMGFBCFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGFBLDFLAGS="`${GDKPIXBUF_CONFIG} --libs`"
IMGTARGETS="${IMGTARGETS} fb"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
IMGTARGETS="${IMGTARGETS} fb"
else
AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
fi
+5 -2
View File
@@ -1,4 +1,4 @@
/* $Id: anchor.c,v 1.30 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: anchor.c,v 1.33 2006/04/08 11:33:16 inu Exp $ */
#include "fm.h"
#include "myctype.h"
#include "regex.h"
@@ -175,6 +175,8 @@ searchAnchor(AnchorList *al, char *str)
return NULL;
for (i = 0; i < al->nanchor; i++) {
a = &al->anchors[i];
if (a->hseq < 0)
continue;
if (!strcmp(a->url, str))
return a;
}
@@ -471,6 +473,7 @@ putHmarker(HmarkerList *ml, int line, int pos, int seq)
}
ml->marks[seq].line = line;
ml->marks[seq].pos = pos;
ml->marks[seq].invalid = 0;
return ml;
}
@@ -778,7 +781,7 @@ link_list_panel(Buffer *buf)
al = buf->href;
for (i = 0; i < al->nanchor; i++) {
a = &al->anchors[i];
if (a->slave)
if (a->hseq < 0 || a->slave)
continue;
parseURL2(a->url, &pu, baseURL(buf));
p = parsedURL2Str(&pu)->ptr;
+117 -67
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-01-10'
timestamp='2004-03-12'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -196,12 +197,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -220,6 +227,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pegasos:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -235,73 +245,70 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:MicroBSD:*:*)
echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
eval $set_cc_for_build
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
case `$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
1-0)
UNAME_MACHINE="alphaev5"
;;
1-1)
UNAME_MACHINE="alphaev56"
;;
1-101)
UNAME_MACHINE="alphapca56"
;;
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
3-1307)
UNAME_MACHINE="alphaev7"
;;
esac
fi
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -324,6 +331,9 @@ EOF
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -341,6 +351,9 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -413,6 +426,9 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -748,7 +764,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -756,6 +772,11 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -777,7 +798,10 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -788,8 +812,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
echo i586-pc-interix3
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -810,17 +834,28 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -896,6 +931,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -953,6 +991,9 @@ EOF
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -983,6 +1024,9 @@ EOF
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1054,7 +1098,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1169,7 +1213,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1210,6 +1254,12 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
+20 -3
View File
@@ -72,6 +72,7 @@
#undef W3MIMGDISPLAY_SETUID
#undef USE_IMLIB
#undef USE_GDKPIXBUF
#undef USE_GTK2
#undef USE_IMLIB2
#undef USE_XFACE
#undef USE_DICT
@@ -141,14 +142,18 @@ typedef long clen_t;
#undef HAVE_CHDIR
#undef HAVE_SETPGRP
#undef HAVE_SETLOCALE
#undef HAVE_LANGINFO_CODESET
#undef SETPGRP_VOID
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
#define SETPGRP() setpgrp()
#else
#define SETPGRP() setpgrp(0,0)
#endif
#else /* no HAVE_SETPGRP; OS/2 EMX */
#define SETPGRP() setpgid(0, 0)
#endif
#undef HAVE_FLOAT_H
#undef HAVE_SYS_SELECT_H
@@ -161,9 +166,15 @@ typedef RETSIGTYPE MySignalHandler;
#define SIGNAL_RETURN @SIGNAL_RETURN@
#ifdef HAVE_SIGSETJMP
#ifdef __MINGW32_VERSION
# define SETJMP(env) setjmp(env)
# define LONGJMP(env,val) longjmp(env, val)
# define JMP_BUF jmp_buf
#else
# define SETJMP(env) sigsetjmp(env,1)
# define LONGJMP(env,val) siglongjmp(env,val)
# define JMP_BUF sigjmp_buf
#endif /* __MINGW32_VERSION */
#else
# define SETJMP(env) setjmp(env)
# define LONGJMP(env,val) longjmp(env)
@@ -193,10 +204,8 @@ typedef RETSIGTYPE MySignalHandler;
#if defined( __CYGWIN__ )
#define SUPPORT_NETBIOS_SHARE 1
#if LANG == JA
#define SUPPORT_WIN9X_CONSOLE_MBCS 1
#endif
#endif
#if defined(__DJGPP__)
#define DEFAULT_TERM "dosansi"
@@ -230,4 +239,12 @@ typedef RETSIGTYPE MySignalHandler;
#define BUNZIP2_NAME "bunzip2"
#define INFLATE_NAME "inflate"
#ifdef __MINGW32_VERSION
#define SIGKILL SIGTERM
#define S_IXGRP 0
#define S_IXOTH 0
#define S_IRWXG 0
#define S_IRWXO 0
#endif /* __MINGW32_VERSION */
#endif /* CONFIG_H_SEEN */
Vendored
+102 -26
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-01-03'
timestamp='2004-03-12'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -228,14 +229,15 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| clipper \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -247,6 +249,7 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
@@ -257,11 +260,11 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -296,7 +299,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -304,8 +307,8 @@ case $basic_machine in
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -319,6 +322,7 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
@@ -329,11 +333,13 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -357,6 +363,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -371,6 +380,12 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -430,12 +445,20 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -735,6 +758,10 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -766,18 +793,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
@@ -836,6 +869,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@@ -843,6 +880,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -917,14 +957,18 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -938,6 +982,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1027,13 +1075,13 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1106,19 +1154,20 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -microbsd*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1142,6 +1191,9 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1154,6 +1206,9 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@@ -1175,6 +1230,9 @@ case $os in
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
@@ -1197,6 +1255,9 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@@ -1227,6 +1288,12 @@ case $os in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-none)
;;
*)
@@ -1258,6 +1325,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1436,9 +1506,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
Vendored
+4584 -3997
View File
File diff suppressed because it is too large Load Diff
+15 -7
View File
@@ -1,8 +1,8 @@
dnl w3m autoconf
dnl Process this file with autoconf to produce a configure script.
AC_INIT(w3m, 0.5.1, ukai@debian.or.jp)
AC_INIT(w3m, 0.5.2, satodai@w3m.jp)
PACKAGE=w3m
VERSION=0.5.1
VERSION=0.5.2
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
@@ -69,7 +69,6 @@ AC_W3M_HISTORY
AC_W3M_ALARM
AC_W3M_COOKIE
AC_W3M_DIGEST_AUTH
AC_W3M_NNTP
AC_W3M_GOPHER
@@ -89,7 +88,7 @@ do
done
AC_W3M_IPv6
AC_W3M_SSL
AC_W3M_SSL_DIGEST_AUTH
dnl Checks for libraries.
AC_CHECK_FUNC(sqrt,,[AC_CHECK_LIB(m, sqrt)])
@@ -98,8 +97,10 @@ if test x"$enable_mouse" = xyes; then
AC_CHECK_LIB(gpm, Gpm_Open, [AC_DEFINE(USE_GPM)
W3M_LIBS="$W3M_LIBS -lgpm"])
AC_SUBST(USE_SYSMOUSE)
AC_TRY_CPP([#include <machine/console.h>
MOUSE_GETINFO], [AC_DEFINE(USE_SYSMOUSE)])
AC_TRY_CPP([#include <sys/consio.h>
MOUSE_GETINFO], [AC_DEFINE(USE_SYSMOUSE)],
[AC_TRY_CPP([#include <machine/console.h>
MOUSE_GETINFO], [AC_DEFINE(USE_SYSMOUSE)])])
fi
AC_SUBST(AUXBIN_TARGETS)
AC_W3M_TERMLIB
@@ -110,7 +111,7 @@ AC_DEFINE(AUXBIN_TARGETS, "$AUXBIN_TARGETS")
AC_SUBST(USE_BINMODE_STREAM)
case "$host_os" in
*cygwin*)
*cygwin*|*os2-emx*|*mingw*)
AC_DEFINE(USE_BINMODE_STREAM)
;;
esac
@@ -148,6 +149,13 @@ AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir
AC_FUNC_STRFTIME
AC_FUNC_WAIT3
AC_FUNC_SETPGRP
case "$host_os" in
*cygwin*)
;;
*)
AM_LANGINFO_CODESET
;;
esac
AC_W3M_SYS_ERRLIST
AC_W3M_SIGSETJMP
AC_W3M_SIGNAL
+8 -1
View File
@@ -1,4 +1,4 @@
/* $Id: cookie.c,v 1.9 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: cookie.c,v 1.10 2006/12/10 10:53:22 inu Exp $ */
/*
* References for version 0 cookie:
@@ -65,6 +65,13 @@ domain_match(char *host, char *domain)
if (domain[1] == '\0' || contain_no_dots(host, domain_p))
return domain_p;
}
/*
* special case for domainName = .hostName
* see nsCookieService.cpp in Firefox.
*/
else if (domain[0] == '.' && strcasecmp(host, &domain[1]) == 0) {
return host;
}
/* [RFC 2109] s. 2, cases 2, 3 */
else {
offset = (domain[0] != '.') ? 0 : strlen(host) - strlen(domain);
+3 -6
View File
@@ -1,10 +1,7 @@
/* $Id: display.c,v 1.68 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: display.c,v 1.70 2007/05/29 12:07:02 inu Exp $ */
#include <signal.h>
#include "fm.h"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
/* *INDENT-OFF* */
#ifdef USE_COLOR
@@ -433,11 +430,11 @@ displayBuffer(Buffer *buf, int mode)
scroll(n);
}
else if (n < 0 && n > -buf->LINES) {
#if defined(__CYGWIN__) && LANG == JA
#if 0 /* defined(__CYGWIN__) */
move(LASTLINE + n + 1, 0);
clrtoeolx();
refresh();
#endif /* defined(__CYGWIN__) && LANG == JA */
#endif /* defined(__CYGWIN__) */
rscroll(-n);
}
redrawNLine(buf, n);
+4 -1
View File
@@ -199,7 +199,7 @@ w3m
<p>
<dt>画像のビューアを変えたいんだけど,どうするの?
<dd>初期設定では画像を見るのに xv を使うようになっていますが,これを
例えば display に変える場合は,~/.mailcap または /etc/mailcap に次のよ
例えば display に変える場合は,~/.w3m/mailcap または /etc/mailcap に次のよ
うな記述を入れます.
<p>
<pre>
@@ -222,6 +222,9 @@ application/x-dvi; xdvi %s
<dl>
<dt>設定ファイルはどこにあるの?
<dd>~/.w3m ディレクトリの下の config です.
オプション設定パネルで変更できると記述されているオプションの値を
このファイルで変更すると,w3m の挙動を調整できます.
オプションの名前と値を空白で区切ったものを 1 行に 1 組ずつ書いて設定します.
<p>
<dt>~/.w3m の下に w3mXXXXXX のようなファイルがたくさんあるけど,何?
<dd>WWWサーバからファイルを読んでいるときに,それを一時的に保存する
+1
View File
@@ -97,6 +97,7 @@ HTML
<dd>折り返しサーチを使うかどうかを切りかえる.
<dt>-o option=value
<dd>オプションを指定する.
オプションの名前や値は,~/.w3m/config で指定するものと同じ.
<dt>-no-proxy
<dd>プロキシを利用しない.
<dt>-pauth user:pass
+9 -9
View File
@@ -1,4 +1,4 @@
w3m: WWW wo Miru Tool version 0.5.1 April 29, 2004
w3m: WWW wo Miru Tool version 0.5.2 May 31, 2007
(C) Copyright by Akinori ITO
Hironori SAKAMOTO
Fumitoshi UKAI
@@ -41,7 +41,7 @@
Windows 9x/NT with Cygwin b20.1, 1.1.x, 1.3.x
MS-DOS with DJGPP and WATT32 packet driver
MacOS X Server
MacOS X 10.1, 10.2
MacOS X 10.1, 10.2, 10.3, 10.4
2. インストール
@@ -102,7 +102,7 @@ Windows
w3m の著作権は,伊藤彰則に属しています.
(C) Copyright 1994-2002 by Akinori Ito
(C) Copyright 2002-2004 by Akinori Ito, Hironori Sakamoto, Fumitoshi Ukai
(C) Copyright 2002-2007 by Akinori Ito, Hironori Sakamoto, Fumitoshi Ukai
4. 配布条件
@@ -113,16 +113,16 @@ w3m
5. 作者
山形大学工学部電子情報工学科
伊藤 彰則
東北大学大学院工学研究科
aito@fw.ipsj.or.jp
現在のメンテナ
鵜飼文敏
Debian Project
ukai@debian.or.jp
佐藤 大
東北大学病院
satodai@w3m.jp
ご意見,ご感想をMLまでお寄せください.
w3m-dev@mi.med.tohoku.ac.jp (日本語)
w3m-dev-en@mi.med.tohoku.ac.jp (英語)
w3m-dev@sic.med.tohoku.ac.jp (日本語)
w3m-dev-en@sic.med.tohoku.ac.jp (英語)
http://w3m.sourceforge.net/
+1
View File
@@ -132,6 +132,7 @@ keymap LEFT MOVE_LEFT
keymap M-[E MENU
keymap M-[L MENU
keymap M-[Z PREV_LINK
keymap M-[1~ BEGIN
keymap M-[2~ MENU
+5 -1
View File
@@ -239,7 +239,7 @@ from the server each time it accesses it. If possible, use a cache server.
(if you are using netscape).
<p>
<dt><h3>How do I change the default image viewer?</h3>
<dd>By default w3m uses xv to view images. If you want to change it into, let's say, 'display', add the following line to ~/.mailcap or /etc/mailcap.
<dd>By default w3m uses xv to view images. If you want to change it into, let's say, 'display', add the following line to ~/.w3m/mailcap or /etc/mailcap.
<p>
<pre>
image/*; display %s
@@ -270,6 +270,10 @@ with Ctrl-u. What to do?</h3>
<dl>
<dt><h3>What is w3m's configuration file?</h3>
<dd>It is ~/.w3m/config.
With this file, you can adjust w3m's behavior by changing values of options
that are described to be varied with the option setting panel.
Each line contains setting for one option, which is a pair of an option name
and its value with a space as a separator.
<p>
<dt><h3>What are these w3mxxxx files in my ~/.w3m directory for?</h3>
<dd>These are temporary files used by w3m when reading documents from a
+9 -9
View File
@@ -1,4 +1,4 @@
w3m: WWW wo Miru Tool version 0.5.1 April 29, 2004
w3m: WWW wo Miru Tool version 0.5.2 May 31, 2007
(C) Copyright Akinori ITO
Hironori SAKAMOTO
Fumitoshi UKAI
@@ -37,7 +37,7 @@ w3m is known to work on these platforms.
Windows 9x/NT with Cygwin b20.1, 1.1.x, 1.3.x
MS-DOS with DJGPP and WATT32 packet driver
MacOS X Server
MacOS X 10.1, 10.2
MacOS X 10.1, 10.2, 10.3, 10.4
2. Installation
@@ -90,7 +90,7 @@ Windows
3. Copyright
(C) Copyright 1994-2002 by Akinori Ito
(C) Copyright 2002-2004 by Akinori Ito, Hironori Sakamoto, Fumitoshi Ukai
(C) Copyright 2002-2007 by Akinori Ito, Hironori Sakamoto, Fumitoshi Ukai
4. License
@@ -107,15 +107,15 @@ Windows
Initial author:
Akinori Ito
Faculty of Engineering, Yamagata University
Faculty of Engineering, Tohoku University
aito@fw.ipsj.or.jp
Current Maintainer
Fumitoshi UKAI
Debian Project
ukai@debian.or.jp
Dai Sato
Tohoku University Hospital
satodai@w3m.jp
Feel free to send your opinion to the w3m mailing-lists.
w3m-dev@mi.med.tohoku.ac.jp (Japanese)
w3m-dev-en@mi.med.tohoku.ac.jp (English)
w3m-dev@sic.med.tohoku.ac.jp (Japanese)
w3m-dev-en@sic.med.tohoku.ac.jp (English)
http://w3m.sourceforge.net/
+1
View File
@@ -132,6 +132,7 @@ keymap LEFT MOVE_LEFT
keymap M-[E MENU
keymap M-[L MENU
keymap M-[Z PREV_LINK
keymap M-[1~ BEGIN
keymap M-[2~ MENU
+25 -1
View File
@@ -1,6 +1,8 @@
/* $Id: etc.c,v 1.78 2004/04/16 18:47:19 ukai Exp $ */
/* $Id: etc.c,v 1.81 2007/05/23 15:06:05 inu Exp $ */
#include "fm.h"
#ifndef __MINGW32_VERSION
#include <pwd.h>
#endif
#include "myctype.h"
#include "html.h"
#include "local.h"
@@ -1310,9 +1312,13 @@ romanAlphabet(int n)
static void
reset_signals(void)
{
#ifdef SIGHUP
mySignal(SIGHUP, SIG_DFL); /* terminate process */
#endif
mySignal(SIGINT, SIG_DFL); /* terminate process */
#ifdef SIGQUIT
mySignal(SIGQUIT, SIG_DFL); /* terminate process */
#endif
mySignal(SIGTERM, SIG_DFL); /* terminate process */
mySignal(SIGILL, SIG_DFL); /* create core image */
mySignal(SIGIOT, SIG_DFL); /* create core image */
@@ -1355,8 +1361,10 @@ setup_child(int child, int i, int f)
{
reset_signals();
mySignal(SIGINT, SIG_IGN);
#ifndef __MINGW32_VERSION
if (!child)
SETPGRP();
#endif /* __MINGW32_VERSION */
close_tty();
close_all_fds_except(i, f);
QuietMessage = TRUE;
@@ -1364,6 +1372,7 @@ setup_child(int child, int i, int f)
TrapSignal = FALSE;
}
#ifndef __MINGW32_VERSION
pid_t
open_pipe_rw(FILE ** fr, FILE ** fw)
{
@@ -1421,6 +1430,7 @@ open_pipe_rw(FILE ** fr, FILE ** fw)
err0:
return (pid_t) - 1;
}
#endif /* __MINGW32_VERSION */
void
myExec(char *command)
@@ -1433,6 +1443,7 @@ myExec(char *command)
void
mySystem(char *command, int background)
{
#ifndef __MINGW32_VERSION
if (background) {
#ifndef __EMX__
flush_tty();
@@ -1447,6 +1458,7 @@ mySystem(char *command, int background)
#endif
}
else
#endif /* __MINGW32_VERSION */
system(command);
}
@@ -1516,6 +1528,13 @@ myEditor(char *cmd, char *file, int line)
return tmp;
}
#ifdef __MINGW32_VERSION
char *
expandName(char *name)
{
return getenv("HOME");
}
#else
char *
expandName(char *name)
{
@@ -1559,6 +1578,7 @@ expandName(char *name)
rest:
return name;
}
#endif
char *
file_to_url(char *file)
@@ -1898,7 +1918,11 @@ mymktime(char *timestr)
#ifdef INET6
#include <sys/socket.h>
#endif /* INET6 */
#ifndef __MINGW32_VERSION
#include <netdb.h>
#else
#include <winsock.h>
#endif
char *
FQDN(char *host)
{
+499 -107
View File
File diff suppressed because it is too large Load Diff
+35 -9
View File
@@ -1,4 +1,4 @@
/* $Id: fm.h,v 1.125 2004/04/16 18:47:19 ukai Exp $ */
/* $Id: fm.h,v 1.138 2007/05/30 04:47:24 inu Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -53,7 +53,7 @@ typedef int wc_ces; /* XXX: not used */
#define setlocale(category, locale) /* empty */
#endif
#if ENABLE_NLS
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) gettext (String)
#define N_(String) (String)
@@ -166,6 +166,15 @@ void bzero(void *, int);
#define PE_ACTIVE 0x80
#define PE_VISITED 0x4000
/* Extra effect */
#define PE_EX_ITALIC 0x01
#define PE_EX_INSERT 0x02
#define PE_EX_STRIKE 0x04
#define PE_EX_ITALIC_E PE_UNDER
#define PE_EX_INSERT_E PE_UNDER
#define PE_EX_STRIKE_E PE_STAND
#define CharType(c) ((c)&P_CHARTYPE)
#define CharEffect(c) ((c)&(P_EFFECT|PC_SYMBOL))
#define SetCharType(v,c) ((v)=(((v)&~P_CHARTYPE)|(c)))
@@ -336,6 +345,7 @@ typedef struct _Line {
typedef struct {
int line;
int pos;
int invalid;
} BufferPoint;
#ifdef USE_IMAGE
@@ -513,6 +523,13 @@ typedef struct _DownloadList {
} DownloadList;
#define DOWNLOAD_LIST_TITLE "Download List Panel"
#define COPY_BUFROOT(dstbuf, srcbuf) {\
(dstbuf)->rootX = (srcbuf)->rootX; \
(dstbuf)->rootY = (srcbuf)->rootY; \
(dstbuf)->COLS = (srcbuf)->COLS; \
(dstbuf)->LINES = (srcbuf)->LINES; \
}
#define COPY_BUFPOSITION(dstbuf, srcbuf) {\
(dstbuf)->topLine = (srcbuf)->topLine; \
(dstbuf)->currentLine = (srcbuf)->currentLine; \
@@ -535,7 +552,7 @@ typedef struct _DownloadList {
#define FONT_STACK_SIZE 5
#define FONTSTAT_SIZE 4
#define FONTSTAT_SIZE 7
#define _INIT_BUFFER_WIDTH (COLS - (showLineNum ? 6 : 1))
#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
@@ -583,7 +600,10 @@ struct readbuffer {
#define in_bold fontstat[0]
#define in_under fontstat[1]
#define in_stand fontstat[2]
#define in_italic fontstat[2]
#define in_strike fontstat[3]
#define in_ins fontstat[4]
#define in_stand fontstat[5]
#define RB_PRE 0x01
#define RB_SCRIPT 0x02
@@ -759,11 +779,11 @@ typedef struct http_request {
*/
extern int LINES, COLS;
#if defined(__CYGWIN__) && LANG == JA
#if defined(__CYGWIN__)
extern int LASTLINE;
#else /* not defined(__CYGWIN__) || LANG != JA */
#else /* not defined(__CYGWIN__) */
#define LASTLINE (LINES-1)
#endif /* not defined(__CYGWIN__) || LANG != JA */
#endif /* not defined(__CYGWIN__) */
global int Tabstop init(8);
global int IndentIncr init(4);
@@ -776,6 +796,7 @@ global char RenderFrame init(FALSE);
global char TargetSelf init(FALSE);
global char PermitSaveToPipe init(FALSE);
global char DecodeCTE init(FALSE);
global char AutoUncompress init(FALSE);
global char PreserveTimestamp init(TRUE);
global char ArgvIsURL init(FALSE);
global char MetaRefresh init(FALSE);
@@ -869,7 +890,7 @@ global DownloadList *LastDL init(NULL);
global int CurrentKey;
global char *CurrentKeyData;
global char *CurrentCmdData;
global char *w3m_reqlog;
extern char *w3m_version;
#define DUMP_BUFFER 0x01
@@ -964,7 +985,10 @@ global int UseDictCommand init(FALSE);
global char *DictCommand init("file:///$LIB/w3mdict" CGI_EXTENSION);
#endif /* USE_DICT */
global int ignore_null_img_alt init(TRUE);
global int displayInsDel init(TRUE);
#define DISPLAY_INS_DEL_SIMPLE 0
#define DISPLAY_INS_DEL_NORMAL 1
#define DISPLAY_INS_DEL_FONTIFY 2
global int displayInsDel init(DISPLAY_INS_DEL_NORMAL);
global int FoldTextarea init(FALSE);
global int FoldLine init(FALSE);
#define DEFAULT_URL_EMPTY 0
@@ -1009,6 +1033,7 @@ global wc_ces InnerCharset init(WC_CES_WTF); /* Don't change */
global wc_ces DisplayCharset init(DISPLAY_CHARSET);
global wc_ces DocumentCharset init(DOCUMENT_CHARSET);
global wc_ces SystemCharset init(SYSTEM_CHARSET);
global wc_ces BookmarkCharset init(SYSTEM_CHARSET);
global char ExtHalfdump init(FALSE);
global char FollowLocale init(TRUE);
global char UseContentCharset init(TRUE);
@@ -1075,6 +1100,7 @@ global MouseAction mouse_action;
#ifdef USE_COOKIE
global int default_use_cookie init(TRUE);
global int use_cookie init(FALSE);
global int show_cookie init(TRUE);
global int accept_cookie init(FALSE);
#define ACCEPT_BAD_COOKIE_DISCARD 0
#define ACCEPT_BAD_COOKIE_ACCEPT 1
+18 -1
View File
@@ -1,6 +1,8 @@
/* $Id: ftp.c,v 1.35 2004/04/16 18:47:19 ukai Exp $ */
/* $Id: ftp.c,v 1.39 2007/05/31 01:19:50 inu Exp $ */
#include <stdio.h>
#ifndef __MINGW32_VERSION
#include <pwd.h>
#endif /* __MINGW32_VERSION */
#include <Str.h>
#include <signal.h>
#include <setjmp.h>
@@ -14,10 +16,14 @@
#include <malloc.h>
#endif /* DEBUG */
#ifndef __MINGW32_VERSION
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#else
#include <winsock.h>
#endif /* __MINGW32_VERSION */
typedef struct _FTP {
char *host;
@@ -371,7 +377,14 @@ openFTPStream(ParsedURL *pu, URLFile *uf)
term_cbreak();
}
else {
#ifndef __MINGW32_VERSION
pwd = Strnew_charp((char *)getpass("Password: "));
#else
term_raw();
pwd = Strnew_charp(inputLine("Password: ", NULL, IN_PASSWORD));
pwd = Str_conv_to_system(pwd);
term_cbreak();
#endif /* __MINGW32_VERSION */
}
add_auth_cookie_flag = TRUE;
}
@@ -380,8 +393,12 @@ openFTPStream(ParsedURL *pu, URLFile *uf)
else if (ftppasswd != NULL && *ftppasswd != '\0')
pass = ftppasswd;
else {
#ifndef __MINGW32_VERSION
struct passwd *mypw = getpwuid(getuid());
tmp = Strnew_charp(mypw ? mypw->pw_name : "anonymous");
#else
tmp = Strnew_charp("anonymous");
#endif /* __MINGW32_VERSION */
Strcat_char(tmp, '@');
pass = tmp->ptr;
}
+40 -29
View File
@@ -1,4 +1,4 @@
/* $Id: html.c,v 1.28 2003/09/26 20:48:21 ukai Exp $ */
/* $Id: html.c,v 1.30 2007/04/19 12:00:38 inu Exp $ */
#include "html.h"
/* Define HTML Tag Infomation Table */
@@ -29,9 +29,9 @@ unsigned char ALST_PRE[] = { ATTR_FOR_TABLE, ATTR_CORE };
#define MAXA_PRE MAXA_CORE + 1
unsigned char ALST_IMG[] =
{ ATTR_SRC, ATTR_ALT, ATTR_WIDTH, ATTR_HEIGHT, ATTR_ALIGN, ATTR_USEMAP,
ATTR_ISMAP, ATTR_TITLE, ATTR_CORE
ATTR_ISMAP, ATTR_TITLE, ATTR_PRE_INT, ATTR_CORE
};
#define MAXA_IMG MAXA_CORE + 8
#define MAXA_IMG MAXA_CORE + 9
unsigned char ALST_TABLE[] =
{ ATTR_BORDER, ATTR_WIDTH, ATTR_HBORDER, ATTR_CELLSPACING,
ATTR_CELLPADDING, ATTR_VSPACE, ATTR_CORE
@@ -231,34 +231,44 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"/s", NULL, 0, TFLG_END}, /* 106 HTML_N_S */
{"q", NULL, 0, 0}, /* 107 HTML_Q */
{"/q", NULL, 0, TFLG_END}, /* 108 HTML_N_Q */
{NULL, NULL, 0, 0}, /* 109 Undefined */
{"i", NULL, 0, 0}, /* 109 HTML_I */
{"/i", NULL, 0, TFLG_END}, /* 110 HTML_N_I */
{"strong", NULL, 0, 0}, /* 111 HTML_STRONG */
{"/strong", NULL, 0, TFLG_END}, /* 112 HTML_N_STRONG */
{NULL, NULL, 0, 0}, /* 113 Undefined */
{NULL, NULL, 0, 0}, /* 114 Undefined */
{NULL, NULL, 0, 0}, /* 115 Undefined */
{NULL, NULL, 0, 0}, /* 116 Undefined */
{NULL, NULL, 0, 0}, /* 117 Undefined */
{NULL, NULL, 0, 0}, /* 118 Undefined */
{NULL, NULL, 0, 0}, /* 119 Undefined */
/* pseudo tag */
{"select_int", ALST_SELECT_INT, MAXA_SELECT_INT, TFLG_INT}, /* 110 HTML_SELECT_INT */
{"/select_int", NULL, 0, TFLG_INT | TFLG_END}, /* 111 HTML_N_SELECT_INT */
{"option_int", ALST_OPTION, MAXA_OPTION, TFLG_INT}, /* 112 HTML_OPTION_INT */
{"textarea_int", ALST_TEXTAREA_INT, MAXA_TEXTAREA_INT, TFLG_INT}, /* 113 HTML_TEXTAREA_INT */
{"/textarea_int", NULL, 0, TFLG_INT | TFLG_END}, /* 114 HTML_N_TEXTAREA_INT */
{"table_alt", ALST_TABLE_ALT, MAXA_TABLE_ALT, TFLG_INT}, /* 115 HTML_TABLE_ALT */
{"symbol", ALST_SYMBOL, MAXA_SYMBOL, TFLG_INT}, /* 116 HTML_SYMBOL */
{"/symbol", NULL, 0, TFLG_INT | TFLG_END}, /* 117 HTML_N_SYMBOL */
{"pre_int", NULL, 0, TFLG_INT}, /* 118 HTML_PRE_INT */
{"/pre_int", NULL, 0, TFLG_INT | TFLG_END}, /* 119 HTML_N_PRE_INT */
{"title_alt", ALST_TITLE_ALT, MAXA_TITLE_ALT, TFLG_INT}, /* 120 HTML_TITLE_ALT */
{"form_int", ALST_FORM_INT, MAXA_FORM_INT, TFLG_INT}, /* 121 HTML_FORM_INT */
{"/form_int", NULL, 0, TFLG_INT | TFLG_END}, /* 122 HTML_N_FORM_INT */
{"dl_compact", NULL, 0, TFLG_INT}, /* 123 HTML_DL_COMPACT */
{"input_alt", ALST_INPUT_ALT, MAXA_INPUT_ALT, TFLG_INT}, /* 124 HTML_INPUT_ALT */
{"/input_alt", NULL, 0, TFLG_INT | TFLG_END}, /* 125 HTML_N_INPUT_ALT */
{"img_alt", ALST_IMG_ALT, MAXA_IMG_ALT, TFLG_INT}, /* 126 HTML_IMG_ALT */
{"/img_alt", NULL, 0, TFLG_INT | TFLG_END}, /* 127 HTML_N_IMG_ALT */
{" ", ALST_NOP, MAXA_NOP, TFLG_INT}, /* 128 HTML_NOP */
{"pre_plain", NULL, 0, TFLG_INT}, /* 129 HTML_PRE_PLAIN */
{"/pre_plain", NULL, 0, TFLG_INT | TFLG_END}, /* 130 HTML_N_PRE_PLAIN */
{"internal", NULL, 0, TFLG_INT}, /* 131 HTML_INTERNAL */
{"/internal", NULL, 0, TFLG_INT | TFLG_END}, /* 132 HTML_N_INTERNAL */
{"div_int", ALST_P, MAXA_P, TFLG_INT}, /* 133 HTML_DIV_INT */
{"/div_int", NULL, 0, TFLG_INT | TFLG_END}, /* 134 HTML_N_DIV_INT */
{"select_int", ALST_SELECT_INT, MAXA_SELECT_INT, TFLG_INT}, /* 120 HTML_SELECT_INT */
{"/select_int", NULL, 0, TFLG_INT | TFLG_END}, /* 121 HTML_N_SELECT_INT */
{"option_int", ALST_OPTION, MAXA_OPTION, TFLG_INT}, /* 122 HTML_OPTION_INT */
{"textarea_int", ALST_TEXTAREA_INT, MAXA_TEXTAREA_INT, TFLG_INT}, /* 123 HTML_TEXTAREA_INT */
{"/textarea_int", NULL, 0, TFLG_INT | TFLG_END}, /* 124 HTML_N_TEXTAREA_INT */
{"table_alt", ALST_TABLE_ALT, MAXA_TABLE_ALT, TFLG_INT}, /* 125 HTML_TABLE_ALT */
{"symbol", ALST_SYMBOL, MAXA_SYMBOL, TFLG_INT}, /* 126 HTML_SYMBOL */
{"/symbol", NULL, 0, TFLG_INT | TFLG_END}, /* 127 HTML_N_SYMBOL */
{"pre_int", NULL, 0, TFLG_INT}, /* 128 HTML_PRE_INT */
{"/pre_int", NULL, 0, TFLG_INT | TFLG_END}, /* 129 HTML_N_PRE_INT */
{"title_alt", ALST_TITLE_ALT, MAXA_TITLE_ALT, TFLG_INT}, /* 130 HTML_TITLE_ALT */
{"form_int", ALST_FORM_INT, MAXA_FORM_INT, TFLG_INT}, /* 131 HTML_FORM_INT */
{"/form_int", NULL, 0, TFLG_INT | TFLG_END}, /* 132 HTML_N_FORM_INT */
{"dl_compact", NULL, 0, TFLG_INT}, /* 133 HTML_DL_COMPACT */
{"input_alt", ALST_INPUT_ALT, MAXA_INPUT_ALT, TFLG_INT}, /* 134 HTML_INPUT_ALT */
{"/input_alt", NULL, 0, TFLG_INT | TFLG_END}, /* 135 HTML_N_INPUT_ALT */
{"img_alt", ALST_IMG_ALT, MAXA_IMG_ALT, TFLG_INT}, /* 136 HTML_IMG_ALT */
{"/img_alt", NULL, 0, TFLG_INT | TFLG_END}, /* 137 HTML_N_IMG_ALT */
{" ", ALST_NOP, MAXA_NOP, TFLG_INT}, /* 138 HTML_NOP */
{"pre_plain", NULL, 0, TFLG_INT}, /* 139 HTML_PRE_PLAIN */
{"/pre_plain", NULL, 0, TFLG_INT | TFLG_END}, /* 140 HTML_N_PRE_PLAIN */
{"internal", NULL, 0, TFLG_INT}, /* 141 HTML_INTERNAL */
{"/internal", NULL, 0, TFLG_INT | TFLG_END}, /* 142 HTML_N_INTERNAL */
{"div_int", ALST_P, MAXA_P, TFLG_INT}, /* 143 HTML_DIV_INT */
{"/div_int", NULL, 0, TFLG_INT | TFLG_END}, /* 144 HTML_N_DIV_INT */
};
TagAttrInfo AttrMAP[MAX_TAGATTR] = {
@@ -338,4 +348,5 @@ TagAttrInfo AttrMAP[MAX_TAGATTR] = {
{"referer", VTYPE_STR, AFLG_INT}, /* 71 ATTR_REFERER */
{"selectnumber", VTYPE_NUMBER, AFLG_INT}, /* 72 ATTR_SELECTNUMBER */
{"textareanumber", VTYPE_NUMBER, AFLG_INT}, /* 73 ATTR_TEXTAREANUMBER */
{"pre_int", VTYPE_NONE, AFLG_INT}, /* 74 ATTR_PRE_INT */
};
+35 -29
View File
@@ -1,4 +1,4 @@
/* $Id: html.h,v 1.25 2003/10/20 16:41:56 ukai Exp $ */
/* $Id: html.h,v 1.29 2007/05/23 12:01:43 inu Exp $ */
#ifndef _HTML_H
#define _HTML_H
#ifdef USE_SSL
@@ -69,6 +69,7 @@ typedef struct {
InputStream stream;
char *ext;
int compression;
int content_encoding;
char *guess_type;
#ifdef USE_SSL
char *ssl_certificate;
@@ -197,35 +198,39 @@ typedef struct {
#define HTML_N_S 106
#define HTML_Q 107
#define HTML_N_Q 108
#define HTML_I 109
#define HTML_N_I 110
#define HTML_STRONG 111
#define HTML_N_STRONG 112
/* pseudo tag */
#define HTML_SELECT_INT 110
#define HTML_N_SELECT_INT 111
#define HTML_OPTION_INT 112
#define HTML_TEXTAREA_INT 113
#define HTML_N_TEXTAREA_INT 114
#define HTML_TABLE_ALT 115
#define HTML_SYMBOL 116
#define HTML_N_SYMBOL 117
#define HTML_PRE_INT 118
#define HTML_N_PRE_INT 119
#define HTML_TITLE_ALT 120
#define HTML_FORM_INT 121
#define HTML_N_FORM_INT 122
#define HTML_DL_COMPACT 123
#define HTML_INPUT_ALT 124
#define HTML_N_INPUT_ALT 125
#define HTML_IMG_ALT 126
#define HTML_N_IMG_ALT 127
#define HTML_NOP 128
#define HTML_PRE_PLAIN 129
#define HTML_N_PRE_PLAIN 130
#define HTML_INTERNAL 131
#define HTML_N_INTERNAL 132
#define HTML_DIV_INT 133
#define HTML_N_DIV_INT 134
#define HTML_SELECT_INT 120
#define HTML_N_SELECT_INT 121
#define HTML_OPTION_INT 122
#define HTML_TEXTAREA_INT 123
#define HTML_N_TEXTAREA_INT 124
#define HTML_TABLE_ALT 125
#define HTML_SYMBOL 126
#define HTML_N_SYMBOL 127
#define HTML_PRE_INT 128
#define HTML_N_PRE_INT 129
#define HTML_TITLE_ALT 130
#define HTML_FORM_INT 131
#define HTML_N_FORM_INT 132
#define HTML_DL_COMPACT 133
#define HTML_INPUT_ALT 134
#define HTML_N_INPUT_ALT 135
#define HTML_IMG_ALT 136
#define HTML_N_IMG_ALT 137
#define HTML_NOP 138
#define HTML_PRE_PLAIN 139
#define HTML_N_PRE_PLAIN 140
#define HTML_INTERNAL 141
#define HTML_N_INTERNAL 142
#define HTML_DIV_INT 143
#define HTML_N_DIV_INT 144
#define MAX_HTMLTAG 135
#define MAX_HTMLTAG 145
/* Tag attribute */
@@ -296,8 +301,9 @@ typedef struct {
#define ATTR_REFERER 71
#define ATTR_SELECTNUMBER 72
#define ATTR_TEXTAREANUMBER 73
#define ATTR_PRE_INT 74
#define MAX_TAGATTR 74
#define MAX_TAGATTR 75
/* HTML Tag Information Table */
@@ -343,7 +349,7 @@ extern TagInfo TagMAP[];
extern TagAttrInfo AttrMAP[];
struct environment {
char env;
unsigned char env;
int type;
int count;
char indent;
+7 -3
View File
@@ -1,7 +1,9 @@
/* $Id: indep.c,v 1.35 2004/04/09 17:18:49 ukai Exp $ */
/* $Id: indep.c,v 1.38 2007/05/23 15:06:05 inu Exp $ */
#include "fm.h"
#include <stdio.h>
#ifndef __MINGW32_VERSION
#include <pwd.h>
#endif /* __MINGW32_VERSION */
#include <sys/param.h>
#include <sys/types.h>
#include <stdlib.h>
@@ -225,6 +227,7 @@ expandPath(char *name)
p = name;
if (*p == '~') {
p++;
#ifndef __MINGW32_VERSION
if (IS_ALPHA(*p)) {
char *q = strchr(p, '/');
if (q) { /* ~user/dir... */
@@ -238,8 +241,9 @@ expandPath(char *name)
if (!passent)
goto rest;
extpath = Strnew_charp(passent->pw_dir);
}
else if (*p == '/' || *p == '\0') { /* ~/dir... or ~ */
} else
#endif /* __MINGW32_VERSION */
if (*p == '/' || *p == '\0') { /* ~/dir... or ~ */
extpath = Strnew_charp(getenv("HOME"));
}
else
+1 -1
View File
@@ -18,7 +18,7 @@ main(int argc, char **argv)
return 1;
if (isdigit((int)*argv[1])) {
ULONG CpList[8], CpSize;
unsigned long CpList[8], CpSize;
APIRET rc = DosQueryCp(sizeof(CpList), CpList, &CpSize);
if (rc)
return rc;
+12 -1
View File
@@ -1,4 +1,4 @@
/* $Id: istream.c,v 1.23 2003/10/20 16:41:56 ukai Exp $ */
/* $Id: istream.c,v 1.26 2007/05/23 15:06:05 inu Exp $ */
#include "fm.h"
#include "myctype.h"
#include "istream.h"
@@ -6,6 +6,9 @@
#ifdef USE_SSL
#include <openssl/x509v3.h>
#endif
#ifdef __MINGW32_VERSION
#include <winsock.h>
#endif
#define uchar unsigned char
@@ -617,13 +620,21 @@ ssl_get_certificate(SSL * ssl, char *hostname)
static void
basic_close(int *handle)
{
#ifdef __MINGW32_VERSION
closesocket(*(int *)handle);
#else
close(*(int *)handle);
#endif
}
static int
basic_read(int *handle, char *buf, int len)
{
#ifdef __MINGW32_VERSION
return recv(*(int *)handle, buf, len, 0);
#else
return read(*(int *)handle, buf, len);
#endif
}
static void
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: keybind.c,v 1.9 2002/12/13 03:02:03 ukai Exp $ */
/* $Id: keybind.c,v 1.10 2006/05/29 12:17:25 inu Exp $ */
#include "funcname2.h"
unsigned char GlobalKeymap[128] = {
@@ -99,7 +99,7 @@ unsigned char EscBKeymap[128] = {
/* P Q R S T U V W */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* X Y Z [ \ ] ^ _ */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
nulcmd, nulcmd, prevA, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* ` a b c d e f g */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* h i j k l m n o */
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: keybind_lynx.c,v 1.7 2002/12/13 03:02:03 ukai Exp $ */
/* $Id: keybind_lynx.c,v 1.8 2006/05/29 12:17:25 inu Exp $ */
/*
* Lynx-like key binding.
*
@@ -107,7 +107,7 @@ unsigned char EscBKeymap[128] = {
/* P Q R S T U V W */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* X Y Z [ \ ] ^ _ */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
nulcmd, nulcmd, prevA, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* ` a b c d e f g */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* h i j k l m n o */
+1 -1
View File
@@ -6,7 +6,7 @@ top_srcdir=@top_srcdir@
VPATH=$(srcdir):.
LIBRARY = libwc.a
CC=@CC@
CFLAGS = $(OPTS) -I.. -I$(top_srcdir) -I$(srcdir) @CFLAGS@ @WCCFLAGS@ @DEFS@
CFLAGS = $(OPTS) -I.. -I$(top_srcdir) -I$(srcdir) @CFLAGS@ @CPPFLAGS@ @WCCFLAGS@ @DEFS@
AR=ar
RANLIB=@RANLIB@
RM=rm
+11
View File
@@ -6,6 +6,10 @@
#include "wc.h"
#ifdef HAVE_LANGINFO_CODESET
#include <langinfo.h>
#endif
wc_locale WcLocale = 0;
static struct {
@@ -369,6 +373,13 @@ wc_locale_to_ces(char *locale)
if (*p == 'C' && *(p+1) == '\0')
return WC_CES_US_ASCII;
#ifdef HAVE_LANGINFO_CODESET
{
char *cs = nl_langinfo(CODESET);
if (cs && strcmp(cs, "US-ASCII"))
return wc_charset_to_ces(cs);
}
#endif
for (n = 0; *p && *p != '.' && n < 5; p++) {
if ((unsigned char)*p > 0x20)
buf[n++] = tolower(*p);
+1 -1
View File
@@ -99,7 +99,7 @@ wc_auto_detect(char *is, size_t len, wc_ces hint)
for (; p < ep && ! WC_DETECT_MAP[*p]; p++)
;
if (p == ep)
return WC_CES_US_ASCII;
return hint;
switch (hint) {
case WC_CES_ISO_2022_JP:
+6 -5
View File
@@ -1,14 +1,15 @@
#define N_ucs_wide_map 10
#define N_ucs_wide_map 11
static wc_map ucs_wide_map[ N_ucs_wide_map ] = {
{ 0x1100, 0x115F },
{ 0x2E80, 0x3009 },
{ 0x300C, 0x3019 },
{ 0x301C, 0x303E },
{ 0x3040, 0xA4CF },
{ 0x2329, 0x232A },
{ 0x2E80, 0x303E },
{ 0x3040, 0x4DBF },
{ 0x4E00, 0xA4CF },
{ 0xAC00, 0xD7A3 },
{ 0xF900, 0xFAFF },
{ 0xFE10, 0xFE19 },
{ 0xFE30, 0xFE6F },
{ 0xFF00, 0xFF5F },
{ 0xFFE0, 0xFFE6 },
+2 -1
View File
@@ -522,7 +522,8 @@ wc_is_ucs_wide(wc_uint32 ucs)
return (wc_map_range_search((wc_uint16)ucs,
ucs_wide_map, N_ucs_wide_map) != NULL);
else
return ((ucs & ~0xFFFF) == WC_C_UCS4_PLANE2);
return ((ucs & ~0xFFFF) == WC_C_UCS4_PLANE2 ||
(ucs & ~0xFFFF) == WC_C_UCS4_PLANE3);
}
wc_bool
+1
View File
@@ -22,6 +22,7 @@
#define WC_C_CANCEL_TAG 0xE007F
#define WC_C_UCS4_PLANE1 0x10000
#define WC_C_UCS4_PLANE2 0x20000
#define WC_C_UCS4_PLANE3 0x30000
#define wc_ucs_tag_to_ucs(c) ((c) & WC_C_UNICODE_MASK)
#define wc_ucs_tag_to_tag(c) ((c) >> 24)
+3 -3
View File
@@ -1,4 +1,4 @@
/* $Id: linein.c,v 1.34 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: linein.c,v 1.35 2007/05/23 12:14:24 inu Exp $ */
#include "fm.h"
#include "local.h"
#include "myctype.h"
@@ -1025,7 +1025,7 @@ _prev(void)
return;
strCurrentBuf = strBuf;
}
if (DecodeURL)
if (DecodeURL && (cm_mode & CPL_URL) )
p = url_unquote_conv(p, 0);
strBuf = Strnew_charp(p);
CLen = CPos = setStrType(strBuf, strProp);
@@ -1044,7 +1044,7 @@ _next(void)
return;
p = nextHist(hist);
if (p) {
if (DecodeURL)
if (DecodeURL && (cm_mode & CPL_URL) )
p = url_unquote_conv(p, 0);
strBuf = Strnew_charp(p);
}
+13 -2
View File
@@ -1,4 +1,4 @@
/* $Id: local.c,v 1.31 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: local.c,v 1.35 2007/05/23 15:06:05 inu Exp $ */
#include "fm.h"
#include <string.h>
#include <stdio.h>
@@ -16,6 +16,10 @@
#include "local.h"
#include "hash.h"
#ifdef __MINGW32_VERSION
#include <winsock.h>
#endif
#define CGIFN_NORMAL 0
#define CGIFN_LIBDIR 1
#define CGIFN_CGIBIN 2
@@ -85,7 +89,8 @@ loadLocalDir(char *dname)
Strcat_char(dirname, '/');
qdir = html_quote(Str_conv_from_system(dirname)->ptr);
/* FIXME: gettextize? */
tmp = Strnew_m_charp("<HTML>\n<HEAD>\n<BASE HREF=\"file://", qdir,
tmp = Strnew_m_charp("<HTML>\n<HEAD>\n<BASE HREF=\"file://",
html_quote(file_quote(dirname->ptr)),
"\">\n<TITLE>Directory list of ", qdir,
"</TITLE>\n</HEAD>\n<BODY>\n<H1>Directory list of ",
qdir, "</H1>\n", NULL);
@@ -193,8 +198,10 @@ check_local_cgi(char *file, int status)
return -1;
if (S_ISDIR(st.st_mode))
return -1;
#ifndef __MINGW32_VERSION
if ((st.st_uid == geteuid() && (st.st_mode & S_IXUSR)) || (st.st_gid == getegid() && (st.st_mode & S_IXGRP)) || (st.st_mode & S_IXOTH)) /* executable */
return 0;
#endif
return -1;
}
@@ -353,6 +360,9 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
pid_t pid;
char *file = uri, *name = uri, *path_info = NULL, *tmpf = NULL;
#ifdef __MINGW32_VERSION
return NULL;
#else
status = cgi_filename(uri, &file, &name, &path_info);
if (check_local_cgi(file, status) < 0)
return NULL;
@@ -412,4 +422,5 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
file, mybasename(file), strerror(errno));
exit(1);
return NULL;
#endif
}
+5 -6
View File
@@ -1,4 +1,4 @@
/* $Id: mailcap.c,v 1.12 2003/01/17 17:06:04 ukai Exp $ */
/* $Id: mailcap.c,v 1.13 2006/08/07 03:10:26 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include <stdio.h>
@@ -252,7 +252,7 @@ acceptableMimeTypes()
/* generate acceptable media types */
l = newTextList();
mhash = newHash_si(16); /* XXX */
pushText(l, "text");
/* pushText(l, "text"); */
putHash_si(mhash, "text", 1);
pushText(l, "image");
putHash_si(mhash, "image", 1);
@@ -272,11 +272,10 @@ acceptableMimeTypes()
}
}
}
types = Strnew();
Strcat_charp(types, "text/html, text/*;q=0.5");
while ((p = popText(l)) != NULL) {
if (types == NULL)
types = Strnew();
else
Strcat_charp(types, ", ");
Strcat_charp(types, ", ");
Strcat_charp(types, p);
Strcat_charp(types, "/*");
}
+103 -50
View File
@@ -1,4 +1,4 @@
/* $Id: main.c,v 1.242 2004/04/04 16:47:20 ukai Exp $ */
/* $Id: main.c,v 1.258 2007/05/31 01:19:50 inu Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -24,6 +24,12 @@ extern int do_getch();
#endif /* defined(USE_GPM) || defined(USE_SYSMOUSE) */
#endif
#ifdef __MINGW32_VERSION
#include <winsock.h>
WSADATA WSAData;
#endif
#define DSTR_LEN 256
Hist *LoadHist;
@@ -51,7 +57,6 @@ static MySignalHandler SigAlarm(SIGNAL_ARG);
#ifdef SIGWINCH
static int need_resize_screen = FALSE;
static MySignalHandler resize_hook(SIGNAL_ARG);
static MySignalHandler resize_handler(SIGNAL_ARG);
static void resize_screen(void);
#endif
@@ -65,7 +70,11 @@ static char *MarkString = NULL;
static char *SearchString = NULL;
int (*searchRoutine) (Buffer *, char *);
#ifndef __MINGW32_VERSION
JMP_BUF IntReturn;
#else
_JBTYPE IntReturn[_JBLEN];
#endif /* __MINGW32_VERSION */
static void delBuffer(Buffer *buf);
static void cmd_loadfile(char *path);
@@ -250,6 +259,7 @@ fusage(FILE * f, int err)
fprintf(f, " -config file specify config file\n");
fprintf(f, " -help print this usage message\n");
fprintf(f, " -version print w3m version\n");
fprintf(f, " -reqlog write request logfile\n");
fprintf(f, " -debug DO NOT USE\n");
if (show_params_p)
show_params(f);
@@ -294,10 +304,9 @@ wrap_GC_warn_proc(char *msg, GC_word arg)
for (; n > 0; --n, ++i) {
i %= sizeof(msg_ring) / sizeof(msg_ring[0]);
disp_message_nsec(Sprintf
(msg_ring[i].msg,
(unsigned long)msg_ring[i].arg)->ptr, FALSE,
1, TRUE, FALSE);
printf(msg_ring[i].msg, (unsigned long)msg_ring[i].arg);
sleep_till_anykey(1, 1);
}
lock = 0;
@@ -383,10 +392,14 @@ main(int argc, char **argv, char **envp)
wc_ces CodePage;
#endif
#endif
GC_init();
GC_INIT();
#if defined(ENABLE_NLS) || (defined(USE_M17N) && defined(HAVE_LANGINFO_CODESET))
setlocale(LC_ALL, "");
#endif
#ifdef ENABLE_NLS
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
#endif
#ifndef HAVE_SYS_ERRLIST
prepare_sys_errlist();
@@ -452,6 +465,7 @@ main(int argc, char **argv, char **envp)
SystemCharset = wc_guess_locale_charset(Locale, SystemCharset);
}
auto_detect = WcOption.auto_detect;
BookmarkCharset = DocumentCharset;
#endif
if (!non_null(HTTP_proxy) &&
@@ -724,8 +738,12 @@ main(int argc, char **argv, char **envp)
else if (!strcmp("-dummy", argv[i])) {
/* do nothing */
}
else if (!strcmp("-debug", argv[i]))
else if (!strcmp("-debug", argv[i])) {
w3m_debug = TRUE;
}
else if (!strcmp("-reqlog",argv[i])) {
w3m_reqlog=rcFile("request.log");
}
else {
usage();
}
@@ -745,6 +763,23 @@ main(int argc, char **argv, char **envp)
sock_init();
#endif
#ifdef __MINGW32_VERSION
{
int err;
WORD wVerReq;
wVerReq = MAKEWORD(1, 1);
err = WSAStartup(wVerReq, &WSAData);
if (err != 0)
{
fprintf(stderr, "Can't find winsock\n");
return 1;
}
_fmode = _O_BINARY;
}
#endif
FirstTab = NULL;
LastTab = NULL;
nTab = 0;
@@ -1081,24 +1116,32 @@ main(int argc, char **argv, char **envp)
}
#endif
#ifdef SIGWINCH
if (need_resize_screen) {
need_resize_screen = FALSE;
resize_screen();
}
mySignal(SIGWINCH, resize_handler);
mySignal(SIGWINCH, resize_hook);
#endif
#ifdef USE_IMAGE
if (activeImage && displayImage && Currentbuf->img &&
!Currentbuf->image_loaded) {
do {
#ifdef SIGWINCH
if (need_resize_screen)
resize_screen();
#endif
loadImage(Currentbuf, IMG_FLAG_NEXT);
} while (sleep_till_anykey(1, 0) <= 0);
}
#ifdef SIGWINCH
else
#endif
#endif
#ifdef SIGWINCH
{
do {
if (need_resize_screen)
resize_screen();
} while (sleep_till_anykey(1, 0) <= 0);
}
#endif
c = getch();
#ifdef SIGWINCH
mySignal(SIGWINCH, resize_hook);
#endif
#ifdef USE_ALARM
if (CurrentAlarm->sec > 0) {
alarm(0);
@@ -1109,10 +1152,18 @@ main(int argc, char **argv, char **envp)
mouse_inactive();
#endif /* USE_MOUSE */
if (IS_ASCII(c)) { /* Ascii */
if (((prec_num && c == '0') || '1' <= c) && (c <= '9')) {
prec_num = prec_num * 10 + (int)(c - '0');
if (prec_num > PREC_LIMIT)
prec_num = PREC_LIMIT;
if( vi_prec_num ){
if(((prec_num && c == '0') || '1' <= c) && (c <= '9')) {
prec_num = prec_num * 10 + (int)(c - '0');
if (prec_num > PREC_LIMIT)
prec_num = PREC_LIMIT;
}
else {
set_buffer_environ(Currentbuf);
save_buffer_position(Currentbuf);
keyPressEventProc((int)c);
prec_num = 0;
}
}
else {
set_buffer_environ(Currentbuf);
@@ -1416,17 +1467,10 @@ resize_hook(SIGNAL_ARG)
SIGNAL_RETURN;
}
static MySignalHandler
resize_handler(SIGNAL_ARG)
{
resize_screen();
mySignal(SIGWINCH, resize_handler);
SIGNAL_RETURN;
}
static void
resize_screen(void)
{
need_resize_screen = FALSE;
setlinescols();
setupscreen();
if (CurrentTab)
@@ -1450,9 +1494,6 @@ SigPipe(SIGNAL_ARG)
* Command functions: These functions are called with a keystroke.
*/
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
static void
nscroll(int n, int mode)
{
@@ -1963,6 +2004,7 @@ DEFUN(pipeBuf, PIPE_BUF, "Send rendered document to pipe")
buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
if (buf->type == NULL)
buf->type = "text/plain";
buf->currentURL.file = "-";
pushBuffer(buf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
@@ -4110,25 +4152,20 @@ DEFUN(adBmark, ADD_BOOKMARK, "Add current page to bookmark")
Str tmp;
FormList *request;
tmp = Sprintf("mode=panel&cookie=%s&bmark=%s&url=%s&title=%s",
tmp = Sprintf("mode=panel&cookie=%s&bmark=%s&url=%s&title=%s"
#ifdef USE_M17N
"&charset=%s"
#endif
,
(Str_form_quote(localCookie()))->ptr,
(Str_form_quote(Strnew_charp(BookmarkFile)))->ptr,
(Str_form_quote(parsedURL2Str(&Currentbuf->currentURL)))->
ptr,
#ifdef USE_M17N
#if LANG == JA
/* FIXME: why WC_CES_EUC_JP hardcoded?
* backward compatibility.
* w3mbookmark takes arguments as EUC-JP only?
*/
(Str_form_quote(wc_conv_strict(Currentbuf->buffername,
InnerCharset,
WC_CES_EUC_JP)))->ptr);
#else
(Str_form_quote(wc_conv_strict(Currentbuf->buffername,
InnerCharset,
SystemCharset)))->ptr);
#endif
BookmarkCharset)))->ptr,
wc_ces_to_charset(BookmarkCharset));
#else
(Str_form_quote(Strnew_charp(Currentbuf->buffername)))->ptr);
#endif
@@ -4680,8 +4717,10 @@ DEFUN(reload, RELOAD, "Reload buffer")
buf->linkBuffer[LB_N_FRAME] = fbuf;
pushBuffer(buf);
Currentbuf = buf;
if (Currentbuf->firstLine)
if (Currentbuf->firstLine) {
COPY_BUFROOT(Currentbuf, &sbuf);
restorePosition(Currentbuf, &sbuf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
return;
}
@@ -4746,8 +4785,10 @@ DEFUN(reload, RELOAD, "Reload buffer")
}
Currentbuf->search_header = sbuf.search_header;
Currentbuf->form_submit = sbuf.form_submit;
if (Currentbuf->firstLine)
if (Currentbuf->firstLine) {
COPY_BUFROOT(Currentbuf, &sbuf);
restorePosition(Currentbuf, &sbuf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
@@ -5178,6 +5219,9 @@ do_mouse_action(int btn, int x, int y)
cursorXY(Currentbuf, cx, cy);
}
}
else {
return;
}
if (!(map && map->func))
map = &mouse_action.default_map[btn];
if (map && map->func) {
@@ -5323,7 +5367,7 @@ DEFUN(mouse, MOUSE, "mouse operation")
int btn, x, y;
btn = (unsigned char)getch() - 32;
#if defined(__CYGWIN__)
#if defined(__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005
if (cygwin_mouse_btn_swapped) {
if (btn == MOUSE_BTN2_DOWN)
btn = MOUSE_BTN3_DOWN;
@@ -5674,7 +5718,7 @@ searchKeyNum(void)
static char *
getCodePage(void)
{
ULONG CpList[8], CpSize;
unsigned long CpList[8], CpSize;
if (!getenv("WINDOWID") && !DosQueryCp(sizeof(CpList), CpList, &CpSize))
return Sprintf("CP%d", *CpList)->ptr;
@@ -5714,6 +5758,9 @@ w3m_exit(int i)
disconnectFTP();
#ifdef USE_NNTP
disconnectNews();
#endif
#ifdef __MINGW32_VERSION
WSACleanup();
#endif
exit(i);
}
@@ -6133,7 +6180,7 @@ DEFUN(prevT, PREV_TAB, "Move to previous tab")
displayBuffer(Currentbuf, B_REDRAW_IMAGE);
}
void
static void
followTab(TabBuffer * tab)
{
Buffer *buf;
@@ -6235,7 +6282,7 @@ DEFUN(tabrURL, TAB_GOTO_RELATIVE, "Open relative URL on new tab")
"Goto relative URL on new tab: ", TRUE);
}
void
static void
moveTab(TabBuffer * t, TabBuffer * t2, int right)
{
if (t2 == NO_TABBUFFER)
@@ -6439,7 +6486,9 @@ download_action(struct parsed_tagarg *arg)
for (; arg; arg = arg->next) {
if (!strncmp(arg->arg, "stop", 4)) {
pid = (pid_t) atoi(&arg->arg[4]);
#ifndef __MINGW32_VERSION
kill(pid, SIGKILL);
#endif
}
else if (!strncmp(arg->arg, "ok", 2))
pid = (pid_t) atoi(&arg->arg[2]);
@@ -6473,7 +6522,9 @@ stopDownload(void)
for (d = FirstDL; d != NULL; d = d->next) {
if (d->ok)
continue;
#ifndef __MINGW32_VERSION
kill(d->pid, SIGKILL);
#endif
unlink(d->lock);
}
}
@@ -6511,8 +6562,10 @@ DEFUN(ldDL, DOWNLOAD_LIST, "Display download list panel")
return;
}
buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
if (replace)
if (replace) {
COPY_BUFROOT(buf, Currentbuf);
restorePosition(buf, Currentbuf);
}
if (!replace && open_tab_dl_list) {
_newT();
new_tab = TRUE;
+4 -4
View File
@@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.41 2004/03/23 16:44:02 ukai Exp $ */
/* $Id: menu.c,v 1.46 2007/05/23 12:34:20 inu Exp $ */
/*
* w3m menu.c
*/
@@ -1183,7 +1183,7 @@ mMouse(char c)
int btn, x, y;
btn = (unsigned char)getch() - 32;
#if defined(__CYGWIN__)
#if defined(__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005
if (cygwin_mouse_btn_swapped) {
if (btn == MOUSE_BTN2_DOWN)
btn = MOUSE_BTN3_DOWN;
@@ -1711,13 +1711,13 @@ initMenu(void)
#ifdef USE_M17N
if (!MainMenuEncode) {
MenuItem *item;
#if ENABLE_NLS
#ifdef ENABLE_NLS
/* FIXME: charset that gettext(3) returns */
MainMenuCharset = SystemCharset;
#endif
for (item = MainMenuItem; item->type != MENU_END; item++)
item->label =
wc_conv(gettext(item->label), MainMenuCharset,
wc_conv(_(item->label), MainMenuCharset,
InnerCharset)->ptr;
MainMenuEncode = TRUE;
}
+2 -1
View File
@@ -1,4 +1,4 @@
/* $Id: mktable.c,v 1.14 2003/09/22 21:02:20 ukai Exp $ */
/* $Id: mktable.c,v 1.15 2007/05/31 01:19:50 inu Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include "myctype.h"
@@ -36,6 +36,7 @@ main(int argc, char *argv[], char **envp)
char *p;
Hash_hss_i *rhash;
GC_INIT();
if (argc != 3) {
fprintf(stderr, "usage: %s hashsize file.tab > file.c\n", argv[0]);
exit(1);
+29 -8
View File
@@ -1,4 +1,4 @@
/* $Id: parsetagx.c,v 1.14 2003/02/05 16:44:00 ukai Exp $ */
/* $Id: parsetagx.c,v 1.18 2006/06/07 03:52:03 inu Exp $ */
#include "fm.h"
#include "myctype.h"
#include "indep.h"
@@ -159,7 +159,7 @@ parse_tag(char **s, int internal)
/* Parse tag arguments */
SKIP_BLANKS(q);
while (1) {
Str value = NULL;
Str value = NULL, value_tmp = NULL;
if (*q == '>' || *q == '\0')
goto done_parse_tag;
p = attrname;
@@ -174,14 +174,13 @@ parse_tag(char **s, int internal)
SKIP_BLANKS(q);
if (*q == '=') {
/* get value */
value = Strnew();
value_tmp = Strnew();
q++;
SKIP_BLANKS(q);
if (*q == '"') {
q++;
while (*q && *q != '"') {
if (*q != '\n')
Strcat_char(value, *q);
Strcat_char(value_tmp, *q);
if (!tag->need_reconstruct && is_html_quote(*q))
tag->need_reconstruct = TRUE;
q++;
@@ -192,8 +191,7 @@ parse_tag(char **s, int internal)
else if (*q == '\'') {
q++;
while (*q && *q != '\'') {
if (*q != '\n')
Strcat_char(value, *q);
Strcat_char(value_tmp, *q);
if (!tag->need_reconstruct && is_html_quote(*q))
tag->need_reconstruct = TRUE;
q++;
@@ -203,7 +201,7 @@ parse_tag(char **s, int internal)
}
else if (*q) {
while (*q && !IS_SPACE(*q) && *q != '>') {
Strcat_char(value, *q);
Strcat_char(value_tmp, *q);
if (!tag->need_reconstruct && is_html_quote(*q))
tag->need_reconstruct = TRUE;
q++;
@@ -218,6 +216,29 @@ parse_tag(char **s, int internal)
break;
}
}
if (value_tmp) {
int j, hidden=FALSE;
for (j=0; j<i; j++) {
if (tag->attrid[j] == ATTR_TYPE &&
strcmp("hidden",tag->value[j]) == 0) {
hidden=TRUE;
break;
}
}
if ((tag_id == HTML_INPUT || tag_id == HTML_INPUT_ALT) &&
attr_id == ATTR_VALUE && hidden) {
value = value_tmp;
} else {
char *x;
value = Strnew();
for (x = value_tmp->ptr; *x; x++) {
if (*x != '\n')
Strcat_char(value, *x);
}
}
}
if (i != nattr) {
if (!internal &&
((AttrMAP[attr_id].flag & AFLG_INT) ||
+1
View File
@@ -20,6 +20,7 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
+1 -1
View File
@@ -34,7 +34,7 @@ COPYRIGHT_HOLDER = Fumitoshi UKAI
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = ukai@debian.or.jp
MSGID_BUGS_ADDRESS = satodai@w3m.jp
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
+153 -89
View File
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: w3m 0.5.1\n"
"Report-Msgid-Bugs-To: ukai@debian.or.jp\n"
"POT-Creation-Date: 2004-04-29 03:17+0900\n"
"PO-Revision-Date: 2003-09-26 03:35+0900\n"
"Project-Id-Version: w3m 0.5.2\n"
"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
"POT-Creation-Date: 2007-05-07 10:49+0900\n"
"PO-Revision-Date: 2007-05-07 10:52+0900\n"
"Last-Translator: Fumitoshi UKAI <ukai@debian.or.jp>\n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
@@ -202,8 +202,8 @@ msgid "Fold lines in TEXTAREA"
msgstr "TEXTAREA の行を折り返して表示"
#: rc.c:90
msgid "Display DEL, S and STRIKE element"
msgstr "DEL, S, STRIKE Í×ÁÇ¤ÎÆâÍÆ¤òɽ¼¨¤¹¤ë"
msgid "Display INS, DEL, S and STRIKE element"
msgstr "INS, DEL, S, STRIKE 要素の表示"
#: rc.c:91
msgid "Display with color"
@@ -429,331 +429,395 @@ msgstr "
msgid "Display unseen objects (e.g. bgimage tag)"
msgstr "背景画像等へのリンクを作る"
#: rc.c:156
#: rc.c:155
msgid "Uncompress compressed data automatically when downloading"
msgstr "ダウンロード時に自動的に圧縮されたデータを解凍する"
#: rc.c:157
msgid "Run external viewer in a separate session"
msgstr "外部ビューアを別セッションで動かす"
#: rc.c:158
#: rc.c:159
msgid "Run external viewer in the background"
msgstr "外部ビューアをバックグラウンドで動かす"
#: rc.c:160
#: rc.c:161
msgid "Use external program for directory listing"
msgstr "ディレクトリリストに外部コマンドを使う"
#: rc.c:161
#: rc.c:162
msgid "URL of directory listing command"
msgstr "ディレクトリリスト用コマンド"
#: rc.c:163
#: rc.c:164
msgid "Enable dictionary lookup through CGI"
msgstr "辞書引きをCGI経由でおこなう"
#: rc.c:164
#: rc.c:165
msgid "URL of dictionary lookup command"
msgstr "辞書引きコマンドのURL"
#: rc.c:166
#: rc.c:167
msgid "Display link name for images lacking ALT"
msgstr "空のIMG ALT属性の時にリンク名を表示する"
#: rc.c:167
#: rc.c:168
msgid "Index file for directories"
msgstr "各ディレクトリのインデックスファイル"
#: rc.c:168
#: rc.c:169
msgid "Prepend http:// to URL automatically"
msgstr "URLに自動的に http:// を補う"
#: rc.c:169
#: rc.c:170
msgid "Default value for open-URL command"
msgstr "URLを開く時のデフォルト文字列"
#: rc.c:170
#: rc.c:171
msgid "Decode Content-Transfer-Encoding when saving"
msgstr "保存時に Content-Transfer-Encoding をデコードする"
#: rc.c:171
#: rc.c:172
msgid "Preserve timestamp when saving"
msgstr "保存時にタイムスタンプを保持する"
#: rc.c:173
#: rc.c:174
msgid "Enable mouse"
msgstr "マウスを使う"
#: rc.c:174
#: rc.c:175
msgid "Scroll in reverse direction of mouse drag"
msgstr "マウスのドラッグ動作を逆にする"
#: rc.c:175
#: rc.c:176
msgid "Behavior of wheel scroll speed"
msgstr "ホイールでのスクロール速度の扱い"
#: rc.c:176
#: rc.c:177
msgid "(A only)Scroll by # (%) of screen"
msgstr "(Aのみ)画面の何%スクロールするか"
#: rc.c:177
#: rc.c:178
msgid "(B only)Scroll by # lines"
msgstr "(Bのみ)スクロールする行数"
#: rc.c:179
#: rc.c:180
msgid "Free memory of undisplayed buffers"
msgstr "表示されていないバッファのメモリを解放する"
#: rc.c:180
#: rc.c:181
msgid "Suppress `Referer:' header"
msgstr "Referer: を送らないようにする"
#: rc.c:181
#: rc.c:182
msgid "Search case-insensitively"
msgstr "サーチ時に大文字小文字の区別をしない"
#: rc.c:182
#: rc.c:183
msgid "Use LESSOPEN"
msgstr "LESSOPENを使用"
#: rc.c:185
#: rc.c:186
msgid "Perform SSL server verification"
msgstr "SSLのサーバ認証を行う"
#: rc.c:186
#: rc.c:187
msgid "PEM encoded certificate file of client"
msgstr "SSLのクライアント用PEM形式証明書ファイル"
#: rc.c:187
#: rc.c:188
msgid "PEM encoded private key file of client"
msgstr "SSLのクライアント用PEM形式秘密鍵ファイル"
#: rc.c:188
#: rc.c:189
msgid "Path to directory for PEM encoded certificates of CAs"
msgstr "SSLの認証局のPEM形式証明書群のあるディレクトリへのパス"
#: rc.c:189
#: rc.c:190
msgid "File consisting of PEM encoded certificates of CAs"
msgstr "SSLの認証局のPEM形式証明書群のファイル"
#: rc.c:191
#: rc.c:192
msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
msgstr "使わないSSLメソッドのリスト(2: SSLv2, 3: SSLv3, t:TLSv1)"
#: rc.c:194
#: rc.c:195
msgid "Enable cookie processing"
msgstr "クッキーを使用する"
#: rc.c:195
#: rc.c:196
msgid "Print a message when receiving a cookie"
msgstr "クッキーを受け付けたときにメッセージを表示する"
#: rc.c:197
msgid "Accept cookies"
msgstr "クッキーを受け付ける"
#: rc.c:196
#: rc.c:198
msgid "Action to be taken on invalid cookie"
msgstr "問題のあるクッキーでも受け付ける"
#: rc.c:197
#: rc.c:199
msgid "Domains to reject cookies from"
msgstr "クッキーを受け付けないドメイン"
#: rc.c:198
#: rc.c:200
msgid "Domains to accept cookies from"
msgstr "クッキーを受け付けるドメイン"
#: rc.c:200
#: rc.c:202
msgid "Number of redirections to follow"
msgstr "従うリダイレクトの回数"
#: rc.c:201
#: rc.c:203
msgid "Enable processing of meta-refresh tag"
msgstr "meta refresh に対応する"
#: rc.c:204
#: rc.c:206
msgid "Enable Migemo (Roma-ji search)"
msgstr "Migemo(ローマ字検索)を使用する"
#: rc.c:205
#: rc.c:207
msgid "Migemo command"
msgstr "Migemoコマンド"
#: rc.c:209
#: rc.c:211
msgid "Display charset"
msgstr "表示用文字コード"
#: rc.c:210
#: rc.c:212
msgid "Default document charset"
msgstr "文書の標準の文字コード"
#: rc.c:211
#: rc.c:213
msgid "Automatic charset detect when loading"
msgstr "文書の読み込み時に文字コードの自動判定を行う"
#: rc.c:212
#: rc.c:214
msgid "System charset"
msgstr "システムの文字コード"
#: rc.c:213
#: rc.c:215
msgid "System charset follows locale(LC_CTYPE)"
msgstr "Locale(LC_CTYPE) に従ってシステムの文字コードを設定"
#: rc.c:214
#: rc.c:216
msgid "Output halfdump with display charset"
msgstr "表示用文字コードで halfdump の出力を行う"
#: rc.c:215
#: rc.c:217
msgid "Use multi column characters"
msgstr "複数カラムの文字を使う"
#: rc.c:216
#: rc.c:218
msgid "Use combining characters"
msgstr "結合文字を使う"
#: rc.c:217
#: rc.c:219
msgid "Use Unicode language tags"
msgstr "Unicode の言語タグを使う"
#: rc.c:218
#: rc.c:220
msgid "Charset conversion using Unicode map"
msgstr "Unicodeを介したコード変換"
#: rc.c:219
#: rc.c:221
msgid "Charset conversion when loading"
msgstr "文書の読み込み時に文字コードを変換する"
#: rc.c:220
#: rc.c:222
msgid "Adjust search string for document charset"
msgstr "検索文字列を文書の文字コードに変換する"
#: rc.c:221
#: rc.c:223
msgid "Fix character width when conversion"
msgstr "文字幅の変わる変換をしない"
#: rc.c:222
#: rc.c:224
msgid "Use GB 12345 Unicode map instead of GB 2312's"
msgstr "GB 12345 の Unicode マップを GB 2312 用に使う"
#: rc.c:223
#: rc.c:225
msgid "Use JIS X 0201 Roman for ISO-2022-JP"
msgstr "ISO-2022-JP で JIS X 0201-Roman を使う"
#: rc.c:224
#: rc.c:226
msgid "Use JIS C 6226:1978 for ISO-2022-JP"
msgstr "ISO-2022-JP で JIS C 6226:1978(旧JIS) を使う"
#: rc.c:225
#: rc.c:227
msgid "Use JIS X 0201 Katakana"
msgstr "JIS X 0201-Katakana を使う"
#: rc.c:226
#: rc.c:228
msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
msgstr "JIS X 0212:1990(補助漢字) を使う"
#: rc.c:227
#: rc.c:229
msgid "Use JIS X 0213:2000 (2000JIS)"
msgstr "JIS X 0213:2000(2000JIS) を使う"
#: rc.c:228
#: rc.c:230
msgid "Strict ISO-2022-JP/KR/CN"
msgstr "厳格な ISO-2022-JP/KR/CN を使う"
#: rc.c:229
#: rc.c:231
msgid "Treat 4 bytes char. of GB18030 as Unicode"
msgstr "GB18030 の 4バイト文字を Unicode として扱う"
#: rc.c:232
#: rc.c:234
msgid "keymap file"
msgstr "keymapファイル"
#: rc.c:249
#: rc.c:251
msgid "black"
msgstr "黒"
#: rc.c:250
#: rc.c:252
msgid "red"
msgstr "赤"
#: rc.c:251
#: rc.c:253
msgid "green"
msgstr "緑"
#: rc.c:252
#: rc.c:254
msgid "yellow"
msgstr "黄"
#: rc.c:253
#: rc.c:255
msgid "blue"
msgstr "青"
#: rc.c:254
#: rc.c:256
msgid "magenta"
msgstr "紫"
#: rc.c:255
#: rc.c:257
msgid "cyan"
msgstr "空色"
#: rc.c:256
#: rc.c:258
msgid "white"
msgstr "白"
#: rc.c:257
#: rc.c:259
msgid "terminal"
msgstr "端末"
#: rc.c:276
#: rc.c:278
msgid "none"
msgstr "無し"
#: rc.c:277
#: rc.c:279
msgid "current URL"
msgstr "現在のURL"
#: rc.c:278
#: rc.c:280
msgid "link URL"
msgstr "リンク先のURL"
#: rc.c:284
#: rc.c:285
msgid "simple"
msgstr "シンプル"
#: rc.c:286
msgid "use tag"
msgstr "タグで表示"
#: rc.c:287
msgid "fontify"
msgstr "文字装飾"
#: rc.c:293
msgid "A:relative to screen height"
msgstr "A:画面サイズに比例"
#: rc.c:285
#: rc.c:294
msgid "B:fixed speed"
msgstr "B:一定の行数"
#: rc.c:666
#: rc.c:301
msgid "unspecified"
msgstr "指定しない"
#: rc.c:302
msgid "inet inet6"
msgstr "IPv4優先"
#: rc.c:303
msgid "inet6 inet"
msgstr "IPv6優先"
#: rc.c:304
msgid "inet only"
msgstr "IPv4のみ"
#: rc.c:305
msgid "inet6 only"
msgstr "IPv6のみ"
#: rc.c:312
msgid "discard"
msgstr "破棄する"
#: rc.c:314
msgid "accept"
msgstr "受け入れる"
#: rc.c:316
msgid "ask"
msgstr "確認する"
#: rc.c:326
msgid "OFF"
msgstr "無効"
#: rc.c:327
msgid "Only ISO 2022"
msgstr "ISO 2022 のみ"
#: rc.c:328
msgid "ON"
msgstr "有効"
#: rc.c:679
msgid "Display Settings"
msgstr "表示関係"
#: rc.c:668
#: rc.c:681
msgid "Color Settings"
msgstr "表示色"
#: rc.c:670
#: rc.c:683
msgid "Miscellaneous Settings"
msgstr "雑多な設定"
#: rc.c:671
#: rc.c:684
msgid "Directory Settings"
msgstr "ディレクトリ設定"
#: rc.c:672
#: rc.c:685
msgid "External Program Settings"
msgstr "外部プログラム"
#: rc.c:673
#: rc.c:686
msgid "Network Settings"
msgstr "ネットワークの設定"
#: rc.c:674
#: rc.c:687
msgid "Proxy Settings"
msgstr "プロキシの設定"
#: rc.c:676
#: rc.c:689
msgid "SSL Settings"
msgstr "SSLの設定"
#: rc.c:679
#: rc.c:692
msgid "Cookie Settings"
msgstr "クッキーの設定"
#: rc.c:682
#: rc.c:695
msgid "Charset Settings"
msgstr "文字コードの設定"
@@ -762,6 +826,6 @@ msgstr "ʸ
#. * header. For example, ja.po should translate it as
#. * "ja;q=1.0, en;q=0.5" like that.
#.
#: rc.c:1150
#: rc.c:1163
msgid "en;q=1.0"
msgstr "ja;q=1.0, en;q=0.5"
+159 -95
View File
@@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: ukai@debian.or.jp\n"
"POT-Creation-Date: 2004-04-29 03:17+0900\n"
"Report-Msgid-Bugs-To: satodai@w3m.jp\n"
"POT-Creation-Date: 2007-05-28 19:49+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -201,7 +201,7 @@ msgid "Fold lines in TEXTAREA"
msgstr ""
#: rc.c:90
msgid "Display DEL, S and STRIKE element"
msgid "Display INS, DEL, S and STRIKE element"
msgstr ""
#: rc.c:91
@@ -428,331 +428,395 @@ msgstr ""
msgid "Display unseen objects (e.g. bgimage tag)"
msgstr ""
#: rc.c:156
#: rc.c:155
msgid "Uncompress compressed data automatically when downloading"
msgstr ""
#: rc.c:157
msgid "Run external viewer in a separate session"
msgstr ""
#: rc.c:158
#: rc.c:159
msgid "Run external viewer in the background"
msgstr ""
#: rc.c:160
#: rc.c:161
msgid "Use external program for directory listing"
msgstr ""
#: rc.c:161
#: rc.c:162
msgid "URL of directory listing command"
msgstr ""
#: rc.c:163
#: rc.c:164
msgid "Enable dictionary lookup through CGI"
msgstr ""
#: rc.c:164
#: rc.c:165
msgid "URL of dictionary lookup command"
msgstr ""
#: rc.c:166
#: rc.c:167
msgid "Display link name for images lacking ALT"
msgstr ""
#: rc.c:167
#: rc.c:168
msgid "Index file for directories"
msgstr ""
#: rc.c:168
#: rc.c:169
msgid "Prepend http:// to URL automatically"
msgstr ""
#: rc.c:169
#: rc.c:170
msgid "Default value for open-URL command"
msgstr ""
#: rc.c:170
#: rc.c:171
msgid "Decode Content-Transfer-Encoding when saving"
msgstr ""
#: rc.c:171
#: rc.c:172
msgid "Preserve timestamp when saving"
msgstr ""
#: rc.c:173
#: rc.c:174
msgid "Enable mouse"
msgstr ""
#: rc.c:174
#: rc.c:175
msgid "Scroll in reverse direction of mouse drag"
msgstr ""
#: rc.c:175
#: rc.c:176
msgid "Behavior of wheel scroll speed"
msgstr ""
#: rc.c:176
#: rc.c:177
msgid "(A only)Scroll by # (%) of screen"
msgstr ""
#: rc.c:177
#: rc.c:178
msgid "(B only)Scroll by # lines"
msgstr ""
#: rc.c:179
#: rc.c:180
msgid "Free memory of undisplayed buffers"
msgstr ""
#: rc.c:180
#: rc.c:181
msgid "Suppress `Referer:' header"
msgstr ""
#: rc.c:181
#: rc.c:182
msgid "Search case-insensitively"
msgstr ""
#: rc.c:182
#: rc.c:183
msgid "Use LESSOPEN"
msgstr ""
#: rc.c:185
#: rc.c:186
msgid "Perform SSL server verification"
msgstr ""
#: rc.c:186
#: rc.c:187
msgid "PEM encoded certificate file of client"
msgstr ""
#: rc.c:187
#: rc.c:188
msgid "PEM encoded private key file of client"
msgstr ""
#: rc.c:188
#: rc.c:189
msgid "Path to directory for PEM encoded certificates of CAs"
msgstr ""
#: rc.c:189
#: rc.c:190
msgid "File consisting of PEM encoded certificates of CAs"
msgstr ""
#: rc.c:191
#: rc.c:192
msgid "List of forbidden SSL methods (2: SSLv2, 3: SSLv3, t:TLSv1)"
msgstr ""
#: rc.c:194
#: rc.c:195
msgid "Enable cookie processing"
msgstr ""
#: rc.c:195
msgid "Accept cookies"
msgstr ""
#: rc.c:196
msgid "Action to be taken on invalid cookie"
msgid "Print a message when receiving a cookie"
msgstr ""
#: rc.c:197
msgid "Domains to reject cookies from"
msgid "Accept cookies"
msgstr ""
#: rc.c:198
msgid "Domains to accept cookies from"
msgid "Action to be taken on invalid cookie"
msgstr ""
#: rc.c:199
msgid "Domains to reject cookies from"
msgstr ""
#: rc.c:200
msgid "Domains to accept cookies from"
msgstr ""
#: rc.c:202
msgid "Number of redirections to follow"
msgstr ""
#: rc.c:201
#: rc.c:203
msgid "Enable processing of meta-refresh tag"
msgstr ""
#: rc.c:204
#: rc.c:206
msgid "Enable Migemo (Roma-ji search)"
msgstr ""
#: rc.c:205
#: rc.c:207
msgid "Migemo command"
msgstr ""
#: rc.c:209
#: rc.c:211
msgid "Display charset"
msgstr ""
#: rc.c:210
#: rc.c:212
msgid "Default document charset"
msgstr ""
#: rc.c:211
#: rc.c:213
msgid "Automatic charset detect when loading"
msgstr ""
#: rc.c:212
#: rc.c:214
msgid "System charset"
msgstr ""
#: rc.c:213
#: rc.c:215
msgid "System charset follows locale(LC_CTYPE)"
msgstr ""
#: rc.c:214
#: rc.c:216
msgid "Output halfdump with display charset"
msgstr ""
#: rc.c:215
#: rc.c:217
msgid "Use multi column characters"
msgstr ""
#: rc.c:216
#: rc.c:218
msgid "Use combining characters"
msgstr ""
#: rc.c:217
#: rc.c:219
msgid "Use Unicode language tags"
msgstr ""
#: rc.c:218
#: rc.c:220
msgid "Charset conversion using Unicode map"
msgstr ""
#: rc.c:219
#: rc.c:221
msgid "Charset conversion when loading"
msgstr ""
#: rc.c:220
#: rc.c:222
msgid "Adjust search string for document charset"
msgstr ""
#: rc.c:221
#: rc.c:223
msgid "Fix character width when conversion"
msgstr ""
#: rc.c:222
#: rc.c:224
msgid "Use GB 12345 Unicode map instead of GB 2312's"
msgstr ""
#: rc.c:223
#: rc.c:225
msgid "Use JIS X 0201 Roman for ISO-2022-JP"
msgstr ""
#: rc.c:224
#: rc.c:226
msgid "Use JIS C 6226:1978 for ISO-2022-JP"
msgstr ""
#: rc.c:225
#: rc.c:227
msgid "Use JIS X 0201 Katakana"
msgstr ""
#: rc.c:226
#: rc.c:228
msgid "Use JIS X 0212:1990 (Supplemental Kanji)"
msgstr ""
#: rc.c:227
#: rc.c:229
msgid "Use JIS X 0213:2000 (2000JIS)"
msgstr ""
#: rc.c:228
#: rc.c:230
msgid "Strict ISO-2022-JP/KR/CN"
msgstr ""
#: rc.c:229
#: rc.c:231
msgid "Treat 4 bytes char. of GB18030 as Unicode"
msgstr ""
#: rc.c:232
#: rc.c:234
msgid "keymap file"
msgstr ""
#: rc.c:249
#: rc.c:251
msgid "black"
msgstr ""
#: rc.c:250
#: rc.c:252
msgid "red"
msgstr ""
#: rc.c:251
#: rc.c:253
msgid "green"
msgstr ""
#: rc.c:252
#: rc.c:254
msgid "yellow"
msgstr ""
#: rc.c:253
#: rc.c:255
msgid "blue"
msgstr ""
#: rc.c:254
#: rc.c:256
msgid "magenta"
msgstr ""
#: rc.c:255
#: rc.c:257
msgid "cyan"
msgstr ""
#: rc.c:256
#: rc.c:258
msgid "white"
msgstr ""
#: rc.c:257
#: rc.c:259
msgid "terminal"
msgstr ""
#: rc.c:276
#: rc.c:278
msgid "none"
msgstr ""
#: rc.c:277
#: rc.c:279
msgid "current URL"
msgstr ""
#: rc.c:278
#: rc.c:280
msgid "link URL"
msgstr ""
#: rc.c:284
#: rc.c:285
msgid "simple"
msgstr ""
#: rc.c:286
msgid "use tag"
msgstr ""
#: rc.c:287
msgid "fontify"
msgstr ""
#: rc.c:293
msgid "A:relative to screen height"
msgstr ""
#: rc.c:285
#: rc.c:294
msgid "B:fixed speed"
msgstr ""
#: rc.c:666
msgid "Display Settings"
#: rc.c:301
msgid "unspecified"
msgstr ""
#: rc.c:668
msgid "Color Settings"
#: rc.c:302
msgid "inet inet6"
msgstr ""
#: rc.c:670
msgid "Miscellaneous Settings"
#: rc.c:303
msgid "inet6 inet"
msgstr ""
#: rc.c:671
msgid "Directory Settings"
#: rc.c:304
msgid "inet only"
msgstr ""
#: rc.c:672
msgid "External Program Settings"
#: rc.c:305
msgid "inet6 only"
msgstr ""
#: rc.c:673
msgid "Network Settings"
#: rc.c:312
msgid "discard"
msgstr ""
#: rc.c:674
msgid "Proxy Settings"
#: rc.c:314
msgid "accept"
msgstr ""
#: rc.c:676
msgid "SSL Settings"
#: rc.c:316
msgid "ask"
msgstr ""
#: rc.c:326
msgid "OFF"
msgstr ""
#: rc.c:327
msgid "Only ISO 2022"
msgstr ""
#: rc.c:328
msgid "ON"
msgstr ""
#: rc.c:679
msgid "Display Settings"
msgstr ""
#: rc.c:681
msgid "Color Settings"
msgstr ""
#: rc.c:683
msgid "Miscellaneous Settings"
msgstr ""
#: rc.c:684
msgid "Directory Settings"
msgstr ""
#: rc.c:685
msgid "External Program Settings"
msgstr ""
#: rc.c:686
msgid "Network Settings"
msgstr ""
#: rc.c:687
msgid "Proxy Settings"
msgstr ""
#: rc.c:689
msgid "SSL Settings"
msgstr ""
#: rc.c:692
msgid "Cookie Settings"
msgstr ""
#: rc.c:682
#: rc.c:695
msgid "Charset Settings"
msgstr ""
@@ -761,6 +825,6 @@ msgstr ""
#. * header. For example, ja.po should translate it as
#. * "ja;q=1.0, en;q=0.5" like that.
#.
#: rc.c:1150
#: rc.c:1169
msgid "en;q=1.0"
msgstr ""
+1 -1
View File
@@ -1,4 +1,4 @@
/* $Id: proto.h,v 1.99 2004/04/16 18:47:19 ukai Exp $ */
/* $Id: proto.h,v 1.101 2006/04/07 13:21:12 inu Exp $ */
/*
* This file was automatically generated by version 1.7 of cextract.
* Manual editing not recommended.
+56 -25
View File
@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.96 2004/04/22 16:34:08 ukai Exp $ */
/* $Id: rc.c,v 1.106 2007/05/23 15:06:06 inu Exp $ */
/*
* Initialization file etc.
*/
@@ -87,7 +87,7 @@ static int OptionEncode = FALSE;
#define CMT_ALT_ENTITY N_("Use ASCII equivalents to display entities")
#define CMT_GRAPHIC_CHAR N_("Use graphic char for border of table and menu")
#define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA")
#define CMT_DISP_INS_DEL N_("Display DEL, S and STRIKE element")
#define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element")
#define CMT_COLOR N_("Display with color")
#define CMT_B_COLOR N_("Color of normal character")
#define CMT_A_COLOR N_("Color of anchor")
@@ -152,6 +152,7 @@ static int OptionEncode = FALSE;
#define CMT_MARK_ALL_PAGES N_("Treat URL-like strings as links in all pages")
#define CMT_WRAP N_("Wrap search")
#define CMT_VIEW_UNSEENOBJECTS N_("Display unseen objects (e.g. bgimage tag)")
#define CMT_AUTO_UNCOMPRESS N_("Uncompress compressed data automatically when downloading")
#ifdef __EMX__
#define CMT_BGEXTVIEW N_("Run external viewer in a separate session")
#else
@@ -192,6 +193,7 @@ static int OptionEncode = FALSE;
#endif /* USE_SSL */
#ifdef USE_COOKIE
#define CMT_USECOOKIE N_("Enable cookie processing")
#define CMT_SHOWCOOKIE N_("Print a message when receiving a cookie")
#define CMT_ACCEPTCOOKIE N_("Accept cookies")
#define CMT_ACCEPTBADCOOKIE N_("Action to be taken on invalid cookie")
#define CMT_COOKIE_REJECT_DOMAINS N_("Domains to reject cookies from")
@@ -279,6 +281,13 @@ static struct sel_c defaulturls[] = {
{0, NULL, NULL}
};
static struct sel_c displayinsdel[] = {
{N_S(DISPLAY_INS_DEL_SIMPLE), N_("simple")},
{N_S(DISPLAY_INS_DEL_NORMAL), N_("use tag")},
{N_S(DISPLAY_INS_DEL_FONTIFY), N_("fontify")},
{0, NULL, NULL}
};
#ifdef USE_MOUSE
static struct sel_c wheelmode[] = {
{TRUE, "1", N_("A:relative to screen height")},
@@ -289,22 +298,22 @@ static struct sel_c wheelmode[] = {
#ifdef INET6
static struct sel_c dnsorders[] = {
{N_S(DNS_ORDER_UNSPEC), "unspecified"},
{N_S(DNS_ORDER_INET_INET6), "inet inet6"},
{N_S(DNS_ORDER_INET6_INET), "inet6 inet"},
{N_S(DNS_ORDER_INET_ONLY), "inet only"},
{N_S(DNS_ORDER_INET6_ONLY), "inet6 only"},
{N_S(DNS_ORDER_UNSPEC), N_("unspecified")},
{N_S(DNS_ORDER_INET_INET6), N_("inet inet6")},
{N_S(DNS_ORDER_INET6_INET), N_("inet6 inet")},
{N_S(DNS_ORDER_INET_ONLY), N_("inet only")},
{N_S(DNS_ORDER_INET6_ONLY), N_("inet6 only")},
{0, NULL, NULL}
};
#endif /* INET6 */
#ifdef USE_COOKIE
static struct sel_c badcookiestr[] = {
{N_S(ACCEPT_BAD_COOKIE_DISCARD), "discard"},
{N_S(ACCEPT_BAD_COOKIE_DISCARD), N_("discard")},
#if 0
{N_S(ACCEPT_BAD_COOKIE_ACCEPT), "accept"},
{N_S(ACCEPT_BAD_COOKIE_ACCEPT), N_("accept")},
#endif
{N_S(ACCEPT_BAD_COOKIE_ASK), "ask"},
{N_S(ACCEPT_BAD_COOKIE_ASK), N_("ask")},
{0, NULL, NULL}
};
#endif /* USE_COOKIE */
@@ -314,9 +323,9 @@ static wc_ces_list *display_charset_str = NULL;
static wc_ces_list *document_charset_str = NULL;
static wc_ces_list *system_charset_str = NULL;
static struct sel_c auto_detect_str[] = {
{N_S(WC_OPT_DETECT_OFF), "OFF"},
{N_S(WC_OPT_DETECT_ISO_2022), "Only ISO 2022"},
{N_S(WC_OPT_DETECT_ON), "ON"},
{N_S(WC_OPT_DETECT_OFF), N_("OFF")},
{N_S(WC_OPT_DETECT_ISO_2022), N_("Only ISO 2022")},
{N_S(WC_OPT_DETECT_ON), N_("ON")},
{0, NULL, NULL}
};
#endif
@@ -359,8 +368,8 @@ struct param_ptr params1[] = {
CMT_GRAPHIC_CHAR, NULL},
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
CMT_FOLD_TEXTAREA, NULL},
{"display_ins_del", P_INT, PI_ONOFF, (void *)&displayInsDel,
CMT_DISP_INS_DEL, NULL},
{"display_ins_del", P_INT, PI_SEL_C, (void *)&displayInsDel,
CMT_DISP_INS_DEL, displayinsdel},
{"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt,
CMT_IGNORE_NULL_IMG_ALT, NULL},
{"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject,
@@ -468,6 +477,8 @@ struct param_ptr params3[] = {
NULL},
{"decode_cte", P_CHARINT, PI_ONOFF, (void *)&DecodeCTE, CMT_DECODE_CTE,
NULL},
{"auto_uncompress", P_CHARINT, PI_ONOFF, (void *)&AutoUncompress,
CMT_AUTO_UNCOMPRESS, NULL},
{"preserve_timestamp", P_CHARINT, PI_ONOFF, (void *)&PreserveTimestamp,
CMT_PRESERVE_TIMESTAMP, NULL},
{"keymap_file", P_STRING, PI_TEXT, (void *)&keymap_file, CMT_KEYMAP_FILE,
@@ -552,6 +563,8 @@ struct param_ptr params7[] = {
#ifdef USE_COOKIE
struct param_ptr params8[] = {
{"use_cookie", P_INT, PI_ONOFF, (void *)&use_cookie, CMT_USECOOKIE, NULL},
{"show_cookie", P_INT, PI_ONOFF, (void *)&show_cookie,
CMT_SHOWCOOKIE, NULL},
{"accept_cookie", P_INT, PI_ONOFF, (void *)&accept_cookie,
CMT_ACCEPTCOOKIE, NULL},
{"accept_bad_cookie", P_INT, PI_SEL_C, (void *)&accept_bad_cookie,
@@ -784,8 +797,10 @@ show_params(FILE * fp)
char *t = NULL;
char *cmt;
#if ENABLE_NLS
#ifdef USE_M17N
#ifdef ENABLE_NLS
OptionCharset = SystemCharset; /* FIXME */
#endif
#endif
fputs("\nconfiguration parameters\n", fp);
@@ -793,7 +808,7 @@ show_params(FILE * fp)
#ifdef USE_M17N
if (!OptionEncode)
cmt =
wc_conv(gettext(sections[j].name), OptionCharset,
wc_conv(_(sections[j].name), OptionCharset,
InnerCharset)->ptr;
else
#endif
@@ -839,7 +854,7 @@ show_params(FILE * fp)
}
#ifdef USE_M17N
if (!OptionEncode)
cmt = wc_conv(gettext(sections[j].params[i].comment),
cmt = wc_conv(_(sections[j].params[i].comment),
OptionCharset, InnerCharset)->ptr;
else
#endif
@@ -1111,7 +1126,11 @@ do_mkdir(const char *dir, long mode)
return mkdir(abs, mode);
}
#else /* not __EMX__ */
#ifdef __MINGW32_VERSION
#define do_mkdir(dir,mode) mkdir(dir)
#else
#define do_mkdir(dir,mode) mkdir(dir,mode)
#endif /* not __MINW32_VERSION */
#endif /* not __EMX__ */
void
@@ -1303,26 +1322,38 @@ load_option_panel(void)
if (optionpanel_str == NULL)
optionpanel_str = Sprintf(optionpanel_src1, w3m_version,
html_quote(localCookie()->ptr), CMT_HELPER);
#if ENABLE_NLS
html_quote(localCookie()->ptr), _(CMT_HELPER));
#ifdef USE_M17N
#ifdef ENABLE_NLS
OptionCharset = SystemCharset; /* FIXME */
#endif
#ifdef USE_M17N
if (!OptionEncode) {
optionpanel_str =
wc_Str_conv(optionpanel_str, OptionCharset, InnerCharset);
for (i = 0; sections[i].name != NULL; i++) {
sections[i].name =
wc_conv(gettext(sections[i].name), OptionCharset,
wc_conv(_(sections[i].name), OptionCharset,
InnerCharset)->ptr;
for (p = sections[i].params; p->name; p++)
for (p = sections[i].params; p->name; p++) {
p->comment =
wc_conv(gettext(p->comment), OptionCharset,
wc_conv(_(p->comment), OptionCharset,
InnerCharset)->ptr;
if (p->inputtype == PI_SEL_C
#ifdef USE_COLOR
&& p->select != colorstr
#endif
) {
for (s = (struct sel_c *)p->select; s->text != NULL; s++) {
s->text =
wc_conv(_(s->text), OptionCharset,
InnerCharset)->ptr;
}
}
}
}
#ifdef USE_COLOR
for (s = colorstr; s->text; s++)
s->text = wc_conv(gettext(s->text), OptionCharset,
s->text = wc_conv(_(s->text), OptionCharset,
InnerCharset)->ptr;
#endif
OptionEncode = TRUE;
+1
View File
@@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@
VPATH= $(srcdir):.
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
+1
View File
@@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@
VPATH= $(srcdir):.
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
+2 -1
View File
@@ -1,11 +1,12 @@
#!@PERL@
# $Id: w3mhelp.cgi.in,v 1.28 2004/03/22 17:03:13 ukai Exp $
# $Id: w3mhelp.cgi.in,v 1.29 2007/05/29 11:50:24 inu Exp $
if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) {
$CYGPATH = 1;
}
$prefix = "@prefix@";
$datarootdir = "@datarootdir@";
$helpdir = "@HELP_DIR@";
if ($CYGPATH) {
$helpdir = &cygwin_pathconv($helpdir);
+2 -1
View File
@@ -1,6 +1,6 @@
#!@PERL@
$rcsid = q$Id: w3mmail.cgi.in,v 1.13 2003/09/22 21:02:29 ukai Exp $;
$rcsid = q$Id: w3mmail.cgi.in,v 1.14 2004/08/30 16:32:24 ukai Exp $;
($id = $rcsid) =~ s/^.*,v ([\d\.]*).*/$1/;
($prog=$0) =~ s/.*\///;
@@ -180,6 +180,7 @@ if ($query =~ s/^\w+://) {
}
}
($cs,$cte,$body) = &lang_body($body, 1);
$body =~ s/\r//g;
print MAIL "Mime-Version: 1.0\n";
if ($boundary) {
print MAIL "Content-Type: multipart/form-data;\n";
+1
View File
@@ -8,6 +8,7 @@ top_srcdir=@top_srcdir@
VPATH= $(srcdir):.
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
+9 -2
View File
@@ -1,4 +1,4 @@
.TH W3MMAN 1 "Mar 14, 2002"
.TH W3MMAN 1 "Nov 5, 2005"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -19,6 +19,9 @@ w3mman \- an interface to the on-line reference manuals by w3m(1)
.br
.B w3mman
.RI "[-M " path "] -k " keyword
.br
.B w3mman
.RI -l " file
.SH DESCRIPTION
.B w3mman
is the system's manual pager by
@@ -31,9 +34,13 @@ Specify
.I path
as MANPATH.
.TP
.B \-k " keyword"
.BI \-k " keyword"
Specify
.I keyword.
.TP
.BI \-l " file"
Specify a
.I file.
.SH ENVIRONMENT
.TP
.B W3MMAN_W3M
+5
View File
@@ -8,6 +8,7 @@ sub usage {
($_ = $0) =~ s@.*/@@;
print STDERR "$_ [-M <path>] [[<section>] <command>]\n";
print STDERR "$_ [-M <path>] [-k <keyword>]\n";
print STDERR "$_ [-l <file>]\n";
exit 1;
}
@@ -20,6 +21,10 @@ while (@ARGV) {
} elsif (/^-k$/) {
@ARGV || &usage();
$query = "?keyword=" . &form_encode(shift @ARGV);
} elsif (/^-l$/) {
@ARGV || &usage();
$query = "?quit=ok&local=" . &form_encode(shift @ARGV);
$query .= "&pwd=" . &form_encode($ENV{'PWD'});
} elsif (/^-/) {
&usage();
} elsif (/^\d/ || $_ eq 'n') {
+32 -15
View File
@@ -19,7 +19,7 @@ if ($QUERY =~ /\=/) {
$query{"man"} = &form_decode($QUERY);
}
if (! $query{"man"}) {
if ((! $query{"man"}) && (! $query{"local"})) {
if ($query{"keyword"}) {
$keyword = $query{"keyword"};
$k = &html_quote($keyword);
@@ -71,21 +71,29 @@ EOF
exit;
}
$man = $query{"man"};
if ($man =~ s/\((\w+)\)$//) {
$section = $1;
$man_section = "$man($1)";
} elsif ($query{"section"}) {
$section = $query{"section"};
$man_section = "$man($section)";
if ($query{"local"}) {
$file = $query{"local"};
if (! ($file =~ /^\//)) {
$file = $query{"pwd"} . '/' . $file;
}
open(F, "$MAN -l $file 2> /dev/null |");
} else {
$section = "";
$man_section = "$man";
}
$man = $query{"man"};
if ($man =~ s/\((\w+)\)$//) {
$section = $1;
$man_section = "$man($1)";
} elsif ($query{"section"}) {
$section = $query{"section"};
$man_section = "$man($section)";
} else {
$section = "";
$man_section = "$man";
}
$section =~ s:([^-\w\200-\377.,])::g;
$man =~ s:([^-\w\200-\377.,])::g;
open(F, "$MAN $section $man 2> /dev/null |");
$section =~ s:([^-\w\200-\377.,])::g;
$man =~ s:([^-\w\200-\377.,])::g;
open(F, "$MAN $section $man 2> /dev/null |");
}
$ok = 0;
undef $header;
$blank = -1;
@@ -176,6 +184,11 @@ if ($prev) {
close(F);
if (! $ok) {
if ($query{'quit'}) {
if ($query{'local'}) {
print STDERR "File $file not found.\n";
} else {
print STDERR "No manual entry for $man_section.\n";
}
print STDERR "No manual entry for $man_section.\n";
print <<EOF;
w3m-control: EXIT
@@ -190,7 +203,11 @@ Content-Type: text/html
<body>
<pre>
EOF
print "No manual entry for <B>$man_section</B>.\n";
if ($query{'local'}) {
print "File <B>$file</B> not found.\n";
} else {
print "No manual entry for <B>$man_section</B>.\n";
}
}
print <<EOF;
</pre>
+70 -59
View File
@@ -1,4 +1,4 @@
/* $Id: table.c,v 1.49 2004/01/09 15:46:49 ukai Exp $ */
/* $Id: table.c,v 1.55 2007/05/23 13:07:44 inu Exp $ */
/*
* HTML table
*/
@@ -537,48 +537,18 @@ visible_length_plain(char *str)
return len > max_len ? len : max_len;
}
int
maximum_visible_length(char *str)
static int
maximum_visible_length(char *str, int offset)
{
int maxlen, len;
visible_length_offset = 0;
maxlen = visible_length(str);
if (!strchr(str, '\t'))
return maxlen;
for (visible_length_offset = 1; visible_length_offset < Tabstop;
visible_length_offset++) {
len = visible_length(str);
if (maxlen < len) {
maxlen = len;
break;
}
}
return maxlen;
visible_length_offset = offset;
return visible_length(str);
}
int
maximum_visible_length_plain(char *str)
static int
maximum_visible_length_plain(char *str, int offset)
{
int maxlen, len;
visible_length_offset = 0;
maxlen = visible_length_plain(str);
if (!strchr(str, '\t'))
return maxlen;
for (visible_length_offset = 1; visible_length_offset < Tabstop;
visible_length_offset++) {
len = visible_length_plain(str);
if (maxlen < len) {
maxlen = len;
break;
}
}
return maxlen;
visible_length_offset = offset;
return visible_length_plain(str);
}
void
@@ -1984,7 +1954,7 @@ renderTable(struct table *t, int max_width, struct html_feed_environ *h_env)
break;
}
if (t->total_height == 0) {
renderbuf = Strnew(" ");
renderbuf = Strnew_charp(" ");
t->total_height++;
t->total_width = 1;
push_render_image(renderbuf, 1, t->total_width, h_env);
@@ -2465,11 +2435,16 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
return TAG_ACTION_PLAIN;
}
if (mode->pre_mode & TBLM_INTXTA) {
if (mode->end_tag == cmd) {
switch (cmd) {
CASE_TABLE_TAG:
case HTML_N_TEXTAREA:
table_close_textarea(tbl, mode, width);
return TAG_ACTION_NONE;
if (cmd == HTML_N_TEXTAREA)
return TAG_ACTION_NONE;
break;
default:
return TAG_ACTION_FEED;
}
return TAG_ACTION_FEED;
}
if (mode->pre_mode & TBLM_SCRIPT) {
if (mode->end_tag == cmd) {
@@ -2950,33 +2925,69 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
suspend_or_pushdata(tbl, line);
break;
case HTML_DEL:
if (displayInsDel)
feed_table_inline_tag(tbl, line, mode, 5); /* [DEL: */
else
switch (displayInsDel) {
case DISPLAY_INS_DEL_SIMPLE:
mode->pre_mode |= TBLM_DEL;
break;
case DISPLAY_INS_DEL_NORMAL:
feed_table_inline_tag(tbl, line, mode, 5); /* [DEL: */
break;
case DISPLAY_INS_DEL_FONTIFY:
feed_table_inline_tag(tbl, line, mode, -1);
break;
}
break;
case HTML_N_DEL:
if (displayInsDel)
feed_table_inline_tag(tbl, line, mode, 5); /* :DEL] */
else
switch (displayInsDel) {
case DISPLAY_INS_DEL_SIMPLE:
mode->pre_mode &= ~TBLM_DEL;
break;
case DISPLAY_INS_DEL_NORMAL:
feed_table_inline_tag(tbl, line, mode, 5); /* :DEL] */
break;
case DISPLAY_INS_DEL_FONTIFY:
feed_table_inline_tag(tbl, line, mode, -1);
break;
}
break;
case HTML_S:
if (displayInsDel)
feed_table_inline_tag(tbl, line, mode, 3); /* [S: */
else
switch (displayInsDel) {
case DISPLAY_INS_DEL_SIMPLE:
mode->pre_mode |= TBLM_S;
break;
case DISPLAY_INS_DEL_NORMAL:
feed_table_inline_tag(tbl, line, mode, 3); /* [S: */
break;
case DISPLAY_INS_DEL_FONTIFY:
feed_table_inline_tag(tbl, line, mode, -1);
break;
}
break;
case HTML_N_S:
if (displayInsDel)
feed_table_inline_tag(tbl, line, mode, 3); /* :S] */
else
switch (displayInsDel) {
case DISPLAY_INS_DEL_SIMPLE:
mode->pre_mode &= ~TBLM_S;
break;
case DISPLAY_INS_DEL_NORMAL:
feed_table_inline_tag(tbl, line, mode, 3); /* :S] */
break;
case DISPLAY_INS_DEL_FONTIFY:
feed_table_inline_tag(tbl, line, mode, -1);
break;
}
break;
case HTML_INS:
case HTML_N_INS:
if (displayInsDel)
switch (displayInsDel) {
case DISPLAY_INS_DEL_SIMPLE:
break;
case DISPLAY_INS_DEL_NORMAL:
feed_table_inline_tag(tbl, line, mode, 5); /* [INS:, :INS] */
break;
case DISPLAY_INS_DEL_FONTIFY:
feed_table_inline_tag(tbl, line, mode, -1);
break;
}
break;
case HTML_SUP:
case HTML_SUB:
@@ -3200,7 +3211,7 @@ feed_table(struct table *tbl, char *line, struct table_mode *mode,
check_rowcol(tbl, mode);
if (mode->nobr_offset < 0)
mode->nobr_offset = tbl->tabcontentssize;
addcontentssize(tbl, maximum_visible_length(line));
addcontentssize(tbl, maximum_visible_length(line, tbl->tabcontentssize));
setwidth(tbl, mode);
pushdata(tbl, tbl->row, tbl->col, line);
}
@@ -3229,9 +3240,9 @@ feed_table(struct table *tbl, char *line, struct table_mode *mode,
line = "";
}
if (mode->pre_mode & TBLM_PLAIN)
i = maximum_visible_length_plain(p);
i = maximum_visible_length_plain(p, tbl->tabcontentssize);
else
i = maximum_visible_length(p);
i = maximum_visible_length(p, tbl->tabcontentssize);
addcontentssize(tbl, i);
setwidth(tbl, mode);
if (nl)
+4 -4
View File
@@ -21,8 +21,8 @@ p HTML_P
br HTML_BR
b HTML_B
/b HTML_N_B
i HTML_NOP
/i HTML_NOP
i HTML_I
/i HTML_N_I
tt HTML_NOP
/tt HTML_NOP
ul HTML_UL
@@ -60,8 +60,8 @@ kbd HTML_NOP
/kbd HTML_NOP
samp HTML_NOP
/samp HTML_NOP
strong HTML_EM
/strong HTML_N_EM
strong HTML_STRONG
/strong HTML_N_STRONG
var HTML_NOP
/var HTML_NOP
address HTML_BR
+104 -16
View File
@@ -1,4 +1,4 @@
/* $Id: terms.c,v 1.51 2003/12/08 16:06:34 ukai Exp $ */
/* $Id: terms.c,v 1.57 2007/05/30 04:44:00 inu Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -15,7 +15,11 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifndef __MINGW32_VERSION
#include <sys/ioctl.h>
#else
#include <winsock.h>
#endif /* __MINGW32_VERSION */
#ifdef USE_MOUSE
#ifdef USE_GPM
#include <gpm.h>
@@ -56,8 +60,11 @@ static int tty;
#include <windows.h>
#include <sys/cygwin.h>
static int isWinConsole = 0;
#define TERM_CYGWIN 1
#define TERM_CYGWIN_RESERVE_IME 2
static int isLocalConsole = 0;
#ifdef USE_MOUSE
#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE)
int cygwin_mouse_btn_swapped = 0;
#endif
@@ -79,9 +86,6 @@ check_win9x(void)
}
if (winVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
isWin95 = 1;
if (ttyslot() != -1) {
isLocalConsole = 0;
}
}
else {
isWin95 = 0;
@@ -200,7 +204,7 @@ GetConsoleHwnd(void)
return (hwndFound);
}
#ifdef USE_MOUSE
#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE)
static unsigned long
cygwin_version(void)
{
@@ -223,7 +227,7 @@ check_cygwin_console(void)
if (term == NULL)
term = DEFAULT_TERM;
if (term && strncmp(term, "cygwin", 6) == 0) {
isWinConsole = 1;
isWinConsole = TERM_CYGWIN;
}
if (isWinConsole) {
hWnd = GetConsoleHwnd();
@@ -232,11 +236,17 @@ check_cygwin_console(void)
isLocalConsole = 1;
}
}
if (strncmp(getenv("LANG"), "ja", 2) == 0) {
isWinConsole = TERM_CYGWIN_RESERVE_IME;
}
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS
check_win9x();
if (isWin95 && ttyslot() != -1) {
isLocalConsole = 0;
}
#endif
}
#ifdef USE_MOUSE
#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE)
if (cygwin_version() <= 1003015) {
/* cygwin DLL 1.3.15 or earler */
cygwin_mouse_btn_swapped = 1;
@@ -281,6 +291,42 @@ typedef struct sgttyb TerminalMode;
#define MODEFLAG(d) ((d).sg_flags)
#endif /* HAVE_SGTTY_H */
#ifdef __MINGW32_VERSION
/* dummy struct */
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#define NCCS 32
struct termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
};
typedef struct termios TerminalMode;
#define TerminalSet(fd,x) (0)
#define TerminalGet(fd,x) (0)
#define MODEFLAG(d) (0)
/* dummy defines */
#define SIGHUP (0)
#define SIGQUIT (0)
#define ECHO (0)
#define ISIG (0)
#define VEOF (0)
#define ICANON (0)
#define IXON (0)
#define IXOFF (0)
char *ttyname(int);
#endif /* __MINGW32_VERSION */
#define MAX_LINE 200
#define MAX_COLUMN 400
@@ -382,9 +428,10 @@ char *T_cd, *T_ce, *T_kr, *T_kl, *T_cr, *T_bt, *T_ta, *T_sc, *T_rc,
*T_ti, *T_te, *T_nd, *T_as, *T_ae, *T_eA, *T_ac, *T_op;
int LINES, COLS;
#if defined(__CYGWIN__) && LANG == JA
#if defined(__CYGWIN__)
int LASTLINE;
#endif /* defined(__CYGWIN__) && LANG == JA */
#endif /* defined(__CYGWIN__) */
static int max_LINES = 0, max_COLS = 0;
static int tab_step = 8;
static int CurLine, CurColumn;
@@ -504,6 +551,7 @@ set_tty(void)
void
ttymode_set(int mode, int imode)
{
#ifndef __MINGW32_VERSION
TerminalMode ioval;
TerminalGet(tty, &ioval);
@@ -518,11 +566,13 @@ ttymode_set(int mode, int imode)
printf("Error occured while set %x: errno=%d\n", mode, errno);
reset_exit(SIGNAL_ARGLIST);
}
#endif
}
void
ttymode_reset(int mode, int imode)
{
#ifndef __MINGW32_VERSION
TerminalMode ioval;
TerminalGet(tty, &ioval);
@@ -537,6 +587,7 @@ ttymode_reset(int mode, int imode)
printf("Error occured while reset %x: errno=%d\n", mode, errno);
reset_exit(SIGNAL_ARGLIST);
}
#endif /* __MINGW32_VERSION */
}
#ifndef HAVE_SGTTY_H
@@ -589,11 +640,11 @@ reset_tty(void)
MySignalHandler
reset_exit(SIGNAL_ARG)
{
reset_tty();
#ifdef USE_MOUSE
if (mouseActive)
mouse_end();
#endif /* USE_MOUSE */
reset_tty();
w3m_exit(0);
SIGNAL_RETURN;
}
@@ -763,9 +814,9 @@ setlinescols(void)
COLS = MAX_COLUMN;
if (LINES > MAX_LINE)
LINES = MAX_LINE;
#if defined(__CYGWIN__) && LANG == JA
LASTLINE = LINES - (isWinConsole ? 2 : 1);
#endif /* defined(__CYGWIN__) && LANG == JA */
#if defined(__CYGWIN__)
LASTLINE = LINES - (isWinConsole == TERM_CYGWIN_RESERVE_IME ? 2 : 1);
#endif /* defined(__CYGWIN__) */
}
void
@@ -1285,9 +1336,9 @@ refresh(void)
* (COLS-1,LINES-1).
*/
#if !defined(USE_BG_COLOR) || defined(__CYGWIN__)
#if defined(__CYGWIN__) && LANG == JA
#ifdef __CYGWIN__
if (isWinConsole)
#endif /* defined(__CYGWIN__) && LANG == JA */
#endif
if (line == LINES - 1 && col == COLS - 1)
break;
#endif /* !defined(USE_BG_COLOR) || defined(__CYGWIN__) */
@@ -2167,3 +2218,40 @@ touch_cursor()
#endif
}
#endif
#ifdef __MINGW32_VERSION
int tgetent(char *bp, char *name)
{
return 0;
}
int tgetnum(char *id)
{
return -1;
}
int tgetflag(char *id)
{
return 0;
}
char *tgetstr(char *id, char **area)
{
id = "";
}
char *tgoto(char *cap, int col, int row)
{
}
int tputs(char *str, int affcnt, int (*putc)(char))
{
}
char *ttyname(int tty)
{
return "CON";
}
#endif /* __MINGW32_VERSION */
+3 -3
View File
@@ -1,9 +1,9 @@
/* $Id: terms.h,v 1.9 2003/09/22 21:02:22 ukai Exp $ */
/* $Id: terms.h,v 1.10 2004/07/15 16:32:39 ukai Exp $ */
#ifndef TERMS_H
#define TERMS_H
extern int LINES, COLS;
#if defined(__CYGWIN__) && LANG == JA
#if defined(__CYGWIN__)
extern int LASTLINE;
#endif
@@ -21,7 +21,7 @@ extern int LASTLINE;
#endif
#ifdef __CYGWIN__
#ifdef USE_MOUSE
#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE)
extern int cygwin_mouse_btn_swapped;
#endif
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS
+18 -12
View File
@@ -1,10 +1,14 @@
/* $Id: url.c,v 1.89 2004/04/16 18:47:19 ukai Exp $ */
/* $Id: url.c,v 1.95 2007/05/23 15:06:06 inu Exp $ */
#include "fm.h"
#ifndef __MINGW32_VERSION
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#else
#include <winsock.h>
#endif /* __MINGW32_VERSION */
#include <signal.h>
#include <setjmp.h>
@@ -31,6 +35,11 @@
#define write(a,b,c) write_s(a,b,c)
#endif /* __WATT32__ */
#ifdef __MINGW32_VERSION
#define write(a,b,c) send(a,b,c, 0)
#define close(fd) closesocket(fd)
#endif
#ifdef INET6
/* see rc.c, "dns_order" and dnsorders[] */
int ai_family_order_table[7][3] = {
@@ -1453,7 +1462,8 @@ init_stream(URLFile *uf, int scheme, InputStream stream)
uf->scheme = scheme;
uf->encoding = ENC_7BIT;
uf->is_cgi = FALSE;
uf->compression = 0;
uf->compression = CMP_NOCOMPRESS;
uf->content_encoding = CMP_NOCOMPRESS;
uf->guess_type = NULL;
uf->ext = NULL;
uf->modtime = -1;
@@ -1526,12 +1536,12 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
/* local CGI: POST */
uf.stream = newFileStream(localcgi_post(pu->real_file, pu->query,
request, option->referer),
(void (*)())pclose);
(void (*)())fclose);
else
/* lodal CGI: GET */
uf.stream = newFileStream(localcgi_get(pu->real_file, pu->query,
option->referer),
(void (*)())pclose);
(void (*)())fclose);
if (uf.stream) {
uf.is_cgi = TRUE;
uf.scheme = pu->scheme = SCM_LOCAL_CGI;
@@ -1693,9 +1703,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
SSL_write(sslh, tmp->ptr, tmp->length);
else
write(sock, tmp->ptr, tmp->length);
#ifdef HTTP_DEBUG
{
FILE *ff = fopen("zzrequest", "a");
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
if (sslh)
fputs("HTTPS: request via SSL\n", ff);
else
@@ -1703,7 +1712,6 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
fwrite(tmp->ptr, sizeof(char), tmp->length, ff);
fclose(ff);
}
#endif /* HTTP_DEBUG */
if (hr->command == HR_COMMAND_POST &&
request->enctype == FORM_ENCTYPE_MULTIPART) {
if (sslh)
@@ -1717,13 +1725,11 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
#endif /* USE_SSL */
{
write(sock, tmp->ptr, tmp->length);
#ifdef HTTP_DEBUG
{
FILE *ff = fopen("zzrequest", "a");
if(w3m_reqlog){
FILE *ff = fopen(w3m_reqlog, "a");
fwrite(tmp->ptr, sizeof(char), tmp->length, ff);
fclose(ff);
}
#endif /* HTTP_DEBUG */
if (hr->command == HR_COMMAND_POST &&
request->enctype == FORM_ENCTYPE_MULTIPART)
write_from_file(sock, request->body);
+2 -2
View File
@@ -1,5 +1,5 @@
/* $Id: version.c.in,v 1.44 2004/04/28 18:19:25 ukai Exp $ */
#define CURRENT_VERSION "w3m/0.5.1"
/* $Id: version.c.in,v 1.46 2007/05/31 12:17:05 inu Exp $ */
#define CURRENT_VERSION "w3m/0.5.2"
#ifndef FM_H
char *w3m_version = CURRENT_VERSION;
+12 -9
View File
@@ -1,4 +1,4 @@
/* $Id: w3mbookmark.c,v 1.10 2003/09/23 18:42:25 ukai Exp $ */
/* $Id: w3mbookmark.c,v 1.12 2007/05/31 01:19:50 inu Exp $ */
#include <stdlib.h>
#include <stdio.h>
#include "config.h"
@@ -52,18 +52,18 @@ static char end_section[] =
static char *Local_cookie = NULL;
void
print_bookmark_panel(char *bmark, char *url, char *title)
print_bookmark_panel(char *bmark, char *url, char *title, char *charset)
{
Str tmp, tmp2;
FILE *f;
char *p;
#if LANG == JA
/* FIXME: gettextize here */
printf("Content-Type: text/html; charset=EUC-JP\n\n");
#else
printf("Content-Type: text/html\n\n");
#endif
if (charset == NULL) {
printf("Content-Type: text/html\n\n");
}
else {
printf("Content-Type: text/html; charset=%s\n\n", charset);
}
printf(bkmark_src1, html_quote(bmark), html_quote(Local_cookie));
if ((f = fopen(bmark, "r")) != NULL) {
printf("<tr><td>Section:<td><select name=\"section\">\n");
@@ -188,8 +188,10 @@ main(int argc, char *argv[], char **envp)
char *bmark;
char *url;
char *title;
char *charset;
char *sent_cookie;
GC_INIT();
p = getenv("REQUEST_METHOD");
if (p == NULL || strcasecmp(p, "post"))
goto request_err;
@@ -224,12 +226,13 @@ main(int argc, char *argv[], char **envp)
bmark = expandPath(tag_get_value(cgiarg, "bmark"));
url = tag_get_value(cgiarg, "url");
title = tag_get_value(cgiarg, "title");
charset = tag_get_value(cgiarg, "charset");
if (bmark == NULL || url == NULL)
goto request_err;
if (mode && !strcmp(mode, "panel")) {
if (title == NULL)
title = "";
print_bookmark_panel(bmark, url, title);
print_bookmark_panel(bmark, url, title, charset);
}
else if (mode && !strcmp(mode, "register")) {
printf("Content-Type: text/plain\n");
+2 -1
View File
@@ -1,4 +1,4 @@
/* $Id: w3mhelperpanel.c,v 1.13 2003/09/23 18:42:25 ukai Exp $ */
/* $Id: w3mhelperpanel.c,v 1.14 2007/05/31 01:19:50 inu Exp $ */
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
@@ -174,6 +174,7 @@ main(int argc, char *argv[], char **envp)
char *mode;
char *sent_cookie;
GC_INIT();
p = getenv("REQUEST_METHOD");
if (p == NULL || strcasecmp(p, "post"))
goto request_err;
+103 -9
View File
@@ -1,17 +1,51 @@
/* $Id: fb_gdkpixbuf.c,v 1.16 2003/06/13 15:03:35 ukai Exp $ */
/* $Id: fb_gdkpixbuf.c,v 1.21 2004/11/08 17:14:06 ukai Exp $ */
/**************************************************************************
fb_gdkpixbuf.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
#include "config.h"
#if defined(USE_GTK2)
#include <glib-object.h>
#include <gdk/gdk.h>
#endif
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "fb.h"
#include "fb_img.h"
static void draw(FB_IMAGE * img, int bg, int x, int y, int w, int h,
static void draw(FB_IMAGE * img, int x, int y, int w, int h,
GdkPixbuf * pixbuf);
static GdkPixbuf *resize_image(GdkPixbuf * pixbuf, int width, int height);
static void
#if defined(USE_GTK2)
static int
get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
{
GdkPixbufAnimationIter *iter;
int n, i, d = -1;
GTimeVal time;
g_get_current_time(&time);
iter = gdk_pixbuf_animation_get_iter(animation, &time);
*w = gdk_pixbuf_animation_get_width(animation);
*h = gdk_pixbuf_animation_get_height(animation);
for (i = 1;
gdk_pixbuf_animation_iter_on_currently_loading_frame(iter) != TRUE;
i++) {
int tmp;
tmp = gdk_pixbuf_animation_iter_get_delay_time(iter);
g_time_val_add(&time, tmp * 1000);
if (tmp > d)
d = tmp;
gdk_pixbuf_animation_iter_advance(iter, &time);
}
if (delay)
*delay = d;
n = i;
g_object_unref(G_OBJECT(iter));
return n;
}
#else
static int
get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
{
GList *frames;
@@ -42,6 +76,16 @@ get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
}
if (delay)
*delay = d;
return n;
}
#endif
void
fb_image_init()
{
#if defined(USE_GTK2)
g_type_init();
#endif
}
int
@@ -50,11 +94,19 @@ get_image_size(char *filename, int *w, int *h)
GdkPixbufAnimation *animation;
if (filename == NULL)
return 1;
#if defined(USE_GTK2)
animation = gdk_pixbuf_animation_new_from_file(filename, NULL);
#else
animation = gdk_pixbuf_animation_new_from_file(filename);
#endif
if (animation == NULL)
return 1;
get_animation_size(animation, w, h, NULL);
#if defined(USE_GTK2)
g_object_unref(G_OBJECT(animation));
#else
gdk_pixbuf_animation_unref(animation);
#endif
return 0;
}
@@ -62,19 +114,27 @@ FB_IMAGE **
fb_image_load(char *filename, int w, int h, int max_anim)
{
GdkPixbufAnimation *animation;
#if defined(USE_GTK2)
GdkPixbufAnimationIter *iter;
GTimeVal time;
#else
int i;
GList *frames;
#endif
double ratio_w, ratio_h;
int n, i, j, fw, fh, frame_num, delay;
int n, j, fw, fh, frame_num, delay;
FB_IMAGE **fb_frame = NULL, *tmp_image = NULL;
if (filename == NULL)
return NULL;
#if defined(USE_GTK2)
animation = gdk_pixbuf_animation_new_from_file(filename, NULL);
#else
animation = gdk_pixbuf_animation_new_from_file(filename);
#endif
if (animation == NULL)
return NULL;
frames = gdk_pixbuf_animation_get_frames(animation);
get_animation_size(animation, &fw, &fh, &delay);
frame_num = n = gdk_pixbuf_animation_get_num_frames(animation);
frame_num = n = get_animation_size(animation, &fw, &fh, &delay);
if (delay <= 0)
max_anim = -1;
if (max_anim < 0) {
@@ -108,6 +168,34 @@ fb_image_load(char *filename, int w, int h, int max_anim)
fb_image_fill(tmp_image, bg_r, bg_g, bg_b);
}
#if defined(USE_GTK2)
g_get_current_time(&time);
iter = gdk_pixbuf_animation_get_iter(animation, &time);
if (max_anim < 0 && n > -max_anim) {
max_anim = n + max_anim;
for (j = 0; j < max_anim; j++) {
g_time_val_add(&time,
gdk_pixbuf_animation_iter_get_delay_time(iter) * 1000);
gdk_pixbuf_animation_iter_advance(iter, &time);
}
}
for (j = 0; j < n; j++) {
GdkPixbuf *org_pixbuf, *pixbuf;
org_pixbuf = gdk_pixbuf_animation_iter_get_pixbuf(iter);
pixbuf = resize_image(org_pixbuf, w, h);
fb_frame[j]->delay = gdk_pixbuf_animation_iter_get_delay_time(iter);
g_time_val_add(&time, fb_frame[j]->delay * 1000);
draw(fb_frame[j], 0, 0, w, h, pixbuf);
if (org_pixbuf != pixbuf)
g_object_unref(G_OBJECT(pixbuf));
gdk_pixbuf_animation_iter_advance(iter, &time);
}
#else
frames = gdk_pixbuf_animation_get_frames(animation);
for (j = 0; j < n; j++) {
GdkPixbufFrame *frame;
GdkPixbuf *org_pixbuf, *pixbuf;
@@ -139,13 +227,14 @@ fb_image_load(char *filename, int w, int h, int max_anim)
fb_frame[i]->delay = gdk_pixbuf_frame_get_delay_time(frame);
fb_image_copy(fb_frame[i], tmp_image);
draw(fb_frame[i], !i, ofstx, ofsty, width, height, pixbuf);
draw(fb_frame[i], ofstx, ofsty, width, height, pixbuf);
switch (gdk_pixbuf_frame_get_action(frame)) {
case GDK_PIXBUF_FRAME_RETAIN:
fb_image_copy(tmp_image, fb_frame[i]);
break;
case GDK_PIXBUF_FRAME_DISPOSE:
fb_image_fill(tmp_image, bg_r, bg_g, bg_b);
break;
case GDK_PIXBUF_FRAME_REVERT:
fb_image_copy(tmp_image, fb_frame[0]);
@@ -157,14 +246,19 @@ fb_image_load(char *filename, int w, int h, int max_anim)
if (org_pixbuf != pixbuf)
gdk_pixbuf_finalize(pixbuf);
}
#endif
END:
if (tmp_image)
fb_image_free(tmp_image);
#if defined(USE_GTK2)
g_object_unref(G_OBJECT(animation));
#else
gdk_pixbuf_animation_unref(animation);
#endif
return fb_frame;
}
static void
draw(FB_IMAGE * img, int bg, int x, int y, int w, int h, GdkPixbuf * pixbuf)
draw(FB_IMAGE * img, int x, int y, int w, int h, GdkPixbuf * pixbuf)
{
int i, j, r, g, b, offset, bpp, rowstride;
guchar *pixels;
+2 -1
View File
@@ -1,8 +1,9 @@
/* $Id: fb_img.h,v 1.8 2003/07/09 15:07:11 ukai Exp $ */
/* $Id: fb_img.h,v 1.9 2004/08/04 17:32:28 ukai Exp $ */
#ifndef fb_img_header
#define fb_img_header
#include "fb.h"
void fb_image_init();
FB_IMAGE **fb_image_load(char *filename, int w, int h, int n);
void fb_image_set_bg(int r, int g, int b);
int fb_image_clear(int x, int y, int w, int h);
+7 -1
View File
@@ -1,4 +1,4 @@
/* $Id: fb_imlib2.c,v 1.9 2003/03/24 15:45:59 ukai Exp $ */
/* $Id: fb_imlib2.c,v 1.10 2004/08/04 17:32:28 ukai Exp $ */
/**************************************************************************
fb_imlib2.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
@@ -11,6 +11,12 @@
static void draw(FB_IMAGE * img, Imlib_Image image);
static Imlib_Image resize_image(Imlib_Image image, int width, int height);
void
fb_image_init()
{
return;
}
int
get_image_size(char *filename, int *w, int *h)
{
+5 -1
View File
@@ -1,4 +1,4 @@
/* $Id: fb_w3mimg.c,v 1.13 2003/08/29 15:06:52 ukai Exp $ */
/* $Id: fb_w3mimg.c,v 1.14 2004/08/04 17:32:28 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -17,6 +17,7 @@ w3mfb_init(w3mimg_op * self)
{
if (self == NULL)
return 0;
/* XXX */
return 1;
}
@@ -195,6 +196,9 @@ w3mimg_fbopen()
wop->free_image = w3mfb_free_image;
wop->get_image_size = w3mfb_get_image_size;
/* XXX */
fb_image_init();
return wop;
error:
free(wop);
+115 -9
View File
@@ -1,6 +1,7 @@
/* $Id: x11_w3mimg.c,v 1.25 2003/07/13 16:19:10 ukai Exp $ */
/* $Id: x11_w3mimg.c,v 1.29 2004/11/08 17:14:06 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "config.h"
@@ -11,7 +12,13 @@
#include <X11/Xutil.h>
#include <Imlib2.h>
#elif defined(USE_GDKPIXBUF)
#if defined(USE_GTK2)
#include <glib-object.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
#else
#include <gdk-pixbuf/gdk-pixbuf-xlib.h>
#endif
#else
#error no Imlib and GdkPixbuf support
#endif
@@ -42,7 +49,36 @@ struct x11_image {
Pixmap *pixmap;
};
static void
#if defined(USE_GTK2)
static int
get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
{
GdkPixbufAnimationIter *iter;
int n, i, d = -1;
GTimeVal time;
g_get_current_time(&time);
iter = gdk_pixbuf_animation_get_iter(animation, &time);
*w = gdk_pixbuf_animation_get_width(animation);
*h = gdk_pixbuf_animation_get_height(animation);
for (i = 1;
gdk_pixbuf_animation_iter_on_currently_loading_frame(iter) != TRUE;
i++) {
int tmp;
tmp = gdk_pixbuf_animation_iter_get_delay_time(iter);
g_time_val_add(&time, tmp * 1000);
if (tmp > d)
d = tmp;
gdk_pixbuf_animation_iter_advance(iter, &time);
}
if (delay)
*delay = d;
g_object_unref(G_OBJECT(iter));
n = i;
return n;
}
#else
static int
get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
{
GList *frames;
@@ -73,8 +109,9 @@ get_animation_size(GdkPixbufAnimation * animation, int *w, int *h, int *delay)
}
if (delay)
*delay = d;
return n;
}
#endif
#endif
static int
@@ -94,6 +131,9 @@ x11_init(w3mimg_op * self)
}
#elif defined(USE_GDKPIXBUF)
if (!xi->init_flag) {
#if defined(USE_GTK2)
g_type_init();
#endif
gdk_pixbuf_xlib_init(xi->display, 0);
xi->init_flag = TRUE;
}
@@ -290,11 +330,17 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
Imlib_Image im;
#elif defined(USE_GDKPIXBUF)
GdkPixbufAnimation *animation;
GList *frames;
int i, j, iw, ih, n, frame_num, delay, max_anim;
int j, iw, ih, n, frame_num, delay = -1, max_anim;
double ratio_w, ratio_h;
struct x11_image *ximg;
Pixmap tmp_pixmap;
#if defined(USE_GTK2)
GdkPixbufAnimationIter *iter;
GTimeVal time;
#else
int i;
GList *frames;
#endif
#endif
if (self == NULL)
@@ -342,13 +388,14 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
imlib_free_image();
#elif defined(USE_GDKPIXBUF)
max_anim = self->max_anim;
#if defined(USE_GTK2)
animation = gdk_pixbuf_animation_new_from_file(fname, NULL);
#else
animation = gdk_pixbuf_animation_new_from_file(fname);
#endif
if (!animation)
return 0;
frames = gdk_pixbuf_animation_get_frames(animation);
frame_num = n = gdk_pixbuf_animation_get_num_frames(animation);
get_animation_size(animation, &iw, &ih, &delay);
frame_num = n = get_animation_size(animation, &iw, &ih, &delay);
if (delay <= 0)
max_anim = -1;
@@ -370,17 +417,64 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
}
tmp_pixmap = XCreatePixmap(xi->display, xi->parent, w, h,
DefaultDepth(xi->display, 0));
XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
XFillRectangle(xi->display, (Pixmap) tmp_pixmap, xi->imageGC, 0, 0, w, h);
if (!tmp_pixmap) {
#if defined(USE_GTK2)
g_object_unref(G_OBJECT(animation));
#else
gdk_pixbuf_animation_unref(animation);
#endif
return 0;
}
ximg = x11_img_new(xi, w, h, frame_num);
if (!ximg) {
XFreePixmap(xi->display, tmp_pixmap);
#if defined(USE_GTK2)
g_object_unref(G_OBJECT(animation));
#else
gdk_pixbuf_animation_unref(animation);
#endif
return 0;
}
#if defined(USE_GTK2)
g_get_current_time(&time);
iter = gdk_pixbuf_animation_get_iter(animation, &time);
if (max_anim < 0 && n > -max_anim) {
max_anim = n + max_anim;
for (j = 0; j < max_anim; j++) {
delay = gdk_pixbuf_animation_iter_get_delay_time(iter);
g_time_val_add(&time, delay * 1000);
gdk_pixbuf_animation_iter_advance(iter, &time);
}
}
for (j = 0; j < frame_num; j++) {
GdkPixbuf *org_pixbuf, *pixbuf;
org_pixbuf = gdk_pixbuf_animation_iter_get_pixbuf(iter);
delay = gdk_pixbuf_animation_iter_get_delay_time(iter);
pixbuf = resize_image(org_pixbuf, w, h);
if (delay > ximg->delay)
ximg->delay = delay;
gdk_pixbuf_xlib_render_to_drawable_alpha(pixbuf,
(Drawable) ximg->pixmap[j], 0,
0, 0, 0, w, h,
GDK_PIXBUF_ALPHA_BILEVEL, 1,
XLIB_RGB_DITHER_NORMAL, 0, 0);
if (org_pixbuf != pixbuf)
g_object_unref(G_OBJECT(pixbuf));
g_time_val_add(&time, delay * 1000);
gdk_pixbuf_animation_iter_advance(iter, &time);
}
XFreePixmap(xi->display, tmp_pixmap);
g_object_unref(G_OBJECT(animation));
#else
frames = gdk_pixbuf_animation_get_frames(animation);
for (j = 0; j < n; j++) {
GdkPixbufFrame *frame;
GdkPixbuf *org_pixbuf, *pixbuf;
@@ -430,6 +524,9 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
xi->imageGC, 0, 0, w, h, 0, 0);
break;
case GDK_PIXBUF_FRAME_DISPOSE:
XSetForeground(xi->display, xi->imageGC, xi->background_pixel);
XFillRectangle(xi->display, tmp_pixmap, xi->imageGC,
0, 0, w, h);
break;
case GDK_PIXBUF_FRAME_REVERT:
XCopyArea(xi->display, ximg->pixmap[0], tmp_pixmap,
@@ -448,6 +545,7 @@ x11_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
}
XFreePixmap(xi->display, tmp_pixmap);
gdk_pixbuf_animation_unref(animation);
#endif
img->pixmap = ximg;
#endif
@@ -577,12 +675,20 @@ x11_get_image_size(w3mimg_op * self, W3MImage * img, char *fname, int *w,
*h = imlib_image_get_height();
imlib_free_image();
#elif defined(USE_GDKPIXBUF)
#if defined(USE_GTK2)
animation = gdk_pixbuf_animation_new_from_file(fname, NULL);
#else
animation = gdk_pixbuf_animation_new_from_file(fname);
#endif
if (!animation)
return 0;
get_animation_size(animation, w, h, NULL);
#if defined(USE_GTK2)
g_object_unref(G_OBJECT(animation));
#else
gdk_pixbuf_animation_unref(animation);
#endif
#endif
return 1;
}