/* PowerComPress v0.9 Copyright (C) 2005 Jonas Gehring PowerComPress 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 2 of the License, or (at your option) any later version. PowerComPress is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 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 PowerComPress; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Header File // Created 31.07.2005; 01:56:40 #ifndef PCPRESS_H #define PCPRESS_H // Uncomment this if you compile this prog for VTI //#define COMPILE_VTI #include #include #include /*______________________Comments______________________*/ #define COMMENT_AUTHORS "boolsoft" #define COMMENT_PROGRAM_NAME "PowerComPress" #define COMMENT_VERSION_STRING "v0.9" /*____________________ Definitions____________________*/ enum dirs {PARENT = 0, CHILD, REDRAW, EXIT = -1}; enum funcs {FFOLDER = 0, FFILE, FGROUP}; enum themes {THEME_WHITE, THEME_BLACK = 3}; #define GRP_ADDUNCOMP -2 #define GRP_SKIP 3 #define EXTRACT_VAR 4 #define NORMAL 1 #define OUTOFMEM 0 /*__________________Global variables__________________*/ INT_HANDLER save_int_1, save_int_5; // The '\'-Character const char append[1] = {92}; extern void *screenbuffer; extern char folder[9]; extern BOOL isfolder; extern void *GrayPlane0, *GrayPlane1; extern char groupname[18]; extern BOOL isgroup; extern short item, showfirst; typedef struct { BOOL AlwaysArcVar; BOOL AlwaysDelVar; BOOL AlwaysSplitVar; BOOL Theme; } OPTIONS; extern OPTIONS options; /*________________Function proto-types________________*/ // pcpress.c void _main(void); void ExitPCP(short mode); // gui.c void ProgressBarDraw(long pos1, long pos2, long pos3); void ProgressBarClose(void); void ProgressBarInit(const char *title, const char *str1, const char *str2, long steps1, long steps2, BOOL ResetTime); BOOL Browse(char *title, char *names, char *types, char *sizes, char *csizes, short numitems); void StartGUI(void); // group.c short ViewGroupEntries(char *grpname); BOOL AddVarToGroup(char *varname); short ExtractGroup(char *grpname, char *varname); short CompressFolder(char *foldername); // fileutil.c BOOL TestFolder(const char *varname); void VarTypeToStr(SYM_ENTRY *var, char *buffer); size_t GetVarSize(SYM_ENTRY *var); BOOL DeleteVar(const char *varname); BOOL DeleteFolder(const char *foldername); void ArchiveVar(const char *varname); BOOL LoadOptions(void); BOOL SaveOptions(void); // The rest of the source files is defined in "brieflz.h"!! /*____________________Wait-function___________________*/ #ifndef COMPILE_VTI #define Wait(x); BoolsoftWait(x); #else #include void Wait(short delay) { short t1, t2; randomize(); for (t1 = 0; t1 < delay*75; t1++) t2 = random(delay*75); } #endif #endif