git/xdiff/xtypes.h
Ezekiel Newren efd314b8e8 xdiff: remove dependence on xdlclassifier from xdl_cleanup_records()
Disentangle xdl_cleanup_records() from the classifier so that it can be
moved from xprepare.c into xdiffi.c.

The classic diff is the only algorithm that needs to count the number
of times each line occurs in each file. Make xdl_cleanup_records()
count the number of lines instead of the classifier so it won't slow
down patience or histogram.

Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-04 11:44:52 +09:00

65 lines
1.5 KiB
C

/*
* LibXDiff by Davide Libenzi ( File Differential Library )
* Copyright (C) 2003 Davide Libenzi
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*
* Davide Libenzi <davidel@xmailserver.org>
*
*/
#if !defined(XTYPES_H)
#define XTYPES_H
typedef struct s_chanode {
struct s_chanode *next;
long icurr;
} chanode_t;
typedef struct s_chastore {
chanode_t *head, *tail;
long isize, nsize;
chanode_t *ancur;
chanode_t *sncur;
long scurr;
} chastore_t;
typedef struct s_xrecord {
uint8_t const *ptr;
size_t size;
uint64_t line_hash;
size_t minimal_perfect_hash;
} xrecord_t;
typedef struct s_xdfile {
xrecord_t *recs;
size_t nrec;
bool *changed;
size_t *reference_index;
size_t nreff;
} xdfile_t;
typedef struct s_xdfenv {
xdfile_t xdf1, xdf2;
size_t delta_start, delta_end;
size_t mph_size;
} xdfenv_t;
#endif /* #if !defined(XTYPES_H) */