Commit 8a44af72 authored by rswindell's avatar rswindell
Browse files

Add support for %^ command-line specifer which expands to the system...

Add support for %^ command-line specifer which expands to the system architecture (e.g. "i686" for Win32 builds, "x64" for Linux-x86_64 builds).
Currently, there underlying XPDEV macro definition does not differentiate
between arm32 and arm64, but it should. Next...
parent 049499ad
......@@ -1832,7 +1832,7 @@ const char* quoted_string(const char* str, char* buf, size_t maxlen)
((isalpha(ch) && isupper(ch)) ? str : quoted_string(str,buf,maxlen))
/*****************************************************************************/
/* Returns command line generated from instr with %c replacments */
/* Returns command line generated from instr with %c replacements */
/*****************************************************************************/
char* sbbs_t::cmdstr(const char *instr, const char *fpath, const char *fspec, char *outstr)
{
......@@ -1983,6 +1983,9 @@ char* sbbs_t::cmdstr(const char *instr, const char *fpath, const char *fspec, ch
strlwr(str);
strncat(cmd,str, avail);
break;
case '^': /* Architecture */
strncat(cmd, ARCHITECTURE_DESC, avail);
break;
default: /* unknown specification */
if(isdigit(instr[i])) {
sprintf(str,"%0*d",instr[i]&0xf,useron.number);
......@@ -2148,6 +2151,9 @@ char* DLLCALL cmdstr(scfg_t* cfg, user_t* user, const char* instr, const char* f
strlwr(str);
strncat(cmd,str, avail);
break;
case '^': /* Architecture */
strncat(cmd, ARCHITECTURE_DESC, avail);
break;
default: /* unknown specification */
if(isdigit(instr[i]) && user!=NULL) {
sprintf(str,"%0*d",instr[i]&0xf,user->number);
......
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