From d69f25b49318f4cc00864826456ef69737f87a94 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 17 May 2018 16:46:17 +0200 Subject: [PATCH] better printing --- Makefile | 2 +- lambda.y | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c76d2ff..84b6636 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS:=-g -Wall -Wextra +CFLAGS:=-g -Wall -Wextra -pedantic lambda: lambda.tab.o lambda.yy.o main.o print.o mem.o reduce.o $(LINK.c) $(LDLIBS) $^ $(OUTPUT_OPTION) diff --git a/lambda.y b/lambda.y index 040d834..b7e51a8 100644 --- a/lambda.y +++ b/lambda.y @@ -85,7 +85,11 @@ void decls_print() c = decls; while(c != NULL){ - printf("% -*s = ", maxlen, c->ident); + printf("%s ", c->ident); + len = strlen(c->ident); + for(unsigned int i = 1; i