# ioctl example works on Sun CBREAK = 0x00000002 ECHO = 0x00000008 TIOCGETP = 0x40067408 TIOCSETP = 0x80067409 def cbreak () set_cbreak(TRUE) end def cooked () set_cbreak(FALSE) end def set_cbreak (on) tty = "\0" * 256 STDIN.ioctl(TIOCGETP, tty) ttys = tty.unpack("C4 S") if on ttys[4] |= CBREAK ttys[4] &= ~ECHO else ttys[4] &= ~CBREAK ttys[4] |= ECHO end tty = ttys.pack("C4 S") STDIN.ioctl(TIOCSETP, tty) end cbreak(); print("this is no-echo line: "); readline().print cooked(); print("this is echo line: "); readline() ' value='ea92374bf727325fe96b5f65a41cdc1fc147af9e'/> The Ruby Programming Language
summaryrefslogtreecommitdiff
path: root/internal/time.h
AgeCommit message (Expand)Author
2021-09-10internal/*.h: skip doxygen卜部昌平
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
2020-04-13add #include guard hack卜部昌平
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
2020-01-28Extract a function, ruby_reset_timezone().Tanaka Akira
2019-12-26other minior internal header tweaks卜部昌平
2019-12-26split internal.h into files卜部昌平