Changeset 96b02eb9 in mainline for uspace/srv/hid/fb


Ignore:
Timestamp:
2010-12-14T12:52:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

Location:
uspace/srv/hid/fb
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/ega.c

    r554debd r96b02eb9  
    230230static int save_screen(void)
    231231{
    232         ipcarg_t i;
     232        sysarg_t i;
    233233       
    234234        /* Find empty screen */
     
    245245}
    246246
    247 static int print_screen(ipcarg_t i)
     247static int print_screen(sysarg_t i)
    248248{
    249249        if ((i >= MAX_SAVED_SCREENS) || (saved_screens[i].data))
     
    276276                wchar_t c;
    277277               
    278                 ipcarg_t col;
    279                 ipcarg_t row;
    280                 ipcarg_t w;
    281                 ipcarg_t h;
     278                sysarg_t col;
     279                sysarg_t row;
     280                sysarg_t w;
     281                sysarg_t h;
    282282               
    283283                ssize_t rows;
     
    290290                uint32_t bg_rgb;
    291291               
    292                 ipcarg_t scr;
     292                sysarg_t scr;
    293293                int retval;
    294294               
     
    370370                       
    371371                        if (rows >= 0) {
    372                                 if ((ipcarg_t) rows > scr_height) {
     372                                if ((sysarg_t) rows > scr_height) {
    373373                                        retval = EINVAL;
    374374                                        break;
    375375                                }
    376376                        } else {
    377                                 if ((ipcarg_t) (-rows) > scr_height) {
     377                                if ((sysarg_t) (-rows) > scr_height) {
    378378                                        retval = EINVAL;
    379379                                        break;
  • uspace/srv/hid/fb/fb.c

    r554debd r96b02eb9  
    199199static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a);
    200200static int rgb_from_style(attr_rgb_t *rgb, int style);
    201 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
    202     ipcarg_t bg_color, ipcarg_t flags);
    203 
    204 static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,
    205     ipcarg_t bg_color, ipcarg_t attr);
     201static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
     202    sysarg_t bg_color, sysarg_t flags);
     203
     204static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
     205    sysarg_t bg_color, sysarg_t attr);
    206206
    207207static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor,
     
    10721072       
    10731073        static unsigned char *shm = NULL;
    1074         static ipcarg_t shm_id = 0;
     1074        static sysarg_t shm_id = 0;
    10751075        static size_t shm_size;
    10761076       
     
    15291529}
    15301530
    1531 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
    1532     ipcarg_t bg_color, ipcarg_t flags)
     1531static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
     1532    sysarg_t bg_color, sysarg_t flags)
    15331533{
    15341534        fg_color = (fg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0);
     
    15621562}
    15631563
    1564 static int fb_set_style(viewport_t *vport, ipcarg_t style)
     1564static int fb_set_style(viewport_t *vport, sysarg_t style)
    15651565{
    15661566        return rgb_from_style(&vport->attr, (int) style);
    15671567}
    15681568
    1569 static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,
    1570     ipcarg_t bg_color, ipcarg_t flags)
     1569static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
     1570    sysarg_t bg_color, sysarg_t flags)
    15711571{
    15721572        return rgb_from_idx(&vport->attr, fg_color, bg_color, flags);
  • uspace/srv/hid/fb/main.c

    r554debd r96b02eb9  
    114114                return -1;
    115115       
    116         ipcarg_t phonead;
     116        sysarg_t phonead;
    117117        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    118118                return -1;
  • uspace/srv/hid/fb/serial_console.c

    r554debd r96b02eb9  
    5555#define MAX_CONTROL 20
    5656
    57 static ipcarg_t scr_width;
    58 static ipcarg_t scr_height;
     57static sysarg_t scr_width;
     58static sysarg_t scr_height;
    5959static bool color = true;    /**< True if producing color output. */
    6060static bool utf8 = false;    /**< True if producing UTF8 output. */
    6161static putc_function_t putc_function;
    6262
    63 static ipcarg_t lastcol = 0;
    64 static ipcarg_t lastrow = 0;
     63static sysarg_t lastcol = 0;
     64static sysarg_t lastrow = 0;
    6565static attrs_t cur_attr = {
    6666        .t = at_style,
     
    130130}
    131131
    132 void serial_goto(const ipcarg_t col, const ipcarg_t row)
     132void serial_goto(const sysarg_t col, const sysarg_t row)
    133133{
    134134        if ((col > scr_width) || (row > scr_height))
     
    252252
    253253/** Set scrolling region. */
    254 void serial_set_scroll_region(ipcarg_t last_row)
     254void serial_set_scroll_region(sysarg_t last_row)
    255255{
    256256        char control[MAX_CONTROL];
     
    269269}
    270270
    271 void serial_console_init(putc_function_t putc_fn, ipcarg_t w, ipcarg_t h)
     271void serial_console_init(putc_function_t putc_fn, sysarg_t w, sysarg_t h)
    272272{
    273273        scr_width = w;
     
    286286 *
    287287 */
    288 static void draw_text_data(keyfield_t *data, ipcarg_t x0, ipcarg_t y0,
    289     ipcarg_t width, ipcarg_t height)
     288static void draw_text_data(keyfield_t *data, sysarg_t x0, sysarg_t y0,
     289    sysarg_t width, sysarg_t height)
    290290{
    291291        attrs_t *a0 = &data[0].attrs;
    292292        serial_set_attrs(a0);
    293293       
    294         ipcarg_t y;
     294        sysarg_t y;
    295295        for (y = 0; y < height; y++) {
    296296                serial_goto(x0, y0 + y);
    297297               
    298                 ipcarg_t x;
     298                sysarg_t x;
    299299                for (x = 0; x < width; x++) {
    300300                        attrs_t *attr = &data[y * width + x].attrs;
     
    337337               
    338338                wchar_t c;
    339                 ipcarg_t col;
    340                 ipcarg_t row;
    341                 ipcarg_t w;
    342                 ipcarg_t h;
     339                sysarg_t col;
     340                sysarg_t row;
     341                sysarg_t w;
     342                sysarg_t h;
    343343                ssize_t rows;
    344344               
     
    442442                       
    443443                        if (rows >= 0) {
    444                                 if ((ipcarg_t) rows > scr_height) {
     444                                if ((sysarg_t) rows > scr_height) {
    445445                                        retval = EINVAL;
    446446                                        break;
    447447                                }
    448448                        } else {
    449                                 if ((ipcarg_t) (-rows) > scr_height) {
     449                                if ((sysarg_t) (-rows) > scr_height) {
    450450                                        retval = EINVAL;
    451451                                        break;
  • uspace/srv/hid/fb/serial_console.h

    r554debd r96b02eb9  
    4444
    4545extern void serial_puts(const char *);
    46 extern void serial_goto(const ipcarg_t, const ipcarg_t);
     46extern void serial_goto(const sysarg_t, const sysarg_t);
    4747extern void serial_clrscr(void);
    4848extern void serial_scroll(ssize_t);
    4949extern void serial_cursor_disable(void);
    5050extern void serial_cursor_enable(void);
    51 extern void serial_set_scroll_region(ipcarg_t);
    52 extern void serial_console_init(putc_function_t, ipcarg_t, ipcarg_t);
     51extern void serial_set_scroll_region(sysarg_t);
     52extern void serial_console_init(putc_function_t, sysarg_t, sysarg_t);
    5353extern void serial_client_connection(ipc_callid_t, ipc_call_t *);
    5454
Note: See TracChangeset for help on using the changeset viewer.