Let loadHistory return an error code

This is in preparation for a following patch.
This commit is contained in:
Rene Kita
2022-09-05 11:53:40 +02:00
parent de813c322c
commit f186e8331f
2 changed files with 5 additions and 4 deletions

View File

@@ -31,16 +31,16 @@ historyBuffer(Hist *hist)
return loadHTMLString(src);
}
void
int
loadHistory(Hist *hist)
{
FILE *f;
Str line;
if (hist == NULL)
return;
return 1;
if ((f = fopen(rcFile(HISTORY_FILE), "rt")) == NULL)
return;
return 1;
while (!feof(f)) {
line = Strfgets(f);
@@ -52,6 +52,7 @@ loadHistory(Hist *hist)
pushHist(hist, url_quote(line->ptr));
}
fclose(f);
return 0;
}
void