From 949b7fac7b210ee33be019fda9c2f029a2a44fbc Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sun, 30 May 2004 06:47:55 +0000 Subject: [PATCH] Kill the SP macro in preperation for supporting XCurses --- src/sbbs3/addfiles.c | 36 +++--- src/sbbs3/ars.c | 4 +- src/sbbs3/atcodes.cpp | 14 +-- src/sbbs3/baja.c | 250 ++++++++++++++++++++-------------------- src/sbbs3/bat_xfer.cpp | 2 +- src/sbbs3/chat.cpp | 48 ++++---- src/sbbs3/chksmb.c | 4 +- src/sbbs3/con_hi.cpp | 2 +- src/sbbs3/con_out.cpp | 12 +- src/sbbs3/exec.cpp | 2 +- src/sbbs3/execfile.cpp | 22 ++-- src/sbbs3/execmsg.cpp | 22 ++-- src/sbbs3/fido.cpp | 22 ++-- src/sbbs3/file.cpp | 2 +- src/sbbs3/filedat.c | 8 +- src/sbbs3/filelist.c | 12 +- src/sbbs3/ftpsrvr.c | 2 +- src/sbbs3/getkey.cpp | 8 +- src/sbbs3/getmail.c | 2 +- src/sbbs3/getstr.cpp | 60 +++++----- src/sbbs3/js_system.c | 2 +- src/sbbs3/listfile.cpp | 26 ++--- src/sbbs3/logfile.cpp | 4 +- src/sbbs3/login.cpp | 2 +- src/sbbs3/logon.cpp | 2 +- src/sbbs3/main.cpp | 2 +- src/sbbs3/msgtoqwk.cpp | 14 +-- src/sbbs3/newuser.cpp | 8 +- src/sbbs3/qwk.cpp | 12 +- src/sbbs3/qwktomsg.cpp | 16 +-- src/sbbs3/readmail.cpp | 12 +- src/sbbs3/readmsgs.cpp | 2 +- src/sbbs3/rechocfg.c | 92 +++++++-------- src/sbbs3/sbbsecho.c | 2 +- src/sbbs3/scansubs.cpp | 16 +-- src/sbbs3/scfglib1.c | 4 +- src/sbbs3/scfglib2.c | 2 +- src/sbbs3/sortdir.cpp | 2 +- src/sbbs3/str.cpp | 4 +- src/sbbs3/str_util.c | 10 +- src/sbbs3/text_sec.cpp | 2 +- src/sbbs3/tmp_xfer.cpp | 2 +- src/sbbs3/uedit/uedit.c | 3 +- src/sbbs3/upload.cpp | 2 +- src/sbbs3/userdat.c | 8 +- src/sbbs3/useredit.cpp | 6 +- src/sbbs3/writemsg.cpp | 14 +-- src/sbbs3/xtrn.cpp | 4 +- src/sbbs3/xtrn_sec.cpp | 14 +-- 49 files changed, 411 insertions(+), 412 deletions(-) diff --git a/src/sbbs3/addfiles.c b/src/sbbs3/addfiles.c index d933004f3d..c0f6bb211d 100644 --- a/src/sbbs3/addfiles.c +++ b/src/sbbs3/addfiles.c @@ -86,16 +86,16 @@ void prep_desc(uchar *str) int i,j; for(i=j=0;str[i] && j < sizeof(tmp)-1;i++) { - if(j && str[i]==SP && tmp[j-1]==SP && (mode&KEEP_SPACE)) + if(j && str[i]==' ' && tmp[j-1]==' ' && (mode&KEEP_SPACE)) tmp[j++]=str[i]; - else if(j && str[i]<=SP && tmp[j-1]==SP) + else if(j && str[i]<=' ' && tmp[j-1]==' ') continue; else if(i && !isalnum(str[i]) && str[i]==str[i-1]) continue; - else if(str[i]>=SP) + else if(str[i]>=' ') tmp[j++]=str[i]; else if(str[i]==TAB || (str[i]==CR && str[i+1]==LF)) - tmp[j++]=SP; + tmp[j++]=' '; } tmp[j]=0; strcpy(str,tmp); @@ -277,7 +277,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) memset(ext,0,513); read(file,ext,512); for(i=512;i;i--) - if(ext[i-1]>SP) + if(ext[i-1]>' ') break; ext[i]=0; if(mode&ASCII_ONLY) @@ -289,7 +289,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) if(isalpha(tmpext[i])) break; sprintf(f.desc,"%.*s",LEN_FDESC,tmpext+i); - for(i=0;f.desc[i]>=SP && i<LEN_FDESC;i++) + for(i=0;f.desc[i]>=' ' && i<LEN_FDESC;i++) ; f.desc[i]=0; } close(file); @@ -350,7 +350,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) nextline[0]=0; fgets(nextline,255,stream); truncsp(curline); - if(curline[0]<=SP || (mode&ASCII_ONLY && (uchar)curline[0]>=0x7e)) + if(curline[0]<=' ' || (mode&ASCII_ONLY && (uchar)curline[0]>=0x7e)) continue; printf("%s\n",curline); strcpy(fname,curline); @@ -358,7 +358,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) p=strchr(fname,'.'); if(!p || p==fname || p>fname+8) /* no dot or invalid dot location */ continue; - p=strchr(p,SP); + p=strchr(p,' '); if(p) *p=0; else /* no space after filename? */ continue; @@ -372,7 +372,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) continue; for(i=0;i<12;i++) - if(f.name[i]<SP || (mode&ASCII_ONLY && (uchar)f.name[i]>0x7e)) + if(f.name[i]<' ' || (mode&ASCII_ONLY && (uchar)f.name[i]>0x7e)) break; if(i<12) /* Ctrl chars or EX-ASCII in filename? */ @@ -407,20 +407,20 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) if(dskip && strlen(curline)>=dskip) p=curline+dskip; else { p++; - while(*p==SP) p++; + while(*p==' ') p++; } SAFECOPY(tmp,p); prep_desc(tmp); sprintf(f.desc+strlen(f.desc),"%.*s",(int)(LEN_FDESC-strlen(f.desc)),tmp); - if(nextline[0]==SP || strlen(p)>LEN_FDESC) { /* ext desc */ + if(nextline[0]==' ' || strlen(p)>LEN_FDESC) { /* ext desc */ if(!(mode&NO_EXTEND)) { memset(ext,0,513); f.misc|=FM_EXTDESC; sprintf(ext,"%s\r\n",p); } - if(nextline[0]==SP) { + if(nextline[0]==' ') { strcpy(str,nextline); /* tack on to end of desc */ p=str+dskip; while(*p && *p<=' ') p++; @@ -436,14 +436,14 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) } while(!feof(stream) && !ferror(stream) && strlen(ext)<512) { - if(nextline[0]!=SP) + if(nextline[0]!=' ') break; truncsp(nextline); printf("%s\n",nextline); if(!(mode&NO_EXTEND)) { f.misc|=FM_EXTDESC; p=nextline+dskip; - while(*p==SP) p++; + while(*p==' ') p++; strcat(ext,p); strcat(ext,"\r\n"); } @@ -480,7 +480,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) memset(ext,0,513); read(file,ext,512); for(i=512;i;i--) - if(ext[i-1]>SP) + if(ext[i-1]>' ') break; ext[i]=0; if(mode&ASCII_ONLY) @@ -492,7 +492,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) if(isalpha(tmpext[i])) break; sprintf(f.desc,"%.*s",LEN_FDESC,tmpext+i); - for(i=0;f.desc[i]>=SP && i<LEN_FDESC;i++) + for(i=0;f.desc[i]>=' ' && i<LEN_FDESC;i++) ; f.desc[i]=0; } @@ -597,7 +597,7 @@ void synclist(char *inpath, int dirnum) if(!fgets(str,1000,stream)) break; truncsp(str); - p=strchr(str,SP); + p=strchr(str,' '); if(p) *p=0; if(!stricmp(str,fname)) found=1; @@ -891,7 +891,7 @@ int main(int argc, char **argv) read(file,ext,512); if(!(mode&KEEP_DESC)) { sprintf(f.desc,"%.*s",LEN_FDESC,ext); - for(i=0;f.desc[i]>=SP && i<LEN_FDESC;i++) + for(i=0;f.desc[i]>=' ' && i<LEN_FDESC;i++) ; f.desc[i]=0; } diff --git a/src/sbbs3/ars.c b/src/sbbs3/ars.c index 003a1e0d78..c49f3eec0c 100644 --- a/src/sbbs3/ars.c +++ b/src/sbbs3/ars.c @@ -51,7 +51,7 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg) uint i,j,n,artype=AR_LEVEL,not=0,equal=0; for(i=j=0;str[i];i++) { - if(str[i]==SP) + if(str[i]==' ') continue; if(str[i]=='(') { @@ -479,7 +479,7 @@ uchar* arstr(ushort* count, char* str, scfg_t* cfg) if(artype==AR_SUBCODE || artype==AR_DIRCODE || artype==AR_SHELL) { for(n=0;n<8 && str[i] - && str[i]!=SP + && str[i]!=' ' && str[i]!='(' && str[i]!=')' && str[i]!='=' diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index 6a90afedfe..70764e671a 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -59,7 +59,7 @@ int sbbs_t::show_atcode(char *instr) tp=strchr(str+1,'@'); if(!tp) /* no terminating @ */ return(0); - sp=strchr(str+1,SP); + sp=strchr(str+1,' '); if(sp && sp<tp) /* space before terminating @ */ return(0); len=(tp-str)+1; @@ -325,7 +325,7 @@ char* sbbs_t::atcode(char* sp, char* str) if(!strcmp(sp,"FIRST")) { strcpy(str,useron.alias); - tp=strchr(str,SP); + tp=strchr(str,' '); if(tp) *tp=0; return(str); } @@ -359,7 +359,7 @@ char* sbbs_t::atcode(char* sp, char* str) char* p=strchr(useron.location,','); if(p) { p++; - if(*p==SP) + if(*p==' ') p++; return(p); } @@ -809,7 +809,7 @@ char* sbbs_t::atcode(char* sp, char* str) } if(!strcmp(sp,"LAST")) { - tp=strrchr(useron.alias,SP); + tp=strrchr(useron.alias,' '); if(tp) tp++; else tp=useron.alias; return(tp); @@ -817,20 +817,20 @@ char* sbbs_t::atcode(char* sp, char* str) if(!strcmp(sp,"REAL")) { strcpy(str,useron.name); - tp=strchr(str,SP); + tp=strchr(str,' '); if(tp) *tp=0; return(str); } if(!strcmp(sp,"FIRSTREAL")) { strcpy(str,useron.name); - tp=strchr(str,SP); + tp=strchr(str,' '); if(tp) *tp=0; return(str); } if(!strcmp(sp,"LASTREAL")) { - tp=strrchr(useron.name,SP); + tp=strrchr(useron.name,' '); if(tp) tp++; else tp=useron.name; return(tp); diff --git a/src/sbbs3/baja.c b/src/sbbs3/baja.c index 19d6a2b8ad..8b5d3bd262 100644 --- a/src/sbbs3/baja.c +++ b/src/sbbs3/baja.c @@ -116,7 +116,7 @@ void truncsp(char *str) int c; c=strlen(str); - while(c && str[c-1]<=SP) c--; + while(c && str[c-1]<=' ') c--; str[c]=0; } @@ -220,7 +220,7 @@ long val(char *src, char *p) p++; l<<=val(src,p); } break; - case SP: + case ' ': case '#': inside=0; return(l); } @@ -313,7 +313,7 @@ void cvttab(char *str) for(i=0;str[i];i++) if(str[i]==TAB) - str[i]=SP; + str[i]=' '; } void newvar(uchar *in) @@ -347,7 +347,7 @@ void writecrc(uchar *src, uchar *in) /* Automatically terminate variable name Oct-09-2000 rswindell */ sprintf(name,"%.80s",in); - p=strchr(name,SP); + p=strchr(name,' '); if(p) *p=0; if(!case_sens) @@ -378,7 +378,7 @@ long isvar(uchar *arg) return(0); sprintf(name,"%.80s",arg); - if((p=strchr(name,SP))!=NULL) // Truncate at first space + if((p=strchr(name,' '))!=NULL) // Truncate at first space *p=0; if(!case_sens) strupr(name); @@ -406,7 +406,7 @@ void expdefs(uchar *line) str[0]=0; for(p=line;*p;p++) { - if(*p==SP) { + if(*p==' ') { strcat(str," "); continue; } @@ -474,7 +474,7 @@ void compile(char *src) line++; strcpy(save,str); p=str; - while(*p && *p<=SP) /* look for beginning of command */ + while(*p && *p<=' ') /* look for beginning of command */ p++; if((*p)==0) continue; @@ -483,28 +483,28 @@ void compile(char *src) expdefs(p); /* expand defines */ if(display) printf("%s\n",p); - sp=strchr(p,SP); + sp=strchr(p,' '); arg=arg2=arg3=arg4=""; if(sp) { *sp=0; arg=sp+1; - while(*arg && *arg<=SP) arg++; - sp=strchr(arg,SP); + while(*arg && *arg<=' ') arg++; + sp=strchr(arg,' '); if(sp) { arg2=sp+1; - while(*arg2 && *arg2<=SP) arg2++; - sp=strchr(arg2,SP); + while(*arg2 && *arg2<=' ') arg2++; + sp=strchr(arg2,' '); if(sp) { arg3=sp+1; - while(*arg3 && *arg3<=SP) arg3++; - sp=strchr(arg3,SP); + while(*arg3 && *arg3<=' ') arg3++; + sp=strchr(arg3,' '); if(sp) { arg4=sp+1; - while(*arg4 && *arg4<=SP) arg4++; } } } } + while(*arg4 && *arg4<=' ') arg4++; } } } } if(!stricmp(p,"!INCLUDE")) { savline=line; - sp=strchr(arg,SP); + sp=strchr(arg,' '); if(sp) *sp=0; sprintf(path,"%s%s",include_dir,arg); compile(path); @@ -513,7 +513,7 @@ void compile(char *src) } if(!stricmp(p,"!DEFINE")) { /* define */ - sp=strchr(arg,SP); + sp=strchr(arg,' '); if(sp) *sp=0; else @@ -547,13 +547,13 @@ void compile(char *src) if(!stricmp(p,"!GLOBAL")) { /* declare global variables */ if(!(*arg)) break; for(p=arg;*p && *p!='#';) { - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; newvar(p); if(!sp) break; p=sp+1; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; } continue; } @@ -561,7 +561,7 @@ void compile(char *src) if(!(*arg)) break; p=arg; while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; tmp[0]=*p++; tmp[1]=*p++; tmp[2]=0; @@ -711,7 +711,7 @@ void compile(char *src) continue; } if(p[0]==':') { /* :label */ p++; - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; for(i=0;i<labels;i++) @@ -738,7 +738,7 @@ void compile(char *src) continue; } if(!stricmp(p,"GOTO")) { /* goto */ if(!(*arg)) break; - sp=strchr(arg,SP); + sp=strchr(arg,' '); if(sp) *sp=0; if((goto_label=(char **)REALLOC(goto_label,sizeof(char *)*(gotos+1))) @@ -772,7 +772,7 @@ void compile(char *src) continue; } if(!stricmp(p,"CALL")) { /* call */ if(!(*arg)) break; - sp=strchr(arg,SP); + sp=strchr(arg,' '); if(sp) *sp=0; if((call_label=(char **)REALLOC(call_label,sizeof(char *)*(calls+1))) @@ -850,7 +850,7 @@ void compile(char *src) if(!stricmp(p,"DEFINE_STR_VAR") || !stricmp(p,"STR")) { if(!(*arg)) break; for(p=arg;*p && *p!='#';) { - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; fputc(CS_VAR_INSTRUCTION,out); fputc(DEFINE_STR_VAR,out); @@ -859,13 +859,13 @@ void compile(char *src) if(!sp) break; p=sp+1; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; } continue; } if(!stricmp(p,"DEFINE_INT_VAR") || !stricmp(p,"INT")) { if(!(*arg)) break; for(p=arg;*p && *p!='#';) { - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; fputc(CS_VAR_INSTRUCTION,out); fputc(DEFINE_INT_VAR,out); @@ -874,13 +874,13 @@ void compile(char *src) if(!sp) break; p=sp+1; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; } continue; } if(!stricmp(p,"DEFINE_GLOBAL_STR_VAR") || !stricmp(p,"GLOBAL_STR")) { if(!(*arg)) break; for(p=arg;*p && *p!='#';) { - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; fputc(CS_VAR_INSTRUCTION,out); fputc(DEFINE_GLOBAL_STR_VAR,out); @@ -889,13 +889,13 @@ void compile(char *src) if(!sp) break; p=sp+1; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; } continue; } if(!stricmp(p,"DEFINE_GLOBAL_INT_VAR") || !stricmp(p,"GLOBAL_INT")) { if(!(*arg)) break; for(p=arg;*p && *p!='#';) { - sp=strchr(p,SP); + sp=strchr(p,' '); if(sp) *sp=0; fputc(CS_VAR_INSTRUCTION,out); fputc(DEFINE_GLOBAL_INT_VAR,out); @@ -904,7 +904,7 @@ void compile(char *src) if(!sp) break; p=sp+1; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; } continue; } @@ -927,7 +927,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SET_STR_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -938,7 +938,7 @@ void compile(char *src) || (!stricmp(p,"STRCAT") && strchr(arg,'"'))) { fputc(CS_VAR_INSTRUCTION,out); fputc(CAT_STR_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -949,7 +949,7 @@ void compile(char *src) && strchr(arg,'"')) { fputc(CS_VAR_INSTRUCTION,out); fputc(STRSTR_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -960,7 +960,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(STRSTR_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -990,7 +990,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(CAT_STR_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1001,27 +1001,27 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(FORMAT_STR_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* Write destination variable */ p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; arg=p; p=strrchr(arg,'"'); if(!p) break; *p=0; p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecstr(arg); /* Write string */ l=ftell(out); fputc(0,out); /* Write total number of args */ i=0; while(p && *p) { arg=p; - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) { *p=0; p++; } @@ -1036,13 +1036,13 @@ void compile(char *src) if(!(*arg) || !(*arg2) || !(*arg3)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(FORMAT_TIME_STR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* Write destination variable */ p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; arg=p; p=strrchr(arg,'"'); if(!p) @@ -1050,7 +1050,7 @@ void compile(char *src) *p=0; writecstr(arg); /* Write string */ p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecrc(src,p); continue; } @@ -1058,7 +1058,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(TIME_STR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1070,7 +1070,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(DATE_STR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1082,7 +1082,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SECOND_STR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1096,7 +1096,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SET_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1110,7 +1110,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(COMPARE_STR_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1132,12 +1132,12 @@ void compile(char *src) fputc(CS_VAR_INSTRUCTION,out); fputc(STRNCMP_VAR,out); fwrite(&i,1,1,out); /* Length */ - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(!p) break; *p=0; p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecrc(src,arg2); writecstr(p); continue; } @@ -1158,12 +1158,12 @@ void compile(char *src) fputc(STRNCMP_VARS,out); fwrite(&i,1,1,out); /* Length */ - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(!p) break; *p=0; p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecrc(src,arg2); writecrc(src,p); continue; } @@ -1175,7 +1175,7 @@ void compile(char *src) fputc(CS_VAR_INSTRUCTION,out); fputc(COMPARE_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1188,7 +1188,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(COMPARE_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1199,7 +1199,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(COPY_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1210,7 +1210,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SWAP_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1229,7 +1229,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(DATE_STR_TO_INT,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1241,7 +1241,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(CRC16_TO_INT,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1253,7 +1253,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(CRC32_TO_INT,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1265,7 +1265,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(CHKSUM_TO_INT,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1279,7 +1279,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(ADD_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1293,7 +1293,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(ADD_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1307,7 +1307,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SUB_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1321,7 +1321,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(SUB_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1335,7 +1335,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(MUL_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1349,7 +1349,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(MUL_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1363,7 +1363,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(DIV_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1377,7 +1377,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(DIV_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1391,7 +1391,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(MOD_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1405,7 +1405,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(MOD_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1419,7 +1419,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(AND_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1431,7 +1431,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(AND_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1463,7 +1463,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(OR_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1475,7 +1475,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(OR_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1489,7 +1489,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(NOT_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1501,7 +1501,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(NOT_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1515,7 +1515,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(XOR_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1527,7 +1527,7 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(XOR_INT_VARS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1547,7 +1547,7 @@ void compile(char *src) l=val(src,arg2); fputc(CS_VAR_INSTRUCTION,out); fputc(RANDOM_INT_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1577,7 +1577,7 @@ void compile(char *src) continue; } if(!stricmp(p,"PRINT") && !strchr(arg,'"') && !strchr(arg,'\\') - && !strchr(arg,SP)) { + && !strchr(arg,' ')) { if(!(*arg)) break; fputc(CS_VAR_INSTRUCTION,out); fputc(PRINT_VAR,out); @@ -1596,14 +1596,14 @@ void compile(char *src) break; *p=0; p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecstr(arg); /* Write string */ l=ftell(out); fputc(0,out); /* Write total number of args */ i=0; while(p && *p) { arg=p; - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) { *p=0; p++; } @@ -1630,18 +1630,18 @@ void compile(char *src) fputc(FIO_OPEN,out); else fputc(FIO_OPEN_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(!p) break; *p=0; p++; fwrite(&i,2,1,out); - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(*p=='"') writestr(p); else @@ -1667,12 +1667,12 @@ void compile(char *src) fputc(FIO_READ,out); else fputc(FIO_READ_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* File handle */ - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(p) *p=0; writecrc(src,arg2); /* Variable */ @@ -1692,12 +1692,12 @@ void compile(char *src) fputc(FIO_WRITE,out); else fputc(FIO_WRITE_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* File handle */ - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(p) *p=0; writecrc(src,arg2); /* Variable */ @@ -1716,7 +1716,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_GET_LENGTH,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1727,7 +1727,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_READ_LINE,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1744,7 +1744,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_GET_POS,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1758,12 +1758,12 @@ void compile(char *src) fputc(FIO_SEEK,out); else fputc(FIO_SEEK_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* File handle */ - p=strchr(arg2,SP); + p=strchr(arg2,' '); if(p) *p=0; if(atol(arg2) || isdigit(*arg2)) { @@ -1774,7 +1774,7 @@ void compile(char *src) i=0; if(p) { p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; i=atoi(p); if(!stricmp(p,"CUR")) i=SEEK_CUR; @@ -1789,7 +1789,7 @@ void compile(char *src) fputc(FIO_LOCK,out); else fputc(FIO_LOCK_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1809,7 +1809,7 @@ void compile(char *src) fputc(FIO_UNLOCK,out); else fputc(FIO_UNLOCK_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1829,7 +1829,7 @@ void compile(char *src) fputc(FIO_SET_LENGTH,out); else fputc(FIO_SET_LENGTH_VAR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1844,27 +1844,27 @@ void compile(char *src) if(!(*arg)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_PRINTF,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; writecrc(src,arg); /* Write destination variable */ p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; arg=p; p=strrchr(arg,'"'); if(!p) break; *p=0; p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; writecstr(arg); /* Write string */ l=ftell(out); fputc(0,out); /* Write total number of args */ i=0; while(p && *p) { arg=p; - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) { *p=0; p++; } @@ -1893,7 +1893,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_GET_TIME,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1904,7 +1904,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(FIO_SET_TIME,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1921,7 +1921,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(RENAME_FILE,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1932,7 +1932,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(COPY_FILE,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1943,7 +1943,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(MOVE_FILE,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1954,7 +1954,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(GET_FILE_ATTRIB,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1965,7 +1965,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(SET_FILE_ATTRIB,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -1994,7 +1994,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(OPEN_DIR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -2005,7 +2005,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fputc(CS_FIO_FUNCTION,out); fputc(READ_DIR,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -2284,7 +2284,7 @@ void compile(char *src) i=val(src,arg2); fprintf(out,"%c%c",CS_VAR_INSTRUCTION,PRINTFILE_VAR_MODE); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); fwrite(&i,2,1,out); } @@ -2302,7 +2302,7 @@ void compile(char *src) j=val(src,arg3); fprintf(out,"%c%c",CS_VAR_INSTRUCTION,PRINTTAIL_VAR_MODE); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); i=val(src,arg2); @@ -2344,7 +2344,7 @@ void compile(char *src) } else { fprintf(out,"%c%c",CS_VAR_INSTRUCTION,TELNET_GATE_VAR); fwrite(&l,4,1,out); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); } @@ -2441,7 +2441,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fprintf(out,"%c%c",CS_VAR_INSTRUCTION,FLENGTH_TO_INT); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); writecrc(src,arg2); @@ -2450,7 +2450,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fprintf(out,"%c%c",CS_VAR_INSTRUCTION,FTIME_TO_INT); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); writecrc(src,arg2); @@ -2459,7 +2459,7 @@ void compile(char *src) if(!(*arg) || !(*arg2)) break; fprintf(out,"%c%c",CS_VAR_INSTRUCTION,CHARVAL_TO_INT); - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; writecrc(src,arg); writecrc(src,arg2); @@ -2525,7 +2525,7 @@ void compile(char *src) writecstr(arg); continue; } if(!stricmp(p,"GETSTR")) { - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if((!(*arg) || isdigit(*arg) || !stricmp(arg,"STR")) && !(*arg3)) fprintf(out,"%c%c",CS_GETSTR,atoi(arg) ? atoi(arg) @@ -2554,7 +2554,7 @@ void compile(char *src) continue; } if(!stricmp(p,"GETNUM")) { if(!(*arg)) break; - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if(isdigit(*arg)) { i=val(src,arg); @@ -2589,7 +2589,7 @@ void compile(char *src) fwrite(&i,2,1,out); continue; } if(!stricmp(p,"GETLINE")) { - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if(!(*arg) || isdigit(*arg)) fprintf(out,"%c%c",CS_GETLINE,*arg ? atoi(arg) :128); @@ -2609,7 +2609,7 @@ void compile(char *src) fwrite(&i,1,1,out); } continue; } if(!stricmp(p,"GETSTRUPR")) { - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if(!(*arg) || isdigit(*arg)) fprintf(out,"%c%c",CS_GETSTRUPR,*arg ? atoi(arg) :128); @@ -2629,7 +2629,7 @@ void compile(char *src) fwrite(&i,1,1,out); } continue; } if(!stricmp(p,"GETNAME")) { - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if(!(*arg) || isdigit(*arg)) fprintf(out,"%c%c",CS_GETNAME,*arg ? atoi(arg) :25); @@ -2650,7 +2650,7 @@ void compile(char *src) continue; } if(!stricmp(p,"SHIFT_STR")) { if(!(*arg)) break; - p=strchr(arg,SP); + p=strchr(arg,' '); if(p) *p=0; if(isdigit(*arg)) fprintf(out,"%c%c",CS_SHIFT_STR,atoi(arg)); @@ -2705,7 +2705,7 @@ void compile(char *src) if(!stricmp(p,"STRLEN")) { if(!(*arg)) break; fprintf(out,"%c%c",CS_VAR_INSTRUCTION,STRLEN_INT_VAR); - p=strchr(arg,SP); + p=strchr(arg,' '); if(!p) break; *p=0; @@ -2828,7 +2828,7 @@ void compile(char *src) if(!(*arg)) break; p=arg; fprintf(out,"%c%c",CS_TOGGLE_USER_FLAG,toupper(*p++)); - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; fprintf(out,"%c",toupper(*p)); continue; } diff --git a/src/sbbs3/bat_xfer.cpp b/src/sbbs3/bat_xfer.cpp index 415ce57044..13c2674f1a 100644 --- a/src/sbbs3/bat_xfer.cpp +++ b/src/sbbs3/bat_xfer.cpp @@ -71,7 +71,7 @@ void sbbs_t::batchmenu() ASYNC; bputs(text[BatchMenuPrompt]); ch=(char)getkeys("BCDLQRU?\r",0); - if(ch>SP) + if(ch>' ') logch(ch,0); switch(ch) { case '?': diff --git a/src/sbbs3/chat.cpp b/src/sbbs3/chat.cpp index 5d108a3d39..a11e9d5a79 100644 --- a/src/sbbs3/chat.cpp +++ b/src/sbbs3/chat.cpp @@ -570,7 +570,7 @@ void sbbs_t::chatsection() while(online) { no_rip_menu=0; ch=(char)getkeys("ACDJPQST?\r",0); - if(ch>SP) + if(ch>' ') logch(ch,0); switch(ch) { case 'S': @@ -883,9 +883,9 @@ void sbbs_t::privchat(bool local) GOTOXY(1,13); remote_y=1; bprintf(local ? local_sep : sep - ,thisnode.misc&NODE_MSGW ? 'T':SP + ,thisnode.misc&NODE_MSGW ? 'T':' ' ,sectostr(timeleft,tmp) - ,thisnode.misc&NODE_NMSG ? 'M':SP); + ,thisnode.misc&NODE_NMSG ? 'M':' '); CRLF; local_y=14; } @@ -909,13 +909,13 @@ void sbbs_t::privchat(bool local) localbuf[localline][localchar]=0; } } else if(ch==TAB) { if(echo) - outchar(SP); - localbuf[localline][localchar]=SP; + outchar(' '); + localbuf[localline][localchar]=' '; localchar++; while(localchar<78 && localchar%8) { if(echo) - outchar(SP); - localbuf[localline][localchar++]=SP; } } + outchar(' '); + localbuf[localline][localchar++]=' '; } } else if(ch==CTRL_R) { if(sys_status&SS_SPLITP) { CLS; @@ -931,9 +931,9 @@ void sbbs_t::privchat(bool local) ANSI_SAVE(); GOTOXY(1,13); bprintf(local ? local_sep : sep - ,thisnode.misc&NODE_MSGW ? 'T':SP + ,thisnode.misc&NODE_MSGW ? 'T':' ' ,sectostr(timeleft,tmp) - ,thisnode.misc&NODE_NMSG ? 'M':SP); + ,thisnode.misc&NODE_NMSG ? 'M':' '); CRLF; attr(cfg.color[clr_chatlocal]); localbuf[localline][localchar]=0; @@ -946,13 +946,13 @@ void sbbs_t::privchat(bool local) } continue; } - else if(ch>=SP || ch==CR) { + else if(ch>=' ' || ch==CR) { if(ch!=CR) { if(echo) outchar(ch); localbuf[localline][localchar]=ch; } - if(ch==CR || (localchar>68 && ch==SP) || ++localchar>78) { + if(ch==CR || (localchar>68 && ch==' ') || ++localchar>78) { localbuf[localline][localchar]=0; localchar=0; @@ -960,9 +960,9 @@ void sbbs_t::privchat(bool local) if(sys_status&SS_SPLITP && local_y==24) { GOTOXY(1,13); bprintf(local ? local_sep : sep - ,thisnode.misc&NODE_MSGW ? 'T':SP + ,thisnode.misc&NODE_MSGW ? 'T':' ' ,sectostr(timeleft,tmp) - ,thisnode.misc&NODE_NMSG ? 'M':SP); + ,thisnode.misc&NODE_NMSG ? 'M':' '); attr(cfg.color[clr_chatlocal]); for(x=13,y=0;x<rows;x++,y++) { rprintf("\x1b[%d;1H\x1b[K",x+1); @@ -1028,18 +1028,18 @@ void sbbs_t::privchat(bool local) remotechar--; remotebuf[remoteline][remotechar]=0; } } else if(ch==TAB) { - outchar(SP); - remotebuf[remoteline][remotechar]=SP; + outchar(' '); + remotebuf[remoteline][remotechar]=' '; remotechar++; while(remotechar<78 && remotechar%8) { - outchar(SP); - remotebuf[remoteline][remotechar++]=SP; } } - else if(ch>=SP || ch==CR) { + outchar(' '); + remotebuf[remoteline][remotechar++]=' '; } } + else if(ch>=' ' || ch==CR) { if(ch!=CR) { outchar(ch); remotebuf[remoteline][remotechar]=ch; } - if(ch==CR || (remotechar>68 && ch==SP) || ++remotechar>78) { + if(ch==CR || (remotechar>68 && ch==' ') || ++remotechar>78) { remotebuf[remoteline][remotechar]=0; remotechar=0; @@ -1047,9 +1047,9 @@ void sbbs_t::privchat(bool local) if(sys_status&SS_SPLITP && remote_y==12) { CRLF; bprintf(local ? local_sep : sep - ,thisnode.misc&NODE_MSGW ? 'T':SP + ,thisnode.misc&NODE_MSGW ? 'T':' ' ,sectostr(timeleft,tmp) - ,thisnode.misc&NODE_NMSG ? 'M':SP); + ,thisnode.misc&NODE_NMSG ? 'M':' '); attr(cfg.color[clr_chatremote]); for(i=0;i<12;i++) { bprintf("\x1b[%d;1H\x1b[K",i+1); @@ -1483,14 +1483,14 @@ void sbbs_t::guruchat(char* line, char* gurubuf, int gurunum, char* last_answer) /* multi-line answer */ if(*ptr=='\\' && (*(ptr+1)==CR || *(ptr+1)==LF)) { ptr++; /* skip \ */ - while(*ptr && *ptr<SP) ptr++; /* skip [CR]LF */ + while(*ptr && *ptr<' ') ptr++; /* skip [CR]LF */ answer[answers][i++]=CR; answer[answers][i++]=LF; } } answer[answers][i]=0; if(!strlen(answer[answers]) || answer[answers][0]=='(') { ptr-=strlen(answer[answers]); break; } - while(*ptr && *ptr<SP) ptr++; /* skip [CR]LF */ + while(*ptr && *ptr<' ') ptr++; /* skip [CR]LF */ answers++; } if(answers==100) while(*ptr && *ptr!='(' && ptr<gurubuf+len) @@ -1650,7 +1650,7 @@ void sbbs_t::guruchat(char* line, char* gurubuf, int gurunum, char* last_answer) mswait(25+sbbs_random(50)); else mswait(25+sbbs_random(150)); - if(theanswer[i]==SP) + if(theanswer[i]==' ') mswait(sbbs_random(50)); } } else { diff --git a/src/sbbs3/chksmb.c b/src/sbbs3/chksmb.c index 1e22004dbe..5537450d7c 100644 --- a/src/sbbs3/chksmb.c +++ b/src/sbbs3/chksmb.c @@ -94,7 +94,7 @@ void truncsp(char *str) uint c; c=strlen(str); - while(c && (uchar)str[c-1]<=SP) c--; + while(c && (uchar)str[c-1]<=' ') c--; if(str[c]!=0) str[c]=0; } @@ -107,7 +107,7 @@ char* DLLCALL strip_ctrl(char *str) for(i=j=0;str[i] && j<sizeof(tmp)-1;i++) { if(str[i]==CTRL_A && str[i+1]!=0) i++; - else if((uchar)str[i]>=SP) + else if((uchar)str[i]>=' ') tmp[j++]=str[i]; } if(i!=j) { diff --git a/src/sbbs3/con_hi.cpp b/src/sbbs3/con_hi.cpp index d34d5addba..a81bcc8938 100644 --- a/src/sbbs3/con_hi.cpp +++ b/src/sbbs3/con_hi.cpp @@ -58,7 +58,7 @@ void sbbs_t::redrwstr(char *strin, int i, int l, long mode) cursor_left(l-i); } else { while(c<cols-1) { /* clear to end of line */ - outchar(SP); + outchar(' '); c++; } while(c>l) { /* back space to end of string */ diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp index 5d4210a9ad..a551cb308e 100644 --- a/src/sbbs3/con_out.cpp +++ b/src/sbbs3/con_out.cpp @@ -197,7 +197,7 @@ void sbbs_t::outchar(char ch) #endif #if 0 if(console&CON_L_ECHO) { - if(console&CON_L_ECHOX && (uchar)ch>SP) + if(console&CON_L_ECHOX && (uchar)ch>' ') putch(password_char); else if(cfg.node_misc&NM_NOBEEP && ch==BEL); /* Do nothing if beep */ else if(ch==BEL) { @@ -209,7 +209,7 @@ void sbbs_t::outchar(char ch) #endif if(online==ON_REMOTE && console&CON_R_ECHO) { - if(console&CON_R_ECHOX && (uchar)ch>SP) { + if(console&CON_R_ECHOX && (uchar)ch>' ') { ch=text[YN][3]; if(text[YN][2]==0 || ch==0) ch='X'; } @@ -268,7 +268,7 @@ void sbbs_t::center(char *instr) truncsp(str); j=bstrlen(str); for(i=0;i<(80-j)/2;i++) - outchar(SP); + outchar(' '); bputs(str); CRLF; } @@ -282,7 +282,7 @@ void sbbs_t::clearline(void) rputs("\x1b[K"); else { for(i=0;i<cols-1;i++) - outchar(SP); + outchar(' '); outchar(CR); } } @@ -330,7 +330,7 @@ void sbbs_t::cursor_right(int count) rputs("\x1b[C"); } else { for(int i=0;i<count;i++) - outchar(SP); + outchar(' '); } } @@ -357,7 +357,7 @@ void sbbs_t::cleartoeol(void) else { i=j=lclwx(); /* commented out */ while(i++<79) - outchar(SP); + outchar(' '); while(j++<79) outchar(BS); } diff --git a/src/sbbs3/exec.cpp b/src/sbbs3/exec.cpp index 0fe5a0def3..46f387272f 100644 --- a/src/sbbs3/exec.cpp +++ b/src/sbbs3/exec.cpp @@ -1775,7 +1775,7 @@ int sbbs_t::exec(csi_t *csi) ungetkey(csi->str[i]); return(0); case CS_PRINTKEY: - if((csi->cmd&0x7f)>=SP) + if((csi->cmd&0x7f)>=' ') outchar(csi->cmd&0x7f); return(0); case CS_PRINTSTR: diff --git a/src/sbbs3/execfile.cpp b/src/sbbs3/execfile.cpp index ef0ed809dd..ce2cde5ec6 100644 --- a/src/sbbs3/execfile.cpp +++ b/src/sbbs3/execfile.cpp @@ -61,9 +61,9 @@ int sbbs_t::exec_file(csi_t *csi) for(i=0;i<usrlibs && !msgabort();i++) { if(i==curlib) outchar('*'); - else outchar(SP); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + else outchar(' '); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bprintf(text[CfgLibLstFmt] ,i+1,cfg.lib[usrlib[i]]->lname); } } sprintf(str,text[JoinWhichLib],curlib+1); @@ -84,12 +84,12 @@ int sbbs_t::exec_file(csi_t *csi) bprintf(text[DirLstHdr], cfg.lib[usrlib[j]]->lname); for(i=0;i<usrdirs[j] && !msgabort();i++) { if(i==curdir[j]) outchar('*'); - else outchar(SP); + else outchar(' '); sprintf(str,text[DirLstFmt],i+1 ,cfg.dir[usrdir[j][i]]->lname,nulstr ,getfiles(&cfg,usrdir[j][i])); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bputs(str); } } sprintf(str,text[JoinWhichDir],curdir[j]+1); mnemonics(str); @@ -191,8 +191,8 @@ int sbbs_t::exec_file(csi_t *csi) for(i=0;i<usrlibs && !msgabort();i++) { if(i==curlib) outchar('*'); - else outchar(SP); - if(i<9) outchar(SP); + else outchar(' '); + if(i<9) outchar(' '); bprintf(text[LibLstFmt],i+1 ,cfg.lib[usrlib[i]]->lname,nulstr,usrdirs[i]); } return(0); @@ -208,12 +208,12 @@ int sbbs_t::exec_file(csi_t *csi) bprintf(text[DirLstHdr],cfg.lib[usrlib[curlib]]->lname); for(i=0;i<usrdirs[curlib] && !msgabort();i++) { if(i==curdir[curlib]) outchar('*'); - else outchar(SP); + else outchar(' '); sprintf(str,text[DirLstFmt],i+1 ,cfg.dir[usrdir[curlib][i]]->lname,nulstr ,getfiles(&cfg,usrdir[curlib][i])); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bputs(str); } return(0); diff --git a/src/sbbs3/execmsg.cpp b/src/sbbs3/execmsg.cpp index 937bb40260..bf7c228a4e 100644 --- a/src/sbbs3/execmsg.cpp +++ b/src/sbbs3/execmsg.cpp @@ -59,9 +59,9 @@ int sbbs_t::exec_msg(csi_t *csi) for(i=0;i<usrgrps && !msgabort();i++) { if(i==curgrp) outchar('*'); - else outchar(SP); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + else outchar(' '); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bprintf(text[CfgGrpLstFmt] ,i+1, cfg.grp[usrgrp[i]]->lname); } } sprintf(str,text[JoinWhichGrp],curgrp+1); @@ -82,12 +82,12 @@ int sbbs_t::exec_msg(csi_t *csi) bprintf(text[SubLstHdr], cfg.grp[usrgrp[j]]->lname); for(i=0;i<usrsubs[j] && !msgabort();i++) { if(i==cursub[j]) outchar('*'); - else outchar(SP); + else outchar(' '); sprintf(str,text[SubLstFmt],i+1 ,cfg.sub[usrsub[j][i]]->lname,nulstr ,getposts(&cfg,usrsub[j][i])); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bputs(str); } } sprintf(str,text[JoinWhichSub],cursub[j]+1); mnemonics(str); @@ -200,8 +200,8 @@ int sbbs_t::exec_msg(csi_t *csi) for(i=0;i<usrgrps && !msgabort();i++) { if(i==curgrp) outchar('*'); - else outchar(SP); - if(i<9) outchar(SP); + else outchar(' '); + if(i<9) outchar(' '); bprintf(text[GrpLstFmt],i+1 ,cfg.grp[usrgrp[i]]->lname,nulstr,usrsubs[i]); } return(0); @@ -217,12 +217,12 @@ int sbbs_t::exec_msg(csi_t *csi) bprintf(text[SubLstHdr],cfg.grp[usrgrp[curgrp]]->lname); for(i=0;i<usrsubs[curgrp] && !msgabort();i++) { if(i==cursub[curgrp]) outchar('*'); - else outchar(SP); + else outchar(' '); sprintf(str,text[SubLstFmt],i+1 ,cfg.sub[usrsub[curgrp][i]]->lname,nulstr ,getposts(&cfg,usrsub[curgrp][i])); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bputs(str); } return(0); diff --git a/src/sbbs3/fido.cpp b/src/sbbs3/fido.cpp index d0aed1acaa..c95d8a55d5 100644 --- a/src/sbbs3/fido.cpp +++ b/src/sbbs3/fido.cpp @@ -270,25 +270,25 @@ bool sbbs_t::netmail(char *into, char *title, long mode) if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"CR:",3)) { /* Crash over-ride by sysop */ p+=3; /* skip CR: */ - if(*p==SP) p++; /* skip extra space if it exists */ + if(*p==' ') p++; /* skip extra space if it exists */ hdr.attr|=FIDO_CRASH; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"FR:",3)) { /* File request */ p+=3; /* skip FR: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_FREQ; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"RR:",3)) { /* Return receipt request */ p+=3; /* skip RR: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_RRREQ; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"FA:",3)) { /* File Attachment */ p+=3; /* skip FA: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_FILE; } SAFECOPY(hdr.subj,p); @@ -373,7 +373,7 @@ bool sbbs_t::netmail(char *into, char *title, long mode) l++; } if(!cc_found) break; - while(l<length && *(buf+l)==SP) l++; + while(l<length && *(buf+l)==' ') l++; for(i=0;l<length && *(buf+l)!=LF && i<128;i++,l++) str[i]=buf[l]; if(!i) @@ -502,7 +502,7 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub) if(cp) *cp=0; l+=strlen(str)+1; cp=str; - while(*cp && *cp<=SP) cp++; + while(*cp && *cp<=' ') cp++; sprintf(senderaddr,"%s/%s" ,fromhub ? cfg.qhub[fromhub-1]->id : useron.alias,cp); strupr(senderaddr); @@ -534,7 +534,7 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub) if(cp) *cp=0; l+=strlen(str)+1; cp=str+4; - while(*cp && *cp<=SP) cp++; + while(*cp && *cp<=' ') cp++; msg.hdr.when_written.zone=(short)ahtoul(cp); } else msg.hdr.when_written.zone=sys_timezone(&cfg); @@ -799,25 +799,25 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub) if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"CR:",3)) { /* Crash over-ride by sysop */ p+=3; /* skip CR: */ - if(*p==SP) p++; /* skip extra space if it exists */ + if(*p==' ') p++; /* skip extra space if it exists */ hdr.attr|=FIDO_CRASH; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"FR:",3)) { /* File request */ p+=3; /* skip FR: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_FREQ; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"RR:",3)) { /* Return receipt request */ p+=3; /* skip RR: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_RRREQ; } if((SYSOP || useron.exempt&FLAG('F')) && !strnicmp(p,"FA:",3)) { /* File attachment */ p+=3; /* skip FA: */ - if(*p==SP) p++; + if(*p==' ') p++; hdr.attr|=FIDO_FILE; } SAFECOPY(hdr.subj,p); diff --git a/src/sbbs3/file.cpp b/src/sbbs3/file.cpp index da8a50302a..ae9cb691bb 100644 --- a/src/sbbs3/file.cpp +++ b/src/sbbs3/file.cpp @@ -273,7 +273,7 @@ bool sbbs_t::checkfname(char *fname) #endif d=strlen(fname); while(c<d) { - if(fname[c]<=SP || fname[c]&0x80) + if(fname[c]<=' ' || fname[c]&0x80) return(false); c++; } return(true); diff --git a/src/sbbs3/filedat.c b/src/sbbs3/filedat.c index abe3a3ab83..c3980bc161 100644 --- a/src/sbbs3/filedat.c +++ b/src/sbbs3/filedat.c @@ -97,7 +97,7 @@ BOOL DLLCALL getfiledat(scfg_t* cfg, file_t* f) getrec(buf,F_OPENCOUNT,3,str); f->opencount=atoi(str); if(buf[F_MISC]!=ETX) - f->misc=buf[F_MISC]-SP; + f->misc=buf[F_MISC]-' '; else f->misc=0; return(TRUE); @@ -122,7 +122,7 @@ BOOL DLLCALL putfiledat(scfg_t* cfg, file_t* f) putrec(buf,F_TIMESDLED+5,2,crlf); putrec(buf,F_OPENCOUNT,3,ultoa(f->opencount,tmp,10)); putrec(buf,F_OPENCOUNT+3,2,crlf); - buf[F_MISC]=f->misc+SP; + buf[F_MISC]=f->misc+' '; putrec(buf,F_ALTPATH,2,hexplus(f->altpath,tmp)); putrec(buf,F_ALTPATH+2,2,crlf); sprintf(str,"%s%s.dat",cfg->dir[f->dir]->data_dir,cfg->dir[f->dir]->code); @@ -200,7 +200,7 @@ BOOL DLLCALL addfiledat(scfg_t* cfg, file_t* f) putrec(fdat,F_TIMESDLED+5,2,crlf); putrec(fdat,F_OPENCOUNT,3,ultoa(f->opencount,tmp,10)); putrec(fdat,F_OPENCOUNT+3,2,crlf); - fdat[F_MISC]=f->misc+SP; + fdat[F_MISC]=f->misc+' '; putrec(fdat,F_ALTPATH,2,hexplus(f->altpath,tmp)); putrec(fdat,F_ALTPATH+2,2,crlf); f->datoffset=l; @@ -508,7 +508,7 @@ char* DLLCALL unpadfname(char *filename, char *str) int c,d; for(c=0,d=0;filename[c];c++) - if(filename[c]!=SP) str[d++]=filename[c]; + if(filename[c]!=' ') str[d++]=filename[c]; str[d]=0; return(str); } diff --git a/src/sbbs3/filelist.c b/src/sbbs3/filelist.c index 454be18291..0837bd5aaf 100644 --- a/src/sbbs3/filelist.c +++ b/src/sbbs3/filelist.c @@ -360,10 +360,10 @@ int main(int argc, char **argv) if(misc&PLUS && datbuf[n+F_MISC]!=ETX - && (datbuf[n+F_MISC]-SP)&FM_EXTDESC) + && (datbuf[n+F_MISC]-' ')&FM_EXTDESC) fputc('+',out); else - fputc(SP,out); + fputc(' ',out); desc_off=12; if(misc&(CDT_|TOT)) { @@ -379,9 +379,9 @@ int main(int argc, char **argv) if(!fexistcase(str)) fputc('-',out); else - fputc(SP,out); } + fputc(' ',out); } else - fputc(SP,out); + fputc(' ',out); desc_off++; if(misc&DFD) { @@ -408,7 +408,7 @@ int main(int argc, char **argv) fprintf(out,"%5u ",j); desc_off+=6; } - if(datbuf[n+F_MISC]!=ETX && (datbuf[n+F_MISC]-SP)&FM_EXTDESC) + if(datbuf[n+F_MISC]!=ETX && (datbuf[n+F_MISC]-' ')&FM_EXTDESC) ext=1; /* extended description exists */ else ext=0; /* it doesn't */ @@ -441,7 +441,7 @@ int main(int argc, char **argv) if(lines) { if(misc&JST) fprintf(out,"%*s",desc_off,""); - fputc(SP,out); /* indent one character */ } + fputc(' ',out); /* indent one character */ } fprintf(out,"%s",str); lines++; } fclose(in); } diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c index 221ad56acf..e12fdee019 100644 --- a/src/sbbs3/ftpsrvr.c +++ b/src/sbbs3/ftpsrvr.c @@ -1808,7 +1808,7 @@ static void receive_thread(void* arg) memset(ext,0,sizeof(ext)); read(file,ext,sizeof(ext)-1); for(i=sizeof(ext)-1;i;i--) /* trim trailing spaces */ - if(ext[i-1]>SP) + if(ext[i-1]>' ') break; ext[i]=0; if(!f.desc[0]) { /* use for normal description */ diff --git a/src/sbbs3/getkey.cpp b/src/sbbs3/getkey.cpp index 0167ccb62c..b7ddbc840f 100644 --- a/src/sbbs3/getkey.cpp +++ b/src/sbbs3/getkey.cpp @@ -198,7 +198,7 @@ char sbbs_t::getkey(long mode) continue; if(mode&K_SPIN) bputs("\b \b"); - if(mode&K_COLD && ch>SP && useron.misc&COLDKEYS) { + if(mode&K_COLD && ch>' ' && useron.misc&COLDKEYS) { if(mode&K_UPPER) outchar(toupper(ch)); else @@ -208,7 +208,7 @@ char sbbs_t::getkey(long mode) bputs("\b \b"); if(coldkey==BS || coldkey==DEL) continue; - if(coldkey>SP) + if(coldkey>' ') ungetkey(coldkey); } if(mode&K_UPPER) @@ -291,7 +291,7 @@ void sbbs_t::mnemonics(char *str) } ctrl_a_codes=strchr(str,1); if(!ctrl_a_codes) { - if(str[0]=='@' && str[strlen(str)-1]=='@' && !strchr(str,SP)) { + if(str[0]=='@' && str[strlen(str)-1]=='@' && !strchr(str,' ')) { mnestr=str; bputs(str); return; @@ -428,7 +428,7 @@ long sbbs_t::getkeys(char *keys, ulong max) } if(ch && !n && (strchr(str,ch))) { /* return character if in string */ outchar(ch); - if(useron.misc&COLDKEYS && ch>SP) { + if(useron.misc&COLDKEYS && ch>' ') { while(online && !(sys_status&SS_ABORT)) { c=getkey(0); if(c==CR || c==BS || c==DEL) diff --git a/src/sbbs3/getmail.c b/src/sbbs3/getmail.c index 53c61fcc97..8ff5686a2f 100644 --- a/src/sbbs3/getmail.c +++ b/src/sbbs3/getmail.c @@ -99,7 +99,7 @@ void DLLCALL delfattach(scfg_t* cfg, smbmsg_t* msg) strcpy(str,msg->subj); tp=str; while(1) { - p=strchr(tp,SP); + p=strchr(tp,' '); if(p) *p=0; sp=strrchr(tp,'/'); /* sp is slash pointer */ if(!sp) sp=strrchr(tp,'\\'); diff --git a/src/sbbs3/getstr.cpp b/src/sbbs3/getstr.cpp index db393176bc..04a8e2047e 100644 --- a/src/sbbs3/getstr.cpp +++ b/src/sbbs3/getstr.cpp @@ -60,7 +60,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) if(mode&K_LINE && useron.misc&ANSI && !(mode&K_NOECHO)) { attr(cfg.color[clr_inputline]); for(i=0;i<maxlen;i++) - outchar(SP); + outchar(' '); cursor_left(maxlen); } if(wordwrap[0]) { @@ -102,7 +102,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) rputs(str1); i=l; } - if(ch!=SP && ch!=TAB) + if(ch!=' ' && ch!=TAB) ungetkey(ch); } @@ -134,7 +134,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) } if(ch==TAB && (mode&K_TAB || !(mode&K_WRAP))) /* TAB same as CR */ break; - if(!i && mode&K_UPRLWR && (ch==SP || ch==TAB)) + if(!i && mode&K_UPRLWR && (ch==' ' || ch==TAB)) continue; /* ignore beginning white space if upper/lower */ if(mode&K_E71DETECT && (uchar)ch==(CR|0x80) && l>1) { if(strstr(str1,"��")) { @@ -171,12 +171,12 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) case CTRL_D: /* Ctrl-D Delete word right */ if(i<l) { x=i; - while(x<l && str1[x]!=SP) { - outchar(SP); + while(x<l && str1[x]!=' ') { + outchar(' '); x++; } - while(x<l && str1[x]==SP) { - outchar(SP); + while(x<l && str1[x]==' ') { + outchar(' '); x++; } cursor_left(x-i); /* move cursor back */ @@ -186,7 +186,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) z++; } while(z<l) { /* write over extra chars */ - outchar(SP); + outchar(' '); z++; } cursor_left(z-i); @@ -263,7 +263,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) outchar(str1[z]=str1[z+1]); z++; } - outchar(SP); /* write over the last char */ + outchar(' '); /* write over the last char */ cursor_left((l-i)+1); } else if(!(mode&K_NOECHO)) @@ -281,9 +281,9 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) console&=~CON_INSERT; #endif } - str1[i++]=SP; + str1[i++]=' '; if(!(mode&K_NOECHO)) - outchar(SP); + outchar(' '); } while(i<maxlen && i%EDIT_TABSIZE) { if(console&CON_INSERT) { @@ -296,9 +296,9 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) console&=~CON_INSERT; #endif } - str1[i++]=SP; + str1[i++]=' '; if(!(mode&K_NOECHO)) - outchar(SP); + outchar(' '); } if(console&CON_INSERT && !(mode&K_NOECHO)) redrwstr(str1,i,l,0); @@ -309,7 +309,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) l=bstrlen(str1); if(!l) break; for(x=0;x<(maxlen-l)/2;x++) - str2[x]=SP; + str2[x]=' '; str2[x]=0; strcat(str2,str1); strcpy(strout,str2); @@ -332,9 +332,9 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) case CTRL_N: /* Ctrl-N Next word */ if(i<l && (useron.misc&ANSI)) { x=i; - while(str1[i]!=SP && i<l) + while(str1[i]!=' ' && i<l) i++; - while(str1[i]==SP && i<l) + while(str1[i]==' ' && i<l) i++; cursor_right(i-x); } @@ -352,11 +352,11 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) case CTRL_W: /* Ctrl-W Delete word left */ if(i<l) { x=i; /* x=original offset */ - while(i && str1[i-1]==SP) { + while(i && str1[i-1]==' ') { outchar(BS); i--; } - while(i && str1[i-1]!=SP) { + while(i && str1[i-1]!=' ') { outchar(BS); i--; } @@ -366,19 +366,19 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) z++; } while(z<l) { /* write over extra chars */ - outchar(SP); + outchar(' '); z++; } cursor_left(z-i); /* back to new x corridnant */ l-=x-i; /* l=new length */ } else { - while(i && str1[i-1]==SP) { + while(i && str1[i-1]==' ') { i--; l--; if(!(mode&K_NOECHO)) bputs("\b \b"); } - while(i && str1[i-1]!=SP) { + while(i && str1[i-1]!=' ') { i--; l--; if(!(mode&K_NOECHO)) @@ -404,7 +404,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) l=0; } else { while(i<l) { - outchar(SP); + outchar(' '); i++; } while(l) { @@ -426,9 +426,9 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) case 28: /* Ctrl-\ Previous word */ if(i && (useron.misc&ANSI) && !(mode&K_NOECHO)) { x=i; - while(str1[i-1]==SP && i) + while(str1[i-1]==' ' && i) i--; - while(str1[i-1]!=SP && i) + while(str1[i-1]!=' ' && i) i--; cursor_left(x-i); } @@ -478,13 +478,13 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) outchar(str1[z]=str1[z+1]); z++; } - outchar(SP); /* write over the last char */ + outchar(' '); /* write over the last char */ cursor_left((l-i)+1); break; default: - if(mode&K_WRAP && i==maxlen && ch>=SP && !(console&CON_INSERT)) { + if(mode&K_WRAP && i==maxlen && ch>=' ' && !(console&CON_INSERT)) { str1[i]=0; - if(ch==SP && !(mode&K_CHAT)) { /* don't wrap a space */ + if(ch==' ' && !(mode&K_CHAT)) { /* don't wrap a space */ strcpy(strout,str1); /* as last char */ if(strip_invalid_attr(strout) && !(mode&K_NOECHO)) redrwstr(strout,i,l,K_MSG); @@ -495,7 +495,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) x=i-1; z=1; wordwrap[0]=ch; - while(str1[x]!=SP && x) + while(str1[x]!=' ' && x) wordwrap[z++]=str1[x--]; if(x<(maxlen/2)) { wordwrap[1]=0; /* only wrap one character */ @@ -521,9 +521,9 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode) CRLF; return(x); } - if(i<maxlen && ch>=SP) { + if(i<maxlen && ch>=' ') { if(mode&K_UPRLWR) - if(!i || (i && (str1[i-1]==SP || str1[i-1]=='-' + if(!i || (i && (str1[i-1]==' ' || str1[i-1]=='-' || str1[i-1]=='.' || str1[i-1]=='_'))) ch=toupper(ch); else diff --git a/src/sbbs3/js_system.c b/src/sbbs3/js_system.c index 5cdbacdbbc..604c8bb327 100644 --- a/src/sbbs3/js_system.c +++ b/src/sbbs3/js_system.c @@ -1204,7 +1204,7 @@ js_new_user(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) memset(&user,0,sizeof(user)); - user.sex=SP; + user.sex=' '; SAFECOPY(user.alias,alias); /* statistics */ diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp index 8ce56bc6ec..240fbbf757 100644 --- a/src/sbbs3/listfile.cpp +++ b/src/sbbs3/listfile.cpp @@ -176,7 +176,7 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode) continue; } getrec((char *)&datbuf[n],F_MISC,1,tmp); j=tmp[0]; /* misc bits */ - if(j) j-=SP; + if(j) j-=' '; if(mode&FL_EXFIND && j&FM_EXTDESC) { /* search extended description */ getextdesc(&cfg,dirnum,n,ext); strupr(ext); @@ -225,17 +225,17 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode) sprintf(hdr,text[BoxHdrLib],i+1,cfg.lib[usrlib[i]]->lname); bputs(hdr); for(c=bstrlen(hdr);c<d;c++) - outchar(SP); + outchar(' '); bputs("�\r\n� "); sprintf(hdr,text[BoxHdrDir],j+1,cfg.dir[dirnum]->lname); bputs(hdr); for(c=bstrlen(hdr);c<d;c++) - outchar(SP); + outchar(' '); bputs("�\r\n� "); sprintf(hdr,text[BoxHdrFiles],l/F_IXBSIZE); bputs(hdr); for(c=bstrlen(hdr);c<d;c++) - outchar(SP); + outchar(' '); bputs("�\r\n��"); for(c=0;c<d;c++) outchar('�'); @@ -381,7 +381,7 @@ bool sbbs_t::listfile(char *fname, char HUGE16 *buf, uint dirnum int i,j; ulong cdt; - if(buf[F_MISC]!=ETX && (buf[F_MISC]-SP)&FM_EXTDESC && useron.misc&EXTDESC) { + if(buf[F_MISC]!=ETX && (buf[F_MISC]-' ')&FM_EXTDESC && useron.misc&EXTDESC) { getextdesc(&cfg,dirnum,datoffset,ext); if(useron.misc&BATCHFLAG && lncntr+extdesclines(ext)>=rows-2 && letter!='A') return(false); } @@ -394,13 +394,13 @@ bool sbbs_t::listfile(char *fname, char HUGE16 *buf, uint dirnum sprintf(path,"%s%s",alt>0 && alt<=cfg.altpaths ? cfg.altpath[alt-1]:cfg.dir[dirnum]->path ,unpadfname(fname,tmp)); - if(buf[F_MISC]!=ETX && (buf[F_MISC]-SP)&FM_EXTDESC) { + if(buf[F_MISC]!=ETX && (buf[F_MISC]-' ')&FM_EXTDESC) { if(!(useron.misc&EXTDESC)) outchar('+'); else - outchar(SP); } + outchar(' '); } else - outchar(SP); + outchar(' '); if(useron.misc&BATCHFLAG) { attr(cfg.color[clr_filedesc]); bprintf("%c",letter); } @@ -431,7 +431,7 @@ bool sbbs_t::listfile(char *fname, char HUGE16 *buf, uint dirnum else bprintf("%7lu",cdt); } if(exist) - outchar(SP); + outchar(' '); else outchar('-'); getrec((char *)buf,F_DESC,LEN_FDESC,str); @@ -633,7 +633,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total break; } if(strchr(str+c,'.')) { /* filename or spec given */ f.dir=dirnum; - p=strchr(str+c,SP); + p=strchr(str+c,' '); if(!p) p=strchr(str+c,','); if(p) *p=0; for(i=0;i<total;i++) { @@ -684,7 +684,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total for(c=0;c<d;c++) { if(strchr(str+c,'.')) { /* filename or spec given */ f.dir=dirnum; - p=strchr(str+c,SP); + p=strchr(str+c,' '); if(!p) p=strchr(str+c,','); if(p) *p=0; for(i=0;i<total;i++) { @@ -763,7 +763,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total for(c=0;c<d;c++) { if(strchr(str+c,'.')) { /* filename or spec given */ f.dir=dirnum; - p=strchr(str+c,SP); + p=strchr(str+c,' '); if(!p) p=strchr(str+c,','); if(p) *p=0; for(i=0;i<total;i++) { @@ -1320,7 +1320,7 @@ void sbbs_t::listfiletofile(char *fname, char HUGE16 *buf, uint dirnum, int file bool exist=true; strcpy(str,fname); - if(buf[F_MISC]!=ETX && (buf[F_MISC]-SP)&FM_EXTDESC) + if(buf[F_MISC]!=ETX && (buf[F_MISC]-' ')&FM_EXTDESC) strcat(str,"+"); else strcat(str," "); diff --git a/src/sbbs3/logfile.cpp b/src/sbbs3/logfile.cpp index 12baa09ef7..4116e3fd2a 100644 --- a/src/sbbs3/logfile.cpp +++ b/src/sbbs3/logfile.cpp @@ -188,7 +188,7 @@ void sbbs_t::logch(char ch, bool comma) { if(logfile_fp==NULL || (online==ON_LOCAL)) return; - if((uchar)ch<SP) /* Don't log control chars */ + if((uchar)ch<' ') /* Don't log control chars */ return; if(logcol==1) { logcol=4; @@ -204,7 +204,7 @@ void sbbs_t::logch(char ch, bool comma) } if(ch&0x80) { ch&=0x7f; - if(ch<SP) + if(ch<' ') return; fprintf(logfile_fp,"/"); } diff --git a/src/sbbs3/login.cpp b/src/sbbs3/login.cpp index d2a3693b19..06fb5b6308 100644 --- a/src/sbbs3/login.cpp +++ b/src/sbbs3/login.cpp @@ -65,7 +65,7 @@ int sbbs_t::login(char *username, char *pw) if(!useron.number) { useron.number=matchuser(&cfg,str,FALSE); if(!useron.number && (uchar)str[0]<0x7f && str[1] - && isalpha(str[0]) && strchr(str,SP) && cfg.node_misc&NM_LOGON_R) + && isalpha(str[0]) && strchr(str,' ') && cfg.node_misc&NM_LOGON_R) useron.number=userdatdupe(0,U_NAME,LEN_NAME,str,0); if(useron.number) { getuserdat(&cfg,&useron); diff --git a/src/sbbs3/logon.cpp b/src/sbbs3/logon.cpp index a71ab52832..13fff0174a 100644 --- a/src/sbbs3/logon.cpp +++ b/src/sbbs3/logon.cpp @@ -323,7 +323,7 @@ bool sbbs_t::logon() getstr(useron.name,LEN_NAME,K_UPRLWR|(cfg.uq&UQ_NOEXASC)); if(cfg.uq&UQ_ALIASES && cfg.uq&UQ_REALNAME) { if(trashcan(useron.name,"name") || !useron.name[0] - || !strchr(useron.name,SP) + || !strchr(useron.name,' ') || strchr(useron.name,0xff) || (cfg.uq&UQ_DUPREAL && userdatdupe(useron.number,U_NAME,LEN_NAME diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 87949f35a1..985cc28eac 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -4301,7 +4301,7 @@ void DLLCALL bbs_thread(void* arg) identity=strrchr(str,':'); if(identity!=NULL) { identity++; /* skip colon */ - while(*identity && *identity<=SP) /* point to user name */ + while(*identity && *identity<=' ') /* point to user name */ identity++; lprintf(LOG_INFO,"%04d Identity: %s",client_socket, identity); } diff --git a/src/sbbs3/msgtoqwk.cpp b/src/sbbs3/msgtoqwk.cpp index 8fef089973..0ffd443c72 100644 --- a/src/sbbs3/msgtoqwk.cpp +++ b/src/sbbs3/msgtoqwk.cpp @@ -55,7 +55,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum smbmsg_t orig_msg; offset=ftell(qwk_fp); - memset(str,SP,QWK_BLOCK_LEN); + memset(str,' ',QWK_BLOCK_LEN); fwrite(str,QWK_BLOCK_LEN,1,qwk_fp); /* Init header to space */ if(msg->from_net.addr && (uint)subnum==INVALID_SUB) { @@ -198,7 +198,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum tearwatch=0; /* LF-CR- is not okay */ continue; } - if(ch==SP && tearwatch==4) { /* watch for "LF--- " */ + if(ch==' ' && tearwatch==4) { /* watch for "LF--- " */ tear=1; tearwatch=0; } @@ -211,7 +211,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum tearwatch=0; if((uint)subnum!=INVALID_SUB && cfg.sub[subnum]->misc&SUB_ASCII) { - if(ch<SP && ch!=1) + if(ch<' ' && ch!=1) ch='.'; else if((uchar)ch>0x7f) ch='*'; } @@ -328,7 +328,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum while(size%QWK_BLOCK_LEN) { /* Pad with spaces */ size++; - fputc(SP,qwk_fp); } + fputc(' ',qwk_fp); } if(localtime_r((time_t *)&msg->hdr.when_written.time,&tm)==NULL) memset(&tm,0,sizeof(tm)); @@ -363,9 +363,9 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum ,(size/QWK_BLOCK_LEN)+1 /* Number of blocks */ ,(char)conf&0xff /* Conference number lo byte */ ,(ushort)conf>>8 /* hi byte */ - ,SP /* not used */ - ,SP /* not used */ - ,useron.rest&FLAG('Q') ? '*' : SP /* Net tag line */ + ,' ' /* not used */ + ,' ' /* not used */ + ,useron.rest&FLAG('Q') ? '*' : ' ' /* Net tag line */ ); fseek(qwk_fp,offset,SEEK_SET); diff --git a/src/sbbs3/newuser.cpp b/src/sbbs3/newuser.cpp index 7dfee39aa9..e2d62bdae6 100644 --- a/src/sbbs3/newuser.cpp +++ b/src/sbbs3/newuser.cpp @@ -111,7 +111,7 @@ BOOL sbbs_t::newuser() useron.expire=now+((long)cfg.new_expire*24L*60L*60L); } else useron.expire=0; - useron.sex=SP; + useron.sex=' '; useron.prot=cfg.new_prot; strcpy(useron.note,cid); /* Caller ID if supported, NULL otherwise */ if((i=userdatdupe(0,U_NOTE,LEN_NOTE,cid,true))!=0) { /* Duplicate IP address */ @@ -196,13 +196,13 @@ BOOL sbbs_t::newuser() bputs(text[EnterYourRealName]); getstr(useron.alias,LEN_ALIAS,kmode); truncsp(useron.alias); - if(useron.alias[0]<=SP || !isalpha(useron.alias[0]) + if(useron.alias[0]<=' ' || !isalpha(useron.alias[0]) || alias(&cfg,useron.alias,tmp)!=useron.alias || !stricmp(useron.alias,cfg.sys_id) || strchr(useron.alias,0xff) || matchuser(&cfg,useron.alias,TRUE /* sysop_alias */) || trashcan(useron.alias,"name") - || (!(cfg.uq&UQ_ALIASES) && !strchr(useron.alias,SP))) { + || (!(cfg.uq&UQ_ALIASES) && !strchr(useron.alias,' '))) { bputs(text[YouCantUseThatName]); if(!yesno(ContinueText)) return(FALSE); @@ -218,7 +218,7 @@ BOOL sbbs_t::newuser() if(!getstr(useron.name,LEN_NAME,kmode) || trashcan(useron.name,"name") || strchr(useron.name,0xff) - || !strchr(useron.name,SP) + || !strchr(useron.name,' ') || (cfg.uq&UQ_DUPREAL && userdatdupe(useron.number,U_NAME,LEN_NAME ,useron.name,0))) diff --git a/src/sbbs3/qwk.cpp b/src/sbbs3/qwk.cpp index 189de21343..9c9aa8ed4f 100644 --- a/src/sbbs3/qwk.cpp +++ b/src/sbbs3/qwk.cpp @@ -65,7 +65,7 @@ bool route_circ(char *via, char *id) strcpy(str,via); p=str; - while(*p && *p<=SP) + while(*p && *p<=' ') p++; while(*p) { sp=strchr(p,'/'); @@ -127,7 +127,7 @@ int sbbs_t::qwk_route(char *inaddr, char *fulladdr) strcpy(fulladdr,inaddr); return(i); } } } - p=strchr(node,SP); + p=strchr(node,' '); if(p) *p=0; sprintf(str,"%sqnet/route.dat",cfg.data_dir); @@ -224,7 +224,7 @@ void sbbs_t::update_qwkroute(char *via) if(!p) continue; *p=0; sprintf(node,"%.8s",str+9); - tp=strchr(node,SP); /* change "node bbs:" to "node:" */ + tp=strchr(node,' '); /* change "node bbs:" to "node:" */ if(tp) *tp=0; for(i=0;i<total_nodes;i++) if(!stricmp(qwk_node[i],node)) @@ -250,7 +250,7 @@ void sbbs_t::update_qwkroute(char *via) total_nodes++; } strcpy(qwk_node[i],node); p++; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; sprintf(qwk_path[i],"%.127s",p); qwk_time[i]=t; } fclose(stream); } } @@ -263,7 +263,7 @@ void sbbs_t::update_qwkroute(char *via) sprintf(node,"%.8s",p); tp=strchr(node,'/'); if(tp) *tp=0; - tp=strchr(node,SP); /* no spaces allowed */ + tp=strchr(node,' '); /* no spaces allowed */ if(tp) *tp=0; truncsp(node); for(i=0;i<total_nodes;i++) @@ -423,7 +423,7 @@ void sbbs_t::qwk_sec() if(bi) strcat(str,"B"); ch=(char)getkeys(str,0); - if(ch>SP) + if(ch>' ') logch(ch,0); if(sys_status&SS_ABORT || ch=='Q' || ch==CR) break; diff --git a/src/sbbs3/qwktomsg.cpp b/src/sbbs3/qwktomsg.cpp index 90e9aee8af..7731e1f166 100644 --- a/src/sbbs3/qwktomsg.cpp +++ b/src/sbbs3/qwktomsg.cpp @@ -174,7 +174,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum header_cont=false; continue; } - if(!taillen && qwkbuf[k]==SP && col==3 && bodylen>=3 + if(!taillen && qwkbuf[k]==' ' && col==3 && bodylen>=3 && body[bodylen-3]=='-' && body[bodylen-2]=='-' && body[bodylen-1]=='-') { bodylen-=3; @@ -218,11 +218,11 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum } } - while(bodylen && body[bodylen-1]==SP) bodylen--; /* remove trailing spaces */ + while(bodylen && body[bodylen-1]==' ') bodylen--; /* remove trailing spaces */ if(bodylen>=2 && body[bodylen-2]==CR && body[bodylen-1]==LF) bodylen-=2; - while(taillen && tail[taillen-1]<=SP) taillen--; /* remove trailing garbage */ + while(taillen && tail[taillen-1]<=' ') taillen--; /* remove trailing garbage */ skip=0; if(useron.rest&FLAG('Q') || fromhub) { /* QWK Net */ @@ -236,7 +236,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum } truncsp(header); p=header+5; /* Skip "@VIA:" */ - while(*p && *p<=SP) p++; /* Skip any spaces */ + while(*p && *p<=' ') p++; /* Skip any spaces */ if(route_circ(p,cfg.sys_id)) { free(header); free(body); @@ -291,7 +291,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum skip+=strlen(header+i)+1; } p=header+i+7; /* Skip "@MSGID:" */ - while(*p && *p<=SP) p++; /* Skip any spaces */ + while(*p && *p<=' ') p++; /* Skip any spaces */ truncstr(p," "); /* Truncate at first space char */ smb_hfield_str(&msg,RFC822MSGID,p); } @@ -305,7 +305,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum skip+=strlen(header+i)+1; } p=header+i+7; /* Skip "@REPLY:" */ - while(*p && *p<=SP) p++; /* Skip any spaces */ + while(*p && *p<=' ') p++; /* Skip any spaces */ truncstr(p," "); /* Truncate at first space char */ smb_hfield_str(&msg,RFC822REPLYID,p); } @@ -319,7 +319,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum skip+=strlen(header+i)+1; } p=header+i+4; /* Skip "@TZ:" */ - while(*p && *p<=SP) p++; /* Skip any spaces */ + while(*p && *p<=' ') p++; /* Skip any spaces */ msg.hdr.when_written.zone=(short)ahtoul(p); } if(!strnicmp(header+skip,"@REPLYTO:",9)) { @@ -330,7 +330,7 @@ bool sbbs_t::qwktomsg(FILE *qwk_fp, char *hdrblk, char fromhub, uint subnum skip+=strlen(header+i)+1; } p=header+i+9; /* Skip "@REPLYTO:" */ - while(*p && *p<=SP) p++; /* Skip any spaces */ + while(*p && *p<=' ') p++; /* Skip any spaces */ smb_hfield_str(&msg,REPLYTO,p); } free(header); diff --git a/src/sbbs3/readmail.cpp b/src/sbbs3/readmail.cpp index a34b770e59..352feeaf51 100644 --- a/src/sbbs3/readmail.cpp +++ b/src/sbbs3/readmail.cpp @@ -220,7 +220,7 @@ void sbbs_t::readmail(uint usernumber, int which) // strupr(str); tp=str; while(online) { - p=strchr(tp,SP); + p=strchr(tp,' '); if(p) *p=0; sp=strrchr(tp,'/'); /* sp is slash pointer */ if(!sp) sp=strrchr(tp,'\\'); @@ -294,7 +294,7 @@ void sbbs_t::readmail(uint usernumber, int which) if(!p) break; tp=p+1; - while(*tp==SP) tp++; + while(*tp==' ') tp++; } sprintf(str,"%sfile/%04u.in",cfg.data_dir,usernumber); rmdir(str); } @@ -495,7 +495,7 @@ void sbbs_t::readmail(uint usernumber, int which) bprintf(text[MailOnSystemLstFmt] ,i+1,msg.from,msg.to ,msg.hdr.attr&MSG_DELETE ? '-' : msg.hdr.attr&MSG_REPLIED ? 'R' - : msg.hdr.attr&MSG_READ ? SP + : msg.hdr.attr&MSG_READ ? ' ' : msg.from_net.type || msg.to_net.type ? 'N':'*' ,msg.subj); else @@ -504,7 +504,7 @@ void sbbs_t::readmail(uint usernumber, int which) : (msg.hdr.attr&MSG_ANONYMOUS) && !SYSOP ? text[Anonymous] : msg.from ,msg.hdr.attr&MSG_DELETE ? '-' : msg.hdr.attr&MSG_REPLIED ? 'R' - : msg.hdr.attr&MSG_READ ? SP + : msg.hdr.attr&MSG_READ ? ' ' : msg.from_net.type || msg.to_net.type ? 'N':'*' ,msg.subj); smb_freemsgmem(&msg); @@ -641,7 +641,7 @@ void sbbs_t::readmail(uint usernumber, int which) bprintf(text[MailOnSystemLstFmt] ,i+1,msg.from,msg.to ,msg.hdr.attr&MSG_DELETE ? '-' : msg.hdr.attr&MSG_REPLIED ? 'R' - : msg.hdr.attr&MSG_READ ? SP + : msg.hdr.attr&MSG_READ ? ' ' : msg.from_net.type || msg.to_net.type ? 'N':'*' ,msg.subj); else @@ -650,7 +650,7 @@ void sbbs_t::readmail(uint usernumber, int which) : (msg.hdr.attr&MSG_ANONYMOUS) && !SYSOP ? text[Anonymous] : msg.from ,msg.hdr.attr&MSG_DELETE ? '-' : msg.hdr.attr&MSG_REPLIED ? 'R' - : msg.hdr.attr&MSG_READ ? SP + : msg.hdr.attr&MSG_READ ? ' ' : msg.from_net.type || msg.to_net.type ? 'N':'*' ,msg.subj); smb_freemsgmem(&msg); diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp index b52cd695a1..1f3594dc8e 100644 --- a/src/sbbs3/readmsgs.cpp +++ b/src/sbbs3/readmsgs.cpp @@ -88,7 +88,7 @@ char *binstr(uchar *buf, ushort length) str[0]=0; for(i=0;i<length;i++) - if(buf[i] && (buf[i]<SP || buf[i]>=0x7f) + if(buf[i] && (buf[i]<' ' || buf[i]>=0x7f) && buf[i]!='\r' && buf[i]!='\n' && buf[i]!='\t') break; if(i==length) /* not binary */ diff --git a/src/sbbs3/rechocfg.c b/src/sbbs3/rechocfg.c index bde368a11f..aa153a03c6 100644 --- a/src/sbbs3/rechocfg.c +++ b/src/sbbs3/rechocfg.c @@ -73,7 +73,7 @@ char *cleanstr(char *instr) int i; for(i=0;instr[i];i++) - if((uchar)instr[i]<=SP) + if((uchar)instr[i]<=' ') break; instr[i]=0; return(instr); @@ -209,18 +209,18 @@ void read_echo_cfg() break; truncsp(str); p=str; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(*p==';') continue; sprintf(tmp,"%-.25s",p); - tp=strchr(tmp,SP); + tp=strchr(tmp,' '); if(tp) *tp=0; /* Chop off at space */ #if 0 strupr(tmp); /* Convert code to uppercase */ #endif - while(*p>SP) p++; /* Skip code */ - while(*p && *p<=SP) p++; /* Skip white space */ + while(*p>' ') p++; /* Skip code */ + while(*p && *p<=' ') p++; /* Skip white space */ if(!stricmp(tmp,"PACKER")) { /* Archive Definition */ if((cfg.arcdef=(arcdef_t *)REALLOC(cfg.arcdef @@ -230,29 +230,29 @@ void read_echo_cfg() bail(1); } sprintf(cfg.arcdef[cfg.arcdefs].name,"%-.25s",p); tp=cfg.arcdef[cfg.arcdefs].name; - while(*tp && *tp>SP) tp++; + while(*tp && *tp>' ') tp++; *tp=0; - while(*p && *p>SP) p++; - while(*p && *p<=SP) p++; + while(*p && *p>' ') p++; + while(*p && *p<=' ') p++; cfg.arcdef[cfg.arcdefs].byteloc=atoi(p); - while(*p && *p>SP) p++; - while(*p && *p<=SP) p++; + while(*p && *p>' ') p++; + while(*p && *p<=' ') p++; sprintf(cfg.arcdef[cfg.arcdefs].hexid,"%-.25s",p); tp=cfg.arcdef[cfg.arcdefs].hexid; - while(*tp && *tp>SP) tp++; + while(*tp && *tp>' ') tp++; *tp=0; while(fgets(str,256,stream) && strnicmp(str,"END",3)) { p=str; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!strnicmp(p,"PACK ",5)) { p+=5; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; sprintf(cfg.arcdef[cfg.arcdefs].pack,"%-.80s",p); truncsp(cfg.arcdef[cfg.arcdefs].pack); continue; } if(!strnicmp(p,"UNPACK ",7)) { p+=7; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; sprintf(cfg.arcdef[cfg.arcdefs].unpack,"%-.80s",p); truncsp(cfg.arcdef[cfg.arcdefs].unpack); } } ++cfg.arcdefs; @@ -364,7 +364,7 @@ void read_echo_cfg() continue; strcpy(str,p); p=str; - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; if(!*p) continue; *p=0; @@ -376,11 +376,11 @@ void read_echo_cfg() if(i==cfg.arcdefs) /* i = number of arcdef til done */ i=0xffff; /* Uncompressed type if not found */ while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!*p) break; addr=atofaddr(p); - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -397,8 +397,8 @@ void read_echo_cfg() if(!*p) continue; addr=atofaddr(p); - while(*p && *p>SP) p++; /* Skip address */ - while(*p && *p<=SP) p++; /* Find beginning of password */ + while(*p && *p>' ') p++; /* Skip address */ + while(*p && *p<=' ') p++; /* Find beginning of password */ j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -416,15 +416,15 @@ void read_echo_cfg() continue; strcpy(str,p); p=str; - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; *p=0; p++; while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!*p) break; addr=atofaddr(p); - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -444,11 +444,11 @@ void read_echo_cfg() if(!stricmp(tmp,"SEND_NOTIFY")) { /* Nodes to send notify lists to */ while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!*p) break; addr=atofaddr(p); - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -474,11 +474,11 @@ void read_echo_cfg() else if(!stricmp(tmp,"DIRECT")) attr=ATTR_DIRECT; while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!*p) break; addr=atofaddr(p); - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -492,16 +492,16 @@ void read_echo_cfg() cfg.nodecfg[j].attr|=attr; } } if(!stricmp(tmp,"ROUTE_TO")) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(*p) { route_addr=atofaddr(p); - while(*p && *p>SP) p++; } + while(*p && *p>' ') p++; } while(*p) { - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; if(!*p) break; addr=atofaddr(p); - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; j=matchnode(addr,1); if(j==cfg.nodecfgs) { cfg.nodecfgs++; @@ -529,19 +529,19 @@ void read_echo_cfg() memset(&cfg.nodecfg[i],0,sizeof(nodecfg_t)); cfg.nodecfg[i].faddr=addr; } cfg.nodecfg[i].flag=NULL; - while(*p && *p>SP) p++; /* Get to the end of the address */ - while(*p && *p<=SP) p++; /* Skip over whitespace chars */ + while(*p && *p>' ') p++; /* Get to the end of the address */ + while(*p && *p<=' ') p++; /* Skip over whitespace chars */ tp=p; - while(*p && *p>SP) p++; /* Find end of password */ + while(*p && *p>' ') p++; /* Find end of password */ *p=0; /* and terminate the string */ ++p; sprintf(cfg.nodecfg[i].password,"%-.25s",tp); - while(*p && *p<=SP) p++; /* Search for more chars */ + while(*p && *p<=' ') p++; /* Search for more chars */ if(!*p) /* Nothing else there */ continue; while(*p) { tp=p; - while(*p && *p>SP) p++; /* Find end of this flag */ + while(*p && *p>' ') p++; /* Find end of this flag */ *p=0; /* and terminate it */ ++p; for(j=0;j<cfg.nodecfg[i].numflags;j++) @@ -557,7 +557,7 @@ void read_echo_cfg() bail(1); } cfg.nodecfg[i].numflags++; sprintf(cfg.nodecfg[i].flag[j].flag,"%.4s",tp); } - while(*p && *p<=SP) p++; } } + while(*p && *p<=' ') p++; } } if(!stricmp(tmp,"ECHOLIST")) { /* Echolists go here */ if((cfg.listcfg=(echolist_t *)REALLOC(cfg.listcfg @@ -571,35 +571,35 @@ void read_echo_cfg() if(!strnicmp(p,"FORWARD ",8) || !strnicmp(p,"HUB ",4)) { if(!strnicmp(p,"HUB ",4)) cfg.listcfg[cfg.listcfgs-1].misc|=NOFWD; - while(*p && *p>SP) p++; - while(*p && *p<=SP) p++; + while(*p && *p>' ') p++; + while(*p && *p<=' ') p++; if(*p) cfg.listcfg[cfg.listcfgs-1].forward=atofaddr(p); - while(*p && *p>SP) p++; - while(*p && *p<=SP) p++; + while(*p && *p>' ') p++; + while(*p && *p<=' ') p++; if(*p && !(cfg.listcfg[cfg.listcfgs-1].misc&NOFWD)) { tp=p; - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; *p=0; ++p; - while(*p && *p<=SP) p++; + while(*p && *p<=' ') p++; SAFECOPY(cfg.listcfg[cfg.listcfgs-1].password,tp); } } else cfg.listcfg[cfg.listcfgs-1].misc|=NOFWD; if(!*p) continue; tp=p; - while(*p && *p>SP) p++; + while(*p && *p>' ') p++; *p=0; p++; sprintf(cfg.listcfg[cfg.listcfgs-1].listpath,"%-.128s",tp); cfg.listcfg[cfg.listcfgs-1].numflags=0; cfg.listcfg[cfg.listcfgs-1].flag=NULL; - while(*p && *p<=SP) p++; /* Skip over whitespace chars */ + while(*p && *p<=' ') p++; /* Skip over whitespace chars */ while(*p) { tp=p; - while(*p && *p>SP) p++; /* Find end of this flag */ + while(*p && *p>' ') p++; /* Find end of this flag */ *p=0; /* and terminate it */ ++p; for(j=0;j<cfg.listcfg[cfg.listcfgs-1].numflags;j++) @@ -615,7 +615,7 @@ void read_echo_cfg() bail(1); } cfg.listcfg[cfg.listcfgs-1].numflags++; sprintf(cfg.listcfg[cfg.listcfgs-1].flag[j].flag,"%.4s",tp); } - while(*p && *p<=SP) p++; } } + while(*p && *p<=' ') p++; } } // printf("Unrecognized line in SBBSECHO.CFG file.\n"); } diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c index 7a6554defb..c8bd52e6d0 100644 --- a/src/sbbs3/sbbsecho.c +++ b/src/sbbs3/sbbsecho.c @@ -3888,7 +3888,7 @@ void export_echomail(char *sub_code,faddr_t addr) else cr=0; if(scfg.sub[i]->misc&SUB_ASCII || misc&ASCII_ONLY) { - if(buf[l]<SP && buf[l]!='\r' + if(buf[l]<' ' && buf[l]!='\r' && buf[l]!='\n') /* Ctrl ascii */ buf[l]='.'; /* converted to '.' */ if((uchar)buf[l]>0x7f) /* extended ASCII */ diff --git a/src/sbbs3/scansubs.cpp b/src/sbbs3/scansubs.cpp index f0186aaea6..6f1d0a08f0 100644 --- a/src/sbbs3/scansubs.cpp +++ b/src/sbbs3/scansubs.cpp @@ -198,8 +198,8 @@ void sbbs_t::new_scan_ptr_cfg() bputs(text[CfgGrpLstHdr]); for(i=0;i<usrgrps && !msgabort();i++) { checkline(); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bprintf(text[CfgGrpLstFmt],i+1,cfg.grp[usrgrp[i]]->lname); } SYNC; mnemonics(text[WhichOrAll]); @@ -241,8 +241,8 @@ void sbbs_t::new_scan_ptr_cfg() bprintf(text[CfgSubLstHdr],cfg.grp[usrgrp[i]]->lname); for(j=0;j<usrsubs[i] && !msgabort();j++) { checkline(); - if(j<9) outchar(SP); - if(j<99) outchar(SP); + if(j<9) outchar(' '); + if(j<99) outchar(' '); t=getmsgtime(usrsub[i][j],subscan[usrsub[i][j]].ptr); if(t>(long)l) l=t; @@ -318,8 +318,8 @@ void sbbs_t::new_scan_cfg(ulong misc) bputs(text[CfgGrpLstHdr]); for(i=0;i<usrgrps && !msgabort();i++) { checkline(); - if(i<9) outchar(SP); - if(i<99) outchar(SP); + if(i<9) outchar(' '); + if(i<99) outchar(' '); bprintf(text[CfgGrpLstFmt],i+1,cfg.grp[usrgrp[i]]->lname); } SYNC; if(misc&SUB_CFG_NSCAN) @@ -336,8 +336,8 @@ void sbbs_t::new_scan_cfg(ulong misc) bprintf(text[CfgSubLstHdr],cfg.grp[usrgrp[i]]->lname); for(j=0;j<usrsubs[i] && !msgabort();j++) { checkline(); - if(j<9) outchar(SP); - if(j<99) outchar(SP); + if(j<9) outchar(' '); + if(j<99) outchar(' '); bprintf(text[CfgSubLstFmt],j+1 ,cfg.sub[usrsub[i][j]]->lname ,subscan[usrsub[i][j]].cfg&misc ? diff --git a/src/sbbs3/scfglib1.c b/src/sbbs3/scfglib1.c index b42826b8a3..9e0b60967b 100644 --- a/src/sbbs3/scfglib1.c +++ b/src/sbbs3/scfglib1.c @@ -272,8 +272,8 @@ BOOL read_main_cfg(scfg_t* cfg, char* error) get_int(cfg->new_shell,instream); get_int(cfg->new_misc,instream); get_int(cfg->new_prot,instream); - if(cfg->new_prot<SP) - cfg->new_prot=SP; + if(cfg->new_prot<' ') + cfg->new_prot=' '; get_int(cfg->new_install,instream); for(i=0;i<7;i++) get_int(n,instream); diff --git a/src/sbbs3/scfglib2.c b/src/sbbs3/scfglib2.c index 1e94d74688..6dd67a3c69 100644 --- a/src/sbbs3/scfglib2.c +++ b/src/sbbs3/scfglib2.c @@ -866,7 +866,7 @@ char *ltoaf(long l,char *str) while(c<26) { if(l&(long)(1L<<c)) str[c]='A'+c; - else str[c]=SP; + else str[c]=' '; c++; } str[c]=0; diff --git a/src/sbbs3/sortdir.cpp b/src/sbbs3/sortdir.cpp index d137852532..70ca52becd 100644 --- a/src/sbbs3/sortdir.cpp +++ b/src/sbbs3/sortdir.cpp @@ -155,7 +155,7 @@ void sbbs_t::resort(uint dirnum) newoffset=(ulong)i*(ulong)F_LEN; j=datbuf[offset+F_MISC]; /* misc bits */ - if(j!=ETX) j-=SP; + if(j!=ETX) j-=' '; if(j&FM_EXTDESC) { /* extended description */ lseek(exbfile,(offset/F_LEN)*512L,SEEK_SET); memset(ext,0,512); diff --git a/src/sbbs3/str.cpp b/src/sbbs3/str.cpp index e8f7aa9f27..c0d4f48a41 100644 --- a/src/sbbs3/str.cpp +++ b/src/sbbs3/str.cpp @@ -504,7 +504,7 @@ size_t sbbs_t::gettmplt(char *strout,char *templt, long mode) } while(c<t) { if(tmplt[c]=='N' || tmplt[c]=='A' || tmplt[c]=='!') - outchar(SP); + outchar(' '); else outchar(tmplt[c]); c++; @@ -715,7 +715,7 @@ bool sbbs_t::chkpass(char *pass, user_t* user, bool unique) strcpy(alias,user->alias); strupr(alias); strcpy(first,alias); - p=strchr(first,SP); + p=strchr(first,' '); if(p) { *p=0; strcpy(last,p+1); diff --git a/src/sbbs3/str_util.c b/src/sbbs3/str_util.c index 417e3197e9..e31517c8cf 100644 --- a/src/sbbs3/str_util.c +++ b/src/sbbs3/str_util.c @@ -67,7 +67,7 @@ char* DLLCALL strip_ctrl(char *str) for(i=j=0;str[i] && j<(int)sizeof(tmp)-1;i++) { if(str[i]==CTRL_A && str[i+1]!=0) i++; - else if((uchar)str[i]>=SP) + else if((uchar)str[i]>=' ') tmp[j++]=str[i]; } if(i!=j) { @@ -98,14 +98,14 @@ char* DLLCALL prep_file_desc(char *str) for(i=j=0;str[i];i++) if(str[i]==CTRL_A && str[i+1]!=0) i++; - else if(j && str[i]<=SP && tmp[j-1]==SP) + else if(j && str[i]<=' ' && tmp[j-1]==' ') continue; else if(i && !isalnum(str[i]) && str[i]==str[i-1]) continue; - else if((uchar)str[i]>=SP) + else if((uchar)str[i]>=' ') tmp[j++]=str[i]; else if(str[i]==TAB || (str[i]==CR && str[i+1]==LF)) - tmp[j++]=SP; + tmp[j++]=' '; tmp[j]=0; strcpy(str,tmp); return(str); @@ -501,7 +501,7 @@ ushort DLLCALL subject_crc(char *subj) while(!strnicmp(subj,"RE:",3)) { subj+=3; - while(*subj==SP) + while(*subj==' ') subj++; } diff --git a/src/sbbs3/text_sec.cpp b/src/sbbs3/text_sec.cpp index 4ddcd66b31..42983587fa 100644 --- a/src/sbbs3/text_sec.cpp +++ b/src/sbbs3/text_sec.cpp @@ -71,7 +71,7 @@ int sbbs_t::text_sec() bputs(text[TextSectionLstHdr]); for(i=0;i<usrsecs && !msgabort();i++) { sprintf(str,text[TextSectionLstFmt],i+1,cfg.txtsec[usrsec[i]]->name); - if(i<9) outchar(SP); + if(i<9) outchar(' '); bputs(str); } } ASYNC; mnemonics(text[WhichTextSection]); diff --git a/src/sbbs3/tmp_xfer.cpp b/src/sbbs3/tmp_xfer.cpp index c567ba7a99..0f5e01daf8 100644 --- a/src/sbbs3/tmp_xfer.cpp +++ b/src/sbbs3/tmp_xfer.cpp @@ -100,7 +100,7 @@ void sbbs_t::temp_xfer() bputs(text[TempDirPrompt]); strcpy(f.uler,temp_uler); ch=(char)getkeys("ADEFNILQRVX?\r",0); - if(ch>SP) + if(ch>' ') logch(ch,0); switch(ch) { case 'A': /* add to temp file */ diff --git a/src/sbbs3/uedit/uedit.c b/src/sbbs3/uedit/uedit.c index b93a308edd..ef80571127 100644 --- a/src/sbbs3/uedit/uedit.c +++ b/src/sbbs3/uedit/uedit.c @@ -36,7 +36,6 @@ ****************************************************************************/ #include "sbbs.h" -#include "conwrap.h" /* this has to go BEFORE curses.h so getkey() can be macroed around */ #include <sys/types.h> #include <time.h> #ifdef __QNX__ @@ -45,12 +44,12 @@ #include <stdio.h> #ifdef __unix__ #include <unistd.h> -#include <curses.h> #include <sys/time.h> #include <signal.h> #endif #include "genwrap.h" #include "uifc.h" +#include "curs_fix.h" #include "sbbsdefs.h" #include "genwrap.h" /* stricmp */ #include "dirwrap.h" /* lock/unlock/sopen */ diff --git a/src/sbbs3/upload.cpp b/src/sbbs3/upload.cpp index 90581685fc..c8b033942d 100644 --- a/src/sbbs3/upload.cpp +++ b/src/sbbs3/upload.cpp @@ -167,7 +167,7 @@ bool sbbs_t::uploadfile(file_t *f) memset(ext,0,F_EXBSIZE+1); read(file,ext,F_EXBSIZE); for(i=F_EXBSIZE;i;i--) - if(ext[i-1]>SP) + if(ext[i-1]>' ') break; ext[i]=0; if(!f->desc[0]) { diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index 9c3d9abc55..946be13573 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -293,10 +293,10 @@ int DLLCALL getuserdat(scfg_t* cfg, user_t *user) user->rows=10; user->sex=userdat[U_SEX]; if(!user->sex) - user->sex=SP; /* fix for v1b04 that could save as 0 */ + user->sex=' '; /* fix for v1b04 that could save as 0 */ user->prot=userdat[U_PROT]; - if(user->prot<SP) - user->prot=SP; + if(user->prot<' ') + user->prot=' '; getrec(userdat,U_MISC,8,str); user->misc=ahtoul(str); if(user->rest&FLAG('Q')) user->misc&=~SPIN; @@ -327,7 +327,7 @@ int DLLCALL getuserdat(scfg_t* cfg, user_t *user) user->shell=i; getrec(userdat,U_QWK,8,str); - if(str[0]<SP) { /* v1c, so set defaults */ + if(str[0]<' ') { /* v1c, so set defaults */ if(user->rest&FLAG('Q')) user->qwk=(QWK_RETCTLA); else diff --git a/src/sbbs3/useredit.cpp b/src/sbbs3/useredit.cpp index 990a0f5442..de395ec5a7 100644 --- a/src/sbbs3/useredit.cpp +++ b/src/sbbs3/useredit.cpp @@ -119,7 +119,7 @@ void sbbs_t::useredit(int usernumber) sprintf(str,"%suser/%4.4u.msg", cfg.data_dir,user.number); i=fexist(str); if(user.comment[0] || i) - bprintf(text[UeditCommentLine],i ? '+' : SP + bprintf(text[UeditCommentLine],i ? '+' : ' ' ,user.comment); else CRLF; @@ -803,7 +803,7 @@ void sbbs_t::maindflts(user_t* user) if(useron.exempt&FLAG('Q') || user->misc&QUIET) bprintf(text[UserDefaultsQuiet] ,user->misc&QUIET ? text[On] : text[Off]); - if(user->prot!=SP) + if(user->prot!=' ') sprintf(str,"%c",user->prot); else strcpy(str,"None"); @@ -1008,7 +1008,7 @@ void sbbs_t::maindflts(user_t* user) strcat(str,tmp); } ch=(char)getkeys(str,0); if(ch=='Q' || sys_status&SS_ABORT) { - ch=SP; + ch=' '; putuserrec(&cfg,user->number,U_PROT,1,&ch); } else putuserrec(&cfg,user->number,U_PROT,1,&ch); diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp index f98f5cf840..02fce521a7 100644 --- a/src/sbbs3/writemsg.cpp +++ b/src/sbbs3/writemsg.cpp @@ -183,7 +183,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum break; p=quote; while(p) { - if(*p==',' || *p==SP) + if(*p==',' || *p==' ') p++; i=atoi(p); if(!i) @@ -217,7 +217,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum } } p=strchr(p,','); - // if(!p) p=strchr(p,SP); 02/05/96 huh? + // if(!p) p=strchr(p,' '); 02/05/96 huh? } } @@ -426,7 +426,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum if(!(mode&(WM_EMAIL|WM_NETMAIL)) && (!l || buf[l-1]==LF) && buf[l]=='-' && buf[l+1]=='-' && buf[l+2]=='-' - && (buf[l+3]==SP || buf[l+3]==TAB || buf[l+3]==CR)) + && (buf[l+3]==' ' || buf[l+3]==TAB || buf[l+3]==CR)) buf[l+1]='+'; if(buf[l]==LF) i++; @@ -466,7 +466,7 @@ void quotestr(char *str) int j; j=strlen(str); - while(j && (str[j-1]==SP || str[j-1]==LF || str[j-1]==CR)) j--; + while(j && (str[j-1]==' ' || str[j-1]==LF || str[j-1]==CR)) j--; str[j]=0; remove_ctrl_a(str,NULL); } @@ -621,9 +621,9 @@ ulong sbbs_t::msgeditor(char *buf, char *top, char *title) } if(buf[l]==TAB) { if(!(i%8)) /* hard-coded tabstop of 8 */ - str[lines][i++]=SP; /* for expansion */ + str[lines][i++]=' '; /* for expansion */ while(i%8 && i<79) - str[lines][i++]=SP; + str[lines][i++]=' '; i--; /*** bprintf("\r\nMessage editor: Expanded tab on line #%d",lines+1); @@ -975,7 +975,7 @@ void sbbs_t::copyfattach(uint to, uint from, char *title) strcpy(str,title); tp=str; while(1) { - p=strchr(tp,SP); + p=strchr(tp,' '); if(p) *p=0; sp=strrchr(tp,'/'); /* sp is slash pointer */ if(!sp) sp=strrchr(tp,'\\'); diff --git a/src/sbbs3/xtrn.cpp b/src/sbbs3/xtrn.cpp index e44c521232..0076954122 100644 --- a/src/sbbs3/xtrn.cpp +++ b/src/sbbs3/xtrn.cpp @@ -259,7 +259,7 @@ BYTE* telnet_expand(BYTE* inbuf, ulong inlen, BYTE* outbuf, ulong& newlen) #define XTRN_LOADABLE_MODULE \ if(cmdline[0]=='*') { /* Baja module or JavaScript */ \ SAFECOPY(str,cmdline+1); \ - p=strchr(str,SP); \ + p=strchr(str,' '); \ if(p) { \ strcpy(main_csi.str,p+1); \ *p=0; \ @@ -1659,7 +1659,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir) argv[0]=fullcmdline; /* point to the beginning of the string */ argc=1; for(i=0;fullcmdline[i] && argc<MAX_ARGS;i++) /* Break up command line */ - if(fullcmdline[i]==SP) { + if(fullcmdline[i]==' ') { fullcmdline[i]=0; /* insert nulls */ argv[argc++]=fullcmdline+i+1; /* point to the beginning of the next arg */ } diff --git a/src/sbbs3/xtrn_sec.cpp b/src/sbbs3/xtrn_sec.cpp index dafa728018..61dd003c75 100644 --- a/src/sbbs3/xtrn_sec.cpp +++ b/src/sbbs3/xtrn_sec.cpp @@ -620,7 +620,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft } strcpy(tmp,cfg.sys_op); - p=strchr(tmp,SP); + p=strchr(tmp,' '); if(p) *(p++)=0; else @@ -638,7 +638,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft write(file,str,strlen(str)); strcpy(tmp,name); - p=strchr(tmp,SP); + p=strchr(tmp,' '); if(p) *(p++)=0; else @@ -916,7 +916,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft ,0 /* Printer on/off */ ,sys_status&SS_SYSPAGE ? -1:0 /* Page Bell on/off */ ,cfg.node_misc&NM_ANSALARM ? -1:0 /* Caller Alarm on/off */ - ,SP /* Sysop next flag */ + ,' ' /* Sysop next flag */ ,0 /* Error corrected */ ,useron.misc&NO_EXASCII ? '7' /* Graphics mode */ : (useron.misc&(COLOR|ANSI))==(COLOR|ANSI) ? 'Y':'N' @@ -929,7 +929,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft write(file,&useron.number,2); /* User record number */ strcpy(tmp,name); - p=strchr(tmp,SP); + p=strchr(tmp,' '); if(p) *p=0; sprintf(str,"%-15.15s%-12s" ,tmp /* User's first name */ @@ -987,8 +987,8 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft sprintf(str,"%d%c%c%d%s%c%c%d%d%d%c%c" ,cfg.com_port /* COM Port number */ - ,SP /* Reserved */ - ,SP /* "" */ + ,' ' /* Reserved */ + ,' ' /* "" */ ,(useron.misc&ANSI)==ANSI /* 1=ANSI 0=NO ANSI */ ,"01-01-80" /* last event date */ ,0,0 /* last event minute */ @@ -1119,7 +1119,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft +(long)tm.tm_sec; strcpy(tmp,name); - if((p=strchr(tmp,SP))!=NULL) + if((p=strchr(tmp,' '))!=NULL) *p=0; sprintf(str,"%u\n%s\n%s\n%s\n%lu\n%u\n%lu\n%lu\n" -- GitLab