From: =?utf-8?b?0L3QsNCx?= Date: Tue, 19 Nov 2024 03:17:30 +0100 Subject: include amideco.h and sys/stat.h for proper declarations (Closes: #1074808) --- src/amideco.h | 2 ++ src/amifunc.c | 106 ++-------------------------------------------------------- 2 files changed, 4 insertions(+), 104 deletions(-) diff --git a/src/amideco.h b/src/amideco.h index 782ec2b..6490ee6 100644 --- a/src/amideco.h +++ b/src/amideco.h @@ -113,6 +113,8 @@ typedef struct byte IsPacked; } AMIHEAD94; +void decode(interfacing interface); + byte* GetModuleName(byte ID); //dword CalcCRC32(FILE *ptx, dword Begin, word Len); diff --git a/src/amifunc.c b/src/amifunc.c index 71f9152..8c6bc80 100644 --- a/src/amifunc.c +++ b/src/amifunc.c @@ -7,110 +7,8 @@ ***********************************************/ -#include -#include -#include - -#if defined(LINUX) || defined(__LINUX__) || defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) - #include - #define __LINUX_NOW__ -#else - #include - #include -#endif - -typedef uint8_t byte; -typedef uint16_t word; -typedef uint32_t dword; - -#define Xtract 0x10 -#define List 0x01 -#define Delete 0x12 -#define XtractD 0x13 - -#define BLOCK 0x8000 - -#ifndef __LINUX_NOW__ - #define IDSign "" - -#else - #define IDSign "+" -#endif - -typedef struct { - FILE *infile; - FILE *outfile; - unsigned long original; - unsigned long packed; - int dicbit; - int method; - } interfacing; - -typedef struct - { - byte Version[4]; - word CRCLen; - dword CRC32; - word BeginLo; - word BeginHi; - } ABCTag; - -typedef struct - { - word PrePartLo; /* Previous part LO word */ - word PrePartHi; /* Previous part HI word */ - /* value 0xFFFFFFFF = last */ - word CSize; /* This module header Len */ - byte PartID; /* ID for this header */ - byte IsComprs; /* Value 0x80 means that - this module not - compressed, 0x00 - is */ - dword RealCS; /* Address in RAM where - expand to */ - dword ROMSize; /* Compressed Len */ - dword ExpSize; /* Expanded Len */ - } PARTTag; - -typedef struct - { - byte HeadLen; - byte HeadCrc; - byte Method[5]; - dword PackLen; - dword RealLen; - dword TStamp; - byte Attr; - byte Level; - byte FilenameLen; - byte FileName[12]; - word CRC16; - byte DOS; - word Empty; - } LZHHead; - -typedef struct - { - word PackLenLo; - word PackLenHi; - word RealLenLo; - word RealLenHi; - } BIOS94; - -typedef struct - { - byte Month[2]; - byte rsrv1; - byte Day[2]; - byte rsrv2; - byte Year[2]; - } AMIDATE; - -typedef struct - { - dword Offset; - byte ModID; - byte IsPacked; - } AMIHEAD94; +#include +#include "amideco.h" byte *RecordList[]={ "POST", "Setup Server",