/*static char *SCCSID = "@(#)gdata.c	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)gdata.c 13.6 90/08/20";*/
/***	GDATA.C - Data shared by Pinball utilities
 *
 *	Pinball Boot_OEM 1.0
 *	Gregory A. Jones
 *	Copyright (C) 1988 Microsoft Corp.
 *
 *	Revision History:
 *	P.A. Williams	06/14/89   Removed ",+=[];" and a-z as illegal
 *				   characters from iv_chars.
 *
 */

#include <os2def.h>
#include <defs.h>
#include <types.h>

USHORT stdout_redir = 0;	/* non-zero if standard output is a file */
USHORT disk_handle = 0U;
USHORT disk_locked = 0; 	/* non-zero if the disk has been locked */

UCHAR *zeros = NULL;
UCHAR disk_name [1024];
UCHAR scratchbuf [2048];
UCHAR *scratchptr = &scratchbuf [0];	/* pointer to beginning of scratchbuf */
UCHAR huge *blank_buf = NULL;

struct device_param rec_param;
UCHAR huge *bitmap = NULL;
#ifdef TWO_MAPS
UCHAR huge *bitmap2 = NULL;
#endif
UCHAR *db_bitmap = NULL;
ULONG hotfix_tbl [(SPB)*(SECSIZE)/sizeof (ULONG)];

ULONG num_bad_sectors = 0L;
ULONG partition_offset = 0L;
ULONG number_of_sectors = 0L;
ULONG root_fnode = 0L;

struct diskpkt dp;
struct diskprm prm;
struct SUPERB sb;
struct SpareB spb;
struct mbr ourmbr;

ULONG *bad_list = NULL;

UCHAR outbuf [512];
UCHAR outbuf2 [512];
/*	UCHAR msgfilename [] = "UHPFS.MSG";	   */
UCHAR msgfilename [] = "OSO001.MSG";
/*
 * This string is the set of all characters that are NOT allowed in a
 * filename.  Its contents were derived from the 12/01/88 IFS spec.
 *
 * BUGBUG - POSIX support?
 *	    What about accented letters > 127?
 */
UCHAR iv_chars [] =
"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\
\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\
\"/\\:<|>";

/*
 *  This string is the set of characters added to the valid set
 *  of characters for file names by DCR 509;  any directory entry
 *  whose name includes one of these characters must have the
 *  NEW NAMES bit set in its flag.
 */
UCHAR new_chars[] = ",[]+=;";


#ifdef CHECK_ZERO
BOOL fCheckZero = TRUE;
#endif
