home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume02 / pddifpat.2 < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  2.9 KB

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