diff options
| author | Paul Eggert | 2019-07-07 12:29:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-07 12:33:35 -0700 |
| commit | 8f522efe9a963cd3523ea6863f9bd44881cdf6b7 (patch) | |
| tree | 10ba28c937e142395bcc4d81580d24fa334e1227 /src/image.c | |
| parent | bda8a57141e6cb5455e1246c6ab394791fd6c582 (diff) | |
| download | emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.tar.gz emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.zip | |
Remove printmax_t etc.
printmax_t etc. were needed only for platforms that lacked
support for printing intmax_t. These platforms are now so
obsolete that they are no longer practical porting targets.
* src/image.c (gs_load): Fix unlikely buffer overrun
discovered while making these changes. It was introduced in
2011-07-17T00:34:43!eggert@cs.ucla.edu.
* src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
Remove. All uses replaced by their standard counterparts
intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c index 6ead12166b6..b4b6c1bac1c 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9735,8 +9735,8 @@ gs_image_p (Lisp_Object object) | |||
| 9735 | static bool | 9735 | static bool |
| 9736 | gs_load (struct frame *f, struct image *img) | 9736 | gs_load (struct frame *f, struct image *img) |
| 9737 | { | 9737 | { |
| 9738 | uprintmax_t printnum1, printnum2; | 9738 | uintmax_t printnum1, printnum2; |
| 9739 | char buffer[sizeof " " + INT_STRLEN_BOUND (printmax_t)]; | 9739 | char buffer[sizeof " " + 2 * INT_STRLEN_BOUND (intmax_t)]; |
| 9740 | Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; | 9740 | Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; |
| 9741 | Lisp_Object frame; | 9741 | Lisp_Object frame; |
| 9742 | double in_width, in_height; | 9742 | double in_width, in_height; |
| @@ -9788,12 +9788,14 @@ gs_load (struct frame *f, struct image *img) | |||
| 9788 | printnum1 = FRAME_X_DRAWABLE (f); | 9788 | printnum1 = FRAME_X_DRAWABLE (f); |
| 9789 | printnum2 = img->pixmap; | 9789 | printnum2 = img->pixmap; |
| 9790 | window_and_pixmap_id | 9790 | window_and_pixmap_id |
| 9791 | = make_formatted_string (buffer, "%"pMu" %"pMu, printnum1, printnum2); | 9791 | = make_formatted_string (buffer, "%"PRIuMAX" %"PRIuMAX, |
| 9792 | printnum1, printnum2); | ||
| 9792 | 9793 | ||
| 9793 | printnum1 = FRAME_FOREGROUND_PIXEL (f); | 9794 | printnum1 = FRAME_FOREGROUND_PIXEL (f); |
| 9794 | printnum2 = FRAME_BACKGROUND_PIXEL (f); | 9795 | printnum2 = FRAME_BACKGROUND_PIXEL (f); |
| 9795 | pixel_colors | 9796 | pixel_colors |
| 9796 | = make_formatted_string (buffer, "%"pMu" %"pMu, printnum1, printnum2); | 9797 | = make_formatted_string (buffer, "%"PRIuMAX" %"PRIuMAX, |
| 9798 | printnum1, printnum2); | ||
| 9797 | 9799 | ||
| 9798 | XSETFRAME (frame, f); | 9800 | XSETFRAME (frame, f); |
| 9799 | loader = image_spec_value (img->spec, QCloader, NULL); | 9801 | loader = image_spec_value (img->spec, QCloader, NULL); |