A typo in src/gtkfilesel.stub of Gauche-gtk prevents
it from compiling when you're using Gauche in UTF-8
character encoding.   A patch is provided by TAGA Yoshitaka.

--shiro



*** src/gtkfilesel.stub	Sat Sep 14 15:20:02 2002
--- src/gtkfilesel.stub~	Fri Sep 13 09:04:43 2002
***************
*** 3,9 ****
  (include "gtk-lib.types")
  "#include \"gauche-gtk.h\""
  
! (define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>) "const gchar *fn_mb = gtk_file_selection_get_filename(sel);\n  gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL);\n  if (fn_utf8 == NULL) {\n    Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb);\n  }\n#ifdef GAUCHE_CHAR_ENCODING_UTF_8\n  SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8));\n#else\n  SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));\n#endif")
  
  (define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>) "gchar **fns_mb = gtk_file_selection_get_selections(sel);\n  ScmObj h = SCM_NIL, t = SCM_NIL;\n  for (; *fns_mb; fns_mb++) {\n    gchar *fn_utf8 = g_filename_to_utf8(*fns_mb, -1, NULL, NULL, NULL);\n    if (fn_utf8 == NULL) {\n      Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", *fns_mb);\n    }\n#ifdef GAUCHE_CHAR_ENCODING_UTF_8\n    SCM_APPEND(h, t, SCM_MAKE_STR_COPYING(fn_utf8));\n#else\n    SCM_APPEND(h, t, Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));\n#endif\n  }\n  g_strfreev(fns_mb);\n  SCM_RETURN(h);")
  
--- 3,9 ----
  (include "gtk-lib.types")
  "#include \"gauche-gtk.h\""
  
! (define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>) "const gchar *fn_mb = gtk_file_selection_get_filename(sel);\n  gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL);\n  if (fn_utf8 == NULL) {\n    Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb);\n  }\n#ifdef GAUCHE_CHAR_ENCODING_UTF_8\n  SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8);\n#else\n  SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));\n#endif")
  
  (define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>) "gchar **fns_mb = gtk_file_selection_get_selections(sel);\n  ScmObj h = SCM_NIL, t = SCM_NIL;\n  for (; *fns_mb; fns_mb++) {\n    gchar *fn_utf8 = g_filename_to_utf8(*fns_mb, -1, NULL, NULL, NULL);\n    if (fn_utf8 == NULL) {\n      Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", *fns_mb);\n    }\n#ifdef GAUCHE_CHAR_ENCODING_UTF_8\n    SCM_APPEND(h, t, SCM_MAKE_STR_COPYING(fn_utf8));\n#else\n    SCM_APPEND(h, t, Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE));\n#endif\n  }\n  g_strfreev(fns_mb);\n  SCM_RETURN(h);")
  
