mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Move source to src folder.
This commit is contained in:
65
setter/src/dos.h
Normal file
65
setter/src/dos.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/****************************************************************************
|
||||
Aaru Data Preservation Suite
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Filename : dos.h
|
||||
Author(s) : Natalia Portillo
|
||||
|
||||
Component : fstester.setter
|
||||
|
||||
--[ Description ] -----------------------------------------------------------
|
||||
|
||||
Contains DOS definitions
|
||||
|
||||
--[ License ] ---------------------------------------------------------------
|
||||
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 3 of the
|
||||
License, 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 warraty of
|
||||
MERCHANTIBILITY 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. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2020 Natalia Portillo
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(__DOS__) || defined (MSDOS)
|
||||
|
||||
#ifndef AARU_FSTESTER_SETTER_DOS_H
|
||||
#define AARU_FSTESTER_SETTER_DOS_H
|
||||
|
||||
#pragma pack(__push, 1)
|
||||
|
||||
typedef struct _Fat32FreeSpace
|
||||
{
|
||||
unsigned short size;
|
||||
unsigned short version;
|
||||
unsigned long sectorsPerCluster;
|
||||
unsigned long bytesPerSector;
|
||||
unsigned long freeClusters;
|
||||
unsigned long totalClusters;
|
||||
unsigned long freeSectors;
|
||||
unsigned long totalSectors;
|
||||
unsigned long freeUnits;
|
||||
unsigned long totalUnits;
|
||||
unsigned char reserved[8];
|
||||
} Fat32FreeSpace;
|
||||
|
||||
#pragma pack(__pop)
|
||||
|
||||
#define YEAR(t) (((t & 0xFE00) >> 9) + 1980)
|
||||
#define MONTH(t) ((t & 0x01E0) >> 5)
|
||||
#define DAY(t) (t & 0x001F)
|
||||
#define HOUR(t) ((t & 0xF800) >> 11)
|
||||
#define MINUTE(t) ((t & 0x07E0) >> 5)
|
||||
#define SECOND(t) ((t & 0x001F) << 1)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user