Lines Matching refs:info

350 cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len)
357 if (info->i_buf != NULL && info->i_len >= siz) {
358 (void)memcpy(buf, &info->i_buf[off], len);
362 if (info->i_fd == -1)
365 if (pread(info->i_fd, buf, len, off) != CAST(ssize_t, len))
375 cdf_read_header(const cdf_info_t *info, cdf_header_t *h)
380 if (cdf_read(info, CAST(off_t, 0), buf, sizeof(buf)) == -1)
408 cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len,
419 return cdf_read(info, CAST(off_t, pos), RCAST(char *, buf) + offs, len);
452 cdf_read_sat(const cdf_info_t *info, cdf_header_t *h, cdf_sat_t *sat)
483 if (cdf_read_sector(info, sat->sat_tab, ss * i, ss, h,
501 if (cdf_read_sector(info, msa, 0, ss, h, mid) !=
516 if (cdf_read_sector(info, sat->sat_tab, ss * i, ss, h,
577 cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
608 if ((nr = cdf_read_sector(info, scn->sst_tab, i * ss, ss, h,
668 cdf_read_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
677 return cdf_read_long_sector_chain(info, h, sat, sid, len, scn);
681 cdf_read_dir(const cdf_info_t *info, const cdf_header_t *h,
711 if (cdf_read_sector(info, buf, 0, ss, h, sid) !=
736 cdf_read_ssat(const cdf_info_t *info, const cdf_header_t *h,
763 if (cdf_read_sector(info, ssat->sat_tab, i * ss, ss, h, sid) !=
779 cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
805 return cdf_read_long_sector_chain(info, h, sat,
823 cdf_read_doc_summary_info(const cdf_info_t *info, const cdf_header_t *h,
827 return cdf_read_user_stream(info, h, sat, ssat, sst, dir,
832 cdf_read_summary_info(const cdf_info_t *info, const cdf_header_t *h,
836 return cdf_read_user_stream(info, h, sat, ssat, sst, dir,
841 cdf_read_user_stream(const cdf_info_t *info, const cdf_header_t *h,
854 return cdf_read_sector_chain(info, h, sat, ssat, sst,
917 cdf_grow_info(cdf_property_info_t **info, size_t *maxcount, size_t incr)
928 CDF_REALLOC(*info, newcount * sizeof(*inp)));
932 *info = inp;
936 free(*info);
938 *info = NULL;
972 uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount)
1002 inp = cdf_grow_info(info, maxcount, sh.sh_properties);
1018 DPRINTF(("short info (no type)_\n"));
1068 size_t nelem = inp - *info;
1069 inp = cdf_grow_info(info, maxcount, nelements);
1118 free(*info);
1119 *info = NULL;
1128 cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
1149 *info = NULL;
1150 if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
1402 cdf_dump_dir(const cdf_info_t *info, const cdf_header_t *h,
1445 if (cdf_read_sector_chain(info, h, sat, ssat, sst,
1462 cdf_dump_property_info(const cdf_property_info_t *info, size_t count)
1470 cdf_print_property_name(buf, sizeof(buf), info[i].pi_id);
1472 switch (info[i].pi_type) {
1477 info[i].pi_s16);
1481 info[i].pi_s32);
1485 info[i].pi_u32);
1489 info[i].pi_f);
1493 info[i].pi_d);
1497 info[i].pi_str.s_len,
1498 info[i].pi_str.s_len, info[i].pi_str.s_buf);
1502 info[i].pi_str.s_len);
1503 for (j = 0; j < info[i].pi_str.s_len - 1; j++)
1504 (void)fputc(info[i].pi_str.s_buf[j << 1], stderr);
1508 tp = info[i].pi_tp;
1520 (void)fprintf(stderr, "CLIPBOARD %u\n", info[i].pi_u32);
1524 info[i].pi_type));
1536 cdf_property_info_t *info;
1540 if (cdf_unpack_summary_info(sst, h, &ssi, &info, &count) == -1)
1549 cdf_dump_property_info(info, count);
1550 free(info);
1585 cdf_info_t info;
1596 info.i_buf = NULL;
1597 info.i_len = 0;
1599 if ((info.i_fd = open(argv[1], O_RDONLY)) == -1)
1602 if (cdf_read_header(&info, &h) == -1)
1608 if (cdf_read_sat(&info, &h, &sat) == -1)
1614 if (cdf_read_ssat(&info, &h, &sat, &ssat) == -1)
1620 if (cdf_read_dir(&info, &h, &sat, &dir) == -1)
1623 if (cdf_read_short_stream(&info, &h, &sat, &dir, &sst, &root)
1631 cdf_dump_dir(&info, &h, &sat, &ssat, &sst, &dir);
1635 if (cdf_read_summary_info(&info, &h, &sat, &ssat, &sst, &dir,
1637 warn("Cannot read summary info");
1642 if (cdf_read_user_stream(&info, &h, &sat, &ssat, &sst,
1650 (void)close(info.i_fd);