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

  1. From decwrl!ucbvax!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!allbery Thu Aug  3 08:50:57 PDT 1989
  2. Article 989 of comp.sources.misc:
  3. Path: decwrl!ucbvax!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!allbery
  4. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5. Newsgroups: comp.sources.misc
  6. Subject: v07i097: bug fix to v07i056: July CACM Diff program
  7. Message-ID: <61160@uunet.UU.NET>
  8. Date: 22 Jul 89 01:08:06 GMT
  9. Sender: allbery@uunet.UU.NET
  10. Reply-To: Donald.Lindsay@MATHOM.GANDALF.CS.CMU.EDU
  11. Lines: 70
  12. Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  13.  
  14. Posting-number: Volume 7, Issue 97
  15. Submitted-by: Donald.Lindsay@MATHOM.GANDALF.CS.CMU.EDU
  16. Archive-name: cacm-diff.p1
  17.  
  18. *************< cut here: diff -c output >************************
  19.  
  20. *** diff12.c    Tue Jul 18 10:51:20 1989
  21. --- diff13.c    Tue Jul 18 10:51:43 1989
  22. ***************
  23. *** 64,69 ****
  24. --- 64,72 ----
  25.   *    read in full, or in a particular order. Rather, this program is an
  26.   *    example of one professional's style of keeping things organized and
  27.   *    maintainable.
  28. + * The program would be better if the "print" variables were wrapped into
  29. + *    a struct. In general, grouping related variables in this way improves
  30. + *    documentation, and adds the ability to pass the group in argument lists.
  31.   * This program is a de-engineered version of a program which uses less
  32.   *    memory and less time.  The article points out that the "symbol" arrays
  33.   *    can be implemented as arrays of pointers to arrays, with dynamic
  34. ***************
  35. *** 78,83 ****
  36. --- 81,89 ----
  37.   *
  38.   * Change Log
  39.   * ----------
  40. + *  6jul89 D.C.Lindsay, CMU: fixed portability bug. Thanks, Gregg Wonderly.
  41. + *         Just changed "char ch" to "int ch". 
  42. + *         Also added comment about way to improve code.
  43.   * 10jun89 D.C.Lindsay, CMU: posted version created.
  44.   *         Copyright notice changed to ACM style, and Dept. is now School.
  45.   *         ACM article referenced in docn.
  46. ***************
  47. *** 207,213 ****
  48.   void inputscan( pinfo )
  49.   struct info *pinfo;
  50.   {
  51. !      char ch, linebuffer[ MAXLINELEN+1 ];    /* accumulate lines to here */
  52.        int linelen = 0;                        /* # of chars in linebuffer */
  53.   
  54.        pinfo-> maxline = 0;
  55. --- 213,220 ----
  56.   void inputscan( pinfo )
  57.   struct info *pinfo;
  58.   {
  59. !      char linebuffer[ MAXLINELEN+1 ];        /* accumulate lines to here */
  60. !      int ch;
  61.        int linelen = 0;                        /* # of chars in linebuffer */
  62.   
  63.        pinfo-> maxline = 0;
  64.  
  65. ****************< cut here: end of diff -c output >********************
  66. or, in the format of the program itself,
  67.  
  68. >>>> Difference of file "diff12.c" and file "diff13.c".
  69.  
  70. >>>> INSERT BEFORE 67
  71. * The program would be better if the "print" variables were wrapped into
  72. *    a struct. In general, grouping related variables in this way improves
  73. *    documentation, and adds the ability to pass the group in argument lists.
  74. >>>> INSERT BEFORE 81
  75. *  6jul89 D.C.Lindsay, CMU: fixed portability bug. Thanks, Gregg Wonderly.
  76. *         Just changed "char ch" to "int ch". 
  77. *         Also added comment about way to improve code.
  78. >>>> 210 CHANGED FROM
  79.      char ch, linebuffer[ MAXLINELEN+1 ];    /* accumulate lines to here */
  80. >>>>     CHANGED TO
  81.      char linebuffer[ MAXLINELEN+1 ];        /* accumulate lines to here */
  82.      int ch;
  83. >>>> End of differences.
  84.  
  85.  
  86.