home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume2 / pd-diff-pat-2 < prev    next >
Internet Message Format  |  1991-08-07  |  2KB

  1. From: neil@yc.estec.nl.UUCP (Neil Dixon)
  2. Newsgroups: comp.sources.misc
  3. Subject: v02i061: More complete patch for pd-cdiff
  4. Message-ID: <7446@ncoast.UUCP>
  5. Date: 29 Feb 88 01:13:39 GMT
  6. Approved: allbery@ncoast.UUCP
  7.  
  8. Comp.sources.misc: Volume 2, Issue 61
  9. Submitted-By: Neil Dixon <neil@yc.estec.nl>
  10. Archive-Name: pd-diff-pat-2
  11.  
  12. [Don't look now, but issue 63 is the next version!  ++bsa]
  13.  
  14. In article <7242@ncoast.UUCP> mike2@lcuxa.UUCP writes:
  15. >
  16. >Neil Dixon uncovered a flaw in the logic of the cdiff program that
  17. >was distributed early in January, and which was redistributed with
  18. >changes to make it compilable in Turbo C.  I've tested his patch
  19. >both on the Unix SysVr2 version and on the PC, and have not found
  20. >any errors.
  21.  
  22. I'm afraid my patch was both incomplete and inelegent. Here's a better patch
  23. to the ORIGINAL program.
  24.  
  25. *** cdiff.c.orig
  26. --- cdiff.c
  27. **************
  28. *** 937,944
  29.       }
  30.     }
  31.     putchar('\n');
  32. !   if (!eflag) {
  33. !       fetch(oldseek, astart, aend, lenA, infd[0], 
  34.           cflag ? (c=='d' ? "- " : "! ") : "< ");
  35.       if (cflag) {
  36.         fputs("--- ", stdout);
  37. --- 937,944 -----
  38.       }
  39.     }
  40.     putchar('\n');
  41. !   if (cflag || c != 'a') {
  42. !       fetch(oldseek, astart , aend, lenA, infd[0], 
  43.           cflag ? (c=='d' ? "- " : "! ") : "< ");
  44.       if (cflag) {
  45.         fputs("--- ", stdout);
  46. **************
  47. *** 947,953
  48.       } else if (astart <= aend && bstart <= bend)
  49.           printf("---\n");
  50.     }
  51. !   fetch(newseek, bstart, bend, lenB, infd[1], 
  52.         cflag ? (c=='a' ? "+ " : "! ") : (eflag ? "" : "> "));
  53.     if (eflag && bstart <= bend)
  54.         printf(".\n");
  55. --- 947,954 -----
  56.       } else if (astart <= aend && bstart <= bend)
  57.           printf("---\n");
  58.     }
  59. !   if(cflag || c != 'd') {
  60. !     fetch(newseek, bstart, bend, lenB, infd[1], 
  61.         cflag ? (c=='a' ? "+ " : "! ") : (eflag ? "" : "> "));
  62.     }
  63.     if (eflag && bstart <= bend)
  64. **************
  65. *** 949,954
  66.     }
  67.     fetch(newseek, bstart, bend, lenB, infd[1], 
  68.         cflag ? (c=='a' ? "+ " : "! ") : (eflag ? "" : "> "));
  69.     if (eflag && bstart <= bend)
  70.         printf(".\n");
  71.   }
  72. --- 950,956 -----
  73.     if(cflag || c != 'd') {
  74.       fetch(newseek, bstart, bend, lenB, infd[1], 
  75.         cflag ? (c=='a' ? "+ " : "! ") : (eflag ? "" : "> "));
  76. +   }
  77.     if (eflag && bstart <= bend)
  78.         printf(".\n");
  79.   }
  80. -- 
  81. Neil Dixon <neil@yc.estec.nl> UUCP:...!mcvax!esatst!neil, BITNET: NDIXON@ESTEC
  82. Thermal Control & Life Support Division (YC) 
  83. European Space Research and Technology Centre (ESTEC),
  84. Noordwijk, The Netherlands.
  85.