Skip to content
Browse files

Added getc, getchar, gets, ungetc.

  • Loading branch information...
1 parent 7cc3a89 commit da6166e365e64bdce2af2c1bc271235430ff6f35 @postmodern committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/ffi/libc/libc.rb
View
5 lib/ffi/libc/libc.rb
@@ -113,6 +113,11 @@ def self.raise_error(error=self.errno)
attach_function :fileno, [:FILE], :int
attach_function :perror, [:string], :void
+ attach_function :getc, [:FILE], :int
+ attach_function :getchar, [], :int
+ attach_function :gets, [:buffer_out], :int
+ attach_function :ungetc, [:int, :pointer], :int
+
attach_function :putc, [:int, :FILE], :int
attach_function :putchar, [:int], :int
attach_function :puts, [:string], :int

0 comments on commit da6166e

Please sign in to comment.
Something went wrong with that request. Please try again.