/*
 * readblock
 *
 * USAGE: text = 'dos/readblock'(filepath,tags)
 *
 * readblock return the content of the given file...
 *
 * $(C): (1995, Rocco Coluccelli, Bologna)
 * $VER: readblock 1.04 (05.Nov.1996)
 */

SIGNAL ON BREAK_C
SIGNAL ON HALT

/*
 *	TAGS:
 *		tag.BYTES = size of the block to be read
 *	METHODS:
 *		DEL		delete the file readed
 */
tag. = ""; tag.BYTES = 65535
INTERPRET ARG(2)

IF ~OPEN('in',ARG(1),'R') THEN EXIT ""
buffer = READCH('in',tag.BYTES)

IF POS("DEL",tag.METHODS) > 0 THEN DO
	CALL CLOSE('in'); ADDRESS COMMAND 'Delete "'ARG(1)'" QUIET FORCE'; END

RETURN buffer


break_c:
halt:
	EXIT ""
