Fixed compiler warnings for gcc 4.1.x
This commit is contained in:
parent
51940ae330
commit
24e0ebcb45
19
ChangeLog
19
ChangeLog
@ -11,6 +11,25 @@ v0.91.10 21-Aug-2007
|
|||||||
|
|
||||||
libmbse:
|
libmbse:
|
||||||
Added support or the ARM processor, thanks to Simon Voortman.
|
Added support or the ARM processor, thanks to Simon Voortman.
|
||||||
|
Fixed compile without iconv support.
|
||||||
|
|
||||||
|
libdiesel:
|
||||||
|
Fixed linking problem on OpenBSD.
|
||||||
|
|
||||||
|
libmsgbase:
|
||||||
|
Added extra debug info in pack function.
|
||||||
|
|
||||||
|
mbcico:
|
||||||
|
Fixed a lot of compiler warnings.
|
||||||
|
|
||||||
|
mbfido:
|
||||||
|
Fixed a lot of compiler warnings.
|
||||||
|
|
||||||
|
mbdiff:
|
||||||
|
Fixed a lot of compiler warnings.
|
||||||
|
|
||||||
|
mbsebbs:
|
||||||
|
Fixed a lot of compiler warnings.
|
||||||
|
|
||||||
mbmon:
|
mbmon:
|
||||||
Added support or the ARM processor.
|
Added support or the ARM processor.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Remark ................: See below for more copyright details and credits.
|
* Remark ................: See below for more copyright details and credits.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2005
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -1042,7 +1042,7 @@ int hydra_batch(int role, file_list *to_send)
|
|||||||
if (compstate == HCMP_GZ) {
|
if (compstate == HCMP_GZ) {
|
||||||
txzlen = H_ZIPBUFLEN - 4;
|
txzlen = H_ZIPBUFLEN - 4;
|
||||||
destLen = (uLongf)txzlen;
|
destLen = (uLongf)txzlen;
|
||||||
rcz = compress2(txzbuf + 4, &destLen, txbuf + 4, txlen, 9);
|
rcz = compress2((Bytef *)txzbuf + 4, &destLen, (Bytef *)txbuf + 4, txlen, 9);
|
||||||
txzlen = (int)destLen;
|
txzlen = (int)destLen;
|
||||||
if (rcz == Z_OK) {
|
if (rcz == Z_OK) {
|
||||||
Syslog('h', "Hydra: compressed OK, srclen=%d, destlen=%d, will send compressed=%s", txlen, txzlen,
|
Syslog('h', "Hydra: compressed OK, srclen=%d, destlen=%d, will send compressed=%s", txlen, txzlen,
|
||||||
@ -1503,7 +1503,7 @@ int hydra_batch(int role, file_list *to_send)
|
|||||||
if (pkttype == HPKT_ZIPDATA) {
|
if (pkttype == HPKT_ZIPDATA) {
|
||||||
rxzlen = H_ZIPBUFLEN;
|
rxzlen = H_ZIPBUFLEN;
|
||||||
destLen = (uLongf)rxzlen;
|
destLen = (uLongf)rxzlen;
|
||||||
rcz = uncompress(rxzbuf, &destLen, rxbuf + 4, rxlen - 4);
|
rcz = uncompress((Bytef *)rxzbuf, &destLen, (Bytef *)rxbuf + 4, rxlen - 4);
|
||||||
rxzlen = (int)destLen;
|
rxzlen = (int)destLen;
|
||||||
if (rcz == Z_OK) {
|
if (rcz == Z_OK) {
|
||||||
/*
|
/*
|
||||||
|
@ -556,7 +556,7 @@ int checkhello(void)
|
|||||||
remaddr.name = NULL;
|
remaddr.name = NULL;
|
||||||
remaddr.domain = NULL;
|
remaddr.domain = NULL;
|
||||||
if (hello2.my_name[0])
|
if (hello2.my_name[0])
|
||||||
remaddr.domain = hello2.my_name + (strlen(hello2.my_name)) + 1;
|
remaddr.domain = (char *)hello2.my_name + (strlen((char *)hello2.my_name)) + 1;
|
||||||
if (remaddr.domain[0]) {
|
if (remaddr.domain[0]) {
|
||||||
if ((q = strchr(remaddr.domain, '.')))
|
if ((q = strchr(remaddr.domain, '.')))
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
@ -617,9 +617,9 @@ int checkhello(void)
|
|||||||
else
|
else
|
||||||
Syslog('+', " uses: %s [%04X] version %d.%d", prodnm, hello2.product, majver, minver);
|
Syslog('+', " uses: %s [%04X] version %d.%d", prodnm, hello2.product, majver, minver);
|
||||||
Syslog('+', " system: %s",(char*)hello2.my_name);
|
Syslog('+', " system: %s",(char*)hello2.my_name);
|
||||||
strncpy(history.system_name, hello2.my_name, 35);
|
strncpy(history.system_name, (char *)hello2.my_name, 35);
|
||||||
Syslog('+', " sysop: %s",(char*)hello2.sysop);
|
Syslog('+', " sysop: %s",(char*)hello2.sysop);
|
||||||
strncpy(history.sysop, hello2.sysop, 35);
|
strncpy(history.sysop, (char *)hello2.sysop, 35);
|
||||||
snprintf(history.location, 10, "Somewhere");
|
snprintf(history.location, 10, "Somewhere");
|
||||||
|
|
||||||
free(prodnm);
|
free(prodnm);
|
||||||
|
@ -450,7 +450,8 @@ void Help(void)
|
|||||||
int apply(char *nl, char *nd, char *nn)
|
int apply(char *nl, char *nd, char *nn)
|
||||||
{
|
{
|
||||||
FILE *fo, *fd, *fn;
|
FILE *fo, *fd, *fn;
|
||||||
unsigned char cmdbuf[BLKSIZ], lnbuf[BLKSIZ], *p;
|
unsigned char cmdbuf[BLKSIZ], lnbuf[BLKSIZ];
|
||||||
|
char *p;
|
||||||
int i, count, ac = 0, cc = 0, dc = 0, rc = 0, firstline = 1;
|
int i, count, ac = 0, cc = 0, dc = 0, rc = 0, firstline = 1;
|
||||||
unsigned short theircrc = 0, mycrc = 0;
|
unsigned short theircrc = 0, mycrc = 0;
|
||||||
|
|
||||||
@ -472,56 +473,56 @@ int apply(char *nl, char *nd, char *nn)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fgets(cmdbuf, sizeof(cmdbuf)-1, fd) == NULL) ||
|
if ((fgets((char *)cmdbuf, sizeof(cmdbuf)-1, fd) == NULL) ||
|
||||||
(fgets(lnbuf, sizeof(cmdbuf)-1, fo) == NULL) ||
|
(fgets((char *)lnbuf, sizeof(cmdbuf)-1, fo) == NULL) ||
|
||||||
(strcmp(cmdbuf, lnbuf) != 0)) {
|
(strcmp((char *)cmdbuf, (char *)lnbuf) != 0)) {
|
||||||
rc = 6;
|
rc = 6;
|
||||||
} else {
|
} else {
|
||||||
rewind(fo);
|
rewind(fo);
|
||||||
rewind(fd);
|
rewind(fd);
|
||||||
|
|
||||||
while ((rc == 0) && fgets(cmdbuf, sizeof(cmdbuf)-1, fd)) {
|
while ((rc == 0) && fgets((char *)cmdbuf, sizeof(cmdbuf)-1, fd)) {
|
||||||
switch (cmdbuf[0]) {
|
switch (cmdbuf[0]) {
|
||||||
case '\032': break;
|
case '\032': break;
|
||||||
case ';': Striplf(cmdbuf);
|
case ';': Striplf((char *)cmdbuf);
|
||||||
break;
|
break;
|
||||||
case 'A': count = atoi(cmdbuf+1);
|
case 'A': count = atoi((char *)cmdbuf+1);
|
||||||
ac += count;
|
ac += count;
|
||||||
Striplf(cmdbuf);
|
Striplf((char *)cmdbuf);
|
||||||
for (i = 0;(i < count) && (rc == 0); i++)
|
for (i = 0;(i < count) && (rc == 0); i++)
|
||||||
if (fgets(lnbuf, sizeof(lnbuf)-1, fd)) {
|
if (fgets((char *)lnbuf, sizeof(lnbuf)-1, fd)) {
|
||||||
if (firstline) {
|
if (firstline) {
|
||||||
firstline = 0;
|
firstline = 0;
|
||||||
if ((p = strrchr(lnbuf, ':'))) {
|
if ((p = strrchr((char *)lnbuf, ':'))) {
|
||||||
theircrc = atoi(p+1);
|
theircrc = atoi((char *)p+1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (p = lnbuf; *p; p++)
|
for (p = (char *)lnbuf; *p; p++)
|
||||||
mycrc = updcrc(*p, mycrc);
|
mycrc = updcrc(*p, mycrc);
|
||||||
}
|
}
|
||||||
fputs(lnbuf, fn);
|
fputs((char *)lnbuf, fn);
|
||||||
} else
|
} else
|
||||||
rc = 3;
|
rc = 3;
|
||||||
break;
|
break;
|
||||||
case 'D': count = atoi(cmdbuf + 1);
|
case 'D': count = atoi((char *)cmdbuf + 1);
|
||||||
dc += count;
|
dc += count;
|
||||||
Striplf(cmdbuf);
|
Striplf((char *)cmdbuf);
|
||||||
for (i = 0;(i < count) && (rc == 0); i++)
|
for (i = 0;(i < count) && (rc == 0); i++)
|
||||||
if (fgets(lnbuf, sizeof(lnbuf)-1, fo) == NULL)
|
if (fgets((char *)lnbuf, sizeof(lnbuf)-1, fo) == NULL)
|
||||||
rc = 3;
|
rc = 3;
|
||||||
break;
|
break;
|
||||||
case 'C': count = atoi(cmdbuf+1);
|
case 'C': count = atoi((char *)cmdbuf+1);
|
||||||
cc += count;
|
cc += count;
|
||||||
Striplf(cmdbuf);
|
Striplf((char *)cmdbuf);
|
||||||
for (i = 0; (i < count) && (rc == 0); i++)
|
for (i = 0; (i < count) && (rc == 0); i++)
|
||||||
if (fgets(lnbuf, sizeof(lnbuf) - 1, fo)) {
|
if (fgets((char *)lnbuf, sizeof(lnbuf) - 1, fo)) {
|
||||||
/*
|
/*
|
||||||
* Don't use EOF character for CRC test.
|
* Don't use EOF character for CRC test.
|
||||||
*/
|
*/
|
||||||
if (lnbuf[0] != '\032') {
|
if (lnbuf[0] != '\032') {
|
||||||
for (p = lnbuf; *p; p++)
|
for (p = (char *)lnbuf; *p; p++)
|
||||||
mycrc = updcrc(*p, mycrc);
|
mycrc = updcrc(*p, mycrc);
|
||||||
fputs(lnbuf, fn);
|
fputs((char *)lnbuf, fn);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
rc = 3;
|
rc = 3;
|
||||||
|
20
mbfido/msg.c
20
mbfido/msg.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Read *.msg messages
|
* Purpose ...............: Read *.msg messages
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2005
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -137,10 +137,10 @@ int toss_onemsg(char *msgname)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(fromUserName, buf, 36);
|
strncpy(fromUserName, (char *)buf, 36);
|
||||||
strncpy(toUserName, buf+0x24, 36);
|
strncpy(toUserName, (char *)buf+0x24, 36);
|
||||||
strncpy(subject, buf+0x48, 72);
|
strncpy(subject, (char *)buf+0x48, 72);
|
||||||
strncpy(DateTime, buf+0x90, 20);
|
strncpy(DateTime, (char *)buf+0x90, 20);
|
||||||
|
|
||||||
Syslog('m', "From \"%s\"", printable(fromUserName, 0));
|
Syslog('m', "From \"%s\"", printable(fromUserName, 0));
|
||||||
Syslog('m', "To \"%s\"", printable(toUserName, 0));
|
Syslog('m', "To \"%s\"", printable(toUserName, 0));
|
||||||
@ -228,16 +228,16 @@ int toss_onemsg(char *msgname)
|
|||||||
/*
|
/*
|
||||||
* Check FLAGS kludge
|
* Check FLAGS kludge
|
||||||
*/
|
*/
|
||||||
if (!strncmp(buf, "\001FLAGS ", 7)) {
|
if (!strncmp((char *)buf, "\001FLAGS ", 7)) {
|
||||||
flagstr = xstrcpy(buf + 7);
|
flagstr = xstrcpy((char *)buf + 7);
|
||||||
Syslog('m', "^aFLAGS %s", flagstr);
|
Syslog('m', "^aFLAGS %s", flagstr);
|
||||||
}
|
}
|
||||||
if (!strncmp(buf, "\001FLAGS: ", 8)) {
|
if (!strncmp((char *)buf, "\001FLAGS: ", 8)) {
|
||||||
flagstr = xstrcpy(buf + 8);
|
flagstr = xstrcpy((char *)buf + 8);
|
||||||
Syslog('m', "^aFLAGS: %s", flagstr);
|
Syslog('m', "^aFLAGS: %s", flagstr);
|
||||||
}
|
}
|
||||||
if (buf[0] != '\0') {
|
if (buf[0] != '\0') {
|
||||||
if ((buf[0] != '\001') && (strcmp(buf, (char *)"--- ")))
|
if ((buf[0] != '\001') && (strcmp((char *)buf, (char *)"--- ")))
|
||||||
empty = FALSE;
|
empty = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,8 @@ int check_free(void)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
int i, rc, addrlen = sizeof(struct sockaddr_in);
|
int i, rc;
|
||||||
|
socklen_t addrlen = sizeof(struct sockaddr_in);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The next trick is to supply a fake environment variable
|
* The next trick is to supply a fake environment variable
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Sysop to user chat utility
|
* Purpose ...............: Sysop to user chat utility
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2006
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -316,7 +316,7 @@ void Chat(char *username, char *channel)
|
|||||||
PUTCHAR(7);
|
PUTCHAR(7);
|
||||||
}
|
}
|
||||||
/* if KEY_DEL isprint, do no output again */
|
/* if KEY_DEL isprint, do no output again */
|
||||||
} else if (isprint(ch) || traduce(&ch)) {
|
} else if (isprint(ch) || traduce((char *)&ch)) {
|
||||||
alarm_on();
|
alarm_on();
|
||||||
if (curpos < width) {
|
if (curpos < width) {
|
||||||
PUTCHAR(ch);
|
PUTCHAR(ch);
|
||||||
|
@ -738,9 +738,9 @@ char *GetFileType(char *fn)
|
|||||||
|
|
||||||
for (i = 0; i < sizeof(buf); i++)
|
for (i = 0; i < sizeof(buf); i++)
|
||||||
if ((buf[i] >= ' ') && (buf[i] <= 127))
|
if ((buf[i] >= ' ') && (buf[i] <= 127))
|
||||||
snprintf((char*)dbuf+strlen(dbuf), 80, " %c", buf[i]);
|
snprintf((char*)dbuf+strlen((char *)dbuf), 80, " %c", buf[i]);
|
||||||
else
|
else
|
||||||
snprintf((char*)dbuf+strlen(dbuf), 80, " %02x", buf[i]);
|
snprintf((char*)dbuf+strlen((char *)dbuf), 80, " %02x", buf[i]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Various expected uploads. Not that the standard MS-DOS archivers
|
* Various expected uploads. Not that the standard MS-DOS archivers
|
||||||
|
@ -221,7 +221,7 @@ void GetstrLC(char *sStr, int iMaxlen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ch > 31 && ch < 127) || traduce(&ch)) {
|
if ((ch > 31 && ch < 127) || traduce((char *)&ch)) {
|
||||||
if (iPos <= iMaxlen) {
|
if (iPos <= iMaxlen) {
|
||||||
iPos++;
|
iPos++;
|
||||||
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
||||||
@ -358,12 +358,12 @@ int FsWordWrap()
|
|||||||
* character 79. Otherwise, drop it, because it's a space.
|
* character 79. Otherwise, drop it, because it's a space.
|
||||||
*/
|
*/
|
||||||
if ((WCol == 80) || (WCol-1 == Col))
|
if ((WCol == 80) || (WCol-1 == Col))
|
||||||
snprintf(tmpLine + strlen(tmpLine), 5, "%c", Message[CurRow][79]);
|
snprintf((char *)tmpLine + strlen((char *)tmpLine), 5, "%c", Message[CurRow][79]);
|
||||||
/*
|
/*
|
||||||
* Grab all characters from WCol to end of line.
|
* Grab all characters from WCol to end of line.
|
||||||
*/
|
*/
|
||||||
for (i = WCol; i < strlen(Message[CurRow]); i++) {
|
for (i = WCol; i < strlen(Message[CurRow]); i++) {
|
||||||
snprintf(tmpLine + strlen(tmpLine), 5, "%c", Message[CurRow][i]);
|
snprintf((char *)tmpLine + strlen((char *)tmpLine), 5, "%c", Message[CurRow][i]);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Truncate current row.
|
* Truncate current row.
|
||||||
@ -385,21 +385,21 @@ int FsWordWrap()
|
|||||||
* Otherwise, slap the wrapped section on the front of the
|
* Otherwise, slap the wrapped section on the front of the
|
||||||
* next row with a space if needed.
|
* next row with a space if needed.
|
||||||
*/
|
*/
|
||||||
if ((strlen(tmpLine) + strlen(Message[CurRow+1])) > 79) {
|
if ((strlen((char *)tmpLine) + strlen(Message[CurRow+1])) > 79) {
|
||||||
for (i = Line; i > CurRow; i--)
|
for (i = Line; i > CurRow; i--)
|
||||||
snprintf(Message[i+1], TEXTBUFSIZE +1, "%s", Message[i]);
|
snprintf(Message[i+1], TEXTBUFSIZE +1, "%s", Message[i]);
|
||||||
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", tmpLine);
|
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", tmpLine);
|
||||||
Line++;
|
Line++;
|
||||||
WCol = strlen(tmpLine) + 1;
|
WCol = strlen((char *)tmpLine) + 1;
|
||||||
} else {
|
} else {
|
||||||
if ((WCol == 80) && (Col >= WCol))
|
if ((WCol == 80) && (Col >= WCol))
|
||||||
WCol = strlen(tmpLine)+1;
|
WCol = strlen((char *)tmpLine)+1;
|
||||||
else {
|
else {
|
||||||
if (tmpLine[strlen(tmpLine)] != ' ')
|
if (tmpLine[strlen((char *)tmpLine)] != ' ')
|
||||||
snprintf(tmpLine + strlen(tmpLine), 1, " ");
|
snprintf((char *)tmpLine + strlen((char *)tmpLine), 1, " ");
|
||||||
WCol = strlen(tmpLine);
|
WCol = strlen((char *)tmpLine);
|
||||||
}
|
}
|
||||||
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", strcat(tmpLine, Message[CurRow+1]));
|
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", strcat((char *)tmpLine, Message[CurRow+1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -730,7 +730,7 @@ int Fs_Edit()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ((ch > 31) || traduce(&ch) ) {
|
if ((ch > 31) || traduce((char *)&ch) ) {
|
||||||
/*
|
/*
|
||||||
* Normal printable characters or hi-ascii
|
* Normal printable characters or hi-ascii
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Input functions, also for some utils.
|
* Purpose ...............: Input functions, also for some utils.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2006
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -373,7 +373,7 @@ void GetstrP(char *sStr, int iMaxLen, int Position)
|
|||||||
PUTCHAR('\007');
|
PUTCHAR('\007');
|
||||||
|
|
||||||
/* if 13 < DEL < 127 , should not output again */
|
/* if 13 < DEL < 127 , should not output again */
|
||||||
} else if ((ch > 31 && ch < 127) || traduce(&ch)) {
|
} else if ((ch > 31 && ch < 127) || traduce((char *)&ch)) {
|
||||||
if (iPos <= iMaxLen) {
|
if (iPos <= iMaxLen) {
|
||||||
iPos++;
|
iPos++;
|
||||||
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
||||||
|
@ -1463,8 +1463,8 @@ void BlueWave_Fetch()
|
|||||||
}
|
}
|
||||||
Syslog('+', "Login %s, Alias %s", Uph.loginname, Uph.aliasname);
|
Syslog('+', "Login %s, Alias %s", Uph.loginname, Uph.aliasname);
|
||||||
Syslog('m', "Tear: %s", Uph.reader_tear);
|
Syslog('m', "Tear: %s", Uph.reader_tear);
|
||||||
if (strlen(Uph.reader_tear))
|
if (strlen((char *)Uph.reader_tear))
|
||||||
newtear = xstrcpy(Uph.reader_tear);
|
newtear = xstrcpy((char *)Uph.reader_tear);
|
||||||
|
|
||||||
/* MORE CHECKS HERE */
|
/* MORE CHECKS HERE */
|
||||||
|
|
||||||
@ -1502,7 +1502,7 @@ void BlueWave_Fetch()
|
|||||||
Syslog('m', " Type : Internet");
|
Syslog('m', " Type : Internet");
|
||||||
else
|
else
|
||||||
Syslog('m', " Type : Fidonet");
|
Syslog('m', " Type : Fidonet");
|
||||||
getfilecase(Dirpath, Upr.filename);
|
getfilecase(Dirpath, (char *)Upr.filename);
|
||||||
Syslog('m', " File : %s", Upr.filename);
|
Syslog('m', " File : %s", Upr.filename);
|
||||||
Syslog('m', " Tag : %s", Upr.echotag);
|
Syslog('m', " Tag : %s", Upr.echotag);
|
||||||
|
|
||||||
@ -1511,10 +1511,10 @@ void BlueWave_Fetch()
|
|||||||
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
||||||
Found = FALSE;
|
Found = FALSE;
|
||||||
|
|
||||||
if (strlen(Upr.echotag)) {
|
if (strlen((char *)Upr.echotag)) {
|
||||||
while (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
while (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
||||||
fseek(mf, msgshdr.syssize, SEEK_CUR);
|
fseek(mf, msgshdr.syssize, SEEK_CUR);
|
||||||
if (msgs.Active && (strcasecmp(msgs.QWKname, Upr.echotag) == 0)) {
|
if (msgs.Active && (strcasecmp(msgs.QWKname, (char *)Upr.echotag) == 0)) {
|
||||||
Found = TRUE;
|
Found = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1525,7 +1525,7 @@ void BlueWave_Fetch()
|
|||||||
* this is "areanum.msgnum" so we pick the part
|
* this is "areanum.msgnum" so we pick the part
|
||||||
* before the dot and pray that it's ok.
|
* before the dot and pray that it's ok.
|
||||||
*/
|
*/
|
||||||
temp = strtok(strdup(Upr.filename), ".");
|
temp = strtok(strdup((char *)Upr.filename), ".");
|
||||||
if (fseek(mf, ((atoi(temp) -1) * (msgshdr.recsize + msgshdr.syssize)) + msgshdr.hdrsize, SEEK_SET) == 0)
|
if (fseek(mf, ((atoi(temp) -1) * (msgshdr.recsize + msgshdr.syssize)) + msgshdr.hdrsize, SEEK_SET) == 0)
|
||||||
if (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
if (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
||||||
Found = TRUE;
|
Found = TRUE;
|
||||||
@ -1541,9 +1541,9 @@ void BlueWave_Fetch()
|
|||||||
|
|
||||||
if (Open_Msgbase(msgs.Base, 'w')) {
|
if (Open_Msgbase(msgs.Base, 'w')) {
|
||||||
Msg_New();
|
Msg_New();
|
||||||
strcpy(Msg.From, Upr.from);
|
strcpy(Msg.From, (char *)Upr.from);
|
||||||
strcpy(Msg.To, Upr.to);
|
strcpy(Msg.To, (char *)Upr.to);
|
||||||
strcpy(Msg.Subject, Upr.subj);
|
strcpy(Msg.Subject, (char *)Upr.subj);
|
||||||
mbse_CleanSubject(Msg.Subject);
|
mbse_CleanSubject(Msg.Subject);
|
||||||
if (Upr.msg_attr & le_us(UPL_PRIVATE))
|
if (Upr.msg_attr & le_us(UPL_PRIVATE))
|
||||||
Msg.Private = TRUE;
|
Msg.Private = TRUE;
|
||||||
@ -1556,7 +1556,7 @@ void BlueWave_Fetch()
|
|||||||
dest.net = le_us(Upr.destnet);
|
dest.net = le_us(Upr.destnet);
|
||||||
dest.node = le_us(Upr.destnode);
|
dest.node = le_us(Upr.destnode);
|
||||||
dest.point = le_us(Upr.destpoint);
|
dest.point = le_us(Upr.destpoint);
|
||||||
Add_Kludges(dest, FALSE, Upr.filename);
|
Add_Kludges(dest, FALSE, (char *)Upr.filename);
|
||||||
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %s", Msg.Id, Msg.To, Msg.Subject, msgs.QWKname);
|
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %s", Msg.Id, Msg.To, Msg.Subject, msgs.QWKname);
|
||||||
snprintf(temp, PATH_MAX, "%s/%s/%s", CFG.bbs_usersdir, exitinfo.Name, Upr.filename);
|
snprintf(temp, PATH_MAX, "%s/%s/%s", CFG.bbs_usersdir, exitinfo.Name, Upr.filename);
|
||||||
unlink(temp);
|
unlink(temp);
|
||||||
@ -2206,8 +2206,8 @@ void QWK_Fetch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (fread(&Qwk, sizeof(Qwk), 1, up) == 1) {
|
while (fread(&Qwk, sizeof(Qwk), 1, up) == 1) {
|
||||||
Area = atol(StripSpaces(Qwk.Msgnum, sizeof(Qwk.Msgnum)));
|
Area = atol(StripSpaces((char *)Qwk.Msgnum, sizeof(Qwk.Msgnum)));
|
||||||
nRec = atoi(StripSpaces(Qwk.Msgrecs, sizeof(Qwk.Msgrecs)));
|
nRec = atoi(StripSpaces((char *)Qwk.Msgrecs, sizeof(Qwk.Msgrecs)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test for blank records.
|
* Test for blank records.
|
||||||
@ -2215,14 +2215,14 @@ void QWK_Fetch()
|
|||||||
if (Area && nRec) {
|
if (Area && nRec) {
|
||||||
Syslog('m', "Conference %u", Area);
|
Syslog('m', "Conference %u", Area);
|
||||||
Syslog('m', "Records %d", nRec);
|
Syslog('m', "Records %d", nRec);
|
||||||
Syslog('m', "To %s", tlcap(StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
Syslog('m', "To %s", tlcap(StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||||
Syslog('m', "From %s", tlcap(StripSpaces(Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
Syslog('m', "From %s", tlcap(StripSpaces((char *)Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||||
Syslog('m', "Subject %s", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
Syslog('m', "Subject %s", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||||
snprintf(Temp, 128, "%s", StripSpaces(Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
snprintf(Temp, 128, "%s", StripSpaces((char *)Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
||||||
Syslog('m', "Date %s %s", Temp, StripSpaces(Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
Syslog('m', "Date %s %s", Temp, StripSpaces((char *)Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
||||||
|
|
||||||
if (strcmp("MBSEQWK", StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))) == 0) {
|
if (strcmp("MBSEQWK", StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))) == 0) {
|
||||||
Syslog('m', "Command %s", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
Syslog('m', "Command %s", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||||
snprintf(otemp, PATH_MAX, "%s/%s/.olrtags", CFG.bbs_usersdir, exitinfo.Name);
|
snprintf(otemp, PATH_MAX, "%s/%s/.olrtags", CFG.bbs_usersdir, exitinfo.Name);
|
||||||
if ((op = fopen(otemp, "r+")) != NULL) {
|
if ((op = fopen(otemp, "r+")) != NULL) {
|
||||||
|
|
||||||
@ -2234,7 +2234,7 @@ void QWK_Fetch()
|
|||||||
fseek(op, (Area -1) * sizeof(olrtagrec), SEEK_SET);
|
fseek(op, (Area -1) * sizeof(olrtagrec), SEEK_SET);
|
||||||
fread(&olrtagrec, sizeof(olrtagrec), 1, op);
|
fread(&olrtagrec, sizeof(olrtagrec), 1, op);
|
||||||
|
|
||||||
if (strcmp("ADD", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj))) == 0) {
|
if (strcmp((char *)"ADD", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj))) == 0) {
|
||||||
if (msgs.Active && Access(exitinfo.Security, msgs.RDSec) &&
|
if (msgs.Active && Access(exitinfo.Security, msgs.RDSec) &&
|
||||||
strlen(msgs.QWKname) && !olrtagrec.Tagged) {
|
strlen(msgs.QWKname) && !olrtagrec.Tagged) {
|
||||||
olrtagrec.Tagged = TRUE;
|
olrtagrec.Tagged = TRUE;
|
||||||
@ -2244,7 +2244,7 @@ void QWK_Fetch()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp("DROP", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj))) == 0) {
|
if (strcmp((char *)"DROP", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj))) == 0) {
|
||||||
if (!msgs.OLR_Forced && olrtagrec.Tagged) {
|
if (!msgs.OLR_Forced && olrtagrec.Tagged) {
|
||||||
olrtagrec.Tagged = FALSE;
|
olrtagrec.Tagged = FALSE;
|
||||||
fseek(op, - sizeof(olrtagrec), SEEK_CUR);
|
fseek(op, - sizeof(olrtagrec), SEEK_CUR);
|
||||||
@ -2281,12 +2281,12 @@ void QWK_Fetch()
|
|||||||
pLine = szLine;
|
pLine = szLine;
|
||||||
nCol = 0;
|
nCol = 0;
|
||||||
Syslog('m', "Msgbase open and locked");
|
Syslog('m', "Msgbase open and locked");
|
||||||
strcpy(Msg.From, tlcap(StripSpaces(Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
strcpy(Msg.From, tlcap(StripSpaces((char *)Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||||
strcpy(Msg.To, tlcap(StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
strcpy(Msg.To, tlcap(StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||||
strcpy(Msg.Subject, StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
strcpy(Msg.Subject, StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||||
if ((Qwk.Msgstat == '*') || (Qwk.Msgstat == '+'))
|
if ((Qwk.Msgstat == '*') || (Qwk.Msgstat == '+'))
|
||||||
Msg.Private = TRUE;
|
Msg.Private = TRUE;
|
||||||
strcpy(Temp, StripSpaces(Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
strcpy(Temp, StripSpaces((char *)Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
||||||
ltm = malloc(sizeof(struct tm));
|
ltm = malloc(sizeof(struct tm));
|
||||||
memset(ltm, 0, sizeof(struct tm));
|
memset(ltm, 0, sizeof(struct tm));
|
||||||
ltm->tm_mday = atoi(&Temp[3]);
|
ltm->tm_mday = atoi(&Temp[3]);
|
||||||
@ -2294,7 +2294,7 @@ void QWK_Fetch()
|
|||||||
ltm->tm_year = atoi(&Temp[6]);
|
ltm->tm_year = atoi(&Temp[6]);
|
||||||
if (ltm->tm_year < 96)
|
if (ltm->tm_year < 96)
|
||||||
ltm->tm_year += 100;
|
ltm->tm_year += 100;
|
||||||
strcpy(Temp, StripSpaces(Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
strcpy(Temp, StripSpaces((char *)Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
||||||
ltm->tm_hour = atoi(&Temp[0]);
|
ltm->tm_hour = atoi(&Temp[0]);
|
||||||
ltm->tm_min = atoi(&Temp[3]);
|
ltm->tm_min = atoi(&Temp[3]);
|
||||||
ltm->tm_sec = 0;
|
ltm->tm_sec = 0;
|
||||||
@ -2583,7 +2583,7 @@ unsigned int QWK_PackArea(unsigned int ulLast, int Area)
|
|||||||
Size += fwrite(Temp, (int)(128L - (Size % 128L)), 1, fdm);
|
Size += fwrite(Temp, (int)(128L - (Size % 128L)), 1, fdm);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(Qwk.Msgrecs, 6, "%-*u", (int)sizeof(Qwk.Msgrecs), (int)((ftell(fdm) - Pos) / 128L));
|
snprintf((char *)Qwk.Msgrecs, 6, "%-*u", (int)sizeof(Qwk.Msgrecs), (int)((ftell(fdm) - Pos) / 128L));
|
||||||
fseek(fdm, Pos, SEEK_SET);
|
fseek(fdm, Pos, SEEK_SET);
|
||||||
fwrite(&Qwk, sizeof(Qwk), 1, fdm);
|
fwrite(&Qwk, sizeof(Qwk), 1, fdm);
|
||||||
fseek(fdm, 0L, SEEK_END);
|
fseek(fdm, 0L, SEEK_END);
|
||||||
|
@ -62,7 +62,7 @@ struct sockaddr_un from; /* From address */
|
|||||||
struct sockaddr_in myaddr_in; /* IBC local socket */
|
struct sockaddr_in myaddr_in; /* IBC local socket */
|
||||||
struct sockaddr_in clientaddr_in; /* IBC remote socket */
|
struct sockaddr_in clientaddr_in; /* IBC remote socket */
|
||||||
int ibcsock = -1; /* IBC socket */
|
int ibcsock = -1; /* IBC socket */
|
||||||
int fromlen;
|
socklen_t fromlen;
|
||||||
char waitmsg[81]; /* Waiting message */
|
char waitmsg[81]; /* Waiting message */
|
||||||
static char spath[PATH_MAX]; /* Socket path */
|
static char spath[PATH_MAX]; /* Socket path */
|
||||||
int logtrans = 0; /* Log transactions */
|
int logtrans = 0; /* Log transactions */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Dump Bluewave packets
|
* Purpose ...............: Dump Bluewave packets
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2006
|
* Copyright (C) 1997-2007
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -62,7 +62,7 @@ int main(int argc, char **argv)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Packet version %d\n", Inf.ver);
|
printf("Packet version %d\n", Inf.ver);
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
if (strlen(Inf.readerfiles[i]))
|
if (strlen((char *)Inf.readerfiles[i]))
|
||||||
printf("Display file %d %s\n", i+1, Inf.readerfiles[i]);
|
printf("Display file %d %s\n", i+1, Inf.readerfiles[i]);
|
||||||
printf("Registration number %s\n", Inf.regnum);
|
printf("Registration number %s\n", Inf.regnum);
|
||||||
printf("Login name %s\n", Inf.loginname);
|
printf("Login name %s\n", Inf.loginname);
|
||||||
@ -82,13 +82,13 @@ int main(int argc, char **argv)
|
|||||||
(Inf.uflags & INF_EXT_INFO) ? "Ext-info ":"",
|
(Inf.uflags & INF_EXT_INFO) ? "Ext-info ":"",
|
||||||
(Inf.uflags & INF_NUMERIC_EXT) ? "Numeric-ext":"");
|
(Inf.uflags & INF_NUMERIC_EXT) ? "Numeric-ext":"");
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
if (strlen(Inf.keywords[i]))
|
if (strlen((char *)Inf.keywords[i]))
|
||||||
printf("Keywords %2d %s\n", i+1, Inf.keywords[i]);
|
printf("Keywords %2d %s\n", i+1, Inf.keywords[i]);
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
if (strlen(Inf.filters[i]))
|
if (strlen((char *)Inf.filters[i]))
|
||||||
printf("Filters %2d %s\n", i+1, Inf.filters[i]);
|
printf("Filters %2d %s\n", i+1, Inf.filters[i]);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
if (strlen(Inf.macros[i]))
|
if (strlen((char *)Inf.macros[i]))
|
||||||
printf("Macro %d %s\n", i+1, Inf.macros[i]);
|
printf("Macro %d %s\n", i+1, Inf.macros[i]);
|
||||||
printf("Netmail flags %s%s%s%s%s%s%s\n", (Inf.netmail_flags & INF_CAN_CRASH) ? "Crash ":"",
|
printf("Netmail flags %s%s%s%s%s%s%s\n", (Inf.netmail_flags & INF_CAN_CRASH) ? "Crash ":"",
|
||||||
(Inf.netmail_flags & INF_CAN_ATTACH) ? "Attach ":"",
|
(Inf.netmail_flags & INF_CAN_ATTACH) ? "Attach ":"",
|
||||||
|
Reference in New Issue
Block a user