diff options
author | Oxore <oxore@protonmail.com> | 2023-05-22 21:11:50 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-22 21:11:50 +0300 |
commit | cdabbbcfa0717b2253f79e04eb6ac14996cf9dca (patch) | |
tree | eeabbf96c41bbd23755ee13b3449690d194b5c5e /disasm.cpp | |
parent | e40ee76cdae5d85ef9f997d766956bbe179a1fc3 (diff) |
Impl --indent option in some way, use tab by default
Diffstat (limited to 'disasm.cpp')
-rw-r--r-- | disasm.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1930,6 +1930,7 @@ int Arg::SNPrint( int Op::FPrint( FILE *const stream, + const char *const indent, const RefKindMask ref_kinds, const uint32_t self_addr, const uint32_t ref1_addr, @@ -1954,12 +1955,12 @@ int Op::FPrint( char arg2_str[kArgsBufferSize]{}; const RefKindMask ref2_kinds = ref_kinds & (kRef2Mask | kRefPcRelFix2Bytes); arg2.SNPrint(arg2_str, kArgsBufferSize, false, ref2_kinds, self_addr, ref2_addr); - return fprintf(stream, " %s %s,%s", mnemonic_str, arg1_str, arg2_str); + return fprintf(stream, "%s%s %s,%s", indent, mnemonic_str, arg1_str, arg2_str); } else { - return fprintf(stream, " %s %s", mnemonic_str, arg1_str); + return fprintf(stream, "%s%s %s", indent, mnemonic_str, arg1_str); } } else { - return fprintf(stream, " %s", mnemonic_str); + return fprintf(stream, "%s%s", indent, mnemonic_str); } } |