Category : C Source Code
Archive   : PGP20SRC.ZIP
Filename : ZIP.C

 
Output of file : ZIP.C contained in archive : PGP20SRC.ZIP
/* Support code for the zip/unzip code - just handles error messages. To
get exact errors, define ZIPDEBUG */

#include
#include
#include "usuals.h"
#include "fileio.h"
#include "language.h"
#include "pgp.h"

/* The following are defined in zip.h but it's easier to redefine them here
since the header files do wierd things with __STDC__-compatibility */

#define ZE_MEM 4

/* Clean error exit: c is a ZE_-class error, *msg is an error message.
Issue a message for the error, clean up files and memory, and exit */

void err(int c, char *msg)
{

#ifdef ZIPDEBUG
if (PERR(c))
perror("zip error");
fprintf(stderr, "zip error: %s (%s)\n", errors[c-1], msg);
#endif /* ZIPDEBUG */

/* Complain and return and out of memory error code */
if(c==ZE_MEM)
{ fprintf( stderr, PSTR("\nOut of memory\n") );
exitPGP( 7 );
}
else
{ fprintf( stderr, PSTR("\nCompression/decompression error\n") ); /* Yuck */
exitPGP( 23 );
}
}

/* Internal error, should never happen */

void error(char *msg)
{
err(-1, msg);
}


  3 Responses to “Category : C Source Code
Archive   : PGP20SRC.ZIP
Filename : ZIP.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/