/freebsd/contrib/ncurses/menu/ |
H A D | m_format.c | 60 set_menu_format(MENU *menu, int rows, int cols) in MENU_EXPORT() 63 T((T_CALLED("set_menu_format(%p,%d,%d)"), (void *)menu, rows, cols)); in MENU_EXPORT() 65 if (rows < 0 || cols < 0) in MENU_EXPORT() 80 if (cols == 0) in MENU_EXPORT() 81 cols = menu->fcols; in MENU_EXPORT() 87 menu->fcols = (short)cols; in MENU_EXPORT() 89 assert(rows > 0 && cols > 0); in MENU_EXPORT() 90 total_rows = (menu->nitems - 1) / cols + 1; in MENU_EXPORT() 92 minimum(menu->nitems, cols) : in MENU_EXPORT() 96 menu->cols = (short)total_cols; in MENU_EXPORT() [all …]
|
H A D | m_scale.c | 55 scale_menu(const MENU *menu, int *rows, int *cols) in MENU_EXPORT() 60 (void *)cols)); in MENU_EXPORT() 69 if (cols) in MENU_EXPORT() 70 *cols = menu->width; in MENU_EXPORT()
|
/freebsd/contrib/bsddialog/lib/ |
H A D | bsddialog.h | 190 int cols, unsigned int *year, unsigned int *month, unsigned int *day); 194 int cols, unsigned int menurows, unsigned int nitems, 199 int cols, unsigned int *year, unsigned int *month, unsigned int *day); 203 int cols, unsigned int formheight, unsigned int nitems, 208 int cols, unsigned int perc, int fd, const char *sep, const char *end); 212 int cols); 216 int cols, unsigned int menurows, unsigned int nitems, 221 int cols, unsigned int mainperc, unsigned int nminibars, 226 int cols, unsigned int menurows, unsigned int ngroups, 231 int cols); [all...] |
H A D | messagebox.c | 58 if (set_widget_size(d->conf, d->rows, d->cols, &d->h, &d->w) != 0) in message_size_position() 60 if (set_widget_autosize(d->conf, d->rows, d->cols, &d->h, &d->w, in message_size_position() 96 do_message(struct bsddialog_conf *conf, const char *text, int rows, int cols, in do_message() argument 105 if (prepare_dialog(conf, text, rows, cols, &d) != 0) in do_message() 199 int cols) 201 return (do_message(conf, text, rows, cols, OK_LABEL, NULL)); in bsddialog_yesno() argument 206 int cols) 208 return (do_message(conf, text, rows, cols, "Yes", "No")); in bsddialog_infobox() argument 213 int cols) in bsddialog_infobox() 218 if (prepare_dialog(conf, text, rows, cols, in bsddialog_infobox() 194 bsddialog_msgbox(struct bsddialog_conf * conf,const char * text,int rows,int cols) bsddialog_msgbox() argument [all...] |
H A D | lib_util.c | 160 int str_props(const char *mbstring, unsigned int *cols, bool *has_multi_col) in str_props() argument 184 if (cols != NULL) in str_props() 185 *cols = ncol; in str_props() 458 RETURN_ERROR("Terminal too small, screen cols - shadow <= 0"); in widget_max_width() 463 RETURN_ERROR("Terminal too small, screen cols - shadow " in widget_max_width() 678 text_size(struct bsddialog_conf *conf, int rows, int cols, const char *text, in text_size() argument 701 if (cols == BSDDIALOG_AUTOSIZE) { in text_size() 704 } else if (cols == BSDDIALOG_FULLSCREEN) { in text_size() 708 startwtext = cols - BORDERS - TEXTHMARGINS; in text_size() 719 RETURN_FMTERROR("(fixed cols o in text_size() 799 set_widget_size(struct bsddialog_conf * conf,int rows,int cols,int * h,int * w) set_widget_size() argument 829 set_widget_autosize(struct bsddialog_conf * conf,int rows,int cols,int * h,int * w,const char * text,int * rowstext,struct buttons * bs,int hnotext,int minw) set_widget_autosize() argument 1126 print_string(WINDOW * win,int * rows,int cols,int * y,int * x,wchar_t * str,bool color) print_string() argument 1183 int i, j, z, rows, cols, x, y, tablen; print_textpad() local 1328 prepare_dialog(struct bsddialog_conf * conf,const char * text,int rows,int cols,struct dialog * d) prepare_dialog() argument [all...] |
H A D | lib_util.h | 103 int rows, cols; /* API rows and cols: -1, 0, >0 */ 118 int str_props(const char *mbstring, unsigned int *cols, bool *has_multi_col); 145 set_widget_size(struct bsddialog_conf *conf, int rows, int cols, int *h, 149 set_widget_autosize(struct bsddialog_conf *conf, int rows, int cols, int *h, 166 int cols, struct dialog *d); 98 int rows, cols; /* API rows and cols: -1, 0, >0 */ global() member
|
/freebsd/contrib/nvi/vi/ |
H A D | vs_relative.c | 38 vip->sc_smap->coff : (vip->sc_smap->soff - 1) * sp->cols) + in vs_column() 54 size_t cols, screens; in vs_screens() local 73 cols = vs_columns(sp, NULL, lno, cnop, NULL); in vs_screens() 75 screens = (cols / sp->cols + (cols % sp->cols ? 1 : 0)); in vs_screens() 147 if (!leftright && curoff >= sp->cols) { \ in vs_columns() 150 scno -= scno % sp->cols; \ in vs_columns() 152 curoff -= sp->cols; \ in vs_columns() 239 off = cno / sp->cols; in vs_colpos() 240 cno %= sp->cols; in vs_colpos() 242 for (; len && scno < sp->cols; --len) in vs_colpos() [all …]
|
H A D | vs_split.c | 83 new->cols = sp->cols; in vs_split() 207 size_t cols; in vs_vsplit() local 212 if (sp->cols / 2 <= MINIMUM_SCREEN_COLS) { in vs_vsplit() 243 cols = sp->cols / 2; in vs_vsplit() 244 new->cols = sp->cols - cols - 1; in vs_vsplit() 245 sp->cols = cols; in vs_vsplit() 246 new->coff = sp->coff + cols + 1; in vs_vsplit() 425 tsp->cols += sp->cols + 1; /* XXX: DIVIDER */ in vs_discard() 466 if (tsp->coff + tsp->cols + 1 != sp->coff) in vs_join() 501 if (tsp->coff != sp->coff + sp->cols + 1) in vs_join() [all …]
|
H A D | vs_refresh.c | 615 (off != 0 && off + sp->cols < cnt)) { in vs_paint() 618 } while (off + sp->cols < cnt); in vs_paint() 774 size_t cols, curcol, curlen, endpoint, len, midpoint; in vs_modeline() local 805 for (ellipsis = 0, cols = sp->cols / 2; --p > wp;) { in vs_modeline() 810 if ((curlen += KEY_COL(sp, *p)) > cols) { in vs_modeline() 814 while (curlen > cols) { in vs_modeline() 847 cols = sp->cols - 1; in vs_modeline() 859 midpoint = (cols - ((len + 1) / 2)) / 2; in vs_modeline() 863 } else if (curlen + 2 + len < cols) { in vs_modeline() 876 endpoint = cols; in vs_modeline()
|
/freebsd/lib/libutil/ |
H A D | hexdump.c | 45 int cols; in hexdump() local 55 cols = flags & HD_COLUMN_MASK; in hexdump() 57 cols = 16; in hexdump() 60 for (i = 0; i < length; i+= cols) { in hexdump() 68 for (j = 0; j < cols; j++) { in hexdump() 79 for (j = 0; j < cols; j++) { in hexdump()
|
/freebsd/contrib/ncurses/form/ |
H A D | frm_scale.c | 49 scale_form(const FORM *form, int *rows, int *cols) in FORM_EXPORT() 54 (void *)cols)); in FORM_EXPORT() 64 if (cols) in FORM_EXPORT() 65 *cols = form->cols; in FORM_EXPORT()
|
H A D | fld_info.c | 52 int *rows, int *cols, in FORM_EXPORT() 58 (void *)rows, (void *)cols, in FORM_EXPORT() 67 if (cols) in FORM_EXPORT() 68 *cols = field->cols; in FORM_EXPORT()
|
H A D | frm_data.c | 153 pos = form->begincol + field->cols; in data_ahead() 158 if (check_len >= field->cols) in data_ahead() 159 check_len = field->cols; in data_ahead() 163 pos += field->cols; in data_ahead() 179 if (!Only_Padding(form->w, field->cols, field->pad)) in data_ahead()
|
H A D | fld_def.c | 276 new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) in new_field() argument 284 T((T_CALLED("new_field(%d,%d,%d,%d,%d,%d)"), rows, cols, frow, fcol, nrow, nbuf)); in new_field() 286 cols > 0 && in new_field() 297 New_Field->cols = (short)cols; in new_field() 299 New_Field->dcols = cols; in new_field()
|
/freebsd/contrib/mandoc/ |
H A D | tbl_term.c | 185 if (tp->tbl.cols == NULL) { in term_tbl() 202 for (ic = 0; ic + 1 < sp->opts->cols; ic++) in term_tbl() 203 tsz += tp->tbl.cols[ic].width + in term_tbl() 204 tp->tbl.cols[ic].spacing; in term_tbl() 205 if (sp->opts->cols) in term_tbl() 206 tsz += tp->tbl.cols[sp->opts->cols - 1].width; in term_tbl() 235 term_setcol(tp, sp->opts->cols + 2); in term_tbl() 249 for (ic = 0; ic < sp->opts->cols; ic++) { in term_tbl() 254 coloff += tp->tbl.cols[ic].width; in term_tbl() 256 if (ic + 1 < sp->opts->cols) in term_tbl() [all …]
|
H A D | out.c | 136 assert(tbl->cols == NULL); in tblcalc() 137 tbl->cols = mandoc_calloc((size_t)sp_first->opts->cols, in tblcalc() 155 tbl->cols[++maxcol].spacing = SIZE_MAX; in tblcalc() 156 col = tbl->cols + icol; in tblcalc() 186 rmargin ? (rmargin + sp->opts->cols / 2) in tblcalc() 187 / (sp->opts->cols + 1) : 0); in tblcalc() 218 if (maxcol < sp_first->opts->cols - 1) in tblcalc() 219 maxcol = sp_first->opts->cols - 1; in tblcalc() 221 col = tbl->cols + icol; in tblcalc() 243 width = tbl->cols[icol].width; in tblcalc() [all …]
|
/freebsd/usr.bin/column/ |
H A D | column.c | 207 int cols, *len; member 219 wchar_t **cols; in maketbl() local 224 if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL) in maketbl() 230 (cols[coloff] = wcstok(p, separator, &last)); in maketbl() 233 if (!(cols = realloc(cols, ((u_int)maxcols + in maketbl() 246 for (t->cols = coloff; --coloff >= 0;) { in maketbl() 247 t->list[coloff] = cols[coloff]; in maketbl() 248 t->len[coloff] = width(cols[coloff]); in maketbl() 254 for (coloff = 0; coloff < t->cols - 1; ++coloff) in maketbl() 262 free(cols); in maketbl()
|
/freebsd/contrib/dialog/ |
H A D | demo.pl | 108 my $cols = &tput( "cols", 80 ); 109 my $maxcols = $cols - 4; 110 my $mincols = ( $cols > 8 ) ? 8 : $cols; 111 my $midcols = int( ( $cols * 3 ) / 4 ); 174 $cols / 2 182 $cols / 2 190 $cols / 2
|
H A D | inputstr.c | 492 const int *cols = dlg_index_columns(string); in dlg_count_columns() local 493 result = cols[limit]; in dlg_count_columns() 509 const int *cols = dlg_index_columns(string); in dlg_limit_columns() local 512 while (result > 0 && (cols[result] - cols[offset]) > limit) in dlg_limit_columns() 652 const int *cols = dlg_index_columns(string); in compute_edit_offset() local 661 if ((cols[offset] - cols[n]) < x_last in compute_edit_offset() 662 && (offset == limit || (cols[offset + 1] - cols[n]) < x_last)) { in compute_edit_offset() 668 dpy_column = cols[offset] - cols[offset2]; in compute_edit_offset() 713 const int *cols = dlg_index_columns(string); in dlg_show_string() local 726 int check = cols[i + 1] - cols[scrollamt]; in dlg_show_string() [all …]
|
H A D | columns.c | 124 unsigned cols = split_row(*value, offsets, widths); in dlg_align_columns() local 125 if (numcols < cols) in dlg_align_columns() 126 numcols = cols; in dlg_align_columns() 127 for (n = 0; n < cols; ++n) { in dlg_align_columns() 139 unsigned cols = split_row(*value, offsets, widths); in dlg_align_columns() local 146 for (n = 0; n < cols; ++n) { in dlg_align_columns()
|
/freebsd/usr.sbin/mpsutil/ |
H A D | mpsutil.c | 165 int cols; in hexdump() local 175 cols = flags & HD_COLUMN_MASK; in hexdump() 177 cols = 16; in hexdump() 180 for (i = 0; i < length; i+= cols) { in hexdump() 188 for (j = 0; j < cols; j++) { in hexdump() 190 k = i + (cols - 1 - j); in hexdump() 202 for (j = 0; j < cols; j++) { in hexdump() 204 k = i + (cols - 1 - j); in hexdump()
|
/freebsd/contrib/bsddialog/utility/ |
H A D | util_builders.c | 49 return (bsddialog_infobox(conf, text, rows, cols)); in infobox_builder() 57 return (bsddialog_msgbox(conf, text, rows, cols)); in msgbox_builder() 65 return (bsddialog_yesno(conf, text, rows, cols)); in yesno_builder() 74 return (bsddialog_textbox(conf, text, rows, cols)); in textbox_builder() 91 output = bsddialog_gauge(conf, text, rows, cols, perc, STDIN_FILENO, in gauge_builder() 125 output = bsddialog_mixedgauge(conf, text, rows, cols, mainperc, in mixedgauge_builder() 142 output = bsddialog_pause(conf, text, rows, cols, &secs); in pause_builder() 166 output = bsddialog_rangebox(conf, text, rows, cols, min, max, &value); in rangebox_builder() 198 rv = bsddialog_datebox(conf, text, rows, cols, &yy, &mm, &dd); in date() 200 rv = bsddialog_calendar(conf, text, rows, cols, in date() [all...] |
/freebsd/crypto/openssh/ |
H A D | progressmeter.c | 134 int file_len, cols; in refresh_progress_meter() local 179 file_len = cols = win_size - 36; in refresh_progress_meter() 181 asmprintf(&buf, INT_MAX, &cols, "%-*s", file_len, file); in refresh_progress_meter() 183 if (cols < file_len) in refresh_progress_meter() 184 xextendf(&buf, NULL, "%*s", file_len - cols, ""); in refresh_progress_meter() 230 cols = win_size - 1; in refresh_progress_meter() 231 asmprintf(&obuf, INT_MAX, &cols, " %s", buf); in refresh_progress_meter()
|
/freebsd/sys/dev/syscons/ |
H A D | scvtb.c | 49 sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait) in sc_vtb_init() argument 53 vtb->vtb_cols = cols; in sc_vtb_init() 55 vtb->vtb_size = cols*rows; in sc_vtb_init() 62 if ((buf == NULL) && (cols*rows != 0)) { in sc_vtb_init() 64 (vm_offset_t)malloc(cols*rows*sizeof(u_int16_t), in sc_vtb_init() 69 cols*rows*sizeof(u_int16_t)); in sc_vtb_init() 112 sc_vtb_size(int cols, int rows) in sc_vtb_size() argument 114 return (size_t)(cols*rows*sizeof(u_int16_t)); in sc_vtb_size()
|
/freebsd/contrib/ncurses/ncurses/base/ |
H A D | lib_slk.c | 80 _nc_format_slks(NCURSES_SP_DCLx int cols) in _nc_format_slks() argument 90 gap = (cols - 3 * (3 + 4 * max_length)) / 2; in _nc_format_slks() 102 gap = cols - (int) (SP_PARM->_slk->maxlab * max_length) - 6; in _nc_format_slks() 113 gap = (cols - (SP_PARM->_slk->maxlab * max_length) - 5) in _nc_format_slks() 138 _nc_slk_initialize(WINDOW *stwin, int cols) in _nc_slk_initialize() argument 216 res = _nc_format_slks(NCURSES_SP_ARGx cols); in _nc_slk_initialize()
|