From f38a18c10bcb7cfd5ce76a7216686b2631789fee Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 15 Jan 2017 12:51:08 -0600 Subject: nqdasm: improve spacing between mnemonic and operands --- nqdasm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nqdasm.c') diff --git a/nqdasm.c b/nqdasm.c index 4969f47..a2ff732 100644 --- a/nqdasm.c +++ b/nqdasm.c @@ -1,4 +1,5 @@ #include +#include #include "mnemonics.h" @@ -33,7 +34,8 @@ int main() printf("\t%s", m->mnem); for (int i = 0; i < 3 && m->operands[i].type; i++) { - printf("%s", i ? ", " : " "); + if (i) printf(", "); + else printf("%*s", 8 - (int)strlen(m->mnem), ""); print_operand(bits, m->operands + i); } printf("\n"); -- cgit v1.2.3