Re: [dev] [st][PATCH] Add support for multiple charset definitions

From: Silvan Jegen <s.jegen_AT_gmail.com>
Date: Tue, 1 Oct 2013 22:14:37 +0200

Hi Roberto

On Tue, Oct 01, 2013 at 09:32:16PM +0200, Roberto E. Vargas Caballero wrote:
> vt100 has support for two defined charset, G0 and G1. Each charset
> can be defined, but in each moment is selected only one of both
> charset. This is usually used selecting a national charset in G0
> and graphic charset in G1, so you can switch between graphic
> charset and text charset without losing the national charset
> already defined.
>
> st hasn't support for national charsets, because it is an utf8
> based terminal emulator, but it has support for graphic
> charset because it is heavily used, but it only supports G0,
> without understanding G1 selection sequences, which causes some
> programs in some moments can print some garbage in the screen.
>
> This patch adds a fake support for multiple charset definitions,
> where we only support graphic charset and us-ascii charset, but
> we allow more of one charset definition.
>
> This patch allow define G0 until G3 charsets, but only accepts
> select G0 or G1, and it accepts some national charset definitions
> but all of them are mapped to us-ascii.
>
> [...]

I applied the patch to tip ( eeae9b0 ) but compilation fails due to
a redefinition of a the tsetchar function:


st.c:383:13: error: conflicting types for ‘tsetchar’
 static void tsetchar(void);
             ^
st.c:374:13: note: previous declaration of ‘tsetchar’ was here
 static void tsetchar(char *, Glyph *, int, int);
             ^
st.c:1548:1: error: conflicting types for ‘tsetchar’
 tsetchar(char *c, Glyph *attr, int x, int y) {
 ^
st.c:383:13: note: previous declaration of ‘tsetchar’ was here
 static void tsetchar(void);
             ^
st.c:2288:1: error: conflicting types for ‘tsetchar’
 tsetchar(void) {
 ^
st.c:1548:1: note: previous definition of ‘tsetchar’ was here
 tsetchar(char *c, Glyph *attr, int x, int y) {
 ^
st.c: In function ‘tputc’:
st.c:2430:7: error: too many arguments to function ‘tsetchar’
       tsetchar(E, &term.c.attr, x, y);
       ^
st.c:2288:1: note: declared here
 tsetchar(void) {
 ^
st.c:2544:2: error: too many arguments to function ‘tsetchar’
  tsetchar(c, &term.c.attr, term.c.x, term.c.y);
  ^
st.c:2288:1: note: declared here
 tsetchar(void) {
 ^
make: *** [st.o] Error 1


Am I missing something?


Cheers,

Silvan
Received on Tue Oct 01 2013 - 22:14:37 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 01 2013 - 22:24:07 CEST