Mercurial > vim
comparison src/gui_xmebw.c @ 24768:7334bf933510 v8.2.2922
patch 8.2.2922: computing array length is done in various ways
Commit: https://github.com/vim/vim/commit/eeec2548785b2dd245a31ab25d7bde0f88ea1a6d
Author: K.Takata <kentkt@csc.jp>
Date: Wed Jun 2 13:28:16 2021 +0200
patch 8.2.2922: computing array length is done in various ways
Problem: Computing array length is done in various ways.
Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes https://github.com/vim/vim/issues/8305)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Jun 2021 13:30:05 +0200 |
parents | 49d866e9b439 |
children | fc859aea8cec |
comparison
equal
deleted
inserted
replaced
24767:00b56eac455d | 24768:7334bf933510 |
---|---|
453 | 453 |
454 // Create the "insensitive" pixmap. | 454 // Create the "insensitive" pixmap. |
455 attr.valuemask = XpmColorSymbols | XpmCloseness | XpmColorKey; | 455 attr.valuemask = XpmColorSymbols | XpmCloseness | XpmColorKey; |
456 attr.closeness = 65535; // accuracy isn't crucial | 456 attr.closeness = 65535; // accuracy isn't crucial |
457 attr.colorsymbols = color; | 457 attr.colorsymbols = color; |
458 attr.numsymbols = sizeof(color) / sizeof(color[0]); | 458 attr.numsymbols = ARRAY_LENGTH(color); |
459 attr.color_key = XPM_MONO; | 459 attr.color_key = XPM_MONO; |
460 status = XpmCreatePixmapFromData(dpy, root, data, &pix, &mask, &attr); | 460 status = XpmCreatePixmapFromData(dpy, root, data, &pix, &mask, &attr); |
461 | 461 |
462 // Need to create new Pixmaps with the mask applied. | 462 // Need to create new Pixmaps with the mask applied. |
463 | 463 |