Skip to content
Snippets Groups Projects
Commit b1157ad1 authored by deuce's avatar deuce
Browse files

Fix warnings and make curchannel unsigned.

parent 12fc7a7e
Branches
Tags
No related merge requests found
......@@ -29,7 +29,7 @@ contains comments describing each variable.
#define TOP_REVISION "A321"
/* Borland global variable that sets the stack size. */
extern unsigned _stklen = 8192L;
unsigned _stklen = 8192L;
/* Variables below are mostly listed in the order added to TOP. */
......@@ -101,7 +101,7 @@ XINT usedcmdlen = 0;
a binary node configuration file. */
XINT nodecfgfil = -1;
/* Current channel the user is on. */
long curchannel = 0;
unsigned long curchannel = 0;
/* getword functions return buffer. */
unsigned char *wordret = NULL;
/* Node index data for this node. */
......
......@@ -37,7 +37,7 @@ in Win32) and the main input loop.
Notes: This function never returns. exit() is always used to quit TOP.
*/
#ifndef __WIN32__
extern void main(XINT ac, char *av[])
extern int main(XINT ac, char *av[])
#else
extern int pascal WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow)
......
......@@ -158,7 +158,7 @@ void mod_proc(void)
/* The user can't ban in a personal channel. The test is done using
hardcoded internal channel numbers but probably should use the CHAN_
channel type constants instead. */
if (curchannel >= 4000000000 && curchannel <= 4000999999 &&
if (curchannel >= 4000000000UL && curchannel <= 4000999999UL &&
baninvflg >= 1 && baninvflg <= 2)
{
top_output(OUT_SCREEN, getlang("CantBanFromHere"));
......@@ -166,7 +166,7 @@ void mod_proc(void)
}
/* The user can't invite in normal channels or conferences. Again
the test uses hardcoded channel numbers. */
if ((curchannel <= 3999999999 || curchannel >= 4001000000) &&
if ((curchannel <= 3999999999UL || curchannel >= 4001000000UL) &&
baninvflg >= 3 && baninvflg <= 4)
{
top_output(OUT_SCREEN, getlang("CantInvFromHere"));
......
......@@ -540,7 +540,7 @@ typedef struct file_stats_str
//|#include "toppoker.h"
#ifndef __WIN32__
extern void main(XINT ac, char *av[]);
extern int main(XINT ac, char *av[]);
#else
extern int pascal WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow);
......@@ -772,7 +772,7 @@ extern XINT lowestnode;
extern lang_text_typ XFAR **langptrs;
extern XINT usedcmdlen;
extern XINT nodecfgfil;
extern long curchannel;
extern unsigned long curchannel;
extern unsigned char *wordret;
extern long numlang;
extern node_idx_typ *node;
......
......@@ -71,13 +71,13 @@ typedef struct
unsigned char *pluraltext;
} action_ptr_typ;
void main(XINT argc, char *argv[]);
int main(XINT argc, char *argv[]);
void actfile_compile(unsigned char *ifname, unsigned char *ofname);
unsigned char loadbuf[513];
unsigned char iname[256], oname[256];
void main(XINT argc, char *argv[])
int main(XINT argc, char *argv[])
{
printf("\nTOPACT - Action Compiler for TOP 2.00.\n\n");
......@@ -93,7 +93,7 @@ void main(XINT argc, char *argv[])
printf("be used. If <outfile> is not specified, the\n "
"base name of <infile> will be used with the extension of "
".TAC.\n");
exit(0);
return(0);
}
strcpy(iname, argv[1]);
......@@ -123,7 +123,7 @@ void main(XINT argc, char *argv[])
actfile_compile(iname, oname);
exit(0);
return(0);
}
......
......@@ -16,7 +16,7 @@
user_data_typ ubuf;
void main(XINT argc, char *argv[]);
int main(XINT argc, char *argv[]);
void showcmdline(XINT cmd);
void deleteuser(char *nam);
void packusers(void);
......@@ -24,7 +24,7 @@ void purgeusers(unsigned XINT sec, unsigned XINT days);
XINT calc_days_ago(XDATE *lastdate);
void setusersec(unsigned XINT sec, char *nam);
void main(XINT argc, char *argv[])
int main(XINT argc, char *argv[])
{
XINT d;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment