Fixed compiler warnings for gcc 4.1.x
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Sysop to user chat utility
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2006
|
||||
* Copyright (C) 1997-2007
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@@ -316,7 +316,7 @@ void Chat(char *username, char *channel)
|
||||
PUTCHAR(7);
|
||||
}
|
||||
/* if KEY_DEL isprint, do no output again */
|
||||
} else if (isprint(ch) || traduce(&ch)) {
|
||||
} else if (isprint(ch) || traduce((char *)&ch)) {
|
||||
alarm_on();
|
||||
if (curpos < width) {
|
||||
PUTCHAR(ch);
|
||||
|
@@ -738,9 +738,9 @@ char *GetFileType(char *fn)
|
||||
|
||||
for (i = 0; i < sizeof(buf); i++)
|
||||
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
|
||||
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
|
||||
|
@@ -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) {
|
||||
iPos++;
|
||||
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
||||
@@ -358,12 +358,12 @@ int FsWordWrap()
|
||||
* character 79. Otherwise, drop it, because it's a space.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
@@ -385,21 +385,21 @@ int FsWordWrap()
|
||||
* Otherwise, slap the wrapped section on the front of the
|
||||
* 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--)
|
||||
snprintf(Message[i+1], TEXTBUFSIZE +1, "%s", Message[i]);
|
||||
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", tmpLine);
|
||||
Line++;
|
||||
WCol = strlen(tmpLine) + 1;
|
||||
WCol = strlen((char *)tmpLine) + 1;
|
||||
} else {
|
||||
if ((WCol == 80) && (Col >= WCol))
|
||||
WCol = strlen(tmpLine)+1;
|
||||
WCol = strlen((char *)tmpLine)+1;
|
||||
else {
|
||||
if (tmpLine[strlen(tmpLine)] != ' ')
|
||||
snprintf(tmpLine + strlen(tmpLine), 1, " ");
|
||||
WCol = strlen(tmpLine);
|
||||
if (tmpLine[strlen((char *)tmpLine)] != ' ')
|
||||
snprintf((char *)tmpLine + strlen((char *)tmpLine), 1, " ");
|
||||
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;
|
||||
|
||||
default:
|
||||
if ((ch > 31) || traduce(&ch) ) {
|
||||
if ((ch > 31) || traduce((char *)&ch) ) {
|
||||
/*
|
||||
* Normal printable characters or hi-ascii
|
||||
*/
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Input functions, also for some utils.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2006
|
||||
* Copyright (C) 1997-2007
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@@ -373,7 +373,7 @@ void GetstrP(char *sStr, int iMaxLen, int Position)
|
||||
PUTCHAR('\007');
|
||||
|
||||
/* 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) {
|
||||
iPos++;
|
||||
snprintf(sStr + strlen(sStr), 5, "%c", ch);
|
||||
|
@@ -1463,8 +1463,8 @@ void BlueWave_Fetch()
|
||||
}
|
||||
Syslog('+', "Login %s, Alias %s", Uph.loginname, Uph.aliasname);
|
||||
Syslog('m', "Tear: %s", Uph.reader_tear);
|
||||
if (strlen(Uph.reader_tear))
|
||||
newtear = xstrcpy(Uph.reader_tear);
|
||||
if (strlen((char *)Uph.reader_tear))
|
||||
newtear = xstrcpy((char *)Uph.reader_tear);
|
||||
|
||||
/* MORE CHECKS HERE */
|
||||
|
||||
@@ -1502,7 +1502,7 @@ void BlueWave_Fetch()
|
||||
Syslog('m', " Type : Internet");
|
||||
else
|
||||
Syslog('m', " Type : Fidonet");
|
||||
getfilecase(Dirpath, Upr.filename);
|
||||
getfilecase(Dirpath, (char *)Upr.filename);
|
||||
Syslog('m', " File : %s", Upr.filename);
|
||||
Syslog('m', " Tag : %s", Upr.echotag);
|
||||
|
||||
@@ -1511,10 +1511,10 @@ void BlueWave_Fetch()
|
||||
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
||||
Found = FALSE;
|
||||
|
||||
if (strlen(Upr.echotag)) {
|
||||
if (strlen((char *)Upr.echotag)) {
|
||||
while (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
||||
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;
|
||||
break;
|
||||
}
|
||||
@@ -1525,7 +1525,7 @@ void BlueWave_Fetch()
|
||||
* this is "areanum.msgnum" so we pick the part
|
||||
* 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 (fread(&msgs, msgshdr.recsize, 1, mf) == 1) {
|
||||
Found = TRUE;
|
||||
@@ -1541,9 +1541,9 @@ void BlueWave_Fetch()
|
||||
|
||||
if (Open_Msgbase(msgs.Base, 'w')) {
|
||||
Msg_New();
|
||||
strcpy(Msg.From, Upr.from);
|
||||
strcpy(Msg.To, Upr.to);
|
||||
strcpy(Msg.Subject, Upr.subj);
|
||||
strcpy(Msg.From, (char *)Upr.from);
|
||||
strcpy(Msg.To, (char *)Upr.to);
|
||||
strcpy(Msg.Subject, (char *)Upr.subj);
|
||||
mbse_CleanSubject(Msg.Subject);
|
||||
if (Upr.msg_attr & le_us(UPL_PRIVATE))
|
||||
Msg.Private = TRUE;
|
||||
@@ -1556,7 +1556,7 @@ void BlueWave_Fetch()
|
||||
dest.net = le_us(Upr.destnet);
|
||||
dest.node = le_us(Upr.destnode);
|
||||
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);
|
||||
snprintf(temp, PATH_MAX, "%s/%s/%s", CFG.bbs_usersdir, exitinfo.Name, Upr.filename);
|
||||
unlink(temp);
|
||||
@@ -2206,8 +2206,8 @@ void QWK_Fetch()
|
||||
}
|
||||
|
||||
while (fread(&Qwk, sizeof(Qwk), 1, up) == 1) {
|
||||
Area = atol(StripSpaces(Qwk.Msgnum, sizeof(Qwk.Msgnum)));
|
||||
nRec = atoi(StripSpaces(Qwk.Msgrecs, sizeof(Qwk.Msgrecs)));
|
||||
Area = atol(StripSpaces((char *)Qwk.Msgnum, sizeof(Qwk.Msgnum)));
|
||||
nRec = atoi(StripSpaces((char *)Qwk.Msgrecs, sizeof(Qwk.Msgrecs)));
|
||||
|
||||
/*
|
||||
* Test for blank records.
|
||||
@@ -2215,14 +2215,14 @@ void QWK_Fetch()
|
||||
if (Area && nRec) {
|
||||
Syslog('m', "Conference %u", Area);
|
||||
Syslog('m', "Records %d", nRec);
|
||||
Syslog('m', "To %s", tlcap(StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||
Syslog('m', "From %s", tlcap(StripSpaces(Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||
Syslog('m', "Subject %s", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
snprintf(Temp, 128, "%s", StripSpaces(Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
||||
Syslog('m', "Date %s %s", Temp, StripSpaces(Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
||||
Syslog('m', "To %s", tlcap(StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||
Syslog('m', "From %s", tlcap(StripSpaces((char *)Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||
Syslog('m', "Subject %s", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
snprintf(Temp, 128, "%s", StripSpaces((char *)Qwk.Msgdate, sizeof(Qwk.Msgdate)));
|
||||
Syslog('m', "Date %s %s", Temp, StripSpaces((char *)Qwk.Msgtime, sizeof(Qwk.Msgtime)));
|
||||
|
||||
if (strcmp("MBSEQWK", StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))) == 0) {
|
||||
Syslog('m', "Command %s", StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
if (strcmp("MBSEQWK", StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))) == 0) {
|
||||
Syslog('m', "Command %s", StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
snprintf(otemp, PATH_MAX, "%s/%s/.olrtags", CFG.bbs_usersdir, exitinfo.Name);
|
||||
if ((op = fopen(otemp, "r+")) != NULL) {
|
||||
|
||||
@@ -2234,7 +2234,7 @@ void QWK_Fetch()
|
||||
fseek(op, (Area -1) * sizeof(olrtagrec), SEEK_SET);
|
||||
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) &&
|
||||
strlen(msgs.QWKname) && !olrtagrec.Tagged) {
|
||||
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) {
|
||||
olrtagrec.Tagged = FALSE;
|
||||
fseek(op, - sizeof(olrtagrec), SEEK_CUR);
|
||||
@@ -2281,12 +2281,12 @@ void QWK_Fetch()
|
||||
pLine = szLine;
|
||||
nCol = 0;
|
||||
Syslog('m', "Msgbase open and locked");
|
||||
strcpy(Msg.From, tlcap(StripSpaces(Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||
strcpy(Msg.To, tlcap(StripSpaces(Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||
strcpy(Msg.Subject, StripSpaces(Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
strcpy(Msg.From, tlcap(StripSpaces((char *)Qwk.MsgFrom, sizeof(Qwk.MsgFrom))));
|
||||
strcpy(Msg.To, tlcap(StripSpaces((char *)Qwk.MsgTo, sizeof(Qwk.MsgTo))));
|
||||
strcpy(Msg.Subject, StripSpaces((char *)Qwk.MsgSubj, sizeof(Qwk.MsgSubj)));
|
||||
if ((Qwk.Msgstat == '*') || (Qwk.Msgstat == '+'))
|
||||
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));
|
||||
memset(ltm, 0, sizeof(struct tm));
|
||||
ltm->tm_mday = atoi(&Temp[3]);
|
||||
@@ -2294,7 +2294,7 @@ void QWK_Fetch()
|
||||
ltm->tm_year = atoi(&Temp[6]);
|
||||
if (ltm->tm_year < 96)
|
||||
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_min = atoi(&Temp[3]);
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
fwrite(&Qwk, sizeof(Qwk), 1, fdm);
|
||||
fseek(fdm, 0L, SEEK_END);
|
||||
|
Reference in New Issue
Block a user