repositories
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d10166
)
better printing
author
Mart Lubbers
<mart@martlubbers.net>
Thu, 17 May 2018 14:46:17 +0000
(16:46 +0200)
committer
Mart Lubbers
<mart@martlubbers.net>
Thu, 17 May 2018 14:46:17 +0000
(16:46 +0200)
Makefile
patch
|
blob
|
history
lambda.y
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
c76d2ff
..
84b6636
100644
(file)
--- 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
(file)
--- 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<maxlen-len; i++)
+ putchar(' ');
+ printf("= ");
lambda_print(c->value, NULL);
c = c->next;
}