From 1171cd898fcce4312b7baf2d0d18e9a85c34cb43 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 26 Jul 2002 19:31:51 +0000 Subject: fixed_bug_in_shell svn path=/trunk/externals/ggee/; revision=55 --- control/shell.c | 6 ++---- control/shell.pd | 49 ++++++++++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 25 deletions(-) (limited to 'control') diff --git a/control/shell.c b/control/shell.c index b60744c..112f7de 100755 --- a/control/shell.c +++ b/control/shell.c @@ -48,7 +48,6 @@ void shell_bang(t_shell *x) #if 1 static void shell_doit(void *z, t_binbuf *b) { - t_atom messbuf[1024]; t_shell *x = (t_shell *)z; int msg, natom = binbuf_getnatom(b); t_atom *at = binbuf_getvec(b); @@ -93,7 +92,7 @@ void shell_read(t_shell *x, int fd) (x->sr_inhead >= x->sr_intail ? INBUFSIZE : x->sr_intail-1); int ret; - ret = read(fd, buf,INBUFSIZE); + ret = read(fd, buf,INBUFSIZE-1); buf[ret] = '\0'; for (i=0;is_name; - /* post("argument %s",argv[i]);*/ + post("argument %s",argv[i]); } argv[i] = 0; diff --git a/control/shell.pd b/control/shell.pd index a3b1735..f5cdb0d 100755 --- a/control/shell.pd +++ b/control/shell.pd @@ -1,21 +1,28 @@ -#N canvas 338 239 450 300 10; -#X obj 137 98 shell; -#X msg 36 39 ls; -#X obj 121 165 print; -#X msg 64 40 ls makefile; -#X msg 287 159 date +%k%M; -#X floatatom 287 195 4 0 0; -#X obj 287 177 shell; -#X text 287 141 Getting the date; -#X msg 118 17 bang; -#X msg 140 42 ./startwrapper; -#X obj 60 17 metro 10; -#X floatatom 271 89 4 0 0; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 6 0; -#X connect 6 0 5 0; -#X connect 8 0 10 0; -#X connect 9 0 0 0; -#X connect 10 0 3 0; +#N canvas 309 28 450 300 10; +#X obj 137 98 shell; +#X msg 36 39 ls; +#X obj 121 165 print; +#X msg 64 40 ls makefile; +#X msg 330 86 date +%k%M; +#X floatatom 330 130 4 0 0; +#X obj 330 107 shell; +#X text 330 68 Getting the date; +#X msg 118 17 bang; +#X msg 140 42 ./startwrapper; +#X obj 60 17 metro 10; +#X floatatom 271 89 4 0 0; +#X obj 53 245 shell; +#X obj 53 273 print; +#X msg 53 219 cvs update; +#X msg 133 215 cvs commit -m fixed_bug_in_shell; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 6 0; +#X connect 6 0 5 0; +#X connect 8 0 10 0; +#X connect 9 0 0 0; +#X connect 10 0 3 0; +#X connect 12 0 13 0; +#X connect 14 0 12 0; +#X connect 15 0 12 0; -- cgit v1.2.1