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

Diff for /src/usr.bin/less/cmdbuf.c between version 1.9 and 1.10

version 1.9, 2015/11/06 15:50:33 version 1.10, 2015/11/07 18:07:44
Line 688 
Line 688 
                  * Save the command and put it at the end of the history list.                   * Save the command and put it at the end of the history list.
                  */                   */
                 ml = ecalloc(1, sizeof (struct mlist));                  ml = ecalloc(1, sizeof (struct mlist));
                 ml->string = save(cmd);                  ml->string = estrdup(cmd);
                 ml->next = mlist;                  ml->next = mlist;
                 ml->prev = mlist->prev;                  ml->prev = mlist->prev;
                 mlist->prev->next = ml;                  mlist->prev->next = ml;
Line 1207 
Line 1207 
                 if (strcmp(name, "-") == 0 || strcmp(name, "/dev/null") == 0)                  if (strcmp(name, "-") == 0 || strcmp(name, "/dev/null") == 0)
                         /* $LESSHISTFILE == "-" means don't use history file */                          /* $LESSHISTFILE == "-" means don't use history file */
                         return (NULL);                          return (NULL);
                 return (save(name));                  return (estrdup(name));
         }          }
   
         /* Otherwise, file is in $HOME if enabled. */          /* Otherwise, file is in $HOME if enabled. */

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10