|
From: Geert U. <ge...@li...> - 2002-08-19 19:25:06
|
If I look at these definitions in <linux/fb.h>:
| struct fb_copyarea {
| __u32 sx; /* screen-relative */
| __u32 sy;
| __u32 width;
| __u32 height;
| __u32 dx;
| __u32 dy;
| };
|
| struct fb_fillrect {
| __u32 dx; /* screen-relative */
| __u32 dy;
| __u32 width;
| __u32 height;
| __u32 color;
| __u32 rop;
| };
|
| struct fb_image {
| __u32 width; /* Size of image */
| __u32 height;
| __u16 dx; /* Where to place image */
| __u16 dy;
| __u32 fg_color; /* Only used when a mono bitmap */
| __u32 bg_color;
| __u8 depth; /* Dpeth of the image */
| char *data; /* Pointer to image data */
| };
Then I start to wonder ...
- why are dx and dy in struct fb_image of type __u16, while they are of type
__u32 in struct fb_copyarea and struct fb_fillrect?
- why is the order of the fields different for each structure?
Wouldn't it be better to always use the same order for the common fields,
e.g.
__u32 dx;
__u32 dy;
__u32 width;
__u32 height;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|