static int set_SCRSIZE(int rows){ int real_rows,real_cols; SCR_SIZE = rows; real_rows = rows; if( get_winsize(0,&real_rows,&real_cols) == 0 ) SCR_SIZE = real_rows; return SCR_SIZE; }
static int init_bar(struct bar_data* d) { if (get_winsize(&d->row, &d->col)) return STRM_NG; d->max = 1; d->offset = 0; d->dlen = d->col-6; d->llen = d->row-3; d->data = malloc((d->dlen)*sizeof(double)); for (int i=0;i<d->dlen;i++) { d->data[i] = 0; } show_title(d); return STRM_OK; }
void ft_jumprint(t_edit **lst) { int jump; int i; struct winsize ws; get_winsize(&ws); i = 0; jump = ((l_list(lst) + 3) / ws.ws_col) - ((ft_pcur(lst) + 3) / ws.ws_col); if (!((l_list(lst) + 3) % ws.ws_col) == 0) { while (i < jump) { ft_tputs("do"); i++; } } }