/*
 * This source file is Copyright 1995 by Evan Scott.
 * All rights reserved.
 * Permission is granted to distribute this file provided no
 * fees beyond distribution costs are levied.
 */

#define V_DosList 17519
#define V_StandardPacket 21364

#define V_bstr 25203
#define V_cstr 25458

#define V_lock 27759

typedef struct my_lock {
	struct FileLock fl;
	
	magic_verify;
	
	struct my_lock *next;
	struct MsgPort *port;
	b32 rfsl, lastkey;
	b8 fname[0];
} lock;

#define V_file_info 26217

#define FIRST_BLOCK_SIZE 512
#define MAX_READ_SIZE 2048

typedef struct my_file_info {
	magic_verify;
	
	struct my_file_info *next;

	b32 rfarg;	/* real file arg */
	b32 rpos, vpos, end;	/* real file position, virtual file position, file end */
	struct MsgPort *port;
	struct tcpm *tm;
	b16 type;
	boolean seek_end, eof, closed;
	b8 first_block[FIRST_BLOCK_SIZE];
	b8 fname[0];
} file_info;

/* special internal packets */

#define action_IDLE 2050
#define action_IDLE_DEATH 2051
#define action_SUSPEND 2052
