Changeset afbe96a in mainline


Ignore:
Timestamp:
2006-07-04T17:18:24Z (18 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.).

Files:
12 added
15 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{
  • libc/arch/amd64/include/context_offset.h

    r09087d2 rafbe96a  
    99#define OFFSET_R15 0x38
    1010#define OFFSET_TLS 0x40
    11 
    12 
    13  /** @}
    14  */
    1511 
    1612 
  • libc/arch/amd64/include/limits.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcamd64
     29/** @addtogroup libcamd64
    3030 * @{
    3131 */
     
    4343#endif
    4444
    45 
    46 
    47 
    48  /** @}
     45/** @}
    4946 */
    50  
    51  
  • libc/arch/amd64/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcamd64
     29/** @addtogroup libcamd64
    3030 * @{
    3131 */
     
    4141typedef ssize_t off_t;
    4242
    43 typedef char int8_t;
     43typedef signed char int8_t;
    4444typedef short int int16_t;
    4545typedef int int32_t;
     
    5151typedef unsigned long long int uint64_t;
    5252
     53typedef uint64_t uintptr_t;
     54
    5355#endif
    5456
    55 
    56  /** @}
     57/** @}
    5758 */
    58  
    59  
  • libc/arch/ia32/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcia32
     29/** @addtogroup libcia32
    3030 * @{
    3131 */
     
    5151typedef unsigned long long int uint64_t;
    5252
     53typedef uint32_t uintptr_t;
     54
    5355#endif
    5456
    55 
    56  /** @}
     57/** @}
    5758 */
    58  
    59  
  • libc/arch/ia64/include/psthread.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcia64       
     29/** @addtogroup libcia64       
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __LIBC__ia64PSTHREAD_H__
    36 #define __LIBC__ia64PSTHREAD_H__
     35#ifndef LIBC_ia64_PSTHREAD_H_
     36#define LIBC_ia64_PSTHREAD_H_
    3737
    3838#include <types.h>
    3939#include <align.h>
    4040#include <libarch/stack.h>
    41 #include <arch/types.h>
     41#include <libarch/types.h>
    4242
    4343/*
  • libc/arch/ia64/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcia64       
     29/** @addtogroup libcia64       
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __LIBC__TYPES_H__
    36 #define __LIBC__TYPES_H__
     35#ifndef LIBC_ia64_TYPES_H_
     36#define LIBC_ia64_TYPES_H_
    3737
    3838typedef unsigned long long sysarg_t;
     
    5151typedef unsigned long int uint64_t;
    5252
     53typedef uint64_t uintptr_t;
     54
     55typedef unsigned char __r8;                     /* Reserve byte */
     56typedef unsigned short __r16;
     57typedef unsigned int __r32;
     58typedef unsigned long __r64;
     59
     60typedef struct __r128{
     61        __r64 lo;
     62        __r64 hi;
     63} __r128;
     64
    5365#endif
    5466
    55  /** @}
     67/** @}
    5668 */
    57 
  • libc/arch/mips32/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcmips32     
     29/** @addtogroup libcmips32     
    3030 * @{
    3131 */
    3232/** @file
    33  * @ingroup libcmips32eb       
     33 * @ingroup libcmips32eb
    3434 */
    3535
    36 #ifndef __LIBC__TYPES_H__
    37 #define __LIBC__TYPES_H__
     36#ifndef LIBC_mips32_TYPES_H_
     37#define LIBC_mips32_TYPES_H_
    3838
    3939typedef unsigned int sysarg_t;
     
    5252typedef unsigned long long int uint64_t;
    5353
     54typedef uint32_t uintptr_t;
     55
    5456#endif
    5557
    56  /** @}
     58/** @}
    5759 */
    58 
  • libc/arch/ppc32/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcppc32     
     29/** @addtogroup libcppc32       
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __LIBC__TYPES_H__
    36 #define __LIBC__TYPES_H__
     35#ifndef LIBC_ppc32_TYPES_H_
     36#define LIBC_ppc32_TYPES_H_
    3737
    3838typedef unsigned int sysarg_t;
     
    5151typedef unsigned long long int uint64_t;
    5252
     53typedef uint32_t uintptr_t;
     54
    5355#endif
    5456
    55  /** @}
     57/** @}
    5658 */
    5759
  • libc/arch/ppc64/include/types.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcppc64     
     29/** @addtogroup libcppc64       
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __LIBC__TYPES_H__
    36 #define __LIBC__TYPES_H__
     35#ifndef LIBC_ppc64_TYPES_H_
     36#define LIBC_ppc64_TYPES_H_
    3737
    3838typedef unsigned long sysarg_t;
     
    5151typedef unsigned long int uint64_t;
    5252
     53typedef uint64_t uintptr_t;
     54
    5355#endif
    5456
    55  /** @}
     57/** @}
    5658 */
    57 
  • libc/generic/psthread.c

    r09087d2 rafbe96a  
    3939#include <thread.h>
    4040#include <stdio.h>
    41 #include <kernel/arch/faddr.h>
     41#include <libarch/faddr.h>
    4242#include <futex.h>
    4343#include <assert.h>
  • libc/generic/thread.c

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libc
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3636#include <libc.h>
    3737#include <stdlib.h>
    38 #include <arch/faddr.h>
     38#include <libarch/faddr.h>
    3939#include <kernel/proc/uarg.h>
    4040#include <psthread.h>
     
    153153}
    154154
    155 
    156 
    157  /** @}
     155/** @}
    158156 */
    159157 
  • libc/include/ipc/fb.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libcipc
     29/** @addtogroup libcipc
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #include <arch/types.h>
    36 #include <types.h>
    37 
    38 #ifndef __libc__FB_H__
    39 #define __libc__FB_H__
     35#ifndef LIBC_FB_H_
     36#define LIBC_FB_H_
    4037
    4138#define FB_PUTCHAR           1025
     
    7572#endif
    7673
    77 
    78  /** @}
     74/** @}
    7975 */
    80  
    81  
  • libc/include/types.h

    r09087d2 rafbe96a  
    11#include <libarch/types.h>
    2 
    3 
    4  /** @}
    5  */
    6  
    7  
  • libc/include/unistd.h

    r09087d2 rafbe96a  
    2727 */
    2828
    29  /** @addtogroup libc
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3737
    3838#include <types.h>
    39 #include <arch/mm/page.h>
     39#include <libarch/config.h>
    4040
    4141#define NULL 0
     
    5050#endif
    5151
    52 
    53  /** @}
     52/** @}
    5453 */
    5554 
Note: See TracChangeset for help on using the changeset viewer.