/* Generated by genstub.  Do not edit. */
#include <gauche.h>
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_alloc_console(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_alloc_console__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_alloc_console, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_free_console(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_free_console__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_free_console, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_generate_console_ctrl_event(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_generate_console_ctrl_event__STUB, 2, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_generate_console_ctrl_event, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_create_console_screen_buffer(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_create_console_screen_buffer__STUB, 3, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_create_console_screen_buffer, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_active_screen_buffer(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_active_screen_buffer__STUB, 1, 0,SCM_FALSE,console_sys_set_console_active_screen_buffer, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_scroll_console_screen_buffer(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_scroll_console_screen_buffer__STUB, 6, 0,SCM_FALSE,console_sys_scroll_console_screen_buffer, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_cp(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_get_console_cp__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_get_console_cp, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_output_cp(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_get_console_output_cp__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_get_console_output_cp, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_cp(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_set_console_cp__STUB, 1, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_set_console_cp, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_output_cp(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_set_console_output_cp__STUB, 1, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_set_console_output_cp, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_cursor_info(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_get_console_cursor_info__STUB, 1, 0,SCM_FALSE,console_sys_get_console_cursor_info, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_cursor_info(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_cursor_info__STUB, 3, 0,SCM_FALSE,console_sys_set_console_cursor_info, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_cursor_position(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_cursor_position__STUB, 3, 0,SCM_FALSE,console_sys_set_console_cursor_position, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_mode(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_get_console_mode__STUB, 1, 0,SCM_FALSE,console_sys_get_console_mode, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_mode(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_mode__STUB, 2, 0,SCM_FALSE,console_sys_set_console_mode, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#include <gauche/class.h>
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
typedef struct ScmWinConsoleScreenBufferInfoRec {
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_HEADER;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  CONSOLE_SCREEN_BUFFER_INFO info;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
} ScmWinConsoleScreenBufferInfo;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
SCM_CLASS_DECL(Scm_WinConsoleScreenBufferInfoClass);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#define SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO_P(obj) SCM_XTYPEP(obj, &Scm_WinConsoleScreenBufferInfoClass)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#define SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(obj) ((ScmWinConsoleScreenBufferInfo*)obj)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj make_console_screen_buffer_info();
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_screen_buffer_info(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_get_console_screen_buffer_info__STUB, 1, 0,SCM_FALSE,console_sys_get_console_screen_buffer_info, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_largest_console_window_size(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_get_largest_console_window_size__STUB, 1, 0,SCM_FALSE,console_sys_get_largest_console_window_size, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_screen_buffer_size(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_screen_buffer_size__STUB, 3, 0,SCM_FALSE,console_sys_set_screen_buffer_size, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
typedef struct ScmWinInputRecordRec {
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_HEADER;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  INPUT_RECORD rec;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
} ScmWinInputRecord;
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
SCM_CLASS_DECL(Scm_WinInputRecordClass);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#define SCM_WIN_INPUT_RECORD_P(obj) SCM_XTYPEP(obj, &Scm_WinInputRecordClass)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#define SCM_WIN_INPUT_RECORD(obj) ((ScmWinInputRecord*)obj)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj make_input_record();
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_number_of_console_input_events(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_get_number_of_console_input_events__STUB, 1, 0,SCM_FALSE,console_sys_get_number_of_console_input_events, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_number_of_console_mouse_buttons(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_get_number_of_console_mouse_buttons__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_get_number_of_console_mouse_buttons, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_peek_console_input(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_peek_console_input__STUB, 1, 0,SCM_FALSE,console_sys_peek_console_input, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_read_console_input(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_read_console_input__STUB, 1, 0,SCM_FALSE,console_sys_read_console_input, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_read_console(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_read_console__STUB, 2, 0,SCM_FALSE,console_sys_read_console, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_read_console_output(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_read_console_output__STUB, 7, 0,SCM_FALSE,console_sys_read_console_output, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_read_console_output_attribute(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_read_console_output_attribute__STUB, 4, 0,SCM_FALSE,console_sys_read_console_output_attribute, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_read_console_output_character(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_read_console_output_character__STUB, 4, 0,SCM_FALSE,console_sys_read_console_output_character, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_text_attribute(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_text_attribute__STUB, 2, 0,SCM_FALSE,console_sys_set_console_text_attribute, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_window_info(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_console_window_info__STUB, 3, 0,SCM_FALSE,console_sys_set_console_window_info, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_write_console(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_write_console__STUB, 2, 0,SCM_FALSE,console_sys_write_console, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_write_console_output_character(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_write_console_output_character__STUB, 4, 0,SCM_FALSE,console_sys_write_console_output_character, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_fill_console_output_character(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_fill_console_output_character__STUB, 5, 0,SCM_FALSE,console_sys_fill_console_output_character, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_fill_console_output_attribute(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_fill_console_output_attribute__STUB, 5, 0,SCM_FALSE,console_sys_fill_console_output_attribute, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_flush_console_input_buffer(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_flush_console_input_buffer__STUB, 1, 0,SCM_FALSE,console_sys_flush_console_input_buffer, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_console_title(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_get_console_title__STUB, 0, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_get_console_title, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_console_title(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_set_console_title__STUB, 1, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_set_console_title, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_get_std_handle(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(console_sys_get_std_handle__STUB, 1, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, console_sys_get_std_handle, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)

static ScmObj console_sys_set_std_handle(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(console_sys_set_std_handle__STUB, 2, 0,SCM_FALSE,console_sys_set_std_handle, NULL, NULL);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(__CYGWIN__) || defined(GAUCHE_WINDOWS)
#define SCM_CGEN_CONST /*empty*/
#else
#define SCM_CGEN_CONST const
#endif
static SCM_CGEN_CONST struct scm__scRec {
#if defined(GAUCHE_WINDOWS)
  ScmString d1301[90];
#endif /*defined(GAUCHE_WINDOWS)*/
} scm__sc SCM_UNUSED = {
#if defined(GAUCHE_WINDOWS)
  {   /* ScmString d1301 */
      SCM_STRING_CONST_INITIALIZER("sys-alloc-console", 17, 17),
      SCM_STRING_CONST_INITIALIZER("source-info", 11, 11),
      SCM_STRING_CONST_INITIALIZER("console.stub", 12, 12),
      SCM_STRING_CONST_INITIALIZER("sys-free-console", 16, 16),
      SCM_STRING_CONST_INITIALIZER("CTRL_C_EVENT", 12, 12),
      SCM_STRING_CONST_INITIALIZER("CTRL_BREAK_EVENT", 16, 16),
      SCM_STRING_CONST_INITIALIZER("sys-generate-console-ctrl-event", 31, 31),
      SCM_STRING_CONST_INITIALIZER("event", 5, 5),
      SCM_STRING_CONST_INITIALIZER("pgid", 4, 4),
      SCM_STRING_CONST_INITIALIZER("GENERIC_READ", 12, 12),
      SCM_STRING_CONST_INITIALIZER("GENERIC_WRITE", 13, 13),
      SCM_STRING_CONST_INITIALIZER("FILE_SHARE_READ", 15, 15),
      SCM_STRING_CONST_INITIALIZER("FILE_SHARE_WRITE", 16, 16),
      SCM_STRING_CONST_INITIALIZER("sys-create-console-screen-buffer", 32, 32),
      SCM_STRING_CONST_INITIALIZER("console-buffer", 14, 14),
      SCM_STRING_CONST_INITIALIZER("desired-access", 14, 14),
      SCM_STRING_CONST_INITIALIZER("share-mode", 10, 10),
      SCM_STRING_CONST_INITIALIZER("inheritable", 11, 11),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-active-screen-buffer", 36, 36),
      SCM_STRING_CONST_INITIALIZER("h", 1, 1),
      SCM_STRING_CONST_INITIALIZER("sys-scroll-console-screen-buffer", 32, 32),
      SCM_STRING_CONST_INITIALIZER("handle", 6, 6),
      SCM_STRING_CONST_INITIALIZER("scroll-rectangle", 16, 16),
      SCM_STRING_CONST_INITIALIZER("clip-rectangle", 14, 14),
      SCM_STRING_CONST_INITIALIZER("x", 1, 1),
      SCM_STRING_CONST_INITIALIZER("y", 1, 1),
      SCM_STRING_CONST_INITIALIZER("fill", 4, 4),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-cp", 18, 18),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-output-cp", 25, 25),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-cp", 18, 18),
      SCM_STRING_CONST_INITIALIZER("cp", 2, 2),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-output-cp", 25, 25),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-cursor-info", 27, 27),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-cursor-info", 27, 27),
      SCM_STRING_CONST_INITIALIZER("size", 4, 4),
      SCM_STRING_CONST_INITIALIZER("visible", 7, 7),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-cursor-position", 31, 31),
      SCM_STRING_CONST_INITIALIZER("ENABLE_LINE_INPUT", 17, 17),
      SCM_STRING_CONST_INITIALIZER("ENABLE_ECHO_INPUT", 17, 17),
      SCM_STRING_CONST_INITIALIZER("ENABLE_PROCESSED_INPUT", 22, 22),
      SCM_STRING_CONST_INITIALIZER("ENABLE_WINDOW_INPUT", 19, 19),
      SCM_STRING_CONST_INITIALIZER("ENABLE_MOUSE_INPUT", 18, 18),
      SCM_STRING_CONST_INITIALIZER("ENABLE_PROCESSED_OUTPUT", 23, 23),
      SCM_STRING_CONST_INITIALIZER("ENABLE_WRAP_AT_EOL_OUTPUT", 25, 25),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-mode", 20, 20),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-mode", 20, 20),
      SCM_STRING_CONST_INITIALIZER("mode", 4, 4),
      SCM_STRING_CONST_INITIALIZER("FOREGROUND_BLUE", 15, 15),
      SCM_STRING_CONST_INITIALIZER("FOREGROUND_GREEN", 16, 16),
      SCM_STRING_CONST_INITIALIZER("FOREGROUND_RED", 14, 14),
      SCM_STRING_CONST_INITIALIZER("FOREGROUND_INTENSITY", 20, 20),
      SCM_STRING_CONST_INITIALIZER("BACKGROUND_BLUE", 15, 15),
      SCM_STRING_CONST_INITIALIZER("BACKGROUND_GREEN", 16, 16),
      SCM_STRING_CONST_INITIALIZER("BACKGROUND_RED", 14, 14),
      SCM_STRING_CONST_INITIALIZER("BACKGROUND_INTENSITY", 20, 20),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-screen-buffer-info", 34, 34),
      SCM_STRING_CONST_INITIALIZER("sys-get-largest-console-window-size", 35, 35),
      SCM_STRING_CONST_INITIALIZER("sys-set-screen-buffer-size", 26, 26),
      SCM_STRING_CONST_INITIALIZER("sys-get-number-of-console-input-events", 38, 38),
      SCM_STRING_CONST_INITIALIZER("sys-get-number-of-console-mouse-buttons", 39, 39),
      SCM_STRING_CONST_INITIALIZER("sys-peek-console-input", 22, 22),
      SCM_STRING_CONST_INITIALIZER("sys-read-console-input", 22, 22),
      SCM_STRING_CONST_INITIALIZER("sys-read-console", 16, 16),
      SCM_STRING_CONST_INITIALIZER("buf", 3, 3),
      SCM_STRING_CONST_INITIALIZER("sys-read-console-output", 23, 23),
      SCM_STRING_CONST_INITIALIZER("w", 1, 1),
      SCM_STRING_CONST_INITIALIZER("region", 6, 6),
      SCM_STRING_CONST_INITIALIZER("sys-read-console-output-attribute", 33, 33),
      SCM_STRING_CONST_INITIALIZER("sys-read-console-output-character", 33, 33),
      SCM_STRING_CONST_INITIALIZER("len", 3, 3),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-text-attribute", 30, 30),
      SCM_STRING_CONST_INITIALIZER("attr", 4, 4),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-window-info", 27, 27),
      SCM_STRING_CONST_INITIALIZER("absolute", 8, 8),
      SCM_STRING_CONST_INITIALIZER("window", 6, 6),
      SCM_STRING_CONST_INITIALIZER("sys-write-console", 17, 17),
      SCM_STRING_CONST_INITIALIZER("s", 1, 1),
      SCM_STRING_CONST_INITIALIZER("sys-write-console-output-character", 34, 34),
      SCM_STRING_CONST_INITIALIZER("sys-fill-console-output-character", 33, 33),
      SCM_STRING_CONST_INITIALIZER("c", 1, 1),
      SCM_STRING_CONST_INITIALIZER("sys-fill-console-output-attribute", 33, 33),
      SCM_STRING_CONST_INITIALIZER("sys-flush-console-input-buffer", 30, 30),
      SCM_STRING_CONST_INITIALIZER("sys-get-console-title", 21, 21),
      SCM_STRING_CONST_INITIALIZER("sys-set-console-title", 21, 21),
      SCM_STRING_CONST_INITIALIZER("STD_INPUT_HANDLE", 16, 16),
      SCM_STRING_CONST_INITIALIZER("STD_OUTPUT_HANDLE", 17, 17),
      SCM_STRING_CONST_INITIALIZER("STD_ERROR_HANDLE", 16, 16),
      SCM_STRING_CONST_INITIALIZER("sys-get-std-handle", 18, 18),
      SCM_STRING_CONST_INITIALIZER("which", 5, 5),
      SCM_STRING_CONST_INITIALIZER("sys-set-std-handle", 18, 18),
  },
#endif /*defined(GAUCHE_WINDOWS)*/
};
static struct scm__rcRec {
#if defined(GAUCHE_WINDOWS)
  ScmPair d1313[199] SCM_ALIGN_PAIR;
#endif /*defined(GAUCHE_WINDOWS)*/
#if defined(GAUCHE_WINDOWS)
  ScmObj d1312[126];
#endif /*defined(GAUCHE_WINDOWS)*/
} scm__rc SCM_UNUSED = {
#if defined(GAUCHE_WINDOWS)
  {   /* ScmPair d1313 */
       { SCM_NIL, SCM_NIL },
       { SCM_MAKE_INT(68U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[1])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[2])},
       { SCM_OBJ(&scm__rc.d1313[3]), SCM_NIL},
       { SCM_MAKE_INT(69U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[5])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[6])},
       { SCM_OBJ(&scm__rc.d1313[7]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[9])},
       { SCM_MAKE_INT(74U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[11])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[12])},
       { SCM_OBJ(&scm__rc.d1313[13]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[15])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[16])},
       { SCM_MAKE_INT(87U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[18])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[19])},
       { SCM_OBJ(&scm__rc.d1313[20]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(100U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[23])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[24])},
       { SCM_OBJ(&scm__rc.d1313[25]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[27])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[28])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[29])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[30])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[31])},
       { SCM_MAKE_INT(103U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[33])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[34])},
       { SCM_OBJ(&scm__rc.d1313[35]), SCM_NIL},
       { SCM_MAKE_INT(127U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[37])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[38])},
       { SCM_OBJ(&scm__rc.d1313[39]), SCM_NIL},
       { SCM_MAKE_INT(128U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[41])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[42])},
       { SCM_OBJ(&scm__rc.d1313[43]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(129U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[46])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[47])},
       { SCM_OBJ(&scm__rc.d1313[48]), SCM_NIL},
       { SCM_MAKE_INT(131U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[50])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[51])},
       { SCM_OBJ(&scm__rc.d1313[52]), SCM_NIL},
       { SCM_MAKE_INT(138U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[54])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[55])},
       { SCM_OBJ(&scm__rc.d1313[56]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[58])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[59])},
       { SCM_MAKE_INT(142U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[61])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[62])},
       { SCM_OBJ(&scm__rc.d1313[63]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[65])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[66])},
       { SCM_MAKE_INT(148U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[68])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[69])},
       { SCM_OBJ(&scm__rc.d1313[70]), SCM_NIL},
       { SCM_MAKE_INT(165U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[72])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[73])},
       { SCM_OBJ(&scm__rc.d1313[74]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[76])},
       { SCM_MAKE_INT(170U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[78])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[79])},
       { SCM_OBJ(&scm__rc.d1313[80]), SCM_NIL},
       { SCM_MAKE_INT(223U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[82])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[83])},
       { SCM_OBJ(&scm__rc.d1313[84]), SCM_NIL},
       { SCM_MAKE_INT(230U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[86])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[87])},
       { SCM_OBJ(&scm__rc.d1313[88]), SCM_NIL},
       { SCM_MAKE_INT(234U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[90])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[91])},
       { SCM_OBJ(&scm__rc.d1313[92]), SCM_NIL},
       { SCM_MAKE_INT(300U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[94])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[95])},
       { SCM_OBJ(&scm__rc.d1313[96]), SCM_NIL},
       { SCM_MAKE_INT(305U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[98])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[99])},
       { SCM_OBJ(&scm__rc.d1313[100]), SCM_NIL},
       { SCM_MAKE_INT(320U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[102])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[103])},
       { SCM_OBJ(&scm__rc.d1313[104]), SCM_NIL},
       { SCM_MAKE_INT(322U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[106])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[107])},
       { SCM_OBJ(&scm__rc.d1313[108]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[110])},
       { SCM_MAKE_INT(325U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[112])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[113])},
       { SCM_OBJ(&scm__rc.d1313[114]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[116])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[117])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[118])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[119])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[120])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[121])},
       { SCM_MAKE_INT(336U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[123])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[124])},
       { SCM_OBJ(&scm__rc.d1313[125]), SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[66])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[127])},
       { SCM_MAKE_INT(358U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[129])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[130])},
       { SCM_OBJ(&scm__rc.d1313[131]), SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[66])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[133])},
       { SCM_MAKE_INT(370U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[135])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[136])},
       { SCM_OBJ(&scm__rc.d1313[137]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[139])},
       { SCM_MAKE_INT(383U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[141])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[142])},
       { SCM_OBJ(&scm__rc.d1313[143]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[145])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[146])},
       { SCM_MAKE_INT(386U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[148])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[149])},
       { SCM_OBJ(&scm__rc.d1313[150]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[152])},
       { SCM_MAKE_INT(396U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[154])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[155])},
       { SCM_OBJ(&scm__rc.d1313[156]), SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[66])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[158])},
       { SCM_MAKE_INT(405U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[160])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[161])},
       { SCM_OBJ(&scm__rc.d1313[162]), SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[133])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[164])},
       { SCM_MAKE_INT(417U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[166])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[167])},
       { SCM_OBJ(&scm__rc.d1313[168]), SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[133])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[170])},
       { SCM_MAKE_INT(429U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[172])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[173])},
       { SCM_OBJ(&scm__rc.d1313[174]), SCM_NIL},
       { SCM_MAKE_INT(440U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[176])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[177])},
       { SCM_OBJ(&scm__rc.d1313[178]), SCM_NIL},
       { SCM_MAKE_INT(446U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[180])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[181])},
       { SCM_OBJ(&scm__rc.d1313[182]), SCM_NIL},
       { SCM_MAKE_INT(453U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[184])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[185])},
       { SCM_OBJ(&scm__rc.d1313[186]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(466U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[189])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[190])},
       { SCM_OBJ(&scm__rc.d1313[191]), SCM_NIL},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[193])},
       { SCM_MAKE_INT(475U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1301[2]), SCM_OBJ(&scm__rc.d1313[195])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1313[196])},
       { SCM_OBJ(&scm__rc.d1313[197]), SCM_NIL},
  },
