Exemplo n.º 1
0
int
StructSpec::lookup_field (ustring name) const
{
    for (int i = 0, e = numfields();  i < e;  ++i)
        if (field(i).name == name)
            return i;
    return -1;
}
Exemplo n.º 2
0
static void
screen_next_col(Screen *s)
{
	s->x_pos = 0;
	s->x_col++;

	if (s->x_col >= numfields(s)) {
		s->x_col = rightmost(s);
	}
}
Exemplo n.º 3
0
static void
screen_scroll_right(Screen *s)
{
	s->x_pos++;

	if (s->x_pos > maxlen(s,s->x_col)) {

		s->x_pos = 0;
		s->x_col++;

		if (s->x_col >= numfields(s)) {

			s->x_col = rightmost(s);
			s->x_pos = maxlen(s,s->x_col);
		}
	}
}