home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / install / fips / restorrb / rtypes.h < prev   
Encoding:
C/C++ Source or Header  |  1996-07-11  |  2.8 KB  |  80 lines

  1. /* 
  2.     FIPS - the First nondestructive Interactive Partition Splitting program 
  3.      
  4.     Module types.h 
  5.  
  6.     RCS - Header: 
  7.     $Header: c:/daten/c/fips/source/RCS/types.h%v 2.0 1993/04/28 03:32:20 schaefer Exp schaefer $ 
  8.  
  9.     Copyright (C) 1993 Arno Schaefer 
  10.  
  11.     This program is free software; you can redistribute it and/or modify 
  12.     it under the terms of the GNU General Public License as published by 
  13.     the Free Software Foundation; either version 1, or (at your option) 
  14.     any later version. 
  15.  
  16.     This program is distributed in the hope that it will be useful, 
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of 
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  19.     GNU General Public License for more details. 
  20.  
  21.     You should have received a copy of the GNU General Public License 
  22.     along with this program; if not, write to the Free Software 
  23.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  24. */ 
  25.  
  26. typedef unsigned char byte; 
  27. typedef unsigned int word; 
  28. typedef unsigned long dword; 
  29.  
  30. typedef enum {false,true} boolean; 
  31.  
  32. struct drive_geometry 
  33.     dword heads; 
  34.     dword cylinders; 
  35.     dword sectors; 
  36. }; 
  37.  
  38. struct physical_sector 
  39.     dword head; 
  40.     dword cylinder; 
  41.     dword sector; 
  42. }; 
  43.  
  44. struct partition_info 
  45.     byte bootable;                  /* 80h or 0 */ 
  46.     byte start_head;                /* location of first sector (bootsector) */ 
  47.     word start_cylinder; 
  48.     byte start_sector; 
  49.     byte system;                    /* 1 = 12-bit FAT, 4 = 16-bit FAT & 16-bit sector number */ 
  50.                     /* 6 = 16-bit FAT & 32-bit sector number (BIGDOS) */ 
  51.     byte end_head;                  /* location of last sector */ 
  52.     word end_cylinder; 
  53.     byte end_sector; 
  54.     dword start_sector_abs;         /* = start_cylinder * heads * sectors + start_head * sectors */ 
  55.                     /* + start_sector - 1 */ 
  56.     dword no_of_sectors_abs;        /* = end_cylinder * heads * sectors + end_head * sectors */ 
  57.                     /* + end_sector - start_sector_abs */ 
  58. }; 
  59.  
  60. struct bootsector_info 
  61.     word bytes_per_sector;          /* usually 512 */ 
  62.     byte sectors_per_cluster;       /* may differ */ 
  63.     word reserved_sectors;          /* usually 1 (bootsector) */ 
  64.     byte no_of_fats;                /* usually 2 */ 
  65.     word no_of_rootdir_entries;     /* usually 512 (?) */ 
  66.     word no_of_sectors;             /* 0 on BIGDOS partitions */ 
  67.     byte media_descriptor;          /* usually F8h */ 
  68.     word sectors_per_fat;           /* depends on partition size */ 
  69.     word sectors_per_track;         /* = sectors */ 
  70.     word drive_heads;               /* = heads */ 
  71.     dword hidden_sectors;           /* first sector of partition */ 
  72.     dword no_of_sectors_long;       /* number of sectors on BIGDOS partitions */ 
  73.     byte phys_drive_no;             /* 80h or 81h */ 
  74.     byte signature;                 /* usually 29h */ 
  75. }; 
  76.