Compiler fixes for non-testing users
This commit is contained in:
parent
42de42a82c
commit
a34a512a49
@ -263,8 +263,6 @@ int binkp(int role)
|
|||||||
#ifdef USE_BINKDZLIB
|
#ifdef USE_BINKDZLIB
|
||||||
bp.z_obuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
bp.z_obuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
||||||
bp.GZflag = WeCan;
|
bp.GZflag = WeCan;
|
||||||
#else
|
|
||||||
bp.GZflag = No;
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
bp.PLZflag = No;
|
bp.PLZflag = No;
|
||||||
@ -273,8 +271,6 @@ int binkp(int role)
|
|||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
#ifdef USE_BINKDZLIB
|
#ifdef USE_BINKDZLIB
|
||||||
bp.BZ2flag = WeCan;
|
bp.BZ2flag = WeCan;
|
||||||
#else
|
|
||||||
bp.BZ2flag = No;
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
bp.buggyIrex = FALSE;
|
bp.buggyIrex = FALSE;
|
||||||
@ -1425,7 +1421,10 @@ TrType binkp_receiver(void)
|
|||||||
|
|
||||||
TrType binkp_transmitter(void)
|
TrType binkp_transmitter(void)
|
||||||
{
|
{
|
||||||
int sz, rc = 0, rc1 = 0, eof = FALSE;
|
int rc = 0, eof = FALSE;
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
|
int sz, rc1 = 0;
|
||||||
|
#endif
|
||||||
char *nonhold_mail, *extra;
|
char *nonhold_mail, *extra;
|
||||||
fa_list *eff_remote;
|
fa_list *eff_remote;
|
||||||
file_list *tsl;
|
file_list *tsl;
|
||||||
@ -1524,7 +1523,11 @@ TrType binkp_transmitter(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// extra = (char *)""; /* FIXME: remove when code complete and to activate compression */
|
// extra = (char *)""; /* FIXME: remove when code complete and to activate compression */
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
bp.txpos = bp.txcpos = bp.stxpos = tmp->offset;
|
bp.txpos = bp.txcpos = bp.stxpos = tmp->offset;
|
||||||
|
#else
|
||||||
|
bp.txpos = bp.stxpos = tmp->offset;
|
||||||
|
#endif
|
||||||
bp.txcompressed = 0;
|
bp.txcompressed = 0;
|
||||||
bp.tfsize = tmp->size;
|
bp.tfsize = tmp->size;
|
||||||
Syslog('+', "Binkp: send \"%s\" as \"%s\"", MBSE_SS(tmp->local), MBSE_SS(tmp->remote));
|
Syslog('+', "Binkp: send \"%s\" as \"%s\"", MBSE_SS(tmp->local), MBSE_SS(tmp->remote));
|
||||||
@ -1956,7 +1959,9 @@ int binkp_banner(void)
|
|||||||
{
|
{
|
||||||
time_t t;
|
time_t t;
|
||||||
int rc;
|
int rc;
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
char *p;
|
char *p;
|
||||||
|
#endif
|
||||||
|
|
||||||
rc = binkp_send_command(MM_NUL,"SYS %s", CFG.bbs_name);
|
rc = binkp_send_command(MM_NUL,"SYS %s", CFG.bbs_name);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
@ -2105,14 +2110,11 @@ void parse_m_nul(char *msg)
|
|||||||
free(bp.MD_Challenge);
|
free(bp.MD_Challenge);
|
||||||
bp.MD_Challenge = MD_getChallenge(q, NULL);
|
bp.MD_Challenge = MD_getChallenge(q, NULL);
|
||||||
}
|
}
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
} else if (strncmp(q, (char *)"EXTCMD", 6) == 0) {
|
} else if (strncmp(q, (char *)"EXTCMD", 6) == 0) {
|
||||||
bp.extcmd = TRUE;
|
bp.extcmd = TRUE;
|
||||||
Syslog('+', "Binkp: remote supports EXTCMD mode");
|
Syslog('+', "Binkp: remote supports EXTCMD mode");
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_BINKDZLIB
|
|
||||||
/* FIXME: order may need to change */
|
|
||||||
|
|
||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
} else if (strncmp(q, (char *)"BZ2", 3) == 0) {
|
} else if (strncmp(q, (char *)"BZ2", 3) == 0) {
|
||||||
if (bp.BZ2flag == WeCan) {
|
if (bp.BZ2flag == WeCan) {
|
||||||
@ -2149,10 +2151,11 @@ void parse_m_nul(char *msg)
|
|||||||
binkp_send_command(MM_NUL,"OPT PLZ");
|
binkp_send_command(MM_NUL,"OPT PLZ");
|
||||||
bp.PLZflag = Active;
|
bp.PLZflag = Active;
|
||||||
Syslog('+', " : zlib compression active");
|
Syslog('+', " : zlib compression active");
|
||||||
|
#ifdef USE_BINDZLIB
|
||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
bp.BZ2flag = No;
|
bp.BZ2flag = No;
|
||||||
#endif
|
#endif
|
||||||
bp.GZflag = No;
|
#endif
|
||||||
} else if (bp.PLZflag == WeWant) {
|
} else if (bp.PLZflag == WeWant) {
|
||||||
bp.PLZflag = Active;
|
bp.PLZflag = Active;
|
||||||
Syslog('+', " : zlib compression active");
|
Syslog('+', " : zlib compression active");
|
||||||
@ -2335,11 +2338,13 @@ int binkp_process_messages(void)
|
|||||||
rmode = CompBZ2;
|
rmode = CompBZ2;
|
||||||
else if (strcmp((char *)"NZ", ropts) == 0) {
|
else if (strcmp((char *)"NZ", ropts) == 0) {
|
||||||
rmode = CompNone;
|
rmode = CompNone;
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
bp.GZflag = No;
|
bp.GZflag = No;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
bp.BZ2flag = No;
|
bp.BZ2flag = No;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
Syslog('+', "Binkp: received NZ on M_GET command, compression turned off");
|
Syslog('+', "Binkp: received NZ on M_GET command, compression turned off");
|
||||||
}
|
}
|
||||||
@ -2670,6 +2675,7 @@ void fill_binkp_list(binkp_list **bkll, file_list *fal, off_t offs)
|
|||||||
* Search compression method, but only if GZ or BZ2 compression is active.
|
* Search compression method, but only if GZ or BZ2 compression is active.
|
||||||
*/
|
*/
|
||||||
comp = FALSE;
|
comp = FALSE;
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
if (bp.GZflag == Active)
|
if (bp.GZflag == Active)
|
||||||
comp = TRUE;
|
comp = TRUE;
|
||||||
@ -2677,6 +2683,7 @@ void fill_binkp_list(binkp_list **bkll, file_list *fal, off_t offs)
|
|||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
if (bp.BZ2flag == Active)
|
if (bp.BZ2flag == Active)
|
||||||
comp = TRUE;
|
comp = TRUE;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (!comp)
|
if (!comp)
|
||||||
return;
|
return;
|
||||||
@ -2696,6 +2703,7 @@ void fill_binkp_list(binkp_list **bkll, file_list *fal, off_t offs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_BINKDZLIB
|
||||||
#ifdef HAVE_BZLIB_H
|
#ifdef HAVE_BZLIB_H
|
||||||
/*
|
/*
|
||||||
* Use BZ2 for files > 200K
|
* Use BZ2 for files > 200K
|
||||||
@ -2712,6 +2720,7 @@ void fill_binkp_list(binkp_list **bkll, file_list *fal, off_t offs)
|
|||||||
Syslog('b', "Binkp: %s compressor GZ", fal->local);
|
Syslog('b', "Binkp: %s compressor GZ", fal->local);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
Syslog('+', "Binkp: compressor select internal error");
|
Syslog('+', "Binkp: compressor select internal error");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user