[BACK]Return to echo.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/echo.c between version 1.16 and 1.17

version 1.16, 2001/05/24 09:47:33 version 1.17, 2002/01/18 08:37:08
Line 417 
Line 417 
         int      oldrow = ttrow;          int      oldrow = ttrow;
         int      oldcol = ttcol;          int      oldcol = ttcol;
         int      oldhue = tthue;          int      oldhue = tthue;
         char     linebuf[NCOL + 1];          char     *linebuf;
         char    *cp;          char    *cp;
   
         lh = NULL;          lh = NULL;
Line 504 
Line 504 
                  * Now do the display.  objects are written into linebuf until                   * Now do the display.  objects are written into linebuf until
                  * it fills, and then put into the help buffer.                   * it fills, and then put into the help buffer.
                  */                   */
                   if ((linebuf = malloc((nrow + 1) * sizeof(char))) == NULL)
                           return FALSE;
                 cp = linebuf;                  cp = linebuf;
                 width = 0;                  width = 0;
                 lh2 = lh;                  lh2 = lh;
Line 532 
Line 534 
                         *cp = 0;                          *cp = 0;
                         addline(bp, linebuf);                          addline(bp, linebuf);
                 }                  }
                   free(linebuf);
         }          }
         /*          /*
          * Note that we free lists only if they are put in wholelist lists           * Note that we free lists only if they are put in wholelist lists

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17