3.9 (bug #2161117).
This commit is contained in:
parent
2aba9bf603
commit
b3d7b433f0
6 changed files with 48 additions and 44 deletions
|
|
@ -1,7 +1,7 @@
|
|||
diff -up diffutils-3.8/src/diff.c.i18n diffutils-3.8/src/diff.c
|
||||
--- diffutils-3.8/src/diff.c.i18n 2021-06-12 06:50:55.000000000 +0100
|
||||
+++ diffutils-3.8/src/diff.c 2021-08-02 09:55:20.671517943 +0100
|
||||
@@ -77,6 +77,8 @@ static void try_help (char const *, char
|
||||
diff -up diffutils-3.9/src/diff.c.i18n diffutils-3.9/src/diff.c
|
||||
--- diffutils-3.9/src/diff.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/diff.c 2023-01-16 14:40:53.841265893 +0000
|
||||
@@ -76,6 +76,8 @@ static _Noreturn void try_help (char con
|
||||
static void check_stdout (void);
|
||||
static void usage (void);
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ diff -up diffutils-3.8/src/diff.c.i18n diffutils-3.8/src/diff.c
|
|||
/* If comparing directories, compare their common subdirectories
|
||||
recursively. */
|
||||
static bool recursive;
|
||||
@@ -300,6 +302,13 @@ main (int argc, char **argv)
|
||||
@@ -303,6 +305,13 @@ main (int argc, char **argv)
|
||||
presume_output_tty = false;
|
||||
xstdopen ();
|
||||
|
||||
|
|
@ -24,9 +24,9 @@ diff -up diffutils-3.8/src/diff.c.i18n diffutils-3.8/src/diff.c
|
|||
/* Decode the options. */
|
||||
|
||||
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
|
||||
diff -up diffutils-3.8/src/diff.h.i18n diffutils-3.8/src/diff.h
|
||||
--- diffutils-3.8/src/diff.h.i18n 2021-01-02 01:37:49.000000000 +0000
|
||||
+++ diffutils-3.8/src/diff.h 2021-08-02 09:54:36.922101185 +0100
|
||||
diff -up diffutils-3.9/src/diff.h.i18n diffutils-3.9/src/diff.h
|
||||
--- diffutils-3.9/src/diff.h.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/diff.h 2023-01-16 14:41:58.620317020 +0000
|
||||
@@ -23,6 +23,17 @@
|
||||
#include <stdio.h>
|
||||
#include <unlocked-io.h>
|
||||
|
|
@ -45,22 +45,22 @@ diff -up diffutils-3.8/src/diff.h.i18n diffutils-3.8/src/diff.h
|
|||
/* What kind of changes a hunk contains. */
|
||||
enum changes
|
||||
{
|
||||
@@ -381,7 +392,11 @@ extern void print_sdiff_script (struct c
|
||||
@@ -389,7 +400,11 @@ extern void print_sdiff_script (struct c
|
||||
/* util.c */
|
||||
extern char const change_letter[4];
|
||||
extern char const pr_program[];
|
||||
extern char *concat (char const *, char const *, char const *);
|
||||
-extern bool lines_differ (char const *, char const *) _GL_ATTRIBUTE_PURE;
|
||||
+extern bool (*lines_differ) (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
|
||||
+extern bool lines_differ_singlebyte (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
|
||||
-extern bool lines_differ (char const *, char const *) ATTRIBUTE_PURE;
|
||||
+extern bool (*lines_differ) (char const *, size_t, char const *, size_t) ATTRIBUTE_PURE;
|
||||
+extern bool lines_differ_singlebyte (char const *, size_t, char const *, size_t) ATTRIBUTE_PURE;
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+extern bool lines_differ_multibyte (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
|
||||
+extern bool lines_differ_multibyte (char const *, size_t, char const *, size_t) ATTRIBUTE_PURE;
|
||||
+#endif
|
||||
extern lin translate_line_number (struct file_data const *, lin);
|
||||
extern struct change *find_change (struct change *);
|
||||
extern struct change *find_reverse_change (struct change *);
|
||||
diff -up diffutils-3.8/src/io.c.i18n diffutils-3.8/src/io.c
|
||||
--- diffutils-3.8/src/io.c.i18n 2021-01-02 01:37:49.000000000 +0000
|
||||
+++ diffutils-3.8/src/io.c 2021-08-02 09:58:03.672211301 +0100
|
||||
diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
--- diffutils-3.9/src/io.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/io.c 2023-01-16 14:40:53.841265893 +0000
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <cmpbuf.h>
|
||||
#include <file-type.h>
|
||||
|
|
@ -69,7 +69,7 @@ diff -up diffutils-3.8/src/io.c.i18n diffutils-3.8/src/io.c
|
|||
|
||||
/* Rotate an unsigned value to the left. */
|
||||
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
|
||||
@@ -215,6 +216,28 @@ slurp (struct file_data *current)
|
||||
@@ -214,6 +215,28 @@ slurp (struct file_data *current)
|
||||
|
||||
/* Split the file into lines, simultaneously computing the equivalence
|
||||
class for each line. */
|
||||
|
|
@ -98,7 +98,7 @@ diff -up diffutils-3.8/src/io.c.i18n diffutils-3.8/src/io.c
|
|||
|
||||
static void
|
||||
find_and_hash_each_line (struct file_data *current)
|
||||
@@ -241,12 +264,300 @@ find_and_hash_each_line (struct file_dat
|
||||
@@ -240,12 +263,300 @@ find_and_hash_each_line (struct file_dat
|
||||
bool same_length_diff_contents_compare_anyway =
|
||||
diff_length_compare_anyway | ig_case;
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ diff -up diffutils-3.8/src/io.c.i18n diffutils-3.8/src/io.c
|
|||
/* Hash this line until we find a newline. */
|
||||
switch (ig_white_space)
|
||||
{
|
||||
@@ -397,7 +708,7 @@ find_and_hash_each_line (struct file_dat
|
||||
@@ -396,7 +707,7 @@ find_and_hash_each_line (struct file_dat
|
||||
else if (!diff_length_compare_anyway)
|
||||
continue;
|
||||
|
||||
|
|
@ -408,10 +408,10 @@ diff -up diffutils-3.8/src/io.c.i18n diffutils-3.8/src/io.c
|
|||
break;
|
||||
}
|
||||
|
||||
diff -up diffutils-3.8/src/util.c.i18n diffutils-3.8/src/util.c
|
||||
--- diffutils-3.8/src/util.c.i18n 2021-01-02 01:37:49.000000000 +0000
|
||||
+++ diffutils-3.8/src/util.c 2021-08-02 09:54:36.922101185 +0100
|
||||
@@ -985,7 +985,8 @@ finish_output (void)
|
||||
diff -up diffutils-3.9/src/util.c.i18n diffutils-3.9/src/util.c
|
||||
--- diffutils-3.9/src/util.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/util.c 2023-01-16 14:40:53.842265909 +0000
|
||||
@@ -1084,7 +1084,8 @@ finish_output (void)
|
||||
Return nonzero if the lines differ. */
|
||||
|
||||
bool
|
||||
|
|
@ -421,7 +421,7 @@ diff -up diffutils-3.8/src/util.c.i18n diffutils-3.8/src/util.c
|
|||
{
|
||||
register char const *t1 = s1;
|
||||
register char const *t2 = s2;
|
||||
@@ -1141,6 +1142,354 @@ lines_differ (char const *s1, char const
|
||||
@@ -1240,6 +1241,354 @@ lines_differ (char const *s1, char const
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue