diff --git a/error-report-crash.patch b/error-report-crash.patch deleted file mode 100644 index 9f5b057..0000000 --- a/error-report-crash.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 291ec175812b7ba291d124e4cf2fbf9efec590c8 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Thu, 4 Oct 2012 12:33:09 +0200 -Subject: [PATCH] Initialize data structures early enough - -* src/patch.c (main): Initialize data structures early enough, before error -paths can access them. -* tests/bad-usage: Test bad command line usage. -* tests/Makefile.am (TESTS): Add bad-usage here. ---- - src/patch.c | 8 ++++---- - tests/Makefile.am | 1 + - tests/bad-usage | 18 ++++++++++++++++++ - 3 files changed, 23 insertions(+), 4 deletions(-) - create mode 100644 tests/bad-usage - -Index: patch-2.7.1/src/patch.c -=================================================================== ---- patch-2.7.1.orig/src/patch.c -+++ patch-2.7.1/src/patch.c -@@ -150,6 +150,10 @@ main (int argc, char **argv) - else if ((version_control = getenv ("VERSION_CONTROL"))) - version_control_context = "$VERSION_CONTROL"; - -+ init_backup_hash_table (); -+ init_files_to_delete (); -+ init_files_to_output (); -+ - /* parse switches */ - Argc = argc; - Argv = argv; -@@ -162,10 +166,6 @@ main (int argc, char **argv) - if (make_backups | backup_if_mismatch) - backup_type = get_version (version_control_context, version_control); - -- init_backup_hash_table (); -- init_files_to_delete (); -- init_files_to_output (); -- - init_output (&outstate); - if (outfile) - outstate.ofp = open_outfile (outfile); -Index: patch-2.7.1/tests/Makefile.am -=================================================================== ---- patch-2.7.1.orig/tests/Makefile.am -+++ patch-2.7.1/tests/Makefile.am -@@ -20,6 +20,7 @@ TESTS = \ - asymmetric-hunks \ - backup-prefix-suffix \ - bad-filenames \ -+ bad-usage \ - concat-git-diff \ - copy-rename \ - corrupt-reject-files \ -Index: patch-2.7.1/tests/Makefile.in -=================================================================== ---- patch-2.7.1.orig/tests/Makefile.in -+++ patch-2.7.1/tests/Makefile.in -@@ -1075,6 +1075,7 @@ TESTS = \ - asymmetric-hunks \ - backup-prefix-suffix \ - bad-filenames \ -+ bad-usage \ - concat-git-diff \ - copy-rename \ - corrupt-reject-files \ -@@ -1294,6 +1295,8 @@ backup-prefix-suffix.log: backup-prefix- - @p='backup-prefix-suffix'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) - bad-filenames.log: bad-filenames - @p='bad-filenames'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) -+bad-usage.log: bad-usage -+ @p='bad-usage'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) - concat-git-diff.log: concat-git-diff - @p='concat-git-diff'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) - copy-rename.log: copy-rename -Index: patch-2.7.1/tests/bad-usage -=================================================================== ---- /dev/null -+++ patch-2.7.1/tests/bad-usage -@@ -0,0 +1,18 @@ -+# Copyright (C) 2009, 2011-2012 Free Software Foundation, Inc. -+# -+# Copying and distribution of this file, with or without modification, -+# in any medium, are permitted without royalty provided the copyright -+# notice and this notice are preserved. -+ -+. $srcdir/test-lib.sh -+ -+require_cat -+use_local_patch -+use_tmpdir -+ -+# ============================================================== -+ -+check 'patch -px || echo "status: $?"' < -Subject: Drop useless test in another_hunk() -Upstream: Committed (65193f1cc1bf38bdd63d1f3087b0d7e16ad3f082) - -This test will always succeed so it is either broken or useless. The -equivalent code path for context patches doesn't have this test so I -suppose it's OK to just remove it. ---- - src/pch.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/pch.c -+++ b/src/pch.c -@@ -1651,7 +1651,7 @@ another_hunk (enum diff difftype, bool r - if (*s == ' ') s++; - if (*s++ != '@') - malformed (); -- if (*s++ == '@' && *s == ' ' && *s != '\0') -+ if (*s++ == '@' && *s == ' ') - { - p_c_function = s; - while (*s != '\n') diff --git a/reject-print-function-02-handle-unified-format.patch b/reject-print-function-02-handle-unified-format.patch deleted file mode 100644 index 97a91f0..0000000 --- a/reject-print-function-02-handle-unified-format.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Steven Rostedt -Subject: Preserve function names in reject files -Upstream: Committed (a2f4bfe0f3f54181a8f1077cde9ebef0b4f891c0) -References: bnc#904519 - -* src/patch.c (main): Preserve function names in reject files. -* tests/reject-format: Update the test case. ---- - src/patch.c | 3 ++- - tests/reject-format | 4 ++-- - 2 files changed, 4 insertions(+), 3 deletions(-) - ---- a/src/patch.c -+++ b/src/patch.c -@@ -1237,6 +1237,7 @@ abort_hunk_unified (bool header, bool re - lin old = 1; - lin lastline = pch_ptrn_lines (); - lin new = lastline + 1; -+ char const *c_function = pch_c_function(); - - if (header) - { -@@ -1251,7 +1252,7 @@ abort_hunk_unified (bool header, bool re - print_unidiff_range (rejfp, pch_first () + out_offset, lastline); - fprintf (rejfp, " +"); - print_unidiff_range (rejfp, pch_newfirst () + out_offset, pch_repl_lines ()); -- fprintf (rejfp, " @@\n"); -+ fprintf (rejfp, " @@%s\n", c_function ? c_function : ""); - - while (pch_char (new) == '=' || pch_char (new) == '\n') - new++; ---- a/tests/reject-format -+++ b/tests/reject-format -@@ -79,7 +79,7 @@ check 'cat f.rej' <