return term_data_untrusted(inst->term, data, len);
}
+int from_backend_eof(void *frontend)
+{
+ return TRUE; /* do respond to incoming EOF with outgoing */
+}
+
int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
{
struct gui_data *inst = (struct gui_data *)p->frontend;
*/
output_charset = CS_UTF8;
{
- wchar_t widedata[32], *wp;
+ wchar_t widedata[32];
+ const wchar_t *wp;
int wlen;
int ulen;
* if we aren't in direct-to-font mode using the D800 hack.
*/
if (!inst->direct_to_font) {
- wchar_t *tmp = data;
+ const wchar_t *tmp = data;
int tmplen = len;
XTextProperty tp;
char *list[1];
rlen*widefactor*inst->font_width, inst->font_height);
gdk_gc_set_foreground(gc, &inst->cols[nfg]);
- {
- gchar *gcs;
-
- /*
- * FIXME: this length is hardwired on the assumption that
- * conversions from wide to multibyte characters will
- * never generate more than 10 bytes for a single wide
- * character.
- */
- gcs = snewn(len*10+1, gchar);
-
- for (combining = 0; combining < ncombining; combining++) {
- int mblen = wc_to_mb(inst->fonts[fontid]->real_charset, 0,
- text + combining, len, gcs, len*10+1, ".",
- NULL, NULL);
- unifont_draw_text(inst->pixmap, gc, inst->fonts[fontid],
- x*inst->font_width+inst->window_border,
- y*inst->font_height+inst->window_border+inst->fonts[0]->ascent,
- gcs, mblen, widefactor > 1, bold, inst->font_width);
- }
-
- sfree(gcs);
+ for (combining = 0; combining < ncombining; combining++) {
+ unifont_draw_text(inst->pixmap, gc, inst->fonts[fontid],
+ x*inst->font_width+inst->window_border,
+ y*inst->font_height+inst->window_border+inst->fonts[0]->ascent,
+ text + combining, len, widefactor > 1,
+ bold, inst->font_width);
}
if (attr & ATTR_UNDER) {
unifont_destroy(inst->fonts[3]);
fs = conf_get_fontspec(inst->conf, CONF_font);
- inst->fonts[0] = unifont_create(inst->area, fs->name, FALSE, FALSE,
- shadowboldoffset, shadowbold);
+ inst->fonts[0] = multifont_create(inst->area, fs->name, FALSE, FALSE,
+ shadowboldoffset, shadowbold);
if (!inst->fonts[0]) {
fprintf(stderr, "%s: unable to load font \"%s\"\n", appname,
fs->name);
if (shadowbold || !fs->name[0]) {
inst->fonts[1] = NULL;
} else {
- inst->fonts[1] = unifont_create(inst->area, fs->name, FALSE, TRUE,
- shadowboldoffset, shadowbold);
+ inst->fonts[1] = multifont_create(inst->area, fs->name, FALSE, TRUE,
+ shadowboldoffset, shadowbold);
if (!inst->fonts[1]) {
fprintf(stderr, "%s: unable to load bold font \"%s\"\n", appname,
fs->name);
fs = conf_get_fontspec(inst->conf, CONF_widefont);
if (fs->name[0]) {
- inst->fonts[2] = unifont_create(inst->area, fs->name, TRUE, FALSE,
- shadowboldoffset, shadowbold);
+ inst->fonts[2] = multifont_create(inst->area, fs->name, TRUE, FALSE,
+ shadowboldoffset, shadowbold);
if (!inst->fonts[2]) {
fprintf(stderr, "%s: unable to load wide font \"%s\"\n", appname,
fs->name);
if (shadowbold || !fs->name[0]) {
inst->fonts[3] = NULL;
} else {
- inst->fonts[3] = unifont_create(inst->area, fs->name, TRUE, TRUE,
- shadowboldoffset, shadowbold);
+ inst->fonts[3] = multifont_create(inst->area, fs->name, TRUE, TRUE,
+ shadowboldoffset, shadowbold);
if (!inst->fonts[3]) {
fprintf(stderr, "%s: unable to load wide bold font \"%s\"\n", appname,
fs->name);
*/
if (strcmp(conf_get_str(oldconf, CONF_wintitle),
conf_get_str(newconf, CONF_wintitle)))
- set_title(inst, conf_get_str(oldconf, CONF_wintitle));
+ set_title(inst, conf_get_str(newconf, CONF_wintitle));
set_window_titles(inst);
/*