home *** CD-ROM | disk | FTP | other *** search
/ James Briskly's Game Magazine 2 / JBGM002S.ZIP / SOURCE / FAT.H < prev    next >
C/C++ Source or Header  |  1995-08-22  |  2KB  |  66 lines

  1. /*
  2.     FIPS - the First nondestructive Interactive Partition Splitting program
  3.  
  4.     Module fat.h
  5.  
  6.     RCS - Header:
  7.     $Header: c:/daten/fips/source/main/RCS/fat.h 1.4 1995/01/19 00:01:25 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 2 of the License, or
  14.     (at your option) 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.     Report problems and direct all questions to:
  27.  
  28.     schaefer@rbg.informatik.th-darmstadt.de
  29. */
  30.  
  31. #ifndef FAT_H
  32. #define FAT_H
  33.  
  34. #include "types.h"
  35. #include "disk_io.h"
  36. #include "logdr_st.h"
  37.  
  38. class fat
  39. {
  40. protected:
  41.     logical_drive *logical_drive;
  42.     int number;
  43.     dword start_sector;
  44.     sector *buffer;
  45.     dword sector_in_buffer;
  46.     void read_sector (dword sector);
  47. public:
  48.     virtual dword next_cluster (dword cluster_number) = 0;
  49.  
  50.     fat (class logical_drive *logical_drive,int number);
  51.     ~fat (void) { delete buffer; }
  52. };
  53.  
  54. class fat16:public fat
  55. {
  56. public:
  57.     dword next_cluster (dword cluster_number);
  58.     void check_empty (dword new_start_cluster);
  59.     void check_against (class fat16 *fat2);
  60.     dword min_free_cluster (void);
  61.  
  62.     fat16 (class logical_drive *logical_drive,int number):fat (logical_drive,number) {}
  63. };
  64.  
  65. #endif
  66.