[w3m-dev 02984] inline image improvements and cleanups

* config.h.dist (HAVE_SYMLINK) added
* config.h.dist (HAVE_LSTAT): added
* configure: symlink() check
* configure: lstat() check
* fm.h (maxLoadImage): added
* form.c (form_write_from_file): s/HAVE_READLINK/HAVE_LSTAT/
* image.c: include <sys/stat.h>
* image.c (MAX_LOAD_IMAGE): default 8
* image.c (max_load_image): deleted
* image.c (n_load_image): added
* image.c (showImageProgress): added
* image.c (loadImage): check load image count
			s/HAVE_READLINK/HAVE_LSTAT/ (HAVE_SYMLINK)
			showImageProgress
* local.c: include <sys/stat.h>
		s/HAVE_READLINK/HAVE_LSTAT/
* rc.c (CMT_MAX_LOAD_IMAGE): added
* rc.c (max_load_image): added
* doc/README.img: update
* doc-jp/README.img: update

* file.c (process_img): pre_int fix
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-02-04 15:18:41 +00:00
parent 53b9c12956
commit a8831d96bd
11 changed files with 183 additions and 86 deletions

6
form.c
View File

@@ -1,4 +1,4 @@
/* $Id: form.c,v 1.11 2001/12/27 18:22:59 ukai Exp $ */
/* $Id: form.c,v 1.12 2002/02/04 15:18:42 ukai Exp $ */
/*
* HTML forms
*/
@@ -635,10 +635,10 @@ form_write_from_file(FILE * f, char *boundary, char *name, char *filename,
fprintf(f, "Content-Type: %s\r\n\r\n",
type ? type : "application/octet-stream");
#ifdef HAVE_READLINK /* readline == lstat ? (ukai) */
#ifdef HAVE_LSTAT
if (lstat(file, &st) < 0)
goto write_end;
#endif /* HAVE_READLINK */
#endif /* HAVE_LSTAT */
if (S_ISDIR(st.st_mode))
goto write_end;
fd = fopen(file, "r");