diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2012-05-09 22:43:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-09 14:13:05 -0700 |
commit | be89977543c7798411f336236a506bf07b0a3d71 (patch) | |
tree | f2c3504cb84e51a5d9659705d188594b164f2efe /xdiff/xutils.c | |
parent | 3319e606336c13ba6475d83e700ca53537cedfd9 (diff) | |
download | git-be89977543c7798411f336236a506bf07b0a3d71.tar.gz git-be89977543c7798411f336236a506bf07b0a3d71.tar.xz |
xdiff: remove unused functions
The functions xdl_cha_first(), xdl_cha_next() and xdl_atol() are not used
by us. While removing them increases the difference to the upstream
version of libxdiff, it only adds a bit to the more than 600 differing
lines in xutils.c (mmfile_t management was simplified significantly when
the library was imported initially). Besides, if upstream modifies these
functions in the future, we won't need to think about importing those
changes, so in that sense it makes tracking modifications easier.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff/xutils.c')
-rw-r--r-- | xdiff/xutils.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/xdiff/xutils.c b/xdiff/xutils.c index 1b3b471ac..ae6ce0d95 100644 --- a/xdiff/xutils.c +++ b/xdiff/xutils.c @@ -122,35 +122,6 @@ void *xdl_cha_alloc(chastore_t *cha) { return data; } - -void *xdl_cha_first(chastore_t *cha) { - chanode_t *sncur; - - if (!(cha->sncur = sncur = cha->head)) - return NULL; - - cha->scurr = 0; - - return (char *) sncur + sizeof(chanode_t) + cha->scurr; -} - - -void *xdl_cha_next(chastore_t *cha) { - chanode_t *sncur; - - if (!(sncur = cha->sncur)) - return NULL; - cha->scurr += cha->isize; - if (cha->scurr == sncur->icurr) { - if (!(sncur = cha->sncur = sncur->next)) - return NULL; - cha->scurr = 0; - } - - return (char *) sncur + sizeof(chanode_t) + cha->scurr; -} - - long xdl_guess_lines(mmfile_t *mf, long sample) { long nl = 0, size, tsize = 0; char const *data, *cur, *top; @@ -430,20 +401,6 @@ int xdl_num_out(char *out, long val) { return str - out; } - -long xdl_atol(char const *str, char const **next) { - long val, base; - char const *top; - - for (top = str; XDL_ISDIGIT(*top); top++); - if (next) - *next = top; - for (val = 0, base = 1, top--; top >= str; top--, base *= 10) - val += base * (long)(*top - '0'); - return val; -} - - int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2, const char *func, long funclen, xdemitcb_t *ecb) { int nb = 0; |