* clear out some warnings by gcc 9.3.1.
[alpine.git] / pith / bitmap.h
blobab3631bd7a2f47afb506dc1e84fff75c41168e90
1 /*
2 * $Id: bitmap.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2020 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_BITMAP_INCLUDED
18 #define PITH_BITMAP_INCLUDED
21 #include "../pith/conftype.h"
25 * Max size of a bitmap based on largest customer: feature list count
26 * Problems if a screen's keymenu bitmap ever gets wider than feature list.
28 #define BM_SIZE ((F_FEATURE_LIST_COUNT / 8) \
29 + ((F_FEATURE_LIST_COUNT % 8) ? 1 : 0))
31 typedef unsigned char bitmap_t[BM_SIZE];
33 /* clear entire bitmap */
34 #define clrbitmap(map) memset((void *)(map), 0, (size_t)BM_SIZE)
36 /* set entire bitmap */
37 #define setbitmap(map) memset((void *)(map), 0xff, (size_t)BM_SIZE)
40 #endif /* PITH_BITMAP_INCLUDED */