aboutsummaryrefslogtreecommitdiff
path: root/control
diff options
context:
space:
mode:
Diffstat (limited to 'control')
-rwxr-xr-xcontrol/shell.c6
-rwxr-xr-xcontrol/shell.pd49
2 files changed, 30 insertions, 25 deletions
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;i<ret;i++)
@@ -123,7 +122,6 @@ void shell_read(t_shell *x, int fd)
natom = binbuf_getnatom(bbuf);
at = binbuf_getvec(bbuf);
shell_doit(x,bbuf);
-
}
binbuf_free(bbuf);
}
@@ -150,7 +148,7 @@ static void shell_anything(t_shell *x, t_symbol *s, int ac, t_atom *at)
for (i=1;i<=ac;i++) {
argv[i] = atom_getsymbolarg(i-1,ac,at)->s_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;