comparison lisp/gnus/compface.el @ 56927:55fd4f77387a after-merge-gnus-5_10

Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523 Merge from emacs--gnus--5.10, gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0 tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1 Import from CVS branch gnus-5_10-branch * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2 Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19 Remove autoconf-generated files from archive * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20 Update from CVS
author Miles Bader <miles@gnu.org>
date Sat, 04 Sep 2004 13:13:48 +0000
parents
children 18a818a2ee7c
comparison
equal deleted inserted replaced
56926:f8e248e9a717 56927:55fd4f77387a
1 ;;; compface.el --- functions for converting X-Face headers
2 ;; Copyright (C) 2002 Free Software Foundation, Inc.
3
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5 ;; Keywords: news
6
7 ;; This file is part of GNU Emacs.
8
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
13
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
23
24 ;;; Commentary:
25
26 ;;; Code:
27
28 ;;;###
29 (defun uncompface (face)
30 "Convert FACE to pbm.
31 Requires the external programs `uncompface', and `icontopbm'. On a
32 GNU/Linux system these might be in packages with names like `compface'
33 or `faces-xface' and `netpbm' or `libgr-progs', for instance."
34 (with-temp-buffer
35 (insert face)
36 (and (eq 0 (apply 'call-process-region (point-min) (point-max)
37 "uncompface"
38 'delete '(t nil) nil))
39 (progn
40 (goto-char (point-min))
41 (insert "/* Width=48, Height=48 */\n")
42 ;; I just can't get "icontopbm" to work correctly on its
43 ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
44 ;; files.
45 (if (not (featurep 'xemacs))
46 (eq 0 (call-process-region (point-min) (point-max)
47 "icontopbm"
48 'delete '(t nil)))
49 (shell-command-on-region (point-min) (point-max)
50 "icontopbm | pnmnoraw"
51 (current-buffer) t)
52 t))
53 (buffer-string))))
54
55 (provide 'compface)
56
57 ;;; arch-tag: f9c78e84-98c0-4142-9682-8ba4cf4c3441
58 ;;; compface.el ends here