summaryrefslogtreecommitdiff
path: root/src/cdf.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2014-02-27 23:26:17 +0000
committerChristos Zoulas <christos@zoulas.com>2014-02-27 23:26:17 +0000
commitfde0e9173632189d0912c0ecc9f7ded0c3062763 (patch)
treee214a1b7f16ea5d896b309ecfe70482684fe19c6 /src/cdf.c
parentad9d943d5c4538902dd88882bb0cb343fe9b54db (diff)
downloadfile-git-fde0e9173632189d0912c0ecc9f7ded0c3062763.tar.gz
add some class id matching (from Christoph Biedl)
Diffstat (limited to 'src/cdf.c')
-rw-r--r--src/cdf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cdf.c b/src/cdf.c
index fb603643..a50e8423 100644
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.54 2014/02/25 20:52:02 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014/02/27 23:26:17 christos Exp $")
#endif
#include <assert.h>
@@ -675,11 +675,13 @@ out:
int
cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
- const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn)
+ const cdf_sat_t *sat, const cdf_dir_t *dir, cdf_stream_t *scn,
+ const cdf_directory_t **root)
{
size_t i;
const cdf_directory_t *d;
+ *root = NULL;
for (i = 0; i < dir->dir_len; i++)
if (dir->dir_tab[i].d_type == CDF_DIR_TYPE_ROOT_STORAGE)
break;
@@ -688,6 +690,7 @@ cdf_read_short_stream(const cdf_info_t *info, const cdf_header_t *h,
if (i == dir->dir_len)
goto out;
d = &dir->dir_tab[i];
+ *root = d;
/* If the it is not there, just fake it; some docs don't have it */
if (d->d_stream_first_sector < 0)