From 739eb5f7ab4d8d10e054ba80813bc1d9e3307450 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 14 Mar 2002 16:12:02 +0000 Subject: [w3m-dev 03129] Re: X-Face * configure (use_xface): ask * fm.h (_Buffer): add header_source * buffer.c (reshapeBuffer): fix reshape when reading stdin with image fix disappearing header when reading stdin * file.c (xface2xbm): check file existence * file.c (readHeader): save to tmp file X-Face when activeImage & displayImage * main.c (dispI): comment out checking content type * main.c (stopI): ditto * scripts/xface2xbm.in: update compface URL read from file $XF write to file $XBM From: Hironori Sakamoto --- scripts/xface2xbm.in | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/xface2xbm.in b/scripts/xface2xbm.in index 2c2002a..7d6bede 100644 --- a/scripts/xface2xbm.in +++ b/scripts/xface2xbm.in @@ -1,13 +1,19 @@ #!@PERL@ -# See http://www.lab3.kuis.kyoto-u.ac.jp/~tsumura/emacs/x-face.html +# compface/uncompface +# ftp://metalab.unc.edu/pub/Linux/apps/graphics/convert/ $UNCOMPFACE = "uncompface"; +$XF = @ARGV ? shift @ARGV : '-'; +$XBM = @ARGV ? shift @ARGV : '-'; + +open(XF, "<$XF"); $xf = ""; -while(<>) { +while() { # s/^X-Face://i if ($xf eq ""); $xf .= $_; } +close(XF); pipe(R, W2); pipe(R2, W); @@ -17,7 +23,7 @@ if (! fork()) { open(STDIN, "<&R2"); open(STDOUT, ">&W2"); exec $UNCOMPFACE; - die; + exit 1; } close(R2); close(W2); @@ -29,10 +35,12 @@ while() { } } close(R); +@bm || exit 1; $W = 48; $H = @bm * 8 / $W; # must be 48 -print <$XBM"); +print XBM <>= 1; } - printf " 0x%02X,", $y; + printf XBM " 0x%02X,", $y; } - print "\n"; + print XBM "\n"; } -print <