summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HCRT.BINbin1092848 -> 1092992 bytes
-rw-r--r--T/CEXCEPT.HC30
-rw-r--r--T/CMISC.HC2
-rw-r--r--T/DOLDOC/DocTerm.HC2
-rw-r--r--T/GR/GrInitB.HC3
-rw-r--r--T/HCRT.BINbin1092720 -> 1092992 bytes
-rw-r--r--T/HCRT.DBG.Zbin252161 -> 255266 bytes
-rw-r--r--T/KERNELA.HH16
-rw-r--r--T/KTASK.HC2
-rw-r--r--T/STRPRINT.HC6
-rw-r--r--main.c4
11 files changed, 43 insertions, 22 deletions
diff --git a/HCRT.BIN b/HCRT.BIN
index 9d6ffe4..2aa7cec 100644
--- a/HCRT.BIN
+++ b/HCRT.BIN
Binary files differ
diff --git a/T/CEXCEPT.HC b/T/CEXCEPT.HC
index 99e293b..40b9a88 100644
--- a/T/CEXCEPT.HC
+++ b/T/CEXCEPT.HC
@@ -1,5 +1,6 @@
U0 LexPutToken(CCmpCtrl *cc)
{//Print cur token to StdOut. (Crude)
+ if (debug_enabled == OFF) return;
'"';
if (cc->token==TK_IDENT || cc->token==TK_STR)
"%s",cc->cur_str;
@@ -21,6 +22,7 @@ U0 LexPutToken(CCmpCtrl *cc)
U8 *LexPutLine(CCmpCtrl *cc,U8 *start)
{//Print cur pos to end of line to StdOut.
+ if (debug_enabled == OFF) return;
I64 ch;
U8 *ptr;
if (!start) return NULL;
@@ -49,6 +51,7 @@ U8 *LexPutLine(CCmpCtrl *cc,U8 *start)
U0 LexPutPos(CCmpCtrl *cc)
{//Print token, line link and, then, $LK,"LexPutLine",A="MN:LexPutLine"$().
+ if (debug_enabled == OFF) return;
LexPutToken(cc);
FixSet(cc->lex_include_stk->full_name,cc->lex_include_stk->line_num);
if (__IsCmdLine)
@@ -65,7 +68,8 @@ U0 LexPutPos(CCmpCtrl *cc)
U0 LexWarn(CCmpCtrl *cc,U8 *str=NULL)
{//Print warn msg, then, $LK,"LexPutPos",A="MN:LexPutPos"$().
- if (str) PrintWarn(str);
+ if (debug_enabled == OFF) return;
+ if(str) PrintWarn(str);
if (cc->htc.fun) {
"in fun '%s'.\n",cc->htc.fun->str;
if (IsRaw)
@@ -81,7 +85,7 @@ U0 LexWarn(CCmpCtrl *cc,U8 *str=NULL)
U0 LexExcept(CCmpCtrl *cc,U8 *str=NULL)
{//Print err msg, $LK,"LexPutPos",A="MN:LexPutPos"$() and throw exception.
- if (str) PrintErr(str);
+ if (debug_enabled && str) PrintErr(str);
//if (!0) TODO RESTORE
// AdamErr("Task:%08X %s\n",Fs,str);
LexPutPos(cc);
@@ -94,7 +98,8 @@ U0 LexExcept(CCmpCtrl *cc,U8 *str=NULL)
U0 UndefinedExtern()
{
- PrintErr("Undefined Extern\nat %P\n",Caller);
+ if (debug_enabled)
+ PrintErr("Undefined Extern\nat %P\n",Caller);
throw('UndefExt');
}
@@ -106,6 +111,7 @@ U0 UnusedExternWarning(CCmpCtrl *cc,CHashClass *tmpc)
U0 ParenWarning(CCmpCtrl *cc)
{
+ if (debug_enabled == OFF) return;
if (Bt(&cc->opts,OPTf_WARN_PAREN) &&
!(cc->lex_include_stk->flags&LFSF_DEFINE))
LexWarn(cc,"Unnecessary parenthesis ");
@@ -116,16 +122,20 @@ U0 ICClassPut(CHashClass *c)
I64 i;
if (!c) return;
if (c->ptr_stars_cnt>4) {
- PrintErr("put_class ptrcnt=%d\n",c->ptr_stars_cnt);
+ if (debug_enabled == ON) {
+ PrintErr("put_class ptrcnt=%d\n",c->ptr_stars_cnt);
+ }
throw('Compiler');
}
for (i=0;i<c->ptr_stars_cnt;i++)
'*';
c-=c->ptr_stars_cnt;
- if (c->str)
- "%s",c->str;
- else {
- PrintErr("put_class str=NULL\n");
+ if (c->str) {
+ if (debug_enabled == ON)
+ "%s",c->str;
+ } else {
+ if (debug_enabled == ON)
+ PrintErr("put_class str=NULL\n");
throw('Compiler');
}
'' CH_SPACE;
@@ -133,6 +143,8 @@ U0 ICClassPut(CHashClass *c)
U0 ICArgPut(CICArg *a,I64 type_pointed_to)
{
+ if (debug_enabled == OFF)
+ return;
if (type_pointed_to)
"[%Z](%Z) %Z ",a->type.raw_type,"ST_RAW_TYPES",
type_pointed_to,"ST_RAW_TYPES",Bsr(a->type>>8)+1,"ST_TY_TYPES";
@@ -176,6 +188,8 @@ U0 ICArgPut(CICArg *a,I64 type_pointed_to)
U0 ICPut(CCmpCtrl *cc,CIntermediateCode *tmpi)
{
+ if (debug_enabled == OFF)
+ return;
I64 opcode=tmpi->ic_code,i;
if (opcode>=IC_END_EXP && opcode!=IC_NOP2) {
"%15ts %016X ",intermediate_code_table[opcode].name,tmpi->ic_data;
diff --git a/T/CMISC.HC b/T/CMISC.HC
index c802be0..84b9ab4 100644
--- a/T/CMISC.HC
+++ b/T/CMISC.HC
@@ -129,7 +129,7 @@ U8 *CmdLinePmt()
I64 i;
U8 *res,*st;
if (Fs->new_answer) {
- if (Fs->answer_type&~1!=RT_I0) {
+ if (Fs->answer_type&~1!=RT_I0 && debug_enabled == ON) {
if (Fs->answer_type==RT_F64)
"%8.6fs ansf=%15.7g\n",Fs->answer_time,Fs->answer;
else
diff --git a/T/DOLDOC/DocTerm.HC b/T/DOLDOC/DocTerm.HC
index 865a5c0..25b2975 100644
--- a/T/DOLDOC/DocTerm.HC
+++ b/T/DOLDOC/DocTerm.HC
@@ -158,7 +158,7 @@ public U0 DocTermNew()
pdoc->desc='Term';
Fs->put_doc=Fs->display_doc=pdoc;
Fs->border_doc=DocBorderNew(pdoc);
- Fs->cur_menu=MenuFile("::/Doc/EdPullDown.DD");
+ //Fs->cur_menu=MenuFile("::/Doc/EdPullDown.DD");
WinScrollsInit(Fs);
}
diff --git a/T/GR/GrInitB.HC b/T/GR/GrInitB.HC
index b6aee6c..32e3670 100644
--- a/T/GR/GrInitB.HC
+++ b/T/GR/GrInitB.HC
@@ -165,7 +165,8 @@ public U0 WinZBufUpdate()
//#help_index "Graphics"
U0 GrInit2()
{
- TOSPrint("REMOVE:%d,%d\n",GR_WIDTH,GR_HEIGHT);
+ if (debug_enabled)
+ TOSPrint("REMOVE:%d,%d\n",GR_WIDTH,GR_HEIGHT);
U8 *old_h=gr.sprite_hash;
//We dont need to regerate these
//Free(gr.to_8_bits),Free(gr.to_8_colors);
diff --git a/T/HCRT.BIN b/T/HCRT.BIN
index 7977e2a..2aa7cec 100644
--- a/T/HCRT.BIN
+++ b/T/HCRT.BIN
Binary files differ
diff --git a/T/HCRT.DBG.Z b/T/HCRT.DBG.Z
index 5162564..fcebb76 100644
--- a/T/HCRT.DBG.Z
+++ b/T/HCRT.DBG.Z
Binary files differ
diff --git a/T/KERNELA.HH b/T/KERNELA.HH
index f11b973..c523526 100644
--- a/T/KERNELA.HH
+++ b/T/KERNELA.HH
@@ -217,7 +217,7 @@ public import U8i *CAlloc(I64i size,CTask *t=0);
public import U0i TOSPrint(U8i *,...);
public import U8 *__GetStr(U8 *pmt="");
import U0i SndFreq(I64i freq);
-import U0 __BootstrapForeachSymbol(U0 *fptr);
+import U0 __BootstrapForeachSymbol(U8 *fptr);
extern C3DaysDrawWin;
import C3DaysDrawWin *DrawWindowNew();
import U0i DrawWindowUpdate(C3DaysDrawWin *win,U8i *,I64i,I64i);
@@ -225,9 +225,9 @@ import C3DaysDrawWin *DrawWindowDel(C3DaysDrawWin *);
import I64i __ScanKey(I64i *ch,I64i *sc);
import I64i __WaitKey(I64i *ch,I64i *sc);
import I64i __GetTicks();
-import U0i *__Spawn(U0 *task,U0i *fp,U0i *,U8i *name);
-import U0i __WaitForSpawn(U0i *sp);
-import U0i SetKBCallback(U0i *,U0i *);
+import U8i *__Spawn(U8 *task,U8i *fp,U8i *,U8i *name);
+import U0i __WaitForSpawn(U8i *sp);
+import U0i SetKBCallback(U8i *,U8i *);
import U0i __Suspend(U8i *spawn);
import U0i __AwakeThread(U8i *spawn);
import U0i __FreeThread(U8i *spawn);
@@ -236,7 +236,7 @@ import U0i __AwaitThread(U8i *thr);
import U0i __KillThread(U8i *thr);
import U0i SetMSCallback(U8i *fp);
public import U0i __Sleep(I64i mS);
-import U0 __SetThreadPtr(U0 *_3dt,U8 *ptr);
+import U0 __SetThreadPtr(U8 *_3dt,U8 *ptr);
import I64i __InBounds(U8i *,I64i sz);
import U8i *__CmdLineBootText();
import U0i UnblockSignals();
@@ -308,9 +308,9 @@ extern C3DaysDrawWin *DrawWindowDel(C3DaysDrawWin *);
extern I64i __ScanKey(I64i *ch,I64i *sc);
extern I64i __WaitKey(I64i *ch,I64i *sc);
extern I64i __GetTicks();
-extern U0i *__Spawn(U0 *t,U0i *fp,U0i *,U8i *name);
-extern U0i __WaitForSpawn(U0i *sp);
-extern U0i SetKBCallback(U0i *,U0i *);;
+extern U8i *__Spawn(U0 *t,U0i *fp,U0i *,U8i *name);
+extern U0i __WaitForSpawn(U8i *sp);
+extern U8i SetKBCallback(U0i *,U0i *);;
extern U0i __Suspend(U8i *spawn);
extern U0i __AwakeThread(U8i *spawn);
extern U0i __FreeThread(U8i *spawn);
diff --git a/T/KTASK.HC b/T/KTASK.HC
index 6547f04..eac4428 100644
--- a/T/KTASK.HC
+++ b/T/KTASK.HC
@@ -341,7 +341,7 @@ U0 UserTaskCont()
U0 UserStartUp()
{//Run each time a user a spawned
DocTermNew;
- Type("::/Doc/Start.DD");
+ debug_enabled = ON;
LBts(&(Fs->display_flags),DISPLAYf_SHOW);
WinToTop;
WinZBufUpdate;
diff --git a/T/STRPRINT.HC b/T/STRPRINT.HC
index f34a406..f8bf393 100644
--- a/T/STRPRINT.HC
+++ b/T/STRPRINT.HC
@@ -1,3 +1,5 @@
+U8 debug_enabled = OFF;
+
U0 SPutChar(U8 **_dst,U8 ch,U8 **_buf)
{
I64 i;
@@ -913,6 +915,8 @@ U8 *MStrPrint(U8 *fmt,...)
U0 PrintErr(U8 *fmt,...)
{//Print "Err:" and msg in blinking red.
+ if (debug_enabled == OFF)
+ return;
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
GetOutOfDollar;
if(IsRaw)
@@ -924,6 +928,8 @@ U0 PrintErr(U8 *fmt,...)
U0 PrintWarn(U8 *fmt,...)
{//Print "Warn:" and msg in blinking red.
+ if (debug_enabled == OFF)
+ return;
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
GetOutOfDollar;
if(IsRaw)
diff --git a/main.c b/main.c
index 32e8a87..78ab4a8 100644
--- a/main.c
+++ b/main.c
@@ -200,7 +200,7 @@ int main(int argc,char **argv)
#ifndef TARGET_WIN32
if(!bounds_check_enable->count) {
if(0==access("HCRT.BIN",F_OK)) {
- puts("Using ./HCRT.BIN as the default binary.");
+ //puts("Using ./HCRT.BIN as the default binary.");
hcrt_bin_loc="HCRT.BIN";
LaunchCore0(Core0);
} else if(0==access( HCRT_INSTALLTED_DIR,F_OK)) {
@@ -209,7 +209,7 @@ int main(int argc,char **argv)
}
} else {
if(0==access("HCRT_BC.BIN",F_OK)) {
- puts("Using ./HCRT_BC.BIN as the default binary.");
+ //puts("Using ./HCRT_BC.BIN as the default binary.");
hcrt_bin_loc="HCRT_BC.BIN";
LaunchCore0(Core0);
} else if(0==access( HCRT_INSTALLTED_DIR,F_OK)) {