#!@PERL@ # See http://www.lab3.kuis.kyoto-u.ac.jp/~tsumura/emacs/x-face.html $UNCOMPFACE = "uncompface"; $xf = ""; while(<>) { # s/^X-Face://i if ($xf eq ""); $xf .= $_; } pipe(R, W2); pipe(R2, W); if (! fork()) { close(R); close(W); open(STDIN, "<&R2"); open(STDOUT, ">&W2"); exec $UNCOMPFACE; die; } close(R2); close(W2); print W $xf; close(W); while() { while(s/0x(..)(..)//) { push(@bm, hex($1), hex($2)); } } close(R); $W = 48; $H = @bm * 8 / $W; # must be 48 print <>= 1; } printf " 0x%02X,", $y; } print "\n"; } print <