stuffy/include/stuffy.h

35 lines
1.0 KiB
C
Raw Permalink Normal View History

2022-11-02 15:29:00 -05:00
#ifndef STUFFY_H
#define STUFFY_H
2022-11-08 20:37:57 -06:00
#include <sys/stat.h>
typedef struct HeaderStruct
{
char moduleName[50];
struct stat moduleInfo;
} HeaderStruct;
2022-11-02 15:29:00 -05:00
2022-11-10 18:30:35 -06:00
typedef struct ModuleStruct
{
HeaderStruct moduleHeader;
void* moduleData;
} ModuleStruct;
2022-11-12 01:25:08 -06:00
int ReadSingleModuleFromArchive(int fd, ModuleStruct* module);
int WriteSingleModuleToArchive(int fd, ModuleStruct* module);
int OpenArchive(char* archiveName, int flags);
void PrintModuleHeader(ModuleStruct* module);
2022-11-10 18:30:35 -06:00
void SafetyCheck(int status, char* message);
char* StripFilename(char* filename);
2022-11-02 15:29:00 -05:00
void Stuffy(int argc, char* argv[]);
int StuffyArgument(int argc, char** argv);
void StuffyAction(int argc, char* argv[], int archiveAction);
2022-11-10 18:30:35 -06:00
int IsFileArchived(char* archiveName, char* filename);
void AddToArchive(char* archiveName, char* filename);
void RemoveFromArchive(char* archiveName, char* filename);
2022-11-02 15:29:00 -05:00
void ListArchive(char* archiveName);
int Test_ListArchive(char* archiveName);
void ExtractArchive(int argc, char* argv[]);
2022-11-11 00:29:37 -06:00
int _ExtractArchive(char* archiveName, char* filenameIn);
2022-11-02 15:29:00 -05:00
#endif