Merge branch 'master' into next

This commit is contained in:
ac-stef
2015-02-08 16:17:04 +01:00
150 changed files with 2348 additions and 716 deletions
+10
View File
@@ -94,6 +94,10 @@ COMMANDN(toggleconsole, toggleconsole, "");
void renderconsole() { con.render(); }
stream *clientlogfile = NULL;
vector<char> *bootclientlog = new vector<char>;
int clientloglinesremaining = INT_MAX;
void clientlogf(const char *s, ...)
{
defvformatstring(sp, s, s);
@@ -105,6 +109,12 @@ void clientlogf(const char *s, ...)
{ // break into single lines first
if((p = strchr(l, '\n'))) *p = '\0';
printf("%s%s\n", ts, l);
if(clientlogfile)
{
clientlogfile->printf("%s%s\n", ts, l);
if(--clientloglinesremaining <= 0) DELETEP(clientlogfile);
}
else if(bootclientlog) cvecprintf(*bootclientlog, "%s%s\n", ts, l);
l = p + 1;
}
while(p);