Skip to content

Commit

Permalink
TempleOSCDV4.04.ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry A. Davis authored and minexew committed Sep 8, 2018
1 parent 0f1a4a5 commit d185631
Show file tree
Hide file tree
Showing 67 changed files with 722 additions and 697 deletions.
Binary file modified 0000Boot/0000Kernel.BIN.C
Binary file not shown.
4 changes: 2 additions & 2 deletions Adam/ADefine.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ U0 LoadDocDefines()
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.CPP,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,687");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,688");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,708");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,702");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;
Expand Down
4 changes: 2 additions & 2 deletions Adam/AExts.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extern U0 DocBinDel(CDoc *doc,CDocBin *b);
extern U0 DocBinsValidate(CDoc *doc);
extern U0 DocBottom(CDoc *doc=NULL);
extern U0 DocCenter(CDoc *doc=NULL,I64 recalc=RECALCt_NORMAL);
extern U0 DocClear(CDoc *doc=NULL);
extern U0 DocClear(CDoc *doc=NULL,Bool clear_holds=FALSE);
extern Bool DocCursor(Bool show=OFF,CDoc *doc=NULL);
extern U0 DocD(U8 *buf,I64 cnt=0x80);
extern U0 DocDataFmt(CDoc *doc,CDocEntry *doc_e,I64 d=DOCM_CANCEL);
Expand All @@ -35,7 +35,7 @@ extern U0 DocInsEntry(CDoc *doc,CDocEntry *doc_e);
extern Bool DocLock(CDoc *doc);
extern U0 DocMax(I64 i=MAX_I32);
extern CDoc *DocNew(U8 *filename=NULL,CTask *task=NULL);
extern CDocEntry *DocPrint(CDoc *doc,U8 *src,...);
extern CDocEntry *DocPrint(CDoc *doc=NULL,U8 *src,...);
extern CDoc *DocPut(CTask *task=NULL);
extern CDoc *DocRead(U8 *name=NULL,I64 flags=0);
extern Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL);
Expand Down
11 changes: 10 additions & 1 deletion Adam/DolDoc/DocCodeTools.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ U0 EdRIExp(CRILex *rx)
rx->depth-=3;
if (rx->depth<0) rx->depth=0;
}
} else if (rx->cc1->token=='[') {
if (!rx->exp_depth++)
rx->depth+=3;
EdRILex(rx);
while (rx->cc1->token && rx->cc1->token!=']')
EdRIExp(rx);
if (!--rx->exp_depth) {
rx->depth-=3;
if (rx->depth<0) rx->depth=0;
}
}
EdRILex(rx);
}
Expand Down Expand Up @@ -171,7 +181,6 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
EdRILex(rx);
break;
case KW_SWITCH:
case KW_NOBOUND_SWITCH:
EdRILex(rx);
EdRIExp(rx);
if (rx->cc1->token=='{') {
Expand Down
4 changes: 2 additions & 2 deletions Adam/DolDoc/DocExt.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extern I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,
Bool exited,I64 *_has_action=NULL);
extern U0 DocFormBwd(CDoc *doc,Bool giveup=FALSE);
extern U0 DocLoad(CDoc *doc,U8 *src2,I64 size);
extern U0 DocPrintAtomic(CDoc *doc,U8 *fmt,...);
extern U0 DocPrintPartial(CDoc *doc,U8 *fmt,...);
extern U0 DocPrintAtomic(CDoc *doc=NULL,U8 *fmt,...);
extern U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...);
extern CDocEntry *DocPutS(CDoc *doc,U8 *st);
extern U8 *DocSave(CDoc *doc,I64 *_size=NULL);
extern I64 EdLeftClickLink(CDoc *doc,CDocEntry *doc_e);
Expand Down
2 changes: 1 addition & 1 deletion Adam/DolDoc/DocHighlight.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ U32 *DocHighlight(CDocEntry *doc_e,U8 *src,I64 len,I64 _temp_u32_attr)
I64 ch,ch1,last_ch,temp_u32_attr,mask_temp_u32_attr=_temp_u32_attr&0xFFFFF000,
comment_depth,brace_depth=s->brace_depth,paren_depth=s->paren_depth;
CHash *temph;
nobound_switch (s->state) {
switch [s->state] {
case DOCSS_NORMAL:
hl_normal:
while (len) {
Expand Down
14 changes: 7 additions & 7 deletions Adam/DolDoc/DocPlain.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
}
buf2=MStrPrint("%s,",buf);
Free(buf); buf=buf2;
nobound_switch (doc_e->type_u8) {
switch [doc_e->type_u8] {
case DOCT_HEX_ED:
buf2=MStrPrint("%s%d,",buf,doc_e->len);
Free(buf); buf=buf2;
Expand Down Expand Up @@ -114,14 +114,14 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
buf2=MStrPrint("%s%d,",buf,doc_e->attr);
Free(buf); buf=buf2;
}
case DOCT_NUM_TYPES-1: //nobound_switch
case DOCT_NUM_TYPES-1: //nobound switch
break;
}
de_flags=doc_e->de_flags & DOCEG_HAS_ARG;
while (de_flags) {
j=Bsf(de_flags);
Btr(&de_flags,j);
nobound_switch (j) {
switch [j] {
case DOCEf_TAG:
if (doc_e->type_u8==DOCT_DATA || doc_e->type_u8==DOCT_MACRO &&
(doc_e->de_flags&DOCEF_LEFT_MACRO &&
Expand Down Expand Up @@ -202,7 +202,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
case DOCEf_USER_DATA:
buf2=MStrPrint("%sU=0x%X,",buf,doc_e->user_data);
break;
case DOCEf_NUM_FLAGS-1: //nobound_switch
case DOCEf_NUM_FLAGS-1: //nobound switch
break;
}
Free(buf); buf=buf2;
Expand Down Expand Up @@ -243,7 +243,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
doc_e->len=DOCE_LEN_DFT;
j=PrsDocFlags(cc,&doc_e->de_flags,&doc_e->type);
cc->htc.hash_table_lst=old_hash_table_lst;
nobound_switch (i) {
switch [i] {
case DOCT_CHECK_BOX:
doc_e->raw_type=RT_I8;
break;
Expand Down Expand Up @@ -305,7 +305,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
j=Bsf(de_flags);
if (j<0 || Bts(&processed_flags,j))
goto pd_err;
nobound_switch (j) {//TODO: Might check for expression errors
switch [j] {//TODO: Might check for expression errors
case DOCEf_TAG:
if (!doc_e->tag) {
//If a $$MA,LM=""$$, Tag is filled when the LM is processed.
Expand Down Expand Up @@ -458,7 +458,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
else
goto pd_err;
break;
case DOCEf_NUM_FLAGS-1: //nobound_switch
case DOCEf_NUM_FLAGS-1: //nobound switch
break;
}
}
Expand Down
8 changes: 4 additions & 4 deletions Adam/DolDoc/DocPutS.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,21 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
return result;
}

public CDocEntry *DocPrint(CDoc *doc,U8 *fmt,...)
public CDocEntry *DocPrint(CDoc *doc=NULL,U8 *fmt,...)
{//You must not print partial doc cmds.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
CDocEntry *result=DocPutS(doc,buf);
Free(buf);
return result;
}

public U0 DocPrintPartial(CDoc *doc,U8 *fmt,...)
public U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...)
{//Lets you print half a doc cmd, if you like.
U8 *buf,*st,*src,*dst,*ptr,*ptr2;
Bool unlock;
CDocEntry *doc_ce,*doc_ne;
I64 ch,i,j;
if (!fmt)
if (!doc && !(doc=DocPut))
return;
buf=StrPrintJoin(NULL,fmt,argc,argv);
ptr=buf;
Expand Down Expand Up @@ -238,7 +238,7 @@ Bool KDDocPutS(U8 *st)
return FALSE;
}

public U0 DocPrintAtomic(CDoc *doc,U8 *fmt,...)
public U0 DocPrintAtomic(CDoc *doc=NULL,U8 *fmt,...)
{//Prints multiple whole cmds all-at-once. Might need this when printing trees.
U8 *buf;
Bool unlock;
Expand Down
14 changes: 9 additions & 5 deletions Adam/DolDoc/DocRecalc.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
CDocBin *tempb;
CDocSettings *s;
Bool del_cl,skipped_update,tree_collapsed,same_win,more=FALSE,
find_cursor=FALSE,blink_flag,full_refresh=TRUE,unlock;
find_cursor=FALSE,blink_flag,full_refresh=TRUE,unlock,clear_holds;
CTask *win_task,*mem_task;
CDC *dc;
U8 *bptr,*ptr,buf[STR_LEN],ch;
Expand Down Expand Up @@ -289,7 +289,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
mem_task=doc->mem_task;
blink_flag=Blink;
dc=NULL;
nobound_switch (recalc_flags&RECALCG_MASK) {
switch [recalc_flags&RECALCG_MASK] {
case RECALCt_FIND_CURSOR:
find_cursor=TRUE;
if (win_task)
Expand Down Expand Up @@ -620,7 +620,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
}
}
}
nobound_switch (doc_e->type_u8) {
switch [doc_e->type_u8] {
case DOCT_TEXT:
if (!col2 && !(doc_e->de_flags
&(DOCEF_TREE|DOCEF_LST|DOCEF_TAG_CB|DOCEF_DEFINE|
Expand Down Expand Up @@ -1036,13 +1036,17 @@ rc_adjust_xy:
break;
case DOCT_CLEAR:
next_clear_found=doc_e;
if (doc_e->de_flags&DOCEF_HOLD)
clear_holds=TRUE;
else
clear_holds=FALSE;
break;
case DOCT_HTML_CODE:
if (recalc_flags&RECALCF_TO_HTML &&
doc_e->de_flags&DOCEF_TAG && doc_e->tag)
x-=StrLen(doc_e->tag);
break;
case DOCT_NUM_TYPES-1: //nobound_switch
case DOCT_NUM_TYPES-1: //nobound switch
default:
break;
}
Expand Down Expand Up @@ -1309,7 +1313,7 @@ rc_skip:
if (full_refresh) {
i=num_entries-doc->max_entries;
if (next_clear_found) {
DocDelToEntry(doc,next_clear_found);
DocDelToEntry(doc,next_clear_found,clear_holds);
DocRecalc(doc,recalc_flags);
} else if (i>1024) {
DocDelToNum(doc,i);
Expand Down
13 changes: 8 additions & 5 deletions Adam/DolDoc/DocRecalcLib.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ U0 DocDelToNum(CDoc *doc,I64 num)
}
}

U0 DocDelToEntry(CDoc *doc,CDocEntry *clear_entry)
U0 DocDelToEntry(CDoc *doc,CDocEntry *clear_entry,Bool clear_holds)
{
CDocEntry *doc_e=doc->root.next,*doc_e2;
while (doc_e!=doc) {
doc_e2=doc_e->next;
if (!(doc_e->de_flags & (DOCEF_HOLD|DOCEF_FILTER_SKIP))) {
if (!(doc_e->de_flags & (DOCEF_HOLD|DOCEF_FILTER_SKIP))||clear_holds) {
if (doc_e==doc->cur_entry) {
doc->cur_entry=doc_e2;
doc->cur_col=doc_e2->min_col;
Expand Down Expand Up @@ -117,14 +117,17 @@ public U0 DocBottom(CDoc *doc=NULL)
DocUnlock(doc);
}

public U0 DocClear(CDoc *doc=NULL)
public U0 DocClear(CDoc *doc=NULL,Bool clear_holds=FALSE)
{//Clear all doc entries, except +H, hold entries.
Bool unlock;
if (!doc && !(doc=DocPut))
return;
unlock=DocLock(doc);
DocBottom(doc);
DocPrint(doc,"$$CL$$");
if (clear_holds)
DocPrint(doc,"$$CL+H$$");
else
DocPrint(doc,"$$CL$$");
DocRecalc(doc);
if (unlock)
DocUnlock(doc);
Expand Down Expand Up @@ -171,7 +174,7 @@ public U0 DocCollapse(Bool collapse=TRUE,CDoc *doc=NULL)

#help_index "DolDoc/Cmd Line (Typically);Cmd Line (Typically)"
public I64 DocMax(I64 i=MAX_I64)
{//Set max document entries. (Cmd line buffer.)
{//Set max document entries. (Cmd line buffer size.)
//Adjusts the size of the cmd line buf.
//Normally, the cmd line deletes entries
//when more are added and the old scroll up.
Expand Down
4 changes: 2 additions & 2 deletions Adam/God/GodDoodle.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public U8 *GodDoodleSprite(U8 *hex=NULL)
for (i=0;i<3;i++) {
god.doodle_dc->color=RED;
for (j=0;j<29;j++)
nobound_switch (GodDoodleBits(3)) {
switch [GodDoodleBits(3)] {
case 0:
GrEllipse3(god.doodle_dc,
(w-1)*GodDoodleBits(5)/15.5-w/2,
Expand Down Expand Up @@ -149,7 +149,7 @@ public U8 *GodDoodleSprite(U8 *hex=NULL)
for (j=0;j<6;j++) {
x=(w-1)*GodDoodleBits(5)/31+w/64;
y=(h-1)*GodDoodleBits(5)/31+h/64;
nobound_switch (GodDoodleBits(2)) {
switch [GodDoodleBits(2)] {
case 0: god.doodle_dc->color=BLACK; break;
case 1: god.doodle_dc->color=DKGRAY; break;
case 2: god.doodle_dc->color=LTGRAY; break;
Expand Down
5 changes: 3 additions & 2 deletions Adam/God/HSNotes.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Shakespeare? $FG,4$had a "vile heart"$FG$
Likes $FG,4$Beverly Hillbillies (Oil is a gift from God)$FG$
$FG,4$God likes being hero. Don't be proud of heart$FG$
$FG,4$and not accept a gift from God!$FG$
Likes $FG,4$Gomer Pile$FG$
Likes $FG,4$Gomer Pyle$FG$
Favorite saint? $FG,4$"ho_ho_ho"$FG$
Favorite animal? $FG,4$"Elephant two"$FG$
Favorite animal? $FG,4$"Bears"$FG$
Expand Down Expand Up @@ -139,7 +139,7 @@ Favorite actor? $FG,4$Hugh Grant$FG$
Favorite vocalist? $FG,4$Mick Jagger$FG$
Favorite guitarist? $FG,4$"$TX,"Simmons Destroyer",HTML="http://www.youtube.com/watch?v=nNADrrjTysk&t=3m55s"$"$FG$
Favorite National Anthem? $FG,4$$TX,"Latvia's National Anthem",HTML="http://www.youtube.com/watch?v=qKITbBjO4nE"$$FG$
America the Beautiful? $FG,4$Hates it. Poet was too in love with own beauty.$FG$
America the Beautiful? $FG,4$Hates it. Poet made self cry with own beauty.$FG$
Model for new $TX,"Sistine Chapel",HTML="http://en.wikipedia.org/wiki/Sistine_chapel"$? $FG,4$Ben Franklin$FG$
Voice if God wanted to sing? $FG,4$$TX,"Stabbing Westward's singer",HTML="https://www.youtube.com/watch?v=5NZsCYOM4j0"$$FG$
Stonehenge? $FG,4$Landmark for boundaries.$FG$
Expand Down Expand Up @@ -192,6 +192,7 @@ $TX,"Saturn's hexagon pole cloud?",HTML="http://en.wikipedia.org/wiki/Saturn's_h
Liquid moon's odd atmosphere? $FG,4$"Surf"$FG$
How many E.T. civs in Universe? $FG,4$20 or 80 (I forgot. I died laughing.)$FG$
Are they peaceful? $FG,4$Fight them! (Also, funny.)$FG$
Most difficult control system? $FG,4$$TX,"Dung beetle",HTML="http://www.youtube.com/watch?v=Q1zbgd6xpGQ"$$FG$
How can Judge Judy improve? $FG,4$No hard feelings$FG$
How can Chef Ramsay improve? $FG,4$Make so it doesn't seem like toil for cooks.$FG$
How can Hawking communicate? $FG,4$Blow from a nostril on a candle.$FG$
Expand Down
Loading

0 comments on commit d185631

Please sign in to comment.