diff --git a/src/modal.c b/src/modal.c index 71e6569..77ea3c8 100644 --- a/src/modal.c +++ b/src/modal.c @@ -65,6 +65,10 @@ put_reg(char r) for(i = 0; i < depth; i++) *dst_++ = ')'; } + } else if(r == '.') { /* unpack */ + if(*s == '(') + s++, --ss; + while(s < ss) *dst_++ = *s++; } else if(r == ':') { /* special stdout */ if(*s == '(') s++, --ss; while(s < ss) { @@ -206,7 +210,7 @@ main(int argc, char **argv) if(argc < 2) return !printf("usage: modal [-v] source.modal\n"); if(argc < 3 && argv[1][0] == '-' && argv[1][1] == 'v') - return !printf("Modal Interpreter, 16 Apr 2024.\n"); + return !printf("Modal Interpreter, 17 Apr 2024.\n"); if(!(f = fopen(argv[1], "r"))) return !fprintf(stderr, "Invalid Modal file: %s.\n", argv[1]); while(fread(&c, 1, 1, f)) {