谁使用过S-lang
图书馆 - 系统如何使用这种结构?屏幕的每个字节是否都由这个结构表示?我使用图书馆newt
,最后一个使用S-lang
.
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
} SLsmg_Char_Type;
屏幕的每个单元格(不是“字节”)由 表示SLsmg_Char_Type
。
SLsmg_char_at的文档是这样说的:
int SLsmg_char_at(SLsmg_Char_Type *ch);
Returns the character and its attributes at the current
position. The SLsmg_Char_Type object is a structure
representing the character cell:
#define SLSMG_MAX_CHARS_PER_CELL 5
typedef struct
{
unsigned int nchars;
SLwchar_Type wchars[SLSMG_MAX_CHARS_PER_CELL];
SLsmg_Color_Type color;
}
SLsmg_Char_Type;