Nightly update (ISO SHA-1 3fd5a36)

This commit is contained in:
TempleOS-bot committed 2017-01-27 11:27:26 -05:00
1 parent ed9e1be108
commit 233ee865fa
13 files changed
+102 -65

No files matched your search

Binary file not shown.
+2 -2
View File
@@ -18,8 +18,8 @@ U0 LoadDocDefines()
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$ //$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$
$TR-C,"LineRep"$ $TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,875"); $ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,909");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,991"); DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","82,011");
$ID,-4$ $ID,-4$
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR); DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END","%08X", DefinePrint("DD_MP_VECT_END","%08X",
+1
View File
@@ -3,6 +3,7 @@ extern Bool DocEd(CDoc *doc,I64 dof_flags=0);
extern I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e, extern I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,
Bool exited,I64 *_has_action=NULL); Bool exited,I64 *_has_action=NULL);
extern U0 DocFormBwd(CDoc *doc,Bool giveup=FALSE); extern U0 DocFormBwd(CDoc *doc,Bool giveup=FALSE);
extern Bool DocGoToLine(CDoc *doc,I64 line_num);
extern U0 DocLoad(CDoc *doc,U8 *src2,I64 size); extern U0 DocLoad(CDoc *doc,U8 *src2,I64 size);
extern U0 DocPrintAtomic(CDoc *doc=NULL,U8 *fmt,...); extern U0 DocPrintAtomic(CDoc *doc=NULL,U8 *fmt,...);
extern U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...); extern U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...);
+29
View File
@@ -331,3 +331,32 @@ public Bool Type(U8 *filename,I64 trailing_new_lines=1)
{//Output txt or graphic file to command line. {//Output txt or graphic file to command line.
return DocType(,filename,trailing_new_lines); return DocType(,filename,trailing_new_lines);
} }
#help_index "DolDoc/File"
public U8 *DocLineRead(U8 *filename,I64 line,CTask *mem_task=NULL)
{//Extract line from stored doc file. (Slow.)
U8 *res=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR);
if (DocGoToLine(doc,line) && doc->cur_entry->type_u8==DOCT_TEXT)
res=StrNew(doc->cur_entry->tag,mem_task);
DocDel(doc);
return res;
}
public U8 *DocLineWrite(U8 *filename,I64 line,U8 *st)
{//Write line to stored doc file. (Slow.)
U8 *res=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR);
if (DocGoToLine(doc,line)) {
if (doc->cur_entry->type_u8==DOCT_TEXT) {
Free(doc->cur_entry->tag);
doc->cur_entry->tag=StrNew(st);
} else
DocPrint(doc,"%s",st);
DocTop(doc);
DocWrite(doc);
}
DocDel(doc);
return res;
}
+1 -1
View File
@@ -23,4 +23,4 @@ extern U0 GodBiblePassage(I64 num_lines=20);
extern U0 GodBitsIns(I64 num_bits,I64 n); extern U0 GodBitsIns(I64 num_bits,I64 n);
extern U0 GodDoodle(U8 *hex=NULL); extern U0 GodDoodle(U8 *hex=NULL);
extern U0 GodSong(); extern U0 GodSong();
extern U0 GodWord(I64 bits=17,Bool show_num=FALSE); extern U0 GodWord(I64 bits=17);
+3 -12
View File
@@ -143,19 +143,10 @@ public U8 *GodWordStr(I64 bits=17)
return NULL; return NULL;
} }
public U0 GodWord(I64 bits=17,Bool show_num=FALSE) public U0 GodWord(I64 bits=17)
{//Make God pick a word. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.DD"$ {//Make God pick a word. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.DD"$
I64 i; if (god.num_words)
if (god.num_words) { "%s ",god.words[GodBits(bits)%god.num_words];
i=GodBits(bits);
if (show_num)
"%05X Mod %05X = %05X (Line:%0*d):",
i,god.num_words,i%god.num_words,
ToI64(Log10(god.num_words)+1),i%god.num_words+1;
"%s ",god.words[i%god.num_words];
if (show_num)
'\n';
}
} }
public U0 GodBiblePassage(I64 num_lines=20) public U0 GodBiblePassage(I64 num_lines=20)
Binary file not shown.
+1
View File
@@ -11,6 +11,7 @@ public _extern _LAST_FUN I64 LastFun(I64 argc,I64 *argv);
public extern I64 RunFile(U8 *name,I64 ccf_flags=0,...); public extern I64 RunFile(U8 *name,I64 ccf_flags=0,...);
public extern I64 RunFile2(U8 *name,I64 ccf_flags=0,...); public extern I64 RunFile2(U8 *name,I64 ccf_flags=0,...);
public extern CCmpGlbls cmp; public extern CCmpGlbls cmp;
#help_index "Compiler/Directive" #help_index "Compiler/Directive"
#help_file "::/Doc/Directives" #help_file "::/Doc/Directives"
public extern Bool Echo(Bool val); public extern Bool Echo(Bool val);
+1 -1
View File
@@ -62,7 +62,7 @@ $ID,-2$$TR,"Titanium"$
$ID,2$I64 best_score=16469; $ID,2$I64 best_score=16469;
$ID,-2$$TR,"TOSRegen"$ $ID,-2$$TR,"TOSRegen"$
$ID,2$progress1_tf=0.000;progress2_tf=0.000; $ID,2$progress1_tf=0.000;progress2_tf=0.000;
progress3_tf=0.000;progress4_tf=191.799; progress3_tf=0.000;progress4_tf=201.792;
$ID,-2$$ID,-2$$TR,"Once"$ $ID,-2$$ID,-2$$TR,"Once"$
$ID,2$$TR,"Adam"$ $ID,2$$TR,"Adam"$
$ID,2$$ID,-2$$TR,"User"$ $ID,2$$ID,-2$$TR,"User"$
+1 -1
View File
@@ -258,7 +258,7 @@ extern I64 GodHeaderIns(U8 *type=NULL);
extern U0 GodVideoDigits(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename); extern U0 GodVideoDigits(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename);
extern U0 GodVideoU32(U32 rand_u32,U8 *filename); extern U0 GodVideoU32(U32 rand_u32,U8 *filename);
extern U0 GodWebIdx(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename) extern U0 GodWebIdx(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename)
extern U0 GodWordBatch(CHexWordForm *gm); extern U0 GodWordBatch(CHexWordForm *gm,I64 radix,I64 digits);
extern U0 TOSBookLines(U8 *book_filename,I64 book_lines,U8 *st,I64 num_lines, extern U0 TOSBookLines(U8 *book_filename,I64 book_lines,U8 *st,I64 num_lines,
I64 radix,Bool modulo,Bool plus_one); I64 radix,Bool modulo,Bool plus_one);
extern U0 TOSGodDoodle(I64 god_src,CNISTBeaconHexWordForm *gm=NULL); extern U0 TOSGodDoodle(I64 god_src,CNISTBeaconHexWordForm *gm=NULL);
@@ -174,43 +174,16 @@ public U0 GodBooksPassageU32(U32 rand_u32,U8 *files_find_mask,
} }
} }
U8 *FileDblRead(U8 *filename,I64 line)
{//FileDbl's are DolDoc files with 2-line entries.
U8 *res=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR);
if (DocGoToLine(doc,line-1) && doc->cur_entry->type_u8==DOCT_TEXT)
res=StrNew(doc->cur_entry->tag);
DocDel(doc);
return res;
}
U8 *FileDblWrite(U8 *filename,I64 line,U8 *st)
{//FileDbl's are DolDoc files with 2-line entries.
U8 *res=NULL;
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR);
if (DocGoToLine(doc,line-1)) {
if (doc->cur_entry->type_u8==DOCT_TEXT) {
Free(doc->cur_entry->tag);
doc->cur_entry->tag=StrNew(st);
} else
DocPrint(doc,"%s",st);
DocTop(doc);
DocWrite(doc);
}
DocDel(doc);
return res;
}
U0 GodVideoDigits(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename) U0 GodVideoDigits(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename)
{ {
U8 *st,*st2; U8 *st,*st2;
CGodVideoForm *gvf=CAlloc(sizeof(CGodVideoForm)); CGodVideoForm *gvf=CAlloc(sizeof(CGodVideoForm));
I64 i=ExtDecFromHex(rnd,digits); I64 i=ExtDecFromHex(rnd,digits);
if (!i) i=Round(10`digits); if (!i) i=Round(10`digits);
if (st=FileDblRead(filename,i*2)) { if (st=DocLineRead(filename,i*2+1)) {
StrCpy(gvf->title,st); StrCpy(gvf->title,st);
Free(st); Free(st);
if (!(st=FileDblRead(filename,i*2+1))||!*st) { if (!(st=DocLineRead(filename,i*2+2))||!*st) {
Free(st); Free(st);
if (DocForm(gvf) && *gvf->serial) { if (DocForm(gvf) && *gvf->serial) {
if (gvf->min || gvf->sec) if (gvf->min || gvf->sec)
@@ -218,7 +191,7 @@ U0 GodVideoDigits(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename)
gvf->serial,gvf->min*60+gvf->sec); gvf->serial,gvf->min*60+gvf->sec);
else else
st=StrNew(gvf->serial); st=StrNew(gvf->serial);
FileDblWrite(filename,i*2+1,st); DocLineWrite(filename,i*2+2,st);
} else } else
st=NULL; st=NULL;
} }
@@ -261,8 +234,8 @@ U0 GodVideoU32(U32 rand_u32,U8 *filename)
Silent(old_silent); Silent(old_silent);
if (num) { if (num) {
i=rand_u32%num; i=rand_u32%num;
if (st=FileDblRead(filename,i*2)) { if (st=DocLineRead(filename,i*2+1)) {
st2=FileDblRead(filename,i*2+1); st2=DocLineRead(filename,i*2+2);
PutFileLink(filename); PutFileLink(filename);
"\nGod's response:\n" "\nGod's response:\n"
"%08X-->#%d out of %d\n%s\n",rand_u32,i,num,st; "%08X-->#%d out of %d\n%s\n",rand_u32,i,num,st;
@@ -288,8 +261,8 @@ U0 GodWebIdx(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename)
I64 i=ExtDecFromHex(rnd,digits); I64 i=ExtDecFromHex(rnd,digits);
if (!i) i=Round(10`digits); if (!i) i=Round(10`digits);
"'%s'-->(Taking first %d decimal digits) #%02d\n",rnd,digits,i; "'%s'-->(Taking first %d decimal digits) #%02d\n",rnd,digits,i;
st1=FileDblRead(filename,i*2); st1=DocLineRead(filename,i*2+1);
st2=FileDblRead(filename,i*2+1); st2=DocLineRead(filename,i*2+2);
"God's response:\n"; "God's response:\n";
"$$TX,\"%s\",HTML=\"%s\"$$\n",title,webpage; "$$TX,\"%s\",HTML=\"%s\"$$\n",title,webpage;
PutFileLink(filename); PutFileLink(filename);
@@ -301,9 +274,9 @@ U0 GodWebIdx(U8 *title,U8 *webpage,U8 *rnd,I64 digits,U8 *filename)
Free(st2); Free(st2);
} }
U0 GodWordBatch(CHexWordForm *gm) U0 GodWordBatch(CHexWordForm *gm,I64 radix,I64 digits)
{//Insert batch of words from rand hex. {//Insert batch of words from rand hex.
I64 i=0; I64 i=0,j,k,min;
CDirEntry *tmpde,*tmpde1; CDirEntry *tmpde,*tmpde1;
FifoU8Flush(god.fifo); FifoU8Flush(god.fifo);
@@ -319,6 +292,8 @@ U0 GodWordBatch(CHexWordForm *gm)
GodHexIns(gm->rnd9); GodHexIns(gm->rnd9);
GodHexIns(gm->rndA); GodHexIns(gm->rndA);
GodHexIns(gm->rndB); GodHexIns(gm->rndB);
if (radix==16) {
tmpde=tmpde1=FilesFind(god.word_file_mask,god.word_fuf_flags); tmpde=tmpde1=FilesFind(god.word_file_mask,god.word_fuf_flags);
while (tmpde) { while (tmpde) {
PutFileLink(tmpde->full_name); PutFileLink(tmpde->full_name);
@@ -326,6 +301,10 @@ U0 GodWordBatch(CHexWordForm *gm)
tmpde=tmpde->next; tmpde=tmpde->next;
} }
DirTreeDel(tmpde1); DirTreeDel(tmpde1);
} else {
PutFileLink("::/Home/Sup1/Sup1Blog/NumWords1000.TXT");
'\n';
}
"\n$$RED$$"; "\n$$RED$$";
if (*gm->rnd0) if (*gm->rnd0)
@@ -353,9 +332,33 @@ U0 GodWordBatch(CHexWordForm *gm)
if (*gm->rndB) if (*gm->rndB)
"%s\n",gm->rndB; "%s\n",gm->rndB;
'\n'; '\n';
while (FifoU8Cnt(god.fifo)>20) { if (radix==16)
"%02d: ",i++; min=digits*4;
GodWord(20,TRUE); else
min=4;
while (FifoU8Cnt(god.fifo)>=min) {
if (radix==16) {
j=GodBits(digits*4);
if (god.num_words) {
"%02d: %0*X Mod %0*X = %0*X (Line:%0*d):",i++,
digits,j,digits,god.num_words,digits,j%god.num_words,
ToI64(Log10(god.num_words)+1),j%god.num_words+1;
"%s\n",god.words[j%god.num_words];
}
} else {
i=digits;
j=0;
do {
k=GodBits(4);
if (k<=9) {
j=j*10+k;
if (!--i) {
"%s\n",DocLineRead("::/Home/Sup1/Sup1Blog/NumWords1000.TXT",j+1);
break;
}
}
} while (FifoU8Cnt(god.fifo)>4);
}
} }
FifoU8Flush(god.fifo); FifoU8Flush(god.fifo);
"$$FG$$\n"; "$$FG$$\n";
@@ -510,8 +513,8 @@ public U0 GodIns()
end: end:
GodHeaderIns; GodHeaderIns;
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag; "$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
switch (PopUpPickLst("ExtDec5Bible\0LinuxWords\0" switch (PopUpPickLst("ExtDec5Bible\0LinuxWords\0HappyWords\0"
"HappyWords\0Hex5Bible\0Hex8Books\0Doodle\0Movie100\0" "Words1000\0Hex5Bible\0Hex8Books\0Doodle\0Movie100\0"
"Painting100\0Painting1000\0Metallica\0")) { "Painting100\0Painting1000\0Metallica\0")) {
case: case:
if (DocForm(gm(CRandExtDec5Form *))) if (DocForm(gm(CRandExtDec5Form *)))
@@ -521,15 +524,19 @@ public U0 GodIns()
case: case:
if (DocForm(gm(CHexWordForm *))) { if (DocForm(gm(CHexWordForm *))) {
Adam("GodInit(\"~/Sup1/Sup1Words/LinuxDict.TXT*\");"); Adam("GodInit(\"~/Sup1/Sup1Words/LinuxDict.TXT*\");");
GodWordBatch(gm); GodWordBatch(gm,16,5);
} }
break; break;
case: case:
if (DocForm(gm(CHexWordForm *))) { if (DocForm(gm(CHexWordForm *))) {
Adam("GodInit(\"~/Sup1/Sup1Words/HappyWords.TXT*\");"); Adam("GodInit(\"~/Sup1/Sup1Words/HappyWords.TXT*\");");
GodWordBatch(gm); GodWordBatch(gm,16,5);
} }
break; break;
case:
if (DocForm(gm(CHexWordForm *)))
GodWordBatch(gm,10,3);
break;
case: case:
if (DocForm(gm(CRandHex5Form *))) { if (DocForm(gm(CRandHex5Form *))) {
"$$TX,\"How this random Bible passage was chosen.\"," "$$TX,\"How this random Bible passage was chosen.\","
@@ -606,7 +613,7 @@ public U0 GodIns()
break; break;
case: case:
if (DocForm(gm(CHexWordForm *))) if (DocForm(gm(CHexWordForm *)))
GodWordBatch(gm); GodWordBatch(gm,16,5);
break; break;
case: case:
if (DocForm(gm(CRandHex5Form *))) { if (DocForm(gm(CRandHex5Form *))) {
+10 -3
View File
@@ -47,13 +47,14 @@ U0 NISTBeaconURL(I64 timestamp)
U0 NISTGodIns1() U0 NISTGodIns1()
{ {
tos_type=PopUpPickLst("ExtDec5Bible\0LinuxWords\0HappyWords\0" tos_type=PopUpPickLst("ExtDec5Bible\0LinuxWords\0HappyWords\0Words1000\0"
"Hex5Bible\0Hex8Books\0Doodle\0Movie100\0Painting100\0Painting1000\0" "Hex5Bible\0Hex8Books\0Doodle\0Movie100\0Painting100\0Painting1000\0"
"Metallica\0"); "Metallica\0");
switch (tos_type) { switch (tos_type) {
case: tos_timestamp=GodHeaderIns("Bible"); break; case: tos_timestamp=GodHeaderIns("Bible"); break;
case: tos_timestamp=GodHeaderIns("LinuxWords"); break; case: tos_timestamp=GodHeaderIns("LinuxWords"); break;
case: tos_timestamp=GodHeaderIns("HappyWords"); break; case: tos_timestamp=GodHeaderIns("HappyWords"); break;
case: tos_timestamp=GodHeaderIns("Words1000"); break;
case: tos_timestamp=GodHeaderIns("Bible"); break; case: tos_timestamp=GodHeaderIns("Bible"); break;
case: tos_timestamp=GodHeaderIns("BookPick"); break; case: tos_timestamp=GodHeaderIns("BookPick"); break;
case: tos_timestamp=GodHeaderIns("Doodle"); break; case: tos_timestamp=GodHeaderIns("Doodle"); break;
@@ -83,14 +84,20 @@ U0 NISTGodIns2()
if (DocForm(gm(CHexWordForm *))) { if (DocForm(gm(CHexWordForm *))) {
NISTBeaconURL(gm->timestamp); NISTBeaconURL(gm->timestamp);
Adam("GodInit(\"~/Sup1/Sup1Words/LinuxDict.TXT*\");"); Adam("GodInit(\"~/Sup1/Sup1Words/LinuxDict.TXT*\");");
GodWordBatch(gm); GodWordBatch(gm,16,5);
} }
break; break;
case: case:
if (DocForm(gm(CHexWordForm *))) { if (DocForm(gm(CHexWordForm *))) {
NISTBeaconURL(gm->timestamp); NISTBeaconURL(gm->timestamp);
Adam("GodInit(\"~/Sup1/Sup1Words/HappyWords.TXT*\");"); Adam("GodInit(\"~/Sup1/Sup1Words/HappyWords.TXT*\");");
GodWordBatch(gm); GodWordBatch(gm,16,5);
}
break;
case:
if (DocForm(gm(CHexWordForm *))) {
NISTBeaconURL(gm->timestamp);
GodWordBatch(gm,10,3);
} }
break; break;
case: case:
+2 -1
View File
@@ -2,7 +2,8 @@ $WW,1$$FG,5$$TX+CX,"Change Log"$$FG$
Use $LK,"R",A="MN:R"$() to rename if I change a label. Use $LK,"R",A="MN:R"$() to rename if I change a label.
$IV,1$----01/27/17 05:11:06----$IV,0$ $IV,1$----01/27/17 08:13:37----$IV,0$
* Added $LK,"DocLineRead",A="MN:DocLineRead"$() and $LK,"DocLineWrite",A="MN:DocLineWrite"$().
$IV,1$----01/25/17 20:44:17----$IV,0$ $IV,1$----01/25/17 20:44:17----$IV,0$
* $LK,"R",A="MN:R"$("DocLineNumGoto","DocGoToLine"); * $LK,"R",A="MN:R"$("DocLineNumGoto","DocGoToLine");