version 1.9, 2015/11/06 15:50:33 |
version 1.10, 2015/11/07 18:07:44 |
|
|
* 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; |
|
|
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. */ |