* ext/io/console/console.c (console_dev): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-06-13 14:06:35 +00:00
Родитель a72f033447
Коммит 3254c1bf24
1 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -544,33 +544,33 @@ console_dev(VALUE klass)
{ {
VALUE args[2]; VALUE args[2];
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H || defined HAVE_SGTTY_H #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H || defined HAVE_SGTTY_H
# define CONSOLE_DEVISE "/dev/tty" # define CONSOLE_DEVICE "/dev/tty"
#elif defined _WIN32 #elif defined _WIN32
# define CONSOLE_DEVISE "con$" # define CONSOLE_DEVICE "con$"
# define CONSOLE_DEVISE_FOR_READING "conin$" # define CONSOLE_DEVICE_FOR_READING "conin$"
# define CONSOLE_DEVISE_FOR_WRITING "conout$" # define CONSOLE_DEVICE_FOR_WRITING "conout$"
#endif #endif
#ifndef CONSOLE_DEVISE_FOR_READING #ifndef CONSOLE_DEVICE_FOR_READING
# define CONSOLE_DEVISE_FOR_READING CONSOLE_DEVISE # define CONSOLE_DEVICE_FOR_READING CONSOLE_DEVICE
#endif #endif
#ifdef CONSOLE_DEVISE_FOR_WRITING #ifdef CONSOLE_DEVICE_FOR_WRITING
VALUE out; VALUE out;
rb_io_t *ofptr; rb_io_t *ofptr;
#endif #endif
args[1] = INT2FIX(O_RDWR); args[1] = INT2FIX(O_RDWR);
#ifdef CONSOLE_DEVISE_FOR_WRITING #ifdef CONSOLE_DEVICE_FOR_WRITING
args[0] = rb_str_new2(CONSOLE_DEVISE_FOR_WRITING); args[0] = rb_str_new2(CONSOLE_DEVICE_FOR_WRITING);
out = rb_class_new_instance(2, args, klass); out = rb_class_new_instance(2, args, klass);
#endif #endif
args[0] = rb_str_new2(CONSOLE_DEVISE_FOR_READING); args[0] = rb_str_new2(CONSOLE_DEVICE_FOR_READING);
con = rb_class_new_instance(2, args, klass); con = rb_class_new_instance(2, args, klass);
#ifdef CONSOLE_DEVISE_FOR_WRITING #ifdef CONSOLE_DEVICE_FOR_WRITING
GetOpenFile(con, fptr); GetOpenFile(con, fptr);
GetOpenFile(out, ofptr); GetOpenFile(out, ofptr);
# ifdef HAVE_RB_IO_GET_WRITE_IO # ifdef HAVE_RB_IO_GET_WRITE_IO
# ifdef _WIN32 # ifdef _WIN32
ofptr->pathv = fptr->pathv = rb_str_new2(CONSOLE_DEVISE); ofptr->pathv = fptr->pathv = rb_str_new2(CONSOLE_DEVICE);
# endif # endif
fptr->tied_io_for_writing = out; fptr->tied_io_for_writing = out;
# else # else