From 21b625f09c3b5abcbe9c3b22d1b6a842247b8ff9 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 10 Jul 2019 05:59:02 +0000 Subject: [PATCH] New @-code format modifier: -D When appended to an @-code, displays it double-wide using "fullwidth" Unicode code points if possible, spaces between the characters otherwise. --- src/sbbs3/atcodes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index cf0c7c8b4f..ab6a424b75 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -60,6 +60,7 @@ int sbbs_t::show_atcode(const char *instr) bool centered=false; bool zero_padded=false; bool truncated = true; + bool doubled = false; const char *cp; SAFECOPY(str,instr); @@ -80,6 +81,8 @@ int sbbs_t::show_atcode(const char *instr) padded_right=true; else if((p=strstr(sp,"-C"))!=NULL) centered=true; + else if((p=strstr(sp,"-D"))!=NULL) + doubled=true; else if((p=strstr(sp,"-Z"))!=NULL) zero_padded=true; else if((p=strstr(sp,"-W"))!=NULL) /* wrap */ @@ -117,6 +120,8 @@ int sbbs_t::show_atcode(const char *instr) bprintf("%*s%-*s", left, "", disp_len - left, cp); } else bprintf("%.*s", disp_len, cp); + } else if(doubled) { + wide(cp); } else if(zero_padded) { int vlen = strlen(cp); if(vlen < disp_len) -- GitLab