#endif /*defined(GAUCHE_WINDOWS)*/
#if defined(GAUCHE_WINDOWS)
  {   /* ScmObj d1312 */
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
  },
#endif /*defined(GAUCHE_WINDOWS)*/
};
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_alloc_console(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-alloc-console");
  {

#line 68 "console.stub"
{BOOL G1302=AllocConsole();if ((G1302)==(0)){{Scm_SysError("AllocConsole failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_free_console(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-free-console");
  {

#line 69 "console.stub"
{BOOL G1314=FreeConsole();if ((G1314)==(0)){{Scm_SysError("FreeConsole failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_generate_console_ctrl_event(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj event_scm;
  int event;
  ScmObj pgid_scm;
  u_int pgid;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-generate-console-ctrl-event");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  event_scm = SCM_SUBRARGS[0];
  if (!SCM_INTEGERP(event_scm)) Scm_Error("C integer required, but got %S", event_scm);
  event = Scm_GetInteger(event_scm);
  pgid_scm = SCM_SUBRARGS[1];
  if (!SCM_UINTEGERP(pgid_scm)) Scm_Error("C integer required, but got %S", pgid_scm);
  pgid = Scm_GetIntegerU(pgid_scm);
  {

#line 76 "console.stub"
{BOOL G1315=GenerateConsoleCtrlEvent(((DWORD )(event)),((DWORD )(pgid)));if ((G1315)==(0)){{Scm_SysError("GenerateConsoleCtrlEvent failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_create_console_screen_buffer(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj desired_access_scm;
  int desired_access;
  ScmObj share_mode_scm;
  u_int share_mode;
  ScmObj inheritable_scm;
  int inheritable;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("sys-create-console-screen-buffer");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  desired_access_scm = SCM_SUBRARGS[0];
  if (!SCM_INTEGERP(desired_access_scm)) Scm_Error("C integer required, but got %S", desired_access_scm);
  desired_access = Scm_GetInteger(desired_access_scm);
  share_mode_scm = SCM_SUBRARGS[1];
  if (!SCM_UINTEGERP(share_mode_scm)) Scm_Error("C integer required, but got %S", share_mode_scm);
  share_mode = Scm_GetIntegerU(share_mode_scm);
  inheritable_scm = SCM_SUBRARGS[2];
  if (!SCM_BOOLP(inheritable_scm)) Scm_Error("boolean required, but got %S", inheritable_scm);
  inheritable = SCM_BOOL_VALUE(inheritable_scm);
  {
{
ScmObj SCM_RESULT;

#line 90 "console.stub"
{SECURITY_ATTRIBUTES sa;
if (inheritable){{
(sa).nLength=(sizeof(SECURITY_ATTRIBUTES)),
(sa).lpSecurityDescriptor=(NULL),
(sa).bInheritHandle=(TRUE);}}
{HANDLE G1316=
CreateConsoleScreenBuffer(desired_access,share_mode,
((inheritable)?(&(sa)):(NULL)),CONSOLE_TEXTMODE_BUFFER,NULL);if ((G1316)==(INVALID_HANDLE_VALUE)){{Scm_SysError("CreateConsoleScreenBuffer failed");}}SCM_RESULT=(Scm_MakeWinHandle(G1316,
#line 95 "console.stub"
scm__rc.d1312[15]));}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_active_screen_buffer(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-set-console-active-screen-buffer");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {

#line 101 "console.stub"
{BOOL G1317=SetConsoleActiveScreenBuffer(Scm_WinHandle(h,SCM_FALSE));if ((G1317)==(0)){{Scm_SysError("SetConsoleActiveScreenBuffer failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_scroll_console_screen_buffer(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj handle_scm;
  ScmObj handle;
  ScmObj scroll_rectangle_scm;
  ScmUVector* scroll_rectangle;
  ScmObj clip_rectangle_scm;
  ScmUVector* clip_rectangle;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj fill_scm;
  u_long fill;
  ScmObj SCM_SUBRARGS[6];
  SCM_ENTER_SUBR("sys-scroll-console-screen-buffer");
  for (int SCM_i=0; SCM_i<6; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  handle_scm = SCM_SUBRARGS[0];
  handle = (handle_scm);
  scroll_rectangle_scm = SCM_SUBRARGS[1];
  if (!SCM_S16VECTORP(scroll_rectangle_scm)) Scm_Error("s16vector required, but got %S", scroll_rectangle_scm);
  scroll_rectangle = SCM_S16VECTOR(scroll_rectangle_scm);
  clip_rectangle_scm = SCM_SUBRARGS[2];
  if (!SCM_MAYBE_P(SCM_S16VECTORP, clip_rectangle_scm)) Scm_Error("s16vector or #f required, but got %S", clip_rectangle_scm);
  clip_rectangle = SCM_MAYBE(SCM_S16VECTOR, clip_rectangle_scm);
  x_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[4];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  fill_scm = SCM_SUBRARGS[5];
  if (!SCM_UINTEGERP(fill_scm)) Scm_Error("C integer required, but got %S", fill_scm);
  fill = Scm_GetIntegerU(fill_scm);
  {

#line 109 "console.stub"
if ((SCM_UVECTOR_SIZE(scroll_rectangle))<(4)){{
Scm_Error("s16vector of minimum length 4 required for scroll-rectangle: %S",scroll_rectangle);}}

#line 112 "console.stub"
if ((clip_rectangle)&&((SCM_UVECTOR_SIZE(clip_rectangle))<(4))){{
Scm_Error("s16vector of minimum length 4 required for clip-rectangle: %S",clip_rectangle);}}

#line 115 "console.stub"
{COORD c;CHAR_INFO ci;
(c).X=(x),(c).Y=(y);
memcpy(&(ci),&(fill),sizeof(CHAR_INFO));
{BOOL G1318=ScrollConsoleScreenBuffer(
Scm_WinHandle(handle,SCM_FALSE),
((SMALL_RECT* )(SCM_UVECTOR_ELEMENTS(scroll_rectangle))),
((clip_rectangle)?(((SMALL_RECT* )(SCM_UVECTOR_ELEMENTS(clip_rectangle)))):(NULL)),c,
&(ci));if ((G1318)==(0)){{Scm_SysError("ScrollConsoleScreenBuffer failed");}}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_cp(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-get-console-cp");
  {
{
u_int SCM_RESULT;
{SCM_RESULT=(GetConsoleCP());goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_output_cp(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-get-console-output-cp");
  {
{
u_int SCM_RESULT;
{SCM_RESULT=(GetConsoleOutputCP());goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_cp(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj cp_scm;
  u_int cp;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-set-console-cp");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  cp_scm = SCM_SUBRARGS[0];
  if (!SCM_UINTEGERP(cp_scm)) Scm_Error("C integer required, but got %S", cp_scm);
  cp = Scm_GetIntegerU(cp_scm);
  {

#line 130 "console.stub"
{BOOL G1319=SetConsoleCP(cp);if ((G1319)==(0)){{Scm_SysError("SetConsoleCP failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_output_cp(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj cp_scm;
  u_int cp;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-set-console-output-cp");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  cp_scm = SCM_SUBRARGS[0];
  if (!SCM_UINTEGERP(cp_scm)) Scm_Error("C integer required, but got %S", cp_scm);
  cp = Scm_GetIntegerU(cp_scm);
  {

#line 132 "console.stub"
{BOOL G1320=SetConsoleOutputCP(cp);if ((G1320)==(0)){{Scm_SysError("SetConsoleOutputCP failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_cursor_info(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-console-cursor-info");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
int SCM_RESULT0;
int SCM_RESULT1;
{

#line 139 "console.stub"
{CONSOLE_CURSOR_INFO ci;
{BOOL G1321=GetConsoleCursorInfo(Scm_WinHandle(h,SCM_FALSE),&(ci));if ((G1321)==(0)){{Scm_SysError("GetConsoleCursorInfo failed");}}}
SCM_RESULT0=(((int )((ci).dwSize))),SCM_RESULT1=((ci).bVisible);}
}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_Values2(Scm_MakeInteger(SCM_RESULT0),SCM_MAKE_BOOL(SCM_RESULT1)));
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_cursor_info(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj size_scm;
  int size;
  ScmObj visible_scm;
  int visible;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("sys-set-console-cursor-info");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  size_scm = SCM_SUBRARGS[1];
  if (!SCM_INTEGERP(size_scm)) Scm_Error("C integer required, but got %S", size_scm);
  size = Scm_GetInteger(size_scm);
  visible_scm = SCM_SUBRARGS[2];
  if (!SCM_BOOLP(visible_scm)) Scm_Error("boolean required, but got %S", visible_scm);
  visible = SCM_BOOL_VALUE(visible_scm);
  {

#line 144 "console.stub"
{CONSOLE_CURSOR_INFO ci;
(ci).dwSize=(size),(ci).bVisible=(visible);
{BOOL G1322=SetConsoleCursorInfo(Scm_WinHandle(h,SCM_FALSE),&(ci));if ((G1322)==(0)){{Scm_SysError("SetConsoleCursorInfo failed");}}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_cursor_position(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("sys-set-console-cursor-position");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  x_scm = SCM_SUBRARGS[1];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {

#line 150 "console.stub"
{COORD c;
(c).X=(x),(c).Y=(y);
{BOOL G1323=SetConsoleCursorPosition(Scm_WinHandle(h,SCM_FALSE),c);if ((G1323)==(0)){{Scm_SysError("SetConsoleCursorPosition failed");}}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_mode(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-console-mode");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
{
u_int SCM_RESULT;

#line 166 "console.stub"
{DWORD m=0;
{BOOL G1324=GetConsoleMode(Scm_WinHandle(h,SCM_FALSE),&(m));if ((G1324)==(0)){{Scm_SysError("GetConsoleMode failed");}}}
SCM_RESULT=(m);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_mode(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj mode_scm;
  u_int mode;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-set-console-mode");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  mode_scm = SCM_SUBRARGS[1];
  if (!SCM_UINTEGERP(mode_scm)) Scm_Error("C integer required, but got %S", mode_scm);
  mode = Scm_GetIntegerU(mode_scm);
  {

#line 171 "console.stub"
{BOOL G1325=SetConsoleMode(Scm_WinHandle(h,SCM_FALSE),mode);if ((G1325)==(0)){{Scm_SysError("SetConsoleMode failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj make_console_screen_buffer_info(){{
#line 189 "console.stub"
{ScmWinConsoleScreenBufferInfo* z=
SCM_NEW(ScmWinConsoleScreenBufferInfo);
SCM_SET_CLASS(z,&(Scm_WinConsoleScreenBufferInfoClass));
return (SCM_OBJ(z));}}}
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
SCM_DEFINE_BUILTIN_CLASS(Scm_WinConsoleScreenBufferInfoClass, NULL, NULL, NULL, make_console_screen_buffer_info, SCM_CLASS_DEFAULT_CPL);

static ScmObj Scm_WinConsoleScreenBufferInfoClass_size_2ex_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwSize.X);
}

static void Scm_WinConsoleScreenBufferInfoClass_size_2ex_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwSize.X = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_size_2ey_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwSize.Y);
}

static void Scm_WinConsoleScreenBufferInfoClass_size_2ey_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwSize.Y = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ex_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwCursorPosition.X);
}

static void Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ex_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwCursorPosition.X = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ey_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwCursorPosition.Y);
}

static void Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ey_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwCursorPosition.Y = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_attributes_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return Scm_MakeIntegerFromUI(obj->info.wAttributes);
}

static void Scm_WinConsoleScreenBufferInfoClass_attributes_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->info.wAttributes = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_window_2eleft_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.srWindow.Left);
}

static void Scm_WinConsoleScreenBufferInfoClass_window_2eleft_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.srWindow.Left = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_window_2etop_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.srWindow.Top);
}

static void Scm_WinConsoleScreenBufferInfoClass_window_2etop_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.srWindow.Top = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_window_2eright_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.srWindow.Right);
}

static void Scm_WinConsoleScreenBufferInfoClass_window_2eright_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.srWindow.Right = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_window_2ebottom_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.srWindow.Bottom);
}

static void Scm_WinConsoleScreenBufferInfoClass_window_2ebottom_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.srWindow.Bottom = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ex_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwMaximumWindowSize.X);
}

static void Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ex_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwMaximumWindowSize.X = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ey_GET(ScmObj OBJARG)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  return SCM_MAKE_INT(obj->info.dwMaximumWindowSize.Y);
}

static void Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ey_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinConsoleScreenBufferInfo* obj = SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->info.dwMaximumWindowSize.Y = (short)SCM_INT_VALUE(value);
}

static ScmClassStaticSlotSpec Scm_WinConsoleScreenBufferInfoClass__SLOTS[] = {
  SCM_CLASS_SLOT_SPEC("size.x", Scm_WinConsoleScreenBufferInfoClass_size_2ex_GET, Scm_WinConsoleScreenBufferInfoClass_size_2ex_SET),
  SCM_CLASS_SLOT_SPEC("size.y", Scm_WinConsoleScreenBufferInfoClass_size_2ey_GET, Scm_WinConsoleScreenBufferInfoClass_size_2ey_SET),
  SCM_CLASS_SLOT_SPEC("cursor-position.x", Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ex_GET, Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ex_SET),
  SCM_CLASS_SLOT_SPEC("cursor-position.y", Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ey_GET, Scm_WinConsoleScreenBufferInfoClass_cursor_position_2ey_SET),
  SCM_CLASS_SLOT_SPEC("attributes", Scm_WinConsoleScreenBufferInfoClass_attributes_GET, Scm_WinConsoleScreenBufferInfoClass_attributes_SET),
  SCM_CLASS_SLOT_SPEC("window.left", Scm_WinConsoleScreenBufferInfoClass_window_2eleft_GET, Scm_WinConsoleScreenBufferInfoClass_window_2eleft_SET),
  SCM_CLASS_SLOT_SPEC("window.top", Scm_WinConsoleScreenBufferInfoClass_window_2etop_GET, Scm_WinConsoleScreenBufferInfoClass_window_2etop_SET),
  SCM_CLASS_SLOT_SPEC("window.right", Scm_WinConsoleScreenBufferInfoClass_window_2eright_GET, Scm_WinConsoleScreenBufferInfoClass_window_2eright_SET),
  SCM_CLASS_SLOT_SPEC("window.bottom", Scm_WinConsoleScreenBufferInfoClass_window_2ebottom_GET, Scm_WinConsoleScreenBufferInfoClass_window_2ebottom_SET),
  SCM_CLASS_SLOT_SPEC("maximum-window-size.x", Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ex_GET, Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ex_SET),
  SCM_CLASS_SLOT_SPEC("maximum-window-size.y", Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ey_GET, Scm_WinConsoleScreenBufferInfoClass_maximum_window_size_2ey_SET),
  SCM_CLASS_SLOT_SPEC_END()
};

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_screen_buffer_info(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-console-screen-buffer-info");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
{
ScmObj SCM_RESULT;

#line 224 "console.stub"
{ScmObj info=make_console_screen_buffer_info();
{BOOL G1326=GetConsoleScreenBufferInfo(
Scm_WinHandle(h,SCM_FALSE),
&((SCM_WIN_CONSOLE_SCREEN_BUFFER_INFO(info))->info));if ((G1326)==(0)){{Scm_SysError("GetConsoleScreenBufferInfo failed");}}}
SCM_RESULT=(info);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_largest_console_window_size(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-largest-console-window-size");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
int SCM_RESULT0;
int SCM_RESULT1;
{

#line 231 "console.stub"
{COORD c=GetLargestConsoleWindowSize(Scm_WinHandle(h,SCM_FALSE));
SCM_RESULT0=((c).X),SCM_RESULT1=((c).Y);}
}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_Values2(Scm_MakeInteger(SCM_RESULT0),Scm_MakeInteger(SCM_RESULT1)));
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_screen_buffer_size(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("sys-set-screen-buffer-size");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  x_scm = SCM_SUBRARGS[1];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {

#line 235 "console.stub"
{COORD c;
(c).X=(x),(c).Y=(y);
{BOOL G1327=SetConsoleScreenBufferSize(Scm_WinHandle(h,SCM_FALSE),c);if ((G1327)==(0)){{Scm_SysError("SetConsoleScreenBufferSize failed");}}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj make_input_record(){{
#line 254 "console.stub"
{ScmWinInputRecord* z=SCM_NEW(ScmWinInputRecord);
SCM_SET_CLASS(z,&(Scm_WinInputRecordClass));
return (SCM_OBJ(z));}}}
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
SCM_DEFINE_BUILTIN_CLASS(Scm_WinInputRecordClass, NULL, NULL, NULL, make_input_record, SCM_CLASS_DEFAULT_CPL);

static ScmObj Scm_WinInputRecordClass_event_type_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeInteger(obj->rec.EventType);
}

static void Scm_WinInputRecordClass_event_type_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTEGERP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.EventType = Scm_GetInteger(value);
}

static ScmObj Scm_WinInputRecordClass_key_2edown_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_BOOL(obj->rec.Event.KeyEvent.bKeyDown);
}

static void Scm_WinInputRecordClass_key_2edown_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_BOOLP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.Event.KeyEvent.bKeyDown = SCM_BOOL_VALUE(value);
}

static ScmObj Scm_WinInputRecordClass_key_2erepeat_count_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeInteger(obj->rec.Event.KeyEvent.wRepeatCount);
}

static void Scm_WinInputRecordClass_key_2erepeat_count_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTEGERP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.Event.KeyEvent.wRepeatCount = Scm_GetInteger(value);
}

static ScmObj Scm_WinInputRecordClass_key_2evirtual_key_code_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeInteger(obj->rec.Event.KeyEvent.wVirtualKeyCode);
}

static void Scm_WinInputRecordClass_key_2evirtual_key_code_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTEGERP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.Event.KeyEvent.wVirtualKeyCode = Scm_GetInteger(value);
}

static ScmObj Scm_WinInputRecordClass_key_2evirtual_scan_code_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeInteger(obj->rec.Event.KeyEvent.wVirtualScanCode);
}

static void Scm_WinInputRecordClass_key_2evirtual_scan_code_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTEGERP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.Event.KeyEvent.wVirtualScanCode = Scm_GetInteger(value);
}

static ScmObj Scm_WinInputRecordClass_key_2eunicode_char_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.KeyEvent.uChar.UnicodeChar);
}

static void Scm_WinInputRecordClass_key_2eunicode_char_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.KeyEvent.uChar.UnicodeChar = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_key_2eascii_char_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.KeyEvent.uChar.AsciiChar);
}

static void Scm_WinInputRecordClass_key_2eascii_char_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.KeyEvent.uChar.AsciiChar = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_key_2econtrol_key_state_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.KeyEvent.dwControlKeyState);
}

static void Scm_WinInputRecordClass_key_2econtrol_key_state_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.KeyEvent.dwControlKeyState = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_mouse_2ex_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_INT(obj->rec.Event.MouseEvent.dwMousePosition.X);
}

static void Scm_WinInputRecordClass_mouse_2ex_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->rec.Event.MouseEvent.dwMousePosition.X = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinInputRecordClass_mouse_2ey_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_INT(obj->rec.Event.MouseEvent.dwMousePosition.Y);
}

static void Scm_WinInputRecordClass_mouse_2ey_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->rec.Event.MouseEvent.dwMousePosition.Y = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinInputRecordClass_mouse_2ebutton_state_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.MouseEvent.dwButtonState);
}

static void Scm_WinInputRecordClass_mouse_2ebutton_state_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.MouseEvent.dwButtonState = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_mouse_2econtrol_key_state_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.MouseEvent.dwControlKeyState);
}

static void Scm_WinInputRecordClass_mouse_2econtrol_key_state_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.MouseEvent.dwControlKeyState = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_mouse_2eevent_flags_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.MouseEvent.dwEventFlags);
}

static void Scm_WinInputRecordClass_mouse_2eevent_flags_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.MouseEvent.dwEventFlags = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_window_buffer_size_2ex_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_INT(obj->rec.Event.WindowBufferSizeEvent.dwSize.X);
}

static void Scm_WinInputRecordClass_window_buffer_size_2ex_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->rec.Event.WindowBufferSizeEvent.dwSize.X = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinInputRecordClass_window_buffer_size_2ey_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_INT(obj->rec.Event.WindowBufferSizeEvent.dwSize.Y);
}

static void Scm_WinInputRecordClass_window_buffer_size_2ey_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_INTP(value)) Scm_Error("short required, but got %S", value);
  obj->rec.Event.WindowBufferSizeEvent.dwSize.Y = (short)SCM_INT_VALUE(value);
}

static ScmObj Scm_WinInputRecordClass_menu_2ecommand_id_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return Scm_MakeIntegerFromUI(obj->rec.Event.MenuEvent.dwCommandId);
}

static void Scm_WinInputRecordClass_menu_2ecommand_id_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_UINTEGERP(value)) Scm_Error("u_int required, but got %S", value);
  obj->rec.Event.MenuEvent.dwCommandId = Scm_GetIntegerU(value);
}

static ScmObj Scm_WinInputRecordClass_focus_2eset_focus_GET(ScmObj OBJARG)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  return SCM_MAKE_BOOL(obj->rec.Event.FocusEvent.bSetFocus);
}

static void Scm_WinInputRecordClass_focus_2eset_focus_SET(ScmObj OBJARG, ScmObj value)
{
  ScmWinInputRecord* obj = SCM_WIN_INPUT_RECORD(OBJARG);
  if (!SCM_BOOLP(value)) Scm_Error("int required, but got %S", value);
  obj->rec.Event.FocusEvent.bSetFocus = SCM_BOOL_VALUE(value);
}

static ScmClassStaticSlotSpec Scm_WinInputRecordClass__SLOTS[] = {
  SCM_CLASS_SLOT_SPEC("event-type", Scm_WinInputRecordClass_event_type_GET, Scm_WinInputRecordClass_event_type_SET),
  SCM_CLASS_SLOT_SPEC("key.down", Scm_WinInputRecordClass_key_2edown_GET, Scm_WinInputRecordClass_key_2edown_SET),
  SCM_CLASS_SLOT_SPEC("key.repeat-count", Scm_WinInputRecordClass_key_2erepeat_count_GET, Scm_WinInputRecordClass_key_2erepeat_count_SET),
  SCM_CLASS_SLOT_SPEC("key.virtual-key-code", Scm_WinInputRecordClass_key_2evirtual_key_code_GET, Scm_WinInputRecordClass_key_2evirtual_key_code_SET),
  SCM_CLASS_SLOT_SPEC("key.virtual-scan-code", Scm_WinInputRecordClass_key_2evirtual_scan_code_GET, Scm_WinInputRecordClass_key_2evirtual_scan_code_SET),
  SCM_CLASS_SLOT_SPEC("key.unicode-char", Scm_WinInputRecordClass_key_2eunicode_char_GET, Scm_WinInputRecordClass_key_2eunicode_char_SET),
  SCM_CLASS_SLOT_SPEC("key.ascii-char", Scm_WinInputRecordClass_key_2eascii_char_GET, Scm_WinInputRecordClass_key_2eascii_char_SET),
  SCM_CLASS_SLOT_SPEC("key.control-key-state", Scm_WinInputRecordClass_key_2econtrol_key_state_GET, Scm_WinInputRecordClass_key_2econtrol_key_state_SET),
  SCM_CLASS_SLOT_SPEC("mouse.x", Scm_WinInputRecordClass_mouse_2ex_GET, Scm_WinInputRecordClass_mouse_2ex_SET),
  SCM_CLASS_SLOT_SPEC("mouse.y", Scm_WinInputRecordClass_mouse_2ey_GET, Scm_WinInputRecordClass_mouse_2ey_SET),
  SCM_CLASS_SLOT_SPEC("mouse.button-state", Scm_WinInputRecordClass_mouse_2ebutton_state_GET, Scm_WinInputRecordClass_mouse_2ebutton_state_SET),
  SCM_CLASS_SLOT_SPEC("mouse.control-key-state", Scm_WinInputRecordClass_mouse_2econtrol_key_state_GET, Scm_WinInputRecordClass_mouse_2econtrol_key_state_SET),
  SCM_CLASS_SLOT_SPEC("mouse.event-flags", Scm_WinInputRecordClass_mouse_2eevent_flags_GET, Scm_WinInputRecordClass_mouse_2eevent_flags_SET),
  SCM_CLASS_SLOT_SPEC("window-buffer-size.x", Scm_WinInputRecordClass_window_buffer_size_2ex_GET, Scm_WinInputRecordClass_window_buffer_size_2ex_SET),
  SCM_CLASS_SLOT_SPEC("window-buffer-size.y", Scm_WinInputRecordClass_window_buffer_size_2ey_GET, Scm_WinInputRecordClass_window_buffer_size_2ey_SET),
  SCM_CLASS_SLOT_SPEC("menu.command-id", Scm_WinInputRecordClass_menu_2ecommand_id_GET, Scm_WinInputRecordClass_menu_2ecommand_id_SET),
  SCM_CLASS_SLOT_SPEC("focus.set-focus", Scm_WinInputRecordClass_focus_2eset_focus_GET, Scm_WinInputRecordClass_focus_2eset_focus_SET),
  SCM_CLASS_SLOT_SPEC_END()
};

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_number_of_console_input_events(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-number-of-console-input-events");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
{
u_int SCM_RESULT;

#line 301 "console.stub"
{DWORD num=0;
{BOOL G1328=GetNumberOfConsoleInputEvents(Scm_WinHandle(h,SCM_FALSE),&(num));if ((G1328)==(0)){{Scm_SysError("GetNumberOfConsoleInputEvents failed");}}}
SCM_RESULT=(num);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_number_of_console_mouse_buttons(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-get-number-of-console-mouse-buttons");
  {
{
u_int SCM_RESULT;

#line 306 "console.stub"
{DWORD num=0;
{BOOL G1329=GetNumberOfConsoleMouseButtons(&(num));if ((G1329)==(0)){{Scm_SysError("GetNumberOfConsoleMouseButtons failed");}}}
SCM_RESULT=(num);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_peek_console_input(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-peek-console-input");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
{
ScmObj SCM_RESULT;

#line 321 "console.stub"
{ScmObj rec=make_input_record();DWORD cnt=0;{BOOL G1332=PeekConsoleInput(Scm_WinHandle(h,SCM_FALSE),&((SCM_WIN_INPUT_RECORD(rec))->rec),1,&(cnt));if ((G1332)==(0)){{Scm_SysError("PeekConsoleInput failed");}}}if ((cnt)==(0)){SCM_RESULT=(SCM_NIL);} else {SCM_RESULT=(SCM_LIST1(rec));}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_read_console_input(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-read-console-input");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {
{
ScmObj SCM_RESULT;

#line 323 "console.stub"
{ScmObj rec=make_input_record();DWORD cnt=0;{BOOL G1333=ReadConsoleInput(Scm_WinHandle(h,SCM_FALSE),&((SCM_WIN_INPUT_RECORD(rec))->rec),1,&(cnt));if ((G1333)==(0)){{Scm_SysError("ReadConsoleInput failed");}}}if ((cnt)==(0)){SCM_RESULT=(SCM_NIL);} else {SCM_RESULT=(SCM_LIST1(rec));}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_read_console(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj buf_scm;
  ScmUVector* buf;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-read-console");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  buf_scm = SCM_SUBRARGS[1];
  if (!SCM_UVECTORP(buf_scm)) Scm_Error("uniform vector required, but got %S", buf_scm);
  buf = SCM_UVECTOR(buf_scm);
  {
{
u_int SCM_RESULT;

#line 326 "console.stub"
if (!((SCM_U8VECTORP(buf))||(SCM_U16VECTORP(buf)))){{
Scm_TypeError("buf","u8vector or u16vector",SCM_OBJ(buf));}}

#line 328 "console.stub"
SCM_UVECTOR_CHECK_MUTABLE(buf);

#line 329 "console.stub"
{DWORD nc=(Scm_UVectorSizeInBytes(buf))/(sizeof(TCHAR));DWORD nread=0;
#line 331 "console.stub"
{BOOL G1334=ReadConsole(Scm_WinHandle(h,SCM_FALSE),
SCM_UVECTOR_ELEMENTS(buf),nc,
&(nread),NULL);if ((G1334)==(0)){{Scm_SysError("ReadConsole failed");}}}
SCM_RESULT=(nread);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_read_console_output(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj handle_scm;
  ScmObj handle;
  ScmObj buf_scm;
  ScmUVector* buf;
  ScmObj w_scm;
  short w;
  ScmObj h_scm;
  short h;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj region_scm;
  ScmUVector* region;
  ScmObj SCM_SUBRARGS[7];
  SCM_ENTER_SUBR("sys-read-console-output");
  for (int SCM_i=0; SCM_i<7; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  handle_scm = SCM_SUBRARGS[0];
  handle = (handle_scm);
  buf_scm = SCM_SUBRARGS[1];
  if (!SCM_U32VECTORP(buf_scm)) Scm_Error("u32vector required, but got %S", buf_scm);
  buf = SCM_U32VECTOR(buf_scm);
  w_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(w_scm)) Scm_Error("C short integer required, but got %S", w_scm);
  w = (short)SCM_INT_VALUE(w_scm);
  h_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(h_scm)) Scm_Error("C short integer required, but got %S", h_scm);
  h = (short)SCM_INT_VALUE(h_scm);
  x_scm = SCM_SUBRARGS[4];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[5];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  region_scm = SCM_SUBRARGS[6];
  if (!SCM_S16VECTORP(region_scm)) Scm_Error("s16vector required, but got %S", region_scm);
  region = SCM_S16VECTOR(region_scm);
  {
{
ScmObj SCM_RESULT;

#line 341 "console.stub"
if ((SCM_UVECTOR_SIZE(buf))<((w)*(h))){{
Scm_Error("ReadConsoleOutput: buffer argument too small (required at least %dx%d)",w,h);}}

#line 344 "console.stub"
if ((SCM_UVECTOR_SIZE(region))<(4)){{
Scm_Error("ReadConsoleOutput: region argument must be at least 4 elements long: %S",region);}}

#line 347 "console.stub"
SCM_UVECTOR_CHECK_MUTABLE(buf);

#line 348 "console.stub"
SCM_UVECTOR_CHECK_MUTABLE(region);

#line 349 "console.stub"
{COORD siz;COORD coord;
(siz).X=(w),(siz).Y=(h),
(coord).X=(x),(coord).Y=(y);
{BOOL G1335=ReadConsoleOutput(Scm_WinHandle(handle,SCM_FALSE),
((PCHAR_INFO )(SCM_UVECTOR_ELEMENTS(buf))),siz,coord,
#line 355 "console.stub"
((PSMALL_RECT )(SCM_UVECTOR_ELEMENTS(region))));if ((G1335)==(0)){{Scm_SysError("ReadConsoleOutput failed");}}}
SCM_RESULT=(SCM_OBJ(buf));}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_read_console_output_attribute(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj handle_scm;
  ScmObj handle;
  ScmObj buf_scm;
  ScmUVector* buf;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[4];
  SCM_ENTER_SUBR("sys-read-console-output-attribute");
  for (int SCM_i=0; SCM_i<4; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  handle_scm = SCM_SUBRARGS[0];
  handle = (handle_scm);
  buf_scm = SCM_SUBRARGS[1];
  if (!SCM_U16VECTORP(buf_scm)) Scm_Error("u16vector required, but got %S", buf_scm);
  buf = SCM_U16VECTOR(buf_scm);
  x_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {
{
u_int SCM_RESULT;

#line 362 "console.stub"
{DWORD len=SCM_UVECTOR_SIZE(buf);DWORD nread;COORD coord;
(coord).X=(x),(coord).Y=(y);
{BOOL G1336=ReadConsoleOutputAttribute(Scm_WinHandle(handle,SCM_FALSE),
((LPWORD )(SCM_UVECTOR_ELEMENTS(buf))),len,coord,
&(nread));if ((G1336)==(0)){{Scm_SysError("ReadConsoleOutputAttribute failed");}}}
SCM_RESULT=(nread);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_read_console_output_character(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj handle_scm;
  ScmObj handle;
  ScmObj len_scm;
  u_int len;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[4];
  SCM_ENTER_SUBR("sys-read-console-output-character");
  for (int SCM_i=0; SCM_i<4; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  handle_scm = SCM_SUBRARGS[0];
  handle = (handle_scm);
  len_scm = SCM_SUBRARGS[1];
  if (!SCM_UINTEGERP(len_scm)) Scm_Error("C integer required, but got %S", len_scm);
  len = Scm_GetIntegerU(len_scm);
  x_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {
{
const char * SCM_RESULT;

#line 374 "console.stub"
if ((len)>(USHRT_MAX)){{
Scm_Error("ReadConsoleOutputCharacter: length argument too large");}}

#line 376 "console.stub"
{COORD coord;DWORD nread=0;LPTSTR pbuf=
SCM_NEW_ATOMIC_ARRAY(TCHAR,(len)+(1));
(coord).X=(x),(coord).Y=(y);
{BOOL G1337=ReadConsoleOutputCharacter(Scm_WinHandle(handle,SCM_FALSE),pbuf,len,coord,&(nread));if ((G1337)==(0)){{Scm_SysError("ReadConsoleOutputCharacter failed");}}}
(pbuf)[nread]=(0);
SCM_RESULT=(SCM_WCS2MBS(pbuf));}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_MAKE_STR_COPYING(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_text_attribute(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj attr_scm;
  u_short attr;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-set-console-text-attribute");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  attr_scm = SCM_SUBRARGS[1];
  if (!SCM_INTEGERP(attr_scm)) Scm_Error("C short integer required, but got %S", attr_scm);
  attr = (unsigned short)Scm_GetIntegerU(attr_scm);
  {

#line 384 "console.stub"
{BOOL G1338=SetConsoleTextAttribute(Scm_WinHandle(h,SCM_FALSE),attr);if ((G1338)==(0)){{Scm_SysError("SetConsoleTextAttribute failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_window_info(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj absolute_scm;
  int absolute;
  ScmObj window_scm;
  ScmUVector* window;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("sys-set-console-window-info");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  absolute_scm = SCM_SUBRARGS[1];
  if (!SCM_BOOLP(absolute_scm)) Scm_Error("boolean required, but got %S", absolute_scm);
  absolute = SCM_BOOL_VALUE(absolute_scm);
  window_scm = SCM_SUBRARGS[2];
  if (!SCM_S16VECTORP(window_scm)) Scm_Error("s16vector required, but got %S", window_scm);
  window = SCM_S16VECTOR(window_scm);
  {

#line 389 "console.stub"
if ((SCM_UVECTOR_SIZE(window))<(4)){{
Scm_Error("s16vector of minimum length 4 required for window: %S",window);}}

#line 392 "console.stub"
{BOOL G1339=SetConsoleWindowInfo(Scm_WinHandle(h,SCM_FALSE),absolute,
((SMALL_RECT* )(
SCM_UVECTOR_ELEMENTS(window))));if ((G1339)==(0)){{Scm_SysError("SetConsoleWindowInfo failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_write_console(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj s_scm;
  ScmString* s;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-write-console");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  s_scm = SCM_SUBRARGS[1];
  if (!SCM_STRINGP(s_scm)) Scm_Error("string required, but got %S", s_scm);
  s = SCM_STRING(s_scm);
  {
{
u_int SCM_RESULT;

#line 397 "console.stub"
{LPCTSTR wcs=SCM_MBS2WCS(Scm_GetStringConst(s));DWORD nwritten=0;
#line 399 "console.stub"
{BOOL G1340=WriteConsole(Scm_WinHandle(h,SCM_FALSE),wcs,
#line 401 "console.stub"
_tcslen(wcs),
&(nwritten),NULL);if ((G1340)==(0)){{Scm_SysError("WriteConsole failed");}}}
SCM_RESULT=(nwritten);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_write_console_output_character(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj s_scm;
  ScmString* s;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[4];
  SCM_ENTER_SUBR("sys-write-console-output-character");
  for (int SCM_i=0; SCM_i<4; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  s_scm = SCM_SUBRARGS[1];
  if (!SCM_STRINGP(s_scm)) Scm_Error("string required, but got %S", s_scm);
  s = SCM_STRING(s_scm);
  x_scm = SCM_SUBRARGS[2];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {
{
u_int SCM_RESULT;

#line 408 "console.stub"
{LPCTSTR wcs=SCM_MBS2WCS(Scm_GetStringConst(s));COORD c;DWORD nwritten=0;
#line 410 "console.stub"
(c).X=(x),(c).Y=(y);
{BOOL G1341=WriteConsoleOutputCharacter(Scm_WinHandle(h,SCM_FALSE),wcs,
#line 413 "console.stub"
_tcslen(wcs),c,
&(nwritten));if ((G1341)==(0)){{Scm_SysError("WriteConsoleOutputCharacter failed");}}}
SCM_RESULT=(nwritten);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_fill_console_output_character(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj c_scm;
  ScmChar c;
  ScmObj len_scm;
  u_int len;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[5];
  SCM_ENTER_SUBR("sys-fill-console-output-character");
  for (int SCM_i=0; SCM_i<5; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  c_scm = SCM_SUBRARGS[1];
  if (!SCM_CHARP(c_scm)) Scm_Error("character required, but got %S", c_scm);
  c = SCM_CHAR_VALUE(c_scm);
  len_scm = SCM_SUBRARGS[2];
  if (!SCM_UINTEGERP(len_scm)) Scm_Error("C integer required, but got %S", len_scm);
  len = Scm_GetIntegerU(len_scm);
  x_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[4];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {
{
u_int SCM_RESULT;

#line 420 "console.stub"
{ScmChar ch=Scm_CharToUcs(c);COORD coord;DWORD nwritten=0;
#line 422 "console.stub"
(coord).X=(x),(coord).Y=(y);
{BOOL G1342=FillConsoleOutputCharacter(Scm_WinHandle(h,SCM_FALSE),
((TCHAR )(ch)),len,coord,
#line 426 "console.stub"
&(nwritten));if ((G1342)==(0)){{Scm_SysError("FillConsoleOutputCharacter failed");}}}
SCM_RESULT=(nwritten);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_fill_console_output_attribute(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj attr_scm;
  u_short attr;
  ScmObj len_scm;
  u_int len;
  ScmObj x_scm;
  short x;
  ScmObj y_scm;
  short y;
  ScmObj SCM_SUBRARGS[5];
  SCM_ENTER_SUBR("sys-fill-console-output-attribute");
  for (int SCM_i=0; SCM_i<5; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  attr_scm = SCM_SUBRARGS[1];
  if (!SCM_INTEGERP(attr_scm)) Scm_Error("C short integer required, but got %S", attr_scm);
  attr = (unsigned short)Scm_GetIntegerU(attr_scm);
  len_scm = SCM_SUBRARGS[2];
  if (!SCM_UINTEGERP(len_scm)) Scm_Error("C integer required, but got %S", len_scm);
  len = Scm_GetIntegerU(len_scm);
  x_scm = SCM_SUBRARGS[3];
  if (!SCM_INTP(x_scm)) Scm_Error("C short integer required, but got %S", x_scm);
  x = (short)SCM_INT_VALUE(x_scm);
  y_scm = SCM_SUBRARGS[4];
  if (!SCM_INTP(y_scm)) Scm_Error("C short integer required, but got %S", y_scm);
  y = (short)SCM_INT_VALUE(y_scm);
  {
{
u_int SCM_RESULT;

#line 432 "console.stub"
{COORD c;DWORD nwritten=0;
(c).X=(x),(c).Y=(y);
{BOOL G1343=FillConsoleOutputAttribute(Scm_WinHandle(h,SCM_FALSE),attr,len,c,
#line 437 "console.stub"
&(nwritten));if ((G1343)==(0)){{Scm_SysError("FillConsoleOutputAttribute failed");}}}
SCM_RESULT=(nwritten);}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(Scm_MakeIntegerFromUI(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_flush_console_input_buffer(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj h_scm;
  ScmObj h;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-flush-console-input-buffer");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  h_scm = SCM_SUBRARGS[0];
  h = (h_scm);
  {

#line 441 "console.stub"
{BOOL G1344=FlushConsoleInputBuffer(Scm_WinHandle(h,SCM_FALSE));if ((G1344)==(0)){{Scm_SysError("FlushConsoleInputBuffer failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_console_title(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  SCM_ENTER_SUBR("sys-get-console-title");
  {
{
const char * SCM_RESULT;

#line 447 "console.stub"
{TCHAR buf[1024];DWORD r=
GetConsoleTitle(buf,1023);
if ((r)==(0)){{Scm_SysError("GetConsoleTitle failed");}}
(buf)[1023]=(0);
SCM_RESULT=(SCM_WCS2MBS(buf));}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_MAKE_STR_COPYING(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_console_title(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj s_scm;
  ScmString* s;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-set-console-title");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  s_scm = SCM_SUBRARGS[0];
  if (!SCM_STRINGP(s_scm)) Scm_Error("string required, but got %S", s_scm);
  s = SCM_STRING(s_scm);
  {

#line 454 "console.stub"
{LPCTSTR wcs=SCM_MBS2WCS(Scm_GetStringConst(s));
if ((_tcslen(wcs))>=(1024)){{
Scm_Error("SetConsoleTitle: string argument too long");}}
{BOOL G1345=SetConsoleTitle(wcs);if ((G1345)==(0)){{Scm_SysError("SetConsoleTitle failed");}}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_get_std_handle(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj which_scm;
  int which;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("sys-get-std-handle");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  which_scm = SCM_SUBRARGS[0];
  if (!SCM_INTEGERP(which_scm)) Scm_Error("C integer required, but got %S", which_scm);
  which = Scm_GetInteger(which_scm);
  {
{
ScmObj SCM_RESULT;

#line 467 "console.stub"
{HANDLE h=GetStdHandle(((DWORD )(which)));
if ((h)==(INVALID_HANDLE_VALUE)){{
Scm_SysError("GetStdHandle failed");}}
{HANDLE p=GetCurrentProcess();HANDLE h2=INVALID_HANDLE_VALUE;
#line 472 "console.stub"
if (!(DuplicateHandle(p,h,p,&(h2),0,TRUE,DUPLICATE_SAME_ACCESS))){{
Scm_SysError("DuplicateHandle failed");}}
SCM_RESULT=(Scm_MakeWinHandle(h2,SCM_FALSE));}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
static ScmObj console_sys_set_std_handle(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj which_scm;
  int which;
  ScmObj handle_scm;
  ScmObj handle;
  ScmObj SCM_SUBRARGS[2];
  SCM_ENTER_SUBR("sys-set-std-handle");
  for (int SCM_i=0; SCM_i<2; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  which_scm = SCM_SUBRARGS[0];
  if (!SCM_INTEGERP(which_scm)) Scm_Error("C integer required, but got %S", which_scm);
  which = Scm_GetInteger(which_scm);
  handle_scm = SCM_SUBRARGS[1];
  handle = (handle_scm);
  {

#line 476 "console.stub"
{BOOL G1346=SetStdHandle(((DWORD )(which)),Scm_WinHandle(handle,SCM_FALSE));if ((G1346)==(0)){{Scm_SysError("SetStdHandle failed");}}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_UNDEFINED);
  }
}

#endif /* defined(GAUCHE_WINDOWS) */
void Scm_Init_console(ScmModule *mod SCM_UNUSED){

#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[0] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[0])),TRUE); /* sys-alloc-console */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[1] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[1])),TRUE); /* source-info */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[3]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[2] = Scm_MakeExtendedPair(scm__rc.d1312[0], SCM_NIL, SCM_OBJ(&scm__rc.d1313[4]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-alloc-console")), SCM_OBJ(&console_sys_alloc_console__STUB), 0);
  console_sys_alloc_console__STUB.common.info = scm__rc.d1312[2];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[3] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[3])),TRUE); /* sys-free-console */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[7]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[4] = Scm_MakeExtendedPair(scm__rc.d1312[3], SCM_NIL, SCM_OBJ(&scm__rc.d1313[8]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-free-console")), SCM_OBJ(&console_sys_free_console__STUB), 0);
  console_sys_free_console__STUB.common.info = scm__rc.d1312[4];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[5] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[4])),TRUE); /* CTRL_C_EVENT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[5]), Scm_MakeInteger(CTRL_C_EVENT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[6] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[5])),TRUE); /* CTRL_BREAK_EVENT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[6]), Scm_MakeInteger(CTRL_BREAK_EVENT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[7] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[6])),TRUE); /* sys-generate-console-ctrl-event */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[8] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[7])),TRUE); /* event */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[9] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[8])),TRUE); /* pgid */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[9]), scm__rc.d1312[9]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[10]), scm__rc.d1312[8]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[13]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[10] = Scm_MakeExtendedPair(scm__rc.d1312[7], SCM_OBJ(&scm__rc.d1313[10]), SCM_OBJ(&scm__rc.d1313[14]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-generate-console-ctrl-event")), SCM_OBJ(&console_sys_generate_console_ctrl_event__STUB), 0);
  console_sys_generate_console_ctrl_event__STUB.common.info = scm__rc.d1312[10];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[11] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[9])),TRUE); /* GENERIC_READ */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[11]), Scm_MakeInteger(GENERIC_READ), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[12] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[10])),TRUE); /* GENERIC_WRITE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[12]), Scm_MakeInteger(GENERIC_WRITE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[13] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[11])),TRUE); /* FILE_SHARE_READ */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[13]), Scm_MakeInteger(FILE_SHARE_READ), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[14] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[12])),TRUE); /* FILE_SHARE_WRITE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[14]), Scm_MakeInteger(FILE_SHARE_WRITE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[15] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[14])),TRUE); /* console-buffer */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[16] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[13])),TRUE); /* sys-create-console-screen-buffer */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[17] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[15])),TRUE); /* desired-access */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[18] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[16])),TRUE); /* share-mode */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[19] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[17])),TRUE); /* inheritable */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[15]), scm__rc.d1312[19]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[16]), scm__rc.d1312[18]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[17]), scm__rc.d1312[17]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[20]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[20] = Scm_MakeExtendedPair(scm__rc.d1312[16], SCM_OBJ(&scm__rc.d1313[17]), SCM_OBJ(&scm__rc.d1313[21]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-create-console-screen-buffer")), SCM_OBJ(&console_sys_create_console_screen_buffer__STUB), 0);
  console_sys_create_console_screen_buffer__STUB.common.info = scm__rc.d1312[20];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[21] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[18])),TRUE); /* sys-set-console-active-screen-buffer */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[22] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[19])),TRUE); /* h */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[22]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[25]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[23] = Scm_MakeExtendedPair(scm__rc.d1312[21], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[26]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-active-screen-buffer")), SCM_OBJ(&console_sys_set_console_active_screen_buffer__STUB), 0);
  console_sys_set_console_active_screen_buffer__STUB.common.info = scm__rc.d1312[23];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[24] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[20])),TRUE); /* sys-scroll-console-screen-buffer */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[25] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[21])),TRUE); /* handle */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[26] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[22])),TRUE); /* scroll-rectangle */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[27] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[23])),TRUE); /* clip-rectangle */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[28] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[24])),TRUE); /* x */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[29] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[25])),TRUE); /* y */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[30] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[26])),TRUE); /* fill */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[27]), scm__rc.d1312[30]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[28]), scm__rc.d1312[29]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[29]), scm__rc.d1312[28]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[30]), scm__rc.d1312[27]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[31]), scm__rc.d1312[26]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[32]), scm__rc.d1312[25]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[35]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[31] = Scm_MakeExtendedPair(scm__rc.d1312[24], SCM_OBJ(&scm__rc.d1313[32]), SCM_OBJ(&scm__rc.d1313[36]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-scroll-console-screen-buffer")), SCM_OBJ(&console_sys_scroll_console_screen_buffer__STUB), 0);
  console_sys_scroll_console_screen_buffer__STUB.common.info = scm__rc.d1312[31];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[32] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[27])),TRUE); /* sys-get-console-cp */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[39]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[33] = Scm_MakeExtendedPair(scm__rc.d1312[32], SCM_NIL, SCM_OBJ(&scm__rc.d1313[40]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-cp")), SCM_OBJ(&console_sys_get_console_cp__STUB), 0);
  console_sys_get_console_cp__STUB.common.info = scm__rc.d1312[33];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[34] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[28])),TRUE); /* sys-get-console-output-cp */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[43]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[35] = Scm_MakeExtendedPair(scm__rc.d1312[34], SCM_NIL, SCM_OBJ(&scm__rc.d1313[44]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-output-cp")), SCM_OBJ(&console_sys_get_console_output_cp__STUB), 0);
  console_sys_get_console_output_cp__STUB.common.info = scm__rc.d1312[35];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[36] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[29])),TRUE); /* sys-set-console-cp */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[37] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[30])),TRUE); /* cp */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[45]), scm__rc.d1312[37]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[48]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[38] = Scm_MakeExtendedPair(scm__rc.d1312[36], SCM_OBJ(&scm__rc.d1313[45]), SCM_OBJ(&scm__rc.d1313[49]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-cp")), SCM_OBJ(&console_sys_set_console_cp__STUB), 0);
  console_sys_set_console_cp__STUB.common.info = scm__rc.d1312[38];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[39] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[31])),TRUE); /* sys-set-console-output-cp */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[52]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[40] = Scm_MakeExtendedPair(scm__rc.d1312[39], SCM_OBJ(&scm__rc.d1313[45]), SCM_OBJ(&scm__rc.d1313[53]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-output-cp")), SCM_OBJ(&console_sys_set_console_output_cp__STUB), 0);
  console_sys_set_console_output_cp__STUB.common.info = scm__rc.d1312[40];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[41] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[32])),TRUE); /* sys-get-console-cursor-info */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[56]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[42] = Scm_MakeExtendedPair(scm__rc.d1312[41], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[57]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-cursor-info")), SCM_OBJ(&console_sys_get_console_cursor_info__STUB), 0);
  console_sys_get_console_cursor_info__STUB.common.info = scm__rc.d1312[42];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[43] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[33])),TRUE); /* sys-set-console-cursor-info */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[44] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[34])),TRUE); /* size */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[45] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[35])),TRUE); /* visible */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[58]), scm__rc.d1312[45]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[59]), scm__rc.d1312[44]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[60]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[63]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[46] = Scm_MakeExtendedPair(scm__rc.d1312[43], SCM_OBJ(&scm__rc.d1313[60]), SCM_OBJ(&scm__rc.d1313[64]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-cursor-info")), SCM_OBJ(&console_sys_set_console_cursor_info__STUB), 0);
  console_sys_set_console_cursor_info__STUB.common.info = scm__rc.d1312[46];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[47] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[36])),TRUE); /* sys-set-console-cursor-position */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[65]), scm__rc.d1312[29]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[66]), scm__rc.d1312[28]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[67]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[70]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[48] = Scm_MakeExtendedPair(scm__rc.d1312[47], SCM_OBJ(&scm__rc.d1313[67]), SCM_OBJ(&scm__rc.d1313[71]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-cursor-position")), SCM_OBJ(&console_sys_set_console_cursor_position__STUB), 0);
  console_sys_set_console_cursor_position__STUB.common.info = scm__rc.d1312[48];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[49] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[37])),TRUE); /* ENABLE_LINE_INPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[49]), Scm_MakeInteger(ENABLE_LINE_INPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[50] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[38])),TRUE); /* ENABLE_ECHO_INPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[50]), Scm_MakeInteger(ENABLE_ECHO_INPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[51] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[39])),TRUE); /* ENABLE_PROCESSED_INPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[51]), Scm_MakeInteger(ENABLE_PROCESSED_INPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[52] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[40])),TRUE); /* ENABLE_WINDOW_INPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[52]), Scm_MakeInteger(ENABLE_WINDOW_INPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[53] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[41])),TRUE); /* ENABLE_MOUSE_INPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[53]), Scm_MakeInteger(ENABLE_MOUSE_INPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[54] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[42])),TRUE); /* ENABLE_PROCESSED_OUTPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[54]), Scm_MakeInteger(ENABLE_PROCESSED_OUTPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[55] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[43])),TRUE); /* ENABLE_WRAP_AT_EOL_OUTPUT */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[55]), Scm_MakeInteger(ENABLE_WRAP_AT_EOL_OUTPUT), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[56] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[44])),TRUE); /* sys-get-console-mode */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[74]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[57] = Scm_MakeExtendedPair(scm__rc.d1312[56], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[75]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-mode")), SCM_OBJ(&console_sys_get_console_mode__STUB), 0);
  console_sys_get_console_mode__STUB.common.info = scm__rc.d1312[57];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[58] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[45])),TRUE); /* sys-set-console-mode */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[59] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[46])),TRUE); /* mode */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[76]), scm__rc.d1312[59]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[77]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[80]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[60] = Scm_MakeExtendedPair(scm__rc.d1312[58], SCM_OBJ(&scm__rc.d1313[77]), SCM_OBJ(&scm__rc.d1313[81]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-mode")), SCM_OBJ(&console_sys_set_console_mode__STUB), 0);
  console_sys_set_console_mode__STUB.common.info = scm__rc.d1312[60];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_InitBuiltinClass(&Scm_WinConsoleScreenBufferInfoClass, "<win:console-screen-buffer-info>", Scm_WinConsoleScreenBufferInfoClass__SLOTS, TRUE, SCM_MODULE(mod));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[61] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[47])),TRUE); /* FOREGROUND_BLUE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[61]), Scm_MakeInteger(FOREGROUND_BLUE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[62] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[48])),TRUE); /* FOREGROUND_GREEN */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[62]), Scm_MakeInteger(FOREGROUND_GREEN), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[63] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[49])),TRUE); /* FOREGROUND_RED */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[63]), Scm_MakeInteger(FOREGROUND_RED), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[64] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[50])),TRUE); /* FOREGROUND_INTENSITY */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[64]), Scm_MakeInteger(FOREGROUND_INTENSITY), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[65] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[51])),TRUE); /* BACKGROUND_BLUE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[65]), Scm_MakeInteger(BACKGROUND_BLUE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[66] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[52])),TRUE); /* BACKGROUND_GREEN */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[66]), Scm_MakeInteger(BACKGROUND_GREEN), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[67] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[53])),TRUE); /* BACKGROUND_RED */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[67]), Scm_MakeInteger(BACKGROUND_RED), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[68] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[54])),TRUE); /* BACKGROUND_INTENSITY */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[68]), Scm_MakeInteger(BACKGROUND_INTENSITY), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[69] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[55])),TRUE); /* sys-get-console-screen-buffer-info */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[84]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[70] = Scm_MakeExtendedPair(scm__rc.d1312[69], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[85]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-screen-buffer-info")), SCM_OBJ(&console_sys_get_console_screen_buffer_info__STUB), 0);
  console_sys_get_console_screen_buffer_info__STUB.common.info = scm__rc.d1312[70];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[71] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[56])),TRUE); /* sys-get-largest-console-window-size */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[88]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[72] = Scm_MakeExtendedPair(scm__rc.d1312[71], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[89]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-largest-console-window-size")), SCM_OBJ(&console_sys_get_largest_console_window_size__STUB), 0);
  console_sys_get_largest_console_window_size__STUB.common.info = scm__rc.d1312[72];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[73] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[57])),TRUE); /* sys-set-screen-buffer-size */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[92]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[74] = Scm_MakeExtendedPair(scm__rc.d1312[73], SCM_OBJ(&scm__rc.d1313[67]), SCM_OBJ(&scm__rc.d1313[93]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-screen-buffer-size")), SCM_OBJ(&console_sys_set_screen_buffer_size__STUB), 0);
  console_sys_set_screen_buffer_size__STUB.common.info = scm__rc.d1312[74];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_InitBuiltinClass(&Scm_WinInputRecordClass, "<win:input-record>", Scm_WinInputRecordClass__SLOTS, TRUE, SCM_MODULE(mod));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[75] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[58])),TRUE); /* sys-get-number-of-console-input-events */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[96]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[76] = Scm_MakeExtendedPair(scm__rc.d1312[75], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[97]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-number-of-console-input-events")), SCM_OBJ(&console_sys_get_number_of_console_input_events__STUB), 0);
  console_sys_get_number_of_console_input_events__STUB.common.info = scm__rc.d1312[76];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[77] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[59])),TRUE); /* sys-get-number-of-console-mouse-buttons */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[100]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[78] = Scm_MakeExtendedPair(scm__rc.d1312[77], SCM_NIL, SCM_OBJ(&scm__rc.d1313[101]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-number-of-console-mouse-buttons")), SCM_OBJ(&console_sys_get_number_of_console_mouse_buttons__STUB), 0);
  console_sys_get_number_of_console_mouse_buttons__STUB.common.info = scm__rc.d1312[78];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[79] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[60])),TRUE); /* sys-peek-console-input */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[104]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[80] = Scm_MakeExtendedPair(scm__rc.d1312[79], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[105]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-peek-console-input")), SCM_OBJ(&console_sys_peek_console_input__STUB), 0);
  console_sys_peek_console_input__STUB.common.info = scm__rc.d1312[80];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[81] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[61])),TRUE); /* sys-read-console-input */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[108]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[82] = Scm_MakeExtendedPair(scm__rc.d1312[81], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[109]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-read-console-input")), SCM_OBJ(&console_sys_read_console_input__STUB), 0);
  console_sys_read_console_input__STUB.common.info = scm__rc.d1312[82];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[83] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[62])),TRUE); /* sys-read-console */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[84] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[63])),TRUE); /* buf */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[110]), scm__rc.d1312[84]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[111]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[114]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[85] = Scm_MakeExtendedPair(scm__rc.d1312[83], SCM_OBJ(&scm__rc.d1313[111]), SCM_OBJ(&scm__rc.d1313[115]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-read-console")), SCM_OBJ(&console_sys_read_console__STUB), 0);
  console_sys_read_console__STUB.common.info = scm__rc.d1312[85];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[86] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[64])),TRUE); /* sys-read-console-output */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[87] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[65])),TRUE); /* w */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[88] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[66])),TRUE); /* region */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[116]), scm__rc.d1312[88]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[117]), scm__rc.d1312[29]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[118]), scm__rc.d1312[28]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[119]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[120]), scm__rc.d1312[87]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[121]), scm__rc.d1312[84]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[122]), scm__rc.d1312[25]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[125]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[89] = Scm_MakeExtendedPair(scm__rc.d1312[86], SCM_OBJ(&scm__rc.d1313[122]), SCM_OBJ(&scm__rc.d1313[126]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-read-console-output")), SCM_OBJ(&console_sys_read_console_output__STUB), 0);
  console_sys_read_console_output__STUB.common.info = scm__rc.d1312[89];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[90] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[67])),TRUE); /* sys-read-console-output-attribute */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[127]), scm__rc.d1312[84]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[128]), scm__rc.d1312[25]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[131]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[91] = Scm_MakeExtendedPair(scm__rc.d1312[90], SCM_OBJ(&scm__rc.d1313[128]), SCM_OBJ(&scm__rc.d1313[132]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-read-console-output-attribute")), SCM_OBJ(&console_sys_read_console_output_attribute__STUB), 0);
  console_sys_read_console_output_attribute__STUB.common.info = scm__rc.d1312[91];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[92] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[68])),TRUE); /* sys-read-console-output-character */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[93] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[69])),TRUE); /* len */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[133]), scm__rc.d1312[93]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[134]), scm__rc.d1312[25]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[137]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[94] = Scm_MakeExtendedPair(scm__rc.d1312[92], SCM_OBJ(&scm__rc.d1313[134]), SCM_OBJ(&scm__rc.d1313[138]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-read-console-output-character")), SCM_OBJ(&console_sys_read_console_output_character__STUB), 0);
  console_sys_read_console_output_character__STUB.common.info = scm__rc.d1312[94];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[95] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[70])),TRUE); /* sys-set-console-text-attribute */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[96] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[71])),TRUE); /* attr */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[139]), scm__rc.d1312[96]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[140]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[143]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[97] = Scm_MakeExtendedPair(scm__rc.d1312[95], SCM_OBJ(&scm__rc.d1313[140]), SCM_OBJ(&scm__rc.d1313[144]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-text-attribute")), SCM_OBJ(&console_sys_set_console_text_attribute__STUB), 0);
  console_sys_set_console_text_attribute__STUB.common.info = scm__rc.d1312[97];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[98] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[72])),TRUE); /* sys-set-console-window-info */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[99] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[73])),TRUE); /* absolute */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[100] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[74])),TRUE); /* window */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[145]), scm__rc.d1312[100]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[146]), scm__rc.d1312[99]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[147]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[150]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[101] = Scm_MakeExtendedPair(scm__rc.d1312[98], SCM_OBJ(&scm__rc.d1313[147]), SCM_OBJ(&scm__rc.d1313[151]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-window-info")), SCM_OBJ(&console_sys_set_console_window_info__STUB), 0);
  console_sys_set_console_window_info__STUB.common.info = scm__rc.d1312[101];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[102] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[75])),TRUE); /* sys-write-console */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[103] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[76])),TRUE); /* s */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[152]), scm__rc.d1312[103]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[153]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[156]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[104] = Scm_MakeExtendedPair(scm__rc.d1312[102], SCM_OBJ(&scm__rc.d1313[153]), SCM_OBJ(&scm__rc.d1313[157]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-write-console")), SCM_OBJ(&console_sys_write_console__STUB), 0);
  console_sys_write_console__STUB.common.info = scm__rc.d1312[104];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[105] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[77])),TRUE); /* sys-write-console-output-character */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[158]), scm__rc.d1312[103]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[159]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[162]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[106] = Scm_MakeExtendedPair(scm__rc.d1312[105], SCM_OBJ(&scm__rc.d1313[159]), SCM_OBJ(&scm__rc.d1313[163]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-write-console-output-character")), SCM_OBJ(&console_sys_write_console_output_character__STUB), 0);
  console_sys_write_console_output_character__STUB.common.info = scm__rc.d1312[106];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[107] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[78])),TRUE); /* sys-fill-console-output-character */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[108] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[79])),TRUE); /* c */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[164]), scm__rc.d1312[108]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[165]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[168]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[109] = Scm_MakeExtendedPair(scm__rc.d1312[107], SCM_OBJ(&scm__rc.d1313[165]), SCM_OBJ(&scm__rc.d1313[169]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-fill-console-output-character")), SCM_OBJ(&console_sys_fill_console_output_character__STUB), 0);
  console_sys_fill_console_output_character__STUB.common.info = scm__rc.d1312[109];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[110] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[80])),TRUE); /* sys-fill-console-output-attribute */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[170]), scm__rc.d1312[96]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[171]), scm__rc.d1312[22]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[174]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[111] = Scm_MakeExtendedPair(scm__rc.d1312[110], SCM_OBJ(&scm__rc.d1313[171]), SCM_OBJ(&scm__rc.d1313[175]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-fill-console-output-attribute")), SCM_OBJ(&console_sys_fill_console_output_attribute__STUB), 0);
  console_sys_fill_console_output_attribute__STUB.common.info = scm__rc.d1312[111];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[112] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[81])),TRUE); /* sys-flush-console-input-buffer */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[178]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[113] = Scm_MakeExtendedPair(scm__rc.d1312[112], SCM_OBJ(&scm__rc.d1313[22]), SCM_OBJ(&scm__rc.d1313[179]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-flush-console-input-buffer")), SCM_OBJ(&console_sys_flush_console_input_buffer__STUB), 0);
  console_sys_flush_console_input_buffer__STUB.common.info = scm__rc.d1312[113];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[114] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[82])),TRUE); /* sys-get-console-title */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[182]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[115] = Scm_MakeExtendedPair(scm__rc.d1312[114], SCM_NIL, SCM_OBJ(&scm__rc.d1313[183]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-console-title")), SCM_OBJ(&console_sys_get_console_title__STUB), 0);
  console_sys_get_console_title__STUB.common.info = scm__rc.d1312[115];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[116] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[83])),TRUE); /* sys-set-console-title */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[186]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[117] = Scm_MakeExtendedPair(scm__rc.d1312[116], SCM_OBJ(&scm__rc.d1313[152]), SCM_OBJ(&scm__rc.d1313[187]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-console-title")), SCM_OBJ(&console_sys_set_console_title__STUB), 0);
  console_sys_set_console_title__STUB.common.info = scm__rc.d1312[117];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[118] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[84])),TRUE); /* STD_INPUT_HANDLE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[118]), Scm_MakeInteger(STD_INPUT_HANDLE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[119] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[85])),TRUE); /* STD_OUTPUT_HANDLE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[119]), Scm_MakeInteger(STD_OUTPUT_HANDLE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[120] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[86])),TRUE); /* STD_ERROR_HANDLE */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(scm__rc.d1312[120]), Scm_MakeInteger(STD_ERROR_HANDLE), SCM_BINDING_CONST);

