TempleOSCDV5.03.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:48:27 +02:00
1 parent 4b32f058d5
commit 6028804a5a
111 files changed
+3466 -2285

No files matched your search

+2 -1
View File
@@ -3,11 +3,12 @@ extern Bool DocEd(CDoc *doc,I64 dof_flags=0);
extern I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,
Bool exited,I64 *_has_action=NULL);
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 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);
extern U8 *PopUpPickLst(U8 *lst);
extern I64 PopUpPickLst(U8 *lst);
extern I64 TermRightClickLink(CDoc *doc,CDocEntry *doc_e);
+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.
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;
}
+19
View File
@@ -51,6 +51,12 @@ public U8 *DocScanLine(CDoc *doc,CDocEntry *doc_e,
i+=StrLen(src);
} else if (doc_e2->type_u8==DOCT_TAB)
i++;
else if (doc_e2->type_u8==DOCT_SHIFTED_X ||
doc_e2->type_u8==DOCT_SHIFTED_Y) {
if (doc_e2->attr<0)
i++;
i+=6; //$$SY,3$$
}
doc_e2=doc_e2->next;
}
res=MAlloc(i+1);
@@ -63,6 +69,19 @@ public U8 *DocScanLine(CDoc *doc,CDocEntry *doc_e,
*dst++=*src++;
} else if (doc_e->type_u8==DOCT_TAB)
*dst++='\t';
else if (doc_e->type_u8==DOCT_SHIFTED_Y) {
*dst(U32 *)++='$$SY,';
if (doc_e->attr<0)
*dst++='-';
*dst++='0'+AbsI64(doc_e->attr); //Supposedly -7 to 7 (single digit)
*dst++='$$';
} else if (doc_e->type_u8==DOCT_SHIFTED_X) {
*dst(U32 *)++='$$SX,';
if (doc_e->attr<0)
*dst++='-';
*dst++='0'+AbsI64(doc_e->attr); //Supposedly -7 to 7 (single digit)
*dst++='$$';
}
if (doc_e==doc->cur_entry && cur_col)
*cur_col=start-res+doc->cur_col;
doc_e=doc_e->next;
+4 -4
View File
@@ -87,9 +87,9 @@ Bool PopUpCd()
}
#help_index "DolDoc/Input;Char/Lists;StdIn/DolDoc"
public U8 *PopUpPickLst(U8 *lst)
public I64 PopUpPickLst(U8 *lst)
{//Prompt for lst entry in PopUp win task.
I64 i=0;
I64 res,i=0;
CDoc *doc=DocNew;
DocPrint(doc,"$$LTBLUE$$");
while (*lst) {
@@ -101,9 +101,9 @@ public U8 *PopUpPickLst(U8 *lst)
lst+=StrLen(lst)+1;
}
DocPrint(doc,"\n$$MU,\"CANCEL\",LE=DOCM_CANCEL$$\n");
i=PopUpMenu(doc);
res=PopUpMenu(doc);
DocDel(doc);
return i;
return res;
}
#help_index "DolDoc/Input;Char/Lists;Char/Define;StdIn/DolDoc"