/freebsd-10.0-release/lib/libmd/ |
H A D | mdXhl.c | 24 MDXEnd(MDX_CTX *ctx, char *buf) argument 30 if (!buf) 31 buf = malloc(2*LENGTH + 1); 32 if (!buf) 36 buf[i+i] = hex[digest[i] >> 4]; 37 buf[i+i+1] = hex[digest[i] & 0x0f]; 39 buf[i+i] = '\0'; 40 return buf; 44 MDXFile(const char *filename, char *buf) argument 46 return (MDXFileChunk(filename, buf, 50 MDXFileChunk(const char *filename, char *buf, off_t ofs, off_t len) argument 91 MDXData(const void *data, unsigned int len, char *buf) argument [all...] |
/freebsd-10.0-release/sys/boot/i386/libi386/ |
H A D | biosacpi.c | 56 char buf[24]; local 64 sprintf(buf, "0x%08x", VTOP(rsdp)); 65 setenv("hint.acpi.0.rsdp", buf, 1); 69 sprintf(buf, "%d", revision); 70 setenv("hint.acpi.0.revision", buf, 1); 71 strncpy(buf, rsdp->OemId, sizeof(rsdp->OemId)); 72 buf[sizeof(rsdp->OemId)] = '\0'; 73 setenv("hint.acpi.0.oem", buf, 1); 74 sprintf(buf, "0x%08x", rsdp->RsdtPhysicalAddress); 75 setenv("hint.acpi.0.rsdt", buf, [all...] |
/freebsd-10.0-release/crypto/openssl/crypto/bn/ |
H A D | bn_rand.c | 120 unsigned char *buf=NULL; local 134 buf=(unsigned char *)OPENSSL_malloc(bytes); 135 if (buf == NULL) 147 if (RAND_pseudo_bytes(buf, bytes) == -1) 152 if (RAND_bytes(buf, bytes) <= 0) 168 buf[i] = buf[i-1]; 170 buf[i] = 0; 172 buf[i] = 255; 183 buf[ [all...] |
/freebsd-10.0-release/contrib/apr/misc/unix/ |
H A D | errorcodes.c | 33 static char *stuffbuffer(char *buf, apr_size_t bufsize, const char *s) argument 35 apr_cpystrn(buf,s,bufsize); 36 return buf; 146 static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err) argument 155 return stuffbuffer(buf, bufsize, 183 return stuffbuffer(buf, bufsize, result); 245 static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode) argument 256 buf, 260 LPTSTR msg = (LPTSTR) buf; 272 buf[ 317 apr_os_strerror(char* buf, apr_size_t bufsize, int err) argument 350 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 372 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 390 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 409 apr_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument [all...] |
/freebsd-10.0-release/contrib/nvi/common/ |
H A D | encoding.c | 62 const u_char *buf = (u_char *)ibuf; local 68 if ((buf[i] & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ 74 if (text_chars[buf[i]] != T) 76 } else if ((buf[i] & 0x40) == 0) { /* 10xxxxxx never 1st byte */ 81 if ((buf[i] & 0x20) == 0) /* 110xxxxx */ 82 if (buf[i] > 0xC1) /* C0, C1 */ 85 else if ((buf[i] & 0x10) == 0) /* 1110xxxx */ 87 else if ((buf[i] & 0x08) == 0) /* 11110xxx */ 88 if (buf[i] < 0xF5) 99 if (buf[ 123 const u_char *buf = (u_char *)ibuf; local 181 const u_char *buf = (u_char *)ibuf; local 210 const u_char *buf = (u_char *)ibuf; local [all...] |
/freebsd-10.0-release/contrib/smbfs/include/netsmb/ |
H A D | smb_lib.h | 64 #define getb(buf,ofs) (((const u_int8_t *)(buf))[ofs]) 65 #define setb(buf,ofs,val) (((u_int8_t*)(buf))[ofs])=val 66 #define getbw(buf,ofs) ((u_int16_t)(getb(buf,ofs))) 67 #define getw(buf,ofs) (*((u_int16_t*)(&((u_int8_t*)(buf))[ofs]))) 68 #define getdw(buf,ofs) (*((u_int32_t*)(&((u_int8_t*)(buf))[of [all...] |
/freebsd-10.0-release/lib/libc/nameser/ |
H A D | ns_print.c | 59 char **buf, size_t *buflen); 62 char **buf, size_t *buflen); 63 static void addlen(size_t len, char **buf, size_t *buflen); 65 char **buf, size_t *buflen); 67 char **buf, size_t *buflen); 83 *\li Number of characters written to buf, or -1 (check errno). 88 char *buf, size_t buflen) 95 name_ctx, origin, buf, buflen); 103 *\li Number of characters written to buf, or -1 (check errno). 110 char *buf, size_ 86 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 106 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 162 addlen(strlen(buf), &buf, &buflen); local 330 addlen(strlen(buf), &buf, &buflen); local 421 addlen(strlen(buf), &buf, &buflen); local 662 addlen(strlen(buf), &buf, &buflen); local 685 addlen(strlen(buf), &buf, &buflen); local 791 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument 825 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument 869 addlen(size_t len, char **buf, size_t *buflen) argument 876 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument 888 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument [all...] |
/freebsd-10.0-release/contrib/tcsh/ |
H A D | ed.xmap.c | 142 xm.str.buf = str->buf; 179 if (ptr->ch == *(ch->buf)) { 187 *(ch->buf) = tch; 193 *(ch->buf) = '\0'; 205 val->str.buf = NULL; 216 cs.buf = Xkey->buf; 244 if (ptr->ch != *(str->buf)) { 248 if (xm->sibling->ch == *(str->buf)) 437 struct Strbuf buf = Strbuf_INIT; local 465 Lookup(struct Strbuf *buf, const CStr *str, const XmapNode *ptr) argument 510 Enumerate(struct Strbuf *buf, const XmapNode *ptr) argument 577 unparsech(struct Strbuf *buf, Char ch) argument 714 unsigned char *buf, *b; local [all...] |
/freebsd-10.0-release/sys/sys/ |
H A D | buf.h | 34 * @(#)buf.h 8.9 (Berkeley) 3/30/95 47 struct buf; 64 void (*io_start)(struct buf *); 65 void (*io_complete)(struct buf *); 66 void (*io_deallocate)(struct buf *); 67 int (*io_countdeps)(struct buf *, int); 92 * Q - Protected by the buf queue lock 95 struct buf { struct 105 void (*b_iodone)(struct buf *); 108 TAILQ_ENTRY(buf) b_bobuf [all...] |
H A D | hash.h | 45 hash32_buf(const void *buf, size_t len, uint32_t hash) argument 47 const unsigned char *p = buf; 59 hash32_str(const void *buf, uint32_t hash) argument 61 const unsigned char *p = buf; 73 hash32_strn(const void *buf, size_t len, uint32_t hash) argument 75 const unsigned char *p = buf; 89 hash32_stre(const void *buf, int end, const char **ep, uint32_t hash) argument 91 const unsigned char *p = buf; 108 hash32_strne(const void *buf, size_t len, int end, const char **ep, argument 111 const unsigned char *p = buf; [all...] |
/freebsd-10.0-release/crypto/heimdal/lib/roken/ |
H A D | strftime.c | 170 strftime (char *buf, size_t maxsize, const char *format, argument 183 ret = snprintf (buf, maxsize - n, 187 ret = snprintf (buf, maxsize - n, 192 ret = snprintf (buf, maxsize - n, 196 ret = snprintf (buf, maxsize - n, 200 ret = snprintf (buf, maxsize - n, 210 ret = snprintf (buf, maxsize - n, 214 ret = snprintf (buf, maxsize - n, 218 ret = snprintf (buf, maxsize - n, 225 ret = snprintf (buf, maxsiz [all...] |
/freebsd-10.0-release/sbin/dhclient/ |
H A D | privsep.c | 25 struct buf * 28 struct buf *buf; local 30 if ((buf = calloc(1, sizeof(struct buf))) == NULL) 32 if ((buf->buf = malloc(len)) == NULL) { 33 free(buf); 36 buf->size = len; 38 return (buf); 42 buf_add(struct buf *buf, void *data, size_t len) argument 53 buf_close(int sock, struct buf *buf) argument 77 buf_read(int sock, void *buf, size_t nbytes) argument 113 struct buf *buf; local [all...] |
/freebsd-10.0-release/sys/ia64/disasm/ |
H A D | disasm_format.c | 110 asm_completer(const struct asm_cmpltr *c, char *buf) argument 112 strcpy(buf, asm_completers[c->c_type]); 116 asm_mnemonic(enum asm_op op, char *buf) argument 118 strcpy(buf, asm_mnemonics[(op < ASM_OP_INTERNAL_OPCODES) ? op : 0]); 122 asm_operand(const struct asm_oper *o, char *buf, uint64_t ip) argument 158 sprintf(buf, "ar%d", (int)o->o_value); 161 sprintf(buf, "ar.%s", n); 165 sprintf(buf, "b%d", (int)o->o_value); 167 strcpy(buf, "rp"); 201 sprintf(buf, "c 295 char buf[32]; local [all...] |
/freebsd-10.0-release/contrib/wpa/wpa_supplicant/ |
H A D | hs20_supplicant.c | 26 void wpas_hs20_add_indication(struct wpabuf *buf) argument 28 wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); 29 wpabuf_put_u8(buf, 5); 30 wpabuf_put_be24(buf, OUI_WFA); 31 wpabuf_put_u8(buf, HS20_INDICATION_OUI_TYPE); 32 wpabuf_put_u8(buf, 0x00); /* Hotspot Configuration */ 39 struct wpabuf *buf; local 42 buf = gas_anqp_build_initial_req(0, 100 + payload_len); 43 if (buf == NULL) 46 len_pos = gas_anqp_add_element(buf, ANQP_VENDOR_SPECIFI 74 struct wpabuf *buf; local [all...] |
/freebsd-10.0-release/crypto/openssh/ |
H A D | bufbn.c | 63 u_char *buf = xmalloc(bin_size); local 68 oi = BN_bn2bin(value, buf); 72 free(buf); 80 buffer_append(buffer, buf, oi); 82 memset(buf, 0, bin_size); 83 free(buf); 102 u_char buf[2], *bin; local 105 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) { 109 bits = get_u16(buf); 146 u_char *buf; local [all...] |
/freebsd-10.0-release/sys/dev/uart/ |
H A D | uart_cpu_powerpc.c | 56 char buf[64]; local 59 if (OF_getprop(opts, inputdev, buf, sizeof(buf)) == -1) 61 input = OF_finddevice(buf); 64 if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) 66 if (OF_finddevice(buf) != input) 76 char buf[64]; local 102 if (!getenv_string("hw.uart.dbgport", buf, sizeof(buf))) [all...] |
/freebsd-10.0-release/contrib/wpa/src/drivers/ |
H A D | driver_ndis_.c | 42 u8 *buf, size_t len) 48 wpa_hexdump(MSG_MSGDUMP, "NDIS: received event data", buf, len); 51 type = *((int *) buf); 52 pos = buf + sizeof(int); 55 if (buf + len - pos > 2) { 58 if (data_len > (size_t) (buf + len - pos)) { 89 u8 buf[512]; local 93 if (ReadFile(drv->events_pipe, buf, sizeof(buf), &len, NULL)) 94 wpa_driver_ndis_event_process(drv, buf, le 41 wpa_driver_ndis_event_process(struct wpa_driver_ndis_data *drv, u8 *buf, size_t len) argument [all...] |
/freebsd-10.0-release/contrib/xz/src/liblzma/check/ |
H A D | crc32_fast.c | 27 lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc) 37 // ensures that this won't read past the end of buf[]. 38 while ((uintptr_t)(buf) & 7) { 39 crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc); 44 const uint8_t *const limit = buf + (size & ~(size_t)(7)); 51 while (buf < limit) { 52 crc ^= *(const uint32_t *)(buf); 53 buf += 4; 60 const uint32_t tmp = *(const uint32_t *)(buf); 61 buf [all...] |
/freebsd-10.0-release/lib/libc/net/ |
H A D | gai_strerror.c | 83 char *buf; local 86 buf = gai_buf; 91 if ((buf = thr_getspecific(gai_key)) == NULL) { 92 if ((buf = malloc(sizeof(gai_buf))) == NULL) 94 if (thr_setspecific(gai_key, buf) != 0) { 95 free(buf); 103 strlcpy(buf, catgets(catd, 3, ecode, ai_errlist[ecode]), 106 strlcpy(buf, catgets(catd, 3, NL_MSGMAX - 1, "Success"), 109 strlcpy(buf, catgets(catd, 3, NL_MSGMAX, "Unknown error"), 112 return buf; [all...] |
/freebsd-10.0-release/tools/regression/lib/msun/ |
H A D | test-ilogb.c | 39 char buf[128], *end; local 50 snprintf(buf, sizeof(buf), "0x1.p%d", e); 51 d = strtod(buf, &end); 62 snprintf(buf, sizeof(buf), "0x1.p%d", e); 63 f = strtof(buf, &end); 74 snprintf(buf, sizeof(buf), "0x1.p%d", e); 75 ld = strtold(buf, [all...] |
/freebsd-10.0-release/contrib/bmake/ |
H A D | buf.c | 1 /* $NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $ */ 73 static char rcsid[] = "$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"; 78 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; 80 __RCSID("$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $"); 86 * buf.c -- 91 #include "buf.h" 223 * buf Buffer to destroy 235 Buf_Destroy(Buffer *buf, Boolean freeData) argument 239 data = buf->buffer; 245 buf 275 Buf_DestroyCompact(Buffer *buf) argument [all...] |
/freebsd-10.0-release/contrib/ofed/management/infiniband-diags/src/ |
H A D | ibportstate.c | 80 char buf[2048]; local 87 mad_dump_portstates(buf, sizeof buf, data, sizeof data); 89 mad_dump_field(IB_PORT_LINK_WIDTH_SUPPORTED_F, buf + strlen(buf), sizeof buf - strlen(buf), val); 90 sprintf(buf+strlen(buf), "%s", "\n"); 92 mad_dump_field(IB_PORT_LINK_WIDTH_ENABLED_F, buf 119 char buf[2048]; local [all...] |
/freebsd-10.0-release/usr.sbin/kgzip/ |
H A D | xio.c | 52 char buf[8192]; local 56 if ((n = sizeof(buf)) > nbyte) 58 if (xread(idi, buf, n, offset) != n) 60 xwrite(ido, buf, n); 72 char buf[8192]; local 75 memset(buf, 0, sizeof(buf)); 77 if ((n = sizeof(buf)) > nbyte) 79 xwrite(id, buf, n); 88 xread(const struct iodesc * id, void *buf, size_ argument 103 xwrite(const struct iodesc * id, const void *buf, size_t nbyte) argument [all...] |
/freebsd-10.0-release/contrib/tcpdump/ |
H A D | print-icmp.c | 325 static char buf[64]; local 331 snprintf(buf, sizeof(buf), "%02u:%02u:%02u.%03u",hrs,min,sec,msec); 332 return buf; 350 char buf[MAXHOSTNAMELEN + 100]; local 356 str = buf; 364 (void)snprintf(buf, sizeof(buf), "echo %s, id %u, seq %u", 377 (void)snprintf(buf, sizeof(buf), [all...] |
/freebsd-10.0-release/lib/libusb/ |
H A D | libusb20_desc.c | 322 uint8_t *buf; /* pointer to output buffer */ local 332 buf = ptr; 355 if (buf) { 358 buf[0] = temp; 359 buf += 1; 374 if (buf) { 377 buf[1] = (temp >> 8) & 0xFF; 378 buf[0] = temp & 0xFF; 379 buf += 2; 393 if (buf) { 556 const uint8_t *buf; /* pointer to input buffer */ local [all...] |