mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user