*** empty log message ***

svn path=/trunk/boinc/; revision=3707
This commit is contained in:
David Anderson 2004-06-28 02:55:17 +00:00
parent 61c8777957
commit b0dbf44e7f
7 changed files with 12 additions and 100 deletions

View File

@ -14180,3 +14180,15 @@ David 27 June 2004
sched/
transitioner.C
David 27 June 2004
- changes (from Carl C.) to get rid of signal usage in zip/unzip code
zip/unzip
fileio.c
unzip.c
zip/zip
zip.c
zipcloak.c
zipnote.c
zipsplit.c

View File

@ -1573,30 +1573,9 @@ void handler(signal) /* upon interrupt, turn on echo and exit cleanly */
{
GETGLOBALS();
#if !(defined(SIGBUS) || defined(SIGSEGV)) /* add a newline if not at */
(*G.message)((zvoid *)&G, slide, 0L, 0x41); /* start of line (to stderr; */
#endif /* slide[] should be safe) */
echon();
#ifdef SIGBUS
if (signal == SIGBUS) {
Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt),
"bus error"));
DESTROYGLOBALS();
EXIT(PK_BADERR);
}
#endif /* SIGBUS */
#ifdef SIGSEGV
if (signal == SIGSEGV) {
Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt),
"segmentation violation"));
DESTROYGLOBALS();
EXIT(PK_BADERR);
}
#endif /* SIGSEGV */
/* probably ctrl-C */
DESTROYGLOBALS();
#if defined(AMIGA) && defined(__SASC)

View File

@ -650,16 +650,6 @@ int unzip(__G__ argc, argv)
int i;
#endif
int retcode,error=FALSE;
#ifdef REENTRANT
savsigs_info *oldsighandlers = NULL;
# define SET_SIGHANDLER(sigtype, newsighandler) \
if ((retcode = setsignalhandler(__G__ &oldsighandlers, (sigtype), \
(newsighandler))) > PK_WARN) \
goto cleanup_and_exit
#else
# define SET_SIGHANDLER(sigtype, newsighandler) \
signal((sigtype), (newsighandler))
#endif
SETLOCALE(LC_CTYPE,"");
@ -700,19 +690,6 @@ int unzip(__G__ argc, argv)
return jmperrcode;
}
#ifdef SIGINT
SET_SIGHANDLER(SIGINT, handler);
#endif
#ifdef SIGTERM /* some systems really have no SIGTERM */
SET_SIGHANDLER(SIGTERM, handler);
#endif
#ifdef SIGBUS
SET_SIGHANDLER(SIGBUS, handler);
#endif
#ifdef SIGSEGV
SET_SIGHANDLER(SIGSEGV, handler);
#endif
#if (defined(WIN32) && defined(__RSXNT__))
for (i = 0 ; i < argc; i++) {
_ISO_INTERN(argv[i]);
@ -1028,41 +1005,6 @@ cleanup_and_exit:
#ifdef REENTRANT
/*******************************/
/* Function setsignalhandler() */
/*******************************/
static int setsignalhandler(__G__ p_savedhandler_chain, signal_type,
newhandler)
__GDEF
savsigs_info **p_savedhandler_chain;
int signal_type;
void (*newhandler)(int);
{
savsigs_info *savsig;
savsig = malloc(sizeof(savsigs_info));
if (savsig == NULL) {
/* error message and break */
Info(slide, 0x401, ((char *)slide, LoadFarString(CantSaveSigHandler)));
return PK_MEM;
}
savsig->sigtype = signal_type;
savsig->sighandler = signal(SIGINT, newhandler);
if (savsig->sighandler == SIG_ERR) {
free(savsig);
} else {
savsig->previous = *p_savedhandler_chain;
*p_savedhandler_chain = savsig;
}
return PK_OK;
} /* end function setsignalhandler() */
#endif /* REENTRANT */

View File

@ -42,7 +42,6 @@
# endif
#endif
#include <signal.h>
#define MAXCOM 256 /* Maximum one-line comment size */
@ -1043,12 +1042,6 @@ int zip_main(int argc, char** argv)
zipfile = tempzip = NULL;
tempzf = NULL;
d = 0; /* disallow adding to a zip file */
#if (!defined(MACOS) && !defined(WINDLL))
signal(SIGINT, handler);
#ifdef SIGTERM /* AMIGADOS and others have no SIGTERM */
signal(SIGTERM, handler);
#endif
#endif /* !MACOS && !WINDLL */
k = 0; /* Next non-option argument type */
s = 0; /* set by -@ if -@ is early */

View File

@ -231,12 +231,6 @@ int main(argc, argv)
/* Go through args */
zipfile = tempzip = NULL;
tempzf = NULL;
#ifdef SIGINT
signal(SIGINT, handler);
#endif
#ifdef SIGTERM /* Some don't have SIGTERM */
signal(SIGTERM, handler);
#endif
temp_path = decrypt = 0;
for (r = 1; r < argc; r++) {
if (*argv[r] == '-') {

View File

@ -321,10 +321,6 @@ char **argv; /* command line tokens */
/* Go through args */
zipfile = tempzip = NULL;
tempzf = NULL;
signal(SIGINT, handler);
#ifdef SIGTERM /* AMIGA has no SIGTERM */
signal(SIGTERM, handler);
#endif
k = w = 0;
for (r = 1; r < argc; r++)
if (*argv[r] == '-') {

View File

@ -459,10 +459,6 @@ char **argv; /* command line tokens */
init_upper(); /* build case map table */
/* Go through args */
signal(SIGINT, handler);
#ifdef SIGTERM /* Amiga has no SIGTERM */
signal(SIGTERM, handler);
#endif
k = h = x = d = u = 0;
c = DEFSIZ;
for (r = 1; r < argc; r++)