/illumos-gate/usr/src/lib/libadm/common/ |
H A D | puttext.c | 49 wchar_t *wstr, *wp; in puttext() local 75 wp = wstr; in puttext() 77 if (*wp == L'!') { in puttext() 78 wp++; in puttext() 83 while (iswspace(*wp)) in puttext() 84 ++wp; /* eat leading white space */ in puttext() 91 lastword = wp; in puttext() 95 if (*wp == L'\n') { in puttext() 99 wp++; in puttext() 102 wlen = wcwidth(*wp); in puttext() [all …]
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | mbaddch.c | 43 chtype *wcp, *ep, *wp, wc; in _mbclrch() local 48 wp = wcp + x; in _mbclrch() 51 if (ISCBIT(*wp)) { in _mbclrch() 52 for (; wp >= wcp; --wp) in _mbclrch() 53 if (!ISCBIT(*wp)) in _mbclrch() 55 if (wp < wcp) in _mbclrch() 58 wc = RBYTE(*wp); in _mbclrch() 59 ep = wp + _curs_scrwidth[TYPE(wc)]; in _mbclrch() 65 if ((x = (int)(wp - wcp)) < win->_firstch[y]) in _mbclrch() 74 for (; wp < ep; ++wp) in _mbclrch() [all …]
|
H A D | mbinsshift.c | 44 chtype *wcp, *wp, *ep; in _mbinsshift() local 55 wp = wcp + maxx - 1; in _mbinsshift() 56 if (ISMBIT(*wp)) { in _mbinsshift() 59 for (; wp >= wcp; --wp) in _mbinsshift() 60 if (!ISCBIT(*wp)) in _mbinsshift() 62 if (wp < wcp) in _mbinsshift() 64 rb = RBYTE(*wp); in _mbinsshift() 65 if ((wp + _curs_scrwidth[TYPE(rb)]) > (wcp + maxx)) in _mbinsshift() 67 maxx = (int)(wp - wcp); in _mbinsshift() 81 for (wp = wcp + maxx - 1; wp >= ep; --wp) in _mbinsshift() [all …]
|
H A D | mbmove.c | 45 chtype *wcp, *wp, *ep; in wmbmove() local 52 wp = wcp + x; in wmbmove() 56 if (ISCBIT(*wp)) { in wmbmove() 57 for (; wp >= wcp; --wp) in wmbmove() 58 if (!ISCBIT(*wp)) in wmbmove() 60 if (wp < wcp) { in wmbmove() 61 wp = wcp+x+1; in wmbmove() 62 for (; wp < ep; ++wp) in wmbmove() 63 if (!ISCBIT(*wp)) in wmbmove() 69 if (wp + _curs_scrwidth[TYPE(*wp)] > ep) in wmbmove() [all …]
|
H A D | mbinch.c | 45 chtype *wp, *ep, wc; in wmbinch() local 54 wp = win->_y[win->_cury] + win->_curx; in wmbinch() 55 wc = RBYTE(*wp); in wmbinch() 56 ep = wp + _curs_scrwidth[TYPE(wc & 0377)]; in wmbinch() 58 for (; wp < ep; ++wp) { in wmbinch() 59 if ((wc = RBYTE(*wp)) == MBIT) in wmbinch() 63 if ((wc = LBYTE(*wp)|MBIT) == MBIT) in wmbinch()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/ |
H A D | wclib.c | 64 Wc_t* wp; in wc_init() local 66 if (!(wp = (Wc_t*)stakalloc(sizeof(Wc_t)))) in wc_init() 69 wp->mb = 0; in wc_init() 72 wp->mb = 1; in wc_init() 75 wp->mb = -1; in wc_init() 78 wp->type[n] = (w && isspace(n)) ? WC_SP : 0; in wc_init() 79 wp->type['\n'] = WC_SP|WC_NL; in wc_init() 80 if ((mode & (WC_MBYTE|WC_WORDS)) && wp->mb > 0) in wc_init() 84 wp->type[0x80+n] |= WC_MB; in wc_init() 86 wp->type[0xc0+n] |= WC_MB+1; in wc_init() [all …]
|
H A D | wc.c | 74 static void printout(register Wc_t *wp, register char *name,register int mode) in printout() argument 77 sfprintf(sfstdout," %7I*d",sizeof(wp->lines),wp->lines); in printout() 79 sfprintf(sfstdout," %7I*d",sizeof(wp->words),wp->words); in printout() 81 sfprintf(sfstdout," %7I*d",sizeof(wp->chars),wp->chars); in printout() 83 sfprintf(sfstdout," %7I*d",sizeof(wp->chars),wp->longest); in printout() 94 register Wc_t *wp; in b_wc() local 149 if (!(wp = wc_init(mode))) in b_wc() 168 wp->chars = statb.st_size - lseek(sffileno(fp),0L,1); in b_wc() 172 wc_count(wp, fp, cp); in b_wc() 175 tchars += wp->chars; in b_wc() [all …]
|
H A D | rev.c | 64 register wchar_t *wp, *xp; in rev_char() local 69 wp = 0; in rev_char() 77 if (!(wp = newof(wp, wchar_t, w, 0))) in rev_char() 83 xp = wp; in rev_char() 87 while (xp > wp) in rev_char() 92 if (wp) in rev_char() 93 free(wp); in rev_char() 97 if (wp) in rev_char() 98 free(wp); in rev_char()
|
/illumos-gate/usr/src/lib/fm/topo/libtopo/common/ |
H A D | topo_snap.c | 570 topo_walk_t *wp; in topo_walk_init() local 582 if ((wp = topo_node_walk_init(thp, NULL, tp->tt_root, in topo_walk_init() 586 return (wp); in topo_walk_init() 595 step_child(tnode_t *cnp, topo_walk_t *wp, int flag, int bottomup) in step_child() argument 603 topo_dprintf(wp->tw_thp, TOPO_DBG_WALK, in step_child() 609 topo_dprintf(wp->tw_thp, TOPO_DBG_WALK, in step_child() 614 wp->tw_node = nnp; in step_child() 616 status = topo_walk_bottomup(wp, flag); in step_child() 618 status = topo_walk_step(wp, flag); in step_child() 624 step_sibling(tnode_t *cnp, topo_walk_t *wp, int flag, int bottomup) in step_sibling() argument [all …]
|
/illumos-gate/usr/src/lib/libuutil/common/ |
H A D | uu_avl.c | 307 _avl_walk_init(uu_avl_walk_t *wp, uu_avl_t *ap, uint32_t flags) in _avl_walk_init() argument 314 (void) memset(wp, 0, sizeof (*wp)); in _avl_walk_init() 315 wp->uaw_avl = ap; in _avl_walk_init() 316 wp->uaw_robust = robust; in _avl_walk_init() 317 wp->uaw_dir = direction; in _avl_walk_init() 320 wp->uaw_next_result = avl_first(&ap->ua_tree); in _avl_walk_init() 322 wp->uaw_next_result = avl_last(&ap->ua_tree); in _avl_walk_init() 325 wp->uaw_next = next = &ap->ua_null_walk; in _avl_walk_init() 326 wp->uaw_prev = prev = next->uaw_prev; in _avl_walk_init() 327 next->uaw_prev = wp; in _avl_walk_init() [all …]
|
H A D | uu_list.c | 400 list_walk_init(uu_list_walk_t *wp, uu_list_t *lp, uint32_t flags) in list_walk_init() argument 407 (void) memset(wp, 0, sizeof (*wp)); in list_walk_init() 408 wp->ulw_list = lp; in list_walk_init() 409 wp->ulw_robust = robust; in list_walk_init() 410 wp->ulw_dir = direction; in list_walk_init() 412 wp->ulw_next_result = lp->ul_null_node.uln_next; in list_walk_init() 414 wp->ulw_next_result = lp->ul_null_node.uln_prev; in list_walk_init() 422 wp->ulw_next = next = &lp->ul_null_walk; in list_walk_init() 423 wp->ulw_prev = prev = next->ulw_prev; in list_walk_init() 424 next->ulw_prev = wp; in list_walk_init() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/clients/eoib/ |
H A D | eib_rsrc.c | 393 eib_wqe_pool_t *wp = ss->ei_tx; in eib_rsrc_txwqes_needed() local 397 mutex_enter(&wp->wp_lock); in eib_rsrc_txwqes_needed() 398 if ((wp->wp_status & EIB_TXWQE_SHORT) == 0) { in eib_rsrc_txwqes_needed() 399 wp->wp_status |= EIB_TXWQE_SHORT; in eib_rsrc_txwqes_needed() 400 cv_broadcast(&wp->wp_cv); in eib_rsrc_txwqes_needed() 402 mutex_exit(&wp->wp_lock); in eib_rsrc_txwqes_needed() 431 eib_wqe_pool_t *wp = wqe->qe_pool; in eib_rsrc_rxpool_low() local 440 mutex_enter(&wp->wp_lock); in eib_rsrc_rxpool_low() 442 if (wp->wp_nfree <= EIB_NFREE_RWQES_LOW) { in eib_rsrc_rxpool_low() 443 wp->wp_status |= (EIB_RXWQE_SHORT); in eib_rsrc_rxpool_low() [all …]
|
/illumos-gate/usr/src/lib/libc/port/regex/ |
H A D | wordexp.c | 100 wordexp(const char *word, wordexp_t *wp, int flags) in wordexp() argument 132 wordfree(wp); in wordexp() 142 wptmp = *wp; in wordexp() 365 *wp = wptmp; in wordexp() 393 append(wordexp_t *wp, char *str) in append() argument 402 if ((wp->we_wordp + wp->we_wordc) == in append() 403 (wp->we_wordv + wp->we_wordn - 1)) { in append() 404 nwp = realloc(wp->we_wordv, in append() 405 (wp->we_wordn + INITIAL) * sizeof (char *)); in append() 408 wp->we_wordn += INITIAL; in append() [all …]
|
/illumos-gate/usr/src/ucblib/libcurses/ |
H A D | delwin.c | 33 WINDOW *wp, *np; in delwin() local 44 wp = win->_nextp; in delwin() 45 while (wp != win) { in delwin() 46 np = wp->_nextp; in delwin() 47 (void) delwin(wp); in delwin() 48 wp = np; in delwin() 57 for (wp = win->_nextp; wp->_nextp != win; wp = wp->_nextp) in delwin() 59 wp->_nextp = win->_nextp; in delwin()
|
/illumos-gate/usr/src/cmd/spell/ |
H A D | hashlook.c | 43 #define fetch(wp, bp)\ argument 44 (((((long)wp[0]<<B)|wp[1])<<(B-bp))|(wp[2]>>bp)) 46 #define fetch(wp, bp) ((wp[0] << (B - bp)) | (wp[1] >> bp)) argument 55 unsigned *wp; in hashlook() local 61 wp = &table[hindex[t]]; in hashlook() 81 y = wp[0] << (B - bp); in hashlook() 83 y |= (wp[1] >> bp); in hashlook() 97 wp++; in hashlook() 99 if (wp >= tp && (wp > tp||bp < B)) in hashlook()
|
H A D | spellin.c | 44 unsigned wp; /* word pointer */ variable 52 while (wp < ND - 1) { in append() 53 table[wp] |= w1>>(B-bp); in append() 61 wp++; in append() 115 wp++; in main() 118 hindex[++u] = wp; in main() 145 wp++; in main() 147 hindex[u] = wp; in main() 150 (void) fwrite((char *)table, sizeof (*table), wp, stdout); in main() 153 argv[0], count, ignore, extra, wp); in main() [all …]
|
H A D | hashcheck.c | 41 unsigned wp; variable 53 int tp = wp; in fetch() 66 wp++; in fetch() 94 for (wp = hindex[i]; wp < hindex[i+1]; ) { in main() 95 if (wp == hindex[i] && bp == U) in main() 102 if (wp > hindex[i+1] || in main() 103 wp == hindex[i+1] && bp < U) in main()
|
/illumos-gate/usr/src/uts/intel/io/ |
H A D | devfm_machdep.c | 89 walk_init(fm_cmi_walk_t *wp, uint_t chipid, uint_t coreid, uint_t strandid, in walk_init() argument 92 wp->chipid = chipid; in walk_init() 93 wp->coreid = coreid; in walk_init() 94 wp->strandid = strandid; in walk_init() 99 if ((wp->cbfunc = cbfunc) == NULL) { in walk_init() 100 wp->hdls = kmem_alloc(sizeof (cmi_hdl_t) * INIT_HDLS, KM_SLEEP); in walk_init() 101 wp->nhdl_max = INIT_HDLS; in walk_init() 102 wp->nhdl = 0; in walk_init() 107 walk_fini(fm_cmi_walk_t *wp) in walk_fini() argument 109 if (wp->cbfunc == NULL) in walk_fini() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/kmdb/ |
H A D | kmdb_dpi.c | 395 kmdb_dpi_wapt_validate(kmdb_wapt_t *wp) in kmdb_dpi_wapt_validate() argument 397 if (mdb.m_dpi->dpo_wapt_validate(wp) < 0) in kmdb_dpi_wapt_validate() 404 kmdb_dpi_wapt_reserve(kmdb_wapt_t *wp) in kmdb_dpi_wapt_reserve() argument 406 if (mdb.m_dpi->dpo_wapt_reserve(wp) < 0) in kmdb_dpi_wapt_reserve() 410 wp->wp_type, (void *)wp->wp_addr, wp->wp_priv); in kmdb_dpi_wapt_reserve() 416 kmdb_dpi_wapt_release(kmdb_wapt_t *wp) in kmdb_dpi_wapt_release() argument 418 mdb.m_dpi->dpo_wapt_release(wp); in kmdb_dpi_wapt_release() 422 kmdb_dpi_wapt_arm(kmdb_wapt_t *wp) in kmdb_dpi_wapt_arm() argument 424 mdb.m_dpi->dpo_wapt_arm(wp); in kmdb_dpi_wapt_arm() 427 (void *)wp->wp_addr, wp->wp_type, wp->wp_priv); in kmdb_dpi_wapt_arm() [all …]
|
/illumos-gate/usr/src/cmd/mdb/intel/kmdb/ |
H A D | kaif.c | 87 #define KAIF_WPPRIV2ID(wp) (int)(uintptr_t)((wp)->wp_priv) argument 346 kaif_wapt_validate(kmdb_wapt_t *wp) in kaif_wapt_validate() argument 348 if (wp->wp_type == DPI_WAPT_TYPE_IO) { in kaif_wapt_validate() 349 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W)) { in kaif_wapt_validate() 354 if (wp->wp_size != 1 && wp->wp_size != 2 && wp->wp_size != 4) { in kaif_wapt_validate() 359 } else if (wp->wp_type == DPI_WAPT_TYPE_PHYS) { in kaif_wapt_validate() 365 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W) && in kaif_wapt_validate() 366 wp->wp_wflags != MDB_TGT_WA_W) { in kaif_wapt_validate() 371 if ((wp->wp_size & -(wp->wp_size)) != wp->wp_size || in kaif_wapt_validate() 372 wp->wp_size > WAPT_DATA_MAX_SIZE) { in kaif_wapt_validate() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | nvtree.c | 696 static void outval(char *name, const char *vname, struct Walk *wp) in outval() argument 698 register Namval_t *np, *nq, *last_table=wp->shp->last_table; in outval() 703 if(!(np=nv_open(vname,wp->root,mode|NV_VARNAME|NV_NOADD|NV_NOASSIGN|NV_NOFAIL|wp->noscope))) in outval() 705 wp->shp->last_table = last_table; in outval() 708 if(!wp->out) in outval() 709 wp->shp->last_table = last_table; in outval() 728 if(!wp->out) in outval() 752 nq = nv_putsub(np,NIL(char*),ARRAY_SCAN|(wp->out?ARRAY_NOCHILD:0)); in outval() 754 if(!wp->out) in outval() 757 if(sh.subshell || (wp->flags!=NV_RDONLY) || nv_isattr(np,NV_MINIMAL|NV_NOFREE)) in outval() [all …]
|
/illumos-gate/usr/src/uts/sun4v/os/ |
H A D | mach_trap.c | 203 struct rwindow *wp; in ptl1_showtrap() local 210 wp = &rp->ptl1_rwindow[i]; in ptl1_showtrap() 212 if ((sym = kobj_getsymname(wp->rw_in[7], &off)) != NULL) { in ptl1_showtrap() 217 i, wp->rw_in[7]); in ptl1_showtrap() 235 wp->rw_local[0], wp->rw_local[1], wp->rw_local[2], in ptl1_showtrap() 236 wp->rw_local[3], wp->rw_local[4], wp->rw_local[5], in ptl1_showtrap() 237 wp->rw_local[6], wp->rw_local[7]); in ptl1_showtrap() 241 wp->rw_in[0], wp->rw_in[1], wp->rw_in[2], wp->rw_in[3], in ptl1_showtrap() 242 wp->rw_in[4], wp->rw_in[5], wp->rw_in[6], wp->rw_in[7]); in ptl1_showtrap()
|
/illumos-gate/usr/src/uts/sun4u/os/ |
H A D | mach_trap.c | 217 struct rwindow *wp; in ptl1_showtrap() local 224 wp = &rp->ptl1_rwindow[i]; in ptl1_showtrap() 226 if ((sym = kobj_getsymname(wp->rw_in[7], &off)) != NULL) { in ptl1_showtrap() 231 i, wp->rw_in[7]); in ptl1_showtrap() 249 wp->rw_local[0], wp->rw_local[1], wp->rw_local[2], in ptl1_showtrap() 250 wp->rw_local[3], wp->rw_local[4], wp->rw_local[5], in ptl1_showtrap() 251 wp->rw_local[6], wp->rw_local[7]); in ptl1_showtrap() 255 wp->rw_in[0], wp->rw_in[1], wp->rw_in[2], wp->rw_in[3], in ptl1_showtrap() 256 wp->rw_in[4], wp->rw_in[5], wp->rw_in[6], wp->rw_in[7]); in ptl1_showtrap()
|
/illumos-gate/usr/src/cmd/sort/ |
H A D | streams_wide.c | 72 (void) memcpy(str->s_buffer, str->s_current.l_data.wp, in stream_wide_prime() 74 str->s_current.l_data.wp = str->s_buffer; in stream_wide_prime() 78 *(str->s_current.l_data.wp + in stream_wide_prime() 104 str->s_current.l_data.wp = current_position; in stream_wide_prime() 114 *(str->s_current.l_data.wp + str->s_current.l_data_length) = L'\0'; in stream_wide_prime() 116 str->s_current.l_collate.wp = NULL; in stream_wide_prime() 134 graft_pt = str->s_current.l_data.wp + str->s_current.l_data_length + 1; in stream_wide_fetch() 137 str->s_current.l_data.wp = graft_pt; in stream_wide_fetch() 157 if ((next_nl = xmemwchar(str->s_current.l_data.wp, L'\n', in stream_wide_fetch() 160 MIN(wslen(str->s_current.l_data.wp), dist_to_buf_end); in stream_wide_fetch() [all …]
|
/illumos-gate/usr/src/cmd/csh/ |
H A D | sh.lex.c | 200 tchar *wp; in word() local 208 wp = wbuf; in word() 219 *wp++ = c; in word() 222 *wp++ = c1; in word() 243 *wp++ = c; in word() 254 *wp++ = '\\', --i; in word() 293 *wp++ = '\\', --i; in word() 304 *wp++ = c; in word() 308 wp = &wbuf[1]; in word() 313 *wp = 0; in word() [all …]
|