diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-04-09 14:45:58 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-04-09 14:45:58 +0000 |
commit | c2c01b60dd063ed4728986d513b51138ccf9de4a (patch) | |
tree | 0880f7c647f9747e3ec733dffa4231c91dc91196 /file.c | |
parent | NEWS: mark_all_pages (diff) | |
download | w3m-c2c01b60dd063ed4728986d513b51138ccf9de4a.tar.gz w3m-c2c01b60dd063ed4728986d513b51138ccf9de4a.zip |
[w3m-dev 03167] xface2xbm -> xface2xpm (current imlib can't handle XBM)
* configure: s/XFACE2XBM/XFACE2XPM/
* config.h.dist: ditto
* file.c (xface2xpm): renamed from xface2xbm
modified for xpm
(readHeader): s/xface2xbm/xface2xpm/
* scripts/Makefile (LIB_TARGETS): s/xface2xbm/xface2xpm/
* scripts/xface2xpm.in: added
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | file.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.88 2002/03/19 15:54:47 ukai Exp $ */ +/* $Id: file.c,v 1.89 2002/04/09 14:45:58 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -507,22 +507,24 @@ matchattr(char *p, char *attr, int len, Str *value) #ifdef USE_IMAGE #ifdef USE_XFACE static char * -xface2xbm(char *xface) +xface2xpm(char *xface) { - char *xbm; + char *xpm; FILE *f; struct stat st; - xbm = tmpfname(TMPF_DFL, ".xbm")->ptr; - f = popen(Sprintf("%s - %s", libFile(XFACE2XBM), xbm)->ptr, "w"); + xpm = tmpfname(TMPF_DFL, ".xpm")->ptr; + f = popen(Sprintf("%s > %s", libFile(XFACE2XPM), xpm)->ptr, "w"); if (!f) return NULL; fprintf(f, "%s", xface); pclose(f); - if (stat(xbm, &st)) + if (stat(xpm, &st)) return NULL; - pushText(fileToDelete, xbm); - return xbm; + pushText(fileToDelete, xpm); + if (!st.st_size) + return NULL; + return xpm; } #endif #endif @@ -631,7 +633,7 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu) URLFile f; Line *l; - tmpf = xface2xbm(&tmp->ptr[7]); + tmpf = xface2xpm(&tmp->ptr[7]); if (tmpf) { src = Sprintf |