home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
f
/
ftp-102.zip
/
ftape-1.02
/
qic
/
qic.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-12
|
2KB
|
77 lines
/* QIC declarations.
Copyright (C) 1992 David L. Brown, Jr.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* qic.h,v 1.3 1992/10/13 01:55:27 dbrown Exp
*
* qic.h,v
* Revision 1.3 1992/10/13 01:55:27 dbrown
* Added FSF copyright.
*
* Revision 1.2 1992/03/19 23:01:05 dbrown
* Now compiles for tape but doesn't do anything.
*
*/
#ifndef _QIC_H_
#define _QIC_H_
#ifdef FLOPPY
# define BLOCK_SIZE 512
#else
# define BLOCK_SIZE 1024
#endif
#define BLOCKS_PER_SEGMENT 32
#ifdef FLOPPY
# define NUMBER_OF_SEGMENTS 45
#else
# define NUMBER_OF_SEGMENTS 4200
#endif
/* Bad sector map. */
#ifndef BIG_ENDIAN
typedef unsigned long BAD_SECTOR;
#define BAD_CLEAR(entry) ((entry)=0)
#define BAD_SET(entry,sector) ((entry)|=(1<<(sector)))
#define BAD_CHECK(entry,sector) ((entry)&(1<<(sector)))
#else
# error not yet written.
#endif
/* Representation of an in memory segment. marked_bad lists the
sectors that were marked bad during format. This is absolute
sector. The sectors should be read in from the disk and packed,
as if the bad sectors were not there, and the segment just
contained fewer sectors. read_sectors is a bitmap of errors
encountered while reading the data. These offsets are relative to
the packed data. blocks is a count of the sectors not marked bad.
This is just to prevent having to count the clear bits in
marked_bad each time this is used. data is the actual sector
packed data from (or to) the tape. */
struct memory_segment {
BAD_SECTOR marked_bad;
BAD_SECTOR read_bad;
int blocks;
char *data;
};
#endif _QIC_H_