Article View: gnu.utils.bug
Article #430bug in context diff code in gnu diff
From: Arnold D. Robbins
Date: Mon, 18 Sep 1989 23:45
Date: Mon, 18 Sep 1989 23:45
41 lines
2123 bytes
2123 bytes
Something is flaky in the context diff code in gnu diff. The following
script shows the problem. The line at 410 which is marked for deletion
is actually still there in the new version of the file. A regular diff
comes out correctly, oddly enough.
Script started on Mon Sep 18 19:42:35 1989
emoryu1> diff -c diff/awk.h awk.h
*** diff/awk.h Wed Aug 23 17:13:53 1989
--- awk.h Mon Sep 18 17:53:54 1989
***************
*** 399,410 ****
((_t)->type == Node_val ? (_t) : r_tree_eval((_t))))
#define make_string(s,l) make_str_node((s),(l),0)
- /*
- * the val variable allows continue/break-out-of-context to be
- * caught and diagnosed
- */
- #define PUSH_BINDING(stack, x, val) (memcpy ((char *)(stack), (char *)(x), sizeof (jmp_buf)), val++)
- #define RESTORE_BINDING(stack, x, val) (memcpy ((char *)(x), (char *)(stack), sizeof (jmp_buf)), val--)
#define cant_happen() fatal("line %d, file: %s; bailing out", \
- __LINE__, __FILE__);
--- 399,403 ----
emoryu1> diff diff/awk.h awk.h
401,407d400
<
< /*
< * the val variable allows continue/break-out-of-context to be
< * caught and diagnosed
< */
< #define PUSH_BINDING(stack, x, val) (memcpy ((char *)(stack), (char *)(x), sizeof (jmp_buf)), val++)
< #define RESTORE_BINDING(stack, x, val) (memcpy ((char *)(x), (char *)(stack), sizeof (jmp_buf)), val--)
emoryu1>
script done on Mon Sep 18 19:42:52 1989
--
Arnold Robbins -- Emory University Computing Center | Laundry increases
DOMAIN: arnold@emoryu1.cc.emory.edu | exponentially in the
UUCP: gatech!emoryu1!arnold PHONE: +1 404 727-7636 | number of children.
BITNET: arnold@emoryu1 FAX: +1 404 727-2599 | -- Miriam Hartholz
Technical Details
Message-ID:
<8909182345.AA11462@emoryu1.cc.emory.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!unix.cc.emory.edu!arnoldShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!unix.cc.emory.edu!arnold From: arnold@unix.cc.emory.edu (Arnold D. Robbins) Newsgroups: gnu.utils.bug Subject: bug in context diff code in gnu diff Message-ID: <8909182345.AA11462@emoryu1.cc.emory.edu> Date: 18 Sep 89 23:45:36 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 41