/freebsd/usr.bin/msgs/ |
H A D | msgs.c | 95 static char inbuf[BUFSIZ]; variable 280 snprintf(inbuf, sizeof(inbuf), "%s/%s", _PATH_MSGS, cp); in main() 288 if (stat(inbuf, &stbuf) != 0) in main() 292 unlink(inbuf); in main() 350 fgets(inbuf, sizeof inbuf, stdin); in main() 354 ptr, ctime(&t), inbuf); in main() 360 fgets(inbuf, sizeof inbuf, stdin); in main() 363 blankline = (blankline || (inbuf[0] == '\n')); in main() 364 seensubj = (seensubj || (!blankline && (strncmp(inbuf, "Subj", 4) == 0))); in main() 365 fputs(inbuf, newmsg); in main() [all …]
|
/freebsd/tools/test/iconv/posix/ |
H A D | posix.c | 115 uint32_t inbuf[2] = { 0x00000151, 0x00000171 }; in conv_ret() local 120 inptr = (char *)inbuf; in conv_ret() 135 uint32_t inbuf[4]; in conv_2big() local 142 inptr = (char *)inbuf; in conv_2big() 151 printf("inptr - inbuf = %d\n", (const uint8_t *)inptr - (uint8_t *)inbuf); in conv_2big() 159 if (((const uint8_t *)inptr - (uint8_t *)inbuf == 8) && (inbytesleft == 8) && in conv_2big() 175 uint16_t inbuf[1] = { 0xEA42 }; in conv_einval() local 181 inptr = (char *)inbuf; in conv_einval() 190 printf("inptr - inbuf = %d\n", (const uint8_t *)inptr - (uint8_t *)inbuf); in conv_einval() 198 if (((const uint8_t *)inptr - (uint8_t *)inbuf == 1) && (inbytesleft == 1) && in conv_einval() [all …]
|
/freebsd/tools/test/iconv/tablegen/ |
H A D | tablegen.c | 169 mb_to_wc_fb(const char* inbuf, size_t inbufsize, in mb_to_wc_fb() argument 178 mb_to_uc_fb(const char* inbuf, size_t inbufsize, in mb_to_uc_fb() argument 285 uint32_t inbuf; in do_conv() local 289 for (inbuf = 0; inbuf < (lflag ? 0x100000 : 0x10000); inbuf += 1) { in do_conv() 290 if (uniinput && (inbuf >= 0xD800) && (inbuf <= 0xDF00)) in do_conv() 292 inbytesleft = uniinput ? 4 : magnitude(inbuf); in do_conv() 296 inbuf_ = (char *)&inbuf; in do_conv() 303 format(inbuf); in do_conv() 310 format(inbuf); in do_conv()
|
/freebsd/sbin/ipf/ipfsync/ |
H A D | ipsyncm.c | 60 int inbuf; local 121 inbuf = 0; 124 n1 = read(lfd, buff+inbuf, BUFFERLEN-inbuf); 142 inbuf += n1; 145 if (inbuf < sizeof(*sh)) { 181 if (inbuf < sizeof(*sh) + len) { 226 inbuf -= n2; 227 if (inbuf) { 228 bcopy(buff+n2, buff, inbuf);
|
H A D | ipsyncs.c | 56 int n1, n2, n3, magic, len, inbuf; local 134 inbuf = 0; 142 n1 = read(nfd, buff+inbuf, BUFFERLEN-inbuf); 160 inbuf += n1; 163 if (inbuf < sizeof(*sh)) { 199 if (inbuf < sizeof(*sh) + len) { 245 inbuf -= n2; 246 if (inbuf) { 247 bcopy(buff+n2, buff, inbuf);
|
/freebsd/sys/powerpc/pseries/ |
H A D | phyp_dbg.c | 50 } inbuf; member 110 0, 0, 0, &dbgport.inbuflen, &dbgport.inbuf.u64[0], in uart_phyp_dbg_getc() 111 &dbgport.inbuf.u64[1]); in uart_phyp_dbg_getc() 119 c = dbgport.inbuf.str[0]; in uart_phyp_dbg_getc() 131 if (c == '\r' && dbgport.inbuf.str[next] == '\0') { in uart_phyp_dbg_getc() 137 memmove(&dbgport.inbuf.str[0], &dbgport.inbuf.str[next], in uart_phyp_dbg_getc()
|
/freebsd/contrib/pf/libevent/ |
H A D | buffer.c | 92 evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf) in evbuffer_add_buffer() argument 99 size_t oldoff = inbuf->off; in evbuffer_add_buffer() 103 SWAP(outbuf, inbuf); in evbuffer_add_buffer() 104 SWAP(inbuf, &tmp); in evbuffer_add_buffer() 111 if (inbuf->off != oldoff && inbuf->cb != NULL) in evbuffer_add_buffer() 112 (*inbuf->cb)(inbuf, oldoff, inbuf->off, inbuf->cbarg); in evbuffer_add_buffer() 119 res = evbuffer_add(outbuf, inbuf->buffer, inbuf->off); in evbuffer_add_buffer() 122 evbuffer_drain(inbuf, inbuf->off); in evbuffer_add_buffer()
|
/freebsd/contrib/libucl/tests/ |
H A D | test_basic.c | 34 char *inbuf = NULL; in main() local 130 inbuf = malloc (BUFSIZ); in main() 136 inbuf = realloc (inbuf, bufsize * 2); in main() 138 if (inbuf == NULL) { in main() 143 r += fread (inbuf + r, 1, bufsize - r, in); in main() 151 ucl_parser_add_chunk_full (parser, (const unsigned char *)inbuf, r, in main() 298 if (inbuf != NULL) { in main() 299 free (inbuf); in main()
|
/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_ucm.c | 387 const char __user *inbuf, in ib_ucm_event() argument 398 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_event() 472 const char __user *inbuf, in ib_ucm_create_id() argument 483 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_create_id() 519 const char __user *inbuf, in ib_ucm_destroy_id() argument 530 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_destroy_id() 564 const char __user *inbuf, in ib_ucm_attr_id() argument 575 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_attr_id() 596 const char __user *inbuf, in ib_ucm_init_qp_attr() argument 608 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ib_ucm_init_qp_attr() [all …]
|
H A D | ib_ucma.c | 383 static ssize_t ucma_get_event(struct ucma_file *file, const char __user *inbuf, in ucma_get_event() argument 394 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ucma_get_event() 459 static ssize_t ucma_create_id(struct ucma_file *file, const char __user *inbuf, in ucma_create_id() argument 472 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ucma_create_id() 583 static ssize_t ucma_destroy_id(struct ucma_file *file, const char __user *inbuf, in ucma_destroy_id() argument 594 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ucma_destroy_id() 631 static ssize_t ucma_bind_ip(struct ucma_file *file, const char __user *inbuf, in ucma_bind_ip() argument 638 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ucma_bind_ip() 653 static ssize_t ucma_bind(struct ucma_file *file, const char __user *inbuf, in ucma_bind() argument 660 if (copy_from_user(&cmd, inbuf, sizeof(cmd))) in ucma_bind() [all …]
|
/freebsd/usr.bin/bintrans/ |
H A D | uudecode.c | 434 char inbuf[MAXPATHLEN + 1], *p; in base64_decode() local 440 strcpy(inbuf, leftover); in base64_decode() 441 switch (get_line(inbuf + strlen(inbuf), in base64_decode() 442 sizeof(inbuf) - strlen(inbuf))) { in base64_decode() 451 p = inbuf; in base64_decode() 460 count4 = p - inbuf; in base64_decode() 464 strcpy(leftover, inbuf + count4 + 1); in base64_decode() 465 inbuf[count4 + 1] = 0; in base64_decode() 467 n = b64_pton(inbuf, outbuf, sizeof(outbuf)); in base64_decode() 473 return (checkout(checkend(inbuf, "====", "error decoding base64 input stream"))); in base64_decode()
|
/freebsd/usr.bin/gzip/ |
H A D | unbzip2.c | 42 static char *inbuf, *outbuf; in unbzip2() local 44 if (inbuf == NULL) in unbzip2() 45 inbuf = malloc(BUFLEN); in unbzip2() 48 if (inbuf == NULL || outbuf == NULL) in unbzip2() 72 n = read(in, inbuf, BUFLEN); in unbzip2() 78 bzs.next_in = inbuf; in unbzip2()
|
/freebsd/usr.bin/caesar/ |
H A D | caesar.c | 68 char *inbuf; in main() local 74 if (!(inbuf = malloc((size_t)LINELENGTH))) { in main() 86 if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) { in main() 91 ch = (unsigned char) inbuf[i]; in main() 120 ch = (unsigned char) inbuf[i]; in main() 125 if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) { in main()
|
/freebsd/sys/sys/ |
H A D | iconv.h | 157 int iconv_conv(void *handle, const char **inbuf, 159 int iconv_conv_case(void *handle, const char **inbuf, 161 int iconv_convchr(void *handle, const char **inbuf, 163 int iconv_convchr_case(void *handle, const char **inbuf, 179 int (*conv)(void *handle, const char **inbuf, size_t *inbytesleft, 181 int (*conv_case)(void *handle, const char **inbuf, size_t *inbytesleft, 183 int (*convchr)(void *handle, const char **inbuf, size_t *inbytesleft, 185 int (*convchr_case)(void *handle, const char **inbuf, size_t *inbytesleft,
|
/freebsd/contrib/ofed/libibnetdisc/ |
H A D | ibnetdisc_cache.c | 177 static size_t _unmarshall8(uint8_t * inbuf, uint8_t * num) in _unmarshall8() argument 179 (*num) = inbuf[0]; in _unmarshall8() 184 static size_t _unmarshall16(uint8_t * inbuf, uint16_t * num) in _unmarshall16() argument 186 (*num) = ((uint16_t) inbuf[1] << 8) | inbuf[0]; in _unmarshall16() 191 static size_t _unmarshall32(uint8_t * inbuf, uint32_t * num) in _unmarshall32() argument 193 (*num) = (uint32_t) inbuf[0]; in _unmarshall32() 194 (*num) |= ((uint32_t) inbuf[1] << 8); in _unmarshall32() 195 (*num) |= ((uint32_t) inbuf[2] << 16); in _unmarshall32() 196 (*num) |= ((uint32_t) inbuf[3] << 24); in _unmarshall32() 201 static size_t _unmarshall64(uint8_t * inbuf, uint64_t * num) in _unmarshall64() argument [all …]
|
/freebsd/contrib/libucl/utils/ |
H A D | objdump.c | 105 unsigned char *inbuf; in main() local 128 inbuf = malloc (BUFSIZ); in main() 134 inbuf = realloc (inbuf, bufsize * 2); in main() 136 if (inbuf == NULL) { in main() 141 r += fread (inbuf + r, 1, bufsize - r, in); in main() 149 ucl_parser_add_chunk (parser, inbuf, r); in main()
|
/freebsd/usr.bin/iconv/ |
H A D | iconv.c | 74 char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *in, *out; in do_conv() local 90 while ((inbytes = fread(inbuf, 1, INBUFSIZE, fp)) > 0) { in do_conv() 91 in = inbuf; in do_conv() 104 if (errno != EINVAL || in == inbuf) in do_conv() 108 (void)memmove(inbuf, in, inbytes); in do_conv() 109 ret = fread(inbuf + inbytes, 1, in do_conv() 121 in = inbuf; in do_conv()
|
/freebsd/contrib/bzip2/ |
H A D | unzcrash.c | 40 uchar inbuf[M_BLOCK]; variable 92 nIn = fread ( inbuf, 1, M_BLOCK, f ); in main() 97 zbuf, &nZ, inbuf, nIn, 9, 0, 30 ); in main() 118 if (inbuf[i] != outbuf[i]) { in main() 132 if (inbuf[i] != outbuf[i]) { in main()
|
/freebsd/sys/libkern/ |
H A D | iconv_xlat.c | 79 iconv_xlat_conv(void *d2p, const char **inbuf, in iconv_xlat_conv() argument 88 if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL) in iconv_xlat_conv() 96 src = *inbuf; in iconv_xlat_conv() 100 *inbuf += n; in iconv_xlat_conv()
|
/freebsd/sys/netgraph/ |
H A D | ng_deflate.c | 64 u_char inbuf[DEFLATE_BUF_SIZE]; /* input buffer */ member 446 m_copydata(m, 0, inlen, (caddr_t)priv->inbuf); in ng_deflate_compress() 451 if (priv->inbuf[0] != 0) { in ng_deflate_compress() 452 priv->cx.next_in = priv->inbuf; in ng_deflate_compress() 455 priv->cx.next_in = priv->inbuf + 1; /* compress protocol */ in ng_deflate_compress() 555 m_copydata(m, 0, inlen, (caddr_t)priv->inbuf); in ng_deflate_decompress() 558 if ((priv->inbuf[0] & 0x01) != 0) { in ng_deflate_decompress() 559 proto = priv->inbuf[0]; in ng_deflate_decompress() 562 proto = be16dec(priv->inbuf); in ng_deflate_decompress() 573 rseqnum = be16dec(priv->inbuf + offset); in ng_deflate_decompress() [all …]
|
H A D | ng_mppc.c | 501 u_char *inbuf, *outbuf; in ng_mppc_compress() local 510 inbuf = mtod(m, u_char *); in ng_mppc_compress() 513 inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT); in ng_mppc_compress() 514 if (inbuf == NULL) in ng_mppc_compress() 516 m_copydata(m, 0, inlen, (caddr_t)inbuf); in ng_mppc_compress() 524 free(inbuf, M_NETGRAPH_MPPC); in ng_mppc_compress() 533 source = inbuf; in ng_mppc_compress() 565 free(inbuf, M_NETGRAPH_MPPC); in ng_mppc_compress() 761 u_char *inbuf, *outbuf; in ng_mppc_decompress() local 770 inbuf = mtod(m, u_char *); in ng_mppc_decompress() [all …]
|
H A D | ng_pred1.c | 73 u_char inbuf[PRED1_BUF_SIZE]; /* input buffer */ member 411 m_copydata(m, 0, inlen, (caddr_t)(priv->inbuf + 2)); in ng_pred1_compress() 417 fcs = Crc16(fcs, priv->inbuf + 2, inlen); in ng_pred1_compress() 421 len = Pred1Compress(node, priv->inbuf + 2, priv->outbuf + 2, inlen); in ng_pred1_compress() 431 out = priv->inbuf; in ng_pred1_compress() 489 m_copydata(m, 0, inlen, (caddr_t)priv->inbuf); in ng_pred1_decompress() 494 len = priv->inbuf[0] << 8; in ng_pred1_decompress() 495 len += priv->inbuf[1]; in ng_pred1_decompress() 503 len1 = Pred1Decompress(node, priv->inbuf + 2, priv->outbuf, in ng_pred1_decompress() 523 fcs = Crc16(fcs, priv->inbuf + inlen - 2, 2); in ng_pred1_decompress() [all …]
|
/freebsd/sys/fs/cd9660/ |
H A D | cd9660_rrip.c | 111 char *outbuf, *inbuf; in cd9660_rrip_slink() local 135 inbuf = ".."; in cd9660_rrip_slink() 159 inbuf = ana->imp->im_mountp->mnt_stat.f_mntonname; in cd9660_rrip_slink() 160 wlen = strlen(inbuf); in cd9660_rrip_slink() 167 inbuf = hostbuf; in cd9660_rrip_slink() 168 wlen = strlen(inbuf); in cd9660_rrip_slink() 177 inbuf = pcomp->name; in cd9660_rrip_slink() 194 memcpy(outbuf, inbuf, wlen); in cd9660_rrip_slink() 215 char *inbuf; in cd9660_rrip_altname() local 220 inbuf = ".."; in cd9660_rrip_altname() [all …]
|
H A D | cd9660_util.c | 59 char inbuf[3], outbuf[3], *inp, *outp; in isochar() local 69 inbuf[0]=(char)*(isofn - 1); in isochar() 70 inbuf[1]=(char)*isofn; in isochar() 71 inbuf[2]='\0'; in isochar() 72 inp = inbuf; in isochar()
|
/freebsd/lib/libc/inet/ |
H A D | inet_net_ntop.c | 165 unsigned char inbuf[16]; in inet_net_ntop_ipv6() local 185 memcpy(inbuf, src, p); in inet_net_ntop_ipv6() 186 memset(inbuf + p, 0, 16 - p); in inet_net_ntop_ipv6() 190 inbuf[p-1] &= m; in inet_net_ntop_ipv6() 193 s = inbuf; in inet_net_ntop_ipv6()
|