Changeset e273e9e in mainline for uspace/app/terminal/terminal.c


Ignore:
Timestamp:
2024-10-03T18:48:48Z (8 days ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
5132379
Parents:
b2c9e42c
Message:

Move link out of cons_event_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/terminal/terminal.c

    rb2c9e42c re273e9e  
    403403                if (pos < size) {
    404404                        link_t *link = prodcons_consume(&term->input_pc);
    405                         cons_event_t *event = list_get_instance(link, cons_event_t, link);
     405                        terminal_event_t *qevent = list_get_instance(link,
     406                            terminal_event_t, link);
     407                        cons_event_t *event = &qevent->ev;
    406408
    407409                        /* Accept key presses of printable chars only. */
     
    417419                        }
    418420
    419                         free(event);
     421                        free(qevent);
    420422                }
    421423        }
     
    635637        terminal_t *term = srv_to_terminal(srv);
    636638        link_t *link = prodcons_consume(&term->input_pc);
    637         cons_event_t *ev = list_get_instance(link, cons_event_t, link);
    638 
    639         *event = *ev;
     639        terminal_event_t *ev = list_get_instance(link, terminal_event_t, link);
     640
     641        *event = ev->ev;
    640642        free(ev);
    641643        return EOK;
     
    823825{
    824826        /* Got key press/release event */
    825         cons_event_t *event =
    826             (cons_event_t *) malloc(sizeof(cons_event_t));
     827        terminal_event_t *event =
     828            (terminal_event_t *) malloc(sizeof(terminal_event_t));
    827829        if (event == NULL)
    828830                return;
    829831
    830         *event = *ev;
     832        event->ev = *ev;
    831833        link_initialize(&event->link);
    832834
Note: See TracChangeset for help on using the changeset viewer.