{
/* Version number */
case gestalt_Version:
- return MAJOR_VERSION << 16 + MINOR_VERSION << 8 + SUB_VERSION;
+ return (MAJOR_VERSION << 16) + (MINOR_VERSION << 8) + SUB_VERSION;
/* Which characters can we print? */
case gestalt_CharOutput:
g_return_if_fail(str->file_mode != filemode_Read);
/* Convert ch to a null-terminated string, call glk_put_string_stream() */
- gchar *s = g_strndup(&ch, 1);
+ gchar *s = g_strndup((gchar *)&ch, 1);
glk_put_string_stream(str, s);
g_free(s);
}
convert_latin1_to_utf8(gchar *s)
{
GError *error = NULL;
+ gchar *utf8;
gchar *canonical = remove_latin1_control_characters(s);
utf8 = g_convert(canonical, -1, "UTF-8", "ISO-8859-1", NULL, NULL, &error);
g_free(canonical);
GtkTextIter iter;
gtk_text_buffer_get_end_iter(buffer, &iter);
- gtk_text_buffer_insert(buffer, &iter, utf8, -1);
+ gtk_text_buffer_insert(buffer, &iter, s, -1);
}
/**
glk_window_get_type(winid_t win)
{
g_return_val_if_fail(win != NULL, 0);
- return win->wintype;
+ return win->window_type;
}
/**
{
g_return_if_fail(win != NULL);
- switch(win->wintype)
+ switch(win->window_type)
{
case wintype_Blank:
/* do nothing */
case wintype_TextBuffer:
/* delete all text in the window */
{
- GtkTextBuffer *buffer = gtk_text_view_get_buffer(
- GTK_TEXT_VIEW(current_stream->window->widget) );
+ GtkTextBuffer *buffer =
+ gtk_text_view_get_buffer( GTK_TEXT_VIEW(win->widget) );
GtkTextIter start, end;
gtk_text_buffer_get_bounds(buffer, &start, &end);
gtk_text_buffer_delete(buffer, &start, &end);