| /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 | 191 int cols, unsigned int *year, unsigned int *month, unsigned int *day); 195 int cols, unsigned int menurows, unsigned int nitems, 200 int cols, unsigned int *year, unsigned int *month, unsigned int *day); 204 int cols, unsigned int formheight, unsigned int nitems, 209 int cols, unsigned int perc, int fd, const char *sep, const char *end); 213 int cols); 217 int cols, unsigned int menurows, unsigned int nitems, 222 int cols, unsigned int mainperc, unsigned int nminibars, 227 int cols, unsigned int menurows, unsigned int ngroups, 232 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) in bsddialog_msgbox() argument 201 return (do_message(conf, text, rows, cols, OK_LABEL, NULL)); in bsddialog_msgbox() 206 int cols) in bsddialog_yesno() argument 208 return (do_message(conf, text, rows, cols, "Yes", "No")); in bsddialog_yesno() 213 int cols) in bsddialog_infobox() argument 218 if (prepare_dialog(conf, text, rows, cols, &d) != 0) in bsddialog_infobox()
|
| H A D | barbox.c | 119 int cols, unsigned int perc, int fd, const char *sep, const char *end) in bsddialog_gauge() argument 128 if (prepare_dialog(conf, text, rows, cols, &d) != 0) in bsddialog_gauge() 210 mvwaddcstr(WINDOW *win, int y, int x, const char *mbstring, unsigned int cols) in mvwaddcstr() argument 224 if (w > cols) in mvwaddcstr() 230 if(w > cols) in mvwaddcstr() 231 mvwaddstr(win, y, (x + cols) - 3, "..."); in mvwaddcstr() 247 if (set_widget_size(d->conf, d->rows, d->cols, &d->h, &d->w) != 0) in mixedgauge_size_position() 249 if (set_widget_autosize(d->conf, d->rows, d->cols, &d->h, &d->w, in mixedgauge_size_position() 262 do_mixedgauge(struct bsddialog_conf *conf, const char *text, int rows, int cols, in do_mixedgauge() argument 278 if (prepare_dialog(conf, text, rows, cols, &d) != 0) in do_mixedgauge() [all …]
|
| H A D | lib_util.c | 161 int str_props(const char *mbstring, unsigned int *cols, bool *has_multi_col) in str_props() argument 185 if (cols != NULL) in str_props() 186 *cols = ncol; in str_props() 679 text_size(struct bsddialog_conf *conf, int rows, int cols, const char *text, in text_size() argument 702 if (cols == BSDDIALOG_AUTOSIZE) { in text_size() 705 } else if (cols == BSDDIALOG_FULLSCREEN) { in text_size() 709 startwtext = cols - BORDERS - TEXTHMARGINS; in text_size() 800 set_widget_size(struct bsddialog_conf *conf, int rows, int cols, int *h, int *w) in set_widget_size() argument 818 if (cols == BSDDIALOG_FULLSCREEN) in set_widget_size() 820 else if (cols < BSDDIALOG_FULLSCREEN) in set_widget_size() [all …]
|
| H A D | lib_util.h | 103 int rows, cols; /* API rows and cols: -1, 0, >0 */ member 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);
|
| /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()
|
| /freebsd/contrib/mandoc/ |
| H A D | tbl_term.c | 189 if (tp->tbl.cols == NULL) { in term_tbl() 222 for (ic = 0; ic + 1 < sp->opts->cols; ic++) in term_tbl() 223 tsz += tp->tbl.cols[ic].width + in term_tbl() 224 term_len(tp, tp->tbl.cols[ic].spacing); in term_tbl() 225 if (sp->opts->cols) in term_tbl() 226 tsz += tp->tbl.cols[sp->opts->cols - 1].width; in term_tbl() 257 term_setcol(tp, sp->opts->cols + 2); in term_tbl() 271 for (ic = 0; ic < sp->opts->cols; ic++) { in term_tbl() 276 coloff += tp->tbl.cols[i in term_tbl() [all...] |
| H A D | out.c | 149 assert(tbl->cols == NULL); in tblcalc() 150 tbl->cols = mandoc_calloc((size_t)sp_first->opts->cols, in tblcalc() 169 tbl->cols[++maxcol].spacing = SIZE_MAX; in tblcalc() 170 col = tbl->cols + icol; in tblcalc() 193 rmargin ? (rmargin / enw + sp->opts->cols / 2) / in tblcalc() 194 (sp->opts->cols + 1) * enw : 0); in tblcalc() 225 if (maxcol < sp_first->opts->cols - 1) in tblcalc() 226 maxcol = sp_first->opts->cols - 1; in tblcalc() 228 col = tbl->cols in tblcalc() [all...] |
| /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 | 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()
|
| 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 …]
|
| /freebsd/usr.bin/column/ |
| H A D | column.c | 220 int cols, *len; member 232 wchar_t **cols; in maketbl() local 237 if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL) in maketbl() 245 cols[coloff] = p; in maketbl() 248 if (!(cols = realloc(cols, ((u_int)maxcols + in maketbl() 271 for (t->cols = coloff; --coloff >= 0;) { in maketbl() 272 t->list[coloff] = cols[coloff]; in maketbl() 273 t->len[coloff] = width(cols[coloff]); in maketbl() 279 for (coloff = 0; coloff < t->cols - 1; ++coloff) in maketbl() 287 free(cols); in maketbl()
|
| /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/xz/src/xz/ |
| H A D | message.c | 556 const char *cols[5] = { in message_progress_update() local 564 tuklib_mbstr_fw(cols[0], 6), cols[0], in message_progress_update() 565 tuklib_mbstr_fw(cols[1], 35), cols[1], in message_progress_update() 566 tuklib_mbstr_fw(cols[2], 9), cols[2], in message_progress_update() 567 cols[3], in message_progress_update() 568 cols[4]); in message_progress_update() 638 const char *cols[5] = { in progress_flush() local 646 tuklib_mbstr_fw(cols[0], 6), cols[0], in progress_flush() 647 tuklib_mbstr_fw(cols[1], 35), cols[1], in progress_flush() 648 tuklib_mbstr_fw(cols[2], 9), cols[2], in progress_flush() [all …]
|
| /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, &yy, &mm, &dd); in date() [all …]
|
| /freebsd/crypto/openssh/ |
| H A D | progressmeter.c | 133 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()
|