Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 7ba14a3e authored by rswindell's avatar rswindell

Another outchar(enum unicode_codepoint, ...) variant method which supports a

string (multiple) CP437 fallback chars, for when a single CP437 char won't
suffice.
parent 55faaef3
...@@ -592,7 +592,7 @@ int sbbs_t::outchar(char ch) ...@@ -592,7 +592,7 @@ int sbbs_t::outchar(char ch)
return 0; return 0;
} }
int sbbs_t::outchar(enum unicode_codepoint codepoint, char cp437_fallback) int sbbs_t::outchar(enum unicode_codepoint codepoint, char* cp437_fallback)
{ {
if(term_supports(UTF8)) { if(term_supports(UTF8)) {
char str[UTF8_MAX_LEN]; char str[UTF8_MAX_LEN];
...@@ -603,9 +603,15 @@ int sbbs_t::outchar(enum unicode_codepoint codepoint, char cp437_fallback) ...@@ -603,9 +603,15 @@ int sbbs_t::outchar(enum unicode_codepoint codepoint, char cp437_fallback)
inc_column(unicode_width(codepoint)); inc_column(unicode_width(codepoint));
return 0; return 0;
} }
if(cp437_fallback == 0) if(cp437_fallback == NULL)
return 0; return 0;
return outchar(cp437_fallback); return bputs(cp437_fallback);
}
int sbbs_t::outchar(enum unicode_codepoint codepoint, char cp437_fallback)
{
char str[2] = { cp437_fallback, '\0' };
return outchar(codepoint, str);
} }
void sbbs_t::inc_column(int count) void sbbs_t::inc_column(int count)
......
...@@ -716,7 +716,8 @@ public: ...@@ -716,7 +716,8 @@ public:
; ;
void backspace(void); /* Output a destructive backspace via outchar */ void backspace(void); /* Output a destructive backspace via outchar */
int outchar(char ch); /* Output a char - check echo and emu. */ int outchar(char ch); /* Output a char - check echo and emu. */
int outchar(enum unicode_codepoint, char cp437_fallback = 0); int outchar(enum unicode_codepoint, char cp437_fallback);
int outchar(enum unicode_codepoint, char* cp437_fallback = NULL);
void inc_column(int count); void inc_column(int count);
void center(char *str); void center(char *str);
void wide(const char*); void wide(const char*);
......
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