diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-09 14:52:31 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-10 10:52:20 +0100 |
commit | 2b93edde933e7401921c99990d5c0c309f2167a8 (patch) | |
tree | 9b45dfddb1ff94be0017bb1914bfde53baf5f294 /src/nvim/hardcopy.h | |
parent | ed8fbfaf5af9c806a2aa4fa83fe45dbddde8ef50 (diff) | |
download | rneovim-2b93edde933e7401921c99990d5c0c309f2167a8.tar.gz rneovim-2b93edde933e7401921c99990d5c0c309f2167a8.tar.bz2 rneovim-2b93edde933e7401921c99990d5c0c309f2167a8.zip |
Remove long_u: hardcopy: Refactor long_u.
- <color_related_stuff>: long_u --> uint32_t
Everywhere long_u was used to hold a color value.
Color values are supposed to be 32 bits at most.
Supported architectures have 32 bits ints, so we could have used plain
ints. But this wouldn't be future-proof, and would be wasteful if a
future architecture has ints bigger than 32 bits.
So, uint32_t is perfect to achieve optimal packing no matter the
architecture.
- bytes_to_print/bytes_printed: long_u --> size_t
Seems like the correct thing, and gets rid of some casts.
Diffstat (limited to 'src/nvim/hardcopy.h')
-rw-r--r-- | src/nvim/hardcopy.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/hardcopy.h b/src/nvim/hardcopy.h index fa171db989..9a74396ef4 100644 --- a/src/nvim/hardcopy.h +++ b/src/nvim/hardcopy.h @@ -1,12 +1,14 @@ #ifndef NVIM_HARDCOPY_H #define NVIM_HARDCOPY_H +#include <stdint.h> + /* * Structure to hold printing color and font attributes. */ typedef struct { - long_u fg_color; - long_u bg_color; + uint32_t fg_color; + uint32_t bg_color; int bold; int italic; int underline; |