Subversion Repositories HelenOS

Rev

Rev 2015 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2015 Rev 2065
Line 125... Line 125...
125
 
125
 
126
    ipl = interrupts_disable();
126
    ipl = interrupts_disable();
127
    spinlock_lock(&egalock);
127
    spinlock_lock(&egalock);
128
 
128
 
129
    switch (ch) {
129
    switch (ch) {
130
        case '\n':
130
    case '\n':
131
            ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW;
131
        ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW;
132
            break;
132
        break;
133
        case '\t':
133
    case '\t':
134
            ega_cursor = (ega_cursor + 8) - ega_cursor % 8;
134
        ega_cursor = (ega_cursor + 8) - ega_cursor % 8;
135
            break;
135
        break;
136
        case '\b':
136
    case '\b':
137
            if (ega_cursor % ROW)
137
        if (ega_cursor % ROW)
138
                ega_cursor--;
138
            ega_cursor--;
139
            break;
139
        break;
140
        default:
140
    default:
141
            ega_display_char(ch);
141
        ega_display_char(ch);
142
            ega_cursor++;
142
        ega_cursor++;
143
            break;
143
        break;
144
    }
144
    }
145
    ega_check_cursor();
145
    ega_check_cursor();
146
    ega_move_cursor();
146
    ega_move_cursor();
147
 
147
 
148
    spinlock_unlock(&egalock);
148
    spinlock_unlock(&egalock);