diff options
| author | Paul Eggert | 2011-01-30 14:17:44 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-01-30 14:17:44 -0800 |
| commit | 42a5b22fc0201fe98ad8a093c3ab91122ab3a72b (patch) | |
| tree | e9e37d432417ac382a36b9e6f26db38e59ca0585 /src/image.c | |
| parent | 3de84ad9c45382c181e3383d433442f4e19ba722 (diff) | |
| download | emacs-42a5b22fc0201fe98ad8a093c3ab91122ab3a72b.tar.gz emacs-42a5b22fc0201fe98ad8a093c3ab91122ab3a72b.zip | |
Use SSDATA when the context wants char *.
* alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
* dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
* fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
* lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
* xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
Use SSDATA (not SDATA) when the context of the expression wants
char * (not unsigned char *).
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/image.c b/src/image.c index 67de90e32a7..d533d7edee6 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -376,7 +376,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 376 | dpyinfo->bitmaps[id - 1].depth = 1; | 376 | dpyinfo->bitmaps[id - 1].depth = 1; |
| 377 | dpyinfo->bitmaps[id - 1].height = height; | 377 | dpyinfo->bitmaps[id - 1].height = height; |
| 378 | dpyinfo->bitmaps[id - 1].width = width; | 378 | dpyinfo->bitmaps[id - 1].width = width; |
| 379 | strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); | 379 | strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file)); |
| 380 | 380 | ||
| 381 | return id; | 381 | return id; |
| 382 | #endif /* HAVE_X_WINDOWS */ | 382 | #endif /* HAVE_X_WINDOWS */ |
| @@ -770,7 +770,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords, | |||
| 770 | 770 | ||
| 771 | /* Find key in KEYWORDS. Error if not found. */ | 771 | /* Find key in KEYWORDS. Error if not found. */ |
| 772 | for (i = 0; i < nkeywords; ++i) | 772 | for (i = 0; i < nkeywords; ++i) |
| 773 | if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) | 773 | if (strcmp (keywords[i].name, SSDATA (SYMBOL_NAME (key))) == 0) |
| 774 | break; | 774 | break; |
| 775 | 775 | ||
| 776 | if (i == nkeywords) | 776 | if (i == nkeywords) |
| @@ -1366,7 +1366,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name, | |||
| 1366 | 1366 | ||
| 1367 | xassert (STRINGP (color_name)); | 1367 | xassert (STRINGP (color_name)); |
| 1368 | 1368 | ||
| 1369 | if (x_defined_color (f, SDATA (color_name), &color, 1)) | 1369 | if (x_defined_color (f, SSDATA (color_name), &color, 1)) |
| 1370 | { | 1370 | { |
| 1371 | /* This isn't called frequently so we get away with simply | 1371 | /* This isn't called frequently so we get away with simply |
| 1372 | reallocating the color vector to the needed size, here. */ | 1372 | reallocating the color vector to the needed size, here. */ |
| @@ -2857,7 +2857,7 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2857 | return 0; | 2857 | return 0; |
| 2858 | } | 2858 | } |
| 2859 | 2859 | ||
| 2860 | contents = slurp_file (SDATA (file), &size); | 2860 | contents = slurp_file (SSDATA (file), &size); |
| 2861 | if (contents == NULL) | 2861 | if (contents == NULL) |
| 2862 | { | 2862 | { |
| 2863 | image_error ("Error loading XBM image `%s'", img->spec, Qnil); | 2863 | image_error ("Error loading XBM image `%s'", img->spec, Qnil); |
| @@ -2934,7 +2934,7 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2934 | } | 2934 | } |
| 2935 | } | 2935 | } |
| 2936 | else if (STRINGP (data)) | 2936 | else if (STRINGP (data)) |
| 2937 | bits = SDATA (data); | 2937 | bits = SSDATA (data); |
| 2938 | else | 2938 | else |
| 2939 | bits = XBOOL_VECTOR (data)->data; | 2939 | bits = XBOOL_VECTOR (data)->data; |
| 2940 | 2940 | ||
| @@ -3441,14 +3441,14 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3441 | if (STRINGP (name)) | 3441 | if (STRINGP (name)) |
| 3442 | { | 3442 | { |
| 3443 | xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); | 3443 | xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); |
| 3444 | strcpy (xpm_syms[i].name, SDATA (name)); | 3444 | strcpy (xpm_syms[i].name, SSDATA (name)); |
| 3445 | } | 3445 | } |
| 3446 | else | 3446 | else |
| 3447 | xpm_syms[i].name = ""; | 3447 | xpm_syms[i].name = ""; |
| 3448 | if (STRINGP (color)) | 3448 | if (STRINGP (color)) |
| 3449 | { | 3449 | { |
| 3450 | xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); | 3450 | xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); |
| 3451 | strcpy (xpm_syms[i].value, SDATA (color)); | 3451 | strcpy (xpm_syms[i].value, SSDATA (color)); |
| 3452 | } | 3452 | } |
| 3453 | else | 3453 | else |
| 3454 | xpm_syms[i].value = ""; | 3454 | xpm_syms[i].value = ""; |
| @@ -3491,7 +3491,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3491 | &attrs); | 3491 | &attrs); |
| 3492 | #else | 3492 | #else |
| 3493 | rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 3493 | rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 3494 | SDATA (file), &img->pixmap, &img->mask, | 3494 | SSDATA (file), &img->pixmap, &img->mask, |
| 3495 | &attrs); | 3495 | &attrs); |
| 3496 | #endif /* HAVE_NTGUI */ | 3496 | #endif /* HAVE_NTGUI */ |
| 3497 | } | 3497 | } |
| @@ -3514,7 +3514,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3514 | &attrs); | 3514 | &attrs); |
| 3515 | #else | 3515 | #else |
| 3516 | rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 3516 | rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 3517 | SDATA (buffer), | 3517 | SSDATA (buffer), |
| 3518 | &img->pixmap, &img->mask, | 3518 | &img->pixmap, &img->mask, |
| 3519 | &attrs); | 3519 | &attrs); |
| 3520 | #endif /* HAVE_NTGUI */ | 3520 | #endif /* HAVE_NTGUI */ |
| @@ -5101,7 +5101,7 @@ pbm_load (struct frame *f, struct image *img) | |||
| 5101 | return 0; | 5101 | return 0; |
| 5102 | } | 5102 | } |
| 5103 | 5103 | ||
| 5104 | contents = slurp_file (SDATA (file), &size); | 5104 | contents = slurp_file (SSDATA (file), &size); |
| 5105 | if (contents == NULL) | 5105 | if (contents == NULL) |
| 5106 | { | 5106 | { |
| 5107 | image_error ("Error reading `%s'", file, Qnil); | 5107 | image_error ("Error reading `%s'", file, Qnil); |
| @@ -5603,7 +5603,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5603 | } | 5603 | } |
| 5604 | 5604 | ||
| 5605 | /* Open the image file. */ | 5605 | /* Open the image file. */ |
| 5606 | fp = fopen (SDATA (file), "rb"); | 5606 | fp = fopen (SSDATA (file), "rb"); |
| 5607 | if (!fp) | 5607 | if (!fp) |
| 5608 | { | 5608 | { |
| 5609 | image_error ("Cannot open image file `%s'", file, Qnil); | 5609 | image_error ("Cannot open image file `%s'", file, Qnil); |
| @@ -5740,7 +5740,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5740 | /* The user specified `:background', use that. */ | 5740 | /* The user specified `:background', use that. */ |
| 5741 | { | 5741 | { |
| 5742 | XColor color; | 5742 | XColor color; |
| 5743 | if (x_defined_color (f, SDATA (specified_bg), &color, 0)) | 5743 | if (x_defined_color (f, SSDATA (specified_bg), &color, 0)) |
| 5744 | { | 5744 | { |
| 5745 | png_color_16 user_bg; | 5745 | png_color_16 user_bg; |
| 5746 | 5746 | ||
| @@ -6321,7 +6321,7 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6321 | return 0; | 6321 | return 0; |
| 6322 | } | 6322 | } |
| 6323 | 6323 | ||
| 6324 | fp = fopen (SDATA (file), "rb"); | 6324 | fp = fopen (SSDATA (file), "rb"); |
| 6325 | if (fp == NULL) | 6325 | if (fp == NULL) |
| 6326 | { | 6326 | { |
| 6327 | image_error ("Cannot open `%s'", file, Qnil); | 6327 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -6756,7 +6756,7 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6756 | 6756 | ||
| 6757 | /* Try to open the image file. Casting return value avoids a | 6757 | /* Try to open the image file. Casting return value avoids a |
| 6758 | GCC warning on W32. */ | 6758 | GCC warning on W32. */ |
| 6759 | tiff = (TIFF *)fn_TIFFOpen (SDATA (file), "r"); | 6759 | tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r"); |
| 6760 | if (tiff == NULL) | 6760 | if (tiff == NULL) |
| 6761 | { | 6761 | { |
| 6762 | image_error ("Cannot open `%s'", file, Qnil); | 6762 | image_error ("Cannot open `%s'", file, Qnil); |