7 #include "mpeg3private.inc"
9 /* Filesystem structure */
14 mpeg3_css_t *css; /* Encryption object */
15 char path[MPEG3_STRLEN];
16 /* Hypothetical position of file pointer */
21 #define mpeg3io_tell(fs) (((mpeg3_fs_t *)(fs))->current_byte)
24 #define mpeg3io_eof(fs) (((mpeg3_fs_t *)(fs))->current_byte >= ((mpeg3_fs_t *)(fs))->total_bytes)
27 #define mpeg3io_bof(fs) (((mpeg3_fs_t *)(fs))->current_byte < 0)
29 #define mpeg3io_get_fd(fs) (fileno(((mpeg3_fs_t *)(fs))->fd))
31 #define mpeg3io_total_bytes(fs) (((mpeg3_fs_t *)(fs))->total_bytes)
33 extern inline unsigned int mpeg3io_read_int32(mpeg3_fs_t *fs)
37 /* Do not fread. This breaks byte ordering. */
38 a = (unsigned char)fgetc(fs->fd);
39 b = (unsigned char)fgetc(fs->fd);
40 c = (unsigned char)fgetc(fs->fd);
41 d = (unsigned char)fgetc(fs->fd);
42 result = ((int)a << 24) |
46 fs->current_byte += 4;
50 extern inline unsigned int mpeg3io_read_char(mpeg3_fs_t *fs)