Lines Matching refs:b
54 void gen_info(bitmap_t *b, uint16_t n_colors) in gen_info() argument
71 b->width, b->height, n_colors, in gen_info()
81 bitmap_t *b = &bmp; in main() local
122 if (fread (&b->width, sizeof (uint16_t), 1, fp) != 1) in main()
125 if (fread (&b->height, sizeof (uint16_t), 1, fp) != 1) in main()
136 b->width = le_short(b->width); in main()
137 b->height = le_short(b->height); in main()
139 size = b->width * b->height; in main()
148 gen_info(b, n_colors); in main()
165 b->palette[(int)(i*3+2)] = fgetc(fp); in main()
166 b->palette[(int)(i*3+1)] = fgetc(fp); in main()
167 b->palette[(int)(i*3+0)] = fgetc(fp); in main()
172 (b->palette[(int)(i*3+0)] >> 4) & 0x0F, in main()
173 (b->palette[(int)(i*3+1)] >> 4) & 0x0F, in main()
174 (b->palette[(int)(i*3+2)] >> 4) & 0x0F, in main()
190 b->data = (uint8_t *)malloc(size); in main()
191 if (!b->data) in main()
202 b->data[i] = (uint8_t)fgetc(fp); in main()
204 for (i = (b->height - 1) * b->width; i >= 0; i -= b->width) { in main()
205 for (x = 0; x < b->width; x++) { in main()
206 b->data[i + x] = (uint8_t)fgetc(fp) in main()
216 b->data[i], in main()