...
 
Commits (4)
......@@ -264,7 +264,8 @@ int sbbs_t::protocol(prot_t* prot, enum XFER_TYPE type
/****************************************************************************/
void sbbs_t::autohangup()
{
char a,c,k;
int a,c;
char k;
char tmp[512];
if(online!=ON_REMOTE)
......
......@@ -475,13 +475,14 @@ void sbbs_t::pause()
/****************************************************************************/
void sbbs_t::ungetkey(char ch, bool insert)
{
char dbg[2] = {};
#if 0 /* this way breaks ansi_getxy() */
RingBufWrite(&inbuf,(uchar*)&ch,sizeof(uchar));
#else
if(keybuf_space()) {
char* p = c_escape_char(ch);
if(p == NULL) {
char dbg[2] = { ch, 0 };
dbg[0] = ch;
p = dbg;
}
lprintf(LOG_DEBUG, "%s key into keybuf: %02X (%s)", insert ? "insert" : "append", ch, p);
......
......@@ -1673,8 +1673,12 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
timeout.tv_sec=0;
timeout.tv_usec=1000;
}
if(i && !(mode&EX_NOLOG))
lprintf(LOG_NOTICE,"%.*s",i,buf); /* lprintf mangles i? */
if(i > 0) {
buf[i] = '\0';
truncsp((char*)buf);
if(*buf)
lprintf(LOG_NOTICE, "%s", buf);
}
/* Eat stderr if mode is EX_BIN */
if(mode&EX_BIN) {
......@@ -1782,7 +1786,10 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
if((rd=read(err_pipe[0],bp,1))>0) {
i+=rd;
if(*bp=='\n') {
lprintf(LOG_NOTICE,"%.*s",i-1,buf);
buf[i] = '\0';
truncsp((char*)buf);
if(*buf)
lprintf(LOG_NOTICE, "%s", buf);
i=0;
bp=buf;
}
......@@ -1792,8 +1799,12 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
else
break;
}
if(i)
lprintf(LOG_NOTICE,"%.*s",i,buf);
if(i > 0) {
buf[i] = '\0';
truncsp((char*)buf);
if(*buf)
lprintf(LOG_NOTICE, "%s", buf);
}
}
}
if(!(mode&EX_OFFLINE)) { /* !off-line execution */
......
......@@ -326,7 +326,7 @@ int SMBCALL smb_freemsghdr(smb_t* smb, ulong offset, ulong length)
}
if(fseek(smb->sha_fp, sha_offset, SEEK_SET)) {
safe_snprintf(smb->last_error,sizeof(smb->last_error),"%s seeking to %ld", __FUNCTION__, sha_offset);
safe_snprintf(smb->last_error,sizeof(smb->last_error),"%s seeking to %ld", __FUNCTION__, (long)sha_offset);
return(SMB_ERR_SEEK);
}
for(l=0;l<blocks;l++)
......