TempleOSCD_150720.ISO
This commit is contained in:
1 parent
401601816c
commit
f8c05f98f4
554 files changed
+26046
-24853
No files matched your search
+138
-78
@@ -1,5 +1,31 @@
|
||||
#help_index "DolDoc/Misc"
|
||||
|
||||
U0 EdReplaceTroubleOne(CDoc *doc,U8 *st_original,U8 *st_safe,I64 num,
|
||||
Bool to_safe,Bool select)
|
||||
{
|
||||
U8 buf[STR_LEN];
|
||||
StrPrint(buf,st_safe,num);
|
||||
if (to_safe)
|
||||
EdReplace(doc,st_original,buf,select);
|
||||
else
|
||||
EdReplace(doc,buf,st_original,select);
|
||||
}
|
||||
|
||||
U0 EdReplaceTroubleAll(CDoc *doc,Bool to_safe,Bool select)
|
||||
{
|
||||
I64 i=0;
|
||||
EdReplaceTroubleOne(doc,"#assert" ,"//<@%d@>" ,i++,to_safe,select);
|
||||
EdReplaceTroubleOne(doc,"#define" ,"//<@%d@>" ,i++,to_safe,select);
|
||||
EdReplaceTroubleOne(doc,"#include","//<@%d@>" ,i++,to_safe,select);
|
||||
//#if will match #if,#ifdef,#ifndef,#ifaot and #ifjit
|
||||
EdReplaceTroubleOne(doc,"#if" ,"//<@%d@>" ,i++,to_safe,select);
|
||||
EdReplaceTroubleOne(doc,"#endif" ,"//<@%d@>" ,i++,to_safe,select);
|
||||
//Convert #exe to union because we want that indent pattern.
|
||||
EdReplaceTroubleOne(doc,"#exe" ,"union @%d@",i++,to_safe,select);
|
||||
EdReplaceTroubleOne(doc,"'{'" ,"'<@%d@>'" ,i++,to_safe,select);
|
||||
EdReplaceTroubleOne(doc,"'}'" ,"'<@%d@>'" ,i++,to_safe,select);
|
||||
}
|
||||
|
||||
#define C_INDENT_SPACES 2
|
||||
#define ASM_RENUM_SPACING 5
|
||||
|
||||
@@ -14,10 +40,12 @@ I64 PopUpEdFmt()
|
||||
I64 i;
|
||||
CDoc *doc=DocNew;
|
||||
DocPrint(doc,"$$LTBLUE$$$$MU,\"Check Compile\",LE=EF_CHK_COMPILE$$\n"
|
||||
"$$MU,\"Reindent CPP.Z Fun\",LE=EF_REINDENT$$\n"
|
||||
"$$MU,\"Reindent CPP.Z Fun (Beware braces in strings.)\","
|
||||
"LE=EF_REINDENT$$\n"
|
||||
"$$MU,\"Renum Asm Local @@ Labels for Fun\",LE=EF_RENUM_ASM$$\n"
|
||||
"$$MU,\"Insert Template Code: Ctrl Slider\",LE=EF_CTRL_SLIDER$$\n"
|
||||
"$$MU,\"Insert ASCII/Scan Code Hex Codes for key pressed\",LE=EF_CH_SC$$\n\n"
|
||||
"$$MU,\"Insert ASCII/Scan Code Hex Codes for key pressed\","
|
||||
"LE=EF_CH_SC$$\n\n"
|
||||
"$$MU,\"CANCEL\",LE=DOCM_CANCEL$$\n\n"
|
||||
"$$GREEN$$<ALT-BACKSPACE>$$FG$$ to undo if not happy\n"
|
||||
"with the results.\n");
|
||||
@@ -28,7 +56,7 @@ I64 PopUpEdFmt()
|
||||
|
||||
class CRILex
|
||||
{
|
||||
CLex *lx1,*lx2;
|
||||
CCmpCtrl *cc1,*cc2;
|
||||
CQueVectU8 *indent;
|
||||
I64 depth,exp_depth,one_shot;
|
||||
Bool was_new_line,is_not_cont;
|
||||
@@ -38,34 +66,38 @@ I64 EdRILex(CRILex *rx)
|
||||
{
|
||||
rx->is_not_cont=FALSE;
|
||||
I64 i;
|
||||
CLexFile *tempf;
|
||||
do {
|
||||
Lex(rx->lx1);
|
||||
Lex(rx->lx2);
|
||||
i=PrsKeyWord(rx->lx2);
|
||||
if (rx->lx1->token=='\n' && rx->lx2->token==';' || rx->lx2->token=='{' ||
|
||||
rx->lx2->token=='}' || rx->lx2->token==':' || rx->lx2->token==')' &&
|
||||
!rx->exp_depth || i==KW_ELSE || i==KW_CATCH || i==KW_DO)
|
||||
rx->is_not_cont=TRUE;
|
||||
if (rx->was_new_line && (rx->lx1->token!=':' ||
|
||||
i==KW_DFT || i==KW_SUB_SWITCH_START || i==KW_SUB_SWITCH_END)) {
|
||||
QueVectU8Put(rx->indent,rx->lx2->lfns[0].cur_entry->y,rx->depth+rx->one_shot);
|
||||
Lex(rx->cc1);
|
||||
Lex(rx->cc2);
|
||||
i=PrsKeyWord(rx->cc2);
|
||||
if (rx->cc1->token=='\n' && rx->cc2->token==';' || rx->cc2->token=='{' ||
|
||||
rx->cc2->token=='}' || rx->cc2->token==':' || rx->cc2->token==')' &&
|
||||
!rx->exp_depth || i==KW_ELSE || i==KW_CATCH || i==KW_DO)
|
||||
rx->is_not_cont=TRUE;
|
||||
if (rx->was_new_line && (rx->cc1->token!=':' ||
|
||||
i==KW_DFT || i==KW_SUB_SWITCH_START || i==KW_SUB_SWITCH_END)) {
|
||||
tempf=rx->cc2->lex_include_stk;
|
||||
while (tempf->next)
|
||||
tempf=tempf->next;
|
||||
QueVectU8Put(rx->indent,tempf->cur_entry->y,rx->depth+rx->one_shot);
|
||||
rx->one_shot=0;
|
||||
}
|
||||
if (rx->lx2->token=='\n')
|
||||
if (rx->cc2->token=='\n')
|
||||
rx->was_new_line=TRUE;
|
||||
else
|
||||
rx->was_new_line=FALSE;
|
||||
} while (rx->lx1->token=='\n');
|
||||
return rx->lx1->token;
|
||||
} while (rx->cc1->token=='\n');
|
||||
return rx->cc1->token;
|
||||
}
|
||||
|
||||
U0 EdRIExp(CRILex *rx)
|
||||
{
|
||||
if (rx->lx1->token=='(') {
|
||||
if (rx->cc1->token=='(') {
|
||||
if (!rx->exp_depth++)
|
||||
rx->depth+=3;
|
||||
EdRILex(rx);
|
||||
while (rx->lx1->token && rx->lx1->token!=')')
|
||||
while (rx->cc1->token && rx->cc1->token!=')')
|
||||
EdRIExp(rx);
|
||||
if (!--rx->exp_depth) {
|
||||
rx->depth-=3;
|
||||
@@ -79,10 +111,10 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
|
||||
{
|
||||
I64 i;
|
||||
Bool cont;
|
||||
if (rx->lx1->token=='{') {
|
||||
if (rx->cc1->token=='{') {
|
||||
rx->depth++;
|
||||
EdRILex(rx);
|
||||
while (rx->lx1->token && rx->lx1->token!='}')
|
||||
while (rx->cc1->token && rx->cc1->token!='}')
|
||||
EdRIStmt(rx,FALSE);
|
||||
if (--rx->depth<0) rx->depth=0;
|
||||
EdRILex(rx);
|
||||
@@ -90,14 +122,14 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
|
||||
if (indent) rx->depth++;
|
||||
do {
|
||||
cont=FALSE;
|
||||
switch (PrsKeyWord(rx->lx1)) {
|
||||
switch (PrsKeyWord(rx->cc1)) {
|
||||
case KW_IF:
|
||||
EdRILex(rx);
|
||||
EdRIExp(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
if (PrsKeyWord(rx->lx1)==KW_ELSE) {
|
||||
if (PrsKeyWord(rx->cc1)==KW_ELSE) {
|
||||
EdRILex(rx);
|
||||
if (PrsKeyWord(rx->lx1)==KW_IF && rx->lx2->token!='\n')
|
||||
if (PrsKeyWord(rx->cc1)==KW_IF && rx->cc2->token!='\n')
|
||||
EdRIStmt(rx,FALSE);
|
||||
else
|
||||
EdRIStmt(rx,TRUE);
|
||||
@@ -106,11 +138,15 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
|
||||
case KW_TRY:
|
||||
EdRILex(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
if (PrsKeyWord(rx->lx1)==KW_CATCH) {
|
||||
if (PrsKeyWord(rx->cc1)==KW_CATCH) {
|
||||
EdRILex(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
}
|
||||
break;
|
||||
case KW_LOCK:
|
||||
EdRILex(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
break;
|
||||
case KW_FOR:
|
||||
case KW_WHILE:
|
||||
EdRILex(rx);
|
||||
@@ -118,49 +154,52 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
|
||||
EdRIStmt(rx,TRUE);
|
||||
break;
|
||||
case KW_ASM:
|
||||
EdRILex(rx);
|
||||
case KW_CLASS:
|
||||
case KW_UNION:
|
||||
if (EdRILex(rx)==TK_IDENT)
|
||||
EdRILex(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
break;
|
||||
case KW_DO:
|
||||
EdRILex(rx);
|
||||
EdRIStmt(rx,TRUE);
|
||||
if (PrsKeyWord(rx->lx1)==KW_WHILE) {
|
||||
if (PrsKeyWord(rx->cc1)==KW_WHILE) {
|
||||
EdRILex(rx);
|
||||
EdRIExp(rx);
|
||||
}
|
||||
if (rx->lx1->token==';')
|
||||
if (rx->cc1->token==';')
|
||||
EdRILex(rx);
|
||||
break;
|
||||
case KW_SWITCH:
|
||||
case KW_NOBOUND_SWITCH:
|
||||
EdRILex(rx);
|
||||
EdRIExp(rx);
|
||||
if (rx->lx1->token=='{') {
|
||||
if (rx->cc1->token=='{') {
|
||||
rx->depth++;
|
||||
EdRILex(rx);
|
||||
i=0;
|
||||
while (rx->lx1->token && rx->lx1->token!='}') {
|
||||
switch (PrsKeyWord(rx->lx1)) {
|
||||
while (rx->cc1->token && rx->cc1->token!='}') {
|
||||
switch (PrsKeyWord(rx->cc1)) {
|
||||
case KW_SUB_SWITCH_START:
|
||||
rx->depth+=i; i=0;
|
||||
while (EdRILex(rx) && rx->lx1->token!=':');
|
||||
while (EdRILex(rx) && rx->cc1->token!=':');
|
||||
EdRILex(rx);
|
||||
i++;
|
||||
break;
|
||||
case KW_SUB_SWITCH_END:
|
||||
rx->depth+=i; i=0;
|
||||
if (--rx->depth<0) rx->depth=0;
|
||||
while (EdRILex(rx) && rx->lx1->token!=':');
|
||||
while (EdRILex(rx) && rx->cc1->token!=':');
|
||||
EdRILex(rx);
|
||||
break;
|
||||
case KW_CASE:
|
||||
case KW_DFT:
|
||||
rx->depth+=i; i=0;
|
||||
while (EdRILex(rx) && rx->lx1->token!=':');
|
||||
while (EdRILex(rx) && rx->cc1->token!=':');
|
||||
EdRILex(rx);
|
||||
break;
|
||||
default:
|
||||
if (rx->lx1->token)
|
||||
if (rx->cc1->token)
|
||||
EdRIStmt(rx,TRUE);
|
||||
}
|
||||
}
|
||||
@@ -169,24 +208,25 @@ U0 EdRIStmt(CRILex *rx,Bool indent)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (rx->lx1->token==TK_IDENT && rx->lx1->hash_entry &&
|
||||
rx->lx1->hash_entry->type&(HTT_OPCODE|HTT_ASM_KEYWORD)) {
|
||||
rx->one_shot=4-rx->depth;
|
||||
if (rx->cc1->token==TK_IDENT && rx->cc1->hash_entry &&
|
||||
rx->cc1->hash_entry->type&(HTT_OPCODE|HTT_ASM_KEYWORD)) {
|
||||
// rx->one_shot=4-rx->depth;
|
||||
do EdRILex(rx);
|
||||
while (rx->lx2->token && rx->lx2->token!='\n');
|
||||
while (rx->cc2->token && rx->cc2->token!='\n');
|
||||
rx->is_not_cont=TRUE;
|
||||
} else {
|
||||
while (rx->lx1->token && rx->lx1->token!=';' && rx->lx1->token!=':') {
|
||||
if (rx->lx2->token=='\n' && !rx->is_not_cont)
|
||||
while (rx->cc1->token && rx->cc1->token!=';' &&
|
||||
rx->cc1->token!=':') {
|
||||
if (rx->cc2->token=='\n' && !rx->is_not_cont)
|
||||
rx->one_shot=3;
|
||||
EdRILex(rx);
|
||||
}
|
||||
if (rx->lx1->token==':')
|
||||
if (rx->cc1->token==':')
|
||||
cont=TRUE;
|
||||
EdRILex(rx);
|
||||
}
|
||||
}
|
||||
} while (cont && rx->lx1->token!='}');
|
||||
} while (cont && rx->cc1->token!='}');
|
||||
if (indent && --rx->depth<0)
|
||||
rx->depth=0;
|
||||
}
|
||||
@@ -197,21 +237,23 @@ CQueVectU8 *EdRICode(CDoc *doc)
|
||||
CQueVectU8 *result;
|
||||
CRILex *rx=CAlloc(sizeof(CRILex));
|
||||
|
||||
rx->lx1=LexNew(,LF_KEEP_NEW_LINES|LF_DONT_FREE_BUF,doc->filename.name);
|
||||
Free(rx->lx1->lfns[0].full_name);
|
||||
LexAttachDoc(rx->lx1,&rx->lx1->lfns[0],doc,,doc->cur_entry,doc->cur_data_col);
|
||||
rx->cc1=CmpCtrlNew(,CCF_KEEP_NEW_LINES|CCF_DONT_FREE_BUF,doc->filename.name);
|
||||
Free(rx->cc1->lex_include_stk->full_name);
|
||||
LexAttachDoc(rx->cc1,rx->cc1->lex_include_stk,doc,,
|
||||
doc->cur_entry,doc->cur_col);
|
||||
|
||||
rx->lx2=LexNew(,LF_KEEP_NEW_LINES|LF_DONT_FREE_BUF,doc->filename.name);
|
||||
Free(rx->lx2->lfns[0].full_name);
|
||||
LexAttachDoc(rx->lx2,&rx->lx2->lfns[0],doc,,doc->cur_entry,doc->cur_data_col);
|
||||
rx->cc2=CmpCtrlNew(,CCF_KEEP_NEW_LINES|CCF_DONT_FREE_BUF,doc->filename.name);
|
||||
Free(rx->cc2->lex_include_stk->full_name);
|
||||
LexAttachDoc(rx->cc2,rx->cc2->lex_include_stk,doc,,
|
||||
doc->cur_entry,doc->cur_col);
|
||||
|
||||
rx->indent=QueVectU8New(doc->cur_entry->y);
|
||||
|
||||
Lex(rx->lx1);
|
||||
Lex(rx->cc1);
|
||||
EdRIStmt(rx,FALSE);
|
||||
|
||||
LexDel(rx->lx1);
|
||||
LexDel(rx->lx2);
|
||||
CmpCtrlDel(rx->cc1);
|
||||
CmpCtrlDel(rx->cc2);
|
||||
result=rx->indent;
|
||||
Free(rx);
|
||||
return result;
|
||||
@@ -284,7 +326,8 @@ class CRenum
|
||||
I64 EdRAGetU8(CDoc *doc)
|
||||
{
|
||||
I64 result=-1;
|
||||
while (doc->cur_entry!=doc && doc->cur_entry->type&DOCET_SELECTED && result<0) {
|
||||
while (doc->cur_entry!=doc &&
|
||||
doc->cur_entry->type&DOCET_SELECTED && result<0) {
|
||||
result=EdCurU8(doc);
|
||||
EdCursorRight(doc);
|
||||
}
|
||||
@@ -307,7 +350,7 @@ U0 EdRACollect(CDoc *doc,CRenum *root)
|
||||
StrCpy(buf,"@@");
|
||||
i=2;
|
||||
while (ch>=0 && i<sizeof(CEdFindText.find_text)) {
|
||||
if (Bt(chars_bitmap_alpha_numeric,ch))
|
||||
if (Bt(chars_bmp_alpha_numeric,ch))
|
||||
buf[i++]=ch;
|
||||
else
|
||||
break;
|
||||
@@ -315,7 +358,7 @@ U0 EdRACollect(CDoc *doc,CRenum *root)
|
||||
}
|
||||
if (i<sizeof(CEdFindText.find_text)) {
|
||||
buf[i++]=0;
|
||||
while (ch>=0 && Bt(chars_bitmap_white_space,ch))
|
||||
while (ch>=0 && Bt(chars_bmp_white_space,ch))
|
||||
ch=EdRAGetU8(doc);
|
||||
if (ch==':') {
|
||||
ch=EdRAGetU8(doc);
|
||||
@@ -327,7 +370,7 @@ U0 EdRACollect(CDoc *doc,CRenum *root)
|
||||
}
|
||||
}
|
||||
}
|
||||
//This is needed because we moved the
|
||||
//This is needed because we moved the
|
||||
//cursor and it didn't recalc.
|
||||
DocRecalc(doc);
|
||||
}
|
||||
@@ -337,7 +380,7 @@ U0 EdRenumAsm(CDoc *doc)
|
||||
Bool unlock=DocLock(doc);
|
||||
I64 num=0;
|
||||
CRenum root,*tempr,*tempr1;
|
||||
U8 buf[sizeof(CEdFindText.find_text)],
|
||||
U8 buf[sizeof(CEdFindText.find_text)],
|
||||
buf2[sizeof(CEdFindText.find_text)];
|
||||
|
||||
QueInit(&root);
|
||||
@@ -367,7 +410,7 @@ U0 EdRenumAsm(CDoc *doc)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
|
||||
{
|
||||
Bool okay,unlock=DocLock(doc),start_of_line=TRUE;
|
||||
CDocEntry *doc_e,*doc_ne;
|
||||
@@ -395,28 +438,32 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
Free(st);
|
||||
WinHorz(Fs->win_left,Fs->win_right, task);
|
||||
WinVert(Fs->win_top, Fs->win_bottom,task);
|
||||
if (ScanResult(tempc,&r)) {
|
||||
if (JobResultScan(tempc,&r)) {
|
||||
st=DirFile(doc->filename.name,,"PRJ.Z");
|
||||
prj_file=FileNameAbs(st,FUF_Z_OR_NOT_Z);
|
||||
Free(st);
|
||||
if (FileFind(prj_file)) {
|
||||
st2=DirFile(prj_file),
|
||||
st=MStrPrint("Cd(\"%s\");",st2);
|
||||
st=MStrPrint("Cd(\"%s\");",st2);
|
||||
Free(st2);
|
||||
tempc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER|1<<SVCf_FREE_ON_COMPLETE);
|
||||
tempc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|
|
||||
1<<SVCf_FOCUS_MASTER|1<<SVCf_FREE_ON_COMPLETE);
|
||||
Free(st);
|
||||
st=MStrPrint("\"$$WW,1$$\";Cmp(\"%s\",\"SysTemp\",\"SysTemp\");",prj_file);
|
||||
st=MStrPrint("\"$$WW,1$$\";Cmp(\"%s\",\"SysTemp\",\"SysTemp\");",
|
||||
prj_file);
|
||||
tempc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
Free(st);
|
||||
if (ScanResult(tempc,&r))
|
||||
if (JobResultScan(tempc,&r))
|
||||
if (!r) {
|
||||
tempc=TaskExe(task,Fs,
|
||||
"Load(\"SysTemp\",LDF_JUST_LOAD);",1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
if (ScanResult(tempc,&r))
|
||||
"Load(\"SysTemp\",LDF_JUST_LOAD);",
|
||||
1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
if (JobResultScan(tempc,&r))
|
||||
okay=TRUE;
|
||||
}
|
||||
tempc=TaskExe(task,Fs,"Del(\"SysTemp.*\");",1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
ScanResult(tempc,&r);
|
||||
tempc=TaskExe(task,Fs,"Del(\"SysTemp.*\");",
|
||||
1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
JobResultScan(tempc,&r);
|
||||
} else {
|
||||
Free(prj_file);
|
||||
st=DirFile(doc->filename.name,"Load","CPP.Z");
|
||||
@@ -428,7 +475,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
st=MStrPrint("\"$$WW,1$$\";ExeFile(\"%s\",TRUE);",doc->filename.name);
|
||||
tempc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
|
||||
Free(st);
|
||||
if (ScanResult(tempc,&r) && r)
|
||||
if (JobResultScan(tempc,&r) && r)
|
||||
okay=TRUE;
|
||||
}
|
||||
Free(prj_file);
|
||||
@@ -445,13 +492,18 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
}
|
||||
break;
|
||||
case EF_REINDENT:
|
||||
start_y=doc->cur_entry->y;
|
||||
EdReplaceTroubleAll(doc,TRUE,FALSE);
|
||||
DocLineNumGoTo(doc,start_y+1);
|
||||
if (EdGoToFun(doc,FALSE,FALSE)) {
|
||||
start_y=doc->cur_entry->y;
|
||||
indent=EdRICode(doc);
|
||||
DocUnlock(doc);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
Sleep(100);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
if (beep) {
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
Sleep(100);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
}
|
||||
DocLock(doc);
|
||||
EdRemFunLeadingSpace(doc);
|
||||
DocLineNumGoTo(doc,start_y+1);
|
||||
@@ -460,7 +512,8 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
while (start_y<=doc_e->y<end_y) {
|
||||
if (doc_e!=doc && doc_e!=doc->cur_entry &&
|
||||
!(doc_e->de_flags&(DOCEG1_DONT_EDIT-DOCEF_SCROLLING_X))) {
|
||||
if (doc_e->type_u8==DOCT_NEW_LINE||doc_e->type_u8==DOCT_SOFT_NEW_LINE)
|
||||
if (doc_e->type_u8==DOCT_NEW_LINE||
|
||||
doc_e->type_u8==DOCT_SOFT_NEW_LINE)
|
||||
start_of_line=TRUE;
|
||||
else {
|
||||
if (start_of_line) {
|
||||
@@ -473,7 +526,8 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
doc_ne->x=x;
|
||||
doc_ne->y=doc_e->y;
|
||||
doc_ne->page_line_num=doc_e->page_line_num;
|
||||
MemCpy(&doc_ne->settings,&doc_e->settings,sizeof(CDocSettings));
|
||||
MemCpy(&doc_ne->settings,
|
||||
&doc_e->settings,sizeof(CDocSettings));
|
||||
QueIns(doc_ne,doc_e->last);
|
||||
i-=8;
|
||||
x+=8;
|
||||
@@ -490,7 +544,8 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
doc_ne->x=x;
|
||||
doc_ne->y=doc_e->y;
|
||||
doc_ne->page_line_num=doc_e->page_line_num;
|
||||
MemCpy(&doc_ne->settings,&doc_e->settings,sizeof(CDocSettings));
|
||||
MemCpy(&doc_ne->settings,
|
||||
&doc_e->settings,sizeof(CDocSettings));
|
||||
QueIns(doc_ne,doc_e->last);
|
||||
}
|
||||
}
|
||||
@@ -501,6 +556,9 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
}
|
||||
QueVectU8Del(indent);
|
||||
}
|
||||
start_y=doc->cur_entry->y;
|
||||
EdReplaceTroubleAll(doc,FALSE,FALSE);
|
||||
DocLineNumGoTo(doc,start_y+1);
|
||||
break;
|
||||
case EF_RENUM_ASM:
|
||||
if (EdGoToFun(doc,FALSE,TRUE)) {
|
||||
@@ -514,9 +572,11 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action)
|
||||
DocRecalc(doc);
|
||||
}
|
||||
DocUnlock(doc);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
Sleep(100);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
if (beep) {
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
Sleep(100);
|
||||
Snd(2000); Sleep(150); Snd(0);
|
||||
}
|
||||
DocLock(doc);
|
||||
EdRenumAsm(doc);
|
||||
}
|
||||
@@ -546,7 +606,7 @@ U0 EdPopUpChSC(I64 *_ch,I64 *_sc)
|
||||
U0 EdChSC(CDoc *doc)
|
||||
{
|
||||
I64 ch,sc;
|
||||
U8 buf[136];
|
||||
U8 buf[STR_LEN];
|
||||
StrPrint(buf,"EdPopUpChSC(%d,%d);",&ch,&sc);
|
||||
PopUp(buf,Fs);
|
||||
if (ch==CH_BACKSPACE)
|
||||
@@ -569,7 +629,7 @@ U0 EdChSC(CDoc *doc)
|
||||
DocPrint(doc,"CH_SPACE,0x%X",sc);
|
||||
else if (ch==CH_SHIFT_SPACE)
|
||||
DocPrint(doc,"CH_SHIFT_SPACE,0x%X",sc);
|
||||
else if (Bt(chars_bitmap_displayable,ch))
|
||||
else if (Bt(chars_bmp_displayable,ch))
|
||||
DocPrint(doc,"'%c',0x%X",ch,sc);
|
||||
else
|
||||
DocPrint(doc,"0x%X,0x%X",ch,sc);
|
||||
|
||||
Reference in new issue
Block a user