| /netbsd/src/crypto/external/bsd/netpgp/dist/src/netpgpverify/ |
| D | bufgap.c | 46 #define AFTSUB(bp, n) ((bp)->buf[(int)n]) argument 47 #define BEFSUB(bp, n) ((bp)->buf[(int)((bp)->size - (n) - 1)]) argument 118 bufgap_open(bufgap_t *bp, const char *f) in bufgap_open() argument 125 (void) memset(bp, 0x0, sizeof(*bp)); in bufgap_open() 131 bp->size = BGCHUNKSIZE; in bufgap_open() 132 NEWARRAY(char, bp->buf, bp->size, "f_open", return 0); in bufgap_open() 135 bp->size = (int) ((s.st_size / BGCHUNKSIZE) + 1) * BGCHUNKSIZE; in bufgap_open() 136 NEWARRAY(char, bp->buf, bp->size, "f_open", return 0); in bufgap_open() 137 cc = fread(&BEFSUB(bp, s.st_size), sizeof(char), in bufgap_open() 141 FREE(bp->buf); in bufgap_open() [all …]
|
| /netbsd/src/crypto/external/bsd/netpgp/dist/src/lib/ |
| D | bufgap.c | 57 #define AFTSUB(bp, n) ((bp)->buf[(int)n]) argument 58 #define BEFSUB(bp, n) ((bp)->buf[(int)((bp)->size - (n) - 1)]) argument 129 bufgap_open(bufgap_t *bp, const char *f) in bufgap_open() argument 136 (void) memset(bp, 0x0, sizeof(*bp)); in bufgap_open() 142 bp->size = BGCHUNKSIZE; in bufgap_open() 143 NEWARRAY(char, bp->buf, bp->size, "f_open", return 0); in bufgap_open() 146 bp->size = (int) ((s.st_size / BGCHUNKSIZE) + 1) * BGCHUNKSIZE; in bufgap_open() 147 NEWARRAY(char, bp->buf, bp->size, "f_open", return 0); in bufgap_open() 148 cc = fread(&BEFSUB(bp, s.st_size), sizeof(char), in bufgap_open() 152 FREE(bp->buf); in bufgap_open() [all …]
|
| /netbsd/src/games/hunt/huntd/ |
| D | shots.c | 69 BULLET *bp, *next; in moveshots() local 87 for (bp = blist; bp != NULL; bp = next) { in moveshots() 88 next = bp->b_next; in moveshots() 89 x = bp->b_x; in moveshots() 90 y = bp->b_y; in moveshots() 91 Maze[y][x] = bp->b_over; in moveshots() 99 switch (bp->b_type) { in moveshots() 104 if (move_normal_shot(bp)) { in moveshots() 105 bp->b_next = Bullets; in moveshots() 106 Bullets = bp; in moveshots() [all …]
|
| /netbsd/src/sbin/fsck_lfs/ |
| D | bufcache.c | 105 struct ubuf *bp, *nbp; in bufrehash() local 125 bp = LIST_FIRST(&bufhash[i]); in bufrehash() 126 while(bp) { in bufrehash() 127 nbp = LIST_NEXT(bp, b_hash); in bufrehash() 128 LIST_REMOVE(bp, b_hash); in bufrehash() 129 bp->b_hashval = vl_hash(bp->b_vp, bp->b_lblkno); in bufrehash() 130 LIST_INSERT_HEAD(&np[bp->b_hashval], bp, b_hash); in bufrehash() 131 bp = nbp; in bufrehash() 156 buf_destroy(struct ubuf * bp) in buf_destroy() argument 158 LIST_REMOVE(bp, b_vnbufs); in buf_destroy() [all …]
|
| /netbsd/src/sys/kern/ |
| D | vfs_bio.c | 348 checkfreelist(buf_t *bp, struct bqueue *dp, int ison) in checkfreelist() argument 356 if (b == bp) in checkfreelist() 369 binsheadfree(buf_t *bp, struct bqueue *dp) in binsheadfree() argument 373 KASSERT(bp->b_freelistindex == -1); in binsheadfree() 374 TAILQ_INSERT_HEAD(&dp->bq_queue, bp, b_freelist); in binsheadfree() 375 dp->bq_bytes += bp->b_bufsize; in binsheadfree() 376 bp->b_freelistindex = dp - bufqueues; in binsheadfree() 380 binstailfree(buf_t *bp, struct bqueue *dp) in binstailfree() argument 384 KASSERTMSG(bp->b_freelistindex == -1, "double free of buffer? " in binstailfree() 385 "bp=%p, b_freelistindex=%d\n", bp, bp->b_freelistindex); in binstailfree() [all …]
|
| /netbsd/src/external/bsd/tcpdump/dist/ |
| D | print-pim.c | 161 static void pimv2_print(netdissect_options *, const u_char *bp, u_int len, const u_char *); 165 const u_char *bp, u_int len) in pimv1_join_prune_print() argument 171 if (ND_TTEST_LEN(bp, 30) && GET_U_1(bp + 11) == 1 && in pimv1_join_prune_print() 172 ((njoin = GET_BE_U_2(bp + 20)) + GET_BE_U_2(bp + 22)) == 1) { in pimv1_join_prune_print() 175 ND_PRINT(" RPF %s ", GET_IPADDR_STRING(bp)); in pimv1_join_prune_print() 176 hold = GET_BE_U_2(bp + 6); in pimv1_join_prune_print() 182 GET_IPADDR_STRING(bp + 26), GET_U_1(bp + 25) & 0x3f, in pimv1_join_prune_print() 183 GET_IPADDR_STRING(bp + 12)); in pimv1_join_prune_print() 184 if (GET_BE_U_4(bp + 16) != 0xffffffff) in pimv1_join_prune_print() 185 ND_PRINT("/%s", GET_IPADDR_STRING(bp + 16)); in pimv1_join_prune_print() [all …]
|
| D | print-ptp.c | 290 static void ptp_print_2(netdissect_options *ndo, const u_char *bp, u_int len); 292 static void ptp_print_timestamp(netdissect_options *ndo, const u_char *bp, u_int *len, const char *… 293 static void ptp_print_timestamp_identity(netdissect_options *ndo, const u_char *bp, u_int *len, con… 294 static void ptp_print_announce_msg(netdissect_options *ndo, const u_char *bp, u_int *len); 295 static void ptp_print_port_id(netdissect_options *ndo, const u_char *bp, u_int *len); 296 static void ptp_print_mgmt_msg(netdissect_options *ndo, const u_char *bp, u_int *len); 300 const u_char *bp, u_int *len, uint8_t hex) in print_field() argument 309 u8_val = GET_U_1(bp); in print_field() 315 *len -= 1; bp += 1; in print_field() 318 u16_val = GET_BE_U_2(bp); in print_field() [all …]
|
| D | print-pgm.c | 151 const u_char *bp, u_int length, in pgm_print() argument 165 pgm = (const struct pgm_header *)bp; in pgm_print() 233 bp = (const u_char *) (spm + 1); in pgm_print() 237 ND_TCHECK_LEN(bp, sizeof(nd_ipv4)); in pgm_print() 238 addrtostr(bp, nla_buf, sizeof(nla_buf)); in pgm_print() 239 bp += sizeof(nd_ipv4); in pgm_print() 242 ND_TCHECK_LEN(bp, sizeof(nd_ipv6)); in pgm_print() 243 addrtostr6(bp, nla_buf, sizeof(nla_buf)); in pgm_print() 244 bp += sizeof(nd_ipv6); in pgm_print() 265 bp = (const u_char *) (pgm_poll + 1); in pgm_print() [all …]
|
| D | print-gre.c | 82 gre_print(netdissect_options *ndo, const u_char *bp, u_int length) in gre_print() argument 87 ND_TCHECK_2(bp); in gre_print() 90 vers = GET_BE_U_2(bp) & GRE_VERS_MASK; in gre_print() 95 gre_print_0(ndo, bp, len); in gre_print() 98 gre_print_1(ndo, bp, len); in gre_print() 111 gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length) in gre_print_0() argument 117 flags = GET_BE_U_2(bp); in gre_print_0() 123 bp += 2; in gre_print_0() 125 ND_TCHECK_2(bp); in gre_print_0() 128 prot = GET_BE_U_2(bp); in gre_print_0() [all …]
|
| D | print-dvmrp.c | 82 const u_char *bp, u_int len) in dvmrp_print() argument 93 type = GET_U_1(bp + 1); in dvmrp_print() 96 bp += 8; in dvmrp_print() 104 print_probe(ndo, bp, len); in dvmrp_print() 110 print_report(ndo, bp, len); in dvmrp_print() 115 print_neighbors(ndo, bp, len); in dvmrp_print() 122 bp -= 4; in dvmrp_print() 123 major_version = GET_U_1(bp + 3); in dvmrp_print() 124 minor_version = GET_U_1(bp + 2); in dvmrp_print() 125 bp += 4; in dvmrp_print() [all …]
|
| D | print-bootp.c | 290 const struct bootp *bp; in bootp_print() local 296 bp = (const struct bootp *)cp; in bootp_print() 297 bp_op = GET_U_1(bp->bp_op); in bootp_print() 301 bp_htype = GET_U_1(bp->bp_htype); in bootp_print() 302 bp_hlen = GET_U_1(bp->bp_hlen); in bootp_print() 304 ND_PRINT(" from %s", GET_ETHERADDR_STRING(bp->bp_chaddr)); in bootp_print() 312 ND_TCHECK_2(bp->bp_secs); in bootp_print() 323 if (GET_U_1(bp->bp_hops)) in bootp_print() 324 ND_PRINT(", hops %u", GET_U_1(bp->bp_hops)); in bootp_print() 325 if (GET_BE_U_4(bp->bp_xid)) in bootp_print() [all …]
|
| D | print-rx.c | 532 const u_char *bp, u_int length, uint16_t sport, uint16_t dport, in rx_print() argument 541 if (!ND_TTEST_LEN(bp, sizeof(struct rx_header))) { in rx_print() 546 rxh = (const struct rx_header *) bp; in rx_print() 603 rx_cache_insert(ndo, bp, (const struct ip *) bp2, dport); in rx_print() 607 fs_print(ndo, bp, length); in rx_print() 610 cb_print(ndo, bp, length); in rx_print() 613 prot_print(ndo, bp, length); in rx_print() 616 vldb_print(ndo, bp, length); in rx_print() 619 kauth_print(ndo, bp, length); in rx_print() 622 vol_print(ndo, bp, length); in rx_print() [all …]
|
| /netbsd/src/usr.sbin/bootp/bootptest/ |
| D | print-bootp.c | 57 bootp_print(struct bootp *bp, int length, u_short sport, u_short dport) in bootp_print() argument 74 switch (bp->bp_op) { in bootp_print() 89 printf(" bootp-#%d", bp->bp_op); in bootp_print() 93 if (bp->bp_htype != 1) in bootp_print() 94 printf(" htype:%d", bp->bp_htype); in bootp_print() 97 if (bp->bp_hlen != 6) in bootp_print() 98 printf(" hlen:%d", bp->bp_hlen); in bootp_print() 101 if (bp->bp_hlen) { in bootp_print() 105 TCHECK(bp->bp_chaddr[0], 6); in bootp_print() 107 if (bp->bp_op == BOOTREQUEST) in bootp_print() [all …]
|
| /netbsd/src/sys/arch/luna68k/stand/boot/ |
| D | bmd.c | 176 struct bmd_softc *bp = &bmd_softc; in bmd_escape() local 181 bp->bc_escape = bmd_escape_0; in bmd_escape() 185 bp->bc_stat &= ~STAT_ESCAPE; in bmd_escape() 186 bp->bc_esc = &bp->bc_escseq[0]; in bmd_escape() 187 bp->bc_escape = bmd_escape; in bmd_escape() 195 struct bmd_softc *bp = &bmd_softc; in bmd_escape_0() local 196 struct bmd_linec *bq = bp->bc_bl; in bmd_escape_0() 201 if (bp->bc_row > bp->bc_ymin) { in bmd_escape_0() 202 bp->bc_row--; in bmd_escape_0() 207 if (bq->bl_col < bp->bc_xmax - 1) { in bmd_escape_0() [all …]
|
| /netbsd/src/regress/sys/uvm/pdsim/ |
| D | lirs.c | 70 buf_print(struct buf *bp, char *s) in buf_print() argument 73 DFPRINTF(stderr, "%d(%s,%s,%d)%s", (bp - bufs), in buf_print() 74 (bp->b_type == B_L) ? "L" : in buf_print() 75 (bp->b_type == (B_H | B_R)) ? "HR" : in buf_print() 76 (bp->b_type == B_H) ? "H" : in buf_print() 77 (bp->b_type == 0) ? "free" : in buf_print() 79 (bp->b_flags & B_S) ? "S" : "", in buf_print() 80 bp->b_irr, in buf_print() 88 struct buf *bp; in dump() local 92 TAILQ_FOREACH(bp, &q_s, b_s) { in dump() [all …]
|
| /netbsd/src/external/cddl/osnet/dist/lib/libdtrace/common/ |
| D | dt_buf.c | 49 dt_buf_create(dtrace_hdl_t *dtp, dt_buf_t *bp, const char *name, size_t len) in dt_buf_create() argument 54 bp->dbu_buf = bp->dbu_ptr = dt_zalloc(dtp, len); in dt_buf_create() 55 bp->dbu_len = len; in dt_buf_create() 57 if (bp->dbu_buf == NULL) in dt_buf_create() 58 bp->dbu_err = dtrace_errno(dtp); in dt_buf_create() 60 bp->dbu_err = 0; in dt_buf_create() 62 bp->dbu_resizes = 0; in dt_buf_create() 63 bp->dbu_name = name; in dt_buf_create() 67 dt_buf_destroy(dtrace_hdl_t *dtp, dt_buf_t *bp) in dt_buf_destroy() argument 70 bp->dbu_name, (ulong_t)bp->dbu_len, bp->dbu_resizes); in dt_buf_destroy() [all …]
|
| /netbsd/src/external/bsd/mdocml/dist/ |
| D | eqn_term.c | 44 term_eqn(struct termp *p, const struct eqn_box *bp) in term_eqn() argument 47 eqn_box(p, bp); in term_eqn() 52 eqn_box(struct termp *p, const struct eqn_box *bp) in eqn_box() argument 60 if ((bp->type == EQN_LIST && bp->expectargs > 1) || in eqn_box() 61 (bp->type == EQN_PILE && (bp->prev || bp->next)) || in eqn_box() 62 (bp->parent != NULL && (bp->parent->pos == EQNPOS_SQRT || in eqn_box() 64 ((bp->top != NULL || bp->bottom != NULL) && in eqn_box() 65 bp->parent->type == EQN_SUBEXPR && in eqn_box() 66 bp->parent->pos != EQNPOS_OVER && bp->next != NULL) || in eqn_box() 68 (bp->type == EQN_SUBEXPR && bp->pos != EQNPOS_SQRT && in eqn_box() [all …]
|
| /netbsd/src/lib/libc/time/ |
| D | strptime.c | 119 fromzone(const unsigned char **bp, struct tm *tm, int mandatory) in fromzone() argument 125 for (p = buf, rp = *bp; !delim(*rp) && p < &buf[sizeof(buf) - 1]; rp++) in fromzone() 130 *bp = rp; in fromzone() 137 *bp = rp; in fromzone() 160 const unsigned char *bp, *ep, *zname; in strptime_l() local 165 bp = (const u_char *)buf; in strptime_l() 167 while (bp != NULL && (c = *fmt++) != '\0') { in strptime_l() 174 while (isspace(*bp)) in strptime_l() 175 bp++; in strptime_l() 186 if (c != *bp++) in strptime_l() [all …]
|
| /netbsd/src/lib/libc/db/hash/ |
| D | hash_buf.c | 111 BUFHEAD *bp; in __get_buf() local 119 bp = prev_bp->ovfl; in __get_buf() 120 if (!bp || (bp->addr != addr)) in __get_buf() 121 bp = NULL; in __get_buf() 131 bp = PTROF(segp[segment_ndx]); in __get_buf() 136 if (!bp) { in __get_buf() 137 bp = newbuf(hashp, addr, prev_bp); in __get_buf() 138 if (!bp || in __get_buf() 139 __get_page(hashp, bp->page, addr, !prev_bp, is_disk, 0)) in __get_buf() 143 (BUFHEAD *)(void *)((u_long)bp | is_disk_mask); in __get_buf() [all …]
|
| /netbsd/src/lib/libc/db/mpool/ |
| D | mpool.c | 128 BKT *bp; in mpool_newf() local 142 if ((bp = mpool_bkt(mp)) == NULL) in mpool_newf() 147 bp->pgno = *pgnoaddr; in mpool_newf() 149 bp->pgno = *pgnoaddr = mp->npages++; in mpool_newf() 151 bp->flags = MPOOL_PINNED | MPOOL_INUSE; in mpool_newf() 153 head = &mp->hqh[HASHKEY(bp->pgno)]; in mpool_newf() 154 TAILQ_INSERT_HEAD(head, bp, hq); in mpool_newf() 155 TAILQ_INSERT_TAIL(&mp->lqh, bp, q); in mpool_newf() 156 return bp->page; in mpool_newf() 169 BKT *bp; in mpool_delete() local [all …]
|
| /netbsd/src/distrib/utils/more/ |
| D | ch.c | 112 struct buf *bp; in fch_get() local 118 for (bp = buf_head; bp != END_OF_CHAIN; bp = bp->next) in fch_get() 119 if (bp->block == ch_block) { in fch_get() 120 if (ch_offset >= bp->datasize) in fch_get() 140 return(bp->data[ch_offset]); in fch_get() 150 bp = buf_tail; in fch_get() 151 bp->block = ch_block; in fch_get() 152 bp->datasize = 0; in fch_get() 155 pos = (ch_block * BUFSIZ) + bp->datasize; in fch_get() 173 n = iread(file, &bp->data[bp->datasize], BUFSIZ - bp->datasize); in fch_get() [all …]
|
| /netbsd/src/external/gpl3/gcc/dist/gcc/ |
| D | tree-streamer-out.cc | 72 pack_ts_base_value_fields (struct bitpack_d *bp, tree expr) in pack_ts_base_value_fields() argument 75 bp_pack_value (bp, TREE_CODE (expr), 16); in pack_ts_base_value_fields() 78 bp_pack_value (bp, TREE_SIDE_EFFECTS (expr), 1); in pack_ts_base_value_fields() 79 bp_pack_value (bp, TREE_CONSTANT (expr), 1); in pack_ts_base_value_fields() 80 bp_pack_value (bp, TREE_READONLY (expr), 1); in pack_ts_base_value_fields() 85 bp_pack_value (bp, TREE_PUBLIC (expr), 1); in pack_ts_base_value_fields() 88 bp_pack_value (bp, 0, 4); in pack_ts_base_value_fields() 89 bp_pack_value (bp, TREE_ADDRESSABLE (expr), 1); in pack_ts_base_value_fields() 90 bp_pack_value (bp, TREE_THIS_VOLATILE (expr), 1); in pack_ts_base_value_fields() 93 bp_pack_value (bp, DECL_UNSIGNED (expr), 1); in pack_ts_base_value_fields() [all …]
|
| D | tree-streamer-in.cc | 102 unpack_ts_base_value_fields (struct bitpack_d *bp, tree expr) in unpack_ts_base_value_fields() argument 108 TREE_SIDE_EFFECTS (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 109 TREE_CONSTANT (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 110 TREE_READONLY (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 115 TREE_PUBLIC (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 118 bp_unpack_value (bp, 4); in unpack_ts_base_value_fields() 119 TREE_ADDRESSABLE (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 120 TREE_THIS_VOLATILE (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 123 DECL_UNSIGNED (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() 124 DECL_NAMELESS (expr) = (unsigned) bp_unpack_value (bp, 1); in unpack_ts_base_value_fields() [all …]
|
| /netbsd/src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/ |
| D | spa.h | 297 #define BPE_GET_ETYPE(bp) \ argument 298 (ASSERT(BP_IS_EMBEDDED(bp)), \ 299 BF64_GET((bp)->blk_prop, 40, 8)) 300 #define BPE_SET_ETYPE(bp, t) do { \ argument 301 ASSERT(BP_IS_EMBEDDED(bp)); \ 302 BF64_SET((bp)->blk_prop, 40, 8, t); \ 305 #define BPE_GET_LSIZE(bp) \ argument 306 (ASSERT(BP_IS_EMBEDDED(bp)), \ 307 BF64_GET_SB((bp)->blk_prop, 0, 25, 0, 1)) 308 #define BPE_SET_LSIZE(bp, x) do { \ argument [all …]
|
| /netbsd/src/external/bsd/byacc/dist/ |
| D | symtab.c | 37 bucket *bp; in make_bucket() local 41 bp = TMALLOC(bucket, 1); in make_bucket() 42 NO_SPACE(bp); in make_bucket() 44 bp->link = 0; in make_bucket() 45 bp->next = 0; in make_bucket() 47 bp->name = TMALLOC(char, strlen(name) + 1); in make_bucket() 48 NO_SPACE(bp->name); in make_bucket() 50 bp->tag = 0; in make_bucket() 51 bp->value = UNDEFINED; in make_bucket() 52 bp->index = 0; in make_bucket() [all …]
|