4 typedef struct xms_node
17 unsigned long next_off;
22 #define XMSBLOCK 16384u
23 #define XMSBLOCKSHIFT 14
25 extern void LSHL( unsigned long far *SHLnumber, unsigned short n );
27 extern unsigned short XMS_available( void );
29 extern unsigned short XMSblk_available( void );
31 extern short XMS_alloc(unsigned short rsrvd,
32 unsigned short far *size
35 extern short XMS_dealloc(unsigned short Hdl );
37 extern short XMStoMem(unsigned short Handle, // XMS handle returned by
39 unsigned short blk, // which 16k block to copy to
40 unsigned short blkAdr, // offset within 16k block
41 unsigned short Bytes, // bytes to copy
45 extern short MemToXMS(unsigned short Handle,
47 unsigned short blkAdr,
52 // call these for ease
53 short alloc_xms(unsigned short far *size); // size in 16k blocks
54 // NOTE size is changed to the amount block size was altered by!
55 // normaly this is zero
57 short xms_to_mem(unsigned short handle, void far *p, unsigned long off,
59 short mem_to_xms(unsigned short handle, void far *p, unsigned long off,
61 void deinit_xms(void);
62 short init_xms(unsigned short min_blocks);
63 void qfree_xms(xms_node_t *node);
64 xms_node_t *qalloc_xms(unsigned long size);
65 xms_node_t *xms_open(char *file);
66 short xms_read(void far *buffer, unsigned short n, xms_node_t *node);
67 short xms_write(void far *buffer, unsigned short n, xms_node_t *node);
68 long xms_tell(xms_node_t *node);
69 short xms_seek(xms_node_t *node, long off, short whence);
70 void xms_close(xms_node_t *node);
73 extern xms_head_t xms_head;
79 /* ---------------------------------- end of file --------------------- */