]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/samterm/plan9.c
merge
[plan9front.git] / sys / src / cmd / samterm / plan9.c
old mode 100755 (executable)
new mode 100644 (file)
index a7e3d5b..0022d4b
@@ -9,12 +9,16 @@
 #include "flayer.h"
 #include "samterm.h"
 
+enum {
+       STACK = 4096,
+};
+
 static char exname[64];
 
 void
 usage(void)
 {
-       fprint(2, "usage: samterm [-a]\n");
+       fprint(2, "usage: samterm [-ai]\n");
        threadexitsall("usage");
 }
 
@@ -27,6 +31,9 @@ getscreen(int argc, char **argv)
        case 'a':
                autoindent = 1;
                break;
+       case 'i':
+               spacesindent = 1;
+               break;
        default:
                usage();
        }ARGEND
@@ -38,6 +45,7 @@ getscreen(int argc, char **argv)
        t = getenv("tabstop");
        if(t != nil)
                maxtab = strtoul(t, nil, 0);
+       free(t);
        draw(screen, screen->clipr, display->white, nil, ZP);
 }
 
@@ -168,7 +176,7 @@ extstart(void)
        plumbc = chancreate(sizeof(int), 0);
        arg[0] = plumbc;
        arg[1] = &p[1];
-       proccreate(extproc, arg, 1024);
+       proccreate(extproc, arg, STACK);
        atexit(removeextern);
 }
 
@@ -260,7 +268,7 @@ plumbstart(void)
        }
        arg[0] =plumbc;
        arg[1] = &fd;
-       proccreate(plumbproc, arg, 4096);
+       proccreate(plumbproc, arg, STACK);
        return 1;
 }
 
@@ -295,5 +303,5 @@ void
 hoststart(void)
 {
        hostc = chancreate(sizeof(int), 0);
-       proccreate(hostproc, hostc, 1024);
+       proccreate(hostproc, hostc, STACK);
 }