[ruby/reline] Add original C function declarations comment for each function

https://github.com/ruby/reline/commit/9a25ee9f12
This commit is contained in:
aycabta 2021-07-24 14:46:54 +09:00
Родитель 44a9337a46
Коммит 51ee24e7f7
1 изменённых файлов: 6 добавлений и 5 удалений

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

@ -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)