[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] addition: fstrcmp.h, fstrcmp.c
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] addition: fstrcmp.h, fstrcmp.c |
Date: |
Fri, 31 Jan 2003 17:18:40 +0100 (CET) |
Paul Eggert writes:
> > struct hunk * diff_sequences (const ELEMENT *seq1, size_t size1,
> > const ELEMENT *seq2, size_t size2);
> >
> > where
> >
> > struct hunk
> > {
> > struct hunk *next;
> > struct change *changes; // list of changes, see diff.h
> > };
>
> Wouldn't it suffice to return 'struct change *'? That is, why
> do you need a list of list of changes; won't a list of changes do?
It will do as well. (I have to combine several nearby changes to a
hunk, like "diff -c3" and "diff -u" do, but I can easily do this
myself in a linear pass over the list of changes.)
Also, it doesn't matter whether the return value is a linked list of
'struct change' or an array of 'struct change' - any of these will do.
Bruno