summaryrefslogtreecommitdiffhomepage
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to 'src/output')
-rw-r--r--src/output/amgc_output_pad_symbol.c10
1 files changed, 10 insertions, 0 deletions
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 <string.h>
#include <apimagic/apimagic.h>
+#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,' ');