home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 8 / IOPROG_8.ISO / install / fips / source / fat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-25  |  1.8 KB  |  66 lines

  1. /*
  2.  
  3.     FIPS - the First nondestructive Interactive Partition Splitting program
  4.  
  5.  
  6.  
  7.     Module fat.h
  8.  
  9.  
  10.  
  11.     RCS - Header:
  12.  
  13.     $Header: c:/daten/fips/source/main/RCS/fat.h 1.4 1995/01/19 00:01:25 schaefer Exp schaefer $
  14.  
  15.  
  16.  
  17.     Copyright (C) 1993 Arno Schaefer
  18.  
  19.  
  20.  
  21.     This program is free software; you can redistribute it and/or modify
  22.  
  23.     it under the terms of the GNU General Public License as published by
  24.  
  25.     the Free Software Foundation; either version 2 of the License, or
  26.  
  27.     (at your option) any later version.
  28.  
  29.  
  30.  
  31.     This program is distributed in the hope that it will be useful,
  32.  
  33.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  34.  
  35.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  36.  
  37.     GNU General Public License for more details.
  38.  
  39.  
  40.  
  41.     You should have received a copy of the GNU General Public License
  42.  
  43.     along with this program; if not, write to the Free Software
  44.  
  45.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.     Report problems and direct all questions to:
  52.  
  53.  
  54.  
  55.     schaefer@rbg.informatik.th-darmstadt.de
  56.  
  57. */
  58.  
  59.  
  60.  
  61. #ifndef FAT_H
  62.  
  63. #define FAT_H
  64.  
  65.  
  66.  
  67. #include "types.h"
  68.  
  69. #include "disk_io.h"
  70.  
  71. #include "logdr_st.h"
  72.  
  73.  
  74.  
  75. class fat
  76.  
  77. {
  78.  
  79. protected:
  80.  
  81.     logical_drive *logical_drive;
  82.  
  83.     int number;
  84.  
  85.     dword start_sector;
  86.  
  87.     sector *buffer;
  88.  
  89.     dword sector_in_buffer;
  90.  
  91.     void read_sector (dword sector);
  92.  
  93. public:
  94.  
  95.     virtual dword next_cluster (dword cluster_number) = 0;
  96.  
  97.  
  98.  
  99.     fat (class logical_drive *logical_drive,int number);
  100.  
  101.     ~fat (void) { delete buffer; }
  102.  
  103. };
  104.  
  105.  
  106.  
  107. class fat16:public fat
  108.  
  109. {
  110.  
  111. public:
  112.  
  113.     dword next_cluster (dword cluster_number);
  114.  
  115.     void check_empty (dword new_start_cluster);
  116.  
  117.     void check_against (class fat16 *fat2);
  118.  
  119.     dword min_free_cluster (void);
  120.  
  121.  
  122.  
  123.     fat16 (class logical_drive *logical_drive,int number):fat (logical_drive,number) {}
  124.  
  125. };
  126.  
  127.  
  128.  
  129. #endif
  130.  
  131.