From b437da196dae783a9fb85108f3d64ac7b2fc74b2 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 26 Apr 2019 00:33:57 +0000 Subject: [PATCH] Added support for PCBoard @ macros: - DELAY:nn (delay nn 10ths of a second) - POS:nn (move cursor to position nn, not sure if nn is 0 or 1-based) - CLREOL (same as CLR2EOL) - YESCHAR (the character/key for "Yes", from text.dat YNQP string) - NOCHAR (the character/key for "No', from text.dat YNQP string) and for good measure: - QUITCHAR (the character/key for "Quit") - not supported by PCBoard --- src/sbbs3/atcodes.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index 40c1e9b34c..7c78c252c0 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -345,6 +345,32 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen) return(nulstr); } + if(strncmp(sp, "POS:", 4) == 0) { // PCBoard (nn is 0 or 1 based?) + for(l = atoi(sp + 4) - column; l > 0; l--) + outchar(' '); + return nulstr; + } + + if(strncmp(sp, "DELAY:", 6) == 0) { // PCBoard + mswait(atoi(sp + 6) * 100); + return nulstr; + } + + if(strcmp(sp, "YESCHAR") == 0) { // PCBoard + safe_snprintf(str, maxlen, "%c", text[YNQP][0]); + return str; + } + + if(strcmp(sp, "NOCHAR") == 0) { // PCBoard + safe_snprintf(str, maxlen, "%c", text[YNQP][1]); + return str; + } + + if(strcmp(sp, "QUITCHAR") == 0) { + safe_snprintf(str, maxlen, "%c", text[YNQP][2]); + return str; + } + /* NOSTOP */ /* STOP */ @@ -707,7 +733,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen) return(nulstr); } - if(!strcmp(sp,"CLR2EOL")) { + if(!strcmp(sp,"CLR2EOL") || !strcmp(sp,"CLREOL")) { cleartoeol(); return(nulstr); } -- GitLab