"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stream.h" between
mtools-4.0.35.tar.bz2 and mtools-4.0.36.tar.bz2

About: Mtools is a collection of utilities to access MS-DOS disks from Unix without mounting them.

stream.h  (mtools-4.0.35.tar.bz2):stream.h  (mtools-4.0.36.tar.bz2)
skipping to change at line 25 skipping to change at line 25
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with Mtools. If not, see <http://www.gnu.org/licenses/>. * along with Mtools. If not, see <http://www.gnu.org/licenses/>.
*/ */
typedef struct Stream_t { typedef struct Stream_t {
struct Class_t *Class; struct Class_t *Class;
int refs; int refs;
struct Stream_t *Next; struct Stream_t *Next;
struct Stream_t *Buffer;
} Stream_t; } Stream_t;
#include "mtools.h" #include "mtools.h"
#include "msdos.h" #include "msdos.h"
#include "device.h" #include "device.h"
#include "llong.h" #include "llong.h"
void limitSizeToOffT(size_t *len, mt_off_t maxLen); void limitSizeToOffT(size_t *len, mt_off_t maxLen);
doscp_t *get_dosConvert_pass_through(Stream_t *Stream); doscp_t *get_dosConvert_pass_through(Stream_t *Stream);
typedef struct Class_t { typedef struct Class_t {
ssize_t (*read)(Stream_t *, char *, mt_off_t, size_t); ssize_t (*read)(Stream_t *, char *, size_t);
ssize_t (*write)(Stream_t *, char *, mt_off_t, size_t); ssize_t (*write)(Stream_t *, char *, size_t);
ssize_t (*pread)(Stream_t *, char *, mt_off_t, size_t);
ssize_t (*pwrite)(Stream_t *, char *, mt_off_t, size_t);
int (*flush)(Stream_t *); int (*flush)(Stream_t *);
int (*freeFunc)(Stream_t *); int (*freeFunc)(Stream_t *);
int (*set_geom)(Stream_t *, device_t *, device_t *); int (*set_geom)(Stream_t *, device_t *, device_t *);
int (*get_data)(Stream_t *, time_t *, mt_off_t *, int *, uint32_t *); int (*get_data)(Stream_t *, time_t *, mt_off_t *, int *, uint32_t *);
int (*pre_allocate)(Stream_t *, mt_off_t); int (*pre_allocate)(Stream_t *, mt_off_t);
doscp_t *(*get_dosConvert)(Stream_t *); doscp_t *(*get_dosConvert)(Stream_t *);
int (*discard)(Stream_t *); int (*discard)(Stream_t *);
} Class_t; } Class_t;
#define READS(stream, buf, address, size) \ #define READS(stream, buf, size) \
((stream)->Class->read)( (stream), (char *) (buf), (address), (size) ) ((stream)->Class->read)( (stream), (char *) (buf), (size) )
#define WRITES(stream, buf, address, size) \ #define WRITES(stream, buf, size) \
((stream)->Class->write)( (stream), (char *) (buf), (address), (size) ) ((stream)->Class->write)( (stream), (char *) (buf), (size) )
#define PREADS(stream, buf, address, size) \
((stream)->Class->pread)( (stream), (char *) (buf), (address), (size) )
#define PWRITES(stream, buf, address, size) \
((stream)->Class->pwrite)( (stream), (char *) (buf), (address), (size) )
#define SET_GEOM(stream, dev, orig_dev) \ #define SET_GEOM(stream, dev, orig_dev) \
(stream)->Class->set_geom( (stream), (dev), (orig_dev)) (stream)->Class->set_geom( (stream), (dev), (orig_dev))
#define GET_DATA(stream, date, size, type, address) \ #define GET_DATA(stream, date, size, type, address) \
(stream)->Class->get_data( (stream), (date), (size), (type), (address) ) (stream)->Class->get_data( (stream), (date), (size), (type), (address) )
#define PRE_ALLOCATE(stream, size) \ #define PRE_ALLOCATE(stream, size) \
(stream)->Class->pre_allocate((stream), (size)) (stream)->Class->pre_allocate((stream), (size))
skipping to change at line 87 skipping to change at line 94
flush_stream( (stream) ) flush_stream( (stream) )
#define FREE(stream) \ #define FREE(stream) \
free_stream( (stream) ) free_stream( (stream) )
#define COPY(stream) \ #define COPY(stream) \
copy_stream( (stream) ) copy_stream( (stream) )
#define DeclareThis(x) x *This = (x *) Stream #define DeclareThis(x) x *This = (x *) Stream
ssize_t force_write(Stream_t *Stream, char *buf, mt_off_t start, size_t len); void init_head(Stream_t *Stream, struct Class_t *Class, Stream_t *Next);
ssize_t force_read(Stream_t *Stream, char *buf, mt_off_t start, size_t len);
ssize_t force_pwrite(Stream_t *Stream, char *buf, mt_off_t start, size_t len);
ssize_t force_pread(Stream_t *Stream, char *buf, mt_off_t start, size_t len);
ssize_t force_write(Stream_t *Stream, char *buf, size_t len);
int set_geom_pass_through(Stream_t *Stream, device_t *dev, device_t *orig_dev); int set_geom_pass_through(Stream_t *Stream, device_t *dev, device_t *orig_dev);
int set_geom_noop(Stream_t *Stream, device_t *dev, device_t *orig_dev); int set_geom_noop(Stream_t *Stream, device_t *dev, device_t *orig_dev);
int get_data_pass_through(Stream_t *Stream, time_t *date, mt_off_t *size, int get_data_pass_through(Stream_t *Stream, time_t *date, mt_off_t *size,
int *type, uint32_t *address); int *type, uint32_t *address);
ssize_t read_pass_through(Stream_t *Stream, char *buf, ssize_t pread_pass_through(Stream_t *Stream, char *buf,
mt_off_t start, size_t len);
ssize_t write_pass_through(Stream_t *Stream, char *buf,
mt_off_t start, size_t len); mt_off_t start, size_t len);
ssize_t pwrite_pass_through(Stream_t *Stream, char *buf,
mt_off_t start, size_t len);
mt_off_t getfree(Stream_t *Stream); mt_off_t getfree(Stream_t *Stream);
int getfreeMinBytes(Stream_t *Stream, mt_off_t ref); int getfreeMinBytes(Stream_t *Stream, mt_off_t ref);
Stream_t *find_device(char drive, int mode, struct device *out_dev, Stream_t *find_device(char drive, int mode, struct device *out_dev,
union bootsector *boot, union bootsector *boot,
char *name, int *media, mt_off_t *maxSize, char *name, int *media, mt_off_t *maxSize,
int *isRop); int *isRop);
int adjust_tot_sectors(struct device *dev, mt_off_t offset, char *errmsg); int adjust_tot_sectors(struct device *dev, mt_off_t offset, char *errmsg);
 End of changes. 7 change blocks. 
12 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)