diff options
| author | Jason Rumney | 2004-02-24 09:00:24 +0000 |
|---|---|---|
| committer | Jason Rumney | 2004-02-24 09:00:24 +0000 |
| commit | 2f3061050582f3873c5bf44e6715d98206e332f5 (patch) | |
| tree | bb5412ce0a45f2e59947ecd9c67e6a02817e2374 /src | |
| parent | 92f5fba2d661eb84fa67e0190cd617aa57f51f34 (diff) | |
| download | emacs-2f3061050582f3873c5bf44e6715d98206e332f5.tar.gz emacs-2f3061050582f3873c5bf44e6715d98206e332f5.zip | |
(slurp_file, xbm_scan, xbm_load_image)
(xbm_read_bitmap_data): Use unsigned char for image data.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 3b53bade2ad..015b406db88 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -8243,7 +8243,7 @@ x_put_x_image (f, ximg, pixmap, width, height) | |||
| 8243 | ***********************************************************************/ | 8243 | ***********************************************************************/ |
| 8244 | 8244 | ||
| 8245 | static Lisp_Object x_find_image_file P_ ((Lisp_Object)); | 8245 | static Lisp_Object x_find_image_file P_ ((Lisp_Object)); |
| 8246 | static char *slurp_file P_ ((char *, int *)); | 8246 | static unsigned char *slurp_file P_ ((char *, int *)); |
| 8247 | 8247 | ||
| 8248 | 8248 | ||
| 8249 | /* Find image file FILE. Look in data-directory, then | 8249 | /* Find image file FILE. Look in data-directory, then |
| @@ -8279,13 +8279,13 @@ x_find_image_file (file) | |||
| 8279 | with xmalloc holding FILE's contents. Value is null if an error | 8279 | with xmalloc holding FILE's contents. Value is null if an error |
| 8280 | occurred. *SIZE is set to the size of the file. */ | 8280 | occurred. *SIZE is set to the size of the file. */ |
| 8281 | 8281 | ||
| 8282 | static char * | 8282 | static unsigned char * |
| 8283 | slurp_file (file, size) | 8283 | slurp_file (file, size) |
| 8284 | char *file; | 8284 | char *file; |
| 8285 | int *size; | 8285 | int *size; |
| 8286 | { | 8286 | { |
| 8287 | FILE *fp = NULL; | 8287 | FILE *fp = NULL; |
| 8288 | char *buf = NULL; | 8288 | unsigned char *buf = NULL; |
| 8289 | struct stat st; | 8289 | struct stat st; |
| 8290 | 8290 | ||
| 8291 | if (stat (file, &st) == 0 | 8291 | if (stat (file, &st) == 0 |
| @@ -8316,13 +8316,13 @@ slurp_file (file, size) | |||
| 8316 | XBM images | 8316 | XBM images |
| 8317 | ***********************************************************************/ | 8317 | ***********************************************************************/ |
| 8318 | 8318 | ||
| 8319 | static int xbm_scan P_ ((char **, char *, char *, int *)); | 8319 | static int xbm_scan P_ ((unsigned char **, unsigned char *, char *, int *)); |
| 8320 | static int xbm_load P_ ((struct frame *f, struct image *img)); | 8320 | static int xbm_load P_ ((struct frame *f, struct image *img)); |
| 8321 | static int xbm_load_image P_ ((struct frame *f, struct image *img, | 8321 | static int xbm_load_image P_ ((struct frame *f, struct image *img, |
| 8322 | char *, char *)); | 8322 | unsigned char *, unsigned char *)); |
| 8323 | static int xbm_image_p P_ ((Lisp_Object object)); | 8323 | static int xbm_image_p P_ ((Lisp_Object object)); |
| 8324 | static int xbm_read_bitmap_data P_ ((char *, char *, int *, int *, | 8324 | static int xbm_read_bitmap_data P_ ((unsigned char *, unsigned char *, |
| 8325 | unsigned char **)); | 8325 | int *, int *, unsigned char **)); |
| 8326 | static int xbm_file_p P_ ((Lisp_Object)); | 8326 | static int xbm_file_p P_ ((Lisp_Object)); |
| 8327 | 8327 | ||
| 8328 | 8328 | ||
| @@ -8511,11 +8511,11 @@ xbm_image_p (object) | |||
| 8511 | 8511 | ||
| 8512 | static int | 8512 | static int |
| 8513 | xbm_scan (s, end, sval, ival) | 8513 | xbm_scan (s, end, sval, ival) |
| 8514 | char **s, *end; | 8514 | unsigned char **s, *end; |
| 8515 | char *sval; | 8515 | char *sval; |
| 8516 | int *ival; | 8516 | int *ival; |
| 8517 | { | 8517 | { |
| 8518 | int c; | 8518 | unsigned int c; |
| 8519 | 8519 | ||
| 8520 | loop: | 8520 | loop: |
| 8521 | 8521 | ||
| @@ -8645,11 +8645,11 @@ w32_create_pixmap_from_bitmap_data (int width, int height, char *data) | |||
| 8645 | 8645 | ||
| 8646 | static int | 8646 | static int |
| 8647 | xbm_read_bitmap_data (contents, end, width, height, data) | 8647 | xbm_read_bitmap_data (contents, end, width, height, data) |
| 8648 | char *contents, *end; | 8648 | unsigned char *contents, *end; |
| 8649 | int *width, *height; | 8649 | int *width, *height; |
| 8650 | unsigned char **data; | 8650 | unsigned char **data; |
| 8651 | { | 8651 | { |
| 8652 | char *s = contents; | 8652 | unsigned char *s = contents; |
| 8653 | char buffer[BUFSIZ]; | 8653 | char buffer[BUFSIZ]; |
| 8654 | int padding_p = 0; | 8654 | int padding_p = 0; |
| 8655 | int v10 = 0; | 8655 | int v10 = 0; |
| @@ -8827,7 +8827,7 @@ static int | |||
| 8827 | xbm_load_image (f, img, contents, end) | 8827 | xbm_load_image (f, img, contents, end) |
| 8828 | struct frame *f; | 8828 | struct frame *f; |
| 8829 | struct image *img; | 8829 | struct image *img; |
| 8830 | char *contents, *end; | 8830 | unsigned char *contents, *end; |
| 8831 | { | 8831 | { |
| 8832 | int rc; | 8832 | int rc; |
| 8833 | unsigned char *data; | 8833 | unsigned char *data; |
| @@ -8915,7 +8915,7 @@ xbm_load (f, img) | |||
| 8915 | if (STRINGP (file_name)) | 8915 | if (STRINGP (file_name)) |
| 8916 | { | 8916 | { |
| 8917 | Lisp_Object file; | 8917 | Lisp_Object file; |
| 8918 | char *contents; | 8918 | unsigned char *contents; |
| 8919 | int size; | 8919 | int size; |
| 8920 | struct gcpro gcpro1; | 8920 | struct gcpro gcpro1; |
| 8921 | 8921 | ||