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:
aurhat
2015-12-13 22:08:16 +01:00
parent 1917a07dfa
commit 957f1e49ca
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -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");