Commit 338426cf authored by rswindell's avatar rswindell
Browse files

Eliminated sbbs_t::tmp (global "tmp" string variable).

Each function that requires a temp string variable, now has its own "tmp" local variable.
parent a1e83632
......@@ -41,6 +41,7 @@
bool sbbs_t::answer()
{
char str[256],str2[256],c;
char tmp[512];
int i,l,in;
struct tm * tm;
struct in_addr addr;
......
......@@ -42,11 +42,12 @@
/****************************************************************************/
void sbbs_t::batchmenu()
{
char str[129],tmp2[250],done=0,ch;
uint i,n,xfrprot,xfrdir;
ulong totalcdt,totalsize,totaltime;
time_t start,end;
file_t f;
char str[129],tmp2[250],done=0,ch;
char tmp[512];
uint i,n,xfrprot,xfrdir;
ulong totalcdt,totalsize,totaltime;
time_t start,end;
file_t f;
if(!batdn_total && !batup_total && cfg.upload_dir==INVALID_DIR) {
bputs(text[NoFilesInBatchQueue]);
......@@ -334,13 +335,14 @@ void sbbs_t::batchmenu()
/****************************************************************************/
void sbbs_t::start_batch_download()
{
char ch,str[256],tmp2[256],tmp3[128],fname[64];
int j;
uint i,xfrprot;
ulong totalcdt,totalsize,totaltime;
time_t start,end,t;
struct tm * tm;
file_t f;
char ch,str[256],tmp2[256],tmp3[128],fname[64];
char tmp[512];
int j;
uint i,xfrprot;
ulong totalcdt,totalsize,totaltime;
time_t start,end,t;
struct tm * tm;
file_t f;
if(useron.rest&FLAG('D')) { /* Download restriction */
bputs(text[R_Download]);
......@@ -561,6 +563,7 @@ bool sbbs_t::create_batchup_lst()
bool sbbs_t::create_bimodem_pth()
{
char str[256],tmp2[512];
char tmp[512];
int file;
uint i;
......@@ -597,6 +600,7 @@ bool sbbs_t::create_bimodem_pth()
void sbbs_t::batch_upload()
{
char str1[256],str2[256];
char tmp[512];
uint i,j,x,y;
file_t f;
DIR* dir;
......@@ -760,9 +764,10 @@ void sbbs_t::batch_add_list(char *list)
/**************************************************************************/
bool sbbs_t::addtobatdl(file_t* f)
{
char str[256],tmp2[256];
uint i;
ulong totalcdt, totalsize, totaltime;
char str[256],tmp2[256];
char tmp[512];
uint i;
ulong totalcdt, totalsize, totaltime;
if(useron.rest&FLAG('D')) {
bputs(text[R_Download]);
......
......@@ -42,6 +42,7 @@ void sbbs_t::bulkmail(uchar *ar)
{
char str[256],str2[256],msgpath[256],title[LEN_TITLE+1]
,buf[SDT_BLOCK_LEN],found=0;
char tmp[512];
ushort xlat=XLAT_NONE,msgattr=0;
int i,j,x,file;
long msgs=0;
......@@ -191,9 +192,10 @@ void sbbs_t::bulkmail(uchar *ar)
int sbbs_t::bulkmailhdr(uint usernum, smbmsg_t *msg, ushort msgattr, ulong offset
, ulong length, char *title)
{
char str[256];
int i,j;
node_t node;
char str[256];
char tmp[512];
int i,j;
node_t node;
memset(msg,0,sizeof(smbmsg_t));
memcpy(msg->hdr.id,"SHD\x1a",4);
......
......@@ -53,6 +53,7 @@ void sbbs_t::chatsection()
,usrs,preusrs,qusrs,*gurubuf=NULL,channel,savch,*p
,pgraph[400],buf[400]
,usr[MAX_NODES],preusr[MAX_NODES],qusr[MAX_NODES];
char tmp[512];
int file;
long i,j,k,n;
node_t node;
......@@ -662,7 +663,7 @@ void sbbs_t::privchat(bool local)
"\1rSplit-Screen \1cSysop\1r Chat \1y"
"Time Left: \1g%-8s\1w"
" [\1i\1b%c\1n\1h]";
char tmp[512];
uchar ch;
int in,out,i,n,echo=1,x,y,activity,remote_activity;
int local_y,remote_y;
......@@ -1052,6 +1053,7 @@ void sbbs_t::privchat(bool local)
int sbbs_t::getnodetopage(int all, int telegram)
{
char str[128];
char tmp[512];
uint i,j;
ulong l;
node_t node;
......@@ -1153,6 +1155,7 @@ int sbbs_t::getnodetopage(int all, int telegram)
void sbbs_t::nodemsg()
{
char str[256],line[256],buf[512],logbuf[512],ch;
char tmp[512];
int i,usernumber,done=0;
node_t node,savenode;
......@@ -1323,6 +1326,7 @@ void sbbs_t::guruchat(char *line, char *gurubuf, int gurunum)
{
char str[256],cstr[256],*ptr,*answer[100],answers,theanswer[769]
,mistakes=1,hu=0;
char tmp[512];
int file;
uint c,i,j,k;
long len;
......
......@@ -173,6 +173,7 @@ uint sbbs_t::gettotalfiles(uint dirnum)
void sbbs_t::gettimeleft(void)
{
char str[128];
char tmp[512];
int i;
time_t eventtime=0;
time_t thisevent;
......
......@@ -43,11 +43,12 @@
/****************************************************************************/
void sbbs_t::downloadfile(file_t* f)
{
char str[256],fname[13];
int i,file;
long length,mod;
ulong l;
user_t uploader;
char str[256],fname[13];
char tmp[512];
int i,file;
long length,mod;
ulong l;
user_t uploader;
getfiledat(&cfg,f); /* Get current data - right after download */
if((length=f->size)<0L)
......@@ -144,7 +145,8 @@ void sbbs_t::downloadfile(file_t* f)
/****************************************************************************/
void sbbs_t::notdownloaded(ulong size, time_t start, time_t end)
{
char str[256],tmp2[256];
char str[256],tmp2[256];
char tmp[512];
sprintf(str,"Estimated Time: %s Transfer Time: %s"
,sectostr(cur_cps ? size/cur_cps : 0,tmp)
......@@ -213,7 +215,8 @@ int sbbs_t::protocol(char *cmdline, int cd)
/****************************************************************************/
void sbbs_t::autohangup()
{
char a,c,k;
char a,c,k;
char tmp[512];
if(online!=ON_REMOTE)
return;
......@@ -255,9 +258,10 @@ void sbbs_t::autohangup()
/****************************************************************************/
bool sbbs_t::checkprotlog(file_t* f)
{
char str[256],size[128];
int file;
FILE *stream;
char str[256],size[128];
char tmp[512];
int file;
FILE * stream;
sprintf(str,"%sPROTOCOL.LOG",cfg.node_dir);
if((stream=fnopen(&file,str,O_RDONLY))==NULL) {
......
......@@ -47,6 +47,7 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
{
char str[256],str2[256],msgpath[256],title[LEN_TITLE+1],ch
,buf[SDT_BLOCK_LEN];
char tmp[512];
ushort xlat=XLAT_NONE,msgattr=0;
int i,j,x,file;
long l;
......
......@@ -788,6 +788,7 @@ void sbbs_t::skipto(csi_t *csi, uchar inst)
int sbbs_t::exec(csi_t *csi)
{
char str[256],*path;
char tmp[512];
uchar buf[1025],ch;
int i,j,file;
long l;
......
......@@ -44,6 +44,7 @@ extern RingBuf* node_inbuf[];
int sbbs_t::exec_function(csi_t *csi)
{
char str[256],tmp2[128],ch;
char tmp[512];
uchar* p;
char ansi_seq[32];
int ansi_len;
......
......@@ -97,10 +97,11 @@ bool sbbs_t::lookup_netuser(char *into)
/****************************************************************************/
bool sbbs_t::netmail(char *into, char *title, long mode)
{
char str[256],subj[128],to[256],fname[128],*buf,*p,ch;
int file,fido,x,cc_found,cc_sent;
uint i;
long length,l;
char str[256],subj[128],to[256],fname[128],*buf,*p,ch;
char tmp[512];
int file,fido,x,cc_found,cc_sent;
uint i;
long length,l;
faddr_t addr;
fmsghdr_t hdr;
struct tm * tm;
......@@ -391,7 +392,8 @@ bool sbbs_t::netmail(char *into, char *title, long mode)
void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
{
char HUGE16 *qwkbuf,to[129],name[129],sender[129],senderaddr[129]
,str[256],*p,*cp,*addr,fulladdr[129],ch;
,str[256],*p,*cp,*addr,fulladdr[129],ch;
char tmp[512];
int i,fido,inet=0,qnet=0;
ushort net,xlat;
long l,offset,length,m,n;
......
......@@ -73,8 +73,9 @@ void sbbs_t::getextdesc(uint dirnum, ulong datoffset, char *ext)
/****************************************************************************/
void sbbs_t::fileinfo(file_t* f)
{
char fname[13],ext[513];
uint i,j;
char fname[13],ext[513];
char tmp[512];
uint i,j;
for(i=0;i<usrlibs;i++)
if(usrlib[i]==cfg.dir[f->dir]->lib)
......
......@@ -330,8 +330,9 @@ int sbbs_t::whos_online(bool listself)
/****************************************************************************/
void sbbs_t::printnodedat(uint number, node_t* node)
{
uint i;
char hour,mer[3];
uint i;
char hour,mer[3];
char tmp[512];
attr(cfg.color[clr_nodenum]);
bprintf("%3d ",number);
......
......@@ -48,6 +48,7 @@
char sbbs_t::inkey(long mode)
{
char str[512];
char tmp[512];
uchar ch=0;
uint i,j;
......
......@@ -51,6 +51,7 @@ int extdesclines(char *str);
int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode)
{
char str[256],hdr[256],c,d,letter='A',*p,*datbuf,ext[513];
char tmp[512];
uchar* ixbbuf;
uchar flagprompt=0;
uint i,j;
......@@ -370,10 +371,11 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode)
bool sbbs_t::listfile(char *fname, char HUGE16 *buf, uint dirnum
, char *search, char letter, ulong datoffset)
{
char str[256],ext[513]="",*ptr,*cr,*lf,exist=1;
uchar alt;
int i,j;
ulong cdt;
char str[256],ext[513]="",*ptr,*cr,*lf,exist=1;
char tmp[512];
uchar alt;
int i,j;
ulong cdt;
if(buf[F_MISC]!=ETX && (buf[F_MISC]-SP)&FM_EXTDESC && useron.misc&EXTDESC) {
getextdesc(dirnum,datoffset,ext);
......@@ -483,9 +485,10 @@ void sbbs_t::clearline(void)
/****************************************************************************/
bool sbbs_t::removefcdt(file_t* f)
{
char str[128];
int u;
long cdt;
char str[128];
char tmp[512];
int u;
long cdt;
if((u=matchuser(&cfg,f->uler))==0) {
bputs(text[UnknownUser]);
......@@ -561,9 +564,10 @@ bool sbbs_t::movefile(file_t* f, int newdir)
int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total
,long totalfiles)
{
char ch,c,d,str[256],fname[128],*p,remcdt,remfile;
uint i,j,ml,md,udir,ulib;
file_t f;
char ch,c,d,str[256],fname[128],*p,remcdt,remfile;
char tmp[512];
uint i,j,ml,md,udir,ulib;
file_t f;
for(ulib=0;ulib<usrlibs;ulib++)
if(usrlib[ulib]==cfg.dir[dirnum]->lib)
......@@ -817,7 +821,8 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total
int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
{
char str[258],path[258],dirpath[256],done=0,ch,fname[13],ext[513];
uchar HUGE16 *ixbbuf,*usrxfrbuf=NULL,*p;
char tmp[512];
uchar *ixbbuf,*usrxfrbuf=NULL,*p;
int file;
int found=0;
uint i,j;
......@@ -1271,9 +1276,11 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
/****************************************************************************/
void sbbs_t::listfiletofile(char *fname, char HUGE16 *buf, uint dirnum, int file)
{
char str[256],exist=1;
uchar alt;
ulong cdt;
char str[256];
char tmp[512];
uchar alt;
ulong cdt;
bool exist=true;
strcpy(str,fname);
if(buf[F_MISC]!=ETX && (buf[F_MISC]-SP)&FM_EXTDESC)
......@@ -1286,7 +1293,7 @@ void sbbs_t::listfiletofile(char *fname, char HUGE16 *buf, uint dirnum, int file
sprintf(str,"%s%s",alt>0 && alt<=cfg.altpaths ? cfg.altpath[alt-1]
: cfg.dir[dirnum]->path,unpadfname(fname,tmp));
if(cfg.dir[dirnum]->misc&DIR_FCHK && !fexist(str))
exist=0;
exist=false;
getrec((char *)buf,F_CDT,LEN_FCDT,str);
cdt=atol(str);
if(!cdt)
......
......@@ -40,7 +40,8 @@
int sbbs_t::login(char *str, char *pw)
{
long useron_misc=useron.misc;
char tmp[512];
long useron_misc=useron.misc;
useron.number=0;
if(cfg.node_dollars_per_call && noyes(text[AreYouSureQ]))
......
......@@ -47,6 +47,7 @@ extern "C" void client_on(SOCKET sock, client_t* client);
bool sbbs_t::logon()
{
char str[256],c;
char tmp[512];
int file;
uint i,j,mailw;
ulong totallogons;
......
......@@ -44,6 +44,7 @@
void sbbs_t::logout()
{
char str[256];
char tmp[512];
int i,j;
ushort ttoday;
node_t node;
......
......@@ -48,6 +48,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
, int conf)
{
char str[512],from[512],to[512],ch,tear=0,tearwatch=0,HUGE16 *buf,*p;
char tmp[512];
long l,size=0,offset;
int i;
struct tm tm;
......
......@@ -44,6 +44,7 @@ bool sbbs_t::inetmail(char *into, char *subj, long mode)
{
char str[256],str2[256],msgpath[256],title[256],name[256],ch
,buf[SDT_BLOCK_LEN],*p,addr[256],*uname_p;
char tmp[512];
char your_addr[128];
ushort xlat=XLAT_NONE,net=NET_INTERNET;
int i,j,x,file;
......@@ -289,6 +290,7 @@ bool sbbs_t::qnetmail(char *into, char *subj, long mode)
{
char str[256],msgpath[128],title[128],to[128],fulladdr[128]
,buf[SDT_BLOCK_LEN],*addr;
char tmp[512];
ushort xlat=XLAT_NONE,net=NET_QWK,touser;
int i,j,x,file;
ulong length,offset;
......
......@@ -45,10 +45,12 @@
/****************************************************************************/
void sbbs_t::newuser()
{
char c,str[512],usa;
char c,str[512];
char tmp[512];
int file;
uint i,j;
long misc;
bool usa;
FILE *stream;
if(cur_rate<cfg.node_minbps) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment