static inline void set_view_attr(struct view *view, enum line_type type) { if (!view->curline->selected && view->curtype != type) { (void) wattrset(view->win, get_line_attr(type)); wchgat(view->win, -1, 0, get_line_color(type), NULL); view->curtype = type; } }
void update_bus_text_layers() { for( int i = 0; i < NUM_BUSES_PER_PAGE; ++i ) { int base_index = NUM_BUSES_PER_PAGE * s_current_page; int bus_index = base_index + i; set_bus_text_layer( i, s_buses[ bus_index ].line_string, get_line_color( s_buses[ bus_index ].line_string ), s_buses[ bus_index ].dest_string, s_buses[ bus_index ].eta_string ); } }