From 3658e81e3499f874dc9f323d4d9127df7e219e12 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 25 Mar 2013 14:20:07 -0700 Subject: Move crlf conversion into buf_text This adds crlf/lf conversion functions into buf_text with more efficient implementations that bypass the high level buffer functions. They attempt to minimize the number of reallocations done and they directly write the buffer data as needed if they know that there is enough memory allocated to memcpy data. Tests are added for these new functions. The crlf.c code is updated to use the new functions. Removed the include of buf_text.h from filter.h and just include it more narrowly in the places that need it. --- src/diff_output.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/diff_output.c') diff --git a/src/diff_output.c b/src/diff_output.c index fba6129b7..e8dd5b317 100644 --- a/src/diff_output.c +++ b/src/diff_output.c @@ -12,6 +12,7 @@ #include #include "fileops.h" #include "filter.h" +#include "buf_text.h" static int read_next_int(const char **str, int *value) { -- cgit v1.2.1