#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[121] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[87])),TRUE); /* sys-get-std-handle */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[122] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[88])),TRUE); /* which */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[188]), scm__rc.d1312[122]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[191]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[123] = Scm_MakeExtendedPair(scm__rc.d1312[121], SCM_OBJ(&scm__rc.d1313[188]), SCM_OBJ(&scm__rc.d1313[192]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-get-std-handle")), SCM_OBJ(&console_sys_get_std_handle__STUB), 0);
  console_sys_get_std_handle__STUB.common.info = scm__rc.d1312[123];
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[124] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1301[89])),TRUE); /* sys-set-std-handle */
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[193]), scm__rc.d1312[25]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[194]), scm__rc.d1312[122]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1313[197]), scm__rc.d1312[1]);
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  scm__rc.d1312[125] = Scm_MakeExtendedPair(scm__rc.d1312[124], SCM_OBJ(&scm__rc.d1313[194]), SCM_OBJ(&scm__rc.d1313[198]));
#endif /* defined(GAUCHE_WINDOWS) */
#if defined(GAUCHE_WINDOWS)
  Scm_MakeBinding(SCM_MODULE(mod), SCM_SYMBOL(SCM_INTERN("sys-set-std-handle")), SCM_OBJ(&console_sys_set_std_handle__STUB), 0);
  console_sys_set_std_handle__STUB.common.info = scm__rc.d1312[125];
#endif /* defined(GAUCHE_WINDOWS) */
}
