ohcount
Functions
diff.h File Reference

Go to the source code of this file.

Functions

void ohcount_calc_diff (const char *from, const char *to, int *added, int *removed)
 

Function Documentation

◆ ohcount_calc_diff()

void ohcount_calc_diff ( const char *  from,
const char *  to,
int *  added,
int *  removed 
)

Computes the diff between the lines of two given string buffers. The results are stored in the passed integer pointers. Note: The algorithm discussed mentions a check being performed to find lines matched incorrectly due to hashing; it is not in this implementation.

Parameters
fromThe diff 'from' buffer.
toThe diff 'to' buffer.
addedInt pointer the number of lines added result is stored to.
removedInt pointer the number of lines removed result is stored to.