Changeset afbe96a in mainline for fb/fb.c


Ignore:
Timestamp:
2006-07-04T17:18:24Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0166e99
Parents:
09087d2
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/fb.c

    r09087d2 rafbe96a  
    7171
    7272struct {
    73         __u8 *fbaddress ;
     73        uint8_t *fbaddress ;
    7474
    7575        unsigned int xres ;
     
    9595        int cursor_shown;
    9696        /* Double buffering */
    97         __u8 *dbdata;
     97        uint8_t *dbdata;
    9898        unsigned int dboffset;
    9999        unsigned int paused;
     
    121121        unsigned int width;
    122122        unsigned int height;
    123         __u8 *data;
     123        uint8_t *data;
    124124} pixmap_t;
    125125static pixmap_t pixmaps[MAX_PIXMAPS];
     
    154154static void rgb_3byte(void *dst, int rgb)
    155155{
    156         __u8 *scr = dst;
     156        uint8_t *scr = dst;
    157157#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
    158158        scr[0] = RED(rgb, 8);
     
    170170static int byte3_rgb(void *src)
    171171{
    172         __u8 *scr = src;
     172        uint8_t *scr = src;
    173173#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
    174174        return scr[0] << 16 | scr[1] << 8 | scr[2];
     
    182182{
    183183        /* 5-bit, 6-bits, 5-bits */
    184         *((__u16 *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5);
     184        *((uint16_t *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5);
    185185}
    186186
     
    188188static int byte2_rgb(void *src)
    189189{
    190         int color = *(__u16 *)(src);
     190        int color = *(uint16_t *)(src);
    191191        return (((color >> 11) & 0x1f) << (16 + 3)) | (((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3);
    192192}
     
    195195static void rgb_1byte(void *dst, int rgb)
    196196{
    197         *(__u8 *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
     197        *(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
    198198}
    199199
     
    201201static int byte1_rgb(void *src)
    202202{
    203         int color = *(__u8 *)src;
     203        int color = *(uint8_t *)src;
    204204        return (((color >> 5) & 0x7) << (16 + 5)) | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5);
    205205}
     
    377377 * @param transparent If false, print background color
    378378 */
    379 static void draw_glyph(viewport_t *vport,__u8 glyph, unsigned int sx, unsigned int sy,
     379static void draw_glyph(viewport_t *vport,uint8_t glyph, unsigned int sx, unsigned int sy,
    380380                       style_t style, int transparent)
    381381{
Note: See TracChangeset for help on using the changeset viewer.