/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/talk/ |
H A D | display.c | 79 display(win, text, size) in display() argument 80 register xwin_t *win; in display() 91 xscroll(win, 0); 98 if (*text == win->cerase) { 99 wmove(win->x_win, win->x_line, max(--win->x_col, 0)); 100 getyx(win->x_win, win->x_line, win->x_col); 101 waddch(win->x_win, ' '); 102 wmove(win->x_win, win->x_line, win->x_col); 103 getyx(win->x_win, win->x_line, win->x_col); 112 if (*text == win->werase) { [all …]
|
/illumos-gate/usr/src/ucblib/libcurses/ |
H A D | newwin.c | 40 WINDOW *win; in newwin() local 54 if ((win = makenew(nl, nc, by, bx)) == NULL) in newwin() 56 if ((win->_firstch = SMALLOC(nl * sizeof (win->_firstch[0]))) == NULL) { in newwin() 57 free(win->_y); in newwin() 58 free(win); in newwin() 61 if ((win->_lastch = SMALLOC(nl * sizeof (win->_lastch[0]))) == NULL) { in newwin() 62 free(win->_y); in newwin() 63 free(win->_firstch); in newwin() 64 free(win); in newwin() 67 win->_nextp = win; in newwin() [all …]
|
H A D | refresh.c | 46 wrefresh(WINDOW *win) in wrefresh() argument 66 _win = win; in wrefresh() 67 curwin = (win == curscr); in wrefresh() 69 if (win->_clear || curscr->_clear || curwin) { in wrefresh() 70 if ((win->_flags & _FULLWIN) || curscr->_clear) { in wrefresh() 80 (void) touchwin(win); in wrefresh() 82 win->_clear = FALSE; in wrefresh() 85 if (win->_curx != 0) in wrefresh() 91 fprintf(outf, "REFRESH(%0.2o): curwin = %d\n", win, curwin); in wrefresh() 94 for (wy = 0; wy < win->_maxy; wy++) { in wrefresh() [all …]
|
H A D | addch.c | 30 waddch(WINDOW *win, char c) in waddch() argument 35 x = win->_curx; in waddch() 36 y = win->_cury; in waddch() 43 if (waddch(win, ' ') == ERR) in waddch() 50 " lastch = %d\n", y, x, win->_firstch[y], in waddch() 51 win->_lastch[y]); in waddch() 53 if (win->_flags & _STANDOUT) in waddch() 55 set_ch(win, y, x, c); in waddch() 56 win->_y[y][x++] = c; in waddch() 57 if (x >= win->_maxx) { in waddch() [all …]
|
H A D | insertln.c | 31 winsertln(WINDOW *win) in winsertln() argument 38 fprintf(outf, "INSERTLN(%0.2o)\n", win); in winsertln() 40 if (win->_orig == NULL) in winsertln() 41 temp = win->_y[win->_maxy - 1]; in winsertln() 42 for (y = win->_maxy - 1; y > win->_cury; --y) { in winsertln() 43 if (win->_orig == NULL) in winsertln() 44 win->_y[y] = win->_y[y - 1]; in winsertln() 46 (void) memmove(win->_y[y], win->_y[y-1], win->_maxx); in winsertln() 47 (void) touchline(win, y, 0, win->_maxx - 1); in winsertln() 49 if (win->_orig == NULL) in winsertln() [all …]
|
H A D | deleteln.c | 31 wdeleteln(WINDOW *win) in wdeleteln() argument 38 fprintf(outf, "DELETELN(%0.2o)\n", win); in wdeleteln() 40 temp = win->_y[win->_cury]; in wdeleteln() 41 for (y = win->_cury; y < win->_maxy - 1; y++) { in wdeleteln() 42 if (win->_orig == NULL) in wdeleteln() 43 win->_y[y] = win->_y[y + 1]; in wdeleteln() 45 (void) memmove(win->_y[y], win->_y[y+1], win->_maxx); in wdeleteln() 46 (void) touchline(win, y, 0, win->_maxx - 1); in wdeleteln() 48 if (win->_orig == NULL) in wdeleteln() 49 win->_y[y] = temp; in wdeleteln() [all …]
|
H A D | mvwin.c | 29 mvwin(WINDOW *win, int by, int bx) in mvwin() argument 34 if (by + win->_maxy > LINES || bx + win->_maxx > COLS) in mvwin() 36 dy = by - win->_begy; in mvwin() 37 dx = bx - win->_begx; in mvwin() 38 orig = win->_orig; in mvwin() 40 orig = win; in mvwin() 42 win->_begy += dy; in mvwin() 43 win->_begx += dx; in mvwin() 44 _swflags_(win); in mvwin() 45 win = win->_nextp; in mvwin() [all …]
|
H A D | touchwin.c | 30 touchwin(WINDOW *win) in touchwin() argument 35 fprintf(outf, "TOUCHWIN(%0.2o)\n", win); in touchwin() 37 maxy = win->_maxy; in touchwin() 39 (void) touchline(win, y, 0, win->_maxx - 1); in touchwin() 48 touchline(WINDOW *win, int y, int sx, int ex) in touchline() argument 51 fprintf(outf, "TOUCHLINE(%0.2o, %d, %d, %d)\n", win, y, sx, ex); in touchline() 53 win->_firstch[y], win->_lastch[y]); in touchline() 55 sx += win->_ch_off; in touchline() 56 ex += win->_ch_off; in touchline() 57 if (win->_firstch[y] == _NOCHANGE) { in touchline() [all …]
|
H A D | insch.c | 30 winsch(WINDOW *win, char c) in winsch() argument 35 end = &win->_y[win->_cury][win->_curx]; in winsch() 36 temp1 = &win->_y[win->_cury][win->_maxx - 1]; in winsch() 41 (void) touchline(win, win->_cury, win->_curx, win->_maxx - 1); in winsch() 42 if (win->_cury == LINES - 1 && win->_y[LINES-1][COLS-1] != ' ') in winsch() 43 if (win->_scroll) { in winsch() 44 (void) wrefresh(win); in winsch() 45 (void) scroll(win); in winsch() 46 win->_cury--; in winsch()
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | makenew.c | 53 WINDOW *win; in _makenew() local 61 if ((win = (WINDOW *) malloc(sizeof (WINDOW))) == NULL) in _makenew() 63 if ((win->_y = (chtype **) malloc(nlines * sizeof (chtype *))) == NULL) in _makenew() 66 if ((_y16update) && ((win->_y16 = (_ochtype **) in _makenew() 71 if ((win->_firstch = (short *) malloc(2 * nlines * sizeof (short))) in _makenew() 74 if ((_y16update) && (win->_y16 != NULL)) in _makenew() 75 free((char *) win->_y16); in _makenew() 78 free((char *) win->_y); in _makenew() 80 free((char *) win); in _makenew() 88 win->_lastch = win->_firstch + nlines; in _makenew() [all …]
|
H A D | waddch.c | 51 waddch(WINDOW *win, chtype c) in waddch() argument 53 short x = win->_curx; in waddch() 54 short y = win->_cury; in waddch() 58 bool savimmed = win->_immed; in waddch() 59 bool savsync = win->_sync; in waddch() 61 win->_immed = win->_sync = FALSE; in waddch() 71 win->_insmode = FALSE; in waddch() 72 if (_scrmax > 1 && _mbvalid(win) == ERR) in waddch() 75 rv = _mbaddch(win, rawattrs, RBYTE(rawc)); in waddch() 76 win->_immed = savimmed; in waddch() [all …]
|
H A D | mbaddch.c | 41 _mbclrch(WINDOW *win, int y, int x) in _mbclrch() argument 47 wcp = win->_y[y]; in _mbclrch() 60 if (ep > wcp + win->_maxx) in _mbclrch() 65 if ((x = (int)(wp - wcp)) < win->_firstch[y]) in _mbclrch() 67 win->_firstch[y] = (short)x; in _mbclrch() 69 if ((x = (int)(ep - wcp) - 1) > win->_lastch[y]) in _mbclrch() 71 win->_lastch[y] = (short)x; in _mbclrch() 75 *wp = win->_bkgd; in _mbclrch() 89 _mbvalid(WINDOW *win) in _mbvalid() argument 97 x = win->_curx; in _mbvalid() [all …]
|
H A D | winsdelln.c | 53 winsdelln(WINDOW *win, int id) in winsdelln() argument 77 if ((win->_cury >= win->_tmarg) && (win->_cury <= win->_bmarg)) in winsdelln() 78 endy = win->_bmarg + 1; in winsdelln() 80 endy = win->_maxy; in winsdelln() 89 if ((num_lines = win->_cury - endy) > id) in winsdelln() 101 to = win->_cury; in winsdelln() 107 if ((num_lines = endy - win->_cury) < id) in winsdelln() 112 num_lines = fr - (win->_cury - 1); in winsdelln() 124 quick = ((win->_ndescs <= 0) && (win->_parent == NULL)); in winsdelln() 126 begch = win->_firstch; in winsdelln() [all …]
|
H A D | winsnstr.c | 54 winsnstr(WINDOW *win, char *tsp, int n) in winsnstr() argument 63 win->_nbyte = -1; in winsnstr() 64 win->_insmode = TRUE; in winsnstr() 65 if (_scrmax > 1 && _mbvalid(win) == ERR) in winsnstr() 72 endx = win->_curx; in winsnstr() 73 maxx = win->_maxx; in winsnstr() 105 if ((len = endx - win->_curx) <= 0) in winsnstr() 112 cury = win->_cury; in winsnstr() 114 if (_mbinsshift(win, len) == ERR) in winsnstr() 118 wcp = win->_y[cury] + win->_curx; in winsnstr() [all …]
|
H A D | waddnstr.c | 48 waddnstr(WINDOW *win, char *tstr, int i) in waddnstr() argument 51 short maxx_1 = win->_maxx - 1, cury = win->_cury, in waddnstr() 52 curx = win->_curx; in waddnstr() 53 chtype **_y = win->_y; in waddnstr() 54 bool savimmed = win->_immed, in waddnstr() 55 savsync = win->_sync; in waddnstr() 62 if (win == stdscr) in waddnstr() 65 fprintf(outf, "waddnstr(%o, ", win); in waddnstr() 71 win->_nbyte = -1; in waddnstr() 72 win->_insmode = FALSE; in waddnstr() [all …]
|
H A D | wclrtobot.c | 47 wclrtobot(WINDOW *win) in wclrtobot() argument 50 int cury = win->_cury; in wclrtobot() 51 short curx = win->_curx; in wclrtobot() 53 if (win != curscr) { in wclrtobot() 54 savimmed = win->_immed; in wclrtobot() 55 savsync = win->_sync; in wclrtobot() 56 win->_immed = win->_sync = FALSE; in wclrtobot() 60 if (cury >= win->_tmarg && cury <= win->_bmarg) in wclrtobot() 61 win->_cury = win->_bmarg; in wclrtobot() 63 win->_cury = win->_maxy - 1; in wclrtobot() [all …]
|
H A D | winsch.c | 49 winsch(WINDOW *win, chtype c) in winsch() argument 51 short curx = win->_curx; in winsch() 52 int n, cury = win->_cury; in winsch() 60 win->_insmode = TRUE; in winsch() 61 if (_scrmax > 1 && (rv = _mbvalid(win)) == ERR) in winsch() 65 rv = _mbaddch(win, A_NORMAL, RBYTE(c)); in winsch() 68 win->_nbyte = -1; in winsch() 69 curx = win->_curx; in winsch() 73 return (waddch(win, c)); in winsch() 77 if (cury >= (win->_maxy-1) || cury == win->_bmarg) in winsch() [all …]
|
H A D | wscrl.c | 47 wscrl(WINDOW *win, int n) in wscrl() argument 54 if (win == stdscr) in wscrl() 57 if (win == curscr) in wscrl() 60 fprintf(outf, "scroll(%x, %d)\n", win, n); in wscrl() 62 if (!win->_scroll || (win->_flags & _ISPAD)) in wscrl() 65 savimmed = win->_immed; in wscrl() 66 savsync = win->_sync; in wscrl() 67 win->_immed = win->_sync = FALSE; in wscrl() 69 curx = win->_curx; cury = win->_cury; in wscrl() 71 if (cury >= win->_tmarg && cury <= win->_bmarg) in wscrl() [all …]
|
H A D | wclrtoeol.c | 49 wclrtoeol(WINDOW *win) in wclrtoeol() argument 51 int y = win->_cury; in wclrtoeol() 52 int x = win->_curx; in wclrtoeol() 53 int maxx = win->_maxx; in wclrtoeol() 57 if (win != curscr) { in wclrtoeol() 58 win->_nbyte = -1; in wclrtoeol() 60 if (ISMBIT(win->_y[y][x])) { in wclrtoeol() 61 win->_insmode = TRUE; in wclrtoeol() 62 if (_mbvalid(win) == ERR) in wclrtoeol() 64 x = win->_curx; in wclrtoeol() [all …]
|
H A D | wdelch.c | 51 wdelch(WINDOW *win) in wdelch() argument 55 int cury = win->_cury; in wdelch() 56 short curx = win->_curx; in wdelch() 60 end = &win->_y[cury][win->_maxx - 1]; in wdelch() 61 temp2 = &win->_y[cury][curx + 1]; in wdelch() 65 win->_nbyte = -1; in wdelch() 68 win->_insmode = TRUE; in wdelch() 69 if (_mbvalid(win) == ERR) in wdelch() 71 curx = win->_curx; in wdelch() 72 temp1 = &win->_y[cury][curx]; in wdelch() [all …]
|
H A D | getwin.c | 53 WINDOW *win = NULL; in getwin() local 58 nelt = sizeof (WINDOW) - sizeof (win->_y) - sizeof (win->_parent) - in getwin() 59 sizeof (win->_parx) - sizeof (win->_pary) - in getwin() 60 sizeof (win->_ndescs) - sizeof (win->_delay) - in getwin() 64 SEPARATE_READ) || ((win = _makenew(maxy = win_nums[2], maxx = in getwin() 69 if (_image(win) == ERR) { in getwin() 70 win = (WINDOW *) NULL; in getwin() 73 save_fch = win->_firstch; in getwin() 75 if (fread(&(win->_flags), 1, nelt, filep) != nelt) in getwin() 78 win->_firstch = save_fch; in getwin() [all …]
|
H A D | wgetwstr.c | 40 wgetwstr(WINDOW *win, wchar_t *str) in wgetwstr() argument 42 return ((wgetnwstr(win, str, LENGTH) == ERR) ? ERR : OK); in wgetwstr() 46 wgetnwstr(WINDOW *win, wchar_t *str, int n) in wgetnwstr() argument 70 savsync = win->_sync; in wgetnwstr() 71 savimmed = win->_immed; in wgetnwstr() 72 savleave = win->_leave; in wgetnwstr() 73 win->_immed = win->_sync = win->_leave = FALSE; in wgetnwstr() 74 (void) wrefresh(win); in wgetnwstr() 82 rownum[cpos] = win->_cury; in wgetnwstr() 83 colnum[cpos] = win->_curx; in wgetnwstr() [all …]
|
H A D | wgetstr.c | 50 wgetstr(WINDOW *win, char *str) in wgetstr() argument 52 return ((wgetnstr(win, str, LENGTH) == ERR) ? ERR : OK); in wgetstr() 56 wgetnstr(WINDOW *win, char *str, int n) in wgetnstr() argument 85 savsync = win->_sync; in wgetnstr() 86 savimmed = win->_immed; in wgetnstr() 87 savleave = win->_leave; in wgetnstr() 88 win->_immed = win->_sync = win->_leave = FALSE; in wgetnstr() 89 (void) wrefresh(win); in wgetnstr() 97 rownum[cpos] = win->_cury; in wgetnstr() 98 colnum[cpos] = win->_curx; in wgetnstr() [all …]
|
H A D | wbkgd.c | 48 wbkgd(WINDOW *win, chtype nbkgd) in wbkgd() argument 62 if (nbkgd == win->_bkgd) in wbkgd() 65 obkgdc = _CHAR(win->_bkgd); in wbkgd() 66 obkgda = _ATTR(win->_bkgd); in wbkgd() 81 win->_bkgd = nbkgd; in wbkgd() 89 if ((acolor = (win->_attrs & A_COLOR)) != 0) { in wbkgd() 91 win->_attrs = _ATTR((win->_attrs & ~obkgda) | nbkgda); in wbkgd() 93 win->_attrs = _ATTR((win->_attrs & in wbkgd() 97 win->_attrs = _ATTR((win->_attrs & ~obkgda) | nbkgda); in wbkgd() 99 maxx = win->_maxx - 1; in wbkgd() [all …]
|
H A D | whline.c | 45 whline(WINDOW *win, chtype horch, int num_chars) in whline() argument 47 short cury = win->_cury, curx = win->_curx; in whline() 48 chtype a, *fp = &(win->_y[cury][curx]); in whline() 53 if (num_chars > win->_maxx - curx) in whline() 54 num_chars = win->_maxx - curx; in whline() 58 horch = _WCHAR(win, horch) | a; in whline() 59 memSset(fp, horch | win->_attrs, num_chars); in whline() 60 if (curx < win->_firstch[cury]) in whline() 61 win->_firstch[cury] = curx; in whline() 62 if ((curx += (num_chars - 1)) > win->_lastch[cury]) in whline() [all …]
|