aboutsummaryrefslogtreecommitdiffstats
path: root/src/android.c
diff options
context:
space:
mode:
authorPaul Eggert2024-01-28 00:15:38 -0800
committerPaul Eggert2024-01-28 00:26:44 -0800
commitad2c81082a62f9f781e4f5771fc223520d91cefd (patch)
tree7abd8b081eb665e84cb127e0c5396fa7df453bb4 /src/android.c
parenta3d7092114db09fee392ccc8187fde03376f2089 (diff)
downloademacs-ad2c81082a62f9f781e4f5771fc223520d91cefd.tar.gz
emacs-ad2c81082a62f9f781e4f5771fc223520d91cefd.zip
Prefer C23 ckd_* to Gnulib *_WRAPV and *_OK macros
* src/alloc.c (android_make_lisp_symbol) [HAVE_ANDROID && !__clang__]: * src/android.c (android_blit_copy, android_blit_xor) (android_get_image): * src/androidmenu.c (android_menu_show): * src/androidselect.c (Fandroid_get_clipboard_data) (android_notifications_notify_1): * src/androidterm.c (android_decode_utf16) (android_text_to_string): * src/haiku_select.cc (be_display_notification): * src/sfnt.c (sfnt_read_cmap_format_8, sfnt_read_cmap_format_12) (sfnt_read_cmap_format_14, sfnt_read_cmap_table_1) (sfnt_expand_compound_glyph_context, sfnt_poly_edges_exact) (sfnt_read_meta_table, sfnt_read_ttc_header) (sfnt_read_cvt_table, sfnt_read_fpgm_table) (sfnt_read_prep_table, sfnt_make_interpreter) (sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2) (sfnt_interpret_compound_glyph, sfnt_read_default_uvs_table) (sfnt_read_nondefault_uvs_table, sfnt_create_uvs_context) (sfnt_read_fvar_table, sfnt_read_gvar_table) (sfnt_read_avar_table, sfnt_read_cvar_table): * src/sfntfont-android.c (GET_SCANLINE_BUFFER): * src/textconv.c (really_commit_text, really_set_composing_text) (really_replace_text, get_surrounding_text): Prefer C2x stdckdint.h macros to intprops.h macros.
Diffstat (limited to 'src/android.c')
-rw-r--r--src/android.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/android.c b/src/android.c
index 51eb85a97e8..4a74f5b2af4 100644
--- a/src/android.c
+++ b/src/android.c
@@ -3963,10 +3963,10 @@ android_blit_copy (int src_x, int src_y, int width, int height,
3963 3963
3964 /* Turn both into offsets. */ 3964 /* Turn both into offsets. */
3965 3965
3966 if (INT_MULTIPLY_WRAPV (temp, pixel, &offset) 3966 if (ckd_mul (&offset, temp, pixel)
3967 || INT_MULTIPLY_WRAPV (i, mask_info->stride, &offset1) 3967 || ckd_mul (&offset1, i, mask_info->stride)
3968 || INT_ADD_WRAPV (offset, offset1, &offset) 3968 || ckd_add (&offset, offset, offset1)
3969 || INT_ADD_WRAPV ((uintptr_t) mask, offset, &start)) 3969 || ckd_add (&start, (uintptr_t) mask, offset))
3970 return; 3970 return;
3971 3971
3972 if (height <= 0) 3972 if (height <= 0)
@@ -4271,10 +4271,10 @@ android_blit_xor (int src_x, int src_y, int width, int height,
4271 4271
4272 /* Turn both into offsets. */ 4272 /* Turn both into offsets. */
4273 4273
4274 if (INT_MULTIPLY_WRAPV (temp, pixel, &offset) 4274 if (ckd_mul (&offset, temp, pixel)
4275 || INT_MULTIPLY_WRAPV (i, mask_info->stride, &offset1) 4275 || ckd_mul (&offset1, i, mask_info->stride)
4276 || INT_ADD_WRAPV (offset, offset1, &offset) 4276 || ckd_add (&offset, offset, offset1)
4277 || INT_ADD_WRAPV ((uintptr_t) mask, offset, &start)) 4277 || ckd_add (&start, (uintptr_t) mask, offset))
4278 return; 4278 return;
4279 4279
4280 mask = mask_current = (unsigned char *) start; 4280 mask = mask_current = (unsigned char *) start;
@@ -4899,9 +4899,9 @@ android_get_image (android_drawable handle,
4899 4899
4900 if (bitmap_info.format != ANDROID_BITMAP_FORMAT_A_8) 4900 if (bitmap_info.format != ANDROID_BITMAP_FORMAT_A_8)
4901 { 4901 {
4902 if (INT_MULTIPLY_WRAPV ((size_t) bitmap_info.stride, 4902 if (ckd_mul (&byte_size,
4903 (size_t) bitmap_info.height, 4903 (size_t) bitmap_info.stride,
4904 &byte_size)) 4904 (size_t) bitmap_info.height))
4905 { 4905 {
4906 ANDROID_DELETE_LOCAL_REF (bitmap); 4906 ANDROID_DELETE_LOCAL_REF (bitmap);
4907 memory_full (0); 4907 memory_full (0);