From 5590ea75cc108ae620a47c072fcbd95c1dc74add Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 2 Jan 2016 12:11:47 -0500 Subject: amgc_output_pad_symbol(): increase symwidth to match the next tab stop. --- src/output/amgc_output_pad_symbol.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/output/amgc_output_pad_symbol.c b/src/output/amgc_output_pad_symbol.c index ea10204..6a475ee 100644 --- a/src/output/amgc_output_pad_symbol.c +++ b/src/output/amgc_output_pad_symbol.c @@ -8,6 +8,7 @@ #include #include +#include "apimagic_driver_impl.h" int amgc_output_pad_symbol( const char * symbol, @@ -15,10 +16,19 @@ int amgc_output_pad_symbol( FILE * fout) { int len = (int)(strlen(symbol)); + int symwidth = layout->symwidth; if (layout->symwidth < 1) return -1; + if (layout->tabwidth) { + symwidth += layout->tabwidth; + symwidth &= (~(layout->tabwidth-1)); + } else { + symwidth += AMGC_TAB_WIDTH; + symwidth &= (~(AMGC_TAB_WIDTH-1)); + } + if (layout->tabwidth == 0) return fprintf(fout,"%*c",layout->symwidth-len,' '); -- cgit v1.2.3