Cleanup
Note: abbreviation of minutes and seconds in HUD messages in ktf is needed, because for 5:4 aspect ratio messages could not fit in display.
This commit is contained in:
@@ -437,11 +437,11 @@ void history_(int *n)
|
||||
|
||||
COMMANDN(history, history_, "i");
|
||||
|
||||
void savehistory()
|
||||
void savehistory()
|
||||
{
|
||||
stream *f = openfile(path("config/history", true), "w");
|
||||
if(!f) return;
|
||||
loopv(history)
|
||||
loopv(history)
|
||||
{
|
||||
hline *h = history[i];
|
||||
if(!h->action && !h->prompt && strncmp(h->buf, "/ ", 2))
|
||||
@@ -450,13 +450,13 @@ void savehistory()
|
||||
delete f;
|
||||
}
|
||||
|
||||
void loadhistory()
|
||||
void loadhistory()
|
||||
{
|
||||
char *histbuf = loadfile(path("config/history", true), NULL);
|
||||
if(!histbuf) return;
|
||||
if(!histbuf) return;
|
||||
char *line = NULL;
|
||||
line = strtok(histbuf, "\n");
|
||||
while(line)
|
||||
while(line)
|
||||
{
|
||||
history.add(new hline)->buf = newstring(line);
|
||||
line = strtok(NULL, "\n");
|
||||
|
||||
Reference in New Issue
Block a user