32 lines
881 B
C
32 lines
881 B
C
#ifndef STUFFY_H
|
|
#define STUFFY_H
|
|
#include <sys/stat.h>
|
|
|
|
typedef struct HeaderStruct
|
|
{
|
|
char moduleName[50];
|
|
struct stat moduleInfo;
|
|
} HeaderStruct;
|
|
|
|
typedef struct ModuleStruct
|
|
{
|
|
HeaderStruct moduleHeader;
|
|
void* moduleData;
|
|
} ModuleStruct;
|
|
|
|
int ReadSingleModule(int fd, ModuleStruct* module);
|
|
int WriteSingleModule(int fd, ModuleStruct* module, char* filename);
|
|
void SafetyCheck(int status, char* message);
|
|
char* StripFilename(char* filename);
|
|
void Stuffy(int argc, char* argv[]);
|
|
int StuffyArgument(int argc, char** argv);
|
|
void StuffyAction(char* argv[], int archiveAction);
|
|
int IsFileArchived(char* archiveName, char* filename);
|
|
void AddToArchive(char* archiveName, char* filename);
|
|
void RemoveFromArchive(char* archiveName, char* filename);
|
|
void ListArchive(char* archiveName);
|
|
int Test_ListArchive(char* archiveName);
|
|
void ExtractArchive(char* argv[]);
|
|
|
|
#endif
|