home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume7 / cacm-diff.p1 < prev    next >
Encoding:
Text File  |  1989-07-21  |  2.9 KB  |  77 lines

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