зеркало из https://github.com/github/ruby.git
[ruby/reline] Add original C function declarations comment for each function
https://github.com/ruby/reline/commit/9a25ee9f12
This commit is contained in:
Родитель
44a9337a46
Коммит
51ee24e7f7
|
@ -39,12 +39,13 @@ module Reline::Terminfo
|
|||
@setupterm = Fiddle::Function.new(curses_dl['setupterm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
|
||||
#extern 'char *tigetstr(char *capname)'
|
||||
@tigetstr = Fiddle::Function.new(curses_dl['tigetstr'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_VOIDP)
|
||||
#extern 'char *tiparm(const char *str, ...)'
|
||||
@tiparm = begin
|
||||
Fiddle::Function.new(curses_dl['tiparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
|
||||
rescue
|
||||
begin
|
||||
#extern 'char *tiparm(const char *str, ...)'
|
||||
@tiparm = Fiddle::Function.new(curses_dl['tiparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
|
||||
rescue Fiddle::DLError
|
||||
# OpenBSD lacks tiparm
|
||||
Fiddle::Function.new(curses_dl['tparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
|
||||
#extern 'char *tparm(const char *str, ...)'
|
||||
@tiparm = Fiddle::Function.new(curses_dl['tparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
|
||||
end
|
||||
# TODO: add int tigetflag(char *capname) and int tigetnum(char *capname)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче