Housekeeping
This commit is contained in:
parent
a890215143
commit
4bedea3880
4
makefile
4
makefile
|
@ -8,11 +8,11 @@ all: dest
|
|||
dest:
|
||||
@ mkdir -p bin
|
||||
run: all bin/modal
|
||||
@ bin/modal examples/hello.modal 2> /dev/null
|
||||
@ bin/modal examples/hello.modal
|
||||
test: bin/modal-debug bin/modal
|
||||
@ bin/modal -v
|
||||
@ bin/modal-debug examples/test.modal "(arg1) (arg2 (arg3))"
|
||||
@ time bin/modal examples/test.modal "(arg1) (arg2 (arg3))"
|
||||
@ time bin/modal examples/test.modal 2> /dev/null
|
||||
install: bin/modal
|
||||
cp bin/modal ~/bin/
|
||||
uninstall:
|
||||
|
|
11
src/modal.c
11
src/modal.c
|
@ -35,13 +35,14 @@ plode(char *s)
|
|||
{
|
||||
int i, depth = 0;
|
||||
char c, *ss;
|
||||
if(s[0] == '(') { /* implode */
|
||||
/* implode */
|
||||
if(s[0] == '(') {
|
||||
ss = walk(s);
|
||||
while(s < ss) {
|
||||
c = *(s++);
|
||||
while(s < ss && (c = *(s++)))
|
||||
if(!spacer(c)) *outp_++ = c;
|
||||
}
|
||||
} else { /* explode */
|
||||
}
|
||||
/* explode */
|
||||
else {
|
||||
while((c = *s++) && !spacer(c))
|
||||
*outp_++ = c, *outp_++ = ' ', *outp_++ = '(', depth++;
|
||||
for(i = 0; i < depth; i++)
|
||||
|
|
Loading…
Reference in New Issue