| /freebsd/contrib/file/src/ |
| H A D | is_json.c | 78 json_isspace(const unsigned char uc) in json_isspace() argument 80 switch (uc) { in json_isspace() 92 json_isdigit(unsigned char uc) in json_isdigit() argument 94 switch (uc) { in json_isdigit() 104 json_isxdigit(unsigned char uc) in json_isxdigit() argument 106 if (json_isdigit(uc)) in json_isxdigit() 108 switch (uc) { in json_isxdigit() 118 json_skip_space(const unsigned char *uc, const unsigned char *ue) in json_skip_space() argument 120 while (uc < ue && json_isspace(*uc)) in json_skip_space() 121 uc++; in json_skip_space() [all …]
|
| H A D | is_simh.c | 94 getlen(const unsigned char **uc) in getlen() argument 97 memcpy(&n, *uc, sizeof(n)); in getlen() 98 *uc += sizeof(n); in getlen() 110 simh_parse(const unsigned char *uc, const unsigned char *ue) in simh_parse() argument 113 const unsigned char *orig_uc = uc; in simh_parse() 118 while (ue - uc >= CAST(ptrdiff_t, sizeof(nbytes))) { in simh_parse() 119 nbytes = getlen(&uc); in simh_parse() 132 uc += nbytes; in simh_parse() 133 if (ue - uc < CAST(ptrdiff_t, sizeof(nbytes))) in simh_parse() 135 cbytes = getlen(&uc); in simh_parse() [all …]
|
| H A D | is_csv.c | 68 eatquote(const unsigned char *uc, const unsigned char *ue) in eatquote() argument 72 while (uc < ue) { in eatquote() 73 unsigned char c = *uc++; in eatquote() 77 return --uc; in eatquote() 93 csv_parse(const unsigned char *uc, const unsigned char *ue) in csv_parse() argument 97 while (uc < ue) { in csv_parse() 98 switch (*uc++) { in csv_parse() 101 uc = eatquote(uc, ue); in csv_parse() 137 const unsigned char *uc = CAST(const unsigned char *, b->fbuf); in file_is_csv() local 138 const unsigned char *ue = uc + b->flen; in file_is_csv() [all …]
|
| /freebsd/contrib/sendmail/libsm/ |
| H A D | uxtext_unquote.c | 120 int uc = 0; local 126 uc = (uc << 4) + (ch - '0'); 128 uc = (uc << 4) + (ch - 'a' + 10); 130 uc = (uc << 4) + (ch - 'A' + 10); 133 if (uc > 0x10ffff) 137 if (uc < 0x80) 138 APPCH(uc); 139 else if (uc < 0x800) 141 APPCH(0xc0 | ((char) (uc >> 6))); 142 APPCH(0x80 | ((char) (uc & 0x3f))); [all …]
|
| /freebsd/sys/dev/rtwn/usb/ |
| H A D | rtwn_usb_attach.c | 131 struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); in rtwn_usb_alloc_rx_list() local 134 error = rtwn_usb_alloc_list(sc, uc->uc_rx, RTWN_USB_RX_LIST_COUNT, in rtwn_usb_alloc_rx_list() 135 uc->uc_rx_buf_size * RTWN_USB_RXBUFSZ_UNIT); in rtwn_usb_alloc_rx_list() 139 STAILQ_INIT(&uc->uc_rx_active); in rtwn_usb_alloc_rx_list() 140 STAILQ_INIT(&uc->uc_rx_inactive); in rtwn_usb_alloc_rx_list() 143 STAILQ_INSERT_HEAD(&uc->uc_rx_inactive, &uc->uc_rx[i], next); in rtwn_usb_alloc_rx_list() 151 struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); in rtwn_usb_alloc_tx_list() local 154 error = rtwn_usb_alloc_list(sc, uc->uc_tx, RTWN_USB_TX_LIST_COUNT, in rtwn_usb_alloc_tx_list() 160 STAILQ_INIT(&uc->uc_tx_active[i]); in rtwn_usb_alloc_tx_list() 161 STAILQ_INIT(&uc->uc_tx_pending[i]); in rtwn_usb_alloc_tx_list() [all …]
|
| H A D | rtwn_usb_ep.c | 124 rtwn_usb_setup_queues(struct rtwn_usb_softc *uc) in rtwn_usb_setup_queues() argument 126 struct rtwn_softc *sc = &uc->uc_sc; in rtwn_usb_setup_queues() 131 switch (uc->ntx) { in rtwn_usb_setup_queues() 159 rtwn_usb_setup_endpoints(struct rtwn_usb_softc *uc) in rtwn_usb_setup_endpoints() argument 162 struct rtwn_softc *sc = &uc->uc_sc; in rtwn_usb_setup_endpoints() 169 uc->ntx = 0; in rtwn_usb_setup_endpoints() 170 ep = uc->uc_udev->endpoints; in rtwn_usb_setup_endpoints() 171 ep_end = uc->uc_udev->endpoints + uc->uc_udev->endpoints_max; in rtwn_usb_setup_endpoints() 185 if (uc->ntx == RTWN_MAX_EPOUT) in rtwn_usb_setup_endpoints() 188 addr[uc->ntx++] = UE_GET_ADDR(eaddr); in rtwn_usb_setup_endpoints() [all …]
|
| H A D | rtwn_usb_tx.c | 69 _rtwn_usb_getbuf(struct rtwn_usb_softc *uc) in _rtwn_usb_getbuf() argument 71 struct rtwn_softc *sc = &uc->uc_sc; in _rtwn_usb_getbuf() 74 bf = STAILQ_FIRST(&uc->uc_tx_inactive); in _rtwn_usb_getbuf() 76 STAILQ_REMOVE_HEAD(&uc->uc_tx_inactive, next); in _rtwn_usb_getbuf() 85 rtwn_usb_getbuf(struct rtwn_usb_softc *uc) in rtwn_usb_getbuf() argument 87 struct rtwn_softc *sc = &uc->uc_sc; in rtwn_usb_getbuf() 92 bf = _rtwn_usb_getbuf(uc); in rtwn_usb_getbuf() 101 rtwn_usb_txeof(struct rtwn_usb_softc *uc, struct rtwn_data *data, int status) in rtwn_usb_txeof() argument 103 struct rtwn_softc *sc = &uc->uc_sc; in rtwn_usb_txeof() 118 STAILQ_INSERT_TAIL(&uc->uc_tx_inactive, data, next); in rtwn_usb_txeof() [all …]
|
| H A D | rtwn_usb_rx.c | 155 rtwn_rxeof_fragmented(struct rtwn_usb_softc *uc, struct rtwn_data *data, in rtwn_rxeof_fragmented() argument 158 struct rtwn_softc *sc = &uc->uc_sc; in rtwn_rxeof_fragmented() 160 struct rtwn_rx_stat_common *stat = &uc->uc_rx_stat; in rtwn_rxeof_fragmented() 167 if (uc->uc_rx_stat_len < sizeof(*stat)) { in rtwn_rxeof_fragmented() 168 min_len = min(sizeof(*stat) - uc->uc_rx_stat_len, len); in rtwn_rxeof_fragmented() 169 memcpy((uint8_t *)stat + uc->uc_rx_stat_len, buf, min_len); in rtwn_rxeof_fragmented() 171 uc->uc_rx_stat_len += min_len; in rtwn_rxeof_fragmented() 175 if (uc->uc_rx_stat_len < sizeof(*stat)) in rtwn_rxeof_fragmented() 198 m_copyback(data->m, 0, uc->uc_rx_stat_len, in rtwn_rxeof_fragmented() 211 uc->uc_rx_off = sizeof(*stat); in rtwn_rxeof_fragmented() [all …]
|
| /freebsd/bin/sh/tests/expansion/ |
| H A D | set-u1.0 | 2 ${SH} -uc 'unset foo; echo $foo' 2>/dev/null && exit 1 3 ${SH} -uc 'foo=; echo $foo' >/dev/null || exit 1 4 ${SH} -uc 'foo=1; echo $foo' >/dev/null || exit 1 6 ${SH} -uc 'unset foo; echo ${foo-}' >/dev/null || exit 1 7 ${SH} -uc 'unset foo; echo ${foo+}' >/dev/null || exit 1 8 ${SH} -uc 'unset foo; echo ${foo=}' >/dev/null || exit 1 10 ${SH} -uc 'unset foo; echo ${#foo}' 2>/dev/null && exit 1 11 ${SH} -uc 'foo=; echo ${#foo}' >/dev/null || exit 1 12 ${SH} -uc 'unset foo; echo ${foo#?}' 2>/dev/null && exit 1 13 ${SH} -uc 'foo=1; echo ${foo#?}' >/dev/null || exit 1 [all …]
|
| /freebsd/contrib/bzip2/ |
| H A D | decompress.c | 108 UChar uc; in BZ2_decompress() local 197 GET_UCHAR(BZ_X_MAGIC_1, uc); in BZ2_decompress() 198 if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC); in BZ2_decompress() 200 GET_UCHAR(BZ_X_MAGIC_2, uc); in BZ2_decompress() 201 if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC); in BZ2_decompress() 203 GET_UCHAR(BZ_X_MAGIC_3, uc) in BZ2_decompress() 204 if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC); in BZ2_decompress() 222 GET_UCHAR(BZ_X_BLKHDR_1, uc); in BZ2_decompress() 224 if (uc == 0x17) goto endhdr_2; in BZ2_decompress() 225 if (uc != 0x31) RETURN(BZ_DATA_ERROR); in BZ2_decompress() [all …]
|
| /freebsd/sys/netpfil/ipfw/nat64/ |
| H A D | nat64lsn_control.c | 73 nat64lsn_default_config(ipfw_nat64lsn_cfg *uc) in nat64lsn_default_config() argument 76 if (uc->jmaxlen == 0) in nat64lsn_default_config() 77 uc->jmaxlen = NAT64LSN_JMAXLEN; in nat64lsn_default_config() 78 if (uc->jmaxlen > 65536) in nat64lsn_default_config() 79 uc->jmaxlen = 65536; in nat64lsn_default_config() 80 if (uc->nh_delete_delay == 0) in nat64lsn_default_config() 81 uc->nh_delete_delay = NAT64LSN_HOST_AGE; in nat64lsn_default_config() 82 if (uc->pg_delete_delay == 0) in nat64lsn_default_config() 83 uc->pg_delete_delay = NAT64LSN_PG_AGE; in nat64lsn_default_config() 84 if (uc->st_syn_ttl == 0) in nat64lsn_default_config() [all …]
|
| H A D | nat64clat_control.c | 94 ipfw_nat64clat_cfg *uc) in nat64clat_export_config() argument 96 uc->plat_prefix = cfg->base.plat_prefix; in nat64clat_export_config() 97 uc->plat_plen = cfg->base.plat_plen; in nat64clat_export_config() 98 uc->clat_prefix = cfg->base.clat_prefix; in nat64clat_export_config() 99 uc->clat_plen = cfg->base.clat_plen; in nat64clat_export_config() 100 uc->flags = cfg->base.flags & NAT64CLAT_FLAGSMASK; in nat64clat_export_config() 101 uc->set = cfg->no.set; in nat64clat_export_config() 102 strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); in nat64clat_export_config() 115 ipfw_nat64clat_cfg *uc; in export_config_cb() local 117 uc = (ipfw_nat64clat_cfg *)ipfw_get_sopt_space(da->sd, sizeof(*uc)); in export_config_cb() [all …]
|
| H A D | nat64stl_control.c | 96 ipfw_nat64stl_cfg *uc) in nat64stl_export_config() argument 100 uc->prefix6 = cfg->base.plat_prefix; in nat64stl_export_config() 101 uc->plen6 = cfg->base.plat_plen; in nat64stl_export_config() 102 uc->flags = cfg->base.flags & NAT64STL_FLAGSMASK; in nat64stl_export_config() 103 uc->set = cfg->no.set; in nat64stl_export_config() 104 strlcpy(uc->name, cfg->no.name, sizeof(uc->name)); in nat64stl_export_config() 107 ipfw_export_obj_ntlv(no, &uc->ntlv6); in nat64stl_export_config() 109 ipfw_export_obj_ntlv(no, &uc->ntlv4); in nat64stl_export_config() 122 ipfw_nat64stl_cfg *uc; in export_config_cb() local 124 uc = (ipfw_nat64stl_cfg *)ipfw_get_sopt_space(da->sd, sizeof(*uc)); in export_config_cb() [all …]
|
| /freebsd/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_lwp_create.c | 81 ucontext_t uc; \ 85 getcontext(&uc); \ 86 uc.uc_flags = _UC_CPU; \ 87 ARCH##_##NAME(&uc); \ 89 error = _lwp_create(&uc, 0, &lid); \ 92 static void ARCH##_##NAME(ucontext_t *uc) \ 105 ucontext_t uc; in ATF_TC_BODY() local 112 _lwp_makecontext(&uc, lwp_main_func, NULL, NULL, stack, ssize); in ATF_TC_BODY() 114 error = _lwp_create(&uc, 0, &lid); in ATF_TC_BODY() 123 uc->uc_flags &= ~_UC_CPU; [all …]
|
| H A D | t_getcontext.c | 110 ucontext_t uc[DEPTH]; local 115 ATF_REQUIRE_EQ(getcontext(&uc[i]), 0); 117 uc[i].uc_stack.ss_sp = malloc(STACKSZ); 118 uc[i].uc_stack.ss_size = STACKSZ; 119 uc[i].uc_link = (i > 0) ? &uc[i - 1] : &save; 127 makecontext(&uc[i], (void *)run, 6, i, 134 makecontext(&uc[i], (void *)run, 8, i, 137 makecontext(&uc[i], (void *)run, 10, i, 141 makecontext(&uc[i], (void *)run, 10, i, 149 ATF_REQUIRE_EQ(setcontext(&uc[DEPTH-1]), 0);
|
| /freebsd/lib/libthread_db/arch/i386/ |
| H A D | libpthread_md.c | 39 pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) in pt_reg_to_ucontext() argument 41 memcpy(&uc->uc_mcontext.mc_fs, &r->r_fs, 18*4); in pt_reg_to_ucontext() 42 uc->uc_mcontext.mc_gs = r->r_gs; in pt_reg_to_ucontext() 46 pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r) in pt_ucontext_to_reg() argument 48 memcpy(&r->r_fs, &uc->uc_mcontext.mc_fs, 18*4); in pt_ucontext_to_reg() 49 r->r_gs = uc->uc_mcontext.mc_gs; in pt_ucontext_to_reg() 53 pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc) in pt_fpreg_to_ucontext() argument 56 memcpy(&uc->uc_mcontext.mc_fpstate, r, in pt_fpreg_to_ucontext() 60 struct savexmm *sx = (struct savexmm *)&uc->uc_mcontext.mc_fpstate; in pt_fpreg_to_ucontext() 68 pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) in pt_ucontext_to_fpreg() argument [all …]
|
| /freebsd/sys/kern/ |
| H A D | kern_context.c | 63 ucontext_t uc; in sys_getcontext() local 69 bzero(&uc, sizeof(ucontext_t)); in sys_getcontext() 70 get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); in sys_getcontext() 72 uc.uc_sigmask = td->td_sigmask; in sys_getcontext() 74 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in sys_getcontext() 82 ucontext_t uc; in sys_setcontext() local 88 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in sys_setcontext() 90 ret = set_mcontext(td, &uc.uc_mcontext); in sys_setcontext() 92 kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, in sys_setcontext() 103 ucontext_t uc; in sys_swapcontext() local [all …]
|
| /freebsd/contrib/libc-vis/ |
| H A D | unvis.c | 203 unsigned char uc = (unsigned char)c; in unvis() local 356 if (isoctal(uc)) { in unvis() 372 if (isoctal(uc)) { in unvis() 382 if (!isxdigit(uc)) in unvis() 386 if (isxdigit(uc)) { in unvis() 387 *cp = xtod(uc); in unvis() 399 if (isxdigit(uc)) { in unvis() 400 *cp = xtod(uc) | (*cp << 4); in unvis() 406 if (uc == '\n' || uc == '\r') { in unvis() 410 if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { in unvis() [all …]
|
| /freebsd/contrib/libpcap/ |
| H A D | fmtutils.c | 106 uint32_t uc; in utf_16le_to_utf_8_truncated() local 133 uc = REPLACEMENT_CHARACTER; in utf_16le_to_utf_8_truncated() 152 uc = SURROGATE_VALUE(c, c2); in utf_16le_to_utf_8_truncated() 159 uc = REPLACEMENT_CHARACTER; in utf_16le_to_utf_8_truncated() 173 uc = REPLACEMENT_CHARACTER; in utf_16le_to_utf_8_truncated() 179 uc = c; in utf_16le_to_utf_8_truncated() 187 if (uc < 0x0080) { in utf_16le_to_utf_8_truncated() 196 *utf_8++ = (char)uc; in utf_16le_to_utf_8_truncated() 198 } else if (uc < 0x0800) { in utf_16le_to_utf_8_truncated() 207 *utf_8++ = ((uc >> 6) & 0x3F) | 0xC0; in utf_16le_to_utf_8_truncated() [all …]
|
| /freebsd/tools/test/vm86/ |
| H A D | vm86_test.c | 54 ucontext_t *uc; in sig_handler() 57 uc = ucp; in sig_handler() 58 mc = &uc->uc_mcontext; in sig_handler() 76 ucontext_t uc; in main() 113 memset(&uc, 0, sizeof(uc)); in main() 114 uc.uc_mcontext.mc_ecx = 0x2345; in main() 115 uc.uc_mcontext.mc_eflags = PSL_VM | PSL_USER; in main() 116 uc.uc_mcontext.mc_cs = uc in main() 55 ucontext_t *uc; sig_handler() local 77 ucontext_t uc; main() local [all...] |
| /freebsd/crypto/krb5/src/lib/rpc/ |
| H A D | svc_udp.c | 412 struct udp_cache *uc; in svcudp_enablecache() local 418 uc = ALLOC(struct udp_cache, 1); in svcudp_enablecache() 419 if (uc == NULL) { in svcudp_enablecache() 423 uc->uc_size = size; in svcudp_enablecache() 424 uc->uc_nextvictim = 0; in svcudp_enablecache() 425 uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS); in svcudp_enablecache() 426 if (uc->uc_entries == NULL) { in svcudp_enablecache() 430 BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS); in svcudp_enablecache() 431 uc->uc_fifo = ALLOC(cache_ptr, size); in svcudp_enablecache() 432 if (uc->uc_fifo == NULL) { in svcudp_enablecache() [all …]
|
| /freebsd/contrib/mandoc/ |
| H A D | term.c | 568 int uc; /* Unicode codepoint number. */ in term_word() 611 uc = mchars_num2uc(seq + 1, sz - 1); in term_word() 614 uc = mchars_num2char(seq, sz); in term_word() 615 if (uc >= 0) in term_word() 627 uc = mchars_spec2cp(seq, sz); in term_word() 628 if (uc > 0) in term_word() 629 encode1(p, uc); in term_word() 635 uc = *seq; in term_word() 728 uc = -1; in term_word() 734 uc in term_word() 552 int sz, uc; term_word() local 976 int ssz, skip, uc; term_strlen() local [all...] |
| /freebsd/contrib/libarchive/libarchive/test/ |
| H A D | test_archive_string_conversion.c | 49 unicode_to_utf8(char *p, uint32_t uc) in unicode_to_utf8() argument 54 if (uc <= 0x7f) { in unicode_to_utf8() 55 *p++ = (char)uc; in unicode_to_utf8() 56 } else if (uc <= 0x7ff) { in unicode_to_utf8() 57 *p++ = 0xc0 | ((uc >> 6) & 0x1f); in unicode_to_utf8() 58 *p++ = 0x80 | (uc & 0x3f); in unicode_to_utf8() 59 } else if (uc <= 0xffff) { in unicode_to_utf8() 60 *p++ = 0xe0 | ((uc >> 12) & 0x0f); in unicode_to_utf8() 61 *p++ = 0x80 | ((uc >> 6) & 0x3f); in unicode_to_utf8() 62 *p++ = 0x80 | (uc & 0x3f); in unicode_to_utf8() [all …]
|
| /freebsd/contrib/libarchive/libarchive/ |
| H A D | archive_string_composition.h | 985 #define IS_DECOMPOSABLE_BLOCK(uc) \ argument 986 (((uc)>>8) <= 0x1D2 && u_decomposable_blocks[(uc)>>8]) 1006 #define CCC(uc) \ argument 1007 (((uc) > 0x1D244)?0:\ 1008 ccc_val[ccc_val_index[ccc_index[(uc)>>8]][((uc)>>4)&0x0F]][(uc)&0x0F])
|
| /freebsd/sys/arm64/arm64/ |
| H A D | freebsd32_machdep.c | 263 ucontext32_t uc; in freebsd32_getcontext() local 269 memset(&uc, 0, sizeof(uc)); in freebsd32_getcontext() 270 get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); in freebsd32_getcontext() 272 uc.uc_sigmask = td->td_sigmask; in freebsd32_getcontext() 274 ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); in freebsd32_getcontext() 282 ucontext32_t uc; in freebsd32_setcontext() local 288 ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); in freebsd32_setcontext() 290 ret = set_mcontext32(td, &uc.uc_mcontext); in freebsd32_setcontext() 292 kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, in freebsd32_setcontext() 302 ucontext32_t uc; in freebsd32_sigreturn() local [all …]
|