mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Optimize and debug NetLog DocBottom implementation.
This commit is contained in:
parent
3311b483e8
commit
a551afdd90
1 changed files with 22 additions and 4 deletions
|
@ -22,14 +22,29 @@ U0 NetLogInit()
|
|||
|
||||
DocPrint(net_log_task->put_doc, "$$WW+H,1$$");
|
||||
|
||||
// net_log_task->put_doc->max_entries = I64_MAX;
|
||||
|
||||
Bts(&net_log_task->win_inhibit, WIf_SELF_FOCUS);
|
||||
}
|
||||
|
||||
U0 NetLogBottom()
|
||||
{//Move cursor, cur_entry, to bottom.
|
||||
Bool unlock;
|
||||
CDoc *doc = net_log_task->put_doc;
|
||||
|
||||
unlock = DocLock(doc);
|
||||
doc->cur_entry = doc;
|
||||
doc->cur_col = 0;
|
||||
if (unlock)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
U0 NetLog(U8 *format, ...)
|
||||
{ // Output text to NetLogTask as Log.
|
||||
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
|
||||
|
||||
DocBottom(net_log_task->put_doc);
|
||||
NetLogBottom;
|
||||
|
||||
DocPrint(net_log_task->put_doc, "%s\n", buf);
|
||||
|
||||
Free(buf);
|
||||
|
@ -39,7 +54,8 @@ U0 NetWarn(U8 *format, ...)
|
|||
{ // Output text to NetLogTask as Warning.
|
||||
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
|
||||
|
||||
DocBottom(net_log_task->put_doc);
|
||||
NetLogBottom;
|
||||
|
||||
DocPrint(net_log_task->put_doc, "$$BG,BROWN$$$$WHITE$$%s$$BG$$$$FG$$\n", buf);
|
||||
|
||||
Free(buf);
|
||||
|
@ -49,7 +65,8 @@ U0 NetErr(U8 *format, ...)
|
|||
{ // Output text to NetLogTask as Error.
|
||||
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
|
||||
|
||||
DocBottom(net_log_task->put_doc);
|
||||
NetLogBottom;
|
||||
|
||||
DocPrint(net_log_task->put_doc, "$$BG,RED$$$$WHITE$$%s$$BG$$$$FG$$\n", buf);
|
||||
|
||||
Free(buf);
|
||||
|
@ -59,7 +76,8 @@ U0 NetDebug(U8 *format, ...)
|
|||
{ // Output text to NetLogTask as Debug.
|
||||
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
|
||||
|
||||
DocBottom(net_log_task->put_doc);
|
||||
NetLogBottom;
|
||||
|
||||
DocPrint(net_log_task->put_doc, "$$BG,YELLOW$$$$DKGRAY$$%s$$BG$$$$FG$$\n", buf);
|
||||
|
||||
Free(buf);
|
||||
|
|
Loading…
Reference in a new issue