diff options
Diffstat (limited to 'output.h')
-rw-r--r-- | output.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -73,13 +73,34 @@ enum void set_color( int c, int c2 ); + +#define writembs( mbs ) \ + { \ + char *tmp = mbs; \ + if( tmp ) \ + { \ + writembs_internal( tmp ); \ + } \ + else \ + { \ + debug( 0, \ + _(L"Tried to use terminfo string %s on line %d of %s, which is undefined in terminal of type \"%ls\". Please report this error to %s"), \ + #mbs, \ + __LINE__, \ + __FILE__, \ + output_get_term(), \ + PACKAGE_BUGREPORT); \ + } \ + } + + /** Write a char * narrow string to FD 1, needed for the terminfo strings. This is usually just a wrapper aound tputs, using writeb as the sending function. But a weird bug on PPC Linux means that on this platform, write is instead used directly. */ -int writembs( char *str ); +int writembs_internal( char *str ); /** Write a wide character using the output method specified using output_set_writer(). @@ -126,4 +147,7 @@ void output_set_writer( int (*writer)(char) ); int (*output_get_writer())(char) ; +void output_set_term( wchar_t *term ); +wchar_t *output_get_term(); + #endif |