Lines Matching refs:p
99 #define CDF_REALLOC(p, n) erealloc(p, n) argument
157 cdf_getuint32(const uint8_t *p, size_t offs) in cdf_getuint32() argument
160 (void)memcpy(&rv, p + offs * sizeof(uint32_t), sizeof(rv)); in cdf_getuint32()
314 const void *p, size_t tail, int line) in cdf_check_stream_offset() argument
317 const char *e = RCAST(const char *, p) + tail; in cdf_check_stream_offset()
864 cdf_offset(const void *p, size_t l) in cdf_offset() argument
866 return CAST(const void *, CAST(const uint8_t *, p) + l); in cdf_offset()
871 const uint8_t *p, const uint8_t *e, size_t i) in cdf_get_property_info_pos() argument
877 if (p >= e) { in cdf_get_property_info_pos()
878 DPRINTF(("Past end %p < %p\n", e, p)); in cdf_get_property_info_pos()
881 if (cdf_check_stream_offset(sst, h, p, (tail + 1) * sizeof(uint32_t), in cdf_get_property_info_pos()
884 ofs = CDF_GETUINT32(p, tail); in cdf_get_property_info_pos()
885 q = CAST(const uint8_t *, cdf_offset(CAST(const void *, p), in cdf_get_property_info_pos()
888 if (q < p) { in cdf_get_property_info_pos()
889 DPRINTF(("Wrapped around %p < %p\n", q, p)); in cdf_get_property_info_pos()
927 cdf_copy_info(cdf_property_info_t *inp, const void *p, const void *e, in cdf_copy_info() argument
933 if (CAST(size_t, CAST(const char *, e) - CAST(const char *, p)) < len) in cdf_copy_info()
936 (void)memcpy(&inp->pi_val, p, len); in cdf_copy_info()
960 const uint8_t *p, *q, *e; in cdf_read_property_info() local
991 p = CAST(const uint8_t *, cdf_offset(sst->sst_tab, offs + sizeof(sh))); in cdf_read_property_info()
993 if (p >= e || cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1) in cdf_read_property_info()
997 if ((q = cdf_get_property_info_pos(sst, h, p, e, i)) == NULL) in cdf_read_property_info()
999 inp[i].pi_id = CDF_GETUINT32(p, i << 1); in cdf_read_property_info()
1007 i, inp[i].pi_id, inp[i].pi_type, q - p, offs)); in cdf_read_property_info()
1254 cdf_print_property_name(char *buf, size_t bufsiz, uint32_t p) in cdf_print_property_name() argument
1259 if (vn[i].v == p) in cdf_print_property_name()
1261 return snprintf(buf, bufsiz, "%#x", p); in cdf_print_property_name()
1300 cdf_u16tos8(char *buf, size_t len, const uint16_t *p) in cdf_u16tos8() argument
1303 for (i = 0; i < len && p[i]; i++) in cdf_u16tos8()
1304 buf[i] = CAST(char, p[i]); in cdf_u16tos8()
1361 const unsigned char *p = v; in cdf_dump() local
1365 for (i = 0, j = 0; i < len; i++, p++) { in cdf_dump()
1366 (void)fprintf(stderr, "%.2x ", *p); in cdf_dump()
1367 abuf[j++] = isprint(*p) ? *p : '.'; in cdf_dump()