132 lines
4.2 KiB
C
Executable File
132 lines
4.2 KiB
C
Executable File
#ifndef h_MTU
|
|
#define h_MTU
|
|
/******************************************************************************
|
|
*
|
|
* Definition of MAGtape unit block
|
|
*
|
|
* Module %M% Version %I% Date %H%
|
|
*
|
|
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
|
|
* This is unpublished proprietary source code of Ardent Software Inc.
|
|
* The copyright notice above does not evidence any actual or intented
|
|
* publication of such source code.
|
|
*
|
|
*******************************************************************************
|
|
*
|
|
* Maintenence log - insert most recent change descriptions at top
|
|
*
|
|
* Date.... GTAR# WHO Description.........................................
|
|
* 10/14/98 23801 SAP Change copyrights.
|
|
* 06/20/96 18667 JJV Added filemark type to MTfile structure for NT.
|
|
* 05/24/96 18456 JJV Added ALIGNNUM macro for MIPS NT tape handling.
|
|
* 02/27/96 17917 JJV Added NT account restore event object defines
|
|
* 01/29/96 17720 JJV Added NT tape handling support
|
|
* 02/22/95 15740 JC Addition of NLS map information to tape structure
|
|
* 12/15/88 5549 Fix block size problem on NCR tape drives
|
|
* 09/30/88 5343 GPS Default tape functionalities.
|
|
* 07/27/88 5190 GPS Floppy implementation on 386 based systems.
|
|
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#include "MFILE.h"
|
|
#include "NLS.h"
|
|
|
|
#define Mchannels 8
|
|
#define FALSE 0
|
|
#define TRUE 1
|
|
|
|
#ifdef MSWIN
|
|
/* These are the event objects used on NT for account restore */
|
|
#define EVENT_START_RESTORE "startChild"
|
|
#define EVENT_DATA_REQUEST "dataRequest"
|
|
#define EVENT_KILL_RESTORE "killRestore"
|
|
#endif
|
|
|
|
|
|
struct mtblock
|
|
{
|
|
MFILE *file;
|
|
#ifdef MSWIN
|
|
HANDLE hDev;
|
|
DWORD fmark_type;
|
|
#endif
|
|
int blksiz;
|
|
char tapetyp;
|
|
char *rewdev;
|
|
/* lblfmt - label format type depending on m/c
|
|
lblwritn - set TRUE if label has already been written
|
|
lblexpct - set to TRUE if a label is expected to be read
|
|
*/
|
|
short reelno,lblfmt,lblwritn,lblexpct;
|
|
/* Dtapetyp is C or T depending on Cartridge or Magnetic tape; used
|
|
only for generalized tape support.
|
|
writeat - Drive allows writing at loadpoint(L),after eof(E),or
|
|
anywhere (A). Field 13 from &DEVICE& file.
|
|
eofagain - After reading eof next read returns an eof(Y),
|
|
next read reutrns next record(N).
|
|
Field 14 from &DEVICE& file.
|
|
closefwd - In read mode when the file is closed file pointer
|
|
goes forward to the beginning of next file (Y),
|
|
File ptr stays in the same position(N).
|
|
Field 15 from &DEVICE& file.
|
|
*/
|
|
char Dtapetyp,writeat,eofagain,closefwd;
|
|
STRING lbheader,lbfname;
|
|
STRING mapname; /* to hold the device mapname */
|
|
CMAP *ipmap; /* Input map pointer */
|
|
CMAP *opmap; /* Output map pointer */
|
|
};
|
|
|
|
EXTERN MTU MTfile[];
|
|
|
|
#ifdef MSWIN
|
|
EXTERN STRING MTread( int, int * );
|
|
EXTERN int MTwtlabel( int, STRING, STRING, short);
|
|
EXTERN int MTrdlabel( int, STRING *, STRING *, STRING *, int *, int* );
|
|
EXTERN int MTmode( int *, int *, int );
|
|
EXTERN int MTwrite( int, STRING );
|
|
EXTERN int MTfwdfil( int, int );
|
|
EXTERN int MTfwdrec( int, int );
|
|
EXTERN int MTbckrec( int, int );
|
|
EXTERN int MTbckfil( int, int );
|
|
EXTERN HANDLE MTopen( MFILE *, char *, int );
|
|
EXTERN void MTclose( HANDLE * );
|
|
EXTERN int MTsetup(HANDLE, unsigned long, char, BOOL, DWORD *);
|
|
EXTERN int MTrewind( int );
|
|
EXTERN int MTunload( int );
|
|
EXTERN int MTweof( int, int );
|
|
EXTERN int MTstatus( int );
|
|
#else
|
|
EXTERN STRING MTread();
|
|
EXTERN int MTwtlabel();
|
|
EXTERN int MTrdlabel();
|
|
#endif
|
|
|
|
EXTERN int MTblkctr;
|
|
EXTERN int MTfilctr;
|
|
EXTERN int MToldblk;
|
|
/* MTbufsiz (max buf size),gets set to Tbufsiz or Cbufsiz in assign.c */
|
|
/* Tbufsiz for Magnetic tape and Cbufsiz for cartridge tapes are defined
|
|
in hardware.h */
|
|
EXTERN int MTbufsiz;
|
|
|
|
#define MTdmpbuf 8192
|
|
#define MTbufmin 16
|
|
#define MTflhdr 12
|
|
|
|
#ifdef MSWIN
|
|
/* Define buffer re-alignment macro for use by MIPS platforms */
|
|
#define ALIGNNUM(num, base, size) ((((num) + size-1) & ~(size-1)) + (base))
|
|
#endif
|
|
|
|
|
|
#if MT_sysv == 5 /* Encore */
|
|
struct ENC_mt_cntl {
|
|
int first_op;
|
|
char *orig_file_p;
|
|
};
|
|
#endif
|
|
|
|
#endif /* end of MTU.h */
|