/* $Id$ */ /* * include.c (c) 1998,1999 Brian Smith */ #include #include #include #include #include #include #include extern int files; FILE *cfgfile, *installfile; char *INSTALLER_APPLICATION; char *INSTALLER_VERSION; char *INSTALLER_TITLE; char *INSTALLER_PATH; char *INSTALLER_FOLDER; char *INSTALLER_PROGRAM; char *INSTALLER_SHADOW; char *INSTALLER_OBJECT; char *INSTALLER_SETS; char *INSTALLER_SYSVAR; char *INSTALLER_SYSLINE; char *INSTALLER_PACKAGES[20]; char *INSTALLER_CONFIRM_WPS; char *INSTALLER_CONFIRM_CONFIGSYS; char *INSTALLER_CONFIRM_OVERWRITE; int INSTALLER_BITMAP_WIDTH; int INSTALLER_BITMAP_HEIGHT; int INSTALLER_PACKAGE_COUNT=0; int packagefiles[20]; char *packagefilename[20]; void resetglobals(void); int include_unpack(char *aname); void append_file(char *filename) { FILE *appendfile; int amnt; char buffer[512]; if((appendfile = fopen(filename, "rb"))==NULL) { printf("Error opening %s for reading!\n", filename); exit(3); } while(!feof(appendfile)) { amnt = fread(buffer, 1, 512, appendfile); fwrite(buffer, 1, amnt, installfile); } fclose(appendfile); } void getline(FILE *f, char *entry, char *entrydata) { char in[4096]; int z; memset(in, 0, 4096); fgets(in, 4095, f); if(in[strlen(in)-1] == '\n') in[strlen(in)-1] = 0; if(in[0] != '#') { for(z=0;z