| /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/crypto/krb5/src/lib/krb5/krb/ |
| H A D | sendauth.c | 50 krb5_data inbuf, outbuf[2]; in krb5_sendauth() local 150 if ((retval = krb5_read_message(context, fd, &inbuf))) in krb5_sendauth() 153 if (inbuf.length) { in krb5_sendauth() 155 if ((retval = krb5_rd_error(context, &inbuf, error))) { in krb5_sendauth() 156 free(inbuf.data); in krb5_sendauth() 161 free(inbuf.data); in krb5_sendauth() 172 if ((retval = krb5_read_message(context, fd, &inbuf))) in krb5_sendauth() 175 if ((retval = krb5_rd_rep(context, *auth_context, &inbuf, in krb5_sendauth() 179 free(inbuf.data); in krb5_sendauth() 183 free(inbuf.data); in krb5_sendauth()
|
| H A D | recvauth.c | 57 krb5_data inbuf; in recvauth_common() local 78 if ((retval = krb5_read_message(context, fd, &inbuf))) in recvauth_common() 81 if (!data_eq(inbuf, d)) { in recvauth_common() 85 free(inbuf.data); in recvauth_common() 95 if ((retval = krb5_read_message(context, fd, &inbuf))) in recvauth_common() 99 if (!data_eq(inbuf, d)) { in recvauth_common() 105 *version = inbuf; in recvauth_common() 107 free(inbuf.data); in recvauth_common() 124 if ((retval = krb5_read_message(context, fd, &inbuf))) in recvauth_common() 140 problem = krb5_rd_req(context, auth_context, &inbuf, server, in recvauth_common() [all …]
|
| H A D | rd_rep.c | 70 const krb5_data *inbuf, krb5_ap_rep_enc_part **repl) in krb5_rd_rep() argument 79 if (!krb5_is_ap_rep(inbuf)) in krb5_rd_rep() 83 retval = decode_krb5_ap_rep(inbuf, &reply); in krb5_rd_rep() 149 const krb5_data *inbuf, krb5_ui_4 *nonce) in krb5_rd_rep_dce() argument 156 if (!krb5_is_ap_rep(inbuf)) in krb5_rd_rep_dce() 161 if ((retval = decode_krb5_ap_rep(inbuf, &reply))) in krb5_rd_rep_dce()
|
| /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/crypto/openssl/crypto/comp/ |
| H A D | c_zstd.c | 189 ZSTD_inBuffer inbuf; in zstd_stateful_compress_block() local 195 inbuf.src = in; in zstd_stateful_compress_block() 196 inbuf.size = ilen; in zstd_stateful_compress_block() 197 inbuf.pos = 0; in zstd_stateful_compress_block() 221 ret = ZSTD_compressStream2(state->compressor, &outbuf, &inbuf, ZSTD_e_continue); in zstd_stateful_compress_block() 225 } while (inbuf.pos < inbuf.size); in zstd_stateful_compress_block() 228 if (inbuf.pos < inbuf.size) in zstd_stateful_compress_block() 248 ZSTD_inBuffer inbuf; in zstd_stateful_expand_block() local 254 inbuf.src = in; in zstd_stateful_expand_block() 255 inbuf.size = ilen; in zstd_stateful_expand_block() [all …]
|
| /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/crypto/krb5/src/appl/simple/client/ |
| H A D | sim_client.c | 85 krb5_data packet, inbuf; in main() local 195 inbuf.data = hostname; in main() 196 inbuf.length = strlen(hostname); in main() 205 hostname, &inbuf, ccdef, &packet); in main() 255 inbuf.data = message; in main() 256 inbuf.length = strlen(message); in main() 258 if ((retval = krb5_mk_safe(context, auth_context, &inbuf, &packet, NULL))){ in main() 273 if ((retval = krb5_mk_priv(context, auth_context, &inbuf, in main()
|
| /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/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/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 …]
|