TempleOS V5.03 Nightly (ISO SHA-1 aed1efc)

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-09 11:35:02 +02:00
1 parent bbd014d8e9
commit da84afbaf7
124 files changed
+3453 -3407

No files matched your search

+38 -16
View File
@@ -153,29 +153,51 @@ U0 StrPrintFunSeg(U8 *buf,I64 addr,I64 field_len,I64 flags)
}
if (str) {
if (offset>0xFFFF) offset=0xFFFF;
if (is_fun) {
str2=MStrPrint("&%s",str);
if (field_len>7) {
if (flags&PRTF_LEFT_JUSTIFY && StrLen(str2)<field_len-7)
StrPrint(buf,"%s+0x%04X",str2,offset);
if (flags&PRTF_COMMA) {
if (is_fun) {
str2=MStrPrint("&%s",str);
if (!field_len)
StrCpy(buf,str2);
else if (flags&PRTF_LEFT_JUSTIFY && StrLen(str2)<field_len)
StrCpy(buf,str2);
else
StrPrint(buf,"%*ts+0x%04X",field_len-7,str2,offset);
} else
StrPrint(buf,"%s+0x%04X",str2,offset);
Free(str2);
StrPrint(buf,"%*ts",field_len,str2);
Free(str2);
} else {
if (!field_len)
StrCpy(buf,str);
else if (flags&PRTF_LEFT_JUSTIFY && StrLen(str)<field_len)
StrCpy(buf,str);
else
StrPrint(buf,"%*ts",field_len,str);
}
} else {
if (field_len>7) {
if (flags&PRTF_LEFT_JUSTIFY && StrLen(str)<field_len-7)
if (is_fun) {
str2=MStrPrint("&%s",str);
if (field_len && field_len>7) {
if (flags&PRTF_LEFT_JUSTIFY && StrLen(str2)<field_len-7)
StrPrint(buf,"%s+0x%04X",str2,offset);
else
StrPrint(buf,"%*ts+0x%04X",field_len-7,str2,offset);
} else
StrPrint(buf,"%s+0x%04X",str2,offset);
Free(str2);
} else {
if (field_len && field_len>7) {
if (flags&PRTF_LEFT_JUSTIFY && StrLen(str)<field_len-7)
StrPrint(buf,"%s+0x%04X",str,offset);
else
StrPrint(buf,"%*ts+0x%04X",field_len-7,str,offset);
} else
StrPrint(buf,"%s+0x%04X",str,offset);
else
StrPrint(buf,"%*ts+0x%04X",field_len-7,str,offset);
} else
StrPrint(buf,"%s+0x%04X",str,offset);
}
}
return;
}
}
if (flags&PRTF_TRUNCATE)
if (flags&PRTF_COMMA)
StrCpy(buf,".");
else if (flags&PRTF_TRUNCATE && field_len)
StrPrint(buf,"%*tX",field_len,addr);
else
StrPrint(buf,"%X",addr);