Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
TinkerOS 5.17
Browse files Browse the repository at this point in the history
  • Loading branch information
tinkeros committed Aug 8, 2024
1 parent f9cc86e commit 5b3f101
Show file tree
Hide file tree
Showing 18 changed files with 1,159 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Adam/Net/Http.HC
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define HTTP_ECONTENTLENGTH (-106)

#define HTTP_MAX_REDIRECTS 5
#define HTTP_USER_AGENT "Adam/Net/Http ($TX+CX,"TinkerOS V5.16",D="DD_OS_NAME_VERSION"$)"
#define HTTP_USER_AGENT "Adam/Net/Http ($TX+CX,"TinkerOS V5.17",D="DD_OS_NAME_VERSION"$)"

/**
* @param len_out (required) requires the content length, or -1 if unspecified
Expand Down
13 changes: 10 additions & 3 deletions Adam/Opt/Utils/SethUtil.HC
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public U0 SethREPL(I64 cpu_num=mp_cnt-1, U8 *first_cmd=NULL, Bool exit_after_fir
repl->title_src=TTS_LOCKED_CONST;
StrCpy(repl->task_title,"Seth REPL");
U8 *line,*cwd,*pmpt,cpu_desc[5];
cwd=MStrPrint("Cd(\"%s\");\n",DirCur);
TaskExe(repl,Fs,cwd,0);
TaskWait(repl);
Free(cwd);
cpu_desc[0]=0;
if (cpu_num) CatPrint(cpu_desc,"Seth");
else CatPrint(cpu_desc,"Adam");
Expand Down Expand Up @@ -119,7 +123,7 @@ U0 SethExec(U8 *include_file, I64 cpu_num=mp_cnt-1)

public CTask* SethFile(U8 *include_file, I64 cpu_num=mp_cnt-1)
{//Include file on a Seth core (like AdamFile)
U8 *first_cmd = MStrPrint("#include \"%s\"\n\nExit;\n", include_file);
U8 *cwd,*first_cmd = MStrPrint("#include \"%s\"\n\nExit;\n", include_file);

if (cpu_num>=mp_cnt)
{
Expand All @@ -138,9 +142,12 @@ public CTask* SethFile(U8 *include_file, I64 cpu_num=mp_cnt-1)

CTask *repl=Spawn(&SrvCmdLine,NULL,NULL,cpu_num);
repl->title_src=TTS_LOCKED_CONST;
// TODO StrNCpy
cwd=MStrPrint("Cd(\"%s\");\n",DirCur);
TaskExe(repl,Fs,cwd,0);
TaskWait(repl);
Free(cwd);
StrCpy(repl->task_title,include_file);
TaskExe(repl,Fs,first_cmd,0);
return repl;
}
#help_index ""
#help_index ""
24 changes: 22 additions & 2 deletions Adam/Opt/Utils/SysSurvey.HC
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ U0 SetDefaultResp(U8 *q, I64 resp)

public U0 RunSysSurvey()
{
CDrv *dv;
U8 *notes=NULL, *survey_file;
Bool is_laptop,extra_notes,installed,sysrep;
Bool is_laptop,extra_notes,installed,sysrep,clonezilla;
I64 have_kbd_ms,have_expresscard,have_dock,i,resp[NUM_STD_SURVEY_QUESTIONS], resp_ins[NUM_INS_SURVEY_QUESTIONS];

DocClear;
Expand All @@ -116,7 +117,13 @@ public U0 RunSysSurvey()
for (i=0; i<NUM_STD_SURVEY_QUESTIONS; i++)
{
resp[i]=AskQuestion(std_questions[i]);
if (i==1 && resp[i]==0) SetDefaultResp(std_questions[7],'n');
if ((i==1||i==6) && resp[i]==0)
{
SetDefaultResp(std_questions[7],'n');
SetDefaultResp(std_questions[8],'n');
}
if (i==2 && resp[i]==0)
SetDefaultResp(std_questions[8],'n');
"\n";
}

Expand Down Expand Up @@ -221,6 +228,19 @@ public U0 RunSysSurvey()
VidModes;
"\n";

if (DrvMounted('C')||DrvMounted('D')||DrvMounted('E')||DrvMounted('F'))
{
clonezilla=TRUE;
for (i=0;i<4;i++)
{
dv=Let2BlkDev('C'+i);
if (!dv || dv->size != 0x256534442) clonezilla=FALSE;
}
}
else clonezilla=FALSE;

if (clonezilla) "It appears clonezilla was used to partition the drive.\n";

if (installed && blkdev.boot_drv_let != 'T')
survey_file=MStrPrint("%C:/Home/Survey.DD",blkdev.boot_drv_let);
else
Expand Down
11 changes: 1 addition & 10 deletions Compiler/OptPass012.HC
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,6 @@ CIntermediateCode *OptPass012(CCmpCtrl *cc)
if (tmpi->ic_class->raw_type==RT_F64)
tmpi->ic_flags|=ICF_USE_F64;
break;
case IC_COM:
if (tmpi1->ic_code==IC_IMM_I64)
{
tmpi->ic_data=~tmpi1->ic_data;
tmpi->ic_code=IC_IMM_I64;
tmpi->ic_flags|=tmpi1->ic_flags;
OptSetNOP1(tmpi1);
}
tmpi_push->ic_class2=cmp.internal_types[RT_I64];
break;
start:
case IC_NOT:
if (tmpc->raw_type==RT_F64)
Expand Down Expand Up @@ -1456,6 +1446,7 @@ end:
case IC_NOBOUND_SWITCH:
case IC_SWITCH:
case IC_ASM:
case IC_COM:
break;
default:
"Pass:%d Missing IC hndlr\n"
Expand Down
Loading

0 comments on commit 5b3f101

Please sign in to comment.