/titanic_50/usr/src/lib/libadm/common/ |
H A D | puttext.c | 50 wchar_t *wstr, *wp; in puttext() local 76 wp = wstr; in puttext() 78 if (*wp == L'!') { in puttext() 79 wp++; in puttext() 84 while (iswspace(*wp)) in puttext() 85 ++wp; /* eat leading white space */ in puttext() 92 lastword = wp; in puttext() 96 if (*wp == L'\n') { in puttext() 100 wp++; in puttext() 103 wlen = wcwidth(*wp); in puttext() [all …]
|
/titanic_50/usr/src/lib/libcurses/screen/ |
H A D | mbaddch.c | 45 chtype *wcp, *ep, *wp, wc; in _mbclrch() local 50 wp = wcp + x; in _mbclrch() 53 if (ISCBIT(*wp)) { in _mbclrch() 54 for (; wp >= wcp; --wp) in _mbclrch() 55 if (!ISCBIT(*wp)) in _mbclrch() 57 if (wp < wcp) in _mbclrch() 60 wc = RBYTE(*wp); in _mbclrch() 61 ep = wp + _curs_scrwidth[TYPE(wc)]; in _mbclrch() 67 if ((x = (int)(wp - wcp)) < win->_firstch[y]) in _mbclrch() 76 for (; wp < ep; ++wp) in _mbclrch() [all …]
|
H A D | mbinsshift.c | 46 chtype *wcp, *wp, *ep; in _mbinsshift() local 57 wp = wcp + maxx - 1; in _mbinsshift() 58 if (ISMBIT(*wp)) { in _mbinsshift() 61 for (; wp >= wcp; --wp) in _mbinsshift() 62 if (!ISCBIT(*wp)) in _mbinsshift() 64 if (wp < wcp) in _mbinsshift() 66 rb = RBYTE(*wp); in _mbinsshift() 67 if ((wp + _curs_scrwidth[TYPE(rb)]) > (wcp + maxx)) in _mbinsshift() 69 maxx = (int)(wp - wcp); in _mbinsshift() 83 for (wp = wcp + maxx - 1; wp >= ep; --wp) in _mbinsshift() [all …]
|
H A D | mbmove.c | 47 chtype *wcp, *wp, *ep; in wmbmove() local 54 wp = wcp + x; in wmbmove() 58 if (ISCBIT(*wp)) { in wmbmove() 59 for (; wp >= wcp; --wp) in wmbmove() 60 if (!ISCBIT(*wp)) in wmbmove() 62 if (wp < wcp) { in wmbmove() 63 wp = wcp+x+1; in wmbmove() 64 for (; wp < ep; ++wp) in wmbmove() 65 if (!ISCBIT(*wp)) in wmbmove() 71 if (wp + _curs_scrwidth[TYPE(*wp)] > ep) in wmbmove() [all …]
|
H A D | mbinch.c | 47 chtype *wp, *ep, wc; in wmbinch() local 56 wp = win->_y[win->_cury] + win->_curx; in wmbinch() 57 wc = RBYTE(*wp); in wmbinch() 58 ep = wp + _curs_scrwidth[TYPE(wc & 0377)]; in wmbinch() 60 for (; wp < ep; ++wp) { in wmbinch() 61 if ((wc = RBYTE(*wp)) == MBIT) in wmbinch() 65 if ((wc = LBYTE(*wp)|MBIT) == MBIT) in wmbinch()
|
/titanic_50/usr/src/lib/libcmd/common/ |
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 | wclib.c | 61 Wc_t* wp; in wc_init() local 63 if (!(wp = (Wc_t*)stakalloc(sizeof(Wc_t)))) in wc_init() 66 wp->mb = 0; in wc_init() 69 wp->mb = 1; in wc_init() 72 wp->mb = -1; in wc_init() 75 wp->type[n] = (w && isspace(n)) ? WC_SP : 0; in wc_init() 76 wp->type['\n'] = WC_SP|WC_NL; in wc_init() 77 if ((mode & (WC_MBYTE|WC_WORDS)) && wp->mb > 0) in wc_init() 81 wp->type[0x80+n] |= WC_MB; in wc_init() 83 wp->type[0xc0+n] |= WC_MB+1; in wc_init() [all …]
|
/titanic_50/usr/src/lib/fm/topo/libtopo/common/ |
H A D | topo_snap.c | 500 topo_walk_t *wp; in topo_walk_init() local 512 if ((wp = topo_node_walk_init(thp, NULL, tp->tt_root, in topo_walk_init() 516 return (wp); in topo_walk_init() 525 step_child(tnode_t *cnp, topo_walk_t *wp, int flag, int bottomup) in step_child() argument 533 topo_dprintf(wp->tw_thp, TOPO_DBG_WALK, in step_child() 539 topo_dprintf(wp->tw_thp, TOPO_DBG_WALK, in step_child() 544 wp->tw_node = nnp; in step_child() 546 status = topo_walk_bottomup(wp, flag); in step_child() 548 status = topo_walk_step(wp, flag); in step_child() 554 step_sibling(tnode_t *cnp, topo_walk_t *wp, int flag, int bottomup) in step_sibling() argument [all …]
|
/titanic_50/usr/src/uts/intel/io/ |
H A D | devfm_machdep.c | 87 walk_init(fm_cmi_walk_t *wp, uint_t chipid, uint_t coreid, uint_t strandid, in walk_init() argument 90 wp->chipid = chipid; in walk_init() 91 wp->coreid = coreid; in walk_init() 92 wp->strandid = strandid; in walk_init() 97 if ((wp->cbfunc = cbfunc) == NULL) { in walk_init() 98 wp->hdls = kmem_alloc(sizeof (cmi_hdl_t) * INIT_HDLS, KM_SLEEP); in walk_init() 99 wp->nhdl_max = INIT_HDLS; in walk_init() 100 wp->nhdl = 0; in walk_init() 105 walk_fini(fm_cmi_walk_t *wp) in walk_fini() argument 107 if (wp->cbfunc == NULL) in walk_fini() [all …]
|
/titanic_50/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 …]
|
/titanic_50/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 …]
|
/titanic_50/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 …]
|
/titanic_50/usr/src/ucblib/libcurses/ |
H A D | delwin.c | 35 WINDOW *wp, *np; in delwin() local 46 wp = win->_nextp; in delwin() 47 while (wp != win) { in delwin() 48 np = wp->_nextp; in delwin() 49 (void) delwin(wp); in delwin() 50 wp = np; in delwin() 59 for (wp = win->_nextp; wp->_nextp != win; wp = wp->_nextp) in delwin() 61 wp->_nextp = win->_nextp; in delwin()
|
/titanic_50/usr/src/uts/sun4u/starfire/io/ |
H A D | idn_smr.c | 965 struct slabwaiter *wp; in smr_slabwaiter_init() local 974 wp = idn.slabwaiter; in smr_slabwaiter_init() 975 for (i = 0; i < MAX_DOMAINS; wp++, i++) { in smr_slabwaiter_init() 976 wp->w_closed = 0; in smr_slabwaiter_init() 977 mutex_init(&wp->w_mutex, NULL, MUTEX_DEFAULT, NULL); in smr_slabwaiter_init() 978 cv_init(&wp->w_cv, NULL, CV_DEFAULT, NULL); in smr_slabwaiter_init() 988 struct slabwaiter *wp; in smr_slabwaiter_deinit() local 990 if ((wp = idn.slabwaiter) == NULL) in smr_slabwaiter_deinit() 993 for (i = 0; i < MAX_DOMAINS; wp++, i++) { in smr_slabwaiter_deinit() 994 ASSERT(wp->w_nwaiters == 0); in smr_slabwaiter_deinit() [all …]
|
/titanic_50/usr/src/cmd/spell/ |
H A D | hashlook.c | 45 #define fetch(wp, bp)\ argument 46 (((((long)wp[0]<<B)|wp[1])<<(B-bp))|(wp[2]>>bp)) 48 #define fetch(wp, bp) ((wp[0] << (B - bp)) | (wp[1] >> bp)) argument 57 unsigned *wp; in hashlook() local 63 wp = &table[hindex[t]]; in hashlook() 83 y = wp[0] << (B - bp); in hashlook() 85 y |= (wp[1] >> bp); in hashlook() 99 wp++; in hashlook() 101 if (wp >= tp && (wp > tp||bp < B)) in hashlook()
|
H A D | spellin.c | 46 unsigned wp; /* word pointer */ variable 54 while (wp < ND - 1) { in append() 55 table[wp] |= w1>>(B-bp); in append() 63 wp++; in append() 117 wp++; in main() 120 hindex[++u] = wp; in main() 147 wp++; in main() 149 hindex[u] = wp; in main() 152 (void) fwrite((char *)table, sizeof (*table), wp, stdout); in main() 155 argv[0], count, ignore, extra, wp); in main() [all …]
|
H A D | hashcheck.c | 43 unsigned wp; variable 55 int tp = wp; in fetch() 68 wp++; in fetch() 96 for (wp = hindex[i]; wp < hindex[i+1]; ) { in main() 97 if (wp == hindex[i] && bp == U) in main() 104 if (wp > hindex[i+1] || in main() 105 wp == hindex[i+1] && bp < U) in main()
|
/titanic_50/usr/src/cmd/mdb/common/kmdb/ |
H A D | kmdb_dpi.c | 397 kmdb_dpi_wapt_validate(kmdb_wapt_t *wp) in kmdb_dpi_wapt_validate() argument 399 if (mdb.m_dpi->dpo_wapt_validate(wp) < 0) in kmdb_dpi_wapt_validate() 406 kmdb_dpi_wapt_reserve(kmdb_wapt_t *wp) in kmdb_dpi_wapt_reserve() argument 408 if (mdb.m_dpi->dpo_wapt_reserve(wp) < 0) in kmdb_dpi_wapt_reserve() 412 wp->wp_type, (void *)wp->wp_addr, wp->wp_priv); in kmdb_dpi_wapt_reserve() 418 kmdb_dpi_wapt_release(kmdb_wapt_t *wp) in kmdb_dpi_wapt_release() argument 420 mdb.m_dpi->dpo_wapt_release(wp); in kmdb_dpi_wapt_release() 424 kmdb_dpi_wapt_arm(kmdb_wapt_t *wp) in kmdb_dpi_wapt_arm() argument 426 mdb.m_dpi->dpo_wapt_arm(wp); in kmdb_dpi_wapt_arm() 429 (void *)wp->wp_addr, wp->wp_type, wp->wp_priv); in kmdb_dpi_wapt_arm() [all …]
|
/titanic_50/usr/src/cmd/mdb/intel/kmdb/ |
H A D | kaif.c | 86 #define KAIF_WPPRIV2ID(wp) (int)(uintptr_t)((wp)->wp_priv) argument 311 kaif_wapt_validate(kmdb_wapt_t *wp) in kaif_wapt_validate() argument 313 if (wp->wp_type == DPI_WAPT_TYPE_IO) { in kaif_wapt_validate() 314 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W)) { in kaif_wapt_validate() 319 if (wp->wp_size != 1 && wp->wp_size != 2 && wp->wp_size != 4) { in kaif_wapt_validate() 324 } else if (wp->wp_type == DPI_WAPT_TYPE_PHYS) { in kaif_wapt_validate() 330 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W) && in kaif_wapt_validate() 331 wp->wp_wflags != MDB_TGT_WA_W) { in kaif_wapt_validate() 336 if ((wp->wp_size & -(wp->wp_size)) != wp->wp_size || in kaif_wapt_validate() 337 wp->wp_size > WAPT_DATA_MAX_SIZE) { in kaif_wapt_validate() [all …]
|
/titanic_50/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()
|
/titanic_50/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()
|
/titanic_50/usr/src/lib/libshell/common/sh/ |
H A D | nvtree.c | 646 static void outval(char *name, const char *vname, struct Walk *wp) in outval() argument 653 if(!(np=nv_open(vname,wp->root,mode|NV_VARNAME|NV_NOADD|NV_NOASSIGN|NV_NOFAIL|wp->noscope))) in outval() 673 if(!wp->out) in outval() 697 nq = nv_putsub(np,NIL(char*),ARRAY_SCAN|(wp->out?ARRAY_NOCHILD:0)); in outval() 699 if(!wp->out) in outval() 704 if(sh.subshell==0 && !(wp->flags&NV_RDONLY) && !nv_isattr(np,NV_MINIMAL|NV_NOFREE)) in outval() 705 nv_delete(np,wp->root,0); in outval() 711 sfputc(wp->out,'('); in outval() 712 if(wp->indent>=0) in outval() 713 sfputc(wp->out,'\n'); in outval() [all …]
|
/titanic_50/usr/src/cmd/mdb/sparc/kmdb/ |
H A D | kaif.c | 173 int wp, i; in kaif_get_gregs() local 185 wp = gregs->kregs[KREG_CWP]; in kaif_get_gregs() 187 gregs->kregs[KREG_L0 + i] = save->krs_rwins[wp].rw_local[i]; in kaif_get_gregs() 188 gregs->kregs[KREG_I0 + i] = save->krs_rwins[wp].rw_in[i]; in kaif_get_gregs() 193 if (++wp == kaif_get_nwin(cpuid)) in kaif_get_gregs() 194 wp = 0; in kaif_get_gregs() 197 gregs->kregs[KREG_O0 + i] = save->krs_rwins[wp].rw_in[i]; in kaif_get_gregs() 354 kaif_wapt_validate(kmdb_wapt_t *wp) in kaif_wapt_validate() argument 356 if (wp->wp_wflags & MDB_TGT_WA_X) { in kaif_wapt_validate() 362 if (wp->wp_size % 0xff != 0 && wp->wp_size != 8) { in kaif_wapt_validate() [all …]
|
/titanic_50/usr/src/cmd/sort/common/ |
H A D | streams_wide.c | 74 (void) memcpy(str->s_buffer, str->s_current.l_data.wp, in stream_wide_prime() 76 str->s_current.l_data.wp = str->s_buffer; in stream_wide_prime() 80 *(str->s_current.l_data.wp + in stream_wide_prime() 106 str->s_current.l_data.wp = current_position; in stream_wide_prime() 116 *(str->s_current.l_data.wp + str->s_current.l_data_length) = L'\0'; in stream_wide_prime() 118 str->s_current.l_collate.wp = NULL; in stream_wide_prime() 136 graft_pt = str->s_current.l_data.wp + str->s_current.l_data_length + 1; in stream_wide_fetch() 139 str->s_current.l_data.wp = graft_pt; in stream_wide_fetch() 159 if ((next_nl = xmemwchar(str->s_current.l_data.wp, L'\n', in stream_wide_fetch() 162 MIN(wslen(str->s_current.l_data.wp), dist_to_buf_end); in stream_wide_fetch() [all …]
|