static void line(const char *sf, bool highlight) { cline cl; if (conlines.size()>100) { cl.cref = conlines.back().cref; conlines.pop_back(); } else cl.cref = NEWSTRINGBUF(""); cl.outtime = int(game::lastmillis()); // for how long to keep line on screen conlines.insert(conlines.begin(),cl); if (highlight) { // show line in a different colour, for chat etc. cl.cref[0] = '\f'; cl.cref[1] = 0; strcat_cs(cl.cref, sf); } else strcpy_cs(cl.cref, sf); puts(cl.cref); #if defined(__WIN32__) fflush(stdout); #endif }
INLINE void strcpy_s(string &d, const char *s) { strcpy_cs(d,s); }