diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-13 18:59:54 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-13 18:59:54 +1100 |
commit | 4aea3718c6de90471d0f63d930a874c87edb3fcd (patch) | |
tree | 3631c199026cffd70df6d2f38e6fb1abfb9a3d44 /src/fltk_binding/fltk-text_buffers.adb | |
parent | 9a7351c664d7f05232cb3f934658c79fffc752fd (diff) |
Fixed bug in word count
Diffstat (limited to 'src/fltk_binding/fltk-text_buffers.adb')
-rw-r--r-- | src/fltk_binding/fltk-text_buffers.adb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/fltk_binding/fltk-text_buffers.adb b/src/fltk_binding/fltk-text_buffers.adb index ab752ff..5db105d 100644 --- a/src/fltk_binding/fltk-text_buffers.adb +++ b/src/fltk_binding/fltk-text_buffers.adb @@ -96,6 +96,12 @@ package body FLTK.Text_Buffers is return Interfaces.C.int; pragma Import (C, fl_text_buffer_rewind_lines, "fl_text_buffer_rewind_lines"); + function fl_text_buffer_char_at + (TB : in System.Address; + P : in Interfaces.C.int) + return Interfaces.C.unsigned; + pragma Import (C, fl_text_buffer_char_at, "fl_text_buffer_char_at"); + @@ -376,5 +382,18 @@ package body FLTK.Text_Buffers is end Rewind_Lines; + + + function Character_At + (This : in Text_Buffer; + Pos : in Natural) + return Character is + begin + return Character'Val (fl_text_buffer_char_at + (This.Void_Ptr, + Interfaces.C.int (Pos))); + end Character_At; + + end FLTK.Text_Buffers; |