Added support for tar compressed files
This commit is contained in:
parent
c9ec69d271
commit
dc5782207d
10
ChangeLog
10
ChangeLog
@ -6,6 +6,16 @@ v0.39.1 22-Oct-2003
|
||||
general:
|
||||
Make dist now creates bzip2 archives.
|
||||
|
||||
upgrade:
|
||||
If you don't have any personal archivers, then remove
|
||||
~/etc/archiver.data and start mbsetup to recreate the
|
||||
archivers setup.
|
||||
|
||||
mbsetup:
|
||||
In node editor, fixed error message when there was no more
|
||||
room for new nodes to point to the right menus.
|
||||
Added support for tar compressed archives.
|
||||
|
||||
|
||||
v0.39.0 09-Oct-2003 - 22-Oct-2003
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Setup Archive structure.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2002
|
||||
* Copyright (C) 1997-2003
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -54,326 +54,336 @@ int ArchUpdated = 0;
|
||||
*/
|
||||
int CountArchive(void)
|
||||
{
|
||||
FILE *fil;
|
||||
char ffile[PATH_MAX];
|
||||
int count;
|
||||
FILE *fil;
|
||||
char ffile[PATH_MAX];
|
||||
int count;
|
||||
|
||||
sprintf(ffile, "%s/etc/archiver.data", getenv("MBSE_ROOT"));
|
||||
if ((fil = fopen(ffile, "r")) == NULL) {
|
||||
if ((fil = fopen(ffile, "a+")) != NULL) {
|
||||
Syslog('+', "Created new %s", ffile);
|
||||
archiverhdr.hdrsize = sizeof(archiverhdr);
|
||||
archiverhdr.recsize = sizeof(archiver);
|
||||
fwrite(&archiverhdr, sizeof(archiverhdr), 1, fil);
|
||||
/*
|
||||
* Create default records. Archivers found during configure
|
||||
* and installing this software are automatic enabled with the
|
||||
* right paths. Others are meant as examples.
|
||||
*/
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
if (strlen(_PATH_ARC) && strlen(_PATH_NOMARCH))
|
||||
sprintf(archiver.comment, "ARC and NOMARCH");
|
||||
else
|
||||
sprintf(archiver.comment, "ARC Version 5.21");
|
||||
sprintf(archiver.name, "ARC");
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_ARC)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.marc, "%s anw", _PATH_ARC);
|
||||
sprintf(archiver.tarc, "%s tnw", _PATH_ARC);
|
||||
sprintf(archiver.varc, "%s l", _PATH_ARC);
|
||||
sprintf(archiver.funarc, "%s xnw", _PATH_ARC);
|
||||
sprintf(archiver.munarc, "%s enw", _PATH_ARC);
|
||||
sprintf(archiver.iunarc, "%s enw", _PATH_ARC);
|
||||
} else {
|
||||
sprintf(archiver.marc, "/usr/bin/arc anw");
|
||||
sprintf(archiver.tarc, "/usr/bin/arc tnw");
|
||||
sprintf(archiver.varc, "/usr/bin/arc l");
|
||||
sprintf(archiver.funarc, "/usr/bin/arc xnw");
|
||||
sprintf(archiver.munarc, "/usr/bin/arc enw");
|
||||
sprintf(archiver.iunarc, "/usr/bin/arc enw");
|
||||
}
|
||||
/*
|
||||
* Override arc when nomarch is available
|
||||
*/
|
||||
if (strlen(_PATH_NOMARCH)) {
|
||||
sprintf(archiver.funarc, "%s -U", _PATH_NOMARCH);
|
||||
sprintf(archiver.munarc, "%s", _PATH_NOMARCH);
|
||||
sprintf(archiver.iunarc, "%s", _PATH_NOMARCH);
|
||||
sprintf(archiver.varc, "%s -l", _PATH_NOMARCH);
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
sprintf(ffile, "%s/etc/archiver.data", getenv("MBSE_ROOT"));
|
||||
if ((fil = fopen(ffile, "r")) == NULL) {
|
||||
if ((fil = fopen(ffile, "a+")) != NULL) {
|
||||
Syslog('+', "Created new %s", ffile);
|
||||
archiverhdr.hdrsize = sizeof(archiverhdr);
|
||||
archiverhdr.recsize = sizeof(archiver);
|
||||
fwrite(&archiverhdr, sizeof(archiverhdr), 1, fil);
|
||||
/*
|
||||
* Create default records. Archivers found during configure
|
||||
* and installing this software are automatic enabled with the
|
||||
* right paths. Others are meant as examples.
|
||||
*/
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
if (strlen(_PATH_ARC) && strlen(_PATH_NOMARCH))
|
||||
sprintf(archiver.comment, "ARC and NOMARCH");
|
||||
else
|
||||
sprintf(archiver.comment, "ARC Version 5.21");
|
||||
sprintf(archiver.name, "ARC");
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_ARC)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.marc, "%s anw", _PATH_ARC);
|
||||
sprintf(archiver.tarc, "%s tnw", _PATH_ARC);
|
||||
sprintf(archiver.varc, "%s l", _PATH_ARC);
|
||||
sprintf(archiver.funarc, "%s xnw", _PATH_ARC);
|
||||
sprintf(archiver.munarc, "%s enw", _PATH_ARC);
|
||||
sprintf(archiver.iunarc, "%s enw", _PATH_ARC);
|
||||
} else {
|
||||
sprintf(archiver.marc, "/usr/bin/arc anw");
|
||||
sprintf(archiver.tarc, "/usr/bin/arc tnw");
|
||||
sprintf(archiver.varc, "/usr/bin/arc l");
|
||||
sprintf(archiver.funarc, "/usr/bin/arc xnw");
|
||||
sprintf(archiver.munarc, "/usr/bin/arc enw");
|
||||
sprintf(archiver.iunarc, "/usr/bin/arc enw");
|
||||
}
|
||||
/*
|
||||
* Override arc when nomarch is available
|
||||
*/
|
||||
if (strlen(_PATH_NOMARCH)) {
|
||||
sprintf(archiver.funarc, "%s -U", _PATH_NOMARCH);
|
||||
sprintf(archiver.munarc, "%s", _PATH_NOMARCH);
|
||||
sprintf(archiver.iunarc, "%s", _PATH_NOMARCH);
|
||||
sprintf(archiver.varc, "%s -l", _PATH_NOMARCH);
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "LHarc");
|
||||
sprintf(archiver.name, "LHA");
|
||||
if (strlen(_PATH_LHA)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.marc, "%s aq", _PATH_LHA);
|
||||
sprintf(archiver.tarc, "%s tq", _PATH_LHA);
|
||||
sprintf(archiver.varc, "%s l", _PATH_LHA);
|
||||
sprintf(archiver.funarc, "%s xqf", _PATH_LHA);
|
||||
sprintf(archiver.munarc, "%s eqf", _PATH_LHA);
|
||||
sprintf(archiver.iunarc, "%s eqf", _PATH_LHA);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.marc, "/usr/bin/lha aq");
|
||||
sprintf(archiver.tarc, "/usr/bin/lha tq");
|
||||
sprintf(archiver.varc, "/usr/bin/lha l");
|
||||
sprintf(archiver.funarc, "/usr/bin/lha xqf");
|
||||
sprintf(archiver.munarc, "/usr/bin/lha eqf");
|
||||
sprintf(archiver.iunarc, "/usr/bin/lha eqf");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "LHarc");
|
||||
sprintf(archiver.name, "LHA");
|
||||
if (strlen(_PATH_LHA)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.marc, "%s aq", _PATH_LHA);
|
||||
sprintf(archiver.tarc, "%s tq", _PATH_LHA);
|
||||
sprintf(archiver.varc, "%s l", _PATH_LHA);
|
||||
sprintf(archiver.funarc, "%s xqf", _PATH_LHA);
|
||||
sprintf(archiver.munarc, "%s eqf", _PATH_LHA);
|
||||
sprintf(archiver.iunarc, "%s eqf", _PATH_LHA);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.marc, "/usr/bin/lha aq");
|
||||
sprintf(archiver.tarc, "/usr/bin/lha tq");
|
||||
sprintf(archiver.varc, "/usr/bin/lha l");
|
||||
sprintf(archiver.funarc, "/usr/bin/lha xqf");
|
||||
sprintf(archiver.munarc, "/usr/bin/lha eqf");
|
||||
sprintf(archiver.iunarc, "/usr/bin/lha eqf");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "RAR by Eugene Roshal");
|
||||
sprintf(archiver.name, "RAR");
|
||||
if (strlen(_PATH_RAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s a -y -r", _PATH_RAR);
|
||||
sprintf(archiver.marc, "%s a -y", _PATH_RAR);
|
||||
sprintf(archiver.barc, "%s c -y", _PATH_RAR);
|
||||
sprintf(archiver.tarc, "%s t -y", _PATH_RAR);
|
||||
sprintf(archiver.varc, "%s l", _PATH_RAR);
|
||||
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_RAR);
|
||||
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_RAR);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_RAR);
|
||||
} else if (strlen(_PATH_UNRAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_UNRAR);
|
||||
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_UNRAR);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_UNRAR);
|
||||
sprintf(archiver.varc, "%s l", _PATH_UNRAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/rar a -y -r");
|
||||
sprintf(archiver.marc, "/usr/bin/rar a -y");
|
||||
sprintf(archiver.barc, "/usr/bin/rar c -y");
|
||||
sprintf(archiver.tarc, "/usr/bin/rar t -y");
|
||||
sprintf(archiver.varc, "/usr/bin/rar l");
|
||||
sprintf(archiver.funarc, "/usr/bin/unrar x -o+ -y -r");
|
||||
sprintf(archiver.munarc, "/usr/bin/unrar e -o+ -y");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unrar e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "RAR by Eugene Roshal");
|
||||
sprintf(archiver.name, "RAR");
|
||||
if (strlen(_PATH_RAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s a -y -r", _PATH_RAR);
|
||||
sprintf(archiver.marc, "%s a -y", _PATH_RAR);
|
||||
sprintf(archiver.barc, "%s c -y", _PATH_RAR);
|
||||
sprintf(archiver.tarc, "%s t -y", _PATH_RAR);
|
||||
sprintf(archiver.varc, "%s l", _PATH_RAR);
|
||||
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_RAR);
|
||||
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_RAR);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_RAR);
|
||||
} else if (strlen(_PATH_UNRAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_UNRAR);
|
||||
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_UNRAR);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_UNRAR);
|
||||
sprintf(archiver.varc, "%s l", _PATH_UNRAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/rar a -y -r");
|
||||
sprintf(archiver.marc, "/usr/bin/rar a -y");
|
||||
sprintf(archiver.barc, "/usr/bin/rar c -y");
|
||||
sprintf(archiver.tarc, "/usr/bin/rar t -y");
|
||||
sprintf(archiver.varc, "/usr/bin/rar l");
|
||||
sprintf(archiver.funarc, "/usr/bin/unrar x -o+ -y -r");
|
||||
sprintf(archiver.munarc, "/usr/bin/unrar e -o+ -y");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unrar e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR gzip files");
|
||||
sprintf(archiver.name, "GZIP");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cfz", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Afz", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tfz", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tfz", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xfz", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xfz", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xfz", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cfz");
|
||||
sprintf(archiver.marc, "/bin/tar Afz");
|
||||
sprintf(archiver.tarc, "/bin/tar tfz");
|
||||
sprintf(archiver.varc, "/bin/tar tfz");
|
||||
sprintf(archiver.funarc, "/bin/tar xfz");
|
||||
sprintf(archiver.munarc, "/bin/tar xfz");
|
||||
sprintf(archiver.iunarc, "/bin/tar xfz");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR gzip files");
|
||||
sprintf(archiver.name, "GZIP");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cfz", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Afz", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tfz", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tfz", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xfz", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xfz", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xfz", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cfz");
|
||||
sprintf(archiver.marc, "/bin/tar Afz");
|
||||
sprintf(archiver.tarc, "/bin/tar tfz");
|
||||
sprintf(archiver.varc, "/bin/tar tfz");
|
||||
sprintf(archiver.funarc, "/bin/tar xfz");
|
||||
sprintf(archiver.munarc, "/bin/tar xfz");
|
||||
sprintf(archiver.iunarc, "/bin/tar xfz");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
sprintf(archiver.comment, "TAR compressed files");
|
||||
sprintf(archiver.name, "CMP");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
sprintf(archiver.farc, "%s cfZ", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s AfZ", _PATH_TAR);
|
||||
} else {
|
||||
sprintf(archiver.farc, "/bin/tar cfZ");
|
||||
sprintf(archiver.marc, "/bin/tar AfZ");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR bzip2 files");
|
||||
sprintf(archiver.name, "BZIP");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cfj", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Afj", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tfj", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tfj", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xfj", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xfj", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xfj", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cfj");
|
||||
sprintf(archiver.marc, "/bin/tar Afj");
|
||||
sprintf(archiver.tarc, "/bin/tar tfj");
|
||||
sprintf(archiver.varc, "/bin/tar tfj");
|
||||
sprintf(archiver.funarc, "/bin/tar xfj");
|
||||
sprintf(archiver.munarc, "/bin/tar xfj");
|
||||
sprintf(archiver.iunarc, "/bin/tar xfj");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR bzip2 files");
|
||||
sprintf(archiver.name, "BZIP");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cfj", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Afj", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tfj", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tfj", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xfj", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xfj", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xfj", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cfj");
|
||||
sprintf(archiver.marc, "/bin/tar Afj");
|
||||
sprintf(archiver.tarc, "/bin/tar tfj");
|
||||
sprintf(archiver.varc, "/bin/tar tfj");
|
||||
sprintf(archiver.funarc, "/bin/tar xfj");
|
||||
sprintf(archiver.munarc, "/bin/tar xfj");
|
||||
sprintf(archiver.iunarc, "/bin/tar xfj");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR files");
|
||||
sprintf(archiver.name, "TAR");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cf", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Af", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tf", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tf", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xf", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xf", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xf", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cf");
|
||||
sprintf(archiver.marc, "/bin/tar Af");
|
||||
sprintf(archiver.tarc, "/bin/tar tf");
|
||||
sprintf(archiver.varc, "/bin/tar tf");
|
||||
sprintf(archiver.funarc, "/bin/tar xf");
|
||||
sprintf(archiver.munarc, "/bin/tar xf");
|
||||
sprintf(archiver.iunarc, "/bin/tar xf");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "TAR files");
|
||||
sprintf(archiver.name, "TAR");
|
||||
if (strlen(_PATH_TAR)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s cf", _PATH_TAR);
|
||||
sprintf(archiver.marc, "%s Af", _PATH_TAR);
|
||||
sprintf(archiver.tarc, "%s tf", _PATH_TAR);
|
||||
sprintf(archiver.varc, "%s tf", _PATH_TAR);
|
||||
sprintf(archiver.funarc, "%s xf", _PATH_TAR);
|
||||
sprintf(archiver.munarc, "%s xf", _PATH_TAR);
|
||||
sprintf(archiver.iunarc, "%s xf", _PATH_TAR);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/bin/tar cf");
|
||||
sprintf(archiver.marc, "/bin/tar Af");
|
||||
sprintf(archiver.tarc, "/bin/tar tf");
|
||||
sprintf(archiver.varc, "/bin/tar tf");
|
||||
sprintf(archiver.funarc, "/bin/tar xf");
|
||||
sprintf(archiver.munarc, "/bin/tar xf");
|
||||
sprintf(archiver.iunarc, "/bin/tar xf");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "UNARJ by Robert K Jung");
|
||||
sprintf(archiver.name, "ARJ");
|
||||
/*
|
||||
* Even if it is found, we won't enable unarj if the
|
||||
* Russion arj is found since that is more complete.
|
||||
*/
|
||||
if (strlen(_PATH_UNARJ) && (! strlen(_PATH_ARJ)))
|
||||
archiver.available = TRUE;
|
||||
else
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_UNARJ)) {
|
||||
sprintf(archiver.tarc, "%s t", _PATH_UNARJ);
|
||||
sprintf(archiver.varc, "%s l", _PATH_UNARJ);
|
||||
sprintf(archiver.funarc, "%s x", _PATH_UNARJ);
|
||||
sprintf(archiver.munarc, "%s e", _PATH_UNARJ);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_UNARJ);
|
||||
} else {
|
||||
sprintf(archiver.tarc, "/usr/bin/unarj t");
|
||||
sprintf(archiver.varc, "/usr/bin/unarj l");
|
||||
sprintf(archiver.funarc, "/usr/bin/unarj x");
|
||||
sprintf(archiver.munarc, "/usr/bin/unarj e");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unarj e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "UNARJ by Robert K Jung");
|
||||
sprintf(archiver.name, "ARJ");
|
||||
/*
|
||||
* Even if it is found, we won't enable unarj if the
|
||||
* Russion arj is found since that is more complete.
|
||||
*/
|
||||
if (strlen(_PATH_UNARJ) && (! strlen(_PATH_ARJ)))
|
||||
archiver.available = TRUE;
|
||||
else
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_UNARJ)) {
|
||||
sprintf(archiver.tarc, "%s t", _PATH_UNARJ);
|
||||
sprintf(archiver.varc, "%s l", _PATH_UNARJ);
|
||||
sprintf(archiver.funarc, "%s x", _PATH_UNARJ);
|
||||
sprintf(archiver.munarc, "%s e", _PATH_UNARJ);
|
||||
sprintf(archiver.iunarc, "%s e", _PATH_UNARJ);
|
||||
} else {
|
||||
sprintf(archiver.tarc, "/usr/bin/unarj t");
|
||||
sprintf(archiver.varc, "/usr/bin/unarj l");
|
||||
sprintf(archiver.funarc, "/usr/bin/unarj x");
|
||||
sprintf(archiver.munarc, "/usr/bin/unarj e");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unarj e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ARJ from ARJ Software Russia");
|
||||
sprintf(archiver.name, "ARJ");
|
||||
if (strlen(_PATH_ARJ)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s -2d -y -r a", _PATH_ARJ);
|
||||
sprintf(archiver.marc, "%s -2d -y -e a", _PATH_ARJ);
|
||||
sprintf(archiver.barc, "%s -2d -y c", _PATH_ARJ);
|
||||
sprintf(archiver.tarc, "%s -y t", _PATH_ARJ);
|
||||
sprintf(archiver.varc, "%s l", _PATH_ARJ);
|
||||
sprintf(archiver.funarc, "%s -y x", _PATH_ARJ);
|
||||
sprintf(archiver.munarc, "%s -y e", _PATH_ARJ);
|
||||
sprintf(archiver.iunarc, "%s -y e", _PATH_ARJ);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/arj -2d -y -r a");
|
||||
sprintf(archiver.marc, "/usr/bin/arj -2d -y -e a");
|
||||
sprintf(archiver.barc, "/usr/bin/arj -2d -y c");
|
||||
sprintf(archiver.tarc, "/usr/bin/arj -y t");
|
||||
sprintf(archiver.varc, "/usr/bin/arj l");
|
||||
sprintf(archiver.funarc, "/usr/bin/arj -y x");
|
||||
sprintf(archiver.munarc, "/usr/bin/arj -y e");
|
||||
sprintf(archiver.iunarc, "/usr/bin/arj -y e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ARJ from ARJ Software Russia");
|
||||
sprintf(archiver.name, "ARJ");
|
||||
if (strlen(_PATH_ARJ)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s -2d -y -r a", _PATH_ARJ);
|
||||
sprintf(archiver.marc, "%s -2d -y -e a", _PATH_ARJ);
|
||||
sprintf(archiver.barc, "%s -2d -y c", _PATH_ARJ);
|
||||
sprintf(archiver.tarc, "%s -y t", _PATH_ARJ);
|
||||
sprintf(archiver.varc, "%s l", _PATH_ARJ);
|
||||
sprintf(archiver.funarc, "%s -y x", _PATH_ARJ);
|
||||
sprintf(archiver.munarc, "%s -y e", _PATH_ARJ);
|
||||
sprintf(archiver.iunarc, "%s -y e", _PATH_ARJ);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/arj -2d -y -r a");
|
||||
sprintf(archiver.marc, "/usr/bin/arj -2d -y -e a");
|
||||
sprintf(archiver.barc, "/usr/bin/arj -2d -y c");
|
||||
sprintf(archiver.tarc, "/usr/bin/arj -y t");
|
||||
sprintf(archiver.varc, "/usr/bin/arj l");
|
||||
sprintf(archiver.funarc, "/usr/bin/arj -y x");
|
||||
sprintf(archiver.munarc, "/usr/bin/arj -y e");
|
||||
sprintf(archiver.iunarc, "/usr/bin/arj -y e");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ZIP and UNZIP by Info-ZIP");
|
||||
sprintf(archiver.name, "ZIP");
|
||||
if (strlen(_PATH_ZIP) && strlen(_PATH_UNZIP))
|
||||
archiver.available = TRUE;
|
||||
else
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_ZIP)) {
|
||||
sprintf(archiver.farc, "%s -r -q", _PATH_ZIP);
|
||||
sprintf(archiver.marc, "%s -q", _PATH_ZIP);
|
||||
sprintf(archiver.barc, "%s -z", _PATH_ZIP);
|
||||
sprintf(archiver.tarc, "%s -T", _PATH_ZIP);
|
||||
} else {
|
||||
sprintf(archiver.farc, "/usr/bin/zip -r -q");
|
||||
sprintf(archiver.marc, "/usr/bin/zip -q");
|
||||
sprintf(archiver.barc, "/usr/bin/zip -z");
|
||||
sprintf(archiver.tarc, "/usr/bin/zip -T");
|
||||
}
|
||||
if (strlen(_PATH_UNZIP)) {
|
||||
sprintf(archiver.funarc, "%s -o -q", _PATH_UNZIP);
|
||||
sprintf(archiver.munarc, "%s -o -j -L", _PATH_UNZIP);
|
||||
sprintf(archiver.iunarc, "%s -o -j", _PATH_UNZIP);
|
||||
sprintf(archiver.varc, "%s -l", _PATH_UNZIP);
|
||||
} else {
|
||||
sprintf(archiver.funarc, "/usr/bin/unzip -o -q");
|
||||
sprintf(archiver.munarc, "/usr/bin/unzip -o -j -L");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unzip -o -j");
|
||||
sprintf(archiver.varc, "/usr/bin/unzip -l");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ZIP and UNZIP by Info-ZIP");
|
||||
sprintf(archiver.name, "ZIP");
|
||||
if (strlen(_PATH_ZIP) && strlen(_PATH_UNZIP))
|
||||
archiver.available = TRUE;
|
||||
else
|
||||
archiver.available = FALSE;
|
||||
if (strlen(_PATH_ZIP)) {
|
||||
sprintf(archiver.farc, "%s -r -q", _PATH_ZIP);
|
||||
sprintf(archiver.marc, "%s -q", _PATH_ZIP);
|
||||
sprintf(archiver.barc, "%s -z", _PATH_ZIP);
|
||||
sprintf(archiver.tarc, "%s -T", _PATH_ZIP);
|
||||
} else {
|
||||
sprintf(archiver.farc, "/usr/bin/zip -r -q");
|
||||
sprintf(archiver.marc, "/usr/bin/zip -q");
|
||||
sprintf(archiver.barc, "/usr/bin/zip -z");
|
||||
sprintf(archiver.tarc, "/usr/bin/zip -T");
|
||||
}
|
||||
if (strlen(_PATH_UNZIP)) {
|
||||
sprintf(archiver.funarc, "%s -o -q", _PATH_UNZIP);
|
||||
sprintf(archiver.munarc, "%s -o -j -L", _PATH_UNZIP);
|
||||
sprintf(archiver.iunarc, "%s -o -j", _PATH_UNZIP);
|
||||
sprintf(archiver.varc, "%s -l", _PATH_UNZIP);
|
||||
} else {
|
||||
sprintf(archiver.funarc, "/usr/bin/unzip -o -q");
|
||||
sprintf(archiver.munarc, "/usr/bin/unzip -o -j -L");
|
||||
sprintf(archiver.iunarc, "/usr/bin/unzip -o -j");
|
||||
sprintf(archiver.varc, "/usr/bin/unzip -l");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ZOO archiver");
|
||||
sprintf(archiver.name, "ZOO");
|
||||
if (strlen(_PATH_ZOO)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s aq", _PATH_ZOO);
|
||||
sprintf(archiver.marc, "%s aq:O", _PATH_ZOO);
|
||||
sprintf(archiver.barc, "%s aqC", _PATH_ZOO);
|
||||
sprintf(archiver.varc, "%s -list", _PATH_ZOO);
|
||||
sprintf(archiver.funarc, "%s xqO", _PATH_ZOO);
|
||||
sprintf(archiver.munarc, "%s eq:O", _PATH_ZOO);
|
||||
sprintf(archiver.iunarc, "%s eqO", _PATH_ZOO);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/zoo aq");
|
||||
sprintf(archiver.marc, "/usr/bin/zoo aq:O");
|
||||
sprintf(archiver.barc, "/usr/bin/zoo aqC");
|
||||
sprintf(archiver.varc, "/usr/bin/zoo -list");
|
||||
sprintf(archiver.funarc, "/usr/bin/zoo xqO");
|
||||
sprintf(archiver.munarc, "/usr/bin/zoo eq:O");
|
||||
sprintf(archiver.iunarc, "/usr/bin/zoo eqO");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "ZOO archiver");
|
||||
sprintf(archiver.name, "ZOO");
|
||||
if (strlen(_PATH_ZOO)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s aq", _PATH_ZOO);
|
||||
sprintf(archiver.marc, "%s aq:O", _PATH_ZOO);
|
||||
sprintf(archiver.barc, "%s aqC", _PATH_ZOO);
|
||||
sprintf(archiver.varc, "%s -list", _PATH_ZOO);
|
||||
sprintf(archiver.funarc, "%s xqO", _PATH_ZOO);
|
||||
sprintf(archiver.munarc, "%s eq:O", _PATH_ZOO);
|
||||
sprintf(archiver.iunarc, "%s eqO", _PATH_ZOO);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/zoo aq");
|
||||
sprintf(archiver.marc, "/usr/bin/zoo aq:O");
|
||||
sprintf(archiver.barc, "/usr/bin/zoo aqC");
|
||||
sprintf(archiver.varc, "/usr/bin/zoo -list");
|
||||
sprintf(archiver.funarc, "/usr/bin/zoo xqO");
|
||||
sprintf(archiver.munarc, "/usr/bin/zoo eq:O");
|
||||
sprintf(archiver.iunarc, "/usr/bin/zoo eqO");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "HA Harri Hirvola");
|
||||
sprintf(archiver.name, "HA");
|
||||
if (strlen(_PATH_HA)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s a21rq", _PATH_HA);
|
||||
sprintf(archiver.marc, "%s a21q", _PATH_HA);
|
||||
sprintf(archiver.tarc, "%s t", _PATH_HA);
|
||||
sprintf(archiver.varc, "%s l", _PATH_HA);
|
||||
sprintf(archiver.funarc, "%s eyq", _PATH_HA);
|
||||
sprintf(archiver.munarc, "%s eyq", _PATH_HA);
|
||||
sprintf(archiver.iunarc, "%s eyq", _PATH_HA);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/ha a21rq");
|
||||
sprintf(archiver.marc, "/usr/bin/ha a21q");
|
||||
sprintf(archiver.tarc, "/usr/bin/ha t");
|
||||
sprintf(archiver.varc, "/usr/bin/ha l");
|
||||
sprintf(archiver.funarc, "/usr/bin/ha eyq");
|
||||
sprintf(archiver.munarc, "/usr/bin/ha eyq");
|
||||
sprintf(archiver.iunarc, "/usr/bin/ha eyq");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
memset(&archiver, 0, sizeof(archiver));
|
||||
sprintf(archiver.comment, "HA Harri Hirvola");
|
||||
sprintf(archiver.name, "HA");
|
||||
if (strlen(_PATH_HA)) {
|
||||
archiver.available = TRUE;
|
||||
sprintf(archiver.farc, "%s a21rq", _PATH_HA);
|
||||
sprintf(archiver.marc, "%s a21q", _PATH_HA);
|
||||
sprintf(archiver.tarc, "%s t", _PATH_HA);
|
||||
sprintf(archiver.varc, "%s l", _PATH_HA);
|
||||
sprintf(archiver.funarc, "%s eyq", _PATH_HA);
|
||||
sprintf(archiver.munarc, "%s eyq", _PATH_HA);
|
||||
sprintf(archiver.iunarc, "%s eyq", _PATH_HA);
|
||||
} else {
|
||||
archiver.available = FALSE;
|
||||
sprintf(archiver.farc, "/usr/bin/ha a21rq");
|
||||
sprintf(archiver.marc, "/usr/bin/ha a21q");
|
||||
sprintf(archiver.tarc, "/usr/bin/ha t");
|
||||
sprintf(archiver.varc, "/usr/bin/ha l");
|
||||
sprintf(archiver.funarc, "/usr/bin/ha eyq");
|
||||
sprintf(archiver.munarc, "/usr/bin/ha eyq");
|
||||
sprintf(archiver.iunarc, "/usr/bin/ha eyq");
|
||||
}
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
|
||||
fclose(fil);
|
||||
chmod(ffile, 0640);
|
||||
return 11;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
fclose(fil);
|
||||
chmod(ffile, 0640);
|
||||
return 12;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
fread(&archiverhdr, sizeof(archiverhdr), 1, fil);
|
||||
fseek(fil, 0, SEEK_END);
|
||||
count = (ftell(fil) - archiverhdr.hdrsize) / archiverhdr.recsize;
|
||||
fclose(fil);
|
||||
fread(&archiverhdr, sizeof(archiverhdr), 1, fil);
|
||||
fseek(fil, 0, SEEK_END);
|
||||
count = (ftell(fil) - archiverhdr.hdrsize) / archiverhdr.recsize;
|
||||
fclose(fil);
|
||||
|
||||
return count;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1267,9 +1267,9 @@ void EditNodes(void)
|
||||
working(0, 0, 0);
|
||||
} else {
|
||||
if ((records + 1) > CFG.toss_systems) {
|
||||
errmsg("Cannot add node, change global setting in menu 1.12.11");
|
||||
errmsg("Cannot add node, change global setting in menu 1.11.11");
|
||||
} else {
|
||||
errmsg("Cannot add node, change global setting in menu 1.11.4");
|
||||
errmsg("Cannot add node, change global setting in menu 1.10.4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user