Commit 66715684 authored by rswindell's avatar rswindell
Browse files

Finish the removal of Ctrl-AZ == EOF logic - wow, I didn't realize that feature

was so pervasive. I hope I don't regret changing this. Ctrl-AZ == Ctrl-Z just
"feels right" while Ctrl-AZ == EOF feels stoopid. :-/
parent 432a6c16
......@@ -91,7 +91,7 @@ int main(int argc, char **argv)
while((ch=fgetc(in))!=EOF) {
if(ch==CTRL_A) { /* ctrl-a */
ch=fgetc(in);
if(ch==EOF || toupper(ch)=='Z') /* EOF */
if(ch==EOF) /* EOF */
break;
if(ch>0x7f) { /* move cursor right x columns */
int cnt=ch-0x7f;
......
......@@ -57,8 +57,6 @@ int sbbs_t::bputs(const char *str)
while(str[l] && online) {
if(str[l]==CTRL_A && str[l+1]!=0) {
l++;
if(toupper(str[l])=='Z') /* EOF */
break;
ctrl_a(str[l++]);
continue;
}
......
......@@ -861,7 +861,7 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
while(l<length) {
if(qwkbuf[l]==CTRL_A) { /* Ctrl-A, so skip it and the next char */
l++;
if(l>=length || toupper(qwkbuf[l])=='Z') /* EOF */
if(l>=length)
break;
if((ch=ctrl_a_to_ascii_char(qwkbuf[l])) != 0)
write(fido,&ch,1);
......
......@@ -336,8 +336,6 @@ void sbbs_t::mnemonics(const char *str)
else {
if(str[l]==CTRL_A && str[l+1]!=0) {
l++;
if(toupper(str[l])=='Z') /* EOF */
break;
ctrl_a(str[l++]);
} else {
if(str[l] == '@') {
......
......@@ -2188,7 +2188,7 @@ js_html_encode(JSContext *cx, uintN argc, jsval *arglist)
hpos=0;
break;
case 'Z':
outbuf[j++]=0;
outbuf[j++]=CTRL_Z;
break;
case 'A':
default:
......
......@@ -379,7 +379,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, uint subnum
if(ch==CTRL_A) {
ch=buf[++l];
if(ch==0 || toupper(ch)=='Z') /* EOF */
if(ch==0)
break;
if((asc=ctrl_a_to_ascii_char(ch)) != 0) {
fputc(asc,qwk_fp);
......
......@@ -4831,7 +4831,7 @@ void export_echomail(const char* sub_code, const nodecfg_t* nodecfg, bool rescan
if(buf[l]==CTRL_A) { /* Ctrl-A, so skip it and the next char */
char ch;
l++;
if(buf[l]==0 || toupper(buf[l])=='Z') /* EOF */
if(buf[l]==0)
break;
if((ch=ctrl_a_to_ascii_char(buf[l])) != 0)
fmsgbuf[f++]=ch;
......
......@@ -52,8 +52,6 @@ char* DLLCALL remove_ctrl_a(const char *str, char *dest)
for(i=j=0;str[i];i++) {
if(str[i]==CTRL_A) {
i++;
if(str[i]==0 || toupper(str[i])=='Z') /* EOF */
break;
/* convert non-destructive backspace to a destructive backspace */
if(str[i]=='<' && j)
j--;
......@@ -73,8 +71,6 @@ char* DLLCALL strip_ctrl(const char *str, char* dest)
for(i=j=0;str[i];i++) {
if(str[i]==CTRL_A) {
i++;
if(str[i]==0 || toupper(str[i])=='Z') /* EOF */
break;
/* convert non-destructive backspace to a destructive backspace */
if(str[i]=='<' && j)
j--;
......@@ -121,8 +117,6 @@ char* DLLCALL prep_file_desc(const char *str, char* dest)
for(i=j=0;str[i];i++)
if(str[i]==CTRL_A && str[i+1]!=0) {
i++;
if(toupper(str[i])=='Z') /* EOF */
break;
/* convert non-destructive backspace to a destructive backspace */
if(str[i]=='<' && j)
j--;
......@@ -346,8 +340,6 @@ size_t bstrlen(const char *str)
while(*str) {
if(*str==CTRL_A) {
str++;
if(toupper(*str)=='Z') /* EOF */
break;
if(*str=='[')
i=0;
else if(*str=='<' && i)
......
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