on master help sign in
remove stdout_output_buffer. Not used anymore
4e95657coreyoconnor
cbits/output_buffer.cdeleted−18
@@ -1,18 +0,0 @@
1−#define _XOPEN_SOURCE 500
2−#include <unistd.h>
3−
4−#include "output_buffer.h"
5−
6−void stdout_output_buffer ( int out_fd, uint8_t* buffer, size_t buffer_size )
7−{
8− while ( buffer_size )
9− {
10− const ssize_t r = write( out_fd, (void*) buffer, buffer_size );
11−
12− buffer_size -= (size_t) r;
13− buffer += (size_t) r;
14− }
15−
16− fdatasync( out_fd );
17−}
18−
cbits/output_buffer.hdeleted−5
@@ -1,5 +0,0 @@
1−#define _XOPEN_SOURCE 500
2−#include <unistd.h>
3−#include <stdint.h>
4−
5−void stdout_output_buffer ( int out_fd, uint8_t* buffer, size_t buffer_size );
src/Graphics/Vty/Terminal/TerminfoBased.hs−4
@@ -181,12 +181,8 @@ instance Terminal Term where
181
181
182 output_handle t = return (term_handle t)
182 output_handle t = return (term_handle t)
183
183
184−-- foreign import ccall unsafe "output_buffer.h stdout_output_buffer" c_output_byte_buffer
185−-- :: CInt -> Ptr Word8 -> CSize -> IO ()
186foreign import ccall "gwinsz.h c_get_window_size" c_get_window_size
184foreign import ccall "gwinsz.h c_get_window_size" c_get_window_size
187 :: IO CLong
185 :: IO CLong
188−-- foreign import ccall "fdatasync" c_fdatasync
189−-- :: CInt -> IO CInt
190
186
191get_window_size :: IO (Int,Int)
187get_window_size :: IO (Int,Int)
192get_window_size = do
188get_window_size = do
vty.cabal−1
@@ -58,7 +58,6 @@ other-modules: Codec.Binary.UTF8.Width
58C-Sources: cbits/gwinsz.c
58C-Sources: cbits/gwinsz.c
59 cbits/set_term_timing.c
59 cbits/set_term_timing.c
60 cbits/mk_wcwidth.c
60 cbits/mk_wcwidth.c
61− cbits/output_buffer.c
62
61
63Include-Dirs: cbits
62Include-Dirs: cbits
64hs-source-dirs: src
63hs-source-dirs